fix handling of empty rowgroups (that are rg without a row beneath) in the border collapse code (bug 383193 r/sr=bzbarsky a=mtschrep

This commit is contained in:
bmlk@gmx.de 2007-12-15 12:23:10 -08:00
Родитель e6b2825825
Коммит b64d41431a
1 изменённых файлов: 10 добавлений и 17 удалений

Просмотреть файл

@ -4222,20 +4222,14 @@ PRBool
BCMapCellIterator::SetNewRowGroup(PRBool aFindFirstDamagedRow)
{
mAtEnd = PR_TRUE;
mRowGroupIndex++;
PRInt32 numRowGroups = mRowGroups.Length();
mCellMap = nsnull;
for (PRInt32 rgX = mRowGroupIndex; rgX < numRowGroups; rgX++) {
// XXXbz do we really want the group at mRowGroupIndex? If so, what's the
// point of this rgX loop variable, exactly? Why not just do a while
// (mRowGroupIndex < numRowGroups) loop or something? I suspect this means
// to be getting the rowgroup at rgX.
for (mRowGroupIndex++; mRowGroupIndex < numRowGroups; mRowGroupIndex++) {
mRowGroup = mRowGroups[mRowGroupIndex];
PRInt32 rowCount = mRowGroup->GetRowCount();
mRowGroupStart = mRowGroup->GetStartRowIndex();
mRowGroupEnd = mRowGroupStart + rowCount - 1;
if (rowCount > 0) { // XXXbz and if it's not we just keep looping? What's
// the point?
if (rowCount > 0) {
mCellMap = mTableCellMap->GetMapFor(mRowGroup, mCellMap);
if (!mCellMap) ABORT1(PR_FALSE);
nsTableRowFrame* firstRow = mRowGroup->GetFirstRow();
@ -4252,7 +4246,6 @@ BCMapCellIterator::SetNewRowGroup(PRBool aFindFirstDamagedRow)
}
}
else {
mRowGroupIndex++;
continue;
}
}