1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:07:34 +00:00

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
parent e90752cc21
commit 2e71263c5c
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;
};