ladybird/Tests/LibWeb/Text/input/SVG/svg-getbbox-transform-with-no-inverse.html
Tim Ledbetter d417b75683 LibWeb/SVG: Ensure SVG transform has an inverse before using it
This avoids a crash that occurred when calling `getBBox()` on an SVG
element that had a transform with no inverse.

Found by Domato.
2024-07-22 09:13:25 +02:00

12 lines
373 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<svg xmlns="http://www.w3.org/2000/svg">
<rect id="rectElement" x="0" y="0" width="100" height="100" transform="scale(0)" />
</svg>
<script>
test(() => {
const rectElement = document.getElementById("rectElement");
rectElement.getBBox();
println("PASS (didn't crash)");
});
</script>