layout/reftests/svg/gradient-live-01d.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

michael@0 1 <svg xmlns="http://www.w3.org/2000/svg"
michael@0 2 xmlns:xlink="http://www.w3.org/1999/xlink"
michael@0 3 class="reftest-wait" font-size="80">
michael@0 4
michael@0 5 <!-- Tests that gradients are live to stop addition. -->
michael@0 6
michael@0 7 <script>
michael@0 8 document.addEventListener("MozReftestInvalidate", addBlueStop, false);
michael@0 9
michael@0 10 function addBlueStop()
michael@0 11 {
michael@0 12 var stop = document.createElementNS("http://www.w3.org/2000/svg", "stop");
michael@0 13 stop.setAttribute("stop-color", "#0000dd");
michael@0 14 stop.setAttribute("offset", "0.5");
michael@0 15 document.getElementById("grad1").insertBefore(stop, document.getElementById("magenta"));
michael@0 16 document.documentElement.removeAttribute('class');
michael@0 17 }
michael@0 18
michael@0 19 </script>
michael@0 20
michael@0 21 <linearGradient id="grad1" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="0">
michael@0 22 <stop id="green" stop-color="#00dd00" offset="0"/>
michael@0 23 <stop id="magenta" stop-color="magenta" offset="1"/>
michael@0 24 </linearGradient>
michael@0 25 <rect x="20" y="20" width="440" height="80" fill="url(#grad1)" />
michael@0 26
michael@0 27 <linearGradient id="grad2" xlink:href="#grad1"/>
michael@0 28 <rect x="20" y="150" width="440" height="80" fill="url(#grad2)" />
michael@0 29 <text x="20" y="300" width="440" height="80" fill="url(#grad1)">gradiation</text>
michael@0 30 <text x="20" y="400" width="440" height="80" fill="url(#grad2)">gradiation</text>
michael@0 31
michael@0 32 </svg>

mercurial