servo/components/script/dom/servoparser
Andrei Volykhin 6a1a3aea08
html: Allow legacy referrer policies only for <meta> referrer (#39506)
Follow the HTML specification and allow to use legacy referrer policies
(never/default/always/origin-when-crossorigin) only with 'meta'
referrer.

See https://html.spec.whatwg.org/multipage/#meta-referrer (step 5)

While for another HTML elements with 'referrerpolicy' content attribute
(https://html.spec.whatwg.org/multipage/#referrer-policy-attribute)
and for 'Referrer-Policy' HTTP header

(https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header-dfn)
the referrer policy should be determine from the standard policy tokens
(https://w3c.github.io/webappsec-referrer-policy/#referrer-policy).

So unknown policy values (legacy from meta-referrer) will be ignored
and determine as 'ReferrerPolicy::EmptyString'.

Testing: No changes

Fixes: #36833

Signed-off-by: Andrei Volykhin <andrei.volykhin@gmail.com>
2025-09-30 16:29:24 +00:00
..
async_html.rs Removed FnvHash and transformed the rest to FxHashmap (#39233) 2025-09-10 13:34:54 +00:00
html.rs Script: Change the rest of script to not rely on Deref<str> for DOMString (#39481) 2025-09-25 12:27:42 +00:00
mod.rs script: display top-level SVG image documents. (#39494) 2025-09-29 09:16:22 +00:00
prefetch.rs html: Allow legacy referrer policies only for <meta> referrer (#39506) 2025-09-30 16:29:24 +00:00
xml.rs script: Move HTML DOM interfaces to script/dom/html/ (#39046) 2025-08-31 01:00:09 +00:00