From 38efc39e1750a35a09c4cc2b39a5cff475d2d0b4 Mon Sep 17 00:00:00 2001 From: Callum Law Date: Sat, 29 Nov 2025 15:29:20 +1300 Subject: [PATCH] LibWeb: Simplify `assemble_coordinated_value_list` We know that all coordinated value list longhands are parsed as `StyleValueList`s --- Libraries/LibWeb/CSS/ComputedProperties.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Libraries/LibWeb/CSS/ComputedProperties.cpp b/Libraries/LibWeb/CSS/ComputedProperties.cpp index d15df86587e..bcb1205aea9 100644 --- a/Libraries/LibWeb/CSS/ComputedProperties.cpp +++ b/Libraries/LibWeb/CSS/ComputedProperties.cpp @@ -378,20 +378,11 @@ HashMap ComputedProperties::assemble_coordinated_v // - If a coordinating list property has too few values specified, its value list is repeated to add more used // values. // - The computed values of the coordinating list properties are not affected by such truncation or repetition. - - // 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. - auto const get_property_value_as_list = [&](PropertyID property_id) { - auto const& value = property(property_id); - - return value.is_value_list() ? value.as_value_list().values() : StyleValueVector { value }; - }; - HashMap coordinated_value_list; - for (size_t i = 0; i < get_property_value_as_list(base_property_id).size(); i++) { + for (size_t i = 0; i < property(base_property_id).as_value_list().size(); i++) { for (auto property_id : property_ids) { - auto const& list = get_property_value_as_list(property_id); + auto const& list = property(property_id).as_value_list().values(); coordinated_value_list.ensure(property_id).append(list[i % list.size()]); }