1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:37:36 +00:00

LibWeb: Make sure that SVG use and symbol elements get paintables

I'm about to make StackingContext traverse the paintable tree instead of
actually traversing the layout tree, and it turns out we were not
creating paintables for these SVG elements.

Also switch them to Layout::Box instead of the default InlineNode to
make the trees look a bit less weird. Ultimately, we should do something
specialized for these subtrees, but for now this'll do.
This commit is contained in:
Andreas Kling 2023-08-19 19:42:31 +02:00
parent 3d7c880a42
commit 1e0ea45fe5
6 changed files with 45 additions and 13 deletions

View file

@ -10,8 +10,8 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
TextNode <#text>
SVGSVGBox <svg> at (8,8) content-size 300x150 [SVG] children: inline
TextNode <#text>
InlineNode <use>
InlineNode <symbol#braces>
Box <use> at (8,8) content-size 0x0 children: inline
Box <symbol#braces> at (8,8) content-size 0x0 children: inline
TextNode <#text>
SVGGeometryBox <path> at (92.375,26.75) content-size 131.25x112.15625 children: inline
TextNode <#text>
@ -25,3 +25,6 @@ ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x0]
PaintableWithLines (BlockContainer<DIV>) [8,8 784x150]
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 300x150]
PaintableBox (Box<use>) [8,8 0x0]
PaintableBox (Box<symbol>#braces) [8,8 0x0]
SVGGeometryPaintable (SVGGeometryBox<path>) [92.375,26.75 131.25x112.15625]