Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7b48394d1db726d1f2c137b2ddb344dbc5d16a9a
https://github.com/WebKit/WebKit/commit/7b48394d1db726d1f2c137b2ddb344dbc5d16a9a
Author: Jessica Cheung <[email protected]>
Date: 2026-02-27 (Fri, 27 Feb 2026)
Changed paths:
M Source/WebCore/page/DragController.cpp
M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
M Source/WebKit/UIProcess/PageClient.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/UIProcess/WebPageProxy.messages.in
M Source/WebKit/UIProcess/ios/PageClientImplIOS.h
M Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
M Source/WebKit/UIProcess/mac/PageClientImplMac.h
M Source/WebKit/UIProcess/mac/PageClientImplMac.mm
M Source/WebKit/UIProcess/mac/WebViewImpl.h
M Source/WebKit/UIProcess/mac/WebViewImpl.mm
M Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] (macOS) Drag & drop incomplete drag/dragging outside window
causes unresponsiveness
https://bugs.webkit.org/show_bug.cgi?id=307501
rdar://160324479
Reviewed by Sihui Liu and Aditya Keerthi.
In some cases of dragging and dropping within
the window with site isolation, the remote frame will
be unresponsive after dragging. In all cases of dragging
from a remote iframe out to the desktop, the remote iframe
is always unresponsive after.
There are no mouse events processed on it because `m_isStartingDrag`
on the remote iframe is never set to false after the drag operation.
This is due to start, did start and ending drag calls using
the main frame/local main frame, not accounting for remote frames.
Thus, startDrag would be called on the remote iframe (the current frame
that starts the drag) yet didStartDrag (which resets the `m_isStartingDrag` bit)
is never called on the remote iframe, but on the remote parent frame.
Therefore, to fix this issue, make sure the startDrag
and didStartDrag calls, among others are on the correct frame.
Add an API test to ensure an "incomplete" drag is still responsive
to mouse events after. Create another API test to ensure coordinates of dragEnd
for nested remote iframes is correct. Also, add a sanity API test to ensure
dragging
over remote frames does not leak the dragged data.
* Source/WebCore/page/DragController.cpp:
(WebCore::DragController::doSystemDrag):
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::startDrag):
* Source/WebKit/UIProcess/PageClient.h:
(WebKit::PageClient::startDrag):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dragEnded):
(WebKit::WebPageProxy::didStartDrag):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.h:
* Source/WebKit/UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::startDrag):
* Source/WebKit/UIProcess/mac/PageClientImplMac.h:
* Source/WebKit/UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::startDrag):
* Source/WebKit/UIProcess/mac/WebViewImpl.h:
* Source/WebKit/UIProcess/mac/WebViewImpl.mm:
(WebKit::WebViewImpl::startDrag):
* Source/WebKit/WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::startDrag):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didStartDrag):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation,
DragSourceEndedAtCoordinateTransformationNested)):
(TestWebKitAPI::(SiteIsolation, MouseClickAfterIncompleteDragging)):
(TestWebKitAPI::(SiteIsolation, DragOverStateInfo)):
Canonical link: https://commits.webkit.org/308357@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications