blob: 1081b260f36f7c7fef2cb24f75472397606371c1 [file] [log] [blame]
<html xmlns="http://www.w3.org/1999/xhtml">
<body onload="window.setTimeout(resizeBox,0)">
<p>The svg area contained in the div element (red box), should fill out the whole area (two green rectangles, first: (0,0)-(50%,50%), second: (50%,50%)-(100%,100%)), especially after resizing the content box to a different size</p>
<div id="contentBox" style="width: 100px; height: 400px; border: 1px solid red;">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="targetSymbol" viewBox="0 0 200 200" width="50%" height="50%">
<rect x="50%" y="50%" width="50%" height="50%" fill="green"/>
<rect width="100" height="100" fill="green"/>
</symbol>
</defs>
<use xlink:href="#targetSymbol"/>
</svg>
</div>
<script>
if (window.layoutTestController)
layoutTestController.waitUntilDone();
function resizeBox() {
document.getElementById("contentBox").style.setProperty("width", "400px");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
</script>
</body>
</html>