From 4e81ba6679bb9537545c41650e32113c8b29cd38 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Wed, 12 Jan 2000 21:53:55 +0000 Subject: [PATCH] b=20772. Changed ColumnsAreValidFor() so that it correctly handles the case where the cell's desired width shrinks git-svn-id: svn://10.0.0.236/trunk@57573 18797224-902f-48f8-a5cc-f745e15eee43 --- .../layout/html/table/src/BasicTableLayoutStrategy.cpp | 10 ++++++++-- mozilla/layout/tables/BasicTableLayoutStrategy.cpp | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp index 4d501b4fc7d..f60a4374b9f 100644 --- a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -1793,8 +1793,14 @@ PRBool BasicTableLayoutStrategy::ColumnsAreValidFor(const nsTableCellFrame& aCel } PRBool desChanged = PR_TRUE; - if (((cellDes > aPrevCellDes) && (cellDes <= colDes)) || - ((cellDes <= aPrevCellDes) && (aPrevCellDes <= colDes))) { + if ((cellDes > aPrevCellDes) && (cellDes <= colDes)) { + // XXX This next check causes a problem if the cell's desired width shrinks, + // because the comparison (aPresCellDes <= colDes) will always be TRUE and + // so we always end up setting desChanged to PR_FALSE. That means the column + // won't shrink like it should +#if 0 + || ((cellDes <= aPrevCellDes) && (aPrevCellDes <= colDes))) { +#endif desChanged = PR_FALSE; } diff --git a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index 4d501b4fc7d..f60a4374b9f 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp @@ -1793,8 +1793,14 @@ PRBool BasicTableLayoutStrategy::ColumnsAreValidFor(const nsTableCellFrame& aCel } PRBool desChanged = PR_TRUE; - if (((cellDes > aPrevCellDes) && (cellDes <= colDes)) || - ((cellDes <= aPrevCellDes) && (aPrevCellDes <= colDes))) { + if ((cellDes > aPrevCellDes) && (cellDes <= colDes)) { + // XXX This next check causes a problem if the cell's desired width shrinks, + // because the comparison (aPresCellDes <= colDes) will always be TRUE and + // so we always end up setting desChanged to PR_FALSE. That means the column + // won't shrink like it should +#if 0 + || ((cellDes <= aPrevCellDes) && (aPrevCellDes <= colDes))) { +#endif desChanged = PR_FALSE; }