| OLD | NEW |
| 1 <?xml version="1.0" encoding="UTF-8"?> | 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"> | 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/xlin
k" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="runRe
paintAndPixelTest()"> | 3 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" onload="runRe
paintTest()"> |
| 4 <script xlink:href="../../fast/repaint/resources/text-based-repaint.js"/> | 4 <script xlink:href="../../fast/repaint/resources/repaint.js"/> |
| 5 <g id="content" transform="scale(1, 1.5)"> | 5 <g id="content" transform="scale(1, 1.5)"> |
| 6 <text font-size="60" fill="navy" clip-path="url(#dynClip)" x="10" y="70">Cl
ipped. INVISIBLE.</text> | 6 <text font-size="60" fill="navy" clip-path="url(#dynClip)" x="10" y="70">Cl
ipped. INVISIBLE.</text> |
| 7 </g> | 7 </g> |
| 8 <script> | 8 <script> |
| 9 window.testIsAsync = true; | 9 window.testIsAsync = true; |
| 10 var content = document.getElementById("content"); | 10 var content = document.getElementById("content"); |
| 11 | 11 |
| 12 function repaintTest() { | 12 function repaintTest() { |
| 13 setTimeout(createClipPath, 0); | 13 setTimeout(createClipPath, 0); |
| 14 } | 14 } |
| 15 | 15 |
| 16 function createClipPath() | 16 function createClipPath() |
| 17 { | 17 { |
| 18 var clipPath = document.createElementNS("http://www.w3.org/2000/svg", "c
lipPath"); | 18 var clipPath = document.createElementNS("http://www.w3.org/2000/svg", "c
lipPath"); |
| 19 clipPath.setAttribute("id", "dynClip"); | 19 clipPath.setAttribute("id", "dynClip"); |
| 20 clipPath.setAttribute("clipPathUnits", "userSpaceOnUse"); | 20 clipPath.setAttribute("clipPathUnits", "userSpaceOnUse"); |
| 21 | 21 |
| 22 var path = document.createElementNS("http://www.w3.org/2000/svg", "path"
); | 22 var path = document.createElementNS("http://www.w3.org/2000/svg", "path"
); |
| 23 path.setAttribute("d", "M 0 0 l 200 0 l 0 200 l -200 0 Z"); | 23 path.setAttribute("d", "M 0 0 l 200 0 l 0 200 l -200 0 Z"); |
| 24 | 24 |
| 25 clipPath.appendChild(path); | 25 clipPath.appendChild(path); |
| 26 content.appendChild(clipPath); | 26 content.appendChild(clipPath); |
| 27 | 27 |
| 28 finishRepaintTest(); | 28 finishRepaintTest(); |
| 29 } | 29 } |
| 30 </script> | 30 </script> |
| 31 | 31 |
| 32 </svg> | 32 </svg> |
| OLD | NEW |