RAPTOR_STOPWATCH_DEBUGTRACE(("Stop: Reflow: PresShell::InitialReflow(), this=%p\n", this));
PresShell::InitialReflow(nscoord aWidth, nscoord aHeight){  nsIContent* root = nsnull;  StCaretHider  caretHider(this);			// stack-based class hides caret until dtor.    EnterReflowLock();  if (mPresContext) {    nsRect r(0, 0, aWidth, aHeight);    mPresContext->SetVisibleArea(r);  }  if (mDocument) {    root = mDocument->GetRootContent();  }  if (nsnull != root) {    NS_RESET_AND_START_STOPWATCH(mFrameCreationWatch)    if (nsnull == mRootFrame) {      // Have style sheet processor construct a frame for the      // precursors to the root content object's frame      mStyleSet->ConstructRootFrame(mPresContext, root, mRootFrame);    }    // Have the style sheet processor construct frame for the root    // content object down    mStyleSet->ContentInserted(mPresContext, nsnull, root, 0);    NS_RELEASE(root);    VERIFY_STYLE_TREE;    NS_STOP_STOPWATCH(mFrameCreationWatch)  }  if (nsnull != mRootFrame) {    NS_RESET_AND_START_STOPWATCH(mReflowWatch)    // Kick off a top-down reflow    NS_FRAME_LOG(NS_FRAME_TRACE_CALLS,                 ("enter nsPresShell::InitialReflow: %d,%d", aWidth, aHeight));#ifdef NS_DEBUG    if (nsIFrame::GetVerifyTreeEnable()) {      mRootFrame->VerifyTree();    }#endif#ifdef DEBUG_kipp    nsPresShell_ReflowStackPointerTop = (char*) &aWidth;#endif    nsRect                bounds;    mPresContext->GetVisibleArea(bounds);    nsSize                maxSize(bounds.width, bounds.height);    nsHTMLReflowMetrics   desiredSize(nsnull);    nsReflowStatus        status;    nsIHTMLReflow*        htmlReflow;    nsIRenderingContext*  rcx = nsnull;    CreateRenderingContext(mRootFrame, &rcx);    nsHTMLReflowState reflowState(*mPresContext, mRootFrame,                                  eReflowReason_Initial, rcx, maxSize);    if (NS_OK == mRootFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {      htmlReflow->Reflow(*mPresContext, desiredSize, reflowState, status);      mRootFrame->SizeTo(desiredSize.width, desiredSize.height);      mPresContext->SetVisibleArea(nsRect(0,0,desiredSize.width,desiredSize.height));      #ifdef NS_DEBUG      if (nsIFrame::GetVerifyTreeEnable()) {        mRootFrame->VerifyTree();      }#endif      VERIFY_STYLE_TREE;    }    NS_IF_RELEASE(rcx);    NS_FRAME_LOG(NS_FRAME_TRACE_CALLS, ("exit nsPresShell::InitialReflow"));    NS_STOP_STOPWATCH(mReflowWatch)  }  ExitReflowLock();  return NS_OK; //XXX this needs to be real. MMP}