Should clamp the scrolloffset during scroll animation |
||||
Issue descriptionCurrently, once we decide to animate a scroll to an offset, we update the scroll a little bit each frame until it reaches the specified offset. However, during the animation, the scroller's maximum scroll offset might become smaller than the specified offset. For example, on an android device, user wants to find a string in a page. After tapping the 'search' icon on the virtual keyboard, the smooth scroll is initialized but the window's size becomes larger as the virtual keyboard disappears. In such cases, if we still decide to animate to the originally specified offset, the page won't be rendered correctly. We should always clamp the scroll offset during the animation.
,
Nov 9
,
Nov 9
,
Nov 14
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/48c6865ab227d5776cd73a984ef34be7f90da2c0 commit 48c6865ab227d5776cd73a984ef34be7f90da2c0 Author: Sandra Sun <sunyunjia@chromium.org> Date: Wed Nov 14 02:34:29 2018 Should clamp the scrolloffset during scroll animation. Currently, once we decide to animate a scroll to an offset, we update the scroll a little bit each frame until it reaches the specified offset. However, during the animation, the scroller's maximum scroll offset might become smaller than the specified offset. For example, on an android device, a user wants to find a string in a page. After tapping the 'search' icon on the virtual keyboard, the smooth scroll is initialized but the window's size becomes larger as the virtual keyboard disappears. In such cases, if we still decide to animate to the originally specified offset, the page won't be rendered correctly. We should always clamp the scroll offset during the animation. Bug: 902905 Change-Id: I3a3117be0aff40bc012206d741f5142d12de2a7b Reviewed-on: https://chromium-review.googlesource.com/c/1329542 Commit-Queue: Sandra Sun <sunyunjia@chromium.org> Reviewed-by: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#607877} [add] https://crrev.com/48c6865ab227d5776cd73a984ef34be7f90da2c0/third_party/WebKit/LayoutTests/fast/scroll-behavior/smooth-scroll/clamp-scroll-offset-if-size-changes-during-animation.html [modify] https://crrev.com/48c6865ab227d5776cd73a984ef34be7f90da2c0/third_party/blink/renderer/core/scroll/scroll_animator_compositor_coordinator.cc
,
Nov 14
|
||||
►
Sign in to add a comment |
||||
Comment 1 by sunyunjia@chromium.org
, Nov 9