diff --git a/Userland/Libraries/LibWeb/CSS/StyleInvalidation.cpp b/Userland/Libraries/LibWeb/CSS/StyleInvalidation.cpp index a9e663641e8..1e310416c6e 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleInvalidation.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleInvalidation.cpp @@ -17,9 +17,9 @@ RequiredInvalidationAfterStyleChange compute_property_invalidation(CSS::Property if (!property_value_changed) return invalidation; - // NOTE: If the computed CSS display/content-visibility property changes, we have to rebuild the entire layout tree. + // NOTE: If the computed CSS display, content, or content-visibility property changes, we have to rebuild the entire layout tree. // In the future, we should figure out ways to rebuild a smaller part of the tree. - if (property_id == CSS::PropertyID::Display || property_id == CSS::PropertyID::ContentVisibility) { + if (AK::first_is_one_of(property_id, CSS::PropertyID::Display, CSS::PropertyID::Content, CSS::PropertyID::ContentVisibility)) { return RequiredInvalidationAfterStyleChange::full(); }