| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 div { | 5 div { |
| 6 width: 100px; | 6 width: 100px; |
| 7 height: 100px; | 7 height: 100px; |
| 8 background-color: yellow; | 8 background-color: yellow; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 transform:translateZ(0); | 26 transform:translateZ(0); |
| 27 z-index: 0; | 27 z-index: 0; |
| 28 position: absolute; | 28 position: absolute; |
| 29 top: 50px; | 29 top: 50px; |
| 30 } | 30 } |
| 31 </style> | 31 </style> |
| 32 <script> | 32 <script> |
| 33 if (window.testRunner) | 33 if (window.testRunner) |
| 34 testRunner.dumpAsText(); | 34 testRunner.dumpAsText(); |
| 35 | 35 |
| 36 if (window.internals) | |
| 37 window.internals.settings.setLayerSquashingEnabled(true); | |
| 38 | |
| 39 function doTest() { | 36 function doTest() { |
| 40 if (window.internals) | 37 if (window.internals) |
| 41 window.internals.forceCompositingUpdate(document); | 38 window.internals.forceCompositingUpdate(document); |
| 42 document.getElementById('host').style.left = '100px'; | 39 document.getElementById('host').style.left = '100px'; |
| 43 document.getElementById('console').textContent = window.internals.layerT
reeAsText(document); | 40 document.getElementById('console').textContent = window.internals.layerT
reeAsText(document); |
| 44 } | 41 } |
| 45 </script> | 42 </script> |
| 46 </head> | 43 </head> |
| 47 <body onload='doTest()'> | 44 <body onload='doTest()'> |
| 48 <div id='background'></div> | 45 <div id='background'></div> |
| 49 <div id='squashed'></div> | 46 <div id='squashed'></div> |
| 50 <div id='host'></div> | 47 <div id='host'></div> |
| 51 | 48 |
| 52 <p style='position: relative; top: 200px;' style='display:none'> | 49 <p style='position: relative; top: 200px;' style='display:none'> |
| 53 This tests that squashed layers' offset from renderer is updated properly. I
f not properly updated, | 50 This tests that squashed layers' offset from renderer is updated properly. I
f not properly updated, |
| 54 the two divs will appear to be aligned vertically in the pixel results, whil
e really the blue div | 51 the two divs will appear to be aligned vertically in the pixel results, whil
e really the blue div |
| 55 ('squashed') should be offset 100px left of the green ('host'). | 52 ('squashed') should be offset 100px left of the green ('host'). |
| 56 </p> | 53 </p> |
| 57 <pre id='console' style='position: relative; top: 200px;'></pre> | 54 <pre id='console' style='position: relative; top: 200px;'></pre> |
| 58 </body> | 55 </body> |
| 59 </html> | 56 </html> |
| OLD | NEW |