Changeset 246239 in webkit


Ignore:
Timestamp:
Jun 9, 2019 1:03:16 PM (5 years ago)
Author:
dino@apple.com
Message:

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):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r246236 r246239  
     12019-06-08  Dean Jackson  <dino@apple.com>
     2
     3        Drag starting state can get stuck even though the drag has ended
     4        https://bugs.webkit.org/show_bug.cgi?id=198696
     5        <rdar://problem/51556045>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        In iOS 13, we're seeing cases of the DragSession not
     10        correctly ending, and thus leaving m_isStartingDrag in
     11        an incorrect state. Temporarily force this to be reset
     12        in ::dragEnded while investigating
     13
     14        * UIProcess/ios/WKContentViewInteraction.mm: Add some more release logging
     15        while here.
     16        (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
     17        (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
     18        * WebProcess/WebPage/WebPage.cpp:
     19        (WebKit::WebPage::dragEnded):
     20
    1212019-06-08  Wenson Hsieh  <wenson_hsieh@apple.com>
    222
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r246229 r246239  
    67316731- (void)dragInteraction:(UIDragInteraction *)interaction willAnimateLiftWithAnimator:(id <UIDragAnimating>)animator session:(id <UIDragSession>)session
    67326732{
     6733    RELEASE_LOG(DragAndDrop, "Drag session willAnimateLiftWithAnimator: %p", session);
    67336734    if (!_shouldRestoreCalloutBarAfterDrop && _dragDropInteractionState.anyActiveDragSourceIs(WebCore::DragSourceActionSelection)) {
    67346735        // FIXME: This SPI should be renamed in UIKit to reflect a more general purpose of hiding interaction assistant controls.
     
    67496750            page->dragEnded(positionForDragEnd, positionForDragEnd, WebCore::DragOperationNone);
    67506751        }
     6752#if !RELEASE_LOG_DISABLED
     6753        else
     6754            RELEASE_LOG(DragAndDrop, "Drag session did not end at start: %p", session);
     6755#endif
    67516756    }];
    67526757}
     
    68006805- (void)dragInteraction:(UIDragInteraction *)interaction item:(UIDragItem *)item willAnimateCancelWithAnimator:(id <UIDragAnimating>)animator
    68016806{
     6807    RELEASE_LOG(DragAndDrop, "Drag interaction willAnimateCancelWithAnimator");
    68026808    [animator addCompletion:[protectedSelf = retainPtr(self), page = _page] (UIViewAnimatingPosition finalPosition) {
     6809        RELEASE_LOG(DragAndDrop, "Drag interaction willAnimateCancelWithAnimator (animation completion block fired)");
    68036810        page->dragCancelled();
    68046811        if (auto completion = protectedSelf->_dragDropInteractionState.takeDragCancelSetDownBlock()) {
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r246136 r246239  
    39123912
    39133913    send(Messages::WebPageProxy::DidEndDragging());
     3914
     3915    m_isStartingDrag = false;
    39143916}
    39153917
Note: See TracChangeset for help on using the changeset viewer.