Title: [190498] branches/safari-601-branch/Source

Diff

Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (190497 => 190498)


--- branches/safari-601-branch/Source/WebCore/ChangeLog	2015-10-02 13:57:22 UTC (rev 190497)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog	2015-10-02 13:57:34 UTC (rev 190498)
@@ -1,5 +1,31 @@
 2015-10-02  Matthew Hanson  <[email protected]>
 
+        Merge r188990. rdar://problem/22802029
+
+    2015-08-26  Beth Dakin  <[email protected]>
+
+            REGRESSION: Safari navigates after a cancelled force click
+            https://bugs.webkit.org/show_bug.cgi?id=148491
+            -and corresponding-
+            rdar://problem/22394323
+
+            Reviewed by Tim Horton.
+
+            This regression was introduced on El Capitan because AppKit sends ‘cancel’ to
+            gesture recognizer BEFORE it sends the mouseUp. So the ImmediateActionStage needs
+            to track whether a cancel happened after updates or without any updates since they
+            signify different things.
+
+            Don’t perform default behaviors when the stage is ActionCancelledAfterUpdate.
+            * page/EventHandler.cpp:
+            (WebCore::EventHandler::handleMouseReleaseEvent):
+
+            New possible stages, and new getter for the current stage.
+            * page/EventHandler.h:
+            (WebCore::EventHandler::immediateActionStage):
+
+2015-10-02  Matthew Hanson  <[email protected]>
+
         Merge r188768. rdar://problem/22802019
 
     2015-08-21  Joseph Pecoraro  <[email protected]>

Modified: branches/safari-601-branch/Source/WebCore/page/EventHandler.cpp (190497 => 190498)


--- branches/safari-601-branch/Source/WebCore/page/EventHandler.cpp	2015-10-02 13:57:22 UTC (rev 190497)
+++ branches/safari-601-branch/Source/WebCore/page/EventHandler.cpp	2015-10-02 13:57:34 UTC (rev 190498)
@@ -2096,7 +2096,7 @@
 
     // If an immediate action began or was completed using this series of mouse events, then we should send mouseup to
     // the DOM and return now so that we don't perform our own default behaviors.
-    if (m_immediateActionStage == ImmediateActionStage::ActionCompleted || m_immediateActionStage == ImmediateActionStage::ActionUpdated) {
+    if (m_immediateActionStage == ImmediateActionStage::ActionCompleted || m_immediateActionStage == ImmediateActionStage::ActionUpdated || m_immediateActionStage == ImmediateActionStage::ActionCancelledAfterUpdate) {
         m_immediateActionStage = ImmediateActionStage::None;
         return !dispatchMouseEvent(eventNames().mouseupEvent, m_lastElementUnderMouse.get(), true, m_clickCount, platformMouseEvent, false);
     }

Modified: branches/safari-601-branch/Source/WebCore/page/EventHandler.h (190497 => 190498)


--- branches/safari-601-branch/Source/WebCore/page/EventHandler.h	2015-10-02 13:57:22 UTC (rev 190497)
+++ branches/safari-601-branch/Source/WebCore/page/EventHandler.h	2015-10-02 13:57:34 UTC (rev 190498)
@@ -121,7 +121,8 @@
     None,
     PerformedHitTest,
     ActionUpdated,
-    ActionCancelled,
+    ActionCancelledWithoutUpdate,
+    ActionCancelledAfterUpdate,
     ActionCompleted
 };
 
@@ -313,6 +314,7 @@
     bool isHandlingWheelEvent() const { return m_isHandlingWheelEvent; }
 
     WEBCORE_EXPORT void setImmediateActionStage(ImmediateActionStage stage);
+    WEBCORE_EXPORT ImmediateActionStage immediateActionStage() const { return m_immediateActionStage; }
 
 private:
 #if ENABLE(DRAG_SUPPORT)

Modified: branches/safari-601-branch/Source/WebKit/mac/ChangeLog (190497 => 190498)


