| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 .overlap { | 3 .overlap { |
| 4 height: 500px; | 4 height: 500px; |
| 5 width: 300px; | 5 width: 300px; |
| 6 transform: translateZ(0); | 6 transform: translateZ(0); |
| 7 } | 7 } |
| 8 | 8 |
| 9 .item { | 9 .item { |
| 10 height: 50px; | 10 height: 50px; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 runAfterLayoutAndPaint(function() | 43 runAfterLayoutAndPaint(function() |
| 44 { | 44 { |
| 45 if (window.internals) | 45 if (window.internals) |
| 46 window.internals.startTrackingRepaints(document); | 46 window.internals.startTrackingRepaints(document); |
| 47 var selection = getSelection(); | 47 var selection = getSelection(); |
| 48 | 48 |
| 49 // Case 1: selection that does not have any gaps. | 49 // Case 1: selection that does not have any gaps. |
| 50 selection.setBaseAndExtent(document.querySelector("#item1"), 0, document
.querySelector("#item1"), 1); | 50 selection.setBaseAndExtent(document.querySelector("#item1"), 0, document
.querySelector("#item1"), 1); |
| 51 | 51 |
| 52 if (window.internals) { | 52 if (window.internals) { |
| 53 document.querySelector('#case1').textContent = window.internals.laye
rTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 53 document.querySelector('#case1').textContent = window.internals.laye
rTreeAsText(document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS); |
| 54 window.internals.stopTrackingRepaints(document); | 54 window.internals.stopTrackingRepaints(document); |
| 55 } | 55 } |
| 56 | 56 |
| 57 selection.empty(); | 57 selection.empty(); |
| 58 | 58 |
| 59 if (window.internals) | 59 if (window.internals) |
| 60 window.internals.startTrackingRepaints(document); | 60 window.internals.startTrackingRepaints(document); |
| 61 | 61 |
| 62 // Case 2: selection with a gap between item1 and item2. | 62 // Case 2: selection with a gap between item1 and item2. |
| 63 selection.setBaseAndExtent(document.querySelector("#item1"), 0, document
.querySelector("#item2"), 1); | 63 selection.setBaseAndExtent(document.querySelector("#item1"), 0, document
.querySelector("#item2"), 1); |
| 64 | 64 |
| 65 if (window.internals) { | 65 if (window.internals) { |
| 66 document.querySelector('#case2').textContent = window.internals.laye
rTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 66 document.querySelector('#case2').textContent = window.internals.laye
rTreeAsText(document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS); |
| 67 window.internals.stopTrackingRepaints(document); | 67 window.internals.stopTrackingRepaints(document); |
| 68 } | 68 } |
| 69 | 69 |
| 70 document.querySelector('#output').style.display = 'block'; | 70 document.querySelector('#output').style.display = 'block'; |
| 71 | 71 |
| 72 | 72 |
| 73 if (window.testRunner) | 73 if (window.testRunner) |
| 74 testRunner.notifyDone(); | 74 testRunner.notifyDone(); |
| 75 }); | 75 }); |
| 76 </script> | 76 </script> |
| OLD | NEW |