| <!DOCTYPE html> |
| <script> |
| function test() |
| { |
| if (!window.testRunner || !window.internals) |
| return; |
| |
| testRunner.dumpAsText(); |
| document.body.offsetTop; |
| internals.startTrackingRepaints(document); |
| |
| document.getElementById('left').style.top = '400px'; |
| document.getElementById('right').style.top = '400px'; |
| |
| document.body.offsetTop; |
| var layerTree = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS); |
| window.internals.stopTrackingRepaints(document); |
| document.getElementById('result').textContent = layerTree.indexOf('repaint') == -1 ? 'SUCCESS' : 'FAIL'; |
| } |
| |
| window.onload = test; |
| </script> |
| |
| <style> |
| #left, #right { |
| position: absolute; |
| top: 200px; |
| -webkit-backface-visibility: hidden; |
| } |
| #left { |
| left: 0px; |
| } |
| #right { |
| right: 0px; |
| } |
| </style> |
| |
| There should be no repaint when the divs are moved vertically. |
| <div id="left">Left</div> |
| <div id="right">Right</div> |
| <pre id="result"></pre> |