Complete switch away from nsBlockReflowState::mAvailSpaceRect by removing the old members. (Bug 25888) r+sr=roc
authorL. David Baron <dbaron@dbaron.org>
Wed, 08 Apr 2009 13:52:37 -0700
changeset 27105 f82ad9a10b7dffc6a56bc50fd403bd82dae6d517
parent 27104 8fdfeef7e0764bf89ea7763534c53cec5ac12f5a
child 27106 e5b1ab03542642f3de010c3eb31c3e4484f32e3c
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs25888
milestone1.9.2a1pre
Complete switch away from nsBlockReflowState::mAvailSpaceRect by removing the old members. (Bug 25888) r+sr=roc
layout/generic/nsBlockReflowState.cpp
layout/generic/nsBlockReflowState.h
--- 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