aColAvailWidth += aCellSpacingX;
cellSpacing += aCellSpacingX;
CalcAvailWidth(nsTableFrame&     aTableFrame,               nscoord           aTableComputedWidth,               nsTableCellFrame& aCellFrame,               nscoord           aCellSpacingX,               nscoord&          aColAvailWidth,               nscoord&          aCellAvailWidth){  aColAvailWidth = aCellAvailWidth = 0;  PRInt32 colIndex;  aCellFrame.GetColIndex(colIndex);  PRInt32 colspan = aTableFrame.GetEffectiveColSpan(aCellFrame);  for (PRInt32 spanX = 0; spanX < colspan; spanX++) {    nscoord colWidth = aTableFrame.GetColumnWidth(colIndex + spanX);    if (colWidth > 0) {      aColAvailWidth += colWidth;    }    if ((spanX > 0) && (aTableFrame.GetNumCellsOriginatingInCol(colIndex + spanX) > 0)) {      aColAvailWidth += aCellSpacingX;    }  }  aCellAvailWidth = aColAvailWidth;  // for a cell with a colspan > 1, use its fix width (if set) as the  avail width   if (aTableFrame.GetEffectiveColSpan(aCellFrame) > 1) {    // see if the cell has a style width specified    const nsStylePosition* cellPosition;    aCellFrame.GetStyleData(eStyleStruct_Position, (const nsStyleStruct *&)cellPosition);    if (eStyleUnit_Coord == cellPosition->mWidth.GetUnit()) {      // need to add padding into fixed width      nsMargin padding(0,0,0,0);      if (NS_UNCONSTRAINEDSIZE != aTableComputedWidth) {        padding = nsTableFrame::GetPadding(nsSize(aTableComputedWidth, 0), &aCellFrame);      }      nscoord fixWidth = cellPosition->mWidth.GetCoordValue() + padding.left + padding.right;      aCellAvailWidth = PR_MIN(aColAvailWidth, fixWidth);    }  }}