Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: db89016bcf994511e112e3a12c158b6d5b47ebc7
https://github.com/WebKit/WebKit/commit/db89016bcf994511e112e3a12c158b6d5b47ebc7
Author: Anne van Kesteren <[email protected]>
Date: 2026-10-10 (Sat, 10 Oct 2026)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/http/tests/document-isolation-policy/resources/xslt-frame.py
A LayoutTests/http/tests/document-isolation-policy/resources/xslt-frame.xsl
A
LayoutTests/http/tests/document-isolation-policy/xslt-result-agent-cluster.https-expected.txt
A
LayoutTests/http/tests/document-isolation-policy/xslt-result-agent-cluster.https.html
A
LayoutTests/http/tests/security/cross-origin-frame-access-with-web-security-disabled-expected.txt
A
LayoutTests/http/tests/security/cross-origin-frame-access-with-web-security-disabled.html
M
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/javascript-url-no.https-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/javascript-url-no.https.html
M
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/javascript-url-yes.https-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/browsers/origin/origin-keyed-agent-clusters/getter-special-cases/javascript-url-yes.https.html
A
LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/agent-cluster.tentative.https-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/agent-cluster.tentative.https.html
A
LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/header-parsing.tentative.https-expected.txt
A
LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/header-parsing.tentative.https.html
A
LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/resources/header-parsing-frame.py
M
LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/resources/w3c-import.log
M
LayoutTests/imported/w3c/web-platform-tests/html/document-isolation-policy/w3c-import.log
M LayoutTests/platform/ios-site-isolation/TestExpectations
M LayoutTests/platform/mac-site-isolation/TestExpectations
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp
M Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
M Source/WebCore/bindings/js/ScriptController.cpp
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/DocumentSecurityPolicy.h
M Source/WebCore/loader/DocumentIsolationPolicy.cpp
M Source/WebCore/loader/DocumentIsolationPolicy.h
M Source/WebCore/loader/DocumentLoader.h
M Source/WebCore/loader/DocumentWriter.cpp
M Source/WebCore/loader/EmptyClients.cpp
M Source/WebCore/loader/FrameLoader.cpp
M Source/WebCore/loader/NavigationRequester.cpp
M Source/WebCore/loader/NavigationRequester.h
A Source/WebCore/page/AgentClusterAssignment.h
A Source/WebCore/page/AgentClusterIdentifier.h
M Source/WebCore/page/DOMWindow.cpp
M Source/WebCore/page/Frame.h
M Source/WebCore/page/LocalFrame.cpp
M Source/WebCore/page/LocalFrame.h
M Source/WebCore/page/Navigation.cpp
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/PageConfiguration.cpp
M Source/WebCore/page/PageConfiguration.h
M Source/WebCore/page/RemoteFrame.cpp
M Source/WebCore/page/RemoteFrame.h
M Source/WebCore/page/SecurityOrigin.h
M Source/WebCore/xml/XSLTProcessor.cpp
M Source/WebKit/Scripts/webkit/messages.py
M Source/WebKit/Scripts/webkit/tests/MessageArgumentDescriptions.cpp
M Source/WebKit/Shared/GoToBackForwardItemParameters.h
M Source/WebKit/Shared/GoToBackForwardItemParameters.serialization.in
M Source/WebKit/Shared/LoadParameters.h
M Source/WebKit/Shared/LoadParameters.serialization.in
M Source/WebKit/Shared/PolicyDecision.h
M Source/WebKit/Shared/PolicyDecision.serialization.in
M Source/WebKit/Shared/WTFArgumentCoders.serialization.in
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/Shared/WebPageCreationParameters.h
M Source/WebKit/Shared/WebPageCreationParameters.serialization.in
M Source/WebKit/UIProcess/API/APINavigation.cpp
M Source/WebKit/UIProcess/API/APINavigation.h
M Source/WebKit/UIProcess/BrowsingContextGroup.cpp
M Source/WebKit/UIProcess/BrowsingContextGroup.h
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/UIProcess/WebFrameProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
M Source/WebKit/WebProcess/WebPage/WebFrame.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKitLegacy/mac/WebView/WebView.mm
M Tools/Scripts/webkitpy/api_tests/allowlist.txt
M Tools/TestRunnerShared/TestFeatures.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKNavigationResponse.mm
Log Message:
-----------
Separate same-origin documents with a different Document-Isolation-Policy
into different agent clusters
https://bugs.webkit.org/show_bug.cgi?id=326665
rdar://189400241
Reviewed by Alex Christensen.
Same-origin documents can now be in different agent clusters, so an origin
check no longer tells whether one document can reach another. Building on
322736@main, the UI process assigns each document an AgentClusterIdentifier,
minted per browsing context group from the agent cluster key: site or origin,
plus the cross-origin isolation key where one applies.
The identifier, origin keying, and policy travel as an AgentClusterAssignment,
which BrowsingContextGroup::assignAgentCluster() makes. A preliminary one is
made at navigation action time and replaced at response time, when the policy
headers are parsed. Loads that continue in another process get theirs through
LoadParameters and GoToBackForwardItemParameters, and error pages loaded with
_loadAlternateHTMLString get one too. Debug builds assert that every http(s)
and blob: document has one. The injected bundle can no longer skip the
response decision for documents that still need an assignment, though
responses with an opaque origin still can. Loads without a response decision
now also record their historical agent cluster keying. The WebContent process
no longer needs the BrowsingContextGroupIdentifier.
isPlatformObjectSameOrigin() adds the agent cluster check to
isSameOriginDomain() wherever one document can reach another's objects or run
script in it, including javascript: URLs and the navigate event's
sourceElement. Universal access bypasses it. The initial about:blank Window is
not reused across agent clusters, and javascript: URL and XSLT results keep
the identifier of the document they replace.
See https://github.com/WICG/document-isolation-policy/issues/11
Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKNavigationResponse.mm
http/tests/document-isolation-policy/xslt-result-agent-cluster.https.html
http/tests/security/cross-origin-frame-access-with-web-security-disabled.html
imported/w3c/web-platform-tests/html/document-isolation-policy/agent-cluster.tentative.https.html
imported/w3c/web-platform-tests/html/document-isolation-policy/header-parsing.tentative.https.html
Canonical link: https://commits.webkit.org/323290@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications