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/layout/reftests/svg/filters/dynamic-filtered-foreignObject-01.svg
<!--
Any copyright is dedicated to the Public Domain.
-->
<svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait">
<script>
function run_test() {
var fO = document.getElementById("fO");
fO.parentNode.removeChild(fO);
document.documentElement.removeAttribute("class");
}
document.addEventListener("MozReftestInvalidate", run_test);
setTimeout(run_test, 4000); // fallback for running outside reftest
</script>
<filter id="filter" x="0" y="0" width="150" height="150"
filterUnits="userSpaceOnUse"
primitiveUnits="userSpaceOnUse">
<feOffset dx="-50" dy="-50"/>
</filter>
<rect width="100%" height="100%" fill="lime"/>
<g filter="url(#filter)">
<foreignObject id="fO" x="50" y="50" width="100" height="100">
style="display:block; width:100%; height:100%; background:red;"/>
</foreignObject>
</g>
</svg>