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.
This commit is contained in:
Aliaksandr Kalenik 2025-05-28 15:18:39 +02:00 committed by Tim Ledbetter
commit 62739c30d9
Notes: github-actions[bot] 2025-05-28 16:37:12 +00:00

View file

@ -91,6 +91,10 @@ void Animation::set_effect(GC::Ptr<AnimationEffect> 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 animations 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);