Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7106513760ba2fe72d3b981d030145b96dcddf4b
      
https://github.com/WebKit/WebKit/commit/7106513760ba2fe72d3b981d030145b96dcddf4b
  Author: Zak Ridouh <[email protected]>
  Date:   2026-09-28 (Mon, 28 Sep 2026)

  Changed paths:
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation][macOS] Paste from the context menu does nothing in 
cross-site iframes
<https://bugs.webkit.org/show_bug.cgi?id=325349>
<rdar://problem/188452737>

Reviewed by Ryosuke Niwa.

Choosing Paste from the context menu granted pasteboard access to the main 
frame's process, but the paste
itself runs in the focused frame's process. Under Site Isolation, a cross-site 
iframe lives in another
process, so its pasteboard reads were denied and nothing was pasted.

Pass the frame that receives the context menu action into 
platformDidSelectItemFromActiveContextMenu and
grant access to its process, as executeEditCommand already does.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::contextMenuItemSelected):
(WebKit::WebPageProxy::platformDidSelectItemFromActiveContextMenu):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::platformDidSelectItemFromActiveContextMenu):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::TEST(SiteIsolation, ContextMenuPasteInCrossOriginFrame)):

Canonical link: https://commits.webkit.org/322078@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to