Initialize the scroll values in the ScrollTimeline constructor
MozReview-Commit-ID: BXOowmuq8Ir
--- a/dom/animation/ScrollTimeline.h
+++ b/dom/animation/ScrollTimeline.h
@@ -50,16 +50,17 @@ public:
, mElement(aTarget)
, mCurrentScroll(0)
, mMinScroll(0)
, mMaxScroll(0)
{
mScrollObserver = new ScrollObserverImpl(this);
aTarget->RegistScrollTimelineObserver(mScrollObserver);
CalculateTimeRange();
+ SetScrollValues();
}
protected:
virtual ~ScrollTimeline()
{
MOZ_ASSERT(!mIsObservingRefreshDriver, "Timeline should have disassociated"
" from the refresh driver before being destroyed");
if (mScrollObserver) {