float percent = ((float)aColInfo[i]->mMaxWidth) / (float)aDivisor; aDivisor -= aColInfo[i]->mMaxWidth;
float percent = ((float)aColInfo[i]->mMaxWidth - (float)aColInfo[i]->mMinWidth) / (float)aDivisor; aDivisor -= aColInfo[i]->mMaxWidth - aColInfo[i]->mMinWidth;
AC_Increase(PRInt32     aNumAutoCols,            nsColInfo** aColInfo,            PRInt32     aDivisor,            PRInt32&    aAvailWidth){  for (PRInt32 i = 0; i < aNumAutoCols; i++) {    if ((aAvailWidth <= 0) || (aDivisor <= 0)) {      break;    }    float percent = ((float)aColInfo[i]->mMaxWidth) / (float)aDivisor;    aDivisor -= aColInfo[i]->mMaxWidth;    nscoord addition = NSToCoordRound(((float)(aAvailWidth)) * percent);    // if its the last col, try to give what's left to it    if ((i == aNumAutoCols - 1) && (addition < aAvailWidth)) {      addition = aAvailWidth;    }    // don't let the addition exceed what is available to add    addition = PR_MIN(addition, aAvailWidth);    // don't go over the col max    addition = PR_MIN(addition, aColInfo[i]->mMaxWidth - aColInfo[i]->mWidth);    aColInfo[i]->mWidth += addition;    aAvailWidth -= addition;  }}