Initialize the scroll values in the ScrollTimeline constructor draft
authorBotond Ballo <botond@mozilla.com>
Wed, 27 Jul 2016 15:46:26 -0400
changeset 393430 d1bfeb9f0c2fce2b49fd7b6a71e8ff6d2c3557b8
parent 393429 d6feb7e51adfbe4a622dda5dafe313ec6df76f01
child 393431 70b548f54fa5b55ef14d7f9a49f848f9d1f635d4
push id24313
push userbballo@mozilla.com
push dateWed, 27 Jul 2016 21:32:22 +0000
milestone50.0a1
Initialize the scroll values in the ScrollTimeline constructor MozReview-Commit-ID: BXOowmuq8Ir
dom/animation/ScrollTimeline.h
--- 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) {