<!DOCTYPE html>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
runAfterLayoutAndPaint(function() {
document.getElementById('rr1').setAttribute('width', 0);
document.getElementById('rr2').setAttribute('width', -100);
if (window.testRunner)
testRunner.notifyDone();
});
</script>
<svg width="200" height="100">
<rect width="200" height="100" fill="green"/>
<rect id="rr1" width="100" height="100" rx="8" stroke="red" fill="red"/>
<rect id="rr2" width="100" height="100" rx="8" stroke="red" fill="red" x="100"/>
</svg>