mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
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:
parent
0cf9a4543a
commit
07838016c8
Notes:
github-actions[bot]
2025-07-09 12:38:13 +00:00
Author: https://github.com/awesomekling
Commit: 07838016c8
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5369
Reviewed-by: https://github.com/gmta ✅
2 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue