Changeset 202354 in webkit


Ignore:
Timestamp:
Jun 22, 2016 3:52:00 PM (8 years ago)
Author:
dino@apple.com
Message:

REGRESSION: Double tap to zoom does not work on yahoo finance
https://bugs.webkit.org/show_bug.cgi?id=158886
<rdar://problem/24917760>

Reviewed by Simon Fraser.

Source/WebKit2:

We shouldn't enable fast click on pages that have
had to shrink to fit. In other words, we should enable
double-tap-to-zoom if the page has already zoomed.

Test: fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _allowsDoubleTapGestures]):

LayoutTests:

  • fast/events/ios/viewport-shrink-to-fit-allows-double-tap-expected.txt: Added.
  • fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r202349 r202354  
     12016-06-17  Dean Jackson  <dino@apple.com>
     2
     3        REGRESSION: Double tap to zoom does not work on yahoo finance
     4        https://bugs.webkit.org/show_bug.cgi?id=158886
     5        <rdar://problem/24917760>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * fast/events/ios/viewport-shrink-to-fit-allows-double-tap-expected.txt: Added.
     10        * fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html: Added.
     11
    1122016-06-22  Myles C. Maxfield  <mmaxfield@apple.com>
    213
  • trunk/Source/WebKit2/ChangeLog

    r202351 r202354  
     12016-06-17  Dean Jackson  <dino@apple.com>
     2
     3        REGRESSION: Double tap to zoom does not work on yahoo finance
     4        https://bugs.webkit.org/show_bug.cgi?id=158886
     5        <rdar://problem/24917760>
     6
     7        Reviewed by Simon Fraser.
     8
     9        We shouldn't enable fast click on pages that have
     10        had to shrink to fit. In other words, we should enable
     11        double-tap-to-zoom if the page has already zoomed.
     12
     13        Test: fast/events/ios/viewport-shrink-to-fit-allows-double-tap.html
     14
     15        * UIProcess/API/Cocoa/WKWebView.mm:
     16        (-[WKWebView _allowsDoubleTapGestures]):
     17
    1182016-06-22  Brian Burg  <bburg@apple.com>
    219
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r202329 r202354  
    17391739        return YES;
    17401740
    1741     // For scalable viewports, only disable double tap gestures if the viewport width is device width.
     1741    // If the page set a viewport width that wasn't the device width, then it was
     1742    // scaled and thus will probably need to zoom.
    17421743    if (_viewportMetaTagWidth != WebCore::ViewportArguments::ValueDeviceWidth)
    17431744        return YES;
    17441745
    1745     return !areEssentiallyEqualAsFloat(contentZoomScale(self), _initialScaleFactor);
     1746    // At this point, we have a page that asked for width = device-width. However,
     1747    // if the content's width and height were large, we might have had to shrink it.
     1748    // Since we'll enable double tap zoom whenever we're not at the actual
     1749    // initial scale, this simply becomes a test of the current scale against 1.
     1750    return !areEssentiallyEqualAsFloat(contentZoomScale(self), 1);
    17461751}
    17471752
Note: See TracChangeset for help on using the changeset viewer.