From 7df4365e405410bff267644e0a5c1d7b3d76faac Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 4 Sep 2024 10:14:36 +0200 Subject: [PATCH] LibWeb: Only invalidate style & DOM version if attribute really changes When setting an element attribute to the value it already had, we don't need to update style or invalidate anything that depends on the DOM version counter. This was a source of much pointless busywork. --- Userland/Libraries/LibWeb/DOM/Element.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index 147cf810623..d2ffe400089 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -448,9 +448,11 @@ void Element::run_attribute_change_steps(FlyString const& local_name, Optional const&, Optional const& value)