| OLD | NEW |
| (Empty) | |
| 1 <style> |
| 2 body { |
| 3 margin: 0; |
| 4 } |
| 5 |
| 6 .scroller { |
| 7 overflow: hidden; /* hide scrollbars */ |
| 8 width: 200px; |
| 9 height: 350px; |
| 10 outline: 2px solid black; |
| 11 } |
| 12 |
| 13 .container { |
| 14 width: 200px; |
| 15 height: 700px; |
| 16 } |
| 17 |
| 18 .outerSticky { |
| 19 display: inline; |
| 20 position: sticky; |
| 21 top: 0; |
| 22 } |
| 23 |
| 24 .innerSticky { |
| 25 display: inline; |
| 26 position: sticky; |
| 27 top: 25px; |
| 28 } |
| 29 </style> |
| 30 |
| 31 <script> |
| 32 if (window.testRunner) |
| 33 testRunner.waitUntilDone(); |
| 34 |
| 35 function finishTest() { |
| 36 document.querySelector('.scroller').scrollTop = 200; |
| 37 if (window.testRunner) |
| 38 testRunner.notifyDone(); |
| 39 } |
| 40 |
| 41 window.addEventListener('load', function() { |
| 42 requestAnimationFrame(function() { |
| 43 requestAnimationFrame(finishTest); |
| 44 }); |
| 45 }); |
| 46 </script> |
| 47 |
| 48 <div class="scroller"> |
| 49 <div class="container"> |
| 50 <div class="outerSticky">1<div class="innerSticky">2</div></div> |
| 51 </div> |
| 52 </div> |
| OLD | NEW |