fix assertions we were hitting when printing the CNN page
This commit is contained in:
troy%netscape.com 2000-01-15 05:50:27 +00:00
parent 8a7719fa46
commit f06d670145
2 changed files with 6 additions and 4 deletions

View File

@ -408,12 +408,13 @@ PRInt32
nsTableCellMap::GetEffectiveColSpan(PRInt32 aColIndex,
const nsTableCellFrame* aCell)
{
nsTableCellFrame* cellFrame = (nsTableCellFrame*)aCell->GetFirstInFlow();
PRInt32 rowIndex;
aCell->GetRowIndex(rowIndex);
cellFrame->GetRowIndex(rowIndex);
nsCellMap* cellMap = mFirstMap;
while (cellMap) {
if (cellMap->GetRowCount() > rowIndex) {
return cellMap->GetEffectiveColSpan(rowIndex, aColIndex, mCols.Count(), aCell);
return cellMap->GetEffectiveColSpan(rowIndex, aColIndex, mCols.Count(), cellFrame);
}
rowIndex -= cellMap->GetRowCount();
cellMap = cellMap->GetNextSibling();

View File

@ -408,12 +408,13 @@ PRInt32
nsTableCellMap::GetEffectiveColSpan(PRInt32 aColIndex,
const nsTableCellFrame* aCell)
{
nsTableCellFrame* cellFrame = (nsTableCellFrame*)aCell->GetFirstInFlow();
PRInt32 rowIndex;
aCell->GetRowIndex(rowIndex);
cellFrame->GetRowIndex(rowIndex);
nsCellMap* cellMap = mFirstMap;
while (cellMap) {
if (cellMap->GetRowCount() > rowIndex) {
return cellMap->GetEffectiveColSpan(rowIndex, aColIndex, mCols.Count(), aCell);
return cellMap->GetEffectiveColSpan(rowIndex, aColIndex, mCols.Count(), cellFrame);
}
rowIndex -= cellMap->GetRowCount();
cellMap = cellMap->GetNextSibling();