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.
31 lines
1.7 KiB
Text
31 lines
1.7 KiB
Text
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
|
BlockContainer <html> at (0,0) content-size 800x416 [BFC] children: not-inline
|
|
BlockContainer <body> at (8,8) content-size 784x400 children: inline
|
|
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 400x400] baseline: 400
|
|
SVGSVGBox <svg> at (8,8) content-size 400x400 [SVG] children: inline
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
SVGGeometryBox <rect> at (8,8) content-size 200x200 children: not-inline
|
|
SVGMaskBox <mask#myMask> at (8,8) content-size 200x200 children: inline
|
|
TextNode <#text>
|
|
SVGGeometryBox <rect> at (8,8) content-size 200x200 children: not-inline
|
|
TextNode <#text>
|
|
SVGGeometryBox <circle> at (26.75,26.75) content-size 162.5x162.5 children: not-inline
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
SVGGeometryBox <rect> at (208,208) content-size 200x100 children: not-inline
|
|
SVGMaskBox <mask#myMask> at (208,208) content-size 200x100 children: inline
|
|
TextNode <#text>
|
|
SVGGeometryBox <rect> at (208,208) content-size 200x100 children: not-inline
|
|
TextNode <#text>
|
|
SVGGeometryBox <circle> at (226.75,217.375) content-size 162.5x81.25 children: not-inline
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
TextNode <#text>
|
|
|
|
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
|
PaintableWithLines (BlockContainer<HTML>) [0,0 800x416]
|
|
PaintableWithLines (BlockContainer<BODY>) [8,8 784x400]
|
|
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 400x400]
|
|
SVGPathPaintable (SVGGeometryBox<rect>) [8,8 200x200]
|
|
SVGPathPaintable (SVGGeometryBox<rect>) [208,208 200x100]
|