Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /svg/pservers/reftests/pattern-inheritance-template-pattern-removed.svg - WPT Dashboard Interop Dashboard
class="reftest-wait">
<title>SVG Pattern: Inherited pattern removed after style change</title>
<h:link rel="match" href="reference/green-100x100.svg"/>
<h:script src="/common/rendering-utils.js"/>
<h:script src="/common/reftest-wait.js"/>
<pattern id="pattern" width="1" height="1">
<rect width="100" height="100" fill="orange"/>
</pattern>
<pattern id="inheritedPattern" href="#pattern"/>
<rect width="100" height="100" fill="url(#inheritedPattern) green"/>
<script>
waitForAtLeastOneFrame().then(() => {
let svg = document.querySelector('svg');
let pattern = document.getElementById("pattern");
svg.style.imageRendering = 'pixelated';
getComputedStyle(svg).imageRendering;
pattern.remove();
takeScreenshot();
});
</script>
</svg>