Changeset 202179 in webkit


Ignore:
Timestamp:
Jun 17, 2016 2:21:52 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

    r202178 r202179  
     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-17  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WebKit2/ChangeLog

    r202154 r202179  
     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-16  Chris Dumez  <cdumez@apple.com>
    219
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm

    r202132 r202179  
    17361736        return YES;
    17371737
    1738     // For scalable viewports, only disable double tap gestures if the viewport width is device width.
     1738    // If the page set a viewport width that wasn't the device width, then it was
     1739    // scaled and thus will probably need to zoom.
    17391740    if (_viewportMetaTagWidth != WebCore::ViewportArguments::ValueDeviceWidth)
    17401741        return YES;
    17411742
    1742     return !areEssentiallyEqualAsFloat(contentZoomScale(self), _initialScaleFactor);
     1743    // At this point, we have a page that asked for width = device-width. However,
     1744    // if the content's width and height were large, we might have had to shrink it.
     1745    // Since we'll enable double tap zoom whenever we're not at the actual
     1746    // initial scale, this simply becomes a test of the current scale against 1.
     1747    return !areEssentiallyEqualAsFloat(contentZoomScale(self), 1);
    17431748}
    17441749
Note: See TracChangeset for help on using the changeset viewer.