nsMargin childAreaOffset = GetChildAreaOffset( &aReflowState);
nsMargin childAreaOffset = GetChildAreaOffset(aPresContext, &aReflowState);
nsTableFrame::CalcMinAndPreferredWidths(const           nsHTMLReflowState& aReflowState,                                        PRBool          aCalcPrefWidthIfAutoWithPctCol,                                        nscoord&        aMinWidth,                                        nscoord&        aPrefWidth) {  aMinWidth = aPrefWidth = 0;  nscoord spacingX = GetCellSpacingX();  PRInt32 numCols = GetColCount();  for (PRInt32 colX = 0; colX < numCols; colX++) {     nsTableColFrame* colFrame = GetColFrame(colX);    if (!colFrame) continue;    aMinWidth += PR_MAX(colFrame->GetMinWidth(), colFrame->GetWidth(MIN_ADJ));    nscoord width = colFrame->GetFixWidth();    if (width <= 0) {      width = colFrame->GetDesWidth();    }    aPrefWidth += width;    if (GetNumCellsOriginatingInCol(colX) > 0) {      aMinWidth  += spacingX;      aPrefWidth += spacingX;    }  }  // if it is not a degenerate table, add the last spacing on the right and the borderPadding  if (numCols > 0) {    nsMargin childAreaOffset = GetChildAreaOffset( &aReflowState);    nscoord extra = spacingX + childAreaOffset.left + childAreaOffset.right;    aMinWidth  += extra;    aPrefWidth += extra;  }  aPrefWidth = PR_MAX(aMinWidth, aPrefWidth);  PRBool isPctWidth = PR_FALSE;  if (IsAutoWidth(&isPctWidth)) {    if (HasPctCol() && aCalcPrefWidthIfAutoWithPctCol &&         (NS_UNCONSTRAINEDSIZE != aReflowState.availableWidth)) {      // for an auto table with a pct cell, use the strategy's CalcPctAdjTableWidth      nscoord availWidth = CalcBorderBoxWidth(aReflowState);      availWidth = PR_MIN(availWidth, aReflowState.availableWidth);      if (mTableLayoutStrategy && IsAutoLayout()) {        aPrefWidth = mTableLayoutStrategy->CalcPctAdjTableWidth(aReflowState, availWidth);      }    }    if (0 == numCols) { // degenerate case      aMinWidth = aPrefWidth = 0;    }  }  else { // a specified fix width becomes the min or preferred width    nscoord compWidth = aReflowState.mComputedWidth;    if ((NS_UNCONSTRAINEDSIZE != compWidth) && (0 != compWidth) && !isPctWidth) {      nsMargin contentOffset = GetContentAreaOffset(&aReflowState);      compWidth += contentOffset.left + contentOffset.right;      aMinWidth = PR_MAX(aMinWidth, compWidth);      aPrefWidth = PR_MAX(aMinWidth, compWidth);    }  }}