Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1410)

Unified Diff: content/browser/renderer_host/input/mouse_wheel_event_queue.cc

Issue 2625453002: Touchpad and wheel scroll latching for ChromeOS behind flag. (Closed)
Patch Set: ScrollEnd gets called when the fling ends before hitting a scroll extent. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/input/mouse_wheel_event_queue.cc
diff --git a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
index 113fb42dfd9320b48cc975863a8423fe7ec313cf..0d92d81583175a3b6dd5283d9166ad93c27ad320 100644
--- a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
@@ -278,8 +278,17 @@ void MouseWheelEventQueue::OnGestureScrollEvent(
gesture_event.event.type ==
blink::WebInputEvent::GestureFlingStart)) {
scrolling_device_ = blink::WebGestureDeviceUninitialized;
- if (scroll_end_timer_.IsRunning())
- scroll_end_timer_.Reset();
+ if (scroll_end_timer_.IsRunning()) {
+ if (enable_scroll_latching_) {
+ // Don't send the pending ScrollEnd if a fling is happening.
+ // The next wheel event will still need a ScrollBegin.
+ scroll_end_timer_.Stop();
+ needs_scroll_begin_ = true;
+ needs_scroll_end_ = false;
+ } else {
+ scroll_end_timer_.Reset();
+ }
+ }
}
}
« no previous file with comments | « no previous file | content/renderer/input/input_handler_wrapper.cc » ('j') | ui/events/blink/input_handler_proxy_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698