Bug 402893: don't scale up col prefWidth by % if it's nscoord_MAX. r+sr=roc, a=mtschrep

This commit is contained in:
dholbert@cs.stanford.edu 2007-11-15 09:59:49 -08:00
Родитель 28c4fa48c7
Коммит 0d23f498fd
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -611,8 +611,10 @@ BasicTableLayoutStrategy::ComputeIntrinsicWidths(nsIRenderingContext* aRendering
// intrinsic widths.
float p = colFrame->GetPrefPercent();
if (p > 0.0f) {
nscoord new_small_pct_expand =
nscoord(float(colFrame->GetPrefCoord()) / p);
nscoord colPref = colFrame->GetPrefCoord();
nscoord new_small_pct_expand =
(colPref == nscoord_MAX ?
nscoord_MAX : nscoord(float(colPref) / p));
if (new_small_pct_expand > max_small_pct_pref) {
max_small_pct_pref = new_small_pct_expand;
}