From 1e238506cefdb51688e809f94eca422a46a755ed Mon Sep 17 00:00:00 2001 From: "sharparrow1%yahoo.com" Date: Mon, 21 May 2007 10:06:08 +0000 Subject: [PATCH] Bug 377391: Parts of a rectangle with CSS outline remains, when changing rectangle size. r+sr=roc git-svn-id: svn://10.0.0.236/trunk@226705 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 4 ++-- mozilla/layout/generic/nsFrame.cpp | 1 + mozilla/layout/generic/nsFrameFrame.cpp | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 592cf2f1c26..04407f84aa2 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -1120,11 +1120,11 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext, aMetrics.mOverflowArea.UnionRect(aMetrics.mOverflowArea, childBounds); } - FinishAndStoreOverflow(&aMetrics); - // Determine if we need to repaint our border, background or outline CheckInvalidateSizeChange(aPresContext, aMetrics, aReflowState); + FinishAndStoreOverflow(&aMetrics); + // Clear the space manager pointer in the block reflow state so we // don't waste time translating the coordinate system back on a dead // space manager. diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index 0cef3e36547..3f82045ce51 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -3801,6 +3801,7 @@ nsFrame::CheckInvalidateSizeChange(nsPresContext* aPresContext, nsRect r = ComputeOutlineRect(this, &anyOutline, aDesiredSize.mOverflowArea); if (anyOutline) { + r.UnionRect(GetOverflowRect(), r); Invalidate(r); return; } diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index 389f51c0018..c956bc02c29 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -406,7 +406,10 @@ nsSubDocumentFrame::Reflow(nsPresContext* aPresContext, // Determine if we need to repaint our border, background or outline CheckInvalidateSizeChange(aPresContext, aDesiredSize, aReflowState); + FinishAndStoreOverflow(&aDesiredSize); + // Invalidate the frame contents + // XXX is this really needed? nsRect rect(nsPoint(0, 0), GetSize()); Invalidate(rect, PR_FALSE);