mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 03:25:13 +00:00
LibWeb: Don't invalidate style for animations in idle state
This commit is contained in:
parent
b92a8553c7
commit
80c0a16597
Notes:
github-actions[bot]
2025-03-04 17:37:09 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/80c0a16597c Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3800
2 changed files with 3 additions and 1 deletions
|
@ -66,6 +66,8 @@ public:
|
|||
GC::Ref<WebIDL::Promise> finished() const { return current_finished_promise(); }
|
||||
bool is_finished() const { return m_is_finished; }
|
||||
|
||||
bool is_idle() const { return play_state() == Bindings::AnimationPlayState::Idle; }
|
||||
|
||||
GC::Ptr<WebIDL::CallbackType> onfinish();
|
||||
void set_onfinish(GC::Ptr<WebIDL::CallbackType>);
|
||||
GC::Ptr<WebIDL::CallbackType> oncancel();
|
||||
|
|
|
@ -1522,7 +1522,7 @@ void Document::update_animated_style_if_needed()
|
|||
|
||||
for (auto& timeline : m_associated_animation_timelines) {
|
||||
for (auto& animation : timeline->associated_animations()) {
|
||||
if (animation->is_finished())
|
||||
if (animation->is_idle() || animation->is_finished())
|
||||
continue;
|
||||
if (auto effect = animation->effect()) {
|
||||
if (auto* target = effect->target())
|
||||
|
|
Loading…
Add table
Reference in a new issue