Title: [255625] trunk/Source/WebKit
Revision
255625
Author
wenson_hs...@apple.com
Date
2020-02-03 17:51:21 -0800 (Mon, 03 Feb 2020)

Log Message

Add a WebKitAdditions hook to override the behavior of -[WKContentView gestureRecognizer:shouldReceiveTouch:]
https://bugs.webkit.org/show_bug.cgi?id=207162
<rdar://problem/59129739>

Reviewed by Tim Horton.

Allow an internal implementation of `-_allowGestureRecognizer:toReceiveTouch:` to prevent touches from being
routed to certain gesture recognizers, if necessary.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (255624 => 255625)


--- trunk/Source/WebKit/ChangeLog	2020-02-04 01:47:26 UTC (rev 255624)
+++ trunk/Source/WebKit/ChangeLog	2020-02-04 01:51:21 UTC (rev 255625)
@@ -1,3 +1,17 @@
+2020-02-03  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        Add a WebKitAdditions hook to override the behavior of -[WKContentView gestureRecognizer:shouldReceiveTouch:]
+        https://bugs.webkit.org/show_bug.cgi?id=207162
+        <rdar://problem/59129739>
+
+        Reviewed by Tim Horton.
+
+        Allow an internal implementation of `-_allowGestureRecognizer:toReceiveTouch:` to prevent touches from being
+        routed to certain gesture recognizers, if necessary.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
+
 2020-02-03  Chris Dumez  <cdu...@apple.com>
 
         [WK2] Use per-UIProcess default cookie storage for Mac Catalyst apps

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (255624 => 255625)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-02-04 01:47:26 UTC (rev 255624)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-02-04 01:51:21 UTC (rev 255625)
@@ -1521,7 +1521,6 @@
 #endif
 
     if (gestureRecognizer == _touchActionLeftSwipeGestureRecognizer || gestureRecognizer == _touchActionRightSwipeGestureRecognizer || gestureRecognizer == _touchActionUpSwipeGestureRecognizer || gestureRecognizer == _touchActionDownSwipeGestureRecognizer) {
-
         // We update the enabled state of the various swipe gesture recognizers such that if we have a unidirectional touch-action
         // specified (only pan-x or only pan-y) we enable the two recognizers in the opposite axis to prevent scrolling from starting
         // if the initial gesture is such a swipe. Since the recognizers are specified to use a single finger for recognition, we don't
@@ -1532,7 +1531,11 @@
         return touchActions == WebCore::TouchAction::PanX;
     }
 
+#if USE(APPLE_INTERNAL_SDK)
+    return [self _allowGestureRecognizer:gestureRecognizer toReceiveTouch:touch];
+#else
     return YES;
+#endif
 }
 
 #pragma mark - WKTouchActionGestureRecognizerDelegate implementation
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to