From aca32e298d7b9589aaa38f33eef5642e89237d2f Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Tue, 27 Feb 2024 16:53:35 -0700 Subject: [PATCH] LibWeb: Expand shorthand properties in CSS @keyframes --- Userland/Libraries/LibWeb/CSS/StyleComputer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index 999c731703..a4077de91d 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -1956,9 +1956,11 @@ NonnullOwnPtr StyleComputer::make_rule_cache_for_casca continue; auto const& keyframe_style = static_cast(*keyframe_rule); - for (auto const& property : keyframe_style.properties()) { - animated_properties.set(property.property_id); - resolved_keyframe.resolved_properties.set(property.property_id, property.value); + for (auto const& it : keyframe_style.properties()) { + for_each_property_expanding_shorthands(it.property_id, it.value, [&](PropertyID shorthand_id, StyleValue const& shorthand_value) { + animated_properties.set(shorthand_id); + resolved_keyframe.resolved_properties.set(shorthand_id, NonnullRefPtr { shorthand_value }); + }); } keyframe_set->keyframes_by_key.insert(key, resolved_keyframe);