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

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: 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()) {
tdresser 2017/01/09 18:25:19 This should only happen if latching is enabled, ri
sahel 2017/01/09 20:02:01 If the latching is not enabled then the timeout fo
tdresser 2017/01/10 16:19:02 I missed that we do start the timer when latching
bokan 2017/01/10 18:53:58 I don't actually know how we implement task queues
sahel 2017/01/10 21:10:06 I don't know if timer tasks have priority or not,
+ 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;
bokan 2017/01/10 18:53:58 If the event is a GFS, do we still need a GSB?
sahel 2017/01/10 21:10:06 Yes, this is for making the gesture event sequence
bokan 2017/01/10 21:25:06 Ah, ok. Thanks for the explanation.
+ 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.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698