diff --git a/layout/html/table/src/BasicTableLayoutStrategy.cpp b/layout/html/table/src/BasicTableLayoutStrategy.cpp
index a128f01495f..ba514217d9e 100644
--- a/layout/html/table/src/BasicTableLayoutStrategy.cpp
+++ b/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/layout/tables/BasicTableLayoutStrategy.cpp b/layout/tables/BasicTableLayoutStrategy.cpp
index a128f01495f..ba514217d9e 100644
--- a/layout/tables/BasicTableLayoutStrategy.cpp
+++ b/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;
}
}