[wpt-sync] Sync PR 63306 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=326476
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63306 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63306
Details from upstream follow.
Anne van Kesteren <annevk@annevk.nl> wrote:
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=326476
WebKit export from bug: Determine whether a document is a secure context when it is created
<pre>
Determine whether a document is a secure context when it is createdDocument::isSecureContext() walked the frame tree on every call. With site
isolation it could only see the origin of a frame in another process, which
is opaque for a sandboxed frame, so a frame nested in a sandboxed cross-site
iframe was not a secure context. And a provisional frame is not in the frame
tree yet, which needed a workaround.A document now determines this once, in initSecurityContext(): it is a secure
context if its parent frame is and its own origin is potentially trustworthy.
A document that inherits its origin inherits this from its owner too, like
COEP and Document-Isolation-Policy. DocumentSecurityPolicy carries the result,
so other processes receive it the same way they receive COEP. The UI process
seeds a new frame with its creator's state for its initial about:blank document.A document whose frame is removed now keeps its state. Before, it was always a
secure context.Dedicated workers now inherit their creator's state instead of checking their
top-level origin, as HTML requires. Service workers are always secure contexts.
Shared workers keep checking their top-level origin, which is part of their key.WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=326476">https://bugs.webkit.org/show_bug.cgi?id=326476</a>
</pre>
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=101383
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 8 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 10 tests and 4 subtests
Status Summary
Firefox
OK : 2[GitHub] 8[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 10[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug]
PASS: 2[GitHub] 61[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 72[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug]
Chrome
OK : 2
PASS: 2
Safari
OK : 2
PASS: 1
FAIL: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /secure-contexts/basic-dedicated-worker.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview] - /secure-contexts/shared-worker-secure-first.https.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview]
Tests Disabled in Gecko Infrastructure
- /secure-contexts/basic-dedicated-worker.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview] - /secure-contexts/shared-worker-secure-first.https.html [wpt.fyi]:
OK[Gecko-linux2404-64-debug,Gecko-linux2404-64-opt,Gecko-windows11-32-25h2-debug,Gecko-windows11-32-25h2-opt,Gecko-windows11-64-25h2-debug],SKIP[Gecko-android-em-14-x86_64-debug-geckoview,Gecko-android-em-14-x86_64-lite-opt-geckoview,Gecko-android-em-14-x86_64-opt-geckoview]
Comment 4•1 month ago
|
||
| bugherder | ||
Description
•