LibWeb/CSS: Allow non-StyleValueLists in animation properties

Reverts 51f694c6af and
b52beb5105.

The animation-* properties are in an awkward place currently, where
they *should* be lists, and a lot of our code acts as if they are, but
actually we parse them as single values. The above commits caused a few
WPT tests to crash - see link below. I've imported one of them to
prevent future regressions.
https://wpt.fyi/results/css/css-typed-om/the-stylepropertymap/properties?diff&filter=ADC&run_id=6293362870321152&run_id=5123272984494080
This commit is contained in:
Sam Atkins 2025-12-01 15:20:15 +00:00
parent 4d27e9aa5e
commit d9abfdf2ab
Notes: github-actions[bot] 2025-12-02 09:49:39 +00:00
4 changed files with 83 additions and 6 deletions

View file

@ -2807,12 +2807,18 @@ static CSSPixels snap_a_length_as_a_border_width(double device_pixels_per_css_pi
static NonnullRefPtr<StyleValue const> compute_style_value_list(NonnullRefPtr<StyleValue const> const& style_value, Function<NonnullRefPtr<StyleValue const>(NonnullRefPtr<StyleValue const> const&)> const& compute_entry)
{
StyleValueVector computed_entries;
// FIXME: This is required because our animation-* properties are not yet parsed as lists.
// Once that is fixed, every value here will be a StyleValueList.
if (style_value->is_value_list()) {
StyleValueVector computed_entries;
for (auto const& entry : style_value->as_value_list().values())
computed_entries.append(compute_entry(entry));
for (auto const& entry : style_value->as_value_list().values())
computed_entries.append(compute_entry(entry));
return StyleValueList::create(move(computed_entries), StyleValueList::Separator::Comma);
return StyleValueList::create(move(computed_entries), StyleValueList::Separator::Comma);
}
return compute_entry(style_value);
}
NonnullRefPtr<StyleValue const> StyleComputer::compute_value_of_property(