if (aScrollAreaSize.width != NS_INTRINSICSIZE) { aScrollAreaSize.width -= aReflowState.mComputedPadding.left + aReflowState.mComputedPadding.right; if (aScrollAreaSize.width < 0) aScrollAreaSize.width = 0; }  if (aScrollAreaSize.height != NS_INTRINSICSIZE) { aScrollAreaSize.height -= aReflowState.mComputedPadding.top + aReflowState.mComputedPadding.bottom; if (aScrollAreaSize.height < 0) aScrollAreaSize.height = 0;  }
nsGfxScrollFrameInner::CalculateScrollAreaSize(nsIPresContext*          aPresContext,                                       const nsHTMLReflowState& aReflowState,                                       const nsSize&            aSbSize,                                       nsSize&                  aScrollAreaSize){  aScrollAreaSize.width = aReflowState.mComputedWidth;  aScrollAreaSize.height = aReflowState.mComputedHeight;  // get the current state  PRBool vert = mHasVerticalScrollbar;  PRBool horiz = mHasHorizontalScrollbar;  // reset everyting  mHasVerticalScrollbar = PR_FALSE;  mHasHorizontalScrollbar = PR_FALSE;  if (aReflowState.mStyleDisplay->mOverflow == NS_STYLE_OVERFLOW_SCROLL)   {    vert = PR_TRUE;    horiz = PR_TRUE;  }   else if (aReflowState.mStyleDisplay->mOverflow == NS_STYLE_OVERFLOW_SCROLLBARS_NONE)   {    vert = PR_FALSE;    horiz = PR_FALSE;  }   else if (aReflowState.mStyleDisplay->mOverflow == NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL)   {    vert = PR_TRUE;    horiz = PR_FALSE;  }  else if (aReflowState.mStyleDisplay->mOverflow == NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL)  {    vert = PR_FALSE;    horiz = PR_TRUE;  }  // add in the scrollbars.  if (horiz)    AddHorizontalScrollbar(aSbSize, aScrollAreaSize);    if (vert)    AddVerticalScrollbar(aSbSize, aScrollAreaSize);  return NS_OK;}