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
406 B
HTML
17 lines
406 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<svg width="1" height="1">
|
|
<pattern id="pat" width="1" height="1" patternUnits="userSpaceOnUse">
|
|
<rect id="tp" width="1" height="1"></rect>
|
|
</pattern>
|
|
</svg>
|
|
<script>
|
|
test(() => {
|
|
try {
|
|
document.getElementById("tp").getBBox();
|
|
println("Did not throw");
|
|
} catch (e) {
|
|
println(`Threw ${e.name}`);
|
|
}
|
|
});
|
|
</script> |