Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3c5a9e4f2e240523f233af1e9e9aee7e849bf2ba
https://github.com/WebKit/WebKit/commit/3c5a9e4f2e240523f233af1e9e9aee7e849bf2ba
Author: Pascoe <[email protected]>
Date: 2026-05-21 (Thu, 21 May 2026)
Changed paths:
M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/DragAndDropTestsMac.mm
Log Message:
-----------
[Site Isolation] Drag & drop is unable to recognize/find dragged files on disk
rdar://170098013
https://bugs.webkit.org/show_bug.cgi?id=315039
Reviewed by Abrar Rahman Protyasha.
When a file is dropped on a site-isolated remote iframe,
WebPageProxy::propagateDragAndDrop forwards the PerformDragOperation
IPC to the iframe's process without telling the network process to
allow the file path for that process, and without re-issuing the
sandbox-extension handles in DragEventForwardingData (which
createSandboxExtensionsIfNeeded bound to the main frame process's
audit token). The iframe's URL.createObjectURL is rejected by
registerInternalFileBlobURL's MESSAGE_CHECK and, even if it weren't,
the iframe's web process can't issue a fresh extension handle to send
with the IPC and the network process has no sandbox access to read
the file.
Before forwarding, re-issue the per-file upload sandbox-extension
handles bound to the target frame process's audit token (factoring
createSandboxExtensionsIfNeeded's per-file loop into a shared
createSandboxExtensionsForUpload helper), and send
NetworkProcess::AllowFilesAccessFromWebProcess for the target
process - mirroring the pattern already in performDragControllerAction.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/DragAndDropTestsMac.mm
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::platformSupportsMetal):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::createReadOnlySandboxExtensionForProcess):
(WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
(WebKit::WebPageProxy::createSandboxExtensionsForUpload):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::propagateDragAndDrop):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/DragAndDropTestsMac.mm:
(TEST(DragAndDropTests, DropFileOnSiteIsolatedIframeRegistersBlobURL)):
Canonical link: https://commits.webkit.org/313694@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications