enable old assert (from 2001) to catch cellmap errors, fix one erroneus caller bug 351691 r/sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@209742 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bmlk%gmx.de
2006-09-11 18:27:35 +00:00
parent 4b51748042
commit b0654bda46

View File

@@ -536,11 +536,13 @@ PRInt32 nsTableFrame::GetEffectiveColCount() const
PRInt32 nsTableFrame::GetIndexOfLastRealCol()
{
PRInt32 numCols = mColFrames.Count();
for (PRInt32 colX = numCols; colX >= 0; colX--) {
nsTableColFrame* colFrame = GetColFrame(colX);
if (colFrame) {
if (eColAnonymousCell != colFrame->GetColType()) {
return colX;
if (numCols > 0) {
for (PRInt32 colX = numCols - 1; colX >= 0; colX--) {
nsTableColFrame* colFrame = GetColFrame(colX);
if (colFrame) {
if (eColAnonymousCell != colFrame->GetColType()) {
return colX;
}
}
}
}
@@ -556,7 +558,7 @@ nsTableFrame::GetColFrame(PRInt32 aColIndex) const
return (nsTableColFrame *)mColFrames.ElementAt(aColIndex);
}
else {
//NS_ASSERTION(PR_FALSE, "invalid col index");
NS_ERROR("invalid col index");
return nsnull;
}
}