| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../resources/run-after-display.js"></script> |
| 3 <style> | 4 <style> |
| 4 .composited { | 5 .composited { |
| 5 -webkit-transform: translatez(0); | 6 -webkit-transform: translatez(0); |
| 6 } | 7 } |
| 7 | 8 |
| 8 .box { | 9 .box { |
| 9 width: 100px; | 10 width: 100px; |
| 10 height: 100px; | 11 height: 100px; |
| 11 } | 12 } |
| 12 | 13 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 51 } |
| 51 | 52 |
| 52 .smallbox:hover { | 53 .smallbox:hover { |
| 53 background-color: lime; | 54 background-color: lime; |
| 54 } | 55 } |
| 55 | 56 |
| 56 </style> | 57 </style> |
| 57 <script> | 58 <script> |
| 58 if (window.internals) | 59 if (window.internals) |
| 59 internals.settings.setLayerSquashingEnabled(true); | 60 internals.settings.setLayerSquashingEnabled(true); |
| 60 if (window.testRunner) | 61 if (window.testRunner) { |
| 61 testRunner.dumpAsText(); | 62 testRunner.dumpAsText(); |
| 62 | 63 testRunner.waitUntilDone(); |
| 64 } |
| 65 |
| 63 function runTest() | 66 function runTest() |
| 64 { | 67 { |
| 65 testRunner.display(); | 68 runAfterDisplay(executeTestCases); |
| 69 } |
| 66 | 70 |
| 71 function executeTestCases() |
| 72 { |
| 67 window.internals.startTrackingRepaints(document); | 73 window.internals.startTrackingRepaints(document); |
| 68 document.getElementById('Case1').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 74 document.getElementById('Case1').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
| 69 window.internals.stopTrackingRepaints(document); | 75 window.internals.stopTrackingRepaints(document); |
| 70 | 76 |
| 71 eventSender.mouseMoveTo(0, 0); | 77 eventSender.mouseMoveTo(0, 0); |
| 72 window.internals.startTrackingRepaints(document); | 78 window.internals.startTrackingRepaints(document); |
| 73 hoverOverOuterDiv(); | 79 hoverOverOuterDiv(); |
| 74 document.getElementById('Case2').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 80 document.getElementById('Case2').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
| 75 window.internals.stopTrackingRepaints(document); | 81 window.internals.stopTrackingRepaints(document); |
| 76 | 82 |
| 77 eventSender.mouseMoveTo(0, 0); | 83 eventSender.mouseMoveTo(0, 0); |
| 78 window.internals.startTrackingRepaints(document); | 84 window.internals.startTrackingRepaints(document); |
| 79 hoverOverInnerDiv(); | 85 hoverOverInnerDiv(); |
| 80 document.getElementById('Case3').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 86 document.getElementById('Case3').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
| 81 window.internals.stopTrackingRepaints(document); | 87 window.internals.stopTrackingRepaints(document); |
| 82 | 88 |
| 83 // Display the test results only after test is done so that it does not
affect repaint rect results. | 89 // Display the test results only after test is done so that it does not
affect repaint rect results. |
| 84 document.getElementById('testResults').style.display = "block"; | 90 document.getElementById('testResults').style.display = "block"; |
| 91 |
| 92 if (window.testRunner) |
| 93 testRunner.notifyDone(); |
| 85 } | 94 } |
| 86 | 95 |
| 87 function hoverOverOuterDiv() | 96 function hoverOverOuterDiv() |
| 88 { | 97 { |
| 89 internals.setIsCursorVisible(document, true); | 98 internals.setIsCursorVisible(document, true); |
| 90 eventSender.mouseMoveTo(20, 90); | 99 eventSender.mouseMoveTo(20, 90); |
| 91 } | 100 } |
| 92 | 101 |
| 93 function hoverOverInnerDiv() | 102 function hoverOverInnerDiv() |
| 94 { | 103 { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 112 CASE 1, original layer tree | 121 CASE 1, original layer tree |
| 113 <pre id="Case1"></pre> | 122 <pre id="Case1"></pre> |
| 114 | 123 |
| 115 CASE 2, hovering over the outer div | 124 CASE 2, hovering over the outer div |
| 116 <pre id="Case2"></pre> | 125 <pre id="Case2"></pre> |
| 117 | 126 |
| 118 CASE 3, hovering over the inner div | 127 CASE 3, hovering over the inner div |
| 119 <pre id="Case3"></pre> | 128 <pre id="Case3"></pre> |
| 120 </div> | 129 </div> |
| 121 </body> | 130 </body> |
| OLD | NEW |