Bug 1219296 - Remove StartSmoothScroll()'s argument, which is no longer used. r=kats
MozReview-Commit-ID: DlnaEQLCvlf
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -702,17 +702,16 @@ public:
private:
AsyncPanZoomController& mApzc;
};
class SmoothScrollAnimation : public AsyncPanZoomAnimation {
public:
SmoothScrollAnimation(AsyncPanZoomController& aApzc,
- ScrollSource aSource,
const nsPoint &aInitialPosition,
const nsPoint &aInitialVelocity,
const nsPoint& aDestination, double aSpringConstant,
double aDampingRatio)
: mApzc(aApzc)
, mXAxisModel(aInitialPosition.x, aDestination.x, aInitialVelocity.x,
aSpringConstant, aDampingRatio)
, mYAxisModel(aInitialPosition.y, aDestination.y, aInitialVelocity.y,
@@ -2591,27 +2590,26 @@ void AsyncPanZoomController::HandleFling
}
void AsyncPanZoomController::HandleSmoothScrollOverscroll(const ParentLayerPoint& aVelocity) {
// We must call BuildOverscrollHandoffChain from this deferred callback
// function in order to avoid a deadlock when acquiring the tree lock.
HandleFlingOverscroll(aVelocity, BuildOverscrollHandoffChain(), nullptr);
}
-void AsyncPanZoomController::StartSmoothScroll(ScrollSource aSource) {
+void AsyncPanZoomController::StartSmoothScroll() {
SetState(SMOOTH_SCROLL);
nsPoint initialPosition = CSSPoint::ToAppUnits(mFrameMetrics.GetScrollOffset());
// Cast velocity from ParentLayerPoints/ms to CSSPoints/ms then convert to
// appunits/second
nsPoint initialVelocity = CSSPoint::ToAppUnits(CSSPoint(mX.GetVelocity(),
mY.GetVelocity())) * 1000.0f;
nsPoint destination = CSSPoint::ToAppUnits(mFrameMetrics.GetSmoothScrollOffset());
StartAnimation(new SmoothScrollAnimation(*this,
- aSource,
initialPosition, initialVelocity,
destination,
gfxPrefs::ScrollBehaviorSpringConstant(),
gfxPrefs::ScrollBehaviorDampingRatio()));
}
void AsyncPanZoomController::StartOverscrollAnimation(const ParentLayerPoint& aVelocity) {
SetState(OVERSCROLL_ANIMATION);
@@ -3493,17 +3491,17 @@ void AsyncPanZoomController::NotifyLayer
if (mState == SMOOTH_SCROLL && mAnimation) {
APZC_LOG("%p updating destination on existing animation\n", this);
RefPtr<SmoothScrollAnimation> animation(
static_cast<SmoothScrollAnimation*>(mAnimation.get()));
animation->SetDestination(
CSSPoint::ToAppUnits(aLayerMetrics.GetSmoothScrollOffset()));
} else {
CancelAnimation();
- StartSmoothScroll(ScrollSource::DOM);
+ StartSmoothScroll();
}
}
if (needContentRepaint) {
RequestContentRepaint();
}
UpdateSharedCompositorFrameMetrics();
}
--- a/gfx/layers/apz/src/AsyncPanZoomController.h
+++ b/gfx/layers/apz/src/AsyncPanZoomController.h
@@ -874,17 +874,17 @@ private:
void HandleSmoothScrollOverscroll(const ParentLayerPoint& aVelocity);
// Helper function used by AttemptFling().
void AcceptFling(FlingHandoffState& aHandoffState);
// Start an overscroll animation with the given initial velocity.
void StartOverscrollAnimation(const ParentLayerPoint& aVelocity);
- void StartSmoothScroll(ScrollSource aSource);
+ void StartSmoothScroll();
// Returns whether overscroll is allowed during an event.
bool AllowScrollHandoffInCurrentBlock() const;
void AcknowledgeScrollUpdate() const;
/* ===================================================================
* The functions and members in this section are used to make ancestor chains