Changeset 133729 in webkit


Ignore:
Timestamp:
Nov 7, 2012 12:54:46 AM (11 years ago)
Author:
kenneth@webkit.org
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):

Location:
trunk/Source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r133728 r133729  
     12012-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        Remove support for "desktop-width" in the viewport meta tag
     4        https://bugs.webkit.org/show_bug.cgi?id=101217
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        This has been removed from the CSS Device Adaptation spec, and
     9        should be safe to remove as it is not documented anywhere (neither
     10        in blog posts).
     11
     12        The viewport meta should only support the legacy features.
     13
     14        * dom/ViewportArguments.cpp:
     15        (WebCore::computeViewportAttributes):
     16        (WebCore::findSizeValue):
     17        (WebCore::findScaleValue):
     18        (WebCore::findUserScalableValue):
     19        * dom/ViewportArguments.h:
     20
    1212012-11-07  Dominik Röttsches  <dominik.rottsches@intel.com>
    222
  • trunk/Source/WebCore/dom/ViewportArguments.cpp

    r133624 r133729  
    6262
    6363    switch (int(args.width)) {
    64     case ViewportArguments::ValueDesktopWidth:
    65         args.width = desktopWidth;
    66         break;
    6764    case ViewportArguments::ValueDeviceWidth:
    6865        args.width = deviceWidth;
     
    7471
    7572    switch (int(args.height)) {
    76     case ViewportArguments::ValueDesktopWidth:
    77         args.height = desktopWidth;
    78         break;
    7973    case ViewportArguments::ValueDeviceWidth:
    8074        args.height = deviceWidth;
     
    219213    // 4) Other keywords and unknown values translate to 0.0.
    220214
    221     if (equalIgnoringCase(valueString, "desktop-width"))
    222         return ViewportArguments::ValueDesktopWidth;
    223215    if (equalIgnoringCase(valueString, "device-width"))
    224216        return ViewportArguments::ValueDeviceWidth;
     
    246238    if (equalIgnoringCase(valueString, "no"))
    247239        return 0;
    248     if (equalIgnoringCase(valueString, "desktop-width"))
    249         return 10;
    250240    if (equalIgnoringCase(valueString, "device-width"))
    251241        return 10;
     
    274264    if (equalIgnoringCase(valueString, "no"))
    275265        return 0;
    276     if (equalIgnoringCase(valueString, "desktop-width"))
    277         return 1;
    278266    if (equalIgnoringCase(valueString, "device-width"))
    279267        return 1;
  • trunk/Source/WebCore/dom/ViewportArguments.h

    r133624 r133729  
    6969    enum {
    7070        ValueAuto = -1,
    71         ValueDesktopWidth = -2,
    72         ValueDeviceWidth = -3,
    73         ValueDeviceHeight = -4,
     71        ValueDeviceWidth = -2,
     72        ValueDeviceHeight = -3,
    7473    };
    7574
  • trunk/Source/WebKit/blackberry/Api/WebViewportArguments.h

    r121555 r133729  
    4848    enum {
    4949        ValueAuto = -1,
    50         ValueDesktopWidth = -2,
    51         ValueDeviceWidth = -3,
    52         ValueDeviceHeight = -4,
     50        ValueDeviceWidth = -2,
     51        ValueDeviceHeight = -3,
    5352    };
    5453
  • trunk/Source/WebKit/blackberry/ChangeLog

    r133679 r133729  
     12012-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        Remove support for "desktop-width" in the viewport meta tag
     4        https://bugs.webkit.org/show_bug.cgi?id=101217
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Sync WebViewportArguments enum with the one in
     9        WebCore::ViewportArguments
     10
     11        * Api/WebViewportArguments.h:
     12
    1132012-11-06  Genevieve Mak  <gmak@rim.com>
    214
  • trunk/Source/WebKit/chromium/ChangeLog

    r133720 r133729  
     12012-11-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        Remove support for "desktop-width" in the viewport meta tag
     4        https://bugs.webkit.org/show_bug.cgi?id=101217
     5
     6        Reviewed by Gyuyoung Kim.
     7
     8        Remove some code trying to use the set desktop width (say 980) for
     9        sites not using a viewport meta element.
     10
     11        Removing this code should have no effect as it ends up being set
     12        to desktop width in that case anyway, by the ViewportArguments
     13        algorithm.
     14
     15        * src/ChromeClientImpl.cpp:
     16        (WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):
     17
    1182012-11-06  Dan Beam  <dbeam@chromium.org>
    219
  • trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp

    r133284 r133729  
    616616        return;
    617617
    618     ViewportArguments args;
    619     if (arguments == args) {
    620         // Default viewport arguments passed in. This is a signal to reset the viewport.
    621         args.width = ViewportArguments::ValueDesktopWidth;
    622     } else
    623         args = arguments;
    624 
    625618    FrameView* frameView = m_webView->mainFrameImpl()->frameView();
    626619    int dpi = screenHorizontalDPI(frameView);
     
    637630    // Call the common viewport computing logic in ViewportArguments.cpp.
    638631    ViewportAttributes computed = computeViewportAttributes(
    639         args, settings->layoutFallbackWidth(), deviceRect.width, deviceRect.height,
     632        arguments, settings->layoutFallbackWidth(), deviceRect.width, deviceRect.height,
    640633        devicePixelRatio, IntSize(deviceRect.width, deviceRect.height));
    641634
Note: See TracChangeset for help on using the changeset viewer.