layout/reftests/svg/dynamic-clipPath-02.svg

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 <!--
     2      Any copyright is dedicated to the Public Domain.
     3      http://creativecommons.org/publicdomain/zero/1.0/
     4 -->
     5 <svg xmlns="http://www.w3.org/2000/svg" version="1.1"
     6      class="reftest-wait"
     7      onload="startTest()"
     8      xmlns:xlink="http://www.w3.org/1999/xlink">
     9   <title>Testing that dynamic changes to the clipPathUnits are reflected in the clipPath</title>
    11   <defs>
    12     <clipPath id="clip1" clipPathUnits="objectBoundingBox">
    13       <rect width=".1" height=".1"/>
    14     </clipPath>
    15   </defs>
    17   <rect width="100%" height="100%" fill="lime"/>
    19   <g transform="scale(1000)">
    20     <rect x=".2" y=".2" width=".6" height=".6" fill="red" clip-path="url(#clip1)"/>
    21   </g>
    23   <script>
    24     function startTest() {
    25       document.addEventListener("MozReftestInvalidate", doTest, false);
    26       setTimeout(doTest, 4000); // fallback for running outside reftest
    27     }
    29     function doTest() {
    30       var clip1 = document.getElementById("clip1");
    31       clip1.clipPathUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE;
    33       document.documentElement.removeAttribute("class");
    34     }
    35   </script>
    36 </svg>

mercurial