From ba55bbdc33dc464b920d68f0b0db0ebf9d65bd57 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Mon, 7 Mar 2005 20:48:12 +0000 Subject: [PATCH] Bug 281267. Force reflow of lines during absolute incremental reflow if the block is not a space manager, because we need to push our floats (or our descendants') into the space manager. r+sr=dbaron git-svn-id: svn://10.0.0.236/trunk@170315 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 37143800390..3acaaa0c418 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -623,11 +623,18 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext, autoSpaceManager.CreateSpaceManagerFor(aPresContext, this); // See if it's an incremental reflow command targeted only at - // absolute frames. If so we can skip a whole lot of work via this - // fast path. + // absolute frames and we can skip ReflowDirtyLines(). + PRBool needToReflowLines = aMetrics.mComputeMEW || + // If we have lines with clearance, we need to check their positions + (GetStateBits() & NS_BLOCK_HAS_CLEAR_CHILDREN) || + // The areas of any floats in this block or in blocks under us + // need to be put into the space manager --- unless we are our own + // space manager, in which case it doesn't matter. + !(GetStateBits() & NS_BLOCK_SPACE_MGR); + if (mAbsoluteContainer.HasAbsoluteFrames() && eReflowReason_Incremental == aReflowState.reason && - !aMetrics.mComputeMEW && + !needToReflowLines && mAbsoluteContainer.ReflowingAbsolutesOnly(this, aReflowState)) { nsSize containingBlockSize = CalculateContainingBlockSizeForAbsolutes(aReflowState, GetSize());