layout/reftests/svg/sizing/dynamic--inline-css-width.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/svg/sizing/dynamic--inline-css-width.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,49 @@
     1.4 +<!--
     1.5 +     Any copyright is dedicated to the Public Domain.
     1.6 +     http://creativecommons.org/publicdomain/zero/1.0/
     1.7 +-->
     1.8 +<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
     1.9 +  <head>
    1.10 +
    1.11 +    <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
    1.12 +
    1.13 +    <title>Test: change CSS 'width' property on inline SVG</title>
    1.14 +
    1.15 +    <!--
    1.16 +    This testcase checks that when the value of the CSS 'width' property on
    1.17 +    inline SVG is changed, the SVG resizes as expected.
    1.18 +    -->
    1.19 +
    1.20 +    <style type="text/css">
    1.21 +
    1.22 +html, body {
    1.23 +  padding: 0;
    1.24 +  border: 0;
    1.25 +  margin: 0;
    1.26 +  width: 100%;
    1.27 +  height: 100%;
    1.28 +  background: red;
    1.29 +}
    1.30 +
    1.31 +    </style>
    1.32 +    <script type="text/javascript">
    1.33 +
    1.34 +function resize_svg()
    1.35 +{
    1.36 +  document.getElementById('svg').style.width = '100%';
    1.37 +  document.documentElement.removeAttribute('class');
    1.38 +}
    1.39 +
    1.40 +document.addEventListener("MozReftestInvalidate", resize_svg, false);
    1.41 +
    1.42 +    </script>
    1.43 +  </head>
    1.44 +  <body>
    1.45 +
    1.46 +    <svg id="svg" xmlns="http://www.w3.org/2000/svg"
    1.47 +         style="display:block; width:0; height:100%;" width="0" height="0">
    1.48 +      <rect width="100%" height="100%" fill="lime"/>
    1.49 +    </svg>
    1.50 +
    1.51 +  </body>
    1.52 +</html>

mercurial