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);