mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-02 15:12:04 +00:00
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.
This commit is contained in:
parent
bc1d323ba0
commit
1cb1526178
Notes:
github-actions[bot]
2025-05-03 11:02:36 +00:00
Author: https://github.com/AtkinsSJ
Commit: 1cb1526178
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4536
1 changed files with 1 additions and 3 deletions
|
@ -66,9 +66,7 @@ GC::Ref<CSSStyleSheet> StyleSheetList::create_a_css_style_sheet(String const& cs
|
|||
{
|
||||
// 1. Create a new CSS style sheet object and set its properties as specified.
|
||||
// AD-HOC: The spec never tells us when to parse this style sheet, but the most logical place is here.
|
||||
// AD-HOC: Are we supposed to use the document's URL for the stylesheet's location during parsing? Not doing it breaks things.
|
||||
auto location_url = location.value_or(document().url());
|
||||
auto sheet = parse_css_stylesheet(Parser::ParsingParams { document() }, css_text, location_url);
|
||||
auto sheet = parse_css_stylesheet(Parser::ParsingParams { document() }, css_text, location);
|
||||
|
||||
sheet->set_parent_css_style_sheet(parent_style_sheet);
|
||||
sheet->set_owner_css_rule(owner_rule);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue