| OLD | NEW |
| 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k" onload="runRepaintTest()"> | 2 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k" onload="runRepaintAndPixelTest()"> |
| 3 <script xlink:href="../../fast/repaint/resources/repaint.js"/> | 3 <script xlink:href="../../fast/repaint/resources/text-based-repaint.js"/> |
| 4 <g font-size="40"> | 4 <g font-size="40"> |
| 5 <text id="text" y="50" display="none"> | 5 <text id="text" y="50" display="none"> |
| 6 <tspan id="tspan" x="50" dy="1em">Two lines of text should be visibl
e.</tspan> | 6 <tspan id="tspan" x="50" dy="1em">Two lines of text should be visibl
e.</tspan> |
| 7 </text> | 7 </text> |
| 8 </g> | 8 </g> |
| 9 <script> | 9 <script> |
| 10 function repaintTest() { | 10 function repaintTest() { |
| 11 var tspan1 = document.getElementById("tspan"); | 11 var tspan1 = document.getElementById("tspan"); |
| 12 var result = 0; | 12 var result = 0; |
| 13 try { | 13 try { |
| 14 result = tspan1.dy.baseVal.getItem(0).value; | 14 result = tspan1.dy.baseVal.getItem(0).value; |
| 15 } catch(e) { } | 15 } catch(e) { } |
| 16 | 16 |
| 17 var tspan2 = document.createElementNS("http://www.w3.org/2000/svg",
"tspan"); | 17 var tspan2 = document.createElementNS("http://www.w3.org/2000/svg",
"tspan"); |
| 18 tspan2.setAttribute("x", "50"); | 18 tspan2.setAttribute("x", "50"); |
| 19 tspan2.setAttribute("dy", result); | 19 tspan2.setAttribute("dy", result); |
| 20 tspan2.textContent = "Two lines of text should be visible."; | 20 tspan2.textContent = "Two lines of text should be visible."; |
| 21 document.getElementById("text").appendChild(tspan2); | 21 document.getElementById("text").appendChild(tspan2); |
| 22 document.getElementById("text").setAttribute("display", "inline"); | 22 document.getElementById("text").setAttribute("display", "inline"); |
| 23 } | 23 } |
| 24 </script> | 24 </script> |
| 25 </svg> | 25 </svg> |
| OLD | NEW |