| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| 71 var flags = window.internals.LAYER_TREE_INCLUDES_REPAINT_RECTS | | 71 var flags = window.internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS; |
| 72 window.internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATION_OBJECTS; | |
| 73 | 72 |
| 74 if (window.layerTreeAsTextAdditionalFlags) | 73 if (window.layerTreeAsTextAdditionalFlags) |
| 75 flags |= window.layerTreeAsTextAdditionalFlags; | 74 flags |= window.layerTreeAsTextAdditionalFlags; |
| 76 | 75 |
| 77 var repaintRects = window.internals.layerTreeAsText(document, flags); | 76 var repaintRects = window.internals.layerTreeAsText(document, flags); |
| 78 | 77 |
| 79 internals.stopTrackingRepaints(document); | 78 internals.stopTrackingRepaints(document); |
| 80 | 79 |
| 81 function repaintTestDone() | 80 function repaintTestDone() |
| 82 { | 81 { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } else { | 187 } else { |
| 189 var newRect = [xBegin, y, xWidth, 1]; | 188 var newRect = [xBegin, y, xWidth, 1]; |
| 190 nextRectsMayContinue.push(newRect); | 189 nextRectsMayContinue.push(newRect); |
| 191 result.push(newRect); | 190 result.push(newRect); |
| 192 } | 191 } |
| 193 } | 192 } |
| 194 rectsMayContinue = nextRectsMayContinue; | 193 rectsMayContinue = nextRectsMayContinue; |
| 195 } | 194 } |
| 196 return result; | 195 return result; |
| 197 } | 196 } |
| OLD | NEW |