зеркало из https://github.com/mozilla/gecko-dev.git
Bug 575336. Stop flushing out layout on the whole viewmanager tree when layout is flushed on a document and results in invalidates. r=roc
This commit is contained in:
Родитель
a7d7581a19
Коммит
9320409321
|
@ -4827,12 +4827,6 @@ PresShell::FlushPendingNotifications(mozFlushType aType)
|
|||
// immediately
|
||||
updateFlags = NS_VMREFRESH_IMMEDIATE;
|
||||
}
|
||||
else if (aType < Flush_InterruptibleLayout) {
|
||||
// Not flushing reflows, so do deferred invalidates. This will keep us
|
||||
// from possibly flushing out reflows due to invalidates being processed
|
||||
// at the end of this view batch.
|
||||
updateFlags = NS_VMREFRESH_DEFERRED;
|
||||
}
|
||||
batch.EndUpdateViewBatch(updateFlags);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1580,27 +1580,7 @@ nsViewManager::FlushPendingInvalidates()
|
|||
{
|
||||
NS_ASSERTION(IsRootVM(), "Must be root VM for this to be called!\n");
|
||||
NS_ASSERTION(mUpdateBatchCnt == 0, "Must not be in an update batch!");
|
||||
// XXXbz this is probably not quite OK yet, if callers can explicitly
|
||||
// DisableRefresh while we have an event posted.
|
||||
// NS_ASSERTION(mRefreshEnabled, "How did we get here?");
|
||||
|
||||
// Let all the view observers of all viewmanagers in this tree know that
|
||||
// we're about to "paint" (this lets them get in their invalidates now so
|
||||
// we don't go through two invalidate-processing cycles).
|
||||
NS_ASSERTION(gViewManagers, "Better have a viewmanagers array!");
|
||||
|
||||
// Make sure to not send WillPaint notifications while scrolling
|
||||
if (mScrollCnt == 0) {
|
||||
// Disable refresh while we notify our view observers, so that if they do
|
||||
// view update batches we don't reenter this code and so that we batch
|
||||
// all of them together. We don't use
|
||||
// BeginUpdateViewBatch/EndUpdateViewBatch, since that would reenter this
|
||||
// exact code, but we want the effect of a single big update batch.
|
||||
++mUpdateBatchCnt;
|
||||
CallWillPaintOnObservers();
|
||||
--mUpdateBatchCnt;
|
||||
}
|
||||
|
||||
if (mHasPendingUpdates) {
|
||||
ProcessPendingUpdates(mRootView, PR_TRUE);
|
||||
mHasPendingUpdates = PR_FALSE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче