LibWeb: Generically serialize "positional-value-list-shorthand"s

We were previously handling this ad-hoc via logic in
`get_property_internal` but this didn't cover all contexts (for
instance `CSSStyleProperties::serialized`.

Gains us 9 more WPT tests as we now cover properties which weren't
included in the previous ad-hoc approach.
This commit is contained in:
Callum Law 2025-07-10 22:23:07 +12:00 committed by Sam Atkins
commit 927cd969b2
Notes: github-actions[bot] 2025-07-15 13:27:25 +00:00
14 changed files with 234 additions and 115 deletions

View file

@ -711,6 +711,7 @@ Parser::ParseErrorOr<NonnullRefPtr<CSSStyleValue const>> Parser::parse_css_value
if (auto parsed_value = parse_opacity_value(property_id, tokens); parsed_value && !tokens.has_next_token())
return parsed_value.release_nonnull();
return ParseError::SyntaxError;
// FIXME: This can be removed once we have generic logic for parsing "positional-value-list-shorthand"s
case PropertyID::Overflow:
if (auto parsed_value = parse_overflow_value(tokens); parsed_value && !tokens.has_next_token())
return parsed_value.release_nonnull();