LibWeb/CSS: Make content property change require full invalidation

`content` determines the element or pseudo-element's layout, including
its children.
This commit is contained in:
Sam Atkins 2024-07-30 15:48:27 +01:00 committed by Alexander Kalenik
parent 4a166a45ec
commit d58c1c1176
Notes: github-actions[bot] 2024-07-31 10:16:40 +00:00

View file

@ -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();
}