Title: [279975] trunk/Source/WebKit
Revision
279975
Author
[email protected]
Date
2021-07-15 21:01:38 -0700 (Thu, 15 Jul 2021)

Log Message

[iOS] WKMouseGestureRecognizer should not have failure requirements on WKDeferringGestureRecognizer
https://bugs.webkit.org/show_bug.cgi?id=228013
rdar://80342462

Reviewed by Tim Horton.

Avoid adding a gesture failure requirement between any WKDeferringGestureRecognizers and
WKMouseGestureRecognizer; It doesn't make sense to claim that WKMouseGestureRecognizer should only recognize
once active touch events have been handled by the web page. Under normal circumstances, this gesture failure
requirement is actually completely benign, since touch events should never be received by
WKMouseGestureRecognizer in the first place, and when using a trackpad, deferring gesture recognizers are not
triggered.

However, if an app were to (hypothetically) swizzle out `-gestureRecognizer:shouldReceiveTouch:` to force
WKMouseGestureRecognizer to receive normal (non-trackpad) touch events, this could cause nearly all gesture
recognizers in the window to become unresponsive, since WKMouseGestureRecognizer would be stuck in Changed state
long after other gestures in the same subgraph have transitioned to Ended or Failed state, thereby preventing
all of these gestures from being reset to Possible state.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (279974 => 279975)


--- trunk/Source/WebKit/ChangeLog	2021-07-16 02:09:39 UTC (rev 279974)
+++ trunk/Source/WebKit/ChangeLog	2021-07-16 04:01:38 UTC (rev 279975)
@@ -1,3 +1,27 @@
+2021-07-15  Wenson Hsieh  <[email protected]>
+
+        [iOS] WKMouseGestureRecognizer should not have failure requirements on WKDeferringGestureRecognizer
+        https://bugs.webkit.org/show_bug.cgi?id=228013
+        rdar://80342462
+
+        Reviewed by Tim Horton.
+
+        Avoid adding a gesture failure requirement between any WKDeferringGestureRecognizers and
+        WKMouseGestureRecognizer; It doesn't make sense to claim that WKMouseGestureRecognizer should only recognize
+        once active touch events have been handled by the web page. Under normal circumstances, this gesture failure
+        requirement is actually completely benign, since touch events should never be received by
+        WKMouseGestureRecognizer in the first place, and when using a trackpad, deferring gesture recognizers are not
+        triggered.
+
+        However, if an app were to (hypothetically) swizzle out `-gestureRecognizer:shouldReceiveTouch:` to force
+        WKMouseGestureRecognizer to receive normal (non-trackpad) touch events, this could cause nearly all gesture
+        recognizers in the window to become unresponsive, since WKMouseGestureRecognizer would be stuck in Changed state
+        long after other gestures in the same subgraph have transitioned to Ended or Failed state, thereby preventing
+        all of these gestures from being reset to Possible state.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView deferringGestureRecognizer:shouldDeferOtherGestureRecognizer:]):
+
 2021-07-15  Jean-Yves Avenard  <[email protected]>
 
         [Wk1] media/media-source/media-webm-opus-partial.html is a consistent failure (Enable VP8/VP9/Vorbis/Opus in WebKitLegacy)

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (279974 => 279975)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2021-07-16 02:09:39 UTC (rev 279974)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2021-07-16 04:01:38 UTC (rev 279975)
@@ -8006,6 +8006,11 @@
     if (gestureRecognizer == _touchEventGestureRecognizer)
         return NO;
 
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
+    if (gestureRecognizer == _mouseGestureRecognizer)
+        return NO;
+#endif
+
 #if ENABLE(IMAGE_ANALYSIS)
     if (deferringGestureRecognizer == _imageAnalysisDeferringGestureRecognizer)
         return [self shouldDeferGestureDueToImageAnalysis:gestureRecognizer];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to