зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 25a4a1aecec4 (bug 1131749) for gtest failures.
CLOSED TREE
This commit is contained in:
Родитель
5abea51e9a
Коммит
f225167cfe
|
@ -263,23 +263,6 @@ void Axis::StepOverscrollAnimation(double aStepDurationMilliseconds) {
|
|||
// Adjust the amount of overscroll based on the velocity.
|
||||
// Note that we allow for oscillations.
|
||||
mOverscroll += (mVelocity * aStepDurationMilliseconds);
|
||||
|
||||
// Our mechanism for translating a set of mOverscroll values that oscillate
|
||||
// around zero to a set of GetOverscroll() values that have the same sign
|
||||
// (so content is always stretched, never compressed) assumes that
|
||||
// mOverscroll does not exceed mFirstOverscrollAnimationSample in magnitude.
|
||||
// If our calculations were exact, this would be the case, as
|
||||
// mFirstOverscrollAnimationSample is the value of mOverscroll at the first
|
||||
// peak of the oscillation, and a dampened spring should never attain a
|
||||
// displacement greater in magnitude than a previous peak. In our
|
||||
// approximation calculations, however, this may not hold exactly. To ensure
|
||||
// the assumption is not violated, we clamp the magnitude of mOverscroll.
|
||||
if (fabs(mOverscroll) > fabs(mFirstOverscrollAnimationSample)) {
|
||||
mOverscroll = (mOverscroll >= 0)
|
||||
? fabs(mFirstOverscrollAnimationSample)
|
||||
: -fabs(mFirstOverscrollAnimationSample);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bool Axis::SampleOverscrollAnimation(const TimeDuration& aDelta) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче