Skip to content

Commit

Permalink
m115: Fix fling requesting unnecessary ticks
Browse files Browse the repository at this point in the history
GenerateAndSendFlingProgressEvents can recursveily call StopFling, so
need to check `fling_curve_` again before requesting another tick.

(cherry picked from commit 20600d1)

Bug: 1450898
Change-Id: I38ea1f4eec7b8cefbbcf6b6f7483b1e65c28b8f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4584094
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Bo Liu <boliu@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1153214}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4599047
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/5790@{#455}
Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
  • Loading branch information
Bo Liu authored and Chromium LUCI CQ committed Jun 7, 2023
1 parent f01e13d commit 10b7369
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content/browser/renderer_host/input/fling_controller.cc
Expand Up @@ -249,7 +249,9 @@ void FlingController::ProgressFling(base::TimeTicks current_time) {

// As long as the fling curve is active, the fling progress must get
// scheduled even when the last delta to scroll was zero.
ScheduleFlingProgress();
if (fling_curve_) {
ScheduleFlingProgress();
}
}

void FlingController::StopFling() {
Expand Down

0 comments on commit 10b7369

Please sign in to comment.