Title: [255446] branches/safari-610.1.1-branch/Source/WebKit
Revision
255446
Author
[email protected]
Date
2020-01-30 12:02:16 -0800 (Thu, 30 Jan 2020)

Log Message

Revert "Cherry-pick r255105. rdar://problem/58936679"

This reverts commit r255433.

Modified Paths

Diff

Modified: branches/safari-610.1.1-branch/Source/WebKit/ChangeLog (255445 => 255446)


--- branches/safari-610.1.1-branch/Source/WebKit/ChangeLog	2020-01-30 20:02:14 UTC (rev 255445)
+++ branches/safari-610.1.1-branch/Source/WebKit/ChangeLog	2020-01-30 20:02:16 UTC (rev 255446)
@@ -1,54 +1,5 @@
 2020-01-30  Alan Coon  <[email protected]>
 
-        Cherry-pick r255105. rdar://problem/58936679
-
-    macCatalyst: Right clicking on links follows the link, but shouldn't
-    https://bugs.webkit.org/show_bug.cgi?id=206777
-    <rdar://problem/56586280>
-    
-    Reviewed by Wenson Hsieh.
-    
-    * UIProcess/ios/WKMouseGestureRecognizer.mm:
-    (-[WKMouseGestureRecognizer createMouseEventWithType:forEvent:]):
-    (-[WKMouseGestureRecognizer touchesEnded:withEvent:]):
-    I got 'button' and 'buttons' backwards.
-    
-    'button' indicates which button the event is about, so in MouseUp,
-    it should still be 2.
-    
-    'buttons' indicate which buttons are still down, so in MouseUp,
-    it should not include 2. Since we don't currently track mouse button
-    chording here, we'll just say "none". Leave a FIXME about that.
-    
-    This makes WebCore's behavior correct, and now it doesn't follow the link.
-    
-    
-    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
-    2020-01-24  Tim Horton  <[email protected]>
-
-            macCatalyst: Right clicking on links follows the link, but shouldn't
-            https://bugs.webkit.org/show_bug.cgi?id=206777
-            <rdar://problem/56586280>
-
-            Reviewed by Wenson Hsieh.
-
-            * UIProcess/ios/WKMouseGestureRecognizer.mm:
-            (-[WKMouseGestureRecognizer createMouseEventWithType:forEvent:]):
-            (-[WKMouseGestureRecognizer touchesEnded:withEvent:]):
-            I got 'button' and 'buttons' backwards.
-
-            'button' indicates which button the event is about, so in MouseUp,
-            it should still be 2.
-
-            'buttons' indicate which buttons are still down, so in MouseUp,
-            it should not include 2. Since we don't currently track mouse button
-            chording here, we'll just say "none". Leave a FIXME about that.
-
-            This makes WebCore's behavior correct, and now it doesn't follow the link.
-
-2020-01-30  Alan Coon  <[email protected]>
-
         Cherry-pick r254874. rdar://problem/58936679
 
     macCatalyst: Two-finger click is dispatched to DOM as left click

Modified: branches/safari-610.1.1-branch/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm (255445 => 255446)


--- branches/safari-610.1.1-branch/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm	2020-01-30 20:02:14 UTC (rev 255445)
+++ branches/safari-610.1.1-branch/Source/WebKit/UIProcess/ios/WKMouseGestureRecognizer.mm	2020-01-30 20:02:16 UTC (rev 255446)
@@ -125,7 +125,7 @@
     BOOL isRightButton = modifiers.contains(WebKit::WebEvent::Modifier::ControlKey) || ([uiEvent _buttonMask] & UIEventButtonMaskSecondary);
 
     auto button = [&] {
-        if (!_touching)
+        if (!_touching || type == WebKit::WebEvent::Type::MouseUp)
             return WebKit::WebMouseEvent::NoButton;
         if (isRightButton)
             return WebKit::WebMouseEvent::RightButton;
@@ -132,9 +132,8 @@
         return WebKit::WebMouseEvent::LeftButton;
     }();
 
-    // FIXME: 'buttons' should report any buttons that are still down in the case when one button is released from a chord.
     auto buttons = [&] {
-        if (!_touching || type == WebKit::WebEvent::Type::MouseUp)
+        if (!_touching)
             return 0;
         if (isRightButton)
             return 2;
@@ -168,11 +167,11 @@
 
 - (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
 {
+    _touching = NO;
+
     _lastEvent = [self createMouseEventWithType:WebKit::WebEvent::MouseUp forEvent:event];
     _lastLocation = [self locationInView:self.view];
 
-    _touching = NO;
-
     self.state = UIGestureRecognizerStateChanged;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to