Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

SVG Preview (Scaled)

Preview of https://hg.mozilla.org/mozilla-central/raw-file/tip/testing/web-platform/tests/svg/path/error-handling/bounding.svg
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<h:meta name="assert" content="render up to (but not including) the first error"/>
</metadata>
<g id="container">
<path transform="translate(90,10)" />
<path transform="translate(80,20)" d="none" />
<path transform="translate(70,30)" d="# invalid" />
<path transform="translate(60,40)" d="m 0 0 l 3 -4 z # ignored suffix v 123" />
<path transform="translate(50,50)" d="" />
<path transform="translate(40,60)" d="m 0 0 l -9 11 -123 z # ignore last l parameter" />
<polygon transform="translate(20,80)" />
<polyline transform="translate(10,90)" />
</g>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<script><![CDATA[
test(function() {
var container = document.getElementById('container');
var bbox = container.getBBox();
// The rendered paths are "m 0 0 l 3 -4 z" and "m 0 0 l -9 11"
assert_equals(bbox.x, 31);
assert_equals(bbox.y, 36);
assert_equals(bbox.width, 32);
assert_equals(bbox.height, 35);
});
]]></script>
</svg>