| OLD | NEW |
| 1 // Asynchronous tests should manually call finishRepaintTest at the appropriate | 1 // Asynchronous tests should manually call finishRepaintTest at the appropriate |
| 2 // time. | 2 // time. |
| 3 window.testIsAsync = false; | 3 window.testIsAsync = false; |
| 4 window.outputRepaintRects = true; | 4 window.outputRepaintRects = true; |
| 5 window.generateMinimumRepaint = false; // See comments about 'Minimum repaint' b
elow. | 5 window.generateMinimumRepaint = false; // See comments about 'Minimum repaint' b
elow. |
| 6 | 6 |
| 7 // All repaint tests are asynchronous. | 7 // All repaint tests are asynchronous. |
| 8 if (window.testRunner) | 8 if (window.testRunner) |
| 9 testRunner.waitUntilDone(); | 9 testRunner.waitUntilDone(); |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 function runRepaintAndPixelTest() | 49 function runRepaintAndPixelTest() |
| 50 { | 50 { |
| 51 window.enablePixelTesting = true; | 51 window.enablePixelTesting = true; |
| 52 runRepaintTest(); | 52 runRepaintTest(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 function forceStyleRecalc() | 55 function forceStyleRecalc() |
| 56 { | 56 { |
| 57 if (document.body) | 57 if (document.body) |
| 58 document.body.offsetTop; | 58 document.body.clientTop; |
| 59 else if (document.documentElement) | 59 else if (document.documentElement) |
| 60 document.documentElement.offsetTop; | 60 document.documentElement.clientTop; |
| 61 } | 61 } |
| 62 | 62 |
| 63 function finishRepaintTest() | 63 function finishRepaintTest() |
| 64 { | 64 { |
| 65 if (!window.testRunner || !window.internals) | 65 if (!window.testRunner || !window.internals) |
| 66 return; | 66 return; |
| 67 | 67 |
| 68 // Force a style recalc. | 68 // Force a style recalc. |
| 69 forceStyleRecalc(); | 69 forceStyleRecalc(); |
| 70 | 70 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } else { | 188 } else { |
| 189 var newRect = [xBegin, y, xWidth, 1]; | 189 var newRect = [xBegin, y, xWidth, 1]; |
| 190 nextRectsMayContinue.push(newRect); | 190 nextRectsMayContinue.push(newRect); |
| 191 result.push(newRect); | 191 result.push(newRect); |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 rectsMayContinue = nextRectsMayContinue; | 194 rectsMayContinue = nextRectsMayContinue; |
| 195 } | 195 } |
| 196 return result; | 196 return result; |
| 197 } | 197 } |
| OLD | NEW |