From c68a561a0dcf8f4898a6f2ed7216985704680bfa Mon Sep 17 00:00:00 2001 From: "dbaron@dbaron.org" Date: Thu, 20 Mar 2008 18:19:13 -0700 Subject: [PATCH] Additional fix on top of roc's patch for bug 421069 to fix the regression it caused. r=dholbert approval1.9b5=damon --- layout/reftests/bugs/reftest.list | 4 ++-- layout/tables/nsTablePainter.cpp | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 04bcbdbe155..a65fc484aaa 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -765,8 +765,8 @@ fails == 413027-3.html 413027-3-ref.html == 420069-1.html 420069-1-ref.html == 420069-2.html 420069-2-ref.html == 420351-1.html 420351-1-ref.html -fails == 421069.html 421069-ref.html # bug 421069 -fails == 421069.html 421069-ref2.html # bug 421069 +== 421069.html 421069-ref.html +== 421069.html 421069-ref2.html == 421069-ref.html 421069-ref2.html == 421234-1.html 421234-1-ref.html == 421419-1.html 421419-1-ref.html diff --git a/layout/tables/nsTablePainter.cpp b/layout/tables/nsTablePainter.cpp index 13742633197..78552448624 100644 --- a/layout/tables/nsTablePainter.cpp +++ b/layout/tables/nsTablePainter.cpp @@ -584,10 +584,9 @@ TableBackgroundPainter::PaintRow(nsTableRowFrame* aFrame, //else: Use row group's coord system -> no translation necessary for (nsTableCellFrame* cell = aFrame->GetFirstCell(); cell; cell = cell->GetNextCell()) { - mCellRect = cell->GetRect(); //Translate to use the same coord system as mRow. - mCellRect.MoveBy(mRow.mRect.x, mRow.mRect.y); - if (mCellRect.Intersects(mDirtyRect - mRenderPt)) { + mCellRect = cell->GetRect() + mRow.mRect.TopLeft() + mRenderPt; + if (mCellRect.Intersects(mDirtyRect)) { nsresult rv = PaintCell(cell, aPassThrough || cell->IsPseudoStackingContextFromStyle()); if (NS_FAILED(rv)) return rv; } @@ -656,7 +655,7 @@ TableBackgroundPainter::PaintCell(nsTableCellFrame* aCell, //Paint cell background in border-collapse unless we're just passing if (mIsBorderCollapse && !aPassSelf) { aCell->PaintCellBackground(mRenderingContext, mDirtyRect, - mRenderPt + mCellRect.TopLeft()); + mCellRect.TopLeft()); } return NS_OK;