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