mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:47:36 +00:00
LibWeb: Do not crash when svg mask calculation failed
Currently `calculate_mask()` fails to create bitmap when `maskContentUnits="objectBoundingBox"` is present. Fixes https://github.com/SerenityOS/serenity/issues/22316
This commit is contained in:
parent
4c81414b14
commit
2753075830
3 changed files with 39 additions and 5 deletions
23
Tests/LibWeb/Layout/expected/svg/objectBoundingBox-mask.txt
Normal file
23
Tests/LibWeb/Layout/expected/svg/objectBoundingBox-mask.txt
Normal file
|
@ -0,0 +1,23 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x216 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x200 children: inline
|
||||
line 0 width: 200, height: 200, bottom: 200, baseline: 200
|
||||
frag 0 from SVGSVGBox start: 0, length: 0, rect: [8,8 200x200]
|
||||
SVGSVGBox <svg> at (8,8) content-size 200x200 [SVG] children: inline
|
||||
TextNode <#text>
|
||||
SVGGraphicsBox <mask#myMask> at (8,8) content-size 1x1 children: inline
|
||||
TextNode <#text>
|
||||
SVGGeometryBox <rect> at (8,8) content-size 1x1 children: not-inline
|
||||
TextNode <#text>
|
||||
SVGGeometryBox <circle> at (8.09375,8.09375) content-size 0.796875x0.796875 children: not-inline
|
||||
TextNode <#text>
|
||||
TextNode <#text>
|
||||
SVGGeometryBox <rect> at (8,8) content-size 200x200 children: not-inline
|
||||
TextNode <#text>
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x216]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x200]
|
||||
SVGSVGPaintable (SVGSVGBox<svg>) [8,8 200x200]
|
||||
SVGPathPaintable (SVGGeometryBox<rect>) [8,8 200x200]
|
Loading…
Add table
Add a link
Reference in a new issue