REGRESSION (r261978): Cannot click on links with trackpad on iPad
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 May 2020 13:56:36 +0000 (13:56 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 May 2020 13:56:36 +0000 (13:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=212262

Reviewed by Andy Estes.

No new tests; our current WKMouseGestureRecognizer testing strategy
unfortunately bypasses this particular problem.

* UIProcess/ios/WKMouseGestureRecognizer.mm:
(-[WKMouseGestureRecognizer _hoverEntered:withEvent:]):
(-[WKMouseGestureRecognizer _hoverMoved:withEvent:]):
(-[WKMouseGestureRecognizer _hoverExited:withEvent:]):
(-[WKMouseGestureRecognizer _hoverCancelled:withEvent:]):
Don't call super in any of the hover callbacks now that we derive from
UIHoverGestureRecognizer. We want to wholly own the state of the gesture,
including differences from UIHoverGestureRecognizer behavior such as
remaining in the recognizing state while the trackpad button is pressed.
We don't need any of the code in the default implementation, so just
override it entirely. This returns behavior to what it was like before r261978.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@262055 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm

index 897b8a4..de634ef 100644 (file)
@@ -1,3 +1,25 @@
+2020-05-22  Tim Horton  <timothy_horton@apple.com>
+
+        REGRESSION (r261978): Cannot click on links with trackpad on iPad
+        https://bugs.webkit.org/show_bug.cgi?id=212262
+
+        Reviewed by Andy Estes.
+
+        No new tests; our current WKMouseGestureRecognizer testing strategy
+        unfortunately bypasses this particular problem.
+
+        * UIProcess/ios/WKMouseGestureRecognizer.mm:
+        (-[WKMouseGestureRecognizer _hoverEntered:withEvent:]):
+        (-[WKMouseGestureRecognizer _hoverMoved:withEvent:]):
+        (-[WKMouseGestureRecognizer _hoverExited:withEvent:]):
+        (-[WKMouseGestureRecognizer _hoverCancelled:withEvent:]):
+        Don't call super in any of the hover callbacks now that we derive from
+        UIHoverGestureRecognizer. We want to wholly own the state of the gesture,
+        including differences from UIHoverGestureRecognizer behavior such as
+        remaining in the recognizing state while the trackpad button is pressed.
+        We don't need any of the code in the default implementation, so just
+        override it entirely. This returns behavior to what it was like before r261978.
+
 2020-05-21  Sam Weinig  <weinig@apple.com>
 
         Extended Color Cleanup: Move Color coder definitions to Color to allow for future encaspulation improvements
index 42c55ce..d6308e3 100644 (file)
@@ -192,8 +192,6 @@ static OptionSet<WebKit::WebEvent::Modifier> webEventModifiersForUIKeyModifierFl
         _lastLocation = [self locationInView:self.view];
         self.state = UIGestureRecognizerStateBegan;
     }
-
-    [super _hoverEntered:touches withEvent:event];
 }
 
 - (void)_hoverMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
@@ -208,8 +206,6 @@ static OptionSet<WebKit::WebEvent::Modifier> webEventModifiersForUIKeyModifierFl
 
     if (_currentHoverEvent == event && [touches containsObject:_currentTouch.get()])
         self.state = UIGestureRecognizerStateChanged;
-
-    [super _hoverMoved:touches withEvent:event];
 }
 
 - (void)_hoverExited:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
@@ -222,14 +218,11 @@ static OptionSet<WebKit::WebEvent::Modifier> webEventModifiersForUIKeyModifierFl
         _currentTouch = nil;
         self.state = UIGestureRecognizerStateEnded;
     }
-
-    [super _hoverExited:touches withEvent:event];
 }
 
 - (void)_hoverCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
 {
     [self _hoverExited:touches withEvent:event];
-    [super _hoverCancelled:touches withEvent:event];
 }
 
 - (CGPoint)locationInView:(UIView *)view