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/pservers/reftests/pattern-transform-03.svg
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml" class="reftest-wait">
<title>Pattern with 'transform' property added dynamically</title>
<h:link rel="match" href="reference/green-100x100.svg"/>
<h:script src="/common/reftest-wait.js"/>
<h:script src="/common/rendering-utils.js"/>
<pattern id="pat" width="100" height="100">
<rect x="25" y="25" width="75" height="75" fill="red"/>
<rect width="75" height="75" fill="green"/>
</pattern>
<rect width="100" height="100" fill="url(#pat)"/>
<script>
waitForAtLeastOneFrame().then(() => {
const pattern = document.getElementById('pat');
pattern.style.transform = 'translate(-25px, -25px) scale(2)';
takeScreenshot();
});
</script>
</svg>