1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 22:07:35 +00:00

LibWeb: Size SVG G container according to children

The SVG G container should have the same size as its children. This
fixes a bug when there was an opacity value on the G element, as in
StackingContext it would try and get a bitmap of the element which would
be empty due to it having no size.
This commit is contained in:
martinfalisse 2023-08-16 17:45:49 +02:00 committed by Andreas Kling
parent 258af0fb1b
commit f2047a5c32
5 changed files with 71 additions and 7 deletions

View file

@ -4,7 +4,7 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
line 0 width: 24, height: 24, bottom: 24, baseline: 24
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 24x24]
SVGSVGBox <svg> at (8,8) content-size 24x24 [SVG] children: inline
SVGGraphicsBox <g> at (8,8) content-size 0x0 children: inline
SVGGraphicsBox <g> at (8,8) content-size 24x24 children: inline
SVGSVGBox <svg> at (8,8) content-size 24x24 [SVG] children: not-inline
SVGGeometryBox <rect> at (8,8) content-size 24x24 children: not-inline
TextNode <#text>
@ -13,6 +13,6 @@ PaintableWithLines (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x40]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x24]
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 24x24]
SVGGraphicsPaintable (SVGGraphicsBox<g>) [8,8 0x0]
SVGGraphicsPaintable (SVGGraphicsBox<g>) [8,8 24x24]
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 24x24]
SVGGeometryPaintable (SVGGeometryBox<rect>) [8,8 24x24]