Changeset 127704 in webkit


Ignore:
Timestamp:
Sep 6, 2012 12:35:43 AM (12 years ago)
Author:
abarth@webkit.org
Message:

Chromium should call restrictScaleFactorToInitialScaleIfNotUserScalable unless/until userScalable is supported directly.
https://bugs.webkit.org/show_bug.cgi?id=91110

Reviewed by Tony Chang.

Source/WebKit/chromium:

Prior to this patch, we were ignoring the user-scalable property of
viewport meta tags. This patch enforces the user-scalable property by
claming the minimum-scale and maximum-scale values, effectively
preventing user scaling. This approach isn't perfect, as discussed in
https://bugs.webkit.org/show_bug.cgi?id=70609, but it is an improvement
over the status quo.

This approach is also used by EFL, GTK, and Qt.

  • src/ChromeClientImpl.cpp:

(WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):

LayoutTests:

Test that the scale limits are clamped when user-scalable is set to no.

  • fast/viewport/viewport-limits-adjusted-for-no-user-scale-control-expected.txt: Added.
  • fast/viewport/viewport-limits-adjusted-for-no-user-scale-control.html: Added.
  • fast/viewport/viewport-limits-adjusted-for-no-user-scale-expected.txt: Added.
  • fast/viewport/viewport-limits-adjusted-for-no-user-scale.html: Added.
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r127703 r127704  
     12012-09-06  Adam Barth  <abarth@webkit.org>
     2
     3        Chromium should call restrictScaleFactorToInitialScaleIfNotUserScalable unless/until userScalable is supported directly.
     4        https://bugs.webkit.org/show_bug.cgi?id=91110
     5
     6        Reviewed by Tony Chang.
     7
     8        Test that the scale limits are clamped when user-scalable is set to no.
     9
     10        * fast/viewport/viewport-limits-adjusted-for-no-user-scale-control-expected.txt: Added.
     11        * fast/viewport/viewport-limits-adjusted-for-no-user-scale-control.html: Added.
     12        * fast/viewport/viewport-limits-adjusted-for-no-user-scale-expected.txt: Added.
     13        * fast/viewport/viewport-limits-adjusted-for-no-user-scale.html: Added.
     14
    1152012-09-06  Sheriff Bot  <webkit.review.bot@gmail.com>
    216
  • trunk/Source/WebKit/chromium/ChangeLog

    r127699 r127704  
     12012-09-06  Adam Barth  <abarth@webkit.org>
     2
     3        Chromium should call restrictScaleFactorToInitialScaleIfNotUserScalable unless/until userScalable is supported directly.
     4        https://bugs.webkit.org/show_bug.cgi?id=91110
     5
     6        Reviewed by Tony Chang.
     7
     8        Prior to this patch, we were ignoring the user-scalable property of
     9        viewport meta tags. This patch enforces the user-scalable property by
     10        claming the minimum-scale and maximum-scale values, effectively
     11        preventing user scaling. This approach isn't perfect, as discussed in
     12        https://bugs.webkit.org/show_bug.cgi?id=70609, but it is an improvement
     13        over the status quo.
     14
     15        This approach is also used by EFL, GTK, and Qt.
     16
     17        * src/ChromeClientImpl.cpp:
     18        (WebKit::ChromeClientImpl::dispatchViewportPropertiesDidChange):
     19
    1202012-09-05  Dana Jansens  <danakj@chromium.org>
    221
  • trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp

    r127558 r127704  
    654654        dpi / ViewportArguments::deprecatedTargetDPI, IntSize(deviceRect.width, deviceRect.height));
    655655
     656    restrictScaleFactorToInitialScaleIfNotUserScalable(computed);
     657
    656658    if (m_webView->ignoreViewportTagMaximumScale()) {
    657659        computed.maximumScale = max(computed.maximumScale, m_webView->maxPageScaleFactor);
Note: See TracChangeset for help on using the changeset viewer.