Title: [256806] trunk/Source
Revision
256806
Author
timothy_hor...@apple.com
Date
2020-02-17 18:51:26 -0800 (Mon, 17 Feb 2020)

Log Message

Add and adopt HAVE(LOOKUP_GESTURE_RECOGNIZER)
https://bugs.webkit.org/show_bug.cgi?id=207876

Reviewed by Wenson Hsieh.

* wtf/PlatformHave.h:

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
For symmetry's sake, introduce a HAVE for this gesture.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (256805 => 256806)


--- trunk/Source/WTF/ChangeLog	2020-02-18 02:48:21 UTC (rev 256805)
+++ trunk/Source/WTF/ChangeLog	2020-02-18 02:51:26 UTC (rev 256806)
@@ -1,3 +1,13 @@
+2020-02-17  Tim Horton  <timothy_hor...@apple.com>
+
+        Add and adopt HAVE(LOOKUP_GESTURE_RECOGNIZER)
+        https://bugs.webkit.org/show_bug.cgi?id=207876
+
+        Reviewed by Wenson Hsieh.
+
+        * wtf/PlatformHave.h:
+        For symmetry's sake, introduce a HAVE for this gesture.
+
 2020-02-17  Mark Lam  <mark....@apple.com>
 
         getVTablePointer() should return a const void*.

Modified: trunk/Source/WTF/wtf/PlatformHave.h (256805 => 256806)


--- trunk/Source/WTF/wtf/PlatformHave.h	2020-02-18 02:48:21 UTC (rev 256805)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2020-02-18 02:51:26 UTC (rev 256806)
@@ -478,6 +478,7 @@
 
 #if PLATFORM(MACCATALYST)
 #define HAVE_HOVER_GESTURE_RECOGNIZER 1
+#define HAVE_LOOKUP_GESTURE_RECOGNIZER 1
 #endif
 
 #if PLATFORM(MACCATALYST)

Modified: trunk/Source/WebKit/ChangeLog (256805 => 256806)


--- trunk/Source/WebKit/ChangeLog	2020-02-18 02:48:21 UTC (rev 256805)
+++ trunk/Source/WebKit/ChangeLog	2020-02-18 02:51:26 UTC (rev 256806)
@@ -1,3 +1,19 @@
+2020-02-17  Tim Horton  <timothy_hor...@apple.com>
+
+        Add and adopt HAVE(LOOKUP_GESTURE_RECOGNIZER)
+        https://bugs.webkit.org/show_bug.cgi?id=207876
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView setupInteraction]):
+        (-[WKContentView cleanupInteraction]):
+        (-[WKContentView _removeDefaultGestureRecognizers]):
+        (-[WKContentView _addDefaultGestureRecognizers]):
+        (-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
+        For symmetry's sake, introduce a HAVE for this gesture.
+
 2020-02-17  Youenn Fablet  <you...@apple.com>
 
         Do not call whenReady callbacks in case of network process crash

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (256805 => 256806)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2020-02-18 02:48:21 UTC (rev 256805)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2020-02-18 02:51:26 UTC (rev 256806)
@@ -236,7 +236,7 @@
     RetainPtr<UISwipeGestureRecognizer> _touchActionDownSwipeGestureRecognizer;
 #endif
 
-#if PLATFORM(MACCATALYST)
+#if HAVE(LOOKUP_GESTURE_RECOGNIZER)
     RetainPtr<_UILookupGestureRecognizer> _lookupGestureRecognizer;
 #endif
 

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (256805 => 256806)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-02-18 02:48:21 UTC (rev 256805)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-02-18 02:51:26 UTC (rev 256806)
@@ -138,7 +138,7 @@
 #import <WebCore/WebItemProviderPasteboard.h>
 #endif
 
-#if PLATFORM(MACCATALYST)
+#if HAVE(LOOKUP_GESTURE_RECOGNIZER)
 #import <UIKit/_UILookupGestureRecognizer.h>
 #endif
 
@@ -787,7 +787,7 @@
     [self addGestureRecognizer:_mouseGestureRecognizer.get()];
 #endif
 
-#if PLATFORM(MACCATALYST)    
+#if HAVE(LOOKUP_GESTURE_RECOGNIZER)
     _lookupGestureRecognizer = adoptNS([[_UILookupGestureRecognizer alloc] initWithTarget:self action:@selector(_lookupGestureRecognized:)]);
     [_lookupGestureRecognizer setDelegate:self];
     [self addGestureRecognizer:_lookupGestureRecognizer.get()];
@@ -953,7 +953,7 @@
     [self removeGestureRecognizer:_mouseGestureRecognizer.get()];
 #endif
 
-#if PLATFORM(MACCATALYST)    
+#if HAVE(LOOKUP_GESTURE_RECOGNIZER)
     [_lookupGestureRecognizer setDelegate:nil];
     [self removeGestureRecognizer:_lookupGestureRecognizer.get()];
 #endif
@@ -1076,7 +1076,7 @@
 #if HAVE(HOVER_GESTURE_RECOGNIZER)
     [self removeGestureRecognizer:_mouseGestureRecognizer.get()];
 #endif
-#if PLATFORM(MACCATALYST)
+#if HAVE(LOOKUP_GESTURE_RECOGNIZER)
     [self removeGestureRecognizer:_lookupGestureRecognizer.get()];
 #endif
 #if ENABLE(POINTER_EVENTS)
@@ -1106,7 +1106,7 @@
 #if HAVE(HOVER_GESTURE_RECOGNIZER)
     [self addGestureRecognizer:_mouseGestureRecognizer.get()];
 #endif
-#if PLATFORM(MACCATALYST)
+#if HAVE(LOOKUP_GESTURE_RECOGNIZER)
     [self addGestureRecognizer:_lookupGestureRecognizer.get()];
 #endif
 #if ENABLE(POINTER_EVENTS)
@@ -1528,8 +1528,13 @@
 
 - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
 {
+#if HAVE(LOOKUP_GESTURE_RECOGNIZER)
+    if (gestureRecognizer == _lookupGestureRecognizer)
+        return YES;
+#endif
+
 #if HAVE(HOVER_GESTURE_RECOGNIZER)
-    if (gestureRecognizer != _lookupGestureRecognizer && (gestureRecognizer != _mouseGestureRecognizer && [_mouseGestureRecognizer mouseTouch] == touch))
+    if (gestureRecognizer != _mouseGestureRecognizer && [_mouseGestureRecognizer mouseTouch] == touch)
         return NO;
 #endif
 
@@ -8012,7 +8017,7 @@
 
 #endif // PLATFORM(WATCHOS)
 
-#if PLATFORM(MACCATALYST)
+#if HAVE(LOOKUP_GESTURE_RECOGNIZER)
 - (void)_lookupGestureRecognized:(UIGestureRecognizer *)gestureRecognizer
 {
     NSPoint locationInViewCoordinates = [gestureRecognizer locationInView:self];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to