| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/run-after-display.js"></script> |
| 4 <style> | 5 <style> |
| 5 | 6 |
| 6 #backgroundFixed { | 7 #backgroundFixed { |
| 7 -webkit-transform: translatez(0); | 8 -webkit-transform: translatez(0); |
| 8 position: fixed; | 9 position: fixed; |
| 9 height: 400px; | 10 height: 400px; |
| 10 width: 400px; | 11 width: 400px; |
| 11 z-index: 1; | 12 z-index: 1; |
| 12 background-color: gray; | 13 background-color: gray; |
| 13 } | 14 } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 display: none; | 53 display: none; |
| 53 } | 54 } |
| 54 | 55 |
| 55 body { | 56 body { |
| 56 margin: 0; | 57 margin: 0; |
| 57 } | 58 } |
| 58 | 59 |
| 59 </style> | 60 </style> |
| 60 | 61 |
| 61 <script> | 62 <script> |
| 62 if (window.testRunner) | 63 if (window.testRunner) { |
| 63 testRunner.dumpAsText(); | 64 testRunner.dumpAsText(); |
| 65 testRunner.waitUntilDone(); |
| 66 } |
| 64 | 67 |
| 65 if (window.internals) | 68 if (window.internals) |
| 66 internals.settings.setLayerSquashingEnabled(true); | 69 internals.settings.setLayerSquashingEnabled(true); |
| 67 | 70 |
| 68 function runTest() | 71 function runTest() |
| 69 { | 72 { |
| 70 if (!window.internals) | 73 if (!window.internals) |
| 71 return; | 74 return; |
| 72 | 75 |
| 73 // Case 1 | 76 // Case 1 |
| 74 document.getElementById('Case1').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 77 document.getElementById('Case1').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
| 75 | 78 |
| 76 // Case 2 | 79 // Case 2 |
| 77 window.internals.startTrackingRepaints(document); | 80 window.internals.startTrackingRepaints(document); |
| 78 window.scrollTo(0, 10); | 81 window.scrollTo(0, 10); |
| 79 document.getElementById('Case2').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 82 runAfterDisplay(function() { |
| 80 window.internals.stopTrackingRepaints(document); | 83 document.getElementById('Case2').textContent = window.internals.layerT
reeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
| 84 window.internals.stopTrackingRepaints(document); |
| 81 | 85 |
| 82 // Case 3 | 86 // Case 3 |
| 83 window.internals.startTrackingRepaints(document); | 87 window.internals.startTrackingRepaints(document); |
| 84 window.scrollTo(0, 110); | 88 window.scrollTo(0, 110); |
| 85 document.getElementById('Case3').textContent = window.internals.layerTre
eAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); | 89 runAfterDisplay(function() { |
| 86 window.internals.stopTrackingRepaints(document); | 90 document.getElementById('Case3').textContent = window.internals.laye
rTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
| 91 window.internals.stopTrackingRepaints(document); |
| 87 | 92 |
| 88 // Display the test results only after test is done so that it does not
affect repaint rect results. | 93 // Display the test results only after test is done so that it does
not affect repaint rect results. |
| 89 document.getElementById('testResults').style.display = "block"; | 94 document.getElementById('testResults').style.display = "block"; |
| 95 |
| 96 if (window.testRunner) |
| 97 testRunner.notifyDone(); |
| 98 }); |
| 99 }); |
| 90 } | 100 } |
| 91 </script> | 101 </script> |
| 92 </head> | 102 </head> |
| 93 | 103 |
| 94 <body onload="runTest()"> | 104 <body onload="runTest()"> |
| 95 <div id="description"> | 105 <div id="description"> |
| 96 <p>This scenario verifies that the green "container" element and lime | 106 <p>This scenario verifies that the green "container" element and lime |
| 97 "innerScrolling" element scroll properly even though there is a blue | 107 "innerScrolling" element scroll properly even though there is a blue |
| 98 fixed-position element layered in between them.</p> | 108 fixed-position element layered in between them.</p> |
| 99 | 109 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 113 CASE 1, original layer tree: | 123 CASE 1, original layer tree: |
| 114 <pre id="Case1"></pre> | 124 <pre id="Case1"></pre> |
| 115 | 125 |
| 116 CASE 2, scrolling y by 10 pixels, both the "container" and "inner" should sc
roll properly. | 126 CASE 2, scrolling y by 10 pixels, both the "container" and "inner" should sc
roll properly. |
| 117 <pre id="Case2"></pre> | 127 <pre id="Case2"></pre> |
| 118 | 128 |
| 119 CASE 3, scrolling y further so that "inner" no longer overlaps the fixed-pos
layer, then the stacking context of "container" includes the "innerScrolling" l
ayer, and doubles in width: | 129 CASE 3, scrolling y further so that "inner" no longer overlaps the fixed-pos
layer, then the stacking context of "container" includes the "innerScrolling" l
ayer, and doubles in width: |
| 120 <pre id="Case3"></pre> | 130 <pre id="Case3"></pre> |
| 121 </div> | 131 </div> |
| 122 </body> | 132 </body> |
| OLD | NEW |