[wpt-sync] Sync PR 39626 - Fix COOP:RP inheritance by bundling the origin that sets it
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 39626 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/39626
Details from upstream follow.
Jonathan Hao <phao@chromium.org> wrote:
Fix COOP:RP inheritance by bundling the origin that sets it
Before this CL, whenever a cross-origin iframe opens a popup, it behaves
like noopener is used. To make theCross-Origin-Opener-Policy: restrict-properties(COOP:RP) more useful, we'd like to keep the opener
connection between the iframe and the popup window, and decide whether
to swap browser instance when it navigates to an end-document. See https://github.com/hemeryar/coi-with-popups/blob/main/docs/cross_origin_iframe_popup.MD for why we do this.
- To keep the opener connection, we return false in
COOPSuppressOpenerwhen COOP=RP- We bundle the COOP value with the origin that sets it, and use this
origin in COOP algorithms because that origin represents the current
browsing context group.- Since we allow the popup's initial empty document to stay in the
process, we had to restrict its crossOriginIsolated capability.
Otherwise, a cross-origin iframe can get around permission policy that
restricts it from using crossOriginIsolated APIs. In order to do this,
we put the COOP bundle into the policy container so it is passed down to
the renderer. We can then decide whether we need to restrict
crossOriginIsolated.Bug: 1385827
Change-Id: Ia4f45f949b30b6238568b22978f47a23dc1992fa
Reviewed-on: https://chromium-review.googlesource.com/4404116
WPT-Export-Revision: af07decb6e0a39dcb83a42a45bd5e6bce8949ffb
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Updated•2 years ago
|
Description
•