LibWeb: Remove broken anonymous table wrapper layout invalidation

The special case for anonymous table wrappers actually ended up hurting
correctness by preventing the full ancestor chain from being marked for
for intrinsic size cache invalidation.

Caused Layout/input/table/propagate-style-update-to-wrapper.html to
flake on CI, and was easy to reproduce locally with sanitizers.

The fix here is simply to remove the special handling of anonymous table
wrapper parents, since *all* parents are invalidated automatically
anyway!

Began flaking in fa9c463ffd.
This commit is contained in:
Andreas Kling 2025-04-23 23:49:12 +02:00 committed by Tim Flynn
parent fc1026984c
commit 26c48c16aa
Notes: github-actions[bot] 2025-04-23 23:44:29 +00:00

View file

@ -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<TableWrapper>(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>([&](Box& child) {
if (child.is_anonymous() && !is<TableWrapper>(child)) {
child.m_needs_layout_update = true;