summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/layout/svg-with-precent-dimensions-relayout.html
blob: 9d04f412b70ad3038bde08b31bf981b7f65619bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!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>