From 981ede900ab95a13e4a51ec2bd7828d487c63da7 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 2 May 2025 11:48:40 +0100 Subject: [PATCH] LibWeb/DOM: Create style element style sheets with document's base URL This is the simplest fix I could find that resolves a buggy interaction between this and the CSS fetch algorithms, which also doesn't regress anything. (As far as I can tell.) --- Libraries/LibWeb/DOM/StyleElementUtils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/DOM/StyleElementUtils.cpp b/Libraries/LibWeb/DOM/StyleElementUtils.cpp index 58540fb469c..0fa637cb32e 100644 --- a/Libraries/LibWeb/DOM/StyleElementUtils.cpp +++ b/Libraries/LibWeb/DOM/StyleElementUtils.cpp @@ -84,7 +84,8 @@ void StyleElementUtils::update_a_style_block(DOM::Element& style_element) : String {}, CSS::StyleSheetList::Alternate::No, CSS::StyleSheetList::OriginClean::Yes, - {}, + // AD-HOC: Use the document's base URL as the location instead. Spec issue: https://github.com/whatwg/html/issues/11281 + style_element.document().base_url(), nullptr, nullptr);