From ed7a9eb667fff86b09b9a8db2bb8f83b71617ff8 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Thu, 13 Jan 2000 20:22:19 +0000 Subject: [PATCH] Fix for chinatimes/tinderbox crasher. r=karnaze git-svn-id: svn://10.0.0.236/trunk@57686 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/table/src/nsCellMap.cpp | 3 +-- mozilla/layout/html/table/src/nsTableFrame.cpp | 2 +- mozilla/layout/tables/nsCellMap.cpp | 3 +-- mozilla/layout/tables/nsTableFrame.cpp | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/html/table/src/nsCellMap.cpp b/mozilla/layout/html/table/src/nsCellMap.cpp index ffb0584b796..8a2a1346190 100644 --- a/mozilla/layout/html/table/src/nsCellMap.cpp +++ b/mozilla/layout/html/table/src/nsCellMap.cpp @@ -601,8 +601,7 @@ void nsCellMap::GrowRow(nsVoidArray& aRow, PRInt32 aNumCols) { - const PRInt32 colsInRow = aRow.Count(); - for (PRInt32 colX = colsInRow; colX < aNumCols; colX++) { + for (PRInt32 colX = 0; colX < aNumCols; colX++) { aRow.AppendElement(nsnull); } } diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 5db930ab6db..a3436684173 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -2454,7 +2454,7 @@ nsTableFrame::RemoveFrame(nsIPresContext* aPresContext, if (rgFrame) { PRInt32 startRowIndex = rgFrame->GetStartRowIndex(); PRInt32 numRows; - rgFrame->GetRowCount(numRows); + rgFrame->GetRowCount(numRows, PR_TRUE); // remove the row group from the cell map nsTableCellMap* cellMap = GetCellMap(); if (cellMap) { diff --git a/mozilla/layout/tables/nsCellMap.cpp b/mozilla/layout/tables/nsCellMap.cpp index ffb0584b796..8a2a1346190 100644 --- a/mozilla/layout/tables/nsCellMap.cpp +++ b/mozilla/layout/tables/nsCellMap.cpp @@ -601,8 +601,7 @@ void nsCellMap::GrowRow(nsVoidArray& aRow, PRInt32 aNumCols) { - const PRInt32 colsInRow = aRow.Count(); - for (PRInt32 colX = colsInRow; colX < aNumCols; colX++) { + for (PRInt32 colX = 0; colX < aNumCols; colX++) { aRow.AppendElement(nsnull); } } diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 5db930ab6db..a3436684173 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -2454,7 +2454,7 @@ nsTableFrame::RemoveFrame(nsIPresContext* aPresContext, if (rgFrame) { PRInt32 startRowIndex = rgFrame->GetStartRowIndex(); PRInt32 numRows; - rgFrame->GetRowCount(numRows); + rgFrame->GetRowCount(numRows, PR_TRUE); // remove the row group from the cell map nsTableCellMap* cellMap = GetCellMap(); if (cellMap) {