layout/reftests/svg/gradient-live-01b.svg

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

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 <script type="application/javascript">
michael@0 6 document.addEventListener("MozReftestInvalidate", doTest, false);
michael@0 7
michael@0 8 function doTest() {
michael@0 9 document.getElementById('blue').setAttribute('offset', '0.5');
michael@0 10 document.documentElement.removeAttribute('class');
michael@0 11 }
michael@0 12 </script>
michael@0 13
michael@0 14 <!-- Tests that gradients are live to stop offset changes. -->
michael@0 15
michael@0 16 <linearGradient id="grad1" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="0">
michael@0 17 <stop id="green" stop-color="#00dd00" offset="0"/>
michael@0 18 <stop id="blue" stop-color="#0000dd" offset="0.9"/>
michael@0 19 <stop id="magenta" stop-color="magenta" offset="1"/>
michael@0 20 </linearGradient>
michael@0 21 <rect x="20" y="20" width="440" height="80" fill="url(#grad1)" />
michael@0 22
michael@0 23 <linearGradient id="grad2" xlink:href="#grad1"/>
michael@0 24 <rect x="20" y="150" width="440" height="80" fill="url(#grad2)" />
michael@0 25 <text x="20" y="300" width="440" height="80" fill="url(#grad1)">gradiation</text>
michael@0 26 <text x="20" y="400" width="440" height="80" fill="url(#grad2)">gradiation</text>
michael@0 27
michael@0 28 </svg>

mercurial