Invalidate the original overflow rect too when the frame moves. Bug 424766, r+sr=roc

This commit is contained in:
bzbarsky@mit.edu 2008-04-01 16:27:25 -07:00
Родитель b52dc9c3d6
Коммит 7fcd1f6092
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -6810,7 +6810,13 @@ nsTableFrame::InvalidateFrame(nsIFrame* aFrame,
if (aIsFirstReflow ||
aOrigRect.TopLeft() != aFrame->GetPosition() ||
aOrigOverflowRect.TopLeft() != overflowRect.TopLeft()) {
aFrame->InvalidateOverflowRect();
// Invalidate the old and new overflow rects. Note that if the
// frame moved, we can't just use aOrigOverflowRect, since it's in
// coordinates relative to the old position. So invalidate via
// aFrame's parent, and reposition that overflow rect to the right
// place.
aFrame->Invalidate(overflowRect);
parent->Invalidate(aOrigOverflowRect + aOrigRect.TopLeft());
} else {
aFrame->InvalidateRectDifference(aOrigOverflowRect, overflowRect);
parent->InvalidateRectDifference(aOrigRect, aFrame->GetRect());