From 2aba039789ddf641bd3339640afb99eba17646bf Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Sun, 15 Apr 2001 17:08:04 +0000 Subject: [PATCH] bug 60807 - reduce avail width by fixed widths when calculating colspan widths. sr=attinasi, r=bernd.mielke@snafu.de git-svn-id: svn://10.0.0.236/trunk@92356 18797224-902f-48f8-a5cc-f745e15eee43 --- .../layout/html/table/src/BasicTableLayoutStrategy.cpp | 10 +++++----- mozilla/layout/tables/BasicTableLayoutStrategy.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp index a128f01495f..ba514217d9e 100644 --- a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -672,12 +672,12 @@ BasicTableLayoutStrategy::ComputeNonPctColspanWidths(PRInt32 aWidthInd fixLimitTotal = ((fixTotal - fixMinTotal) < availWidth) ? fixTotal - fixMinTotal : availWidth; desLimitTotal = ((autoDesTotal - autoMinTotal) < availWidth) ? autoDesTotal - autoMinTotal : availWidth; } - else { - if (autoDesTotal > 0) { - availWidth -= pctTotal + fixTotal; // the pct and fix cols already reached their values + else { // FIX or DES_CON with LIMIT_NONE + if (FIX == aWidthIndex) { + availWidth -= pctTotal; } - else if (fixTotal > 0) { - availWidth -= pctTotal; // the pct already reached their values + else if (DES_CON == aWidthIndex) { + availWidth -= pctTotal + fixTotal; } } diff --git a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index a128f01495f..ba514217d9e 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp @@ -672,12 +672,12 @@ BasicTableLayoutStrategy::ComputeNonPctColspanWidths(PRInt32 aWidthInd fixLimitTotal = ((fixTotal - fixMinTotal) < availWidth) ? fixTotal - fixMinTotal : availWidth; desLimitTotal = ((autoDesTotal - autoMinTotal) < availWidth) ? autoDesTotal - autoMinTotal : availWidth; } - else { - if (autoDesTotal > 0) { - availWidth -= pctTotal + fixTotal; // the pct and fix cols already reached their values + else { // FIX or DES_CON with LIMIT_NONE + if (FIX == aWidthIndex) { + availWidth -= pctTotal; } - else if (fixTotal > 0) { - availWidth -= pctTotal; // the pct already reached their values + else if (DES_CON == aWidthIndex) { + availWidth -= pctTotal + fixTotal; } }