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

Side by Side Diff: content/renderer/input/render_widget_input_handler.cc

Issue 2052663004: Remove canScroll from WebMouseWheelEvent as it is unused now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/renderer/input/render_widget_input_handler.h" 5 #include "content/renderer/input/render_widget_input_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 for (size_t i = 0; i < touch_event.touchesLength; ++i) { 380 for (size_t i = 0; i < touch_event.touchesLength; ++i) {
381 if (touch_event.touches[i].state == WebTouchPoint::StatePressed && 381 if (touch_event.touches[i].state == WebTouchPoint::StatePressed &&
382 delegate_->HasTouchEventHandlersAt( 382 delegate_->HasTouchEventHandlersAt(
383 gfx::ToFlooredPoint(touch_event.touches[i].position))) { 383 gfx::ToFlooredPoint(touch_event.touches[i].position))) {
384 ack_result = INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 384 ack_result = INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
385 break; 385 break;
386 } 386 }
387 } 387 }
388 } 388 }
389 389
390 // Send mouse wheel events and their disposition to the compositor thread, so 390 // Send mouse wheel events and their disposition to the compositor thread, so
tdresser 2016/06/10 18:06:46 Update comment - not longer mouse wheel events. n
dtapuska 2016/06/10 19:11:17 Done.
391 // that they can be used to produce the elastic overscroll effect on Mac. 391 // that they can be used to produce the elastic overscroll effect on Mac.
392 if (input_event.type == WebInputEvent::MouseWheel) { 392 if (input_event.type == WebInputEvent::GestureScrollBegin ||
393 const WebMouseWheelEvent& wheel_event = 393 input_event.type == WebInputEvent::GestureScrollEnd ||
394 static_cast<const WebMouseWheelEvent&>(input_event); 394 input_event.type == WebInputEvent::GestureScrollUpdate) {
395 if (wheel_event.canScroll) {
396 delegate_->ObserveWheelEventAndResult(
397 wheel_event,
398 event_overscroll ? event_overscroll->latest_overscroll_delta
399 : gfx::Vector2dF(),
400 processed != WebInputEventResult::NotHandled);
401 }
402 } else if (input_event.type == WebInputEvent::GestureScrollBegin ||
403 input_event.type == WebInputEvent::GestureScrollEnd ||
404 input_event.type == WebInputEvent::GestureScrollUpdate) {
405 const WebGestureEvent& gesture_event = 395 const WebGestureEvent& gesture_event =
406 static_cast<const WebGestureEvent&>(input_event); 396 static_cast<const WebGestureEvent&>(input_event);
407 if (gesture_event.sourceDevice == blink::WebGestureDeviceTouchpad) { 397 if (gesture_event.sourceDevice == blink::WebGestureDeviceTouchpad) {
408 delegate_->ObserveGestureEventAndResult( 398 delegate_->ObserveGestureEventAndResult(
409 gesture_event, 399 gesture_event,
410 event_overscroll ? event_overscroll->latest_overscroll_delta 400 event_overscroll ? event_overscroll->latest_overscroll_delta
411 : gfx::Vector2dF(), 401 : gfx::Vector2dF(),
412 processed != WebInputEventResult::NotHandled); 402 processed != WebInputEventResult::NotHandled);
413 } 403 }
414 } 404 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 if (pending_input_event_ack_) { 555 if (pending_input_event_ack_) {
566 TRACE_EVENT_ASYNC_END0("input", 556 TRACE_EVENT_ASYNC_END0("input",
567 "RenderWidgetInputHandler::ThrottledInputEventAck", 557 "RenderWidgetInputHandler::ThrottledInputEventAck",
568 pending_input_event_ack_.get()); 558 pending_input_event_ack_.get());
569 delegate_->OnInputEventAck(std::move(pending_input_event_ack_)); 559 delegate_->OnInputEventAck(std::move(pending_input_event_ack_));
570 } 560 }
571 total_input_handling_time_this_frame_ = base::TimeDelta(); 561 total_input_handling_time_this_frame_ = base::TimeDelta();
572 } 562 }
573 563
574 } // namespace content 564 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698