From 8e481f65f598759314fcccf3eaf6dacc7eb16e72 Mon Sep 17 00:00:00 2001 From: Aliaksandr Kalenik Date: Mon, 3 Mar 2025 20:09:42 +0100 Subject: [PATCH] LibWeb: Don't invalidate style of finished animations Removes lots of completely unnecessary work, especially when animated property affects layout. --- Libraries/LibWeb/DOM/Document.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index c6987c8b555..67137bb6492 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -1529,6 +1529,8 @@ void Document::update_animated_style_if_needed() } for (auto& animation : timeline->associated_animations()) { + if (animation->is_finished()) + continue; if (auto effect = animation->effect()) effect->update_computed_properties(); }