mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Backed out changeset 2e519e843706 (bug 1139220)
This commit is contained in:
parent
f17aaa31b2
commit
069f2a686b
@ -683,7 +683,12 @@ public:
|
||||
aSpringConstant, aDampingRatio)
|
||||
, mYAxisModel(aInitialPosition.y, aDestination.y, aInitialVelocity.y,
|
||||
aSpringConstant, aDampingRatio)
|
||||
, mSource(aSource)
|
||||
, mAllowOverscroll(true)
|
||||
{
|
||||
if (mSource == ScrollSource::Wheel) {
|
||||
mAllowOverscroll = mApzc.AllowScrollHandoffInWheelTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -728,7 +733,11 @@ public:
|
||||
ParentLayerPoint overscroll;
|
||||
ParentLayerPoint adjustedOffset;
|
||||
mApzc.mX.AdjustDisplacement(displacement.x, adjustedOffset.x, overscroll.x);
|
||||
mApzc.mY.AdjustDisplacement(displacement.y, adjustedOffset.y, overscroll.y);
|
||||
|
||||
bool forceVerticalOverscroll = mSource == ScrollSource::Wheel &&
|
||||
!aFrameMetrics.AllowVerticalScrollWithWheel();
|
||||
mApzc.mY.AdjustDisplacement(displacement.y, adjustedOffset.y, overscroll.y,
|
||||
forceVerticalOverscroll);
|
||||
|
||||
aFrameMetrics.ScrollBy(adjustedOffset / zoom);
|
||||
|
||||
@ -736,7 +745,7 @@ public:
|
||||
// This can happen if either the layout.css.scroll-behavior.damping-ratio
|
||||
// preference is set to less than 1 (underdamped) or if a smooth scroll
|
||||
// inherits velocity from a fling gesture.
|
||||
if (!IsZero(overscroll)) {
|
||||
if (!IsZero(overscroll) && mAllowOverscroll) {
|
||||
// Hand off a fling with the remaining momentum to the next APZC in the
|
||||
// overscroll handoff chain.
|
||||
|
||||
@ -773,6 +782,8 @@ public:
|
||||
private:
|
||||
AsyncPanZoomController& mApzc;
|
||||
AxisPhysicsMSDModel mXAxisModel, mYAxisModel;
|
||||
ScrollSource mSource;
|
||||
bool mAllowOverscroll;
|
||||
};
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user