LibWeb: Favour !important property values over animated values

This commit is contained in:
Callum Law 2025-10-27 02:06:01 +13:00 committed by Sam Atkins
parent c8f345356e
commit 76dadd45d6
Notes: github-actions[bot] 2025-10-27 09:52:58 +00:00
3 changed files with 159 additions and 1 deletions

View file

@ -169,7 +169,8 @@ StyleValue const& ComputedProperties::property(PropertyID property_id, WithAnima
{
VERIFY(property_id >= first_longhand_property_id && property_id <= last_longhand_property_id);
if (return_animated_value == WithAnimationsApplied::Yes) {
// Important properties override animated properties
if (!is_property_important(property_id) && return_animated_value == WithAnimationsApplied::Yes) {
if (auto animated_value = m_animated_property_values.get(property_id); animated_value.has_value())
return *animated_value.value();
}