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

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

Issue 784463002: Add initial CC support for scroll-blocks-on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with trunk Created 5 years, 10 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/renderer/input/input_handler_proxy.h" 5 #include "content/renderer/input/input_handler_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 break; 551 break;
552 } 552 }
553 return DID_NOT_HANDLE; 553 return DID_NOT_HANDLE;
554 } 554 }
555 555
556 InputHandlerProxy::EventDisposition InputHandlerProxy::HandleTouchStart( 556 InputHandlerProxy::EventDisposition InputHandlerProxy::HandleTouchStart(
557 const blink::WebTouchEvent& touch_event) { 557 const blink::WebTouchEvent& touch_event) {
558 for (size_t i = 0; i < touch_event.touchesLength; ++i) { 558 for (size_t i = 0; i < touch_event.touchesLength; ++i) {
559 if (touch_event.touches[i].state != WebTouchPoint::StatePressed) 559 if (touch_event.touches[i].state != WebTouchPoint::StatePressed)
560 continue; 560 continue;
561 if (input_handler_->HaveTouchEventHandlersAt( 561 if (input_handler_->DoTouchEventsBlockScrollAt(
562 gfx::Point(touch_event.touches[i].position.x, 562 gfx::Point(touch_event.touches[i].position.x,
563 touch_event.touches[i].position.y))) { 563 touch_event.touches[i].position.y))) {
564 // TODO(rbyers): We should consider still sending the touch events to
565 // main asynchronously (crbug.com/347272).
jdduke (slow) 2015/02/03 16:43:35 Might be nice to have a more specific bug for this
Rick Byers 2015/02/05 04:35:53 Yeah, good idea. At some point we might want to w
564 return DID_NOT_HANDLE; 566 return DID_NOT_HANDLE;
565 } 567 }
566 } 568 }
567 return DROP_EVENT; 569 return DROP_EVENT;
568 } 570 }
569 571
570 bool InputHandlerProxy::FilterInputEventForFlingBoosting( 572 bool InputHandlerProxy::FilterInputEventForFlingBoosting(
571 const WebInputEvent& event) { 573 const WebInputEvent& event) {
572 if (!WebInputEvent::isGestureEventType(event.type)) 574 if (!WebInputEvent::isGestureEventType(event.type))
573 return false; 575 return false;
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 // trigger a scroll, e.g., with a trivial time delta between fling updates. 942 // trigger a scroll, e.g., with a trivial time delta between fling updates.
941 // Return true in this case to prevent early fling termination. 943 // Return true in this case to prevent early fling termination.
942 if (std::abs(clipped_increment.width) < kScrollEpsilon && 944 if (std::abs(clipped_increment.width) < kScrollEpsilon &&
943 std::abs(clipped_increment.height) < kScrollEpsilon) 945 std::abs(clipped_increment.height) < kScrollEpsilon)
944 return true; 946 return true;
945 947
946 return did_scroll; 948 return did_scroll;
947 } 949 }
948 950
949 } // namespace content 951 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698