layout/reftests/svg/sizing/dynamic--inline-resize-window-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

     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: resize of window height</title>
    12     <!--
    13     This testcase checks that SVG embedded inline with a percentage height is
    14     updated correctly when the window is resized.
    15     -->
    17     <style type="text/css">
    19 html, body, div {
    20   padding: 0;
    21   border: 0;
    22   margin: 0;
    23   width: 100%;
    24   height: 100%;
    25   background: red;
    26   overflow: hidden;
    27 }
    29     </style>
    30     <script type="text/javascript">
    32 var initial_height = top.innerHeight;
    33 top.innerHeight /= 2;
    35 function restore_height()
    36 {
    37   top.innerHeight = initial_height;
    38   document.documentElement.removeAttribute('class');
    39 }
    41 document.addEventListener("MozReftestInvalidate", restore_height, false);
    43     </script>
    44   </head>
    45   <body>
    47     <svg xmlns="http://www.w3.org/2000/svg" width="5000" height="100%">
    48       <rect width="100%" height="100%" fill="lime"/>
    49     </svg>
    51   </body>
    52 </html>

mercurial