if (NS_AUTOHEIGHT != kidReflowState.computedHeight) { if (kidDesiredSize.height < kidReflowState.computedHeight) { kidDesiredSize.height = kidReflowState.computedHeight;  nsMargin  borderPadding; nsHTMLReflowState::ComputeBorderPaddingFor(aKidFrame, &aReflowState, borderPadding); kidDesiredSize.height += borderPadding.top + borderPadding.bottom; } }
ViewportFrame::ReflowFixedFrame(nsIPresContext&          aPresContext,                                const nsHTMLReflowState& aReflowState,                                nsIFrame*                aKidFrame,                                PRBool                   aInitialReflow,                                nsReflowStatus&          aStatus) const{  // Reflow the frame  nsIHTMLReflow* htmlReflow;  nsresult       rv;  rv = aKidFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow);  if (NS_SUCCEEDED(rv)) {    htmlReflow->WillReflow(aPresContext);        nsHTMLReflowMetrics kidDesiredSize(nsnull);    nsSize              availSize(aReflowState.availableWidth, NS_UNCONSTRAINEDSIZE);    nsHTMLReflowState   kidReflowState(aPresContext, aKidFrame, aReflowState, availSize);        // If it's the initial reflow, then override the reflow reason. This is    // used when frames are inserted incrementally    if (aInitialReflow) {      kidReflowState.reason = eReflowReason_Initial;    }        // XXX Temporary hack until the block/inline code starts using 'computedWidth'    kidReflowState.availableWidth = kidReflowState.computedWidth;    htmlReflow->Reflow(aPresContext, kidDesiredSize, kidReflowState, aStatus);    // Position the child    nsRect  rect(kidReflowState.computedOffsets.left,                 kidReflowState.computedOffsets.top,                 kidDesiredSize.width, kidDesiredSize.height);    aKidFrame->SetRect(rect);    htmlReflow->DidReflow(aPresContext, NS_FRAME_REFLOW_FINISHED);  }  return rv;}