Commit cd733145 authored by Sahel Sharify's avatar Sahel Sharify Committed by Commit Bot

Fixed timestamp for the GSB sent after deferred fling cancellation.

When a GFC arrives, the fling controller doesn't cancel the active fling
immediately. If the user starts a new scroll sequence while the fling
cancellation is deferred, the controller suppresses the GSB/GSU events
till either a new GFS arrives and the current fling gets boosted, or
the controller decides that it is gonna cancel the fling and resume
the new scroll sequence. To resume the new scroll sequence the controller
sends a GSB since the original GSB of the sequence is suppressed.

This cl changes the GSB event to have the timestamp of the last
suppressed event instead of using the current time. This change is
necessary to make sure that the monotonic time of a scroll sequence is
not violated.

Bug: 839051
Change-Id: I295de64deaad4b072ec69a1bbbc192f182577cf4
Reviewed-on: https://chromium-review.googlesource.com/1043017Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Commit-Queue: Sahel Sharifymoghaddam <sahel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556063}
parent 732cc141
...@@ -347,7 +347,6 @@ void FlingController::CancelCurrentFling() { ...@@ -347,7 +347,6 @@ void FlingController::CancelCurrentFling() {
WebInputEvent::kGestureScrollUpdate)) { WebInputEvent::kGestureScrollUpdate)) {
WebGestureEvent scroll_begin_event = last_fling_boost_event; WebGestureEvent scroll_begin_event = last_fling_boost_event;
scroll_begin_event.SetType(WebInputEvent::kGestureScrollBegin); scroll_begin_event.SetType(WebInputEvent::kGestureScrollBegin);
scroll_begin_event.SetTimeStamp(base::TimeTicks::Now());
bool is_update = bool is_update =
last_fling_boost_event.GetType() == WebInputEvent::kGestureScrollUpdate; last_fling_boost_event.GetType() == WebInputEvent::kGestureScrollUpdate;
float delta_x_hint = float delta_x_hint =
......
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