Web pages with unscalable viewports shouldn't have a single tap delay
https://bugs.webkit.org/show_bug.cgi?id=149968
<rdar://problem/
23054453>
Reviewed by Simon Fraser.
Source/WebKit2:
When a viewport is unscalable (specified through the meta viewport tag) we
do not add a delay to our single tap gesture recognizer. We do this by
disabling or reinitializing the WKContentView's double tap gesture recognizer
when the viewport becomes unscalable or scalable, respectively. A viewport is
deemed unscalable when it has user-scalable = no, or when the minimum scale is
greater than or equal to the maximum scale.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]): Pulled logic
for initializing a double tap gesture recognizer out into a helper function.
(-[WKContentView setupInteraction]):
(-[WKContentView _setDoubleTapGesturesEnabled:]): Turns gesture recognition for double
taps on or off.
LayoutTests:
Add a layout test to check that when a viewport is unscalable (specified through
the meta viewport tag) we do not add a delay to our single tap gesture recognizer.
* fast/events/ios/unscalable-viewport-clicks-on-doubletap-expected.txt: Added.
* fast/events/ios/unscalable-viewport-clicks-on-doubletap.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191072
268f45cc-cd09-0410-ab3c-
d52691b4dbfc