LibWeb: Always update computed properties for finished animations

If an animation got to its finished state before its target's computed
properties could be updated, we would end up with invalid styles. Do not
skip finished animations, but prevent effect invalidation on timeline
updates if the animation is already finished.

This fixes the CI flake on WPT test
`css/css-transitions/inherit-height-transition.html`.
This commit is contained in:
Jelle Raaijmakers 2025-08-26 14:23:30 +02:00 committed by Jelle Raaijmakers
parent 13cba5ecb4
commit 84c4eb7aa9
Notes: github-actions[bot] 2025-08-26 16:49:03 +00:00
3 changed files with 10 additions and 10 deletions

View file

@ -1574,11 +1574,10 @@ void Document::update_animated_style_if_needed()
for (auto& timeline : m_associated_animation_timelines) {
for (auto& animation : timeline->associated_animations()) {
if (animation->is_idle() || animation->is_finished())
if (animation->is_idle())
continue;
if (auto effect = animation->effect()) {
if (auto effect = animation->effect())
effect->update_computed_properties(context);
}
}
}