nsTableCellMap::InsertRows shouldn't make damage area smaller, b=244135 p=malcolm.parsons r+sr=bz a=roc
authorfantasai.cvs@inkedblade.net
Fri, 19 Oct 2007 07:41:29 -0700
changeset 7039 333c496ecf62d06913fa5ebf6880eb933a431fa5
parent 7038 b9610d97dd90d26769bf28854192c81cac7d85a4
child 7040 b6137de38580d91cde7eddedc5e6f442618d3963
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs244135
milestone1.9a9pre
nsTableCellMap::InsertRows shouldn't make damage area smaller, b=244135 p=malcolm.parsons r+sr=bz a=roc
layout/reftests/bugs/reftest.list
layout/tables/nsCellMap.cpp
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -96,16 +96,17 @@ fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") ==
 == 234964-1.html 234964-1-ref.html
 == 234964-2.html 234964-2-ref.html
 == 235593-1.html 235593-1-ref.html
 == 236539-1.html 236539-1-ref.html
 == 240470-1.html 240470-1-ref.html
 == 243266-1.html 243266-1-ref.html
 == 243302-1.html 243302-1-ref.html
 == 244135-1.html 244135-1-ref.html
+== 244135-2.html 244135-2-ref.html
 == 244932-1.html 244932-1-ref.html
 == 249982-1.html 249982-1-ref.html
 == 253701-1.html 253701-1-ref.html
 == 255820-1.html 255820-1-ref.html
 == 262151-1.html 262151-1-ref.html
 == 267353-1.html 267353-1-ref.html
 == 273681-1.html 273681-1-ref.html
 == 291078-1.html 291078-1-ref.html
--- a/layout/tables/nsCellMap.cpp
+++ b/layout/tables/nsCellMap.cpp
@@ -560,18 +560,18 @@ nsTableCellMap::InsertRows(nsTableRowGro
   if ((numNewRows <= 0) || (aFirstRowIndex < 0)) ABORT0(); 
 
   PRInt32 rowIndex = aFirstRowIndex;
   nsCellMap* cellMap = mFirstMap;
   while (cellMap) {
     nsTableRowGroupFrame* rg = cellMap->GetRowGroup();
     if (rg == &aParent) {
       cellMap->InsertRows(*this, aRows, rowIndex, aConsiderSpans, aDamageArea);
-      aDamageArea.y = aFirstRowIndex;
-      aDamageArea.height = PR_MAX(0, GetRowCount() - aFirstRowIndex);
+      aDamageArea.y = PR_MIN(aFirstRowIndex, aDamageArea.y);
+      aDamageArea.height = PR_MAX(0, GetRowCount() - aDamageArea.y);
 #ifdef DEBUG_TABLE_CELLMAP 
       Dump("after InsertRows");
 #endif
       if (mBCInfo) {
         BCData* bcData;
         PRInt32 count = mBCInfo->mRightBorders.Count();
         if (aFirstRowIndex < count) {
           for (PRInt32 rowX = aFirstRowIndex; rowX < aFirstRowIndex + numNewRows; rowX++) {