layout/reftests/svg/stroke-width-percentage-03.xhtml

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!--
     3      Any copyright is dedicated to the Public Domain.
     4      http://creativecommons.org/publicdomain/zero/1.0/
     5 -->
     6 <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=875069 -->
     7 <!--
     8     This test checks that when the content area of the window resizes without
     9     any style change that we reflow stroked SVG elements that have
    10     'vector-effect' set to 'non-scaling-stroke' and that are under a
    11     transformed ancestor. We use an iframe to allow us to resize the content
    12     area of the embedded document without changing its style.
    14     This test should end up rendering a blue square, 100px by 50px.
    15 -->
    16 <html xmlns="http://www.w3.org/1999/xhtml"
    17       class="reftest-wait">
    18   <head>
    19     <style>
    21 #frame {
    22   /* width and height are given the same value since percentage stroke resolves
    23      as sqrt(width^2 + height^2).
    24   */
    25   width: 50px;
    26   height: 50px;
    27   border: 0;
    28 }
    30     </style>
    31     <script>
    33 function doTest() {
    34   document.getElementById("frame").style.width = "100px";
    35   document.getElementById("frame").style.height = "100px";
    36   document.documentElement.removeAttribute("class");
    37 }
    39 window.addEventListener("MozReftestInvalidate", doTest, false);
    40 setTimeout(doTest, 4000); // fallback for running outside reftest
    42     </script>
    43   </head>
    44   <body>
    45     <iframe id="frame" src="stroke-width-percentage-03-iframe.svg"></iframe>
    46   </body>
    47 </html>

mercurial