Refactor drag and drop implementation on Mac
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2017 02:01:29 +0000 (02:01 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2017 02:01:29 +0000 (02:01 +0000)
commit05bb465ff50c3a052dd42c359f176e40645522bd
tree7775b7881f878bc641ee40f53ec3f86a2b4a2ff7
parent238e6b6decd671809661c720271e9e317baefa75
Refactor drag and drop implementation on Mac
https://bugs.webkit.org/show_bug.cgi?id=167427

Reviewed by Enrica Casucci.

Source/WebCore:

Refactors some code around drag and drop on Mac, and cleans up some other related code as needed. This patch
should result in no behavior change.

* dom/DataTransfer.cpp:
* page/EventHandler.cpp:
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::eventLoopHandleMouseDragged):
* page/mac/EventHandlerMac.mm:
* platform/DragImage.cpp:
* platform/Pasteboard.h:
* platform/ios/DragImageIOS.mm:
* platform/ios/PasteboardIOS.mm:
* platform/mac/DragDataMac.mm:
(rtfPasteboardType):
(rtfdPasteboardType):
(stringPasteboardType):
(urlPasteboardType):
(htmlPasteboardType):
(colorPasteboardType):
(pdfPasteboardType):
(tiffPasteboardType):
(WebCore::DragData::DragData):
(WebCore::DragData::containsColor):
(WebCore::DragData::containsFiles):
(WebCore::DragData::numberOfFiles):
(WebCore::DragData::asFilenames):
(WebCore::DragData::containsPlainText):
(WebCore::DragData::containsCompatibleContent):
(WebCore::DragData::containsPromise):
(WebCore::DragData::asURL):
* platform/mac/DragImageMac.mm:

Source/WebKit/mac:

Refactor some WebKit1 code on the Mac pertaining to drag and drop. See WebCore ChangeLog for more details.

* Misc/WebNSPasteboardExtras.h:
* WebCoreSupport/WebDragClient.mm:
* WebView/WebFrame.mm:
* WebView/WebFrameInternal.h:
* WebView/WebHTMLView.mm:
* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

Source/WebKit2:

See WebCore ChangeLog for more details.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode):
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
Source/WebCore/ChangeLog
Source/WebCore/dom/DataTransfer.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/EventHandler.h
Source/WebCore/page/ios/EventHandlerIOS.mm
Source/WebCore/page/mac/EventHandlerMac.mm
Source/WebCore/platform/DragImage.cpp
Source/WebCore/platform/Pasteboard.h
Source/WebCore/platform/ios/DragImageIOS.mm
Source/WebCore/platform/ios/PasteboardIOS.mm
Source/WebCore/platform/mac/DragDataMac.mm
Source/WebCore/platform/mac/DragImageMac.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebDragClient.mm
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebFrameInternal.h
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
Source/WebKit2/UIProcess/Cocoa/WebPageProxyCocoa.mm
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm