diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 0d3bafc418f3..0029499d87fb 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -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());