mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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:
Notes:
github-actions[bot]
2025-12-01 10:19:04 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/e937f5db576 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6972 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user