| Index: content/renderer/input/input_handler_proxy.cc
|
| diff --git a/content/renderer/input/input_handler_proxy.cc b/content/renderer/input/input_handler_proxy.cc
|
| index f51632c1087dd06005acb9c91bc3887d03861b2f..f75dc9d2fc2007078fed92fdbf38f8626b6c91d3 100644
|
| --- a/content/renderer/input/input_handler_proxy.cc
|
| +++ b/content/renderer/input/input_handler_proxy.cc
|
| @@ -4,11 +4,9 @@
|
|
|
| #include "content/renderer/input/input_handler_proxy.h"
|
|
|
| -#include "base/auto_reset.h"
|
| #include "base/debug/trace_event.h"
|
| #include "base/logging.h"
|
| #include "base/metrics/histogram.h"
|
| -#include "content/common/input/did_overscroll_params.h"
|
| #include "content/common/input/web_input_event_traits.h"
|
| #include "content/renderer/input/input_handler_proxy_client.h"
|
| #include "third_party/WebKit/public/platform/Platform.h"
|
| @@ -371,16 +369,8 @@
|
| client_->DidStopFlinging();
|
| }
|
|
|
| -void InputHandlerProxy::DidOverscroll(
|
| - const gfx::Vector2dF& accumulated_overscroll,
|
| - const gfx::Vector2dF& latest_overscroll_delta) {
|
| +void InputHandlerProxy::DidOverscroll(const cc::DidOverscrollParams& params) {
|
| DCHECK(client_);
|
| -
|
| - DidOverscrollParams params;
|
| - params.accumulated_overscroll = accumulated_overscroll;
|
| - params.latest_overscroll_delta = latest_overscroll_delta;
|
| - params.current_fling_velocity = current_fling_velocity_;
|
| -
|
| if (fling_curve_) {
|
| static const int kFlingOverscrollThreshold = 1;
|
| disallow_horizontal_fling_scroll_ |=
|
| @@ -413,7 +403,6 @@
|
| had_fling_animation);
|
| fling_curve_.reset();
|
| gesture_scroll_on_impl_thread_ = false;
|
| - current_fling_velocity_ = gfx::Vector2dF();
|
| fling_parameters_ = blink::WebActiveWheelFlingParameters();
|
| if (send_fling_stopped_notification && had_fling_animation)
|
| client_->DidStopFlinging();
|
| @@ -463,22 +452,15 @@
|
| return gfx::Vector2dF(-increment.width, -increment.height);
|
| }
|
|
|
| -bool InputHandlerProxy::scrollBy(const WebFloatSize& increment,
|
| - const WebFloatSize& velocity) {
|
| +void InputHandlerProxy::scrollBy(const WebFloatSize& increment) {
|
| WebFloatSize clipped_increment;
|
| - WebFloatSize clipped_velocity;
|
| - if (!disallow_horizontal_fling_scroll_) {
|
| + if (!disallow_horizontal_fling_scroll_)
|
| clipped_increment.width = increment.width;
|
| - clipped_velocity.width = velocity.width;
|
| - }
|
| - if (!disallow_vertical_fling_scroll_) {
|
| + if (!disallow_vertical_fling_scroll_)
|
| clipped_increment.height = increment.height;
|
| - clipped_velocity.height = velocity.height;
|
| - }
|
| -
|
| - current_fling_velocity_ = clipped_velocity;
|
| +
|
| if (clipped_increment == WebFloatSize())
|
| - return false;
|
| + return;
|
|
|
| TRACE_EVENT2("input",
|
| "InputHandlerProxy::scrollBy",
|
| @@ -495,7 +477,6 @@
|
| break;
|
| case WebGestureEvent::Touchscreen:
|
| clipped_increment = ToClientScrollIncrement(clipped_increment);
|
| - clipped_velocity = ToClientScrollIncrement(clipped_velocity);
|
| did_scroll = input_handler_->ScrollBy(fling_parameters_.point,
|
| clipped_increment);
|
| break;
|
| @@ -505,8 +486,17 @@
|
| fling_parameters_.cumulativeScroll.width += clipped_increment.width;
|
| fling_parameters_.cumulativeScroll.height += clipped_increment.height;
|
| }
|
| -
|
| - return did_scroll;
|
| +}
|
| +
|
| +void InputHandlerProxy::notifyCurrentFlingVelocity(
|
| + const WebFloatSize& velocity) {
|
| + TRACE_EVENT2("input",
|
| + "InputHandlerProxy::notifyCurrentFlingVelocity",
|
| + "vx",
|
| + velocity.width,
|
| + "vy",
|
| + velocity.height);
|
| + input_handler_->NotifyCurrentFlingVelocity(ToClientScrollIncrement(velocity));
|
| }
|
|
|
| } // namespace content
|
|
|