Title: [240316] trunk/Source/WebKit
Revision
240316
Author
megan_gard...@apple.com
Date
2019-01-22 18:12:08 -0800 (Tue, 22 Jan 2019)

Log Message

Cancel Web Touches Properly so that long presses on YouTube links do not incorrectly trigger a load
https://bugs.webkit.org/show_bug.cgi?id=193687
<rdar://problem/47056717>

Reviewed by Tim Horton.

Cancel web gestures when a long press is recognized.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _cancelWebGestureRecognizer]):
(-[WKContentView _longPressRecognized:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (240315 => 240316)


--- trunk/Source/WebKit/ChangeLog	2019-01-23 02:06:53 UTC (rev 240315)
+++ trunk/Source/WebKit/ChangeLog	2019-01-23 02:12:08 UTC (rev 240316)
@@ -1,3 +1,18 @@
+2019-01-22  Megan Gardner  <megan_gard...@apple.com>
+
+        Cancel Web Touches Properly so that long presses on YouTube links do not incorrectly trigger a load
+        https://bugs.webkit.org/show_bug.cgi?id=193687
+        <rdar://problem/47056717>
+
+        Reviewed by Tim Horton.
+
+        Cancel web gestures when a long press is recognized.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _cancelWebGestureRecognizer]):
+        (-[WKContentView _longPressRecognized:]):
+
 2019-01-22  Alex Christensen  <achristen...@webkit.org>
 
         Fix an internal build failure after r240292

Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (240315 => 240316)


--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2019-01-23 02:06:53 UTC (rev 240315)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2019-01-23 02:12:08 UTC (rev 240316)
@@ -758,6 +758,7 @@
 
 @interface UIWebTouchEventsGestureRecognizer ()
 - (id)initWithTarget:(id)target action:(SEL)action touchDelegate:(id <UIWebTouchEventsGestureRecognizerDelegate>)delegate;
+- (void)cancel;
 @property (nonatomic, getter=isDefaultPrevented) BOOL defaultPrevented;
 @property (nonatomic, readonly) BOOL inJavaScriptGesture;
 @property (nonatomic, readonly) CGPoint locationInWindow;

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (240315 => 240316)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-01-23 02:06:53 UTC (rev 240315)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-01-23 02:12:08 UTC (rev 240316)
@@ -1348,6 +1348,13 @@
     [_highlightLongPressGestureRecognizer cancel];
 }
 
+- (void)_cancelTouchEventGestureRecognizer
+{
+#if HAVE(CANCEL_WEB_TOUCH_EVENTS_GESTURE)
+    [_touchEventGestureRecognizer cancel];
+#endif
+}
+
 - (void)_didScroll
 {
     [self _cancelLongPressGestureRecognizer];
@@ -1979,6 +1986,7 @@
 {
     ASSERT(gestureRecognizer == _longPressGestureRecognizer);
     [self _resetIsDoubleTapPending];
+    [self _cancelTouchEventGestureRecognizer];
 
     _lastInteractionLocation = gestureRecognizer.startPoint;
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to