| 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: hidden; | 9 overflow: hidden; |
| 10 border: 1px solid black; | 10 border: 1px solid black; |
| 11 } | 11 } |
| 12 | 12 |
| 13 .scroll-content { | 13 .scroll-content { |
| 14 height: 600px; | 14 height: 600px; |
| 15 } | 15 } |
| 16 | 16 |
| 17 .inner { | 17 .inner { |
| 18 position: relative; | 18 position: relative; |
| 19 width: 150px; | 19 width: 150px; |
| 20 height: 150px; | 20 height: 150px; |
| 21 margin-top: -10px; /* force overlap with the composited element */ | 21 margin-top: -10px; /* force overlap with the composited element */ |
| 22 margin-left: 10px; | 22 margin-left: 10px; |
| 23 box-sizing: border-box; | 23 box-sizing: border-box; |
| 24 border: 40px solid black; | 24 border: 40px solid black; |
| 25 } | 25 } |
| 26 | 26 |
| 27 .composited { | 27 .composited { |
| 28 height: 150px; | 28 height: 150px; |
| 29 width: 100px; | 29 width: 100px; |
| 30 -webkit-transform: translateZ(0); | 30 transform: translateZ(0); |
| 31 } | 31 } |
| 32 </style> | 32 </style> |
| 33 <script> | 33 <script> |
| 34 if (window.testRunner) | 34 if (window.testRunner) |
| 35 testRunner.waitUntilDone(); | 35 testRunner.waitUntilDone(); |
| 36 | 36 |
| 37 function doTest() | 37 function doTest() |
| 38 { | 38 { |
| 39 window.setTimeout(function() { | 39 window.setTimeout(function() { |
| 40 var container = document.getElementById('container'); | 40 var container = document.getElementById('container'); |
| 41 window.console.log('scrolling') | 41 window.console.log('scrolling') |
| 42 container.scrollTop = 100; | 42 container.scrollTop = 100; |
| 43 if (window.testRunner) | 43 if (window.testRunner) |
| 44 testRunner.notifyDone(); | 44 testRunner.notifyDone(); |
| 45 }, 0); | 45 }, 0); |
| 46 } | 46 } |
| 47 window.addEventListener('load', doTest, false); | 47 window.addEventListener('load', doTest, false); |
| 48 </script> | 48 </script> |
| 49 </head> | 49 </head> |
| 50 <body> | 50 <body> |
| 51 | 51 |
| 52 <div id="container"> | 52 <div id="container"> |
| 53 <div class="scroll-content"> | 53 <div class="scroll-content"> |
| 54 <div class="composited"></div> | 54 <div class="composited"></div> |
| 55 <div class="inner"></div> | 55 <div class="inner"></div> |
| 56 </div> | 56 </div> |
| 57 </div> | 57 </div> |
| 58 </body> | 58 </body> |
| 59 </html> | 59 </html> |
| OLD | NEW |