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

This commit is contained in:
2007-11-15 09:59:49 -08:00
parent dd2982e084
commit dd59210635

View File

@@ -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;
}