| OLD | NEW |
| 1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k" onload="startTest()" width="1000" height="600"> | 1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k" onload="startTest()" width="1000" height="600"> |
| 2 <script xlink:href="../../fast/repaint/resources/repaint.js" type="text/java
script"></script> | 2 <script xlink:href="../../fast/repaint/resources/text-based-repaint.js" type
="text/javascript"></script> |
| 3 <text y="-10">Bug 76559: All red should disappear</text> | 3 <text y="-10">Bug 76559: All red should disappear</text> |
| 4 <g id="g" transform="translate(0, 0)"> | 4 <g id="g" transform="translate(0, 0)"> |
| 5 <defs> | 5 <defs> |
| 6 <clipPath id="p"> | 6 <clipPath id="p"> |
| 7 <rect id="r" x="-10" y="-10" width="20" height="20" /> | 7 <rect id="r" x="-10" y="-10" width="20" height="20" /> |
| 8 </clipPath> | 8 </clipPath> |
| 9 </defs> | 9 </defs> |
| 10 <image x="-30" y="-30" width="60" height="60" clip-path="url(#p)" xlink:
href=""/> | 10 <image x="-30" y="-30" width="60" height="60" clip-path="url(#p)" xlink:
href=""/> |
| 11 </g> | 11 </g> |
| 12 <script> | 12 <script> |
| 13 var green = "data:image/gif;base64,R0lGODlhAQABAIAAAAD/AAAAACH5BAAAAAAALAAAA
AABAAEAAAICRAEAOw=="; | 13 var green = "data:image/gif;base64,R0lGODlhAQABAIAAAAD/AAAAACH5BAAAAAAALAAAA
AABAAEAAAICRAEAOw=="; |
| 14 var red = "data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAA
BAAEAAAICRAEAOw=="; | 14 var red = "data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAA
BAAEAAAICRAEAOw=="; |
| 15 | 15 |
| 16 var count = 0; | 16 var count = 0; |
| 17 function startTest() { | 17 function startTest() { |
| 18 if (count == 0) | 18 if (count == 0) |
| 19 runRepaintTest(); | 19 runRepaintAndPixelTest(); |
| 20 count = count + 1; | 20 count = count + 1; |
| 21 } | 21 } |
| 22 | 22 |
| 23 var r = document.querySelector('#r'); | 23 var r = document.querySelector('#r'); |
| 24 var g = document.querySelector('#g'); | 24 var g = document.querySelector('#g'); |
| 25 var i = document.querySelector('image'); | 25 var i = document.querySelector('image'); |
| 26 var update = function(offset, size, img) { | 26 var update = function(offset, size, img) { |
| 27 r.setAttribute('x', -size / 2); | 27 r.setAttribute('x', -size / 2); |
| 28 r.setAttribute('y', -size / 2); | 28 r.setAttribute('y', -size / 2); |
| 29 r.setAttribute('width', size); | 29 r.setAttribute('width', size); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 46 i.onload = function() { setTimeout(finishTest, 0); }; | 46 i.onload = function() { setTimeout(finishTest, 0); }; |
| 47 update(200, 50, green); | 47 update(200, 50, green); |
| 48 } | 48 } |
| 49 | 49 |
| 50 function repaintTest() { | 50 function repaintTest() { |
| 51 i.onload = function() { setTimeout(nextStep, 0); }; | 51 i.onload = function() { setTimeout(nextStep, 0); }; |
| 52 update(50, 100, red); | 52 update(50, 100, red); |
| 53 } | 53 } |
| 54 </script> | 54 </script> |
| 55 </svg> | 55 </svg> |
| OLD | NEW |