#include "third_party/blink/renderer/platform/widget/input/elastic_overscroll_controller_bezier.h"
#include "ui/gfx/geometry/vector2d_conversions.h"
namespace blink {
namespace {
constexpr double kOverscrollBoundaryMultiplier = …;
constexpr double kBounceBackMaxDurationMilliseconds = …;
constexpr double kBounceBackMillisecondsPerPixel = …;
constexpr double kIgnoreForwardBounceVelocityThreshold = …;
constexpr double kOverbounceMaxDurationMilliseconds = …;
constexpr double kOverbounceMillisecondsPerPixel = …;
constexpr double kOverbounceDistanceMultiplier = …;
constexpr double kBounceForwardsX1 = …;
constexpr double kBounceForwardsY1 = …;
constexpr double kBounceForwardsX2 = …;
constexpr double kBounceForwardsY2 = …;
constexpr double kBounceBackwardsX1 = …;
constexpr double kBounceBackwardsY1 = …;
constexpr double kBounceBackwardsX2 = …;
constexpr double kBounceBackwardsY2 = …;
base::TimeDelta CalculateBounceForwardsDuration(
double bounce_forwards_distance) { … }
base::TimeDelta CalculateBounceBackDuration(double bounce_back_distance) { … }
}
gfx::CubicBezier InitialVelocityBasedBezierCurve(const double initial_velocity,
const double x1,
const double y1,
const double x2,
const double y2) { … }
ElasticOverscrollControllerBezier::ElasticOverscrollControllerBezier(
cc::ScrollElasticityHelper* helper)
: … { … }
gfx::Vector2dF ElasticOverscrollControllerBezier::OverscrollBoundary(
const gfx::Size& scroller_bounds) const { … }
void ElasticOverscrollControllerBezier::DidEnterMomentumAnimatedState() { … }
double ElasticOverscrollControllerBezier::StretchAmountForForwardBounce(
const gfx::CubicBezier bounce_forwards_curve,
const base::TimeDelta& delta,
const base::TimeDelta& bounce_forwards_duration,
const double velocity,
const double initial_stretch,
const double bounce_forwards_distance) const { … }
double ElasticOverscrollControllerBezier::StretchAmountForBackwardBounce(
const gfx::CubicBezier bounce_backwards_curve,
const base::TimeDelta& delta,
const base::TimeDelta& bounce_backwards_duration,
const double bounce_forwards_distance) const { … }
gfx::Vector2d ElasticOverscrollControllerBezier::StretchAmountForTimeDelta(
const base::TimeDelta& delta) const { … }
gfx::Vector2d
ElasticOverscrollControllerBezier::StretchAmountForAccumulatedOverscroll(
const gfx::Vector2dF& accumulated_overscroll) const { … }
gfx::Vector2d
ElasticOverscrollControllerBezier::AccumulatedOverscrollForStretchAmount(
const gfx::Vector2dF& stretch_amount) const { … }
}