mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibWeb: Never split SVG foreignObject for inline continuations
This would produce a bizarre layout tree and certainly not yield expected results.
This commit is contained in:
parent
b4708510fb
commit
f343a418b2
Notes:
github-actions[bot]
2025-07-09 12:37:42 +00:00
Author: https://github.com/awesomekling
Commit: f343a418b2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5369
Reviewed-by: https://github.com/gmta ✅
2 changed files with 18 additions and 23 deletions
|
@ -1413,6 +1413,10 @@ bool NodeWithStyleAndBoxModelMetrics::should_create_inline_continuation() const
|
|||
if (is_svg_box())
|
||||
return false;
|
||||
|
||||
// SVGForeignObjectBoxes should never be split.
|
||||
if (is_svg_foreign_object_box())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,31 +1,22 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x316 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x300 children: not-inline
|
||||
BlockContainer <(anonymous)> at (8,8) content-size 784x100 children: inline
|
||||
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 100
|
||||
SVGSVGBox <svg> at (8,8) content-size 100x100 [SVG] children: inline
|
||||
BlockContainer <(anonymous)> at (8,108) content-size 784x100 children: not-inline continuation
|
||||
SVGForeignObjectBox <foreignObject> at (8,108) content-size 100x100 [BFC] children: not-inline
|
||||
BlockContainer <div> at (8,108) content-size 100x18 children: inline
|
||||
frag 0 from TextNode start: 0, length: 3, rect: [8,108 27.15625x18] baseline: 13.796875
|
||||
BlockContainer <html> at (0,0) content-size 800x116 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x100 children: inline
|
||||
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 100x100] baseline: 13.796875
|
||||
SVGSVGBox <svg> at (8,8) content-size 100x100 [SVG] children: not-inline
|
||||
SVGForeignObjectBox <foreignObject> at (8,8) content-size 100x100 [BFC] children: not-inline
|
||||
BlockContainer <div> at (8,8) content-size 100x18 children: inline
|
||||
frag 0 from TextNode start: 0, length: 3, rect: [8,8 27.15625x18] baseline: 13.796875
|
||||
"foo"
|
||||
TextNode <#text>
|
||||
BlockContainer <(anonymous)> at (8,208) content-size 784x100 children: inline
|
||||
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,208 100x100] baseline: 100
|
||||
SVGSVGBox <svg> at (8,208) content-size 100x100 [SVG] children: not-inline continuation
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x316]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x300]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x100]
|
||||
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,108 784x100]
|
||||
SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [8,108 100x100]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,108 100x18]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x116]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x100]
|
||||
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 100x100]
|
||||
SVGForeignObjectPaintable (SVGForeignObjectBox<foreignObject>) [8,8 100x100]
|
||||
PaintableWithLines (BlockContainer<DIV>) [8,8 100x18]
|
||||
TextPaintable (TextNode<#text>)
|
||||
PaintableWithLines (BlockContainer(anonymous)) [8,208 784x100]
|
||||
SVGSVGPaintable (SVGSVGBox<svg>) [8,208 100x100]
|
||||
|
||||
SC for Viewport<#document> [0,0 800x600] [children: 1] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x316] [children: 1] (z-index: auto)
|
||||
SC for SVGForeignObjectBox<foreignObject> [8,108 100x100] [children: 0] (z-index: auto)
|
||||
SC for BlockContainer<HTML> [0,0 800x116] [children: 1] (z-index: auto)
|
||||
SC for SVGForeignObjectBox<foreignObject> [8,8 100x100] [children: 0] (z-index: auto)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue