nsIFrame* frame = (nsTableRowGroupFrame*)mRowGroups.ElementAt(mRowGroupIndex + 1); if (!frame) ABORT0(); rg = mTableFrame.GetRowGroupFrame(frame); if (rg) { cellMap = mTableCellMap->GetMapFor(*rg); if (!cellMap) ABORT0(); rgRowIndex = 0; nextRow = rg->GetFirstRow();
PRInt32 nextRgIndex = mRowGroupIndex; do { nextRgIndex++; nsIFrame* frame = (nsTableRowGroupFrame*)mRowGroups.ElementAt(nextRgIndex); if (!frame) ABORT0(); rg = mTableFrame.GetRowGroupFrame(frame); if (rg) { cellMap = mTableCellMap->GetMapFor(*rg); if (!cellMap) ABORT0(); rgRowIndex = 0; nextRow = rg->GetFirstRow(); }
BCMapCellIterator::PeekBottom(BCMapCellInfo&   aRefInfo,                              PRUint32         aColIndex,                              BCMapCellInfo&   aAjaInfo){  aAjaInfo.Reset();  PRInt32 rowIndex = aRefInfo.rowIndex + aRefInfo.rowSpan;  PRInt32 rgRowIndex = rowIndex - mRowGroupStart;  nsTableRowGroupFrame* rg = mRowGroup;  nsCellMap* cellMap = mCellMap;  nsTableRowFrame* nextRow = nsnull;  if (rowIndex > mRowGroupEnd) {    nsIFrame* frame = (nsTableRowGroupFrame*)mRowGroups.ElementAt(mRowGroupIndex + 1); if (!frame) ABORT0();    rg = mTableFrame.GetRowGroupFrame(frame);    if (rg) {      cellMap = mTableCellMap->GetMapFor(*rg); if (!cellMap) ABORT0();      rgRowIndex = 0;      nextRow = rg->GetFirstRow();    }    else return;  }  else {    // get the row within the same row group    nextRow = mRow;    for (PRInt32 i = 0; i < aRefInfo.rowSpan; i++) {      nextRow = nextRow->GetNextRow(); if (!nextRow) ABORT0();    }  }  CellData* cellData = cellMap->GetDataAt(*mTableCellMap, rgRowIndex, aColIndex, PR_FALSE);  if (!cellData) { // add a dead cell data    NS_ASSERTION(rgRowIndex < cellMap->GetRowCount(), "program error");    nsRect damageArea;    cellData = cellMap->AppendCell(*mTableCellMap, nsnull, rgRowIndex, PR_FALSE, damageArea); if (!cellData) ABORT0();  }  if (cellData->IsColSpan()) {    aColIndex -= cellData->GetColSpanOffset();    cellData = cellMap->GetDataAt(*mTableCellMap, rgRowIndex, aColIndex, PR_FALSE);  }  SetInfo(nextRow, aColIndex, cellData, aAjaInfo, cellMap);}