Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / js-late-gradient-creation.svg
blob858239200fe53054c9c45f2e3b08025d41a5c5e8
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="runRepaintAndPixelTest()">
4 <script xlink:href="../../fast/repaint/resources/text-based-repaint.js"/>
5 <g id="content" transform="scale(1, 1.5)">
6 <text font-size="68" fill="url(#dynGrad)" x="20" y="70">Gradient on fill</text>
7 </g>
8 <script>
9 window.testIsAsync = true;
10 var content = document.getElementById("content");
12 function repaintTest() {
13 // FIXME: we need a better way of waiting for layout/repainting to happen
14 setTimeout(createGradient, 1);
17 function createGradient()
19 var gradient = document.createElementNS("http://www.w3.org/2000/svg", "linearGradient");
20 gradient.setAttribute("id", "dynGrad");
21 gradient.setAttribute("x1", "0");
22 gradient.setAttribute("x2", "1");
24 var stop1 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
25 stop1.setAttribute("stop-color", "blue");
26 stop1.setAttribute("offset", "0");
28 var stop2 = document.createElementNS("http://www.w3.org/2000/svg", "stop");
29 stop2.setAttribute("stop-color", "red");
30 stop2.setAttribute("offset", "1");
32 gradient.appendChild(stop1);
33 gradient.appendChild(stop2);
35 content.appendChild(gradient);
37 finishRepaintTest();
39 </script>
41 </svg>