From 154b4d41965e96f6dfa62a4fa3a02149c899ef24 Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Sun, 4 Feb 2024 14:13:16 -0700 Subject: [PATCH] LibWeb: Invalidate style of animation targets in update_finished_state --- Userland/Libraries/LibWeb/Animations/Animation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Userland/Libraries/LibWeb/Animations/Animation.cpp b/Userland/Libraries/LibWeb/Animations/Animation.cpp index 0d47a72b2f..1c5adc7dbe 100644 --- a/Userland/Libraries/LibWeb/Animations/Animation.cpp +++ b/Userland/Libraries/LibWeb/Animations/Animation.cpp @@ -591,6 +591,12 @@ void Animation::update_finished_state(DidSeek did_seek, SynchronouslyNotify sync m_current_finished_promise = WebIDL::create_promise(realm()); m_current_finished_promise_resolved = false; } + + // Invalidate the style of our target element, if applicable + if (m_effect) { + if (auto target = m_effect->target()) + target->invalidate_style(); + } } JS::NonnullGCPtr Animation::current_ready_promise() const