b=20772. Changed ColumnsAreValidFor() so that it correctly handles the case

where the cell's desired width shrinks
This commit is contained in:
troy@netscape.com
2000-01-12 21:53:55 +00:00
parent 71e6abf51e
commit 4001f5e4d3
2 changed files with 16 additions and 4 deletions

View File

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