WebUI Tab Strip: Animate scroll position
Since there is no native way to animate scroll with custom easing, speeds, and offsets, a manual animation is needed to animate the scroll position. This CL uses requestAnimationFrame to recursively update the scrollLeft property of the scrolling container. Depending on the refresh rate, the TabList will continuously update its own scroll position based on the time elapsed until the animation time is over. To customize easing, a deceleration function is used to generally mimic slowing of the animation towards the end. Bug: 1023492 Change-Id: Ib89e01c8f9e1fccd3d62b43fb5e7841a1cc311a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1951544 Commit-Queue: John Lee <johntlee@chromium.org> Reviewed-by:Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#721867}
Showing
Please register or sign in to comment