| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../resources/text-based-repaint.js"></script> |
| <style> |
| |
| #scroller { |
| position: absolute; |
| left: 10px; |
| top: 60px; |
| height: 400px; |
| overflow: scroll; |
| width: 300px; |
| will-change: transform; |
| } |
| #block { |
| background-color: #cef; |
| height: 50px; |
| left: 50px; |
| position: absolute; |
| top: 200px; |
| width: 200px; |
| } |
| |
| </style> |
| </head> |
| <body onload="runRepaintAndPixelTest()"> |
| |
| This tests that an element which is moved by the synchronous layout in |
| Element::setScrollTop, and again by the scroll itself, has its original |
| location correctly invalidated. |
| |
| <div id="scroller"> |
| <div style="height: 900px"></div> |
| <div id="block"></div> |
| </div> |
| <script> |
| |
| function repaintTest() |
| { |
| document.querySelector("#block").style.top = '310px'; |
| document.querySelector("#scroller").scrollTop = 150; |
| } |
| |
| </script> |
| </body> |
| </html> |