layout/reftests/svg/sizing/dynamic--inline-resize-window-width.xhtml

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

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: resize of window width</title>
michael@0 11
michael@0 12 <!--
michael@0 13 This testcase checks that SVG embedded inline with a percentage width is
michael@0 14 updated correctly when the window is resized.
michael@0 15 -->
michael@0 16
michael@0 17 <style type="text/css">
michael@0 18
michael@0 19 html, body, div {
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 overflow: hidden;
michael@0 27 }
michael@0 28
michael@0 29 </style>
michael@0 30 <script type="text/javascript">
michael@0 31
michael@0 32 var initial_width = top.innerWidth;
michael@0 33 top.innerWidth /= 2;
michael@0 34
michael@0 35 function restore_width()
michael@0 36 {
michael@0 37 top.innerWidth = initial_width;
michael@0 38 document.documentElement.removeAttribute('class');
michael@0 39 }
michael@0 40
michael@0 41 document.addEventListener("MozReftestInvalidate", restore_width, false);
michael@0 42
michael@0 43 </script>
michael@0 44 </head>
michael@0 45 <body onload="restore_width()">
michael@0 46
michael@0 47 <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="5000">
michael@0 48 <rect width="100%" height="100%" fill="lime"/>
michael@0 49 </svg>
michael@0 50
michael@0 51 </body>
michael@0 52 </html>

mercurial