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
parent 9ed85ddd63
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

@ -638,6 +638,8 @@ void StyleComputer::for_each_property_expanding_shorthands(PropertyID property_i
return;
}
// FIXME: We should add logic in parse_css_value to parse "positional-value-list-shorthand"s as
// ShorthandStyleValues to avoid the need for this (and assign_start_and_end_values).
auto assign_edge_values = [&](PropertyID top_property, PropertyID right_property, PropertyID bottom_property, PropertyID left_property, CSSStyleValue const& value) {
if (value.is_value_list()) {
auto values = value.as_value_list().values();