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.

