diff --git a/Libraries/LibWeb/Layout/Node.cpp b/Libraries/LibWeb/Layout/Node.cpp index 64971c5918f..8a577261dc3 100644 --- a/Libraries/LibWeb/Layout/Node.cpp +++ b/Libraries/LibWeb/Layout/Node.cpp @@ -1295,12 +1295,8 @@ void Node::set_needs_layout_update(DOM::SetNeedsLayoutReason reason) m_needs_layout_update = true; - // If this node has generated an anonymous table wrapper, mark the wrapper for layout update. - if (display().is_table_inside() && parent() && is(parent())) { - parent()->m_needs_layout_update = true; - } - - // And mark any other anonymous boxes generated by this node for layout update as well. + // Mark any anonymous children generated by this node for layout update. + // NOTE: if this node generated an anonymous parent, all ancestors are indiscriminately marked below. for_each_child_of_type([&](Box& child) { if (child.is_anonymous() && !is(child)) { child.m_needs_layout_update = true;