Bug 1250550 - Ensure a scroll event posted during a refresh driver tick fires during that same tick. r=mats draft
authorBotond Ballo <botond@mozilla.com>
Wed, 24 Feb 2016 18:20:40 -0500
changeset 334335 3feb43fdb46777b4c8748fc580b9cff905b3b421
parent 334334 23a9886c3c7dae92d444e28a254d79b8d8efd45e
child 514883 201d2487286f36e0da165a10e37afdab91b5911a
push id11514
push userbballo@mozilla.com
push dateWed, 24 Feb 2016 23:32:55 +0000
reviewersmats
bugs1250550
milestone47.0a1
Bug 1250550 - Ensure a scroll event posted during a refresh driver tick fires during that same tick. r=mats MozReview-Commit-ID: 1ZvYjA6a5ay
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -4375,31 +4375,31 @@ void ScrollFrameHelper::CurPosAttributeC
 }
 
 /* ============= Scroll events ========== */
 
 ScrollFrameHelper::ScrollEvent::ScrollEvent(ScrollFrameHelper* aHelper)
   : mHelper(aHelper)
 {
   mDriver = mHelper->mOuter->PresContext()->RefreshDriver();
-  mDriver->AddRefreshObserver(this, Flush_Style);
+  mDriver->AddRefreshObserver(this, Flush_Layout);
 }
 
 ScrollFrameHelper::ScrollEvent::~ScrollEvent()
 {
   if (mDriver) {
     mDriver->RemoveRefreshObserver(this, Flush_Style);
     mDriver = nullptr;
   }
 }
 
 void
 ScrollFrameHelper::ScrollEvent::WillRefresh(mozilla::TimeStamp aTime)
 {
-  mDriver->RemoveRefreshObserver(this, Flush_Style);
+  mDriver->RemoveRefreshObserver(this, Flush_Layout);
   mDriver = nullptr;
   mHelper->FireScrollEvent();
 }
 
 void
 ScrollFrameHelper::FireScrollEvent()
 {
   MOZ_ASSERT(mScrollEvent);