--- branches/safari-601-branch/Source/WebKit/mac/ChangeLog	2015-10-02 13:57:22 UTC (rev 190497)
+++ branches/safari-601-branch/Source/WebKit/mac/ChangeLog	2015-10-02 13:57:34 UTC (rev 190498)
@@ -1,5 +1,22 @@
 2015-10-02  Matthew Hanson  <[email protected]>
 
+        Merge r188990. rdar://problem/22802029
+
+    2015-08-26  Beth Dakin  <[email protected]>
+
+            REGRESSION: Safari navigates after a cancelled force click
+            https://bugs.webkit.org/show_bug.cgi?id=148491
+            -and corresponding-
+            rdar://problem/22394323
+
+            Reviewed by Tim Horton.
+
+            Use the current stage to determine which type of cancel this is.
+            * WebView/WebImmediateActionController.mm:
+            (-[WebImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
+
+2015-10-02  Matthew Hanson  <[email protected]>
+
         Merge r189102. rdar://problem/22802034
 
     2015-08-28  Timothy Horton  <[email protected]>

Modified: branches/safari-601-branch/Source/WebKit/mac/WebView/WebImmediateActionController.mm (190497 => 190498)


--- branches/safari-601-branch/Source/WebKit/mac/WebView/WebImmediateActionController.mm	2015-10-02 13:57:22 UTC (rev 190497)
+++ branches/safari-601-branch/Source/WebKit/mac/WebView/WebImmediateActionController.mm	2015-10-02 13:57:34 UTC (rev 190498)
@@ -210,8 +210,13 @@
         return;
 
     Frame* coreFrame = core([[[[_webView _selectedOrMainFrame] frameView] documentView] _frame]);
-    if (coreFrame)
-        coreFrame->eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCancelled);
+    if (coreFrame) {
+        ImmediateActionStage lastStage = coreFrame->eventHandler().immediateActionStage();
+        if (lastStage == ImmediateActionStage::ActionUpdated)
+            coreFrame->eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCancelledAfterUpdate);
+        else
+            coreFrame->eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCancelledWithoutUpdate);
+    }
 
     [_webView _setTextIndicatorAnimationProgress:0];
     [self _clearImmediateActionState];

Modified: branches/safari-601-branch/Source/WebKit2/ChangeLog (190497 => 190498)


--- branches/safari-601-branch/Source/WebKit2/ChangeLog	2015-10-02 13:57:22 UTC (rev 190497)
+++ branches/safari-601-branch/Source/WebKit2/ChangeLog	2015-10-02 13:57:34 UTC (rev 190498)
@@ -1,5 +1,22 @@
 2015-10-02  Matthew Hanson  <[email protected]>
 
+        Merge r188990. rdar://problem/22802029
+
+    2015-08-26  Beth Dakin  <[email protected]>
+
+            REGRESSION: Safari navigates after a cancelled force click
+            https://bugs.webkit.org/show_bug.cgi?id=148491
+            -and corresponding-
+            rdar://problem/22394323
+
+            Reviewed by Tim Horton.
+
+            Use the current stage to determine which type of cancel this is.
+            * WebProcess/WebPage/mac/WebPageMac.mm:
+            (WebKit::WebPage::immediateActionDidCancel):
+
+2015-10-02  Matthew Hanson  <[email protected]>
+
         Merge r188755. rdar://problem/22802005
 
     2015-08-21  Chris Dumez  <[email protected]>

Modified: branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm (190497 => 190498)


--- branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2015-10-02 13:57:22 UTC (rev 190497)
+++ branches/safari-601-branch/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm	2015-10-02 13:57:34 UTC (rev 190498)
@@ -1204,7 +1204,11 @@
 
 void WebPage::immediateActionDidCancel()
 {
-    m_page->mainFrame().eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCancelled);
+    ImmediateActionStage lastStage = m_page->mainFrame().eventHandler().immediateActionStage();
+    if (lastStage == ImmediateActionStage::ActionUpdated)
+        m_page->mainFrame().eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCancelledAfterUpdate);
+    else
+        m_page->mainFrame().eventHandler().setImmediateActionStage(ImmediateActionStage::ActionCancelledWithoutUpdate);
 }
 
 void WebPage::immediateActionDidComplete()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to