if ((nsnull != aReflowState.lineLayout) && (0 != aReflowState.lineLayout->GetPlacedFrames())) {
if (!aReflowState.lineLayout->LineIsEmpty()) {
nsInlineFrame::Reflow(nsIPresContext&          aPresContext,                      nsHTMLReflowMetrics&     aMetrics,                      const nsHTMLReflowState& aReflowState,                      nsReflowStatus&          aStatus){  DrainOverflow();  // Set our own reflow state (additional state above and beyond  // aReflowState)  InlineReflowState irs;  irs.mPrevFrame = nsnull;  irs.mInlineReflow = nsnull;  irs.mNextInFlow = (nsInlineFrame*) mNextInFlow;  if (eReflowReason_Incremental == aReflowState.reason) {    // Peel off the next frame in the path if this is an incremental    // reflow aimed at one of the children.    nsIFrame* target;    aReflowState.reflowCommand->GetTarget(target);    if (this != target) {      aReflowState.reflowCommand->GetNext(irs.mNextRCFrame);    }  }  else {    irs.mNextRCFrame = nsnull;  }  nsresult rv;  if (mFrames.IsEmpty()) {    // Try to pull over one frame before starting so that we know what    // state we should be in.    nsIFrame* frame = PullAnyFrame(irs);    if (nsnull == frame) {      // Nothing to pull, nothing to do...      aStatus = NS_FRAME_COMPLETE;      aMetrics.width = 0;      aMetrics.height = 0;      aMetrics.ascent = 0;      aMetrics.descent = 0;      aMetrics.mCarriedOutTopMargin = 0;      aMetrics.mCarriedOutBottomMargin = 0;      aMetrics.mCombinedArea.SetRect(0, 0, 0, 0);      if (nsnull != aMetrics.maxElementSize) {        aMetrics.maxElementSize->SizeTo(0, 0);      }      return NS_OK;    }  }  if (HaveAnonymousBlock()) {    if ((nsnull != aReflowState.lineLayout) &&        (0 != aReflowState.lineLayout->GetPlacedFrames())) {      // This inline frame cannot be placed on the current line      // because there already is an inline frame on this line (and we      // contain an anonymous block).      aStatus = NS_INLINE_LINE_BREAK_BEFORE();      rv = NS_OK;    }    else {      rv = ReflowBlockFrame(aPresContext, aReflowState, irs,                            aMetrics, aStatus);    }  }  else {    if (nsnull != aReflowState.lineLayout) {      rv = ReflowInlineFrames(aPresContext, aReflowState, irs,                              aMetrics, aStatus);    }    else {      rv = NS_ERROR_NULL_POINTER;    }  }  if (NS_SUCCEEDED(rv)) {    // If the combined area of our children exceeds our bounding box    // then set the NS_FRAME_OUTSIDE_CHILDREN flag, otherwise clear it.    if ((aMetrics.mCombinedArea.x < 0) ||        (aMetrics.mCombinedArea.y < 0) ||        (aMetrics.mCombinedArea.XMost() > aMetrics.width) ||        (aMetrics.mCombinedArea.YMost() > aMetrics.height)) {      mState |= NS_FRAME_OUTSIDE_CHILDREN;    }    else {      mState &= ~NS_FRAME_OUTSIDE_CHILDREN;    }  }  return rv;}