LibWeb/CSS: Align declaration block parsing with the spec

We have two different code paths that implement the "parse a CSS
declaration block" algorithm, for properties and descriptors. COmbining
them isn't straightforward, and doesn't seem especially useful.
This commit is contained in:
Sam Atkins 2025-04-14 15:26:43 +01:00
parent 8a20899382
commit fa8bbfa6a5
Notes: github-actions[bot] 2025-04-23 10:40:21 +00:00
5 changed files with 52 additions and 38 deletions

View file

@ -1216,7 +1216,7 @@ void CSSStyleProperties::set_declarations_from_text(StringView css_text)
auto parsing_params = owner_node().has_value()
? Parser::ParsingParams(owner_node()->element().document())
: Parser::ParsingParams();
auto style = parse_css_style_attribute(parsing_params, css_text);
auto style = parse_css_property_declaration_block(parsing_params, css_text);
set_the_declarations(style.properties, style.custom_properties);
}