Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5fe571e3d168b563c67df69611b8a77629922420
https://github.com/WebKit/WebKit/commit/5fe571e3d168b563c67df69611b8a77629922420
Author: Zak Ridouh <[email protected]>
Date: 2026-07-07 (Tue, 07 Jul 2026)
Changed paths:
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] DOM paste access dialog is offset from element in
cross-origin iframes
https://bugs.webkit.org/show_bug.cgi?id=309724
rdar://172319433
Reviewed by Alex Christensen.
When a cross-origin iframe requests DOM paste access (e.g. via
navigator.clipboard.readText()), the paste access dialog appears at the
wrong position. The elementRect sent from the subframe's WebProcess is in
subframe coordinates, but the UIProcess uses it directly without
converting to main frame coordinates.
Use convertRectToMainFrameCoordinates to transform the elementRect before
passing it to the page client, matching the existing pattern used by the
color picker, datalist suggestions dropdown, and popup menu.
With site isolation, a cross-origin parent may destroy the frame before
the requesting frame's process learns about it, so a missing frame here is
an expected race rather than a misbehaving process. Deny the request
gracefully in that case instead of terminating the connection with a
message check.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestDOMPasteAccess):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation, DOMPasteAccessRectInCrossOriginIframe)):
Canonical link: https://commits.webkit.org/316654@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications