Recalc quotes and counters before reflow. Bug 377216, r+sr=dbaron

This commit is contained in:
bzbarsky@mit.edu 2007-04-15 17:11:34 -07:00
parent e6d41ebe8b
commit 357c10a896
3 changed files with 20 additions and 12 deletions

View File

@ -10180,24 +10180,30 @@ nsCSSFrameConstructor::EndUpdate()
// This is the end of our last update. Before we decrement
// mUpdateCount, recalc quotes and counters as needed.
if (mQuotesDirty) {
mQuotesDirty = PR_FALSE;
mQuoteList.RecalcAll();
}
if (mCountersDirty) {
mCountersDirty = PR_FALSE;
mCounterManager.RecalcAll();
}
NS_ASSERTION(!mQuotesDirty, "Quotes updates will be lost");
NS_ASSERTION(!mCountersDirty, "Counter updates will be lost");
RecalcQuotesAndCounters();
NS_ASSERTION(mUpdateCount == 1, "Odd update count");
}
--mUpdateCount;
}
void
nsCSSFrameConstructor::RecalcQuotesAndCounters()
{
if (mQuotesDirty) {
mQuotesDirty = PR_FALSE;
mQuoteList.RecalcAll();
}
if (mCountersDirty) {
mCountersDirty = PR_FALSE;
mCounterManager.RecalcAll();
}
NS_ASSERTION(!mQuotesDirty, "Quotes updates will be lost");
NS_ASSERTION(!mCountersDirty, "Counter updates will be lost");
}
void
nsCSSFrameConstructor::WillDestroyFrameTree()
{

View File

@ -133,6 +133,7 @@ public:
void BeginUpdate() { ++mUpdateCount; }
void EndUpdate();
void RecalcQuotesAndCounters();
void WillDestroyFrameTree();

View File

@ -4602,6 +4602,7 @@ PresShell::FlushPendingNotifications(mozFlushType aType)
}
if (aType & Flush_OnlyReflow) {
mFrameConstructor->RecalcQuotesAndCounters();
ProcessReflowCommands(PR_FALSE);
}