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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/svg/stroke-width-percentage-03.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!--
     1.6 +     Any copyright is dedicated to the Public Domain.
     1.7 +     http://creativecommons.org/publicdomain/zero/1.0/
     1.8 +-->
     1.9 +<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=875069 -->
    1.10 +<!--
    1.11 +    This test checks that when the content area of the window resizes without
    1.12 +    any style change that we reflow stroked SVG elements that have
    1.13 +    'vector-effect' set to 'non-scaling-stroke' and that are under a
    1.14 +    transformed ancestor. We use an iframe to allow us to resize the content
    1.15 +    area of the embedded document without changing its style.
    1.16 +
    1.17 +    This test should end up rendering a blue square, 100px by 50px.
    1.18 +-->
    1.19 +<html xmlns="http://www.w3.org/1999/xhtml"
    1.20 +      class="reftest-wait">
    1.21 +  <head>
    1.22 +    <style>
    1.23 +
    1.24 +#frame {
    1.25 +  /* width and height are given the same value since percentage stroke resolves
    1.26 +     as sqrt(width^2 + height^2).
    1.27 +  */
    1.28 +  width: 50px;
    1.29 +  height: 50px;
    1.30 +  border: 0;
    1.31 +}
    1.32 +
    1.33 +    </style>
    1.34 +    <script>
    1.35 +
    1.36 +function doTest() {
    1.37 +  document.getElementById("frame").style.width = "100px";
    1.38 +  document.getElementById("frame").style.height = "100px";
    1.39 +  document.documentElement.removeAttribute("class");
    1.40 +}
    1.41 +
    1.42 +window.addEventListener("MozReftestInvalidate", doTest, false);
    1.43 +setTimeout(doTest, 4000); // fallback for running outside reftest
    1.44 +
    1.45 +    </script>
    1.46 +  </head>
    1.47 +  <body>
    1.48 +    <iframe id="frame" src="stroke-width-percentage-03-iframe.svg"></iframe>
    1.49 +  </body>
    1.50 +</html>

mercurial