mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
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.
This commit is contained in:
parent
4cdafea363
commit
d417b75683
Notes:
github-actions[bot]
2024-07-22 07:14:16 +00:00
Author: https://github.com/tcl3
Commit: d417b75683
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/758
3 changed files with 17 additions and 3 deletions
|
@ -0,0 +1,12 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue