[webkit-changes] [WebKit/WebKit] a703b4: Refactor some image drag and drop codepaths
Wenson Hsieh
noreply at github.com
Mon Sep 12 07:09:02 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a703b40c3292a57949210425c37f76833a188e14
https://github.com/WebKit/WebKit/commit/a703b40c3292a57949210425c37f76833a188e14
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2022-09-12 (Mon, 12 Sep 2022)
Changed paths:
M Source/WebCore/dom/DataTransfer.cpp
M Source/WebCore/dom/DataTransfer.h
M Source/WebCore/page/DragController.cpp
M Source/WebCore/page/DragController.h
M Source/WebCore/page/DragState.h
M Source/WebCore/page/EventHandler.cpp
M Source/WebCore/page/EventHandler.h
M Source/WebCore/page/SecurityOrigin.cpp
M Source/WebCore/platform/DragData.cpp
M Source/WebCore/platform/DragData.h
M Source/WebCore/platform/cocoa/DragDataCocoa.mm
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKitLegacy/mac/WebView/WebView.mm
M Source/WebKitLegacy/win/WebView.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm
Log Message:
-----------
Refactor some image drag and drop codepaths
https://bugs.webkit.org/show_bug.cgi?id=245058
rdar://98992054
Reviewed by Ryosuke Niwa.
Refactor some codepaths related to dragging and dropping images.
* Source/WebCore/dom/DataTransfer.cpp:
(WebCore::DataTransfer::types const):
(WebCore::DataTransfer::filesFromPasteboardAndItemList const):
* Source/WebCore/dom/DataTransfer.h:
(WebCore::DataTransfer::allowsFileAccess const):
* Source/WebCore/page/DragController.cpp:
(WebCore::DragController::dragEntered):
(WebCore::DragController::dragExited):
(WebCore::DragController::dragUpdated):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::disallowFileAccessIfNeeded):
* Source/WebCore/page/DragController.h:
* Source/WebCore/page/DragState.h:
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::canDropCurrentlyDraggedImageAsFile const):
(WebCore::EventHandler::handleDrag):
* Source/WebCore/page/EventHandler.h:
* Source/WebCore/page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canReceiveDragData const):
* Source/WebCore/platform/DragData.cpp:
(WebCore::DragData::disallowFileAccess):
* Source/WebCore/platform/DragData.h:
* Source/WebCore/platform/cocoa/DragDataCocoa.mm:
(WebCore::DragData::containsFiles const):
(WebCore::DragData::numberOfFiles const):
(WebCore::DragData::asFilenames const):
(WebCore::DragData::containsCompatibleContent const):
(WebCore::DragData::containsPromise const):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKitLegacy/mac/WebView/WebView.mm:
(-[WebView _enteredDataInteraction:client:global:operation:]):
(-[WebView _updatedDataInteraction:client:global:operation:]):
(-[WebView _exitedDataInteraction:client:global:operation:]):
(-[WebView _tryToPerformDataInteraction:client:global:operation:]):
(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):
(-[WebView draggingExited:]):
(-[WebView performDragOperation:]):
* Source/WebKitLegacy/win/WebView.cpp:
(WebView::DragEnter):
(WebView::DragOver):
(WebView::DragLeave):
(WebView::Drop):
Use `WTFMove()` when handing the `DragData` over to `DragController`.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
Canonical link: https://commits.webkit.org/254380@main
More information about the webkit-changes
mailing list