Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1183bebc8967b3cda38776fe26c3e31a4fe240b8
https://github.com/WebKit/WebKit/commit/1183bebc8967b3cda38776fe26c3e31a4fe240b8
Author: Zak Ridouh <[email protected]>
Date: 2026-07-21 (Tue, 21 Jul 2026)
Changed paths:
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
Log Message:
-----------
[Site Isolation] Apply per-navigation website policies to cross-origin
subframe document loaders
https://bugs.webkit.org/show_bug.cgi?id=319931
rdar://182855273
Reviewed by Megan Gardner and Alex Christensen.
Under site isolation a cross-origin subframe loads in its own web process. The
per-navigation website policies chosen in the UI process (WKWebpagePreferences,
e.g. allowsJSHandleCreationInPageWorld) were never delivered to that process:
continueNavigationInNewProcess built the subframe's LoadParameters without
websitePolicies, and even when present WebPage::createDocumentLoader only
applied
pending website policies to the main frame. As a result the policies were
silently
dropped for cross-origin subframes, unlike without site isolation where the
subframe's own DocumentLoader receives them via the navigation policy decision.
One user-visible consequence: window.webkit.createJSHandle (gated by the
allowsJSHandleCreationInPageWorld page-world policy) was undefined in
cross-origin
subframes, which breaks testRunner.runUIScript()/UIHelper when called from a
subframe under site isolation.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::continueNavigationInNewProcess):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createDocumentLoader):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation,
WebsitePoliciesAppliedToCrossOriginSubframeDocumentLoader)):
Canonical link: https://commits.webkit.org/317675@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications