| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/run-after-layout-and-paint.js"></script> | 4 <script src="../../resources/run-after-layout-and-paint.js"></script> |
| 5 <style> | 5 <style> |
| 6 div { | 6 div { |
| 7 position: absolute; | 7 position: absolute; |
| 8 z-index: 1; | 8 z-index: 1; |
| 9 width: 100px; | 9 width: 100px; |
| 10 height: 100px; | 10 height: 100px; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 function runTest() | 57 function runTest() |
| 58 { | 58 { |
| 59 if (!window.internals) | 59 if (!window.internals) |
| 60 return; | 60 return; |
| 61 runAfterLayoutAndPaint(executeTestCases); | 61 runAfterLayoutAndPaint(executeTestCases); |
| 62 } | 62 } |
| 63 | 63 |
| 64 function executeTestCases() | 64 function executeTestCases() |
| 65 { | 65 { |
| 66 // Case 1 | 66 // Case 1 |
| 67 document.getElementById('Case1').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 67 document.getElementById('Case1').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS); |
| 68 | 68 |
| 69 // Case 2 | 69 // Case 2 |
| 70 window.internals.startTrackingRepaints(document); | 70 window.internals.startTrackingRepaints(document); |
| 71 document.getElementById("A").style.backgroundColor = "green"; | 71 document.getElementById("A").style.backgroundColor = "green"; |
| 72 document.getElementById('Case2').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 72 document.getElementById('Case2').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS); |
| 73 window.internals.stopTrackingRepaints(document); | 73 window.internals.stopTrackingRepaints(document); |
| 74 | 74 |
| 75 // Case 3 | 75 // Case 3 |
| 76 window.internals.startTrackingRepaints(document); | 76 window.internals.startTrackingRepaints(document); |
| 77 document.getElementById("A").style.backgroundColor = "blue"; | 77 document.getElementById("A").style.backgroundColor = "blue"; |
| 78 document.getElementById("B").style.backgroundColor = "green"; | 78 document.getElementById("B").style.backgroundColor = "green"; |
| 79 document.getElementById('Case3').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 79 document.getElementById('Case3').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS); |
| 80 window.internals.stopTrackingRepaints(document); | 80 window.internals.stopTrackingRepaints(document); |
| 81 | 81 |
| 82 // Case 4 | 82 // Case 4 |
| 83 window.internals.startTrackingRepaints(document); | 83 window.internals.startTrackingRepaints(document); |
| 84 document.getElementById("B").style.backgroundColor = "blue"; | 84 document.getElementById("B").style.backgroundColor = "blue"; |
| 85 document.getElementById("C").style.backgroundColor = "green"; | 85 document.getElementById("C").style.backgroundColor = "green"; |
| 86 document.getElementById('Case4').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 86 document.getElementById('Case4').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS); |
| 87 window.internals.stopTrackingRepaints(document); | 87 window.internals.stopTrackingRepaints(document); |
| 88 | 88 |
| 89 // Case 5 | 89 // Case 5 |
| 90 window.internals.startTrackingRepaints(document); | 90 window.internals.startTrackingRepaints(document); |
| 91 document.getElementById("C").style.backgroundColor = "blue"; | 91 document.getElementById("C").style.backgroundColor = "blue"; |
| 92 document.getElementById("A").style.backgroundColor = "green"; | 92 document.getElementById("A").style.backgroundColor = "green"; |
| 93 document.getElementById('Case5').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 93 document.getElementById('Case5').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS); |
| 94 window.internals.stopTrackingRepaints(document); | 94 window.internals.stopTrackingRepaints(document); |
| 95 | 95 |
| 96 // Display the test results only after test is done so that it does not
affect repaint rect results. | 96 // Display the test results only after test is done so that it does not
affect repaint rect results. |
| 97 document.getElementById('testResults').style.display = "block"; | 97 document.getElementById('testResults').style.display = "block"; |
| 98 | 98 |
| 99 if (window.testRunner) | 99 if (window.testRunner) |
| 100 testRunner.notifyDone(); | 100 testRunner.notifyDone(); |
| 101 } | 101 } |
| 102 </script> | 102 </script> |
| 103 </head> | 103 </head> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 126 CASE 4, overlap2 and overlap3 change color: | 126 CASE 4, overlap2 and overlap3 change color: |
| 127 <pre id="Case4"></pre> | 127 <pre id="Case4"></pre> |
| 128 | 128 |
| 129 CASE 5, overlap3 and overlap1 change color: | 129 CASE 5, overlap3 and overlap1 change color: |
| 130 <pre id="Case5"></pre> | 130 <pre id="Case5"></pre> |
| 131 </div> | 131 </div> |
| 132 | 132 |
| 133 </body> | 133 </body> |
| 134 | 134 |
| 135 </html> | 135 </html> |
| OLD | NEW |