LibWeb: Wrap inline children of table-cell in anonymous block

This fixes an issue where CSS vertical-align on a table-cell box would
incorrectly apply to both the table-cell box and any inline content it
had inside.
This commit is contained in:
Andreas Kling 2025-02-25 20:28:44 +01:00 committed by Andreas Kling
commit 7d4d7da28a
Notes: github-actions[bot] 2025-02-25 22:56:53 +00:00
72 changed files with 2275 additions and 1630 deletions

View file

@ -81,8 +81,11 @@ 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())
if (layout_parent.display().is_flex_inside()
|| layout_parent.display().is_grid_inside()
|| layout_parent.display().is_table_cell()) {
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;