From 5c2fe1277250756b70614bc9a6aca191d69b4ca2 Mon Sep 17 00:00:00 2001 From: Callum Law Date: Fri, 22 Aug 2025 16:43:56 +1200 Subject: [PATCH] LibWeb: Don't consider null -> null as a change for invalidation This avoids excessive invalidation within `recompute_inherited_style` where we inherit a value but not an animated value. --- Libraries/LibWeb/CSS/StyleInvalidation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/CSS/StyleInvalidation.cpp b/Libraries/LibWeb/CSS/StyleInvalidation.cpp index 3fc9defa209..f4bd5ef063a 100644 --- a/Libraries/LibWeb/CSS/StyleInvalidation.cpp +++ b/Libraries/LibWeb/CSS/StyleInvalidation.cpp @@ -15,7 +15,7 @@ RequiredInvalidationAfterStyleChange compute_property_invalidation(CSS::Property { RequiredInvalidationAfterStyleChange invalidation; - bool const property_value_changed = (!old_value || !new_value) || *old_value != *new_value; + bool const property_value_changed = (old_value || new_value) && ((!old_value || !new_value) || *old_value != *new_value); if (!property_value_changed) return invalidation;