[iOS DnD] [WK2] Remove custom logic for disambiguating long press action sheet gestur...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2017 10:09:04 +0000 (10:09 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2017 10:09:04 +0000 (10:09 +0000)
commit2b02870b9284fd9961a346bd3767bfb058705080
treeca3adce56ab141762598e7c9626719c958b3eb2e
parentf70a039e6594b1cefea75a675e9d0148b5cd71c1
[iOS DnD] [WK2] Remove custom logic for disambiguating long press action sheet gestures and drag lift
https://bugs.webkit.org/show_bug.cgi?id=173578
<rdar://problem/32825028>

Reviewed by Tim Horton.

Source/WebKit2:

Custom logic to cancel the long press action gesture recognizer in WebKit2 was added months ago to achieve
spec'ed behavior when initiating a drag on an element with an action sheet to show on long press. Now that UIKit
defers firing long-press gesture recognizers while a drag lift is recognizing, no extra work in WebKit is needed
to achieve expected behavior.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _simulateLongPressActionAtLocation:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Add testing SPI for showing an action sheet popover at a given location in content view coordinates.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startDataInteractionWithImage:withIndicatorData:atClientPosition:anchorPoint:action:]):
(-[WKContentView _didHandleStartDataInteractionRequest:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:sessionWillBegin:]):
(-[WKContentView _api_dragInteraction:session:didEndWithOperation:]):
(-[WKContentView _simulateLongPressActionAtLocation:]):
(longPressActionDelayAfterLift): Deleted.
(-[WKContentView performDeferredActionAtDragOrigin]): Deleted.
(-[WKContentView cancelDeferredActionAtDragOrigin]): Deleted.

Tools:

Slight tweak to ensure that DataInteractionTests.CustomActionSheetPopover still passes and verifies that showing
a custom popover does not cause dragging to fail when the popover is presented.

* TestWebKitAPI/ios/DataInteractionSimulator.mm:
(-[DataInteractionSimulator _advanceProgress]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@218579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
Tools/ChangeLog
Tools/TestWebKitAPI/ios/DataInteractionSimulator.mm