if(mSubShell) { float t2p; aPresContext->GetTwipsToPixels(&t2p);
if (IsInline()) { if (kidMetrics.maxElementSize) { kidMetrics.maxElementSize->width += border.left + border.right; kidMetrics.maxElementSize->height += border.top + border.bottom; } }
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;}