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

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

Issue 2182693003: Filter GestureFlingStarts with Vx=Vy=0 in RenderWidgetHostViewChildFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/input_router_impl.h" 5 #include "content/browser/renderer_host/input/input_router_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 default: 421 default:
422 break; 422 break;
423 } 423 }
424 424
425 return consumed; 425 return consumed;
426 } 426 }
427 427
428 bool InputRouterImpl::OfferToRenderer(const WebInputEvent& input_event, 428 bool InputRouterImpl::OfferToRenderer(const WebInputEvent& input_event,
429 const ui::LatencyInfo& latency_info, 429 const ui::LatencyInfo& latency_info,
430 InputEventDispatchType dispatch_type) { 430 InputEventDispatchType dispatch_type) {
431 DCHECK(input_event.type != blink::WebInputEvent::GestureFlingStart ||
432 static_cast<const blink::WebGestureEvent&>(input_event)
433 .data.flingStart.velocityX != 0.0 ||
434 static_cast<const blink::WebGestureEvent&>(input_event)
435 .data.flingStart.velocityY != 0.0);
436
431 // This conversion is temporary. WebInputEvent should be generated 437 // This conversion is temporary. WebInputEvent should be generated
432 // directly from ui::Event with the viewport coordinates. See 438 // directly from ui::Event with the viewport coordinates. See
433 // crbug.com/563730. 439 // crbug.com/563730.
434 std::unique_ptr<blink::WebInputEvent> event_in_viewport = 440 std::unique_ptr<blink::WebInputEvent> event_in_viewport =
435 ui::ScaleWebInputEvent(input_event, device_scale_factor_); 441 ui::ScaleWebInputEvent(input_event, device_scale_factor_);
436 const WebInputEvent* event_to_send = 442 const WebInputEvent* event_to_send =
437 event_in_viewport ? event_in_viewport.get() : &input_event; 443 event_in_viewport ? event_in_viewport.get() : &input_event;
438 444
439 if (Send(new InputMsg_HandleInputEvent(routing_id(), event_to_send, 445 if (Send(new InputMsg_HandleInputEvent(routing_id(), event_to_send,
440 latency_info, dispatch_type))) { 446 latency_info, dispatch_type))) {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 653
648 flush_requested_ = false; 654 flush_requested_ = false;
649 client_->DidFlush(); 655 client_->DidFlush();
650 } 656 }
651 657
652 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) { 658 void InputRouterImpl::SetFrameTreeNodeId(int frameTreeNodeId) {
653 frame_tree_node_id_ = frameTreeNodeId; 659 frame_tree_node_id_ = frameTreeNodeId;
654 } 660 }
655 661
656 } // namespace content 662 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698