Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<meta charset="utf-8">
<title>
Ensure SVGs with percentage dimensions do not overflow auto-sized parents on
child-initiated re-layout.
</title>
<link rel="help" href="https://crbug.com/1016759">
<link rel=match href="svg-with-precent-dimensions-relayout-ref.html">
<body>
<span style="position:relative; font-size:100px;">
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<svg style="position:absolute; border:1px solid black; width:100%; height:100%;">
<rect x="10" y="10" width="100" height="100" fill="red" id="child" stroke="blue" stroke-width="20px"/>
</svg>
</span>
</body>
<script>
document.body.offsetTop;
document.getElementById("child").setAttribute('stroke-width', '5px');
</script>
</html>