Infinite scrolling thumb displacement.
Bug: When a thumb drag is in progress, the scroller will jump every time the scroller length changes. This happens because the pointer and the thumb always try to stay in sync with each other. Main thread scrollbars dont have this issue as they allow the thumb and pointer to get out of sync. Fix: If the scroller length increases mid thumb drag, we record the "displacement" delta and early out. This delta is then applied to every subsequent pointermove to ensure that that scroller retains its offset even when the scroller length changes. The downside of this approach is that the thumb and the pointer will get out of sync but the upside is that the scroller won't suddenly jump. Bug: 1067518 Change-Id: I773335db538b8595e96464f3306d2df9e82a58f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134923 Commit-Queue: Rahul Arakeri <arakeri@microsoft.com> Reviewed-by:David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#759288}
Showing
Please register or sign in to comment