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

Side by Side Diff: content/browser/renderer_host/input/mouse_wheel_event_queue.cc

Issue 1911013002: PDF scrolling with wheel gestures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/input/mouse_wheel_event_queue.h" 5 #include "content/browser/renderer_host/input/mouse_wheel_event_queue.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/trace_event/trace_event.h" 9 #include "base/trace_event/trace_event.h"
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 TRACE_EVENT0("input", "MouseWheelEventQueue::ProcessMouseWheelAck"); 77 TRACE_EVENT0("input", "MouseWheelEventQueue::ProcessMouseWheelAck");
78 if (!event_sent_for_gesture_ack_) 78 if (!event_sent_for_gesture_ack_)
79 return; 79 return;
80 80
81 event_sent_for_gesture_ack_->latency.AddNewLatencyFrom(latency_info); 81 event_sent_for_gesture_ack_->latency.AddNewLatencyFrom(latency_info);
82 client_->OnMouseWheelEventAck(*event_sent_for_gesture_ack_, ack_result); 82 client_->OnMouseWheelEventAck(*event_sent_for_gesture_ack_, ack_result);
83 83
84 // If event wasn't consumed then generate a gesture scroll for it. 84 // If event wasn't consumed then generate a gesture scroll for it.
85 if (send_gestures_ && ack_result != INPUT_EVENT_ACK_STATE_CONSUMED && 85 if (send_gestures_ && ack_result != INPUT_EVENT_ACK_STATE_CONSUMED &&
86 event_sent_for_gesture_ack_->event.canScroll && 86 event_sent_for_gesture_ack_->event.canScroll &&
87 event_sent_for_gesture_ack_->event.resendingPluginId == -1 &&
87 (scrolling_device_ == blink::WebGestureDeviceUninitialized || 88 (scrolling_device_ == blink::WebGestureDeviceUninitialized ||
88 scrolling_device_ == blink::WebGestureDeviceTouchpad)) { 89 scrolling_device_ == blink::WebGestureDeviceTouchpad)) {
89 WebGestureEvent scroll_update; 90 WebGestureEvent scroll_update;
90 scroll_update.timeStampSeconds = 91 scroll_update.timeStampSeconds =
91 event_sent_for_gesture_ack_->event.timeStampSeconds; 92 event_sent_for_gesture_ack_->event.timeStampSeconds;
92 93
93 scroll_update.x = event_sent_for_gesture_ack_->event.x; 94 scroll_update.x = event_sent_for_gesture_ack_->event.x;
94 scroll_update.y = event_sent_for_gesture_ack_->event.y; 95 scroll_update.y = event_sent_for_gesture_ack_->event.y;
95 scroll_update.globalX = event_sent_for_gesture_ack_->event.globalX; 96 scroll_update.globalX = event_sent_for_gesture_ack_->event.globalX;
96 scroll_update.globalY = event_sent_for_gesture_ack_->event.globalY; 97 scroll_update.globalY = event_sent_for_gesture_ack_->event.globalY;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 scroll_begin.data.scrollBegin.targetViewport = false; 274 scroll_begin.data.scrollBegin.targetViewport = false;
274 scroll_begin.data.scrollBegin.deltaHintUnits = 275 scroll_begin.data.scrollBegin.deltaHintUnits =
275 gesture_update.data.scrollUpdate.deltaUnits; 276 gesture_update.data.scrollUpdate.deltaUnits;
276 277
277 needs_scroll_begin_ = false; 278 needs_scroll_begin_ = false;
278 needs_scroll_end_ = true; 279 needs_scroll_end_ = true;
279 client_->ForwardGestureEvent(scroll_begin); 280 client_->ForwardGestureEvent(scroll_begin);
280 } 281 }
281 282
282 } // namespace content 283 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698