[wpt-sync] Sync PR 63936 - [css] Use document referrer policy for fetching from inline CSS
Categories
(Core :: DOM: Security, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63936 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63936
Details from upstream follow.
Mike Taylor <miketaylr@chromium.org> wrote:
[css] Use document referrer policy for fetching from inline CSS
When parsing an inline stylesheet,
CSSStyleSheet::InlineParserContext
previously constructed theCSSParserContextwith
network::mojom::ReferrerPolicy::kDefault, causing subresource fetches
(such as fonts, images, or SVG resource references) initiated from
\<style>elements to ignore the owner document's referrer policy.Instead, snapshot
owner_node_document.GetReferrerPolicy()when
creating the inlineCSSParserContextso that inline stylesheets use
the owner document's referrer policy active at parse time. Also guard
ExecutionContext::GetReferrerPolicy()whenpolicy_container_is
null (e.g. afterTakePolicyContainer()on a cloned document).Original patch by estark@chromium.org.
Bug: 40898994, 40229610
Fixed: 392139161
Test: external/wpt/referrer-policy/css-integration/
Change-Id: Ieb123531d3fac6cbc8d32d6378b6d15168518f1a
TAG=agy
CONV=0f543df6-f84d-421a-bec5-5db380444d4d
Reviewed-on: https://chromium-review.googlesource.com/8602043
WPT-Export-Revision: 3e24fcec64a6600fb7db938912c114a87ba8e727
| 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=109503
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 21 tests and 1 subtests
Status Summary
Firefox
OK : 3[GitHub] 21[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, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 3[GitHub] 21[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, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
Chrome
OK : 3
PASS: 1
FAIL: 2
Safari
OK : 3
PASS: 3
Links
Comment 4•24 days ago
|
||
| bugherder | ||
Description
•