Commit 6f5874d6 authored by Andrew Xu's avatar Andrew Xu Committed by Commit Bot

Fix issue that gesture scroll is not responsive

The type of scroll offset should be float instead of int to prevent the
decimal part from being cut.

Bug: 1050812
Change-Id: Id6ad2ba279c0bd6b48308a3d27de271c8a8ff70a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2047991Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740118}
parent 281ddc9e
......@@ -1557,7 +1557,7 @@ bool ScrollableShelfView::ProcessGestureEvent(const ui::GestureEvent& event) {
DCHECK(presentation_time_recorder_);
presentation_time_recorder_->RequestNext();
const int scroll_x = -event.details().scroll_x();
const float scroll_x = -event.details().scroll_x();
if (GetShelf()->IsHorizontalAlignment()) {
ScrollByXOffset(ShouldAdaptToRTL() ? -scroll_x : scroll_x,
/*animate=*/false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment