Title: [246253] branches/safari-608.1.27-branch/Source/WebKit
Revision
246253
Author
[email protected]
Date
2019-06-09 23:25:39 -0700 (Sun, 09 Jun 2019)

Log Message

Cherry-pick r246239. rdar://problem/51462498

    Drag starting state can get stuck even though the drag has ended
    https://bugs.webkit.org/show_bug.cgi?id=198696
    <rdar://problem/51556045>

    Reviewed by Wenson Hsieh.

    In iOS 13, we're seeing cases of the DragSession not
    correctly ending, and thus leaving m_isStartingDrag in
    an incorrect state. Temporarily force this to be reset
    in ::dragEnded while investigating

    * UIProcess/ios/WKContentViewInteraction.mm: Add some more release logging
    while here.
    (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
    (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::dragEnded):

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

Modified Paths

Diff

Modified: branches/safari-608.1.27-branch/Source/WebKit/ChangeLog (246252 => 246253)


--- branches/safari-608.1.27-branch/Source/WebKit/ChangeLog	2019-06-10 06:25:36 UTC (rev 246252)
+++ branches/safari-608.1.27-branch/Source/WebKit/ChangeLog	2019-06-10 06:25:39 UTC (rev 246253)
@@ -1,5 +1,49 @@
 2019-06-09  Babak Shafiei  <[email protected]>
 
+        Cherry-pick r246239. rdar://problem/51462498
+
+    Drag starting state can get stuck even though the drag has ended
+    https://bugs.webkit.org/show_bug.cgi?id=198696
+    <rdar://problem/51556045>
+    
+    Reviewed by Wenson Hsieh.
+    
+    In iOS 13, we're seeing cases of the DragSession not
+    correctly ending, and thus leaving m_isStartingDrag in
+    an incorrect state. Temporarily force this to be reset
+    in ::dragEnded while investigating
+    
+    * UIProcess/ios/WKContentViewInteraction.mm: Add some more release logging
+    while here.
+    (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
+    (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
+    * WebProcess/WebPage/WebPage.cpp:
+    (WebKit::WebPage::dragEnded):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-06-08  Dean Jackson  <[email protected]>
+
+            Drag starting state can get stuck even though the drag has ended
+            https://bugs.webkit.org/show_bug.cgi?id=198696
+            <rdar://problem/51556045>
+
+            Reviewed by Wenson Hsieh.
+
+            In iOS 13, we're seeing cases of the DragSession not
+            correctly ending, and thus leaving m_isStartingDrag in
+            an incorrect state. Temporarily force this to be reset
+            in ::dragEnded while investigating
+
+            * UIProcess/ios/WKContentViewInteraction.mm: Add some more release logging
+            while here.
+            (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
+            (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
+            * WebProcess/WebPage/WebPage.cpp:
+            (WebKit::WebPage::dragEnded):
+
+2019-06-09  Babak Shafiei  <[email protected]>
+
         Cherry-pick r246224. rdar://problem/51462498
 
     Introduce new SPI for context menus on iOS

Modified: branches/safari-608.1.27-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (246252 => 246253)


--- branches/safari-608.1.27-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-06-10 06:25:36 UTC (rev 246252)
+++ branches/safari-608.1.27-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-06-10 06:25:39 UTC (rev 246253)
@@ -6705,6 +6705,7 @@
 
 - (void)dragInteraction:(UIDragInteraction *)interaction willAnimateLiftWithAnimator:(id <UIDragAnimating>)animator session:(id <UIDragSession>)session
 {
+    RELEASE_LOG(DragAndDrop, "Drag session willAnimateLiftWithAnimator: %p", session);
     if (!_shouldRestoreCalloutBarAfterDrop && _dragDropInteractionState.anyActiveDragSourceIs(WebCore::DragSourceActionSelection)) {
         // FIXME: This SPI should be renamed in UIKit to reflect a more general purpose of hiding interaction assistant controls.
         [_textSelectionAssistant willStartScrollingOverflow];
@@ -6723,6 +6724,10 @@
             [protectedSelf cleanUpDragSourceSessionState];
             page->dragEnded(positionForDragEnd, positionForDragEnd, WebCore::DragOperationNone);
         }
+#if !RELEASE_LOG_DISABLED
+        else
+            RELEASE_LOG(DragAndDrop, "Drag session did not end at start: %p", session);
+#endif
     }];
 }
 
@@ -6774,7 +6779,9 @@
 
 - (void)dragInteraction:(UIDragInteraction *)interaction item:(UIDragItem *)item willAnimateCancelWithAnimator:(id <UIDragAnimating>)animator
 {
+    RELEASE_LOG(DragAndDrop, "Drag interaction willAnimateCancelWithAnimator");
     [animator addCompletion:[protectedSelf = retainPtr(self), page = _page] (UIViewAnimatingPosition finalPosition) {
+        RELEASE_LOG(DragAndDrop, "Drag interaction willAnimateCancelWithAnimator (animation completion block fired)");
         page->dragCancelled();
         if (auto completion = protectedSelf->_dragDropInteractionState.takeDragCancelSetDownBlock()) {
             page->callAfterNextPresentationUpdate([completion] (WebKit::CallbackBase::Error) {

Modified: branches/safari-608.1.27-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp (246252 => 246253)


--- branches/safari-608.1.27-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-06-10 06:25:36 UTC (rev 246252)
+++ branches/safari-608.1.27-branch/Source/WebKit/WebProcess/WebPage/WebPage.cpp	2019-06-10 06:25:39 UTC (rev 246253)
@@ -3909,6 +3909,8 @@
     m_page->mainFrame().eventHandler().dragSourceEndedAt(event, (DragOperation)operation);
 
     send(Messages::WebPageProxy::DidEndDragging());
+
+    m_isStartingDrag = false;
 }
 
 void WebPage::willPerformLoadDragDestinationAction()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to