| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <div style="position: fixed; height: 5000px; width: 100px; background: lightblue
; transform: translateZ(0)"></div> | 2 <div style="position: fixed; height: 5000px; width: 100px; background: lightblue
; transform: translateZ(0)"></div> |
| 3 <div style="position: fixed; top: 25px; height: 100px; width: 100px; background:
lightgray"></div> | 3 <div style="position: fixed; top: 25px; height: 100px; width: 100px; background:
lightgray"></div> |
| 4 <div id="foo" style="position: fixed; top: 50px; height: 100px; width: 100px; ba
ckground: lightgray"></div> | 4 <div id="foo" style="position: fixed; top: 50px; height: 100px; width: 100px; ba
ckground: lightgray"></div> |
| 5 <script src="../../resources/run-after-layout-and-paint.js"></script> | 5 <script src="../../resources/run-after-layout-and-paint.js"></script> |
| 6 <script> | 6 <script> |
| 7 // This test verifies that a repaint request for a squashed layer that is positi
on:fixed into another position: fixed layer | 7 // This test verifies that a repaint request for a squashed layer that is positi
on:fixed into another position: fixed layer |
| 8 // issue the correct paint invalidations even with the window scrolled. | 8 // issue the correct paint invalidations even with the window scrolled. |
| 9 | 9 |
| 10 if (window.testRunner) { | 10 if (window.testRunner) { |
| 11 testRunner.dumpAsText(); | 11 testRunner.dumpAsText(); |
| 12 testRunner.waitUntilDone(); | 12 testRunner.waitUntilDone(); |
| 13 } | 13 } |
| 14 runAfterLayoutAndPaint(function() { | 14 runAfterLayoutAndPaint(function() { |
| 15 if (window.internals) | 15 if (window.internals) |
| 16 window.internals.startTrackingRepaints(document); | 16 window.internals.startTrackingRepaints(document); |
| 17 | 17 |
| 18 var output = ''; | 18 var output = ''; |
| 19 | 19 |
| 20 document.getElementById("foo").style.background = 'red'; | 20 document.getElementById("foo").style.background = 'red'; |
| 21 | 21 |
| 22 if (window.internals) | 22 if (window.internals) |
| 23 output += window.internals.layerTreeAsText(document, internals.LAYER_TRE
E_INCLUDES_REPAINT_RECTS) + ' '; | 23 output += window.internals.layerTreeAsText(document, internals.LAYER_TRE
E_INCLUDES_PAINT_INVALIDATIONS) + ' '; |
| 24 | 24 |
| 25 if (window.internals) | 25 if (window.internals) |
| 26 window.internals.stopTrackingRepaints(document); | 26 window.internals.stopTrackingRepaints(document); |
| 27 | 27 |
| 28 scrollTo(0, 50); | 28 scrollTo(0, 50); |
| 29 | 29 |
| 30 if (window.internals) | 30 if (window.internals) |
| 31 window.internals.startTrackingRepaints(document); | 31 window.internals.startTrackingRepaints(document); |
| 32 | 32 |
| 33 document.getElementById("foo").style.background = 'blue'; | 33 document.getElementById("foo").style.background = 'blue'; |
| 34 | 34 |
| 35 if (window.internals) | 35 if (window.internals) |
| 36 output += window.internals.layerTreeAsText(document, internals.LAYER_TRE
E_INCLUDES_REPAINT_RECTS); | 36 output += window.internals.layerTreeAsText(document, internals.LAYER_TRE
E_INCLUDES_PAINT_INVALIDATIONS); |
| 37 | 37 |
| 38 if (window.internals) | 38 if (window.internals) |
| 39 window.internals.stopTrackingRepaints(document); | 39 window.internals.stopTrackingRepaints(document); |
| 40 | 40 |
| 41 testRunner.setCustomTextOutput(output); | 41 testRunner.setCustomTextOutput(output); |
| 42 | 42 |
| 43 if (window.testRunner) | 43 if (window.testRunner) |
| 44 testRunner.notifyDone(); | 44 testRunner.notifyDone(); |
| 45 }); | 45 }); |
| 46 | 46 |
| 47 </script> | 47 </script> |
| OLD | NEW |