aStatus = NS_FRAME_COMPLETE;
nsIFrame* firstChild = mFrames.FirstChild(); nsHTMLReflowMetrics kidMetrics(aDesiredSize.maxElementSize); nsHTMLReflowState   kidReflowState(aPresContext, aReflowState, firstChild, innerSize); ReflowChild(firstChild, aPresContext, kidMetrics, kidReflowState, offset.x, offset.y, 0, aStatus); NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "bad status");
nsHTMLFrameInnerFrame::Reflow(nsIPresContext*          aPresContext,                              nsHTMLReflowMetrics&     aDesiredSize,                              const nsHTMLReflowState& aReflowState,                              nsReflowStatus&          aStatus){  DO_GLOBAL_REFLOW_COUNT("nsHTMLFrameInnerFrame", aReflowState.reason);  NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,     ("enter nsHTMLFrameInnerFrame::Reflow: maxSize=%d,%d reason=%d",      aReflowState.availableWidth,      aReflowState.availableHeight,      aReflowState.reason));  nsresult rv = NS_OK;  // use the max size set in aReflowState by the nsHTMLFrameOuterFrame as our size  GetDesiredSize(aPresContext, aReflowState, aDesiredSize);  aStatus = NS_FRAME_COMPLETE;  // resize the sub document  if(mSubShell) {    float t2p;    aPresContext->GetTwipsToPixels(&t2p);    PRInt32 x = 0;    PRInt32 y = 0;    mSubShell->GetPositionAndSize(&x, &y, nsnull, nsnull);    PRInt32 cx  = NSToCoordRound(aDesiredSize.width * t2p);    PRInt32 cy = NSToCoordRound(aDesiredSize.height * t2p);    mSubShell->SetPositionAndSize(x, y, cx, cy, PR_FALSE);    NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,      ("exit nsHTMLFrameInnerFrame::Reflow: size=%d,%d rv=%x",      aDesiredSize.width, aDesiredSize.height, aStatus));  }      return rv;}