LibWeb: Make layout code aware that we create BFC for foreignObject

We were already always doing this, but through an unusual mechanism:
SVG layout creates a BFC on the stack when laying out foreignObject
subtrees.

This change makes the rest of the layout system aware of this, and
also allows it to be reflected in layout dumps.
This commit is contained in:
Andreas Kling 2025-07-06 15:02:51 +02:00 committed by Andreas Kling
commit 07838016c8
Notes: github-actions[bot] 2025-07-09 12:38:13 +00:00
2 changed files with 5 additions and 1 deletions

View file

@ -37,6 +37,10 @@ bool FormattingContext::creates_block_formatting_context(Box const& box)
if (box.is_replaced_box())
return false;
// AD-HOC: We create a BFC for SVG foreignObject.
if (box.is_svg_foreign_object_box())
return true;
// display: table
if (box.display().is_table_inside()) {
return false;