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

@ -234,7 +234,7 @@ WebIDL::ExceptionOr<void> CSSFontFaceDescriptors::set_css_text(StringView value)
// 3. Parse the given value and, if the return value is not the empty list, insert the items in the list into the
// declarations, in specified order.
auto descriptors = parse_css_list_of_descriptors(Parser::ParsingParams {}, AtRuleID::FontFace, value);
auto descriptors = parse_css_descriptor_declaration_block(Parser::ParsingParams {}, AtRuleID::FontFace, value);
if (!descriptors.is_empty())
m_descriptors = move(descriptors);