1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:22:07 +00:00

LibWeb: Make invalidate_style() set child-needs-update on shadow hosts

This commit is contained in:
Andreas Kling 2022-03-15 20:45:58 +01:00
parent 03d6e1953f
commit b4bda4cdf3

View file

@ -181,6 +181,7 @@ void Node::invalidate_style()
if (node.has_children())
node.m_child_needs_style_update = true;
if (auto* shadow_root = node.is_element() ? static_cast<DOM::Element&>(node).shadow_root() : nullptr) {
node.m_child_needs_style_update = true;
shadow_root->m_needs_style_update = true;
if (shadow_root->has_children())
shadow_root->m_child_needs_style_update = true;