Title: [133729] trunk/Source
Revision
133729
Author
[email protected]
Date
2012-11-07 00:54:46 -0800 (Wed, 07 Nov 2012)

Log Message

Remove support for "desktop-width" in the viewport meta tag
https://bugs.webkit.org/show_bug.cgi?id=101217

Reviewed by Gyuyoung Kim.

Source/WebCore:

This has been removed from the CSS Device Adaptation spec, and
should be safe to remove as it is not documented anywhere (neither
in blog posts).

The viewport meta should only support the legacy features.

* dom/ViewportArguments.cpp:
(WebCore::computeViewportAttributes):
(WebCore::findSizeValue):
(WebCore::findScaleValue):
(WebCore::findUserScalableValue):
* dom/ViewportArguments.h:

Source/WebKit/blackberry:

Sync WebViewportArguments enum with the one in
WebCore::ViewportArguments

* Api/WebViewportArguments.h:

Source/WebKit/chromium:

Remove some code trying to use the set desktop width (say 980) for
sites not using a viewport meta element.

Removing this code should have no effect as it ends up being set
to desktop width in that case anyway, by the ViewportArguments
algorithm.

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (133728 => 133729)


--- trunk/Source/WebCore/ChangeLog	2012-11-07 08:40:34 UTC (rev 133728)
+++ trunk/Source/WebCore/ChangeLog	2012-11-07 08:54:46 UTC (rev 133729)
@@ -1,3 +1,23 @@
+2012-11-07  Kenneth Rohde Christiansen  <[email protected]>
+
+        Remove support for "desktop-width" in the viewport meta tag
+        https://bugs.webkit.org/show_bug.cgi?id=101217
+
+        Reviewed by Gyuyoung Kim.
+
+        This has been removed from the CSS Device Adaptation spec, and
+        should be safe to remove as it is not documented anywhere (neither
+        in blog posts).
+
+        The viewport meta should only support the legacy features.
+
+        * dom/ViewportArguments.cpp:
+        (WebCore::computeViewportAttributes):
+        (WebCore::findSizeValue):
+        (WebCore::findScaleValue):
+        (WebCore::findUserScalableValue):
+        * dom/ViewportArguments.h:
+
 2012-11-07  Dominik Röttsches  <[email protected]>
 
         [EFL] Fix execution of exif-orientation-image-document.html on EFL Wk2 bot

Modified: trunk/Source/WebCore/dom/ViewportArguments.cpp (133728 => 133729)


