Title: [291832] trunk/Source
Revision
291832
Author
[email protected]
Date
2022-03-24 16:57:01 -0700 (Thu, 24 Mar 2022)

Log Message

[iOS] make `WKMouseGestureRecognizer` officially conform to `_UIHoverEventRespondable`
https://bugs.webkit.org/show_bug.cgi?id=238242
<rdar://problem/88828903>

Reviewed by Tim Horton.

Source/WebKit:

* UIProcess/ios/WKMouseGestureRecognizer.h:
* UIProcess/ios/WKMouseGestureRecognizer.mm:

* Platform/spi/ios/UIKitSPI.h:

Source/WTF:

* wtf/PlatformHave.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (291831 => 291832)


--- trunk/Source/WTF/ChangeLog	2022-03-24 23:56:25 UTC (rev 291831)
+++ trunk/Source/WTF/ChangeLog	2022-03-24 23:57:01 UTC (rev 291832)
@@ -1,3 +1,13 @@
+2022-03-24  Devin Rousso  <[email protected]>
+
+        [iOS] make `WKMouseGestureRecognizer` officially conform to `_UIHoverEventRespondable`
+        https://bugs.webkit.org/show_bug.cgi?id=238242
+        <rdar://problem/88828903>
+
+        Reviewed by Tim Horton.
+
+        * wtf/PlatformHave.h:
+
 2022-03-24  Chris Dumez  <[email protected]>
 
         String's find() / reverseFind() / replace() should take in a StringView instead of a String

Modified: trunk/Source/WTF/wtf/PlatformHave.h (291831 => 291832)


--- trunk/Source/WTF/wtf/PlatformHave.h	2022-03-24 23:56:25 UTC (rev 291831)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2022-03-24 23:57:01 UTC (rev 291832)
@@ -505,6 +505,10 @@
 #define HAVE_UI_PARALLAX_TRANSITION_GESTURE_RECOGNIZER 1
 #endif
 
+#if ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 160000)
+#define HAVE_UIKIT_HOVER_EVENT_PROTOCOL 1
+#endif
+
 #if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130400
 #define HAVE_MOUSE_DEVICE_OBSERVATION 1
 #endif

Modified: trunk/Source/WebKit/ChangeLog (291831 => 291832)


--- trunk/Source/WebKit/ChangeLog	2022-03-24 23:56:25 UTC (rev 291831)
+++ trunk/Source/WebKit/ChangeLog	2022-03-24 23:57:01 UTC (rev 291832)
@@ -1,3 +1,16 @@
+2022-03-24  Devin Rousso  <[email protected]>
+
+        [iOS] make `WKMouseGestureRecognizer` officially conform to `_UIHoverEventRespondable`
+        https://bugs.webkit.org/show_bug.cgi?id=238242
+        <rdar://problem/88828903>
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/ios/WKMouseGestureRecognizer.h:
+        * UIProcess/ios/WKMouseGestureRecognizer.mm:
+
+        * Platform/spi/ios/UIKitSPI.h:
+
 2022-03-24  Michael Saboff  <[email protected]>
 
         After r291814, we need to create the INSTALL_PATH for the iOS sandbox files

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


--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2022-03-24 23:56:25 UTC (rev 291831)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2022-03-24 23:57:01 UTC (rev 291832)
@@ -144,6 +144,10 @@
 #import <UIKit/UIPointerStyle_Private.h>
 #endif
 
+#if HAVE(UIKIT_HOVER_EVENT_PROTOCOL)
+#import <UIKit/UIHoverEvent_RequiresApproval.h>
+#endif
+
 // FIXME: STAGING for rdar://75546704 Remove later.
 #define UIWKSelectionFlipped 2
 
@@ -354,6 +358,17 @@
     UIAllCorners = 0xFF,
 } UIRectCorners;
 
+#if HAVE(UIKIT_HOVER_EVENT_PROTOCOL)
+
+@protocol _UIHoverEventRespondable <NSObject>
+- (void)_hoverEntered:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
+- (void)_hoverMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
+- (void)_hoverExited:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
+- (void)_hoverCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event;
+@end
+
+#endif // HAVE(UIKIT_HOVER_EVENT_PROTOCOL)
+
 @interface UIImagePickerController ()
 @property (nonatomic, setter=_setAllowsMultipleSelection:) BOOL _allowsMultipleSelection;
 @property (nonatomic, setter=_setRequiresPickingConfirmation:) BOOL _requiresPickingConfirmation;

Modified: trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.h (291831 => 291832)


--- trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.h	2022-03-24 23:56:25 UTC (rev 291831)
+++ trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.h	2022-03-24 23:57:01 UTC (rev 291832)
@@ -27,8 +27,12 @@
 
 #import <UIKit/UIHoverGestureRecognizer.h>
 #import "NativeWebMouseEvent.h"
+#import "UIKitSPI.h"
 
 @interface WKMouseGestureRecognizer : UIHoverGestureRecognizer
+#if HAVE(UIKIT_HOVER_EVENT_PROTOCOL)
+<_UIHoverEventRespondable>
+#endif
 
 - (std::optional<CGPoint>)lastMouseLocation;
 - (WebKit::NativeWebMouseEvent *)lastMouseEvent;

Modified: trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm (291831 => 291832)


--- trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm	2022-03-24 23:56:25 UTC (rev 291831)
+++ trunk/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm	2022-03-24 23:57:01 UTC (rev 291832)
@@ -29,7 +29,6 @@
 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
 
 #import "NativeWebMouseEvent.h"
-#import "UIKitSPI.h"
 #import <pal/spi/ios/GraphicsServicesSPI.h>
 #import <wtf/Compiler.h>
 #import <wtf/MonotonicTime.h>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to