Chromium Code Reviews| 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..70079e23308d10f1eeb85399332afa5a9555cc78 100644 |
| --- a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc |
| +++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc |
| @@ -34,13 +34,16 @@ class QueuedWebMouseWheelEvent : public MouseWheelEventWithLatencyInfo { |
| }; |
| MouseWheelEventQueue::MouseWheelEventQueue(MouseWheelEventQueueClient* client, |
| - int64_t scroll_transaction_ms) |
| + bool touchpad_scroll_latching) |
| : client_(client), |
| needs_scroll_begin_(true), |
| needs_scroll_end_(false), |
| - scroll_transaction_ms_(scroll_transaction_ms), |
| + touchpad_scroll_latching_(touchpad_scroll_latching), |
| scrolling_device_(blink::WebGestureDeviceUninitialized) { |
| DCHECK(client); |
| + scroll_transaction_ms_ = touchpad_scroll_latching |
| + ? kDefaultWheelScrollLatchingTransactionMs |
| + : kDefaultWheelScrollTransactionMs; |
|
tdresser
2016/07/22 15:43:15
I'm a bit confused here. Scroll transactions only
sahel
2016/07/25 15:54:53
If the flag is enabled, wheel scroll latching will
|
| } |
| MouseWheelEventQueue::~MouseWheelEventQueue() { |
| @@ -169,7 +172,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 +195,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, |