From f06d6701457ac12636c4b593d0976b0c9532122b Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Sat, 15 Jan 2000 05:50:27 +0000 Subject: [PATCH] r=troy@netscape.com Changed from karnaze@netscape.com reviewed by me that fix assertions we were hitting when printing the CNN page --- layout/html/table/src/nsCellMap.cpp | 5 +++-- layout/tables/nsCellMap.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/layout/html/table/src/nsCellMap.cpp b/layout/html/table/src/nsCellMap.cpp index 416ea85e2e55..4a6dc90929bc 100644 --- a/layout/html/table/src/nsCellMap.cpp +++ b/layout/html/table/src/nsCellMap.cpp @@ -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(); diff --git a/layout/tables/nsCellMap.cpp b/layout/tables/nsCellMap.cpp index 416ea85e2e55..4a6dc90929bc 100644 --- a/layout/tables/nsCellMap.cpp +++ b/layout/tables/nsCellMap.cpp @@ -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();