Complete switch away from nsBlockReflowState::mAvailSpaceRect by removing the old members. (
Bug 25888) r+sr=roc
--- a/layout/generic/nsBlockReflowState.cpp
+++ b/layout/generic/nsBlockReflowState.cpp
@@ -518,27 +518,16 @@ nsBlockReflowState::RecoverStateFrom(nsL
}
#endif
// And then put the translation back again
mFloatManager->Translate(bp.left, bp.top);
}
}
PRBool
-nsBlockReflowState::IsImpactedByFloat() const
-{
-#ifdef REALLY_NOISY_REFLOW
- printf("nsBlockReflowState::IsImpactedByFloat %p returned %d\n",
- this, mBandHasFloats);
-#endif
- return mBandHasFloats;
-}
-
-
-PRBool
nsBlockReflowState::InitFloat(nsLineLayout& aLineLayout,
nsPlaceholderFrame* aPlaceholder,
nscoord aAvailableWidth,
nsReflowStatus& aReflowStatus)
{
// Set the geometric parent of the float
nsIFrame* floatFrame = aPlaceholder->GetOutOfFlowFrame();
floatFrame->SetParent(mBlock);
--- a/layout/generic/nsBlockReflowState.h
+++ b/layout/generic/nsBlockReflowState.h
@@ -96,22 +96,16 @@ public:
PRBool GetFloatAvailableSpace(nscoord aY, PRBool aRelaxHeightConstraint,
nsRect& aResult) const
{ return GetFloatAvailableSpaceWithState(aY, aRelaxHeightConstraint,
nsnull, aResult); }
PRBool GetFloatAvailableSpaceWithState(nscoord aY,
PRBool aRelaxHeightConstraint,
nsFloatManager::SavedState *aState,
nsRect& aResult) const;
- /* FIXME: To be removed */
- void GetAvailableSpace() { GetAvailableSpace(mY, PR_FALSE); }
- void GetAvailableSpace(nscoord aY, PRBool aRelaxHeightConstraint) {
- mBandHasFloats =
- GetFloatAvailableSpace(aY, aRelaxHeightConstraint, mAvailSpaceRect);
- }
/*
* The following functions all return PR_TRUE if they were able to
* place the float, PR_FALSE if the float did not fit in available
* space.
*/
PRBool InitFloat(nsLineLayout& aLineLayout,
nsPlaceholderFrame* aPlaceholderFrame,
@@ -192,18 +186,16 @@ public:
void AdvanceToNextLine() {
if (GetFlag(BRS_LINE_LAYOUT_EMPTY)) {
SetFlag(BRS_LINE_LAYOUT_EMPTY, PR_FALSE);
} else {
mLineNumber++;
}
}
- PRBool IsImpactedByFloat() const;
-
nsLineBox* NewLineBox(nsIFrame* aFrame, PRInt32 aCount, PRBool aIsBlock);
void FreeLineBox(nsLineBox* aLine);
//----------------------------------------
// This state is the "global" state computed once for the reflow of
// the block.
@@ -267,20 +259,16 @@ public:
// which we know is adjacent to the top of the block (in other words,
// all lines before it are empty and do not have clearance. This line is
// always before the current line.
nsLineList::iterator mLineAdjacentToTop;
// The current Y coordinate in the block
nscoord mY;
- // The available space within the current band.
- // (relative to the *content*-rect of the block)
- nsRect mAvailSpaceRect;
-
// The combined area of all floats placed so far
nsRect mFloatCombinedArea;
nsFloatCacheFreeList mFloatCacheFreeList;
// Previous child. This is used when pulling up a frame to update
// the sibling list.
nsIFrame* mPrevChild;
@@ -313,21 +301,16 @@ public:
nscoord mMinLineHeight;
PRInt32 mLineNumber;
PRInt16 mFlags;
PRUint8 mFloatBreakType;
- // The number of floats on the sides of mAvailSpaceRect, including
- // floats that do not reduce mAvailSpaceRect because they are in the
- // margins.
- PRPackedBool mBandHasFloats;
-
void SetFlag(PRUint32 aFlag, PRBool aValue)
{
NS_ASSERTION(aFlag<=BRS_LASTFLAG, "bad flag");
NS_ASSERTION(aValue==PR_FALSE || aValue==PR_TRUE, "bad value");
if (aValue) { // set flag
mFlags |= aFlag;
}
else { // unset flag