зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1235478 - Part 2: Don't update mMostRecentRefresh when nsRefreshDriver::ScheduleViewManagerFlush is called. r=mchang
--HG-- extra : transplant_source : %86e%80%9D%07%B0K%16%EB%FC%5D%9B%CA%D6%A1_%D2y%A0%7E
This commit is contained in:
Родитель
155e16e777
Коммит
3614d255d8
|
@ -1184,6 +1184,15 @@ nsRefreshDriver::EnsureTimerStarted(EnsureTimerStartedFlags aFlags)
|
|||
mActiveTimer->AddRefreshDriver(this);
|
||||
}
|
||||
|
||||
// When switching from an inactive timer to an active timer, the root
|
||||
// refresh driver is skipped due to being set to the content refresh
|
||||
// driver's timestamp. In case of EnsureTimerStarted is called from
|
||||
// ScheduleViewManagerFlush, we should avoid this behavior to flush
|
||||
// a paint in the same tick on the root refresh driver.
|
||||
if (aFlags & eNeverAdjustTimer) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Since the different timers are sampled at different rates, when switching
|
||||
// timers, the most recent refresh of the new timer may be *before* the
|
||||
// most recent refresh of the old timer. However, the refresh driver time
|
||||
|
@ -2108,7 +2117,7 @@ nsRefreshDriver::ScheduleViewManagerFlush()
|
|||
NS_ASSERTION(mPresContext->IsRoot(),
|
||||
"Should only schedule view manager flush on root prescontexts");
|
||||
mViewManagerFlushIsPending = true;
|
||||
EnsureTimerStarted();
|
||||
EnsureTimerStarted(eNeverAdjustTimer);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -330,7 +330,8 @@ private:
|
|||
enum EnsureTimerStartedFlags {
|
||||
eNone = 0,
|
||||
eForceAdjustTimer = 1 << 0,
|
||||
eAllowTimeToGoBackwards = 1 << 1
|
||||
eAllowTimeToGoBackwards = 1 << 1,
|
||||
eNeverAdjustTimer = 1 << 2,
|
||||
};
|
||||
void EnsureTimerStarted(EnsureTimerStartedFlags aFlags = eNone);
|
||||
void StopTimer();
|
||||
|
|
Загрузка…
Ссылка в новой задаче