| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script> | 2 <script> |
| 3 window.onload = function() | 3 window.onload = function() |
| 4 { | 4 { |
| 5 if (!window.testRunner || !window.internals) | 5 if (!window.testRunner || !window.internals) |
| 6 return; | 6 return; |
| 7 | 7 |
| 8 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
| 9 document.body.offsetTop; | 9 document.body.offsetTop; |
| 10 internals.startTrackingRepaints(document); | 10 internals.startTrackingRepaints(document); |
| 11 | 11 |
| 12 document.getElementById('a').style.top = '400px'; | 12 document.getElementById('a').style.top = '400px'; |
| 13 document.getElementById('b').style.left = '400px'; | 13 document.getElementById('b').style.left = '400px'; |
| 14 | 14 |
| 15 document.body.offsetTop; | 15 document.body.offsetTop; |
| 16 var layerTree = internals.layerTreeAsText(document, internals.LAYER_TREE_INC
LUDES_REPAINT_RECTS); | 16 var layerTree = internals.layerTreeAsText(document, internals.LAYER_TREE_INC
LUDES_PAINT_INVALIDATIONS); |
| 17 window.internals.stopTrackingRepaints(document); | 17 window.internals.stopTrackingRepaints(document); |
| 18 document.getElementById('result').textContent = layerTree.indexOf('repaint')
== -1 ? 'SUCCESS' : 'FAIL'; | 18 document.getElementById('result').textContent = layerTree.indexOf('repaint')
== -1 ? 'SUCCESS' : 'FAIL'; |
| 19 }; | 19 }; |
| 20 </script> | 20 </script> |
| 21 | 21 |
| 22 <style> | 22 <style> |
| 23 .fixed { | 23 .fixed { |
| 24 position: fixed; | 24 position: fixed; |
| 25 top: 200px; | 25 top: 200px; |
| 26 left: 200px; | 26 left: 200px; |
| 27 width: 100px; | 27 width: 100px; |
| 28 -webkit-backface-visibility: hidden; | 28 -webkit-backface-visibility: hidden; |
| 29 } | 29 } |
| 30 </style> | 30 </style> |
| 31 | 31 |
| 32 There should be no repaint when the divs are moved. | 32 There should be no repaint when the divs are moved. |
| 33 <div class="fixed" id="a">A</div> | 33 <div class="fixed" id="a">A</div> |
| 34 <div class="fixed" id="b">B</div> | 34 <div class="fixed" id="b">B</div> |
| 35 <pre id="result"></pre> | 35 <pre id="result"></pre> |
| OLD | NEW |