mIsMarginRoot(PR_FALSE), mCarriedOutTopMargin(0)
mIsTopMarginRoot(PR_FALSE), mIsBottomMarginRoot(PR_FALSE), mApplyTopMargin(PR_FALSE)
nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,                                       nsIPresContext& aPresContext,                                       nsBlockFrame* aFrame,                                       const nsHTMLReflowMetrics& aMetrics,                                       nsLineLayout* aLineLayout)  : mPresContext(aPresContext),    mReflowState(aReflowState),    mBlock(aFrame),    mPrevBottomMargin(0),    mNextRCFrame(nsnull),    mIsMarginRoot(PR_FALSE),    mCarriedOutTopMargin(0){  mLineLayout = aLineLayout;  mSpaceManager = aReflowState.spaceManager;  // Translate into our content area and then save the   // coordinate system origin for later.  const nsMargin& borderPadding = BorderPadding();  mSpaceManager->Translate(borderPadding.left, borderPadding.top);  mSpaceManager->GetTranslation(mSpaceManagerX, mSpaceManagerY);  mReflowStatus = NS_FRAME_COMPLETE;  mPresContext = aPresContext;  mBlock->GetNextInFlow((nsIFrame**)&mNextInFlow);  mKidXMost = 0;  // Compute content area width (the content area is inside the border  // and padding)  mUnconstrainedWidth = PR_FALSE;  if (NS_UNCONSTRAINEDSIZE != aReflowState.computedWidth) {    mContentArea.width = aReflowState.computedWidth;  }  else {    if (NS_UNCONSTRAINEDSIZE == aReflowState.availableWidth) {      mContentArea.width = NS_UNCONSTRAINEDSIZE;      mUnconstrainedWidth = PR_TRUE;    }    else {      nscoord lr = borderPadding.left + borderPadding.right;      mContentArea.width = aReflowState.availableWidth - lr;    }  }  // Compute content area height. Unlike the width, if we have a  // specified style height we ignore it since extra content is  // managed by the "overflow" property. When we don't have a  // specified style height then we may end up limiting our height if  // the availableHeight is constrained (this situation occurs when we  // are paginated).  mUnconstrainedHeight = PR_FALSE;  if (NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight) {    // We are in a paginated situation    mContentArea.height = aReflowState.availableHeight;  }  else {    // When we are not in a paginated situation then we always use    // an constrained height.    mUnconstrainedHeight = PR_TRUE;    mContentArea.height = NS_UNCONSTRAINEDSIZE;  }#if 0  if (NS_UNCONSTRAINEDSIZE == aReflowState.availableHeight) {    mUnconstrainedHeight = PR_TRUE;    mContentArea.height = aReflowState.availableHeight;  }  else {    // Use constrained height    nscoord tb = borderPadding.top + borderPadding.bottom;    mContentArea.height = aReflowState.availableHeight - tb;  }#endif  mY = borderPadding.top;  mBottomEdge = mContentArea.height;  mCurrentBand.Init(mSpaceManager, mContentArea);  mPrevChild = nsnull;  mCurrentLine = nsnull;  mPrevLine = nsnull;  const nsStyleText* styleText;  mBlock->GetStyleData(eStyleStruct_Text,                       (const nsStyleStruct*&) styleText);  switch (styleText->mWhiteSpace) {  case NS_STYLE_WHITESPACE_PRE:  case NS_STYLE_WHITESPACE_NOWRAP:    mNoWrap = PR_TRUE;    break;  default:    mNoWrap = PR_FALSE;    break;  }  mComputeMaxElementSize = nsnull != aMetrics.maxElementSize;;  mMaxElementSize.SizeTo(0, 0);  if ((0 != borderPadding.top) || (0 != borderPadding.bottom)) {    mIsMarginRoot = PR_TRUE;  }}