Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style> | |
| 3 div::-webkit-scrollbar { | |
| 4 display: none; | |
| 5 } | |
| 6 </style> | |
| 7 <div id=scroller style="width: 400px; height: 400px; overflow-y: scroll; will-ch ange: transform"> | |
| 8 <div style="height: 400px"></div> | |
| 9 <div id=overlap style="backface-visibility: hidden; width: 100px; height: 100p x; background-color: red"></div> | |
| 10 <div id=target style="position: relative; top: -50px; left: 50px; width: 100px ; height: 100px; background-color: green"></div> | |
| 11 </div> | |
| 12 <div id="notscrolled" style="position: relative; width: 50px; height: 300px; bac kground: lightgray"></div> | |
| 13 <pre id=output></pre> | |
| 14 <script> | |
| 15 if (testRunner) { | |
| 16 testRunner.waitUntilDone(); | |
| 17 testRunner.dumpAsText(); | |
| 18 } | |
| 19 // Test passes if 'target' (green) is on top of 'overlap' (red). | |
| 20 // The actual test output is a layerization where 'overlap' has a composited lay er, | |
| 21 // and 'target' does, but 'notscrolled'. 'target' has a composited layer because | |
| 22 // it overlaps 'overlap'. 'notscrolled' does not have one because it does not | |
| 23 // intersect the scroller and is outside of it. | |
| 24 onload = function() { | |
| 25 requestAnimationFrame(function() { | |
| 26 requestAnimationFrame(function() { | |
| 27 scroller.scrollTop = 400; | |
| 28 if (internals) | |
| 29 output.innerHTML = internals.layerTreeAsText(document); | |
|
Ian Vollick
2016/10/19 20:16:31
nit: to avoid text diff churn, can you check the o
chrishtr
2016/10/19 21:44:51
Done.
| |
| 30 if (testRunner) | |
| 31 testRunner.notifyDone(); | |
| 32 }); | |
| 33 }); | |
| 34 }; | |
| 35 </script> | |
| OLD | NEW |