LibWeb/CSS: Set request's referrer in fetch_a_style_resource()

THe `location` is now a URL so we can pass it directly.
This commit is contained in:
Sam Atkins 2025-04-10 10:22:17 +01:00
parent 9284530a9f
commit 3fe978c8a0
Notes: github-actions[bot] 2025-04-15 09:31:19 +00:00

View file

@ -44,9 +44,8 @@ void fetch_a_style_resource(String const& url_value, CSSStyleSheet const& sheet,
// FIXME: No specs seem to define these yet. When they do, implement them.
// 6. If reqs mode is "cors", set reqs referrer to sheets location. [CSSOM]
if (request->mode() == Fetch::Infrastructure::Request::Mode::CORS) {
// FIXME: sheet's location is an optional string, what do we do here?
}
if (request->mode() == Fetch::Infrastructure::Request::Mode::CORS)
request->set_referrer(sheet.location().value());
// 7. If sheets origin-clean flag is set, set reqs initiator type to "css". [CSSOM]
if (sheet.is_origin_clean())