[Extra Zoom Mode] Implement support for indirect mainframe scrolling
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Feb 2018 17:44:36 +0000 (17:44 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Feb 2018 17:44:36 +0000 (17:44 +0000)
commiteeaec1d3718977591e560cbfe7f193a1acdd4c86
tree98ae3033e72b56f3a85555cd985bece802459774
parentb16ea4e718ce700f7410c9fbf81b8d71af733c21
[Extra Zoom Mode] Implement support for indirect mainframe scrolling
https://bugs.webkit.org/show_bug.cgi?id=182421
<rdar://problem/35142694>

Reviewed by Tim Horton.

Makes a few small adjustments to WKScrollView to improve mainframe scrolling, and disable the pinch gesture for
zooming. See below for more details.

* UIProcess/API/Cocoa/WKWebView.mm:

Remove a now-unneeded WebKitAdditions import.

* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView initWithFrame:]):

Add imports for -Before and -After versions of WKScrollViewAdditions.

(-[WKScrollView addGestureRecognizer:]):

Override -addGestureRecognizer here to prevent touches on the pinch gesture recognizer from being recognized.
I chose this approach instead of just disabling the gesture in -initWithFrame: because (1) the pinch gesture
recognizer is lazily created when setting minimum or maximum zoom scales, rather than immediately in
-initWithFrame:, and (2) even if we set the -enabled to NO, UIKit later resets it to YES in other codepaths.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit/UIProcess/ios/WKScrollView.mm