LibWeb: Always parse comma separated value lists as StyleValueList

Previously we would either parse these as `StyleValueList<T>` or `T`
depending on whether or not there was more than one value, this meant we
always had to handle both cases anywhere we used these values.
This commit is contained in:
Callum Law
2025-11-29 14:30:45 +13:00
committed by Sam Atkins
parent 1a5933cb04
commit e937f5db57
Notes: github-actions[bot] 2025-12-01 10:19:04 +00:00
5 changed files with 19 additions and 20 deletions

View File

@@ -879,7 +879,7 @@ RefPtr<StyleValue const> CSSStyleProperties::style_value_for_computed_property(L
auto const& animation_timeline_computed_value = get_computed_value(PropertyID::AnimationTimeline);
auto const& animation_duration_computed_value = get_computed_value(PropertyID::AnimationDuration);
if (animation_timeline_computed_value.to_keyword() == Keyword::Auto) {
if (animation_timeline_computed_value.as_value_list().size() == 1 && animation_timeline_computed_value.as_value_list().values()[0]->to_keyword() == Keyword::Auto) {
// FIXME: We can remove these two branches once parse_comma_separated_value_list always returns StyleValueList.
if (animation_duration_computed_value.to_keyword() == Keyword::Auto)