<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<svg>
<defs>
<rect id="r" x="100" y="50" width="100" height="100" fill="green"/>
</defs>
<rect width="100" height="100" fill="red"/>
<use href="#r" x="100" y="100" style="y: -50px"/>
</svg>
<script>
runAfterLayoutAndPaint(function() {
document.querySelector('use').style.x = '-100px';
}, true);
</script>