| <!DOCTYPE html> |
| <style> |
| ::-webkit-scrollbar { width: 0; height: 0; } |
| </style> |
| <script src="../resources/text-based-repaint.js"></script> |
| This tests if the caret position is aligned correctly w.r.t. composited scrolling. |
| The important bit is that the "invalidate paint rectangle" invalidation has a position of about 1000px in the |
| y direction. |
| <div id="scroller" style="overflow: scroll; will-change: transform; width: 100px; height: 100px"> |
| <div style="width: 10px; height: 1000px; background: lightgray"></div> |
| <input id="text" style="line-height: 1; font-size: 10; padding: 1px 0px 1px 1px; width:200px;"/> |
| </div> |
| <script> |
| window.testIsAsync = true; |
| onload = runRepaintAndPixelTest; |
| |
| function repaintTest() { |
| scroller.scrollTop = 200; |
| requestAnimationFrame(function() { |
| document.getElementById('text').focus(); |
| finishRepaintTest(); |
| }); |
| } |
| </script> |