Status: PASS | Duration: 15ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/svg/layout/svg-with-percent-dimensions-relayout.html
<!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-percent-dimensions-relayout-ref.html"> <body> <span style="position:relative; font-size:100px;"> <br> <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>
/svg/layout/svg-with-percent-dimensions-relayout-ref.html
<!DOCTYPE html> <meta charset="utf-8"> <link rel="help" href="https://crbug.com/1016759"> <body> <span style="position:relative; font-size:100px;"> <br> <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="5px"/> </svg> </span> </body> </html>