fixed minColSpan to always be at least one. This helps support empty rows,

among other problems.
This commit is contained in:
buster%netscape.com 1998-09-03 06:15:18 +00:00
parent 4c27334e38
commit 5be0373ab2
4 changed files with 4 additions and 4 deletions

View File

@ -173,7 +173,7 @@ nsTableColFrame* nsCellMap::GetColumnFrame(PRInt32 aColIndex) const
void nsCellMap::SetMinColSpan(PRInt32 aColIndex, PRBool aColSpan)
{
NS_ASSERTION(aColIndex<mColCount, "bad aColIndex");
NS_ASSERTION(aColSpan>=0, "bad aColSpan");
NS_ASSERTION(aColSpan>=1, "bad aColSpan");
// initialize the data structure if not already done
if (nsnull==mMinColSpans)

View File

@ -772,7 +772,7 @@ void nsTableFrame::SetMinColSpanForTable()
minColSpan = PR_MIN(minColSpan, colSpan);
}
}
if (1!=minColSpan)
if (1<minColSpan)
mCellMap->SetMinColSpan(colIndex, minColSpan);
}
}

View File

@ -173,7 +173,7 @@ nsTableColFrame* nsCellMap::GetColumnFrame(PRInt32 aColIndex) const
void nsCellMap::SetMinColSpan(PRInt32 aColIndex, PRBool aColSpan)
{
NS_ASSERTION(aColIndex<mColCount, "bad aColIndex");
NS_ASSERTION(aColSpan>=0, "bad aColSpan");
NS_ASSERTION(aColSpan>=1, "bad aColSpan");
// initialize the data structure if not already done
if (nsnull==mMinColSpans)

View File

@ -772,7 +772,7 @@ void nsTableFrame::SetMinColSpanForTable()
minColSpan = PR_MIN(minColSpan, colSpan);
}
}
if (1!=minColSpan)
if (1<minColSpan)
mCellMap->SetMinColSpan(colIndex, minColSpan);
}
}