--- trunk/Source/WebCore/dom/ViewportArguments.cpp	2012-11-07 08:40:34 UTC (rev 133728)
+++ trunk/Source/WebCore/dom/ViewportArguments.cpp	2012-11-07 08:54:46 UTC (rev 133729)
@@ -61,9 +61,6 @@
     }
 
     switch (int(args.width)) {
-    case ViewportArguments::ValueDesktopWidth:
-        args.width = desktopWidth;
-        break;
     case ViewportArguments::ValueDeviceWidth:
         args.width = deviceWidth;
         break;
@@ -73,9 +70,6 @@
     }
 
     switch (int(args.height)) {
-    case ViewportArguments::ValueDesktopWidth:
-        args.height = desktopWidth;
-        break;
     case ViewportArguments::ValueDeviceWidth:
         args.height = deviceWidth;
         break;
@@ -218,8 +212,6 @@
     // 3) device-width and device-height are used as keywords.
     // 4) Other keywords and unknown values translate to 0.0.
 
-    if (equalIgnoringCase(valueString, "desktop-width"))
-        return ViewportArguments::ValueDesktopWidth;
     if (equalIgnoringCase(valueString, "device-width"))
         return ViewportArguments::ValueDeviceWidth;
     if (equalIgnoringCase(valueString, "device-height"))
@@ -245,8 +237,6 @@
         return 1;
     if (equalIgnoringCase(valueString, "no"))
         return 0;
-    if (equalIgnoringCase(valueString, "desktop-width"))
-        return 10;
     if (equalIgnoringCase(valueString, "device-width"))
         return 10;
     if (equalIgnoringCase(valueString, "device-height"))
@@ -273,8 +263,6 @@
         return 1;
     if (equalIgnoringCase(valueString, "no"))
         return 0;
-    if (equalIgnoringCase(valueString, "desktop-width"))
-        return 1;
     if (equalIgnoringCase(valueString, "device-width"))
         return 1;
     if (equalIgnoringCase(valueString, "device-height"))

Modified: trunk/Source/WebCore/dom/ViewportArguments.h (133728 => 133729)


--- trunk/Source/WebCore/dom/ViewportArguments.h	2012-11-07 08:40:34 UTC (rev 133728)
+++ trunk/Source/WebCore/dom/ViewportArguments.h	2012-11-07 08:54:46 UTC (rev 133729)
@@ -68,9 +68,8 @@
 
     enum {
         ValueAuto = -1,
-        ValueDesktopWidth = -2,
-        ValueDeviceWidth = -3,
-        ValueDeviceHeight = -4,
+        ValueDeviceWidth = -2,
+        ValueDeviceHeight = -3,
     };
 
     ViewportArguments(Type type = Implicit)

Modified: trunk/Source/WebKit/blackberry/Api/WebViewportArguments.h (133728 => 133729)


--- trunk/Source/WebKit/blackberry/Api/WebViewportArguments.h	2012-11-07 08:40:34 UTC (rev 133728)
+++ trunk/Source/WebKit/blackberry/Api/WebViewportArguments.h	2012-11-07 08:54:46 UTC (rev 133729)
@@ -47,9 +47,8 @@
     // This matches the enum found in WebCore::ViewportArguments
     enum {
         ValueAuto = -1,
-        ValueDesktopWidth = -2,
-        ValueDeviceWidth = -3,
-        ValueDeviceHeight = -4,
+        ValueDeviceWidth = -2,
+        ValueDeviceHeight = -3,
     };
 
     float initialScale() const;

Modified: trunk/Source/WebKit/blackberry/ChangeLog (133728 => 133729)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-11-07 08:40:34 UTC (rev 133728)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-11-07 08:54:46 UTC (rev 133729)
@@ -1,3 +1,15 @@
+2012-11-07  Kenneth Rohde Christiansen  <[email protected]>
+
+        Remove support for "desktop-width" in the viewport meta tag
+        https://bugs.webkit.org/show_bug.cgi?id=101217
+
+        Reviewed by Gyuyoung Kim.
+
+        Sync WebViewportArguments enum with the one in
+        WebCore::ViewportArguments
+
+        * Api/WebViewportArguments.h:
+
 2012-11-06  Genevieve Mak  <[email protected]>
 
         [BlackBerry] Crash in InRegionScrollerPrivate.

Modified: trunk/Source/WebKit/chromium/ChangeLog (133728 => 133729)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-11-07 08:40:34 UTC (rev 133728)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-11-07 08:54:46 UTC (rev 133729)
@@ -1,3 +1,20 @@
+2012-11-07  Kenneth Rohde Christiansen  <[email protected]>
+
+        Remove support for "desktop-width" in the viewport meta tag
+        https://bugs.webkit.org/show_bug.cgi?id=101217
+
+        Reviewed by Gyuyoung Kim.
+
+        Remove some code trying to use the set desktop width (say 980) for
+        sites not using a viewport meta element.
+
+        Removing this code should have no effect as it ends up being set
+        to desktop width in that case anyway, by the ViewportArguments
+        algorithm.
+
+        * src/ChromeClientImpl.cpp:
+        (WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):
+
 2012-11-06  Dan Beam  <[email protected]>
 
         Enable REQUEST_AUTOCOMPLETE for chromium port

Modified: trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp (133728 => 133729)


--- trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp	2012-11-07 08:40:34 UTC (rev 133728)
+++ trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp	2012-11-07 08:54:46 UTC (rev 133729)
@@ -615,13 +615,6 @@
     if (!m_webView->settings()->viewportEnabled() || !m_webView->isFixedLayoutModeEnabled() || !m_webView->client() || !m_webView->page())
         return;
 
-    ViewportArguments args;
-    if (arguments == args) {
-        // Default viewport arguments passed in. This is a signal to reset the viewport.
-        args.width = ViewportArguments::ValueDesktopWidth;
-    } else
-        args = arguments;
-
     FrameView* frameView = m_webView->mainFrameImpl()->frameView();
     int dpi = screenHorizontalDPI(frameView);
     ASSERT(dpi > 0);
@@ -636,7 +629,7 @@
     float devicePixelRatio = dpi / ViewportArguments::deprecatedTargetDPI;
     // Call the common viewport computing logic in ViewportArguments.cpp.
     ViewportAttributes computed = computeViewportAttributes(
-        args, settings->layoutFallbackWidth(), deviceRect.width, deviceRect.height,
+        arguments, settings->layoutFallbackWidth(), deviceRect.width, deviceRect.height,
         devicePixelRatio, IntSize(deviceRect.width, deviceRect.height));
 
     restrictScaleFactorToInitialScaleIfNotUserScalable(computed);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to