Send PromisedBlobInfo to the client through DragItem instead of DragClient::prepareTo...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 22:32:43 +0000 (22:32 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Jan 2018 22:32:43 +0000 (22:32 +0000)
commit94b81c02f4b698e40bbee5540f59dc7755292aa2
treecf7902600db4263e4fafe62d1f1788ef0619c7b4
parent4c20741fe8be035ab878ed61e040b5589017952e
Send PromisedBlobInfo to the client through DragItem instead of DragClient::prepareToDragPromisedBlob
https://bugs.webkit.org/show_bug.cgi?id=181497

Reviewed by Tim Horton.

Source/WebCore:

Refactor drag initiation with DOMFile-backed attachment elements. See WebKit ChangeLog for more information. No
change in behavior; promised blob dragging covered by WKAttachment API tests.

* loader/EmptyClients.cpp:
* page/DragClient.h:
(WebCore::DragClient::prepareToDragPromisedBlob): Deleted.
* page/DragController.cpp:
(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
(WebCore::DragController::doSystemDrag):
(WebCore::DragController::promisedBlobInfo):
(WebCore::DragController::dragAttachmentElement): Deleted.
* page/DragController.h:
* platform/DragItem.h:
(WebCore::DragItem::encode const):
(WebCore::DragItem::decode):

Source/WebKit:

Refactor drag and drop support for promised blob data, so that blob info is shipped across to the client layer
via DragItem in the DragClient::startDrag codepath, rather than via a separate prepareToDragPromisedBlob client
codepath that stages promised blob info.

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::prepareToDragPromisedBlob): Deleted.
* UIProcess/PageClient.h:
(WebKit::PageClient::prepareToDragPromisedBlob): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::prepareToDragPromisedBlob): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::prepareToDragPromisedBlob): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startDrag:item:]):
* UIProcess/mac/PageClientImplMac.h:
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::prepareToDragPromisedBlob): Deleted.
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::prepareToDragPromisedBlob): Deleted.
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::prepareToDragPromisedBlob): Deleted.
* WebProcess/WebPage/WebPage.h:

Source/WebKitLegacy/mac:

See other ChangeLogs for more detail.

* WebCoreSupport/WebDragClient.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/page/DragClient.h
Source/WebCore/page/DragController.cpp
Source/WebCore/page/DragController.h
Source/WebCore/platform/DragItem.h
Source/WebCore/platform/PromisedBlobInfo.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/WebViewImpl.h
Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm
Source/WebKit/UIProcess/PageClient.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/UIProcess/ios/PageClientImplIOS.h
Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/mac/PageClientImplMac.h
Source/WebKit/UIProcess/mac/PageClientImplMac.mm
Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebDragClient.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.h