From 62fdbc435c6e7ab677cb3160a77cddec8fbbaddd Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 26 Jul 2005 21:33:28 +0000 Subject: [PATCH] Bug 223737. Lines that were pushed below a float should be treated as impacted by the float. r+sr=dbaron,a=bsmedberg git-svn-id: svn://10.0.0.236/trunk@176638 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index de658273ba7..6519777020e 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -3667,6 +3667,7 @@ nsBlockFrame::ReflowInlineFrames(nsBlockReflowState& aState, PRInt32 spins = 0; #endif PRUint8 lineReflowStatus = LINE_REFLOW_REDO; + PRBool didRedo = PR_FALSE; do { // Once upon a time we allocated the first 30 nsLineLayout objects // on the stack, and then we switched to the heap. At that time @@ -3685,6 +3686,10 @@ nsBlockFrame::ReflowInlineFrames(nsBlockReflowState& aState, aKeepReflowGoing, &lineReflowStatus, aUpdateMaximumWidth, aDamageDirtyArea); lineLayout.EndLineReflow(); + + if (LINE_REFLOW_REDO == lineReflowStatus) { + didRedo = PR_TRUE; + } #ifdef DEBUG spins++; @@ -3697,6 +3702,12 @@ nsBlockFrame::ReflowInlineFrames(nsBlockReflowState& aState, } while (NS_SUCCEEDED(rv) && LINE_REFLOW_REDO == lineReflowStatus); + // If we did at least one REDO, then the line did not fit next to some float. + // Mark it as impacted by a float, even if it no longer is next to a float. + if (didRedo) { + aLine->SetLineIsImpactedByFloat(PR_TRUE); + } + return rv; }