LibWeb: Make sure finished animations are not restarted

This commit makes the StyleComputer avoid restarting finished animations
(e.g. animations with finite iteration counts that have run to
completion).
As a bonus, it also disables the animation timer when all animations
have finished running.
This commit is contained in:
Ali Mohammad Pur 2023-05-27 09:03:58 +03:30 committed by Andreas Kling
commit 2e71263c5c
Notes: sideshowbarker 2024-07-17 02:14:39 +09:00
2 changed files with 21 additions and 4 deletions

View file

@ -205,6 +205,7 @@ private:
};
mutable HashMap<AnimationKey, NonnullOwnPtr<Animation>> m_active_animations;
mutable HashTable<AnimationKey> m_finished_animations;
mutable RefPtr<Platform::Timer> m_animation_driver_timer;
};