diff --git a/Userland/Libraries/LibWeb/DOM/Node.cpp b/Userland/Libraries/LibWeb/DOM/Node.cpp index dcea0438c0..ee91ec5e25 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.cpp +++ b/Userland/Libraries/LibWeb/DOM/Node.cpp @@ -188,11 +188,8 @@ void Node::invalidate_style() } return IterationDecision::Continue; }); - for (auto* ancestor = parent_or_shadow_host(); ancestor; ancestor = parent_or_shadow_host()) { - if (ancestor->m_child_needs_style_update) - break; + for (auto* ancestor = parent_or_shadow_host(); ancestor; ancestor = ancestor->parent_or_shadow_host()) ancestor->m_child_needs_style_update = true; - } document().schedule_style_update(); }