mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
Per SVG2 spec (§ Geometry Properties: getBBox), getBBox() must throw InvalidStateError if the element is not rendered and its geometry cannot be computed. Previously we would crash on null paintables; now we throw with a clear error instead.
17 lines
386 B
HTML
17 lines
386 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<svg width="1" height="1">
|
|
<marker id="mk" markerWidth="1" markerHeight="1">
|
|
<circle id="t" cx="0" cy="0" r="0"></circle>
|
|
</marker>
|
|
</svg>
|
|
<script>
|
|
test(() => {
|
|
try {
|
|
document.getElementById("t").getBBox();
|
|
println("Did not throw");
|
|
} catch (e) {
|
|
println(`Threw ${e.name}`);
|
|
}
|
|
});
|
|
</script> |