Implement async paste method on UIWKInteractionViewProtocol
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 21:15:16 +0000 (21:15 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Mar 2019 21:15:16 +0000 (21:15 +0000)
commit2e6a482e2d440cdd8f7699a506df8d6821d8970d
treef84f117f3d448768d100982ee56b6363be1d1a5a
parent46f6f09faded01f9ed1e6f166510ce45986d4e88
Implement async paste method on UIWKInteractionViewProtocol
https://bugs.webkit.org/show_bug.cgi?id=196267
<rdar://problem/49236346>

Reviewed by Tim Horton.

Source/WebKit:

Implement a new UIWKInteractionViewProtocol hook to perform a paste command, and invoke the given completion
handler when pasting is finished.

Test: UIPasteboardTests.PasteWithCompletionHandler

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView pasteWithCompletionHandler:]):

Tools:

Add a new test to exercise the new SPI. Additionally, add staging forward declarations for
-pasteWithCompletionHandler:, and remove some old existing staging declarations for other bits of UIKit SPI that
are now a part of all iOS 12 internal SDKs.

* TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:

While we're here, also change a few iOS 11.3 checks to just be about PLATFORM(IOS) (since we don't build for iOS
prior to 12, these version checks are effectively only about iOS vs. tvOS or watchOS).

* TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator _sendQueuedAdditionalItemRequest]):
* TestWebKitAPI/ios/UIKitSPI.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/ios/UIPasteboardTests.mm
Tools/TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm
Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm
Tools/TestWebKitAPI/ios/UIKitSPI.h