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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_event_handler.cc

Issue 2933353003: Mark the ET_MOUSE_MOVED created from a pointer grab as synthesized. (Closed)
Patch Set: Clarify comment. Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura_browsertest.cc » ('j') | 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/render_widget_host_view_event_handler.h" 5 #include "content/browser/renderer_host/render_widget_host_view_event_handler.h"
6 6
7 #include "base/metrics/user_metrics.h" 7 #include "base/metrics/user_metrics.h"
8 #include "base/metrics/user_metrics_action.h" 8 #include "base/metrics/user_metrics_action.h"
9 #include "content/browser/renderer_host/input/touch_selection_controller_client_ aura.h" 9 #include "content/browser/renderer_host/input/touch_selection_controller_client_ aura.h"
10 #include "content/browser/renderer_host/overscroll_controller.h" 10 #include "content/browser/renderer_host/overscroll_controller.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // event->handled to true (http://crbug.com/577983). 300 // event->handled to true (http://crbug.com/577983).
301 301
302 if (mouse_locked_) { 302 if (mouse_locked_) {
303 HandleMouseEventWhileLocked(event); 303 HandleMouseEventWhileLocked(event);
304 return; 304 return;
305 } 305 }
306 306
307 // As the overscroll is handled during scroll events from the trackpad, the 307 // As the overscroll is handled during scroll events from the trackpad, the
308 // RWHVA window is transformed by the overscroll controller. This transform 308 // RWHVA window is transformed by the overscroll controller. This transform
309 // triggers a synthetic mouse-move event to be generated (by the aura 309 // triggers a synthetic mouse-move event to be generated (by the aura
310 // RootWindow). But this event interferes with the overscroll gesture. So, 310 // RootWindow). Also, with a touchscreen, we may get a synthetic mouse-move
311 // ignore such synthetic mouse-move events if an overscroll gesture is in 311 // caused by a pointer grab. But these events interfere with the overscroll
312 // progress. 312 // gesture. So, ignore such synthetic mouse-move events if an overscroll
313 // gesture is in progress.
313 OverscrollController* overscroll_controller = 314 OverscrollController* overscroll_controller =
314 delegate_->overscroll_controller(); 315 delegate_->overscroll_controller();
315 if (overscroll_controller && 316 if (overscroll_controller &&
316 overscroll_controller->overscroll_mode() != OVERSCROLL_NONE && 317 overscroll_controller->overscroll_mode() != OVERSCROLL_NONE &&
317 event->flags() & ui::EF_IS_SYNTHESIZED && 318 event->flags() & ui::EF_IS_SYNTHESIZED &&
318 (event->type() == ui::ET_MOUSE_ENTERED || 319 (event->type() == ui::ET_MOUSE_ENTERED ||
319 event->type() == ui::ET_MOUSE_EXITED || 320 event->type() == ui::ET_MOUSE_EXITED ||
320 event->type() == ui::ET_MOUSE_MOVED)) { 321 event->type() == ui::ET_MOUSE_MOVED)) {
321 event->StopPropagation(); 322 event->StopPropagation();
322 return; 323 return;
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 host_->ForwardWheelEventWithLatencyInfo(event, latency); 904 host_->ForwardWheelEventWithLatencyInfo(event, latency);
904 } 905 }
905 906
906 void RenderWidgetHostViewEventHandler::ProcessTouchEvent( 907 void RenderWidgetHostViewEventHandler::ProcessTouchEvent(
907 const blink::WebTouchEvent& event, 908 const blink::WebTouchEvent& event,
908 const ui::LatencyInfo& latency) { 909 const ui::LatencyInfo& latency) {
909 host_->ForwardTouchEventWithLatencyInfo(event, latency); 910 host_->ForwardTouchEventWithLatencyInfo(event, latency);
910 } 911 }
911 912
912 } // namespace content 913 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698