mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:27:35 +00:00

Rather than try to lay out masks normally, this updates the TreeBuilder to create layout nodes for masks as a child of their user (i.e. the masked element). This allows each use of a mask to be laid out differently, which makes supporting `maskContentUnits=objectBoundingBox` fairly easy. The `SVGFormattingContext` is then updated to lay out masks last (as their sizing may depend on their parent), and treats them like viewports. This is pretty ad-hoc, but the SVG specification does not give any guidance on how to actually implement this.
29 lines
1.7 KiB
Text
29 lines
1.7 KiB
Text
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
|
BlockContainer <body> at (8,8) content-size 784x150 children: not-inline
|
|
BlockContainer <(anonymous)> at (8,8) content-size 784x0 children: inline
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
BlockContainer <div> at (8,8) content-size 784x150 children: inline
|
|
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 300x150] baseline: 150
|
|
TextNode <#text>
|
|
SVGSVGBox <svg> at (8,8) content-size 300x150 [SVG] children: inline
|
|
TextNode <#text>
|
|
SVGGraphicsBox <use> at (8,8) content-size 300x150 children: not-inline
|
|
SVGGraphicsBox <symbol#braces> at (92.375,26.75) content-size 131.25x112.15625 [BFC] children: inline
|
|
TextNode <#text>
|
|
SVGGeometryBox <path> at (92.375,26.75) content-size 131.25x112.15625 children: inline
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
|
|
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<BODY>) [8,8 784x150]
|
|
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
|
|
PaintableWithLines (BlockContainer<DIV>) [8,8 784x150]
|
|
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150]
|
|
SVGGraphicsPaintable (SVGGraphicsBox<use>) [8,8 300x150]
|
|
SVGGraphicsPaintable (SVGGraphicsBox<symbol>#braces) [92.375,26.75 131.25x112.15625]
|
|
SVGPathPaintable (SVGGeometryBox<path>) [92.375,26.75 131.25x112.15625]
|