| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <style> | 5 <style> |
| 6 .container { | 6 .container { |
| 7 width: 200px; | 7 width: 200px; |
| 8 height: 200px; | 8 height: 200px; |
| 9 overflow: scroll; | 9 overflow: scroll; |
| 10 border: 1px solid black; | 10 border: 1px solid black; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // stacking order lists. We then force the element to opt in, and | 93 // stacking order lists. We then force the element to opt in, and |
| 94 // generate the paint and stacking order lists after opt-in. | 94 // generate the paint and stacking order lists after opt-in. |
| 95 // | 95 // |
| 96 // The paint order lists should exactly match the stacking order lists | 96 // The paint order lists should exactly match the stacking order lists |
| 97 // (modulo children that fall outside of the hit-testing area | 97 // (modulo children that fall outside of the hit-testing area |
| 98 // on-screen), both before and after promotion. | 98 // on-screen), both before and after promotion. |
| 99 container.style.webkitTransform = 'translateZ(0px)'; | 99 container.style.webkitTransform = 'translateZ(0px)'; |
| 100 document.body.offsetTop; | 100 document.body.offsetTop; |
| 101 | 101 |
| 102 window.internals.setNeedsCompositedScrolling(container, | 102 window.internals.setNeedsCompositedScrolling(container, |
| 103 window.internals.CompositedScrollingAlwaysOff); | 103 window.internals.COMPOSITED_SCROLLING_ALWAYS_OFF); |
| 104 container.style.webkitTransform = ''; | 104 container.style.webkitTransform = ''; |
| 105 | 105 |
| 106 var oldStackingOrder = getStackingOrder(container); | 106 var oldStackingOrder = getStackingOrder(container); |
| 107 var oldPaintOrder = getPaintOrder(container); | 107 var oldPaintOrder = getPaintOrder(container); |
| 108 | 108 |
| 109 window.internals.setNeedsCompositedScrolling(container, | 109 window.internals.setNeedsCompositedScrolling(container, |
| 110 window.internals.CompositedScrollingAlwaysOn); | 110 window.internals.COMPOSITED_SCROLLING_ALWAYS_ON); |
| 111 container.style.webkitTransform = 'translateZ(0px)'; | 111 container.style.webkitTransform = 'translateZ(0px)'; |
| 112 | 112 |
| 113 var newStackingOrder = getStackingOrder(container); | 113 var newStackingOrder = getStackingOrder(container); |
| 114 var newPaintOrder = getPaintOrder(container); | 114 var newPaintOrder = getPaintOrder(container); |
| 115 | 115 |
| 116 window.internals.setNeedsCompositedScrolling(container, | 116 window.internals.setNeedsCompositedScrolling(container, |
| 117 window.internals.DoNotForceCompositedScrolling); | 117 window.internals.DO_NOT_FORCE_COMPOSITED_SCROLLING); |
| 118 // The getPaintOrder() function should return a pair of paint orders. | 118 // The getPaintOrder() function should return a pair of paint orders. |
| 119 // One before promotion and one after. This pair of lists should remain | 119 // One before promotion and one after. This pair of lists should remain |
| 120 // identical whether the element is actually currently promoted or not, | 120 // identical whether the element is actually currently promoted or not, |
| 121 // its purpose is to generate hypothetical pre- and post-lists to | 121 // its purpose is to generate hypothetical pre- and post-lists to |
| 122 // determine if the element is promotable. | 122 // determine if the element is promotable. |
| 123 if (!comparePaintOrderLists(oldPaintOrder, newPaintOrder)) | 123 if (!comparePaintOrderLists(oldPaintOrder, newPaintOrder)) |
| 124 write("iteration " + count + " FAIL - paint order lists not identical be
fore/after promotion"); | 124 write("iteration " + count + " FAIL - paint order lists not identical be
fore/after promotion"); |
| 125 | 125 |
| 126 if (!compareStackingOrderWithPaintOrder(oldStackingOrder, oldPaintOrder.be
forePromote)) | 126 if (!compareStackingOrderWithPaintOrder(oldStackingOrder, oldPaintOrder.be
forePromote)) |
| 127 write("iteration " + count + " FAIL - paint order list before promote do
esn't match stacking order"); | 127 write("iteration " + count + " FAIL - paint order list before promote do
esn't match stacking order"); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 144 permute(testPermutation); | 144 permute(testPermutation); |
| 145 } | 145 } |
| 146 | 146 |
| 147 window.addEventListener('load', doTest, false); | 147 window.addEventListener('load', doTest, false); |
| 148 </script> | 148 </script> |
| 149 </head> | 149 </head> |
| 150 | 150 |
| 151 <body> | 151 <body> |
| 152 </body> | 152 </body> |
| 153 </html> | 153 </html> |
| OLD | NEW |