From b52beb5105f149a7100a2b35a9ec6a268b3c1fe4 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 | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Libraries/LibWeb/CSS/ComputedProperties.cpp b/Libraries/LibWeb/CSS/ComputedProperties.cpp index 57e05b31fad..e6636e5d7c3 100644 --- a/Libraries/LibWeb/CSS/ComputedProperties.cpp +++ b/Libraries/LibWeb/CSS/ComputedProperties.cpp @@ -378,19 +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 only required until we update parse_comma_separated_list to always return 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()]); }