Skip to content

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=327253 - #63601

Merged
annevk merged 1 commit into
web-platform-tests:masterfrom
annevk:wpt-export-for-webkit-327253
Oct 19, 2026
Merged

annevk merged 1 commit into
web-platform-tests:masterfrom
annevk:wpt-export-for-webkit-327253

Conversation

@annevk

@annevk annevk commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

WebKit export from bug: Put documents with a Document-Isolation-Policy in cross-origin isolated processes

Put documents with a Document-Isolation-Policy in cross-origin isolated processes

With site isolation, a document with a Document-Isolation-Policy now goes in a
cross-origin isolated process that its browsing context group has for its site.
crossOriginIsolated returns true there, and SharedArrayBuffer objects can be
posted within its agent cluster. A group that is already cross-origin isolated
keeps all of its documents in its own processes. A group keeps its processes in
one map, keyed by the site and whether the process is for documents with a
policy.

The policy is only known from the response, so a same-site navigation stays in
its process until then. As for COOP, the network process then asks the UI
process for a swap when the first response's policy doesn't match the process,
unless the response doesn't replace the document (204 or 205). It sends the
response's URL and policy header, and the UI process decides, also taking the
top-level creation URL into account. The navigation continues with the same
network load in the site's other process, for subframes too. WebProcessProxy
records why a process is cross-origin isolated and passes this to the network
process. The UI process also refuses to commit a response without a policy in
a process for documents with one. Like COOP responses, navigations that could
cross between these processes reload rather than revalidate, as a 304 can't
move. A top-level data: document gets a process that matches the policy it
inherits.

A speculation rules prefetch only serves a navigation when its response has the
same policy as the document that prefetched it, as the navigation stays in that
document's process. So a document with a policy doesn't use a prefetch whose
response hasn't arrived yet.

Same-origin documents can now be in different processes, so ancestors in other
processes count when a document checks whether it may navigate a frame.

Not covered yet:
- navigate doesn't fire when a same origin-domain document in another process
  navigates a frame and the navigation moves to a third process.
- Dedicated workers of these documents are not cross-origin isolated.
- A cross-origin iframe with a policy still needs its parent to allow the
  "cross-origin-isolated" permissions policy feature to be cross-origin
  isolated. Whether it should is
  WICG/document-isolation-policy#12

WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=327253

@annevk annevk self-assigned this Oct 13, 2026
@wpt-pr-bot

Copy link
Copy Markdown
Collaborator

This patch has been exported from WebKit; it will be approved automatically once the downstream patch is r+.

@annevk
annevk force-pushed the wpt-export-for-webkit-327253 branch from 31fc06e to 37a0669 Compare October 14, 2026 13:19
…ed processes

With site isolation, a document with a Document-Isolation-Policy now goes in a
cross-origin isolated process that its browsing context group has for its site.
crossOriginIsolated returns true there, and SharedArrayBuffer objects can be
posted within its agent cluster. A group that is already cross-origin isolated
keeps all of its documents in its own processes. A group keeps its processes in
one map, keyed by the site and whether the process is for documents with a
policy.

The policy is only known from the response, so a same-site navigation stays in
its process until then. As for COOP, the network process then asks the UI
process for a swap when the first response's policy doesn't match the process,
unless the response doesn't replace the document (204 or 205). It sends the
response's URL and policy header, and the UI process decides, also taking the
top-level creation URL into account. The navigation continues with the same
network load in the site's other process, for subframes too. WebProcessProxy
records why a process is cross-origin isolated and passes this to the network
process. The UI process also refuses to commit a response without a policy in
a process for documents with one. Like COOP responses, navigations that could
cross between these processes reload rather than revalidate, as a 304 can't
move. A top-level data: document gets a process that matches the policy it
inherits.

A speculation rules prefetch only serves a navigation when its response has the
same policy as the document that prefetched it, as the navigation stays in that
document's process. So a document with a policy doesn't use a prefetch whose
response hasn't arrived yet.

Same-origin documents can now be in different processes, so ancestors in other
processes count when a document checks whether it may navigate a frame.

Not covered yet:
- navigate doesn't fire when a same origin-domain document in another process
  navigates a frame and the navigation moves to a third process.
- Dedicated workers of these documents are not cross-origin isolated.
- A cross-origin iframe with a policy still needs its parent to allow the
  "cross-origin-isolated" permissions policy feature to be cross-origin
  isolated. Whether it should is
  WICG/document-isolation-policy#12

WebKit-Bug: https://bugs.webkit.org/show_bug.cgi?id=327253
@annevk
annevk force-pushed the wpt-export-for-webkit-327253 branch from 37a0669 to 29410dc Compare October 16, 2026 10:18
@annevk
annevk enabled auto-merge (rebase) October 16, 2026 16:39
@annevk
annevk merged commit 6cd3f1c into web-platform-tests:master Oct 19, 2026
26 checks passed
@annevk
annevk deleted the wpt-export-for-webkit-327253 branch November 1, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants