Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
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>