When a page has an unscalable viewport (for instance, user-scalable = no or minimum-scale = 1, maximum-scale = 1) we should not have to wait 350 ms for the double tap gesture recognizer to fire.
<rdar://problem/23054453>
Can we just get rid of unscalable web pages instead? These are the worst.
Created attachment 262834 [details] Patch
Created attachment 262864 [details] Patch
Comment on attachment 262864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=262864&action=review > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:2266 > +- (void)_setDoubleTapGesturesEnabled:(BOOL)enabled > +{ > + if (enabled && ![_doubleTapGestureRecognizer isEnabled]) { > + // The first tap recognized after re-enabling double tap gestures will not wait for the > + // second tap before committing. To fix this, we use a new double tap gesture recognizer. > + [self removeGestureRecognizer:_doubleTapGestureRecognizer.get()]; > + [_doubleTapGestureRecognizer setDelegate:nil]; > + [self _createAndConfigureDoubleTapGestureRecognizer]; > + } > + [_doubleTapGestureRecognizer setEnabled:enabled]; > +} Why can't we do this when we adjust the UIScrollView zoom scales? We know if it's zoomable there. > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:252 > + bool viewportIsUserScalable = userCanScaleViewport(m_viewportConfiguration); > + if (viewportWasUserScalable != viewportIsUserScalable) > + send(Messages::WebPageProxy::ViewportUserScalableDidChange(viewportIsUserScalable)); This should not be a new message (if it's needed at all); it should be in the transaction.
Created attachment 263057 [details] Patch
Comment on attachment 263057 [details] Patch Clearing flags on attachment: 263057 Committed r191072: <http://trac.webkit.org/changeset/191072>
All reviewed patches have been landed. Closing bug.
Great stuff and fast work there. Interesting to note that my proposal to tackle this has been sitting in limbo for 2 years https://bugs.webkit.org/show_bug.cgi?id=122212