mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +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:
parent
e90752cc21
commit
2e71263c5c
Notes:
sideshowbarker
2024-07-17 02:14:39 +09:00
Author: https://github.com/alimpfard
Commit: 2e71263c5c
Pull-request: https://github.com/SerenityOS/serenity/pull/19050
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/Lubrsi
2 changed files with 21 additions and 4 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue