OLD | NEW |
---|---|
1 <?xml version="1.0" encoding="utf-8"?> | 1 <?xml version="1.0" encoding="utf-8"?> |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | 3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
4 <html xmlns="http://www.w3.org/1999/xhtml"> | 4 <html xmlns="http://www.w3.org/1999/xhtml"> |
5 <head> | 5 <head> |
6 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> | 6 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
7 <title>The rectangle should be green.</title></head> | 7 <title>The rectangle should be green.</title></head> |
8 <script> | 8 <script> |
9 window.testIsAsync = true; | 9 window.testIsAsync = true; |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... | |
41 resetFill(defs); | 41 resetFill(defs); |
42 | 42 |
43 el.setAttribute("fill", "url(#pat)"); | 43 el.setAttribute("fill", "url(#pat)"); |
44 | 44 |
45 if(currentColor == 2) | 45 if(currentColor == 2) |
46 finishRepaintTest(); | 46 finishRepaintTest(); |
47 } | 47 } |
48 | 48 |
49 function repaintTest() { | 49 function repaintTest() { |
50 updateFill(); | 50 updateFill(); |
51 setTimeout("updateFill()", 0); | 51 // Nested RAF to ensure enough time elapsed for repaint logging to occur |
Julien - ping for review
2014/10/03 22:22:32
runAfterDisplay would probably solve this issue bu
alex clarke (OOO till 29th)
2014/10/10 17:46:02
Done.
| |
52 requestAnimationFrame(function() { | |
53 requestAnimationFrame(updateFill); | |
54 }); | |
52 } | 55 } |
53 </script> | 56 </script> |
54 <body onload="runRepaintAndPixelTest()"> | 57 <body onload="runRepaintAndPixelTest()"> |
55 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin k" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%"> | 58 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin k" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%"> |
56 <defs id="defs"></defs> | 59 <defs id="defs"></defs> |
57 <rect id="shape" width="200" height="200"></rect> | 60 <rect id="shape" width="200" height="200"></rect> |
58 </svg> | 61 </svg> |
59 </body> | 62 </body> |
60 </html> | 63 </html> |
OLD | NEW |