OLD | NEW |
1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k" onload="runRepaintTest();"> | 1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k" onload="runRepaintAndPixelTest();"> |
2 <!-- | 2 <!-- |
3 Test for https://bugs.webkit.org/show_bug.cgi?id=79682. | 3 Test for https://bugs.webkit.org/show_bug.cgi?id=79682. |
4 --> | 4 --> |
5 <script xlink:href="../../fast/repaint/resources/repaint.js" type="text/javasc
ript"></script> | 5 <script xlink:href="../../fast/repaint/resources/text-based-repaint.js" type="
text/javascript"></script> |
6 <defs> | 6 <defs> |
7 <mask id="mask1"> | 7 <mask id="mask1"> |
8 <text id="text1" x="10" y="20" fill="#fff" font-size="20px"></text> | 8 <text id="text1" x="10" y="20" fill="#fff" font-size="20px"></text> |
9 </mask> | 9 </mask> |
10 <mask id="mask2"> | 10 <mask id="mask2"> |
11 <text id="text2" x="10" y="50" fill="#fff" font-size="20px">FAIL</text> | 11 <text id="text2" x="10" y="50" fill="#fff" font-size="20px">FAIL</text> |
12 </mask> | 12 </mask> |
13 </defs> | 13 </defs> |
14 | 14 |
15 <!-- the updated mask should be "PASS" --> | 15 <!-- the updated mask should be "PASS" --> |
16 <rect width="100" height="50" fill="green" mask="url(#mask1)"/> | 16 <rect width="100" height="50" fill="green" mask="url(#mask1)"/> |
17 <!-- the updated mask should be empty --> | 17 <!-- the updated mask should be empty --> |
18 <rect width="100" height="50" fill="red" mask="url(#mask2)"/> | 18 <rect width="100" height="50" fill="red" mask="url(#mask2)"/> |
19 | 19 |
20 <script> | 20 <script> |
21 function repaintTest() { | 21 function repaintTest() { |
22 var txt = document.createTextNode('PASS'); | 22 var txt = document.createTextNode('PASS'); |
23 document.getElementById('text1').appendChild(txt); | 23 document.getElementById('text1').appendChild(txt); |
24 var node = document.getElementById('text2'); | 24 var node = document.getElementById('text2'); |
25 node.removeChild(node.firstChild); | 25 node.removeChild(node.firstChild); |
26 } | 26 } |
27 </script> | 27 </script> |
28 </svg> | 28 </svg> |
OLD | NEW |