OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html><head> | 3 <html><head> |
4 <style> | 4 <style> |
5 .filler { | 5 .filler { |
6 background-color: #CC9900; | 6 background-color: #CC9900; |
7 border-style: solid; | 7 border-style: solid; |
8 border-width: 1px; | 8 border-width: 1px; |
9 width: 400px; | 9 width: 400px; |
10 height: 100px; | 10 height: 100px; |
(...skipping 17 matching lines...) Expand all Loading... |
28 height: 200px; | 28 height: 200px; |
29 width: 300px; | 29 width: 300px; |
30 overflow-x: scroll; | 30 overflow-x: scroll; |
31 } | 31 } |
32 </style> | 32 </style> |
33 | 33 |
34 <script src="resources/build-paint-order-lists.js"></script> | 34 <script src="resources/build-paint-order-lists.js"></script> |
35 <script> | 35 <script> |
36 var debugMode = false; | 36 var debugMode = false; |
37 | 37 |
| 38 if (window.internals) |
| 39 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnable
d(true); |
| 40 |
38 if (window.testRunner) | 41 if (window.testRunner) |
39 testRunner.dumpAsText(); | 42 testRunner.dumpAsText(); |
40 | 43 |
41 function write(str) | 44 function write(str) |
42 { | 45 { |
43 var pre = document.getElementById('console'); | 46 var pre = document.getElementById('console'); |
44 var text = document.createTextNode(str + '\n'); | 47 var text = document.createTextNode(str + '\n'); |
45 pre.appendChild(text); | 48 pre.appendChild(text); |
46 } | 49 } |
47 | 50 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // first force the element not to promote, then compute its paint and | 110 // first force the element not to promote, then compute its paint and |
108 // stacking order lists. We then force the element to opt in, and | 111 // stacking order lists. We then force the element to opt in, and |
109 // generate the paint and stacking order lists after opt-in. | 112 // generate the paint and stacking order lists after opt-in. |
110 // | 113 // |
111 // The paint order lists should exactly match the stacking order lists | 114 // The paint order lists should exactly match the stacking order lists |
112 // (modulo children that fall outside of the hit-testing area | 115 // (modulo children that fall outside of the hit-testing area |
113 // on-screen), both before and after promotion. | 116 // on-screen), both before and after promotion. |
114 parentscrollinglayer.style.webkitTransform = 'translateZ(0px)'; | 117 parentscrollinglayer.style.webkitTransform = 'translateZ(0px)'; |
115 document.body.offsetTop; | 118 document.body.offsetTop; |
116 | 119 |
117 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnab
led(false); | 120 window.internals.setNeedsCompositedScrolling(parentscrollinglayer, |
| 121 window.internals.CompositedScrollingAlwaysOff); |
118 parentscrollinglayer.style.webkitTransform = ''; | 122 parentscrollinglayer.style.webkitTransform = ''; |
119 | 123 |
120 var oldStackingOrder = getStackingOrder(); | 124 var oldStackingOrder = getStackingOrder(); |
121 var oldPaintOrder = getPaintOrder(childscrollinglayer); | 125 var oldPaintOrder = getPaintOrder(childscrollinglayer); |
122 | 126 |
123 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnab
led(true); | 127 window.internals.setNeedsCompositedScrolling(parentscrollinglayer, |
| 128 window.internals.CompositedScrollingAlwaysOn); |
124 parentscrollinglayer.style.webkitTransform = 'translateZ(0px)'; | 129 parentscrollinglayer.style.webkitTransform = 'translateZ(0px)'; |
125 | 130 |
126 var newStackingOrder = getStackingOrder(); | 131 var newStackingOrder = getStackingOrder(); |
127 var newPaintOrder = getPaintOrder(childscrollinglayer); | 132 var newPaintOrder = getPaintOrder(childscrollinglayer); |
128 | 133 |
| 134 window.internals.setNeedsCompositedScrolling(parentscrollinglayer, |
| 135 window.internals.DoNotForceCompositedScrolling); |
| 136 |
129 // The getPaintOrder() function should return a pair of paint orders. | 137 // The getPaintOrder() function should return a pair of paint orders. |
130 // One before promotion and one after. This pair of lists should remain | 138 // One before promotion and one after. This pair of lists should remain |
131 // identical whether the element is actually currently promoted or not, | 139 // identical whether the element is actually currently promoted or not, |
132 // its purpose is to generate hypothetical pre- and post-lists to | 140 // its purpose is to generate hypothetical pre- and post-lists to |
133 // determine if the element is promotable. | 141 // determine if the element is promotable. |
134 if (!comparePaintOrderLists(oldPaintOrder, newPaintOrder)) { | 142 if (!comparePaintOrderLists(oldPaintOrder, newPaintOrder)) { |
135 failure = true; | 143 failure = true; |
136 write("FAIL - paint order lists not identical before/after promotion")
; | 144 write("FAIL - paint order lists not identical before/after promotion")
; |
137 } | 145 } |
138 | 146 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 <div class="filler"></div> | 183 <div class="filler"></div> |
176 <div class="filler"></div> | 184 <div class="filler"></div> |
177 </div> | 185 </div> |
178 <div id="fillerchild1" class="filler negativechild"></div> | 186 <div id="fillerchild1" class="filler negativechild"></div> |
179 <div id="fillerchild2" class="filler negativechild"></div> | 187 <div id="fillerchild2" class="filler negativechild"></div> |
180 <div id="fillerchild3" class="filler negativechild"></div> | 188 <div id="fillerchild3" class="filler negativechild"></div> |
181 <div id="fillerchild4" class="filler negativechild"></div> | 189 <div id="fillerchild4" class="filler negativechild"></div> |
182 <pre id="console"></pre> | 190 <pre id="console"></pre> |
183 </body> | 191 </body> |
184 </html> | 192 </html> |
OLD | NEW |