LibWeb: Do not create an anonymous container for table cells by default

We were always creating an anonymous container for the inline contents
of table cells, but the layout node we spawn for the table cells
themselves already is capable of dealing with inline nodes. Regular
logic should kick in for dealing with the block/inline node invariant.
This commit is contained in:
Jelle Raaijmakers 2025-07-15 09:10:14 +02:00 committed by Andreas Kling
commit edca2ab666
Notes: github-actions[bot] 2025-07-15 08:07:40 +00:00
74 changed files with 1660 additions and 2309 deletions

View file

@ -83,11 +83,8 @@ static Layout::Node& insertion_parent_for_inline_node(Layout::NodeWithStyle& lay
if (layout_parent.display().is_inline_outside() && layout_parent.display().is_flow_inside())
return layout_parent;
if (layout_parent.display().is_flex_inside()
|| layout_parent.display().is_grid_inside()
|| layout_parent.display().is_table_cell()) {
if (layout_parent.display().is_flex_inside() || layout_parent.display().is_grid_inside())
return last_child_creating_anonymous_wrapper_if_needed(layout_parent);
}
if (!has_in_flow_block_children(layout_parent) || layout_parent.children_are_inline())
return layout_parent;