Skip to content

Commit 1cb1526

Browse files
committed
LibWeb/CSS: Remove document-URL hack from create_a_style_sheet()
We no longer need this, because we don't complete URLs during parsing, and the location is set elsewhere when needed.
1 parent bc1d323 commit 1cb1526

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Libraries/LibWeb/CSS/StyleSheetList.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ GC::Ref<CSSStyleSheet> StyleSheetList::create_a_css_style_sheet(String const& cs
6666
{
6767
// 1. Create a new CSS style sheet object and set its properties as specified.
6868
// AD-HOC: The spec never tells us when to parse this style sheet, but the most logical place is here.
69-
// AD-HOC: Are we supposed to use the document's URL for the stylesheet's location during parsing? Not doing it breaks things.
70-
auto location_url = location.value_or(document().url());
71-
auto sheet = parse_css_stylesheet(Parser::ParsingParams { document() }, css_text, location_url);
69+
auto sheet = parse_css_stylesheet(Parser::ParsingParams { document() }, css_text, location);
7270

7371
sheet->set_parent_css_style_sheet(parent_style_sheet);
7472
sheet->set_owner_css_rule(owner_rule);

0 commit comments

Comments
 (0)