kidReflowState.reason = eReflowReason_Initial;
reason = eReflowReason_Initial;
ViewportFrame::ReflowFixedFrame(nsIPresContext*          aPresContext,                                const nsHTMLReflowState& aReflowState,                                nsIFrame*                aKidFrame,                                PRBool                   aInitialReflow,                                nsReflowStatus&          aStatus) const{  // Reflow the frame  nsresult  rv;  nsHTMLReflowMetrics kidDesiredSize(nsnull);  nsSize              availSize(aReflowState.availableWidth, NS_UNCONSTRAINEDSIZE);  nsHTMLReflowState   kidReflowState(aPresContext, aReflowState, aKidFrame,                                     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;  }      // Send the WillReflow() notification and position the frame  aKidFrame->WillReflow(aPresContext);  aKidFrame->MoveTo(aPresContext,                     kidReflowState.mComputedOffsets.left + kidReflowState.mComputedMargin.left,                    kidReflowState.mComputedOffsets.top + kidReflowState.mComputedMargin.top);    // Position its view  nsContainerFrame::PositionFrameView(aPresContext, aKidFrame);  // Do the reflow  rv = aKidFrame->Reflow(aPresContext, kidDesiredSize, kidReflowState, aStatus);  if (NS_AUTOOFFSET == kidReflowState.mComputedOffsets.left)    kidReflowState.mComputedOffsets.left = aReflowState.mComputedWidth -        kidReflowState.mComputedOffsets.right -        kidReflowState.mComputedMargin.right -        kidReflowState.mComputedBorderPadding.right -        kidDesiredSize.width -        kidReflowState.mComputedBorderPadding.left -        kidReflowState.mComputedMargin.left;  if (NS_AUTOOFFSET == kidReflowState.mComputedOffsets.top)    kidReflowState.mComputedOffsets.top = aReflowState.mComputedHeight -        kidReflowState.mComputedOffsets.bottom -        kidReflowState.mComputedMargin.bottom -        kidReflowState.mComputedBorderPadding.bottom -        kidDesiredSize.height -        kidReflowState.mComputedBorderPadding.top -        kidReflowState.mComputedMargin.top;  // XXX If the child had a fixed height, then make sure it respected it...  if (NS_AUTOHEIGHT != kidReflowState.mComputedHeight) {    if (kidDesiredSize.height < kidReflowState.mComputedHeight) {      kidDesiredSize.height = kidReflowState.mComputedHeight;      kidDesiredSize.height += kidReflowState.mComputedBorderPadding.top +                               kidReflowState.mComputedBorderPadding.bottom;    }  }  // Position the child  nsRect  rect(kidReflowState.mComputedOffsets.left + kidReflowState.mComputedMargin.left,               kidReflowState.mComputedOffsets.top + kidReflowState.mComputedMargin.top,               kidDesiredSize.width, kidDesiredSize.height);  aKidFrame->SetRect(aPresContext, rect);  // Size and position the view and set its opacity, visibility, content  // transparency, and clip  nsIView* kidView;  aKidFrame->GetView(aPresContext, &kidView);  nsContainerFrame::SyncFrameViewAfterReflow(aPresContext, aKidFrame, kidView,                                             &kidDesiredSize.mOverflowArea);  aKidFrame->DidReflow(aPresContext, nsnull, NS_FRAME_REFLOW_FINISHED);  return rv;}