Title: [249681] trunk/Source
Revision
249681
Author
[email protected]
Date
2019-09-09 18:01:45 -0700 (Mon, 09 Sep 2019)

Log Message

Clarify some macCatalyst feature flags
https://bugs.webkit.org/show_bug.cgi?id=201619
<rdar://problem/54615618>

Reviewed by Megan Gardner.

Source/WebKit:

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _showShareSheet:inRect:completionHandler:]):
We prefer specific flags over platform checks.

Source/WTF:

* wtf/Platform.h:
We prefer specific flags over platform checks.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (249680 => 249681)


--- trunk/Source/WTF/ChangeLog	2019-09-10 00:45:50 UTC (rev 249680)
+++ trunk/Source/WTF/ChangeLog	2019-09-10 01:01:45 UTC (rev 249681)
@@ -1,3 +1,14 @@
+2019-09-09  Tim Horton  <[email protected]>
+
+        Clarify some macCatalyst feature flags
+        https://bugs.webkit.org/show_bug.cgi?id=201619
+        <rdar://problem/54615618>
+
+        Reviewed by Megan Gardner.
+
+        * wtf/Platform.h:
+        We prefer specific flags over platform checks.
+
 2019-09-07  David Quesada  <[email protected]>
 
         REGRESSION(r248533): Unable to use WTF::RefCounted when building in a debug configuration against a non-debug WebKit

Modified: trunk/Source/WTF/wtf/Platform.h (249680 => 249681)


--- trunk/Source/WTF/wtf/Platform.h	2019-09-10 00:45:50 UTC (rev 249680)
+++ trunk/Source/WTF/wtf/Platform.h	2019-09-10 01:01:45 UTC (rev 249681)
@@ -1555,6 +1555,7 @@
 
 #if PLATFORM(MACCATALYST)
 #define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
+#define HAVE_HOVER_GESTURE_RECOGNIZER 1
 #endif
 
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || PLATFORM(WATCHOS) || PLATFORM(APPLETV)

Modified: trunk/Source/WebKit/ChangeLog (249680 => 249681)


--- trunk/Source/WebKit/ChangeLog	2019-09-10 00:45:50 UTC (rev 249680)
+++ trunk/Source/WebKit/ChangeLog	2019-09-10 01:01:45 UTC (rev 249681)
@@ -1,3 +1,21 @@
+2019-09-09  Tim Horton  <[email protected]>
+
+        Clarify some macCatalyst feature flags
+        https://bugs.webkit.org/show_bug.cgi?id=201619
+        <rdar://problem/54615618>
+
+        Reviewed by Megan Gardner.
+
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView setupInteraction]):
+        (-[WKContentView cleanupInteraction]):
+        (-[WKContentView _removeDefaultGestureRecognizers]):
+        (-[WKContentView _addDefaultGestureRecognizers]):
+        (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
+        (-[WKContentView _showShareSheet:inRect:completionHandler:]):
+        We prefer specific flags over platform checks.
+
 2019-09-09  Chris Dumez  <[email protected]>
 
         Stop using testRunner.setPrivateBrowsingEnabled_DEPRECATED() in http/tests/adClickAttribution/conversion-disabled-in-ephemeral-session.html

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (249680 => 249681)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2019-09-10 00:45:50 UTC (rev 249680)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2019-09-10 01:01:45 UTC (rev 249681)
@@ -228,8 +228,11 @@
 #endif
 
 #if PLATFORM(MACCATALYST)
+    RetainPtr<_UILookupGestureRecognizer> _lookupGestureRecognizer;
+#endif
+
+#if HAVE(HOVER_GESTURE_RECOGNIZER)
     RetainPtr<UIHoverGestureRecognizer> _hoverGestureRecognizer;
-    RetainPtr<_UILookupGestureRecognizer> _lookupGestureRecognizer;
     CGPoint _lastHoverLocation;
 #endif
 

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (249680 => 249681)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-09-10 00:45:50 UTC (rev 249680)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-09-10 01:01:45 UTC (rev 249681)
@@ -128,9 +128,12 @@
 #endif
 
 #if PLATFORM(MACCATALYST)
+#import <UIKit/_UILookupGestureRecognizer.h>
+#endif
+
+#if HAVE(HOVER_GESTURE_RECOGNIZER)
 #import "NativeWebMouseEvent.h"
 #import <UIKit/UIHoverGestureRecognizer.h>
-#import <UIKit/_UILookupGestureRecognizer.h>
 #endif
 
 #if ENABLE(INPUT_TYPE_COLOR)
@@ -717,11 +720,13 @@
     [_touchEventGestureRecognizer setDelegate:self];
     [self addGestureRecognizer:_touchEventGestureRecognizer.get()];
 
-#if PLATFORM(MACCATALYST)
+#if HAVE(HOVER_GESTURE_RECOGNIZER)
     _hoverGestureRecognizer = adoptNS([[UIHoverGestureRecognizer alloc] initWithTarget:self action:@selector(_hoverGestureRecognizerChanged:)]);
     [_hoverGestureRecognizer setDelegate:self];
     [self addGestureRecognizer:_hoverGestureRecognizer.get()];
-    
+#endif
+
+#if PLATFORM(MACCATALYST)    
     _lookupGestureRecognizer = adoptNS([[_UILookupGestureRecognizer alloc] initWithTarget:self action:@selector(_lookupGestureRecognized:)]);
     [_lookupGestureRecognizer setDelegate:self];
     [self addGestureRecognizer:_lookupGestureRecognizer.get()];
@@ -867,10 +872,12 @@
     [_touchEventGestureRecognizer setDelegate:nil];
     [self removeGestureRecognizer:_touchEventGestureRecognizer.get()];
 
-#if PLATFORM(MACCATALYST)
+#if HAVE(HOVER_GESTURE_RECOGNIZER)
     [_hoverGestureRecognizer setDelegate:nil];
     [self removeGestureRecognizer:_hoverGestureRecognizer.get()];
-    
+#endif
+
+#if PLATFORM(MACCATALYST)    
     [_lookupGestureRecognizer setDelegate:nil];
     [self removeGestureRecognizer:_lookupGestureRecognizer.get()];
 #endif
@@ -978,8 +985,10 @@
     [self removeGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()];
     [self removeGestureRecognizer:_twoFingerSingleTapGestureRecognizer.get()];
     [self removeGestureRecognizer:_stylusSingleTapGestureRecognizer.get()];
+#if HAVE(HOVER_GESTURE_RECOGNIZER)
+    [self removeGestureRecognizer:_hoverGestureRecognizer.get()];
+#endif
 #if PLATFORM(MACCATALYST)
-    [self removeGestureRecognizer:_hoverGestureRecognizer.get()];
     [self removeGestureRecognizer:_lookupGestureRecognizer.get()];
 #endif
 #if ENABLE(POINTER_EVENTS)
@@ -998,8 +1007,10 @@
     [self addGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()];
     [self addGestureRecognizer:_twoFingerSingleTapGestureRecognizer.get()];
     [self addGestureRecognizer:_stylusSingleTapGestureRecognizer.get()];
+#if HAVE(HOVER_GESTURE_RECOGNIZER)
+    [self addGestureRecognizer:_hoverGestureRecognizer.get()];
+#endif
 #if PLATFORM(MACCATALYST)
-    [self addGestureRecognizer:_hoverGestureRecognizer.get()];
     [self addGestureRecognizer:_lookupGestureRecognizer.get()];
 #endif
 #if ENABLE(POINTER_EVENTS)
@@ -1881,6 +1892,11 @@
     if (isSamePair(gestureRecognizer, otherGestureRecognizer, _highlightLongPressGestureRecognizer.get(), _longPressGestureRecognizer.get()))
         return YES;
 
+#if HAVE(HOVER_GESTURE_RECOGNIZER)
+    if ([gestureRecognizer isKindOfClass:[UIHoverGestureRecognizer class]] || [otherGestureRecognizer isKindOfClass:[UIHoverGestureRecognizer class]])
+        return YES;
+#endif
+
 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 120000
 #if PLATFORM(MACCATALYST)
     if (isSamePair(gestureRecognizer, otherGestureRecognizer, _textSelectionAssistant.get().loupeGesture, _textSelectionAssistant.get().forcePressGesture))
@@ -1889,12 +1905,8 @@
     if (isSamePair(gestureRecognizer, otherGestureRecognizer, _singleTapGestureRecognizer.get(), _textSelectionAssistant.get().loupeGesture))
         return YES;
 
-    if ([gestureRecognizer isKindOfClass:[UIHoverGestureRecognizer class]] || [otherGestureRecognizer isKindOfClass:[UIHoverGestureRecognizer class]])
-        return YES;
-    
     if (([gestureRecognizer isKindOfClass:[_UILookupGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) || ([otherGestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]] && [gestureRecognizer isKindOfClass:[_UILookupGestureRecognizer class]]))
         return YES;
-
 #endif
     if (isSamePair(gestureRecognizer, otherGestureRecognizer, _highlightLongPressGestureRecognizer.get(), _textSelectionAssistant.get().forcePressGesture))
         return YES;
@@ -6226,7 +6238,7 @@
     _shareSheet = adoptNS([[WKShareSheet alloc] initWithView:_webView]);
     [_shareSheet setDelegate:self];
 
-#if PLATFORM(MACCATALYST)
+#if HAVE(HOVER_GESTURE_RECOGNIZER)
     if (!rect) {
         auto hoverLocationInWebView = [self convertPoint:_lastHoverLocation toView:_webView];
         rect = WebCore::FloatRect(hoverLocationInWebView.x, hoverLocationInWebView.y, 1, 1);
@@ -7514,7 +7526,9 @@
     NSPoint locationInViewCoordinates = [gestureRecognizer locationInView:self];
     _page->performDictionaryLookupAtLocation(WebCore::FloatPoint(locationInViewCoordinates));
 }
+#endif
 
+#if HAVE(HOVER_GESTURE_RECOGNIZER)
 static WebEventFlags webEventFlagsForUIKeyModifierFlags(UIKeyModifierFlags flags)
 {
     WebEventFlags eventFlags = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to