From 62739c30d90a7c978e2a0cc9ad684751a07950b6 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Wed, 28 May 2025 15:18:39 +0200 Subject: [PATCH] LibWeb: Schedule required invalidations when animation effect is removed For example, if layout affecting property is animated then once this animation is removed we need to schduled layout invalidation. --- Libraries/LibWeb/Animations/Animation.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/LibWeb/Animations/Animation.cpp b/Libraries/LibWeb/Animations/Animation.cpp index 2005d9d9e4f..9442943fdfa 100644 --- a/Libraries/LibWeb/Animations/Animation.cpp +++ b/Libraries/LibWeb/Animations/Animation.cpp @@ -91,6 +91,10 @@ void Animation::set_effect(GC::Ptr new_effect) m_effect->set_associated_animation({}); m_effect = new_effect; + // Once animated properties of the old effect no longer apply, we need to ensure appropriate invalidations are scheduled + if (old_effect) + old_effect->update_computed_properties(); + // 7. Run the procedure to update an animation’s finished state for animation with the did seek flag set to false, // and the synchronously notify flag set to false. update_finished_state(DidSeek::No, SynchronouslyNotify::No);