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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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

mercurial