| Index: ui/base/gestures/gesture_sequence.cc
|
| diff --git a/ui/base/gestures/gesture_sequence.cc b/ui/base/gestures/gesture_sequence.cc
|
| index 115229ab71a4c71069272d4239656878e0e836f1..235f4183e31b94314e9665b5a09eb0cfaea6b337 100644
|
| --- a/ui/base/gestures/gesture_sequence.cc
|
| +++ b/ui/base/gestures/gesture_sequence.cc
|
| @@ -296,7 +296,13 @@ float CalibrateFlingVelocity(float velocity) {
|
| nu += x * a;
|
| x *= normalized_velocity;
|
| }
|
| - return nu * velocity;
|
| + fprintf(stderr, ">>> velo %f\n", nu * velocity);
|
| + fprintf(stderr, ">>> capped velo %f\n", std::max(nu * velocity,
|
| + GestureConfiguration::fling_velocity_cap()));
|
| + if (velocity < 0.f)
|
| + return std::max(nu * velocity, -GestureConfiguration::fling_velocity_cap());
|
| + else
|
| + return std::min(nu * velocity, GestureConfiguration::fling_velocity_cap());
|
| }
|
|
|
| } // namespace
|
|
|