Title: [288720] trunk/Source
Revision
288720
Author
timothy_hor...@apple.com
Date
2022-01-27 19:11:02 -0800 (Thu, 27 Jan 2022)

Log Message

Remove ENABLE(HOVER_GESTURE_RECOGNIZER) and related code
https://bugs.webkit.org/show_bug.cgi?id=235749
Source/WebKit:

<rdar://problem/86425437>

Reviewed by Wenson Hsieh.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
(-[WKContentView gestureRecognizer:shouldReceivePress:]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _didCommitLoadForMainFrame]):
(-[WKContentView setUpHoverGestureRecognizer]): Deleted.
(-[WKContentView hoverGestureRecognizerChanged:]): Deleted.
* UIProcess/ios/WKHoverPlatter.h:
* UIProcess/ios/WKHoverPlatter.mm:
* UIProcess/ios/WKHoverPlatterParameters.h:
* UIProcess/ios/WKHoverPlatterParameters.mm:
* WebProcess/WebPage/MomentumEventDispatcher.cpp:
(WebKit::mode):
(WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
(WebKit::MomentumEventDispatcher::equalizeTailGaps):
* WebProcess/WebPage/MomentumEventDispatcher.h:

Source/WTF:

Reviewed by Wenson Hsieh.

* wtf/PlatformEnableCocoa.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (288719 => 288720)


--- trunk/Source/WTF/ChangeLog	2022-01-28 01:51:09 UTC (rev 288719)
+++ trunk/Source/WTF/ChangeLog	2022-01-28 03:11:02 UTC (rev 288720)
@@ -1,3 +1,12 @@
+2022-01-27  Tim Horton  <timothy_hor...@apple.com>
+
+        Remove ENABLE(HOVER_GESTURE_RECOGNIZER) and related code
+        https://bugs.webkit.org/show_bug.cgi?id=235749
+
+        Reviewed by Wenson Hsieh.
+
+        * wtf/PlatformEnableCocoa.h:
+
 2022-01-27  Chris Dumez  <cdu...@apple.com>
 
         Unreviewed fix for older macOS builds after r288577.

Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (288719 => 288720)


--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2022-01-28 01:51:09 UTC (rev 288719)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h	2022-01-28 03:11:02 UTC (rev 288720)
@@ -607,10 +607,6 @@
 #define ENABLE_VIDEO_USES_ELEMENT_FULLSCREEN 1
 #endif
 
-#if !defined(ENABLE_HOVER_GESTURE_RECOGNIZER) && HAVE(UIKIT_WEBKIT_INTERNALS)
-#define ENABLE_HOVER_GESTURE_RECOGNIZER 1
-#endif
-
 #if !defined(ENABLE_VP9) && ((PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) || PLATFORM(IOS) || PLATFORM(IOS_SIMULATOR))
 #define ENABLE_VP9 1
 #endif

Modified: trunk/Source/WebKit/ChangeLog (288719 => 288720)


--- trunk/Source/WebKit/ChangeLog	2022-01-28 01:51:09 UTC (rev 288719)
+++ trunk/Source/WebKit/ChangeLog	2022-01-28 03:11:02 UTC (rev 288720)
@@ -1,3 +1,33 @@
+2022-01-27  Tim Horton  <timothy_hor...@apple.com>
+
+        Remove ENABLE(HOVER_GESTURE_RECOGNIZER) and related code
+        https://bugs.webkit.org/show_bug.cgi?id=235749
+        <rdar://problem/86425437>
+
+        Reviewed by Wenson Hsieh.
+
+        * UIProcess/ios/WKContentViewInteraction.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView setUpInteraction]):
+        (-[WKContentView cleanUpInteraction]):
+        (-[WKContentView _removeDefaultGestureRecognizers]):
+        (-[WKContentView _addDefaultGestureRecognizers]):
+        (-[WKContentView gestureRecognizer:shouldReceiveTouch:]):
+        (-[WKContentView gestureRecognizer:shouldReceivePress:]):
+        (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
+        (-[WKContentView _didCommitLoadForMainFrame]):
+        (-[WKContentView setUpHoverGestureRecognizer]): Deleted.
+        (-[WKContentView hoverGestureRecognizerChanged:]): Deleted.
+        * UIProcess/ios/WKHoverPlatter.h:
+        * UIProcess/ios/WKHoverPlatter.mm:
+        * UIProcess/ios/WKHoverPlatterParameters.h:
+        * UIProcess/ios/WKHoverPlatterParameters.mm:
+        * WebProcess/WebPage/MomentumEventDispatcher.cpp:
+        (WebKit::mode):
+        (WebKit::MomentumEventDispatcher::consumeDeltaForCurrentTime):
+        (WebKit::MomentumEventDispatcher::equalizeTailGaps):
+        * WebProcess/WebPage/MomentumEventDispatcher.h:
+
 2022-01-27  Per Arne Vollan  <pvol...@apple.com>
 
         [iOS][macOS] Removed unneeded telemetry

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (288719 => 288720)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2022-01-28 01:51:09 UTC (rev 288719)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2022-01-28 03:11:02 UTC (rev 288720)
@@ -307,11 +307,7 @@
     WebCore::MouseEventPolicy _mouseEventPolicy;
 #endif
 
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
-    RetainPtr<WKHoverGestureRecognizer> _hoverGestureRecognizer;
-#endif
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
     RetainPtr<WKHoverPlatter> _hoverPlatter;
 #endif
 
@@ -549,7 +545,7 @@
     , UIDragInteractionDelegate, UIDropInteractionDelegate
 #endif
     , WKTouchActionGestureRecognizerDelegate
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
     , WKHoverPlatterDelegate
 #endif
 #if HAVE(UIFINDINTERACTION)

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (288719 => 288720)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2022-01-28 01:51:09 UTC (rev 288719)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2022-01-28 03:11:02 UTC (rev 288720)
@@ -175,10 +175,6 @@
 #import "PepperUICoreSPI.h"
 #endif
 
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
-#import <WebKitAdditions/WKHoverGestureRecognizer.h>
-#endif
-
 #import <pal/cocoa/VisionKitCoreSoftLink.h>
 #import <pal/ios/ManagedConfigurationSoftLink.h>
 #import <pal/ios/QuickLookSoftLink.h>
@@ -961,11 +957,7 @@
     [self setUpMouseGestureRecognizer];
 #endif
 
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
-    [self setUpHoverGestureRecognizer];
-#endif
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
     _hoverPlatter = adoptNS([[WKHoverPlatter alloc] initWithView:self.rootContentView delegate:self]);
 #endif
 
@@ -1152,12 +1144,7 @@
     [self removeGestureRecognizer:_mouseGestureRecognizer.get()];
 #endif
 
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
-    [_hoverGestureRecognizer setDelegate:nil];
-    [self removeGestureRecognizer:_hoverGestureRecognizer.get()];
-#endif
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
     [_hoverPlatter invalidate];
     _hoverPlatter = nil;
 #endif
@@ -1310,9 +1297,6 @@
 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
     [self removeGestureRecognizer:_mouseGestureRecognizer.get()];
 #endif
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
-    [self removeGestureRecognizer:_hoverGestureRecognizer.get()];
-#endif
 #if HAVE(LOOKUP_GESTURE_RECOGNIZER)
     [self removeGestureRecognizer:_lookupGestureRecognizer.get()];
 #endif
@@ -1338,9 +1322,6 @@
 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
     [self addGestureRecognizer:_mouseGestureRecognizer.get()];
 #endif
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
-    [self addGestureRecognizer:_hoverGestureRecognizer.get()];
-#endif
 #if HAVE(LOOKUP_GESTURE_RECOGNIZER)
     [self addGestureRecognizer:_lookupGestureRecognizer.get()];
 #endif
@@ -1815,11 +1796,6 @@
         return YES;
 #endif
 
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
-    if (gestureRecognizer == _hoverGestureRecognizer)
-        return NO;
-#endif
-
 #if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
     if (gestureRecognizer != _mouseGestureRecognizer && [_mouseGestureRecognizer mouseTouch] == touch)
         return NO;
@@ -1846,10 +1822,6 @@
 
 - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceivePress:(UIPress *)press
 {
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
-    if (gestureRecognizer == _hoverGestureRecognizer)
-        return NO;
-#endif
     return YES;
 }
 
@@ -2501,11 +2473,6 @@
         return YES;
 #endif
 
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
-    if ([gestureRecognizer isKindOfClass:[WKHoverGestureRecognizer class]] || [otherGestureRecognizer isKindOfClass:[WKHoverGestureRecognizer class]])
-        return YES;
-#endif
-
 #if PLATFORM(MACCATALYST)
     if (isSamePair(gestureRecognizer, otherGestureRecognizer, [_textInteractionAssistant loupeGesture], [_textInteractionAssistant forcePressGesture]))
         return YES;
@@ -4851,7 +4818,7 @@
     _treatAsContentEditableUntilNextEditorStateUpdate = NO;
     [self _invalidateCurrentPositionInformation];
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
     [_hoverPlatter dismissPlatterWithAnimation:NO];
 #endif
 }
@@ -9636,33 +9603,8 @@
 
 #endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)
 
-#if ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
 
-- (void)setUpHoverGestureRecognizer
-{
-    _hoverGestureRecognizer = adoptNS([[WKHoverGestureRecognizer alloc] initWithTarget:self action:@selector(hoverGestureRecognizerChanged:)]);
-    [_hoverGestureRecognizer setDelegate:self];
-    [self addGestureRecognizer:_hoverGestureRecognizer.get()];
-}
-
-- (void)hoverGestureRecognizerChanged:(WKHoverGestureRecognizer *)gestureRecognizer
-{
-    if (!_page->hasRunningProcess())
-        return;
-
-    auto event = gestureRecognizer.lastMouseEvent;
-    if (!event)
-        return;
-
-    _page->handleMouseEvent(*event);
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForHover)
-        [_hoverPlatter setHoverPoint:event->position()];
-}
-
-#endif // ENABLE(HOVER_GESTURE_RECOGNIZER)
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
-
 - (void)positionInformationForHoverPlatter:(WKHoverPlatter *)hoverPlatter withRequest:(WebKit::InteractionInformationRequest&)request completionHandler:(void (^)(WebKit::InteractionInformationAtPosition))completionHandler
 {
     [self doAfterPositionInformationUpdate:completionHandler forRequest:request];

Modified: trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.h (288719 => 288720)


--- trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.h	2022-01-28 01:51:09 UTC (rev 288719)
+++ trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.h	2022-01-28 03:11:02 UTC (rev 288720)
@@ -23,7 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
 
 @class WKHoverPlatter;
 
@@ -46,4 +46,4 @@
 
 @end
 
-#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)

Modified: trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.mm (288719 => 288720)


--- trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.mm	2022-01-28 01:51:09 UTC (rev 288719)
+++ trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.mm	2022-01-28 03:11:02 UTC (rev 288720)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "WKHoverPlatter.h"
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
 
 #import "WKHoverPlatterParameters.h"
 #import <WebCore/PathUtilities.h>
@@ -345,4 +345,4 @@
 
 @end
 
-#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)

Modified: trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.h (288719 => 288720)


--- trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.h	2022-01-28 01:51:09 UTC (rev 288719)
+++ trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.h	2022-01-28 03:11:02 UTC (rev 288720)
@@ -23,7 +23,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
 
 #import "PrototypeToolsSPI.h"
 
@@ -55,4 +55,4 @@
 + (WKHoverPlatterParameters *)rootSettings;
 @end
 
-#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)

Modified: trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.mm (288719 => 288720)


--- trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.mm	2022-01-28 01:51:09 UTC (rev 288719)
+++ trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.mm	2022-01-28 03:11:02 UTC (rev 288720)
@@ -26,7 +26,7 @@
 #import "config.h"
 #import "WKHoverPlatterParameters.h"
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
 
 #import "PrototypeToolsSPI.h"
 #import <pal/spi/cocoa/QuartzCoreSPI.h>
@@ -141,4 +141,4 @@
 
 @end
 
-#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT) || ENABLE(HOVER_GESTURE_RECOGNIZER)
+#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to