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/repaint.js" type="text/java
script"></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=""/> |
(...skipping 11 matching lines...) Expand all Loading... |
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); |
30 r.setAttribute('height', size); | 30 r.setAttribute('height', size); |
31 g.setAttribute("transform","translate(" + offset + ",50)"); | 31 g.setAttribute("transform","translate(" + offset + ",50)"); |
32 i.setAttribute("externalResourcesRequired", "true"); | |
33 i.setAttributeNS('http://www.w3.org/1999/xlink', 'href', img); | 32 i.setAttributeNS('http://www.w3.org/1999/xlink', 'href', img); |
34 }; | 33 }; |
35 | 34 |
36 if (window.testRunner) { | 35 if (window.testRunner) { |
37 testRunner.dumpAsTextWithPixelResults(); | 36 testRunner.dumpAsTextWithPixelResults(); |
38 testRunner.waitUntilDone(); | 37 testRunner.waitUntilDone(); |
39 } | 38 } |
40 | 39 |
41 function finishTest() { | 40 function finishTest() { |
42 if (window.testRunner) | 41 if (window.testRunner) |
43 testRunner.notifyDone(); | 42 testRunner.notifyDone(); |
44 } | 43 } |
45 | 44 |
46 function nextStep() { | 45 function nextStep() { |
47 i.onload = function() { setTimeout(finishTest, 0); }; | 46 i.onload = function() { setTimeout(finishTest, 0); }; |
48 update(200, 50, green); | 47 update(200, 50, green); |
49 } | 48 } |
50 | 49 |
51 function repaintTest() { | 50 function repaintTest() { |
52 i.onload = function() { setTimeout(nextStep, 0); }; | 51 i.onload = function() { setTimeout(nextStep, 0); }; |
53 update(50, 100, red); | 52 update(50, 100, red); |
54 } | 53 } |
55 </script> | 54 </script> |
56 </svg> | 55 </svg> |
OLD | NEW |