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

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

Issue 2158423002: Wheel scroll latching enabled behind flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: features deleted from blink features. Created 4 years, 5 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 d1d3bc22276279290e8cde1271e27591b76b26e3..7e7f67647084abeb659804e9757b508c05f5d95e 100644
--- a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
@@ -41,6 +41,8 @@ MouseWheelEventQueue::MouseWheelEventQueue(MouseWheelEventQueueClient* client,
scroll_transaction_ms_(scroll_transaction_ms),
scrolling_device_(blink::WebGestureDeviceUninitialized) {
DCHECK(client);
+ touchpad_scroll_latching_ =
ericrk 2016/07/19 20:21:51 nit: it seems odd/fragile to set this variable bas
sahel 2016/07/19 22:47:03 Done.
+ scroll_transaction_ms_ == kDefaultWheelScrollTransactionMs ? false : true;
}
MouseWheelEventQueue::~MouseWheelEventQueue() {
@@ -169,7 +171,7 @@ void MouseWheelEventQueue::ProcessMouseWheelAck(
if (needs_scroll_begin_) {
// If no GSB has been sent, it will be a non-synthetic GSB.
SendScrollBegin(scroll_update, false);
- } else if (has_phase_info) {
+ } else if (has_phase_info && !touchpad_scroll_latching_) {
// If a GSB has been sent, generate a synthetic GSB if we have phase
// information. This should be removed once crbug.com/526463 is fully
// implemented.
@@ -192,7 +194,8 @@ void MouseWheelEventQueue::ProcessMouseWheelAck(
// Generate a synthetic GSE for every update to force hit testing so
// that the non-latching behavior is preserved. Remove once
// crbug.com/526463 is fully implemented.
- SendScrollEnd(scroll_update, true);
+ if (!touchpad_scroll_latching_)
+ SendScrollEnd(scroll_update, true);
} else {
scroll_end_timer_.Start(
FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698