1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:17:45 +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:
Aliaksandr Kalenik 2023-12-16 18:54:50 +01:00 committed by Andreas Kling
parent 4c81414b14
commit 2753075830
3 changed files with 39 additions and 5 deletions

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<svg width="200" height="200">
<mask id="myMask" maskContentUnits="objectBoundingBox">
<rect x="0" y="0" width="1" height="1" fill="white"/>
<circle cx="0.5" cy="0.5" r="0.4" fill="black"/>
</mask>
<rect x="0" y="0" width="200" height="200" fill="green" mask="url(#myMask)"/>
</svg>