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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!--
     2      Any copyright is dedicated to the Public Domain.
     3      http://creativecommons.org/publicdomain/zero/1.0/
     4 -->
     5 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
     6   <head>
     8     <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
    10     <title>Test: change CSS 'height' property on inline SVG</title>
    12     <!--
    13     This testcase checks that when the value of the CSS 'height' property on
    14     inline SVG is changed, the SVG resizes as expected.
    15     -->
    17     <style type="text/css">
    19 html, body {
    20   padding: 0;
    21   border: 0;
    22   margin: 0;
    23   width: 100%;
    24   height: 100%;
    25   background: red;
    26 }
    28     </style>
    29     <script type="text/javascript">
    31 function resize_svg()
    32 {
    33   document.getElementById('svg').style.height = '100%';
    34   document.documentElement.removeAttribute('class');
    35 }
    37 document.addEventListener("MozReftestInvalidate", resize_svg, false);
    39     </script>
    40   </head>
    41   <body>
    43     <svg id="svg" xmlns="http://www.w3.org/2000/svg"
    44          style="display:block; width:100%; height:0;" width="0" height="0">
    45       <rect width="100%" height="100%" fill="lime"/>
    46     </svg>
    48   </body>
    49 </html>

mercurial