From 9320409321266afdbf354f02f75034db63f6eac0 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 30 Jun 2010 18:54:29 -0700 Subject: [PATCH] Bug 575336. Stop flushing out layout on the whole viewmanager tree when layout is flushed on a document and results in invalidates. r=roc --- layout/base/nsPresShell.cpp | 6 ------ view/src/nsViewManager.cpp | 20 -------------------- 2 files changed, 26 deletions(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 73c7e3ab8c03..c125e5daad3e 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -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); } } diff --git a/view/src/nsViewManager.cpp b/view/src/nsViewManager.cpp index eaf9801ea8c9..298040603aa6 100644 --- a/view/src/nsViewManager.cpp +++ b/view/src/nsViewManager.cpp @@ -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;