chromium/third_party/blink/renderer/platform/widget/input/elastic_overscroll_controller_exponential.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/platform/widget/input/elastic_overscroll_controller_exponential.h"
#include "build/build_config.h"
#include "ui/gfx/geometry/vector2d_conversions.h"

namespace blink {

namespace {
#if BUILDFLAG(IS_ANDROID)
constexpr double kRubberbandStiffness = 20;
constexpr double kRubberbandAmplitude = 0.2f;
constexpr double kRubberbandPeriod = 1.1f;
#else
constexpr double kRubberbandStiffness =;
constexpr double kRubberbandAmplitude =;
constexpr double kRubberbandPeriod =;
#endif
}  // namespace

ElasticOverscrollControllerExponential::ElasticOverscrollControllerExponential(
    cc::ScrollElasticityHelper* helper)
    :{}

void ElasticOverscrollControllerExponential::DidEnterMomentumAnimatedState() {}

// For these functions which compute the stretch amount, always return a
// rounded value, instead of a floating-point value. The reason for this is
// that Blink's scrolling can become erratic with fractional scroll amounts (in
// particular, if you have a scroll offset of 0.5, Blink will never actually
// bring that value back to 0, which breaks the logic used to determine if a
// layer is pinned in a direction).

gfx::Vector2d ElasticOverscrollControllerExponential::StretchAmountForTimeDelta(
    const base::TimeDelta& delta) const {}

gfx::Vector2d
ElasticOverscrollControllerExponential::StretchAmountForAccumulatedOverscroll(
    const gfx::Vector2dF& accumulated_overscroll) const {}

gfx::Vector2d
ElasticOverscrollControllerExponential::AccumulatedOverscrollForStretchAmount(
    const gfx::Vector2dF& delta) const {}
}  // namespace blink