If we moved but did not reflow either the caption or the inner table, invalidate the relevant area. Bug 379353, r=bernd, sr=roc

This commit is contained in:
bzbarsky@mit.edu 2007-11-07 09:17:30 -08:00
Родитель 3d5125628d
Коммит dac3d16a14
1 изменённых файлов: 8 добавлений и 2 удалений

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

@ -1278,9 +1278,12 @@ NS_METHOD nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
FinishReflowChild(mCaptionFrame, aPresContext, captionRS, captionMet,
captionOrigin.x, captionOrigin.y, 0);
captionRS->~nsHTMLReflowState();
} else {
} else if (mCaptionFrame->GetPosition() != captionOrigin) {
// Invalidate both the old and new rects
mCaptionFrame->Invalidate(mCaptionFrame->GetOverflowRect());
mCaptionFrame->SetPosition(captionOrigin);
nsTableFrame::RePositionViews(mCaptionFrame);
mCaptionFrame->Invalidate(mCaptionFrame->GetOverflowRect());
}
}
// XXX If the height is constrained then we need to check whether
@ -1295,9 +1298,12 @@ NS_METHOD nsTableOuterFrame::Reflow(nsPresContext* aPresContext,
FinishReflowChild(mInnerTableFrame, aPresContext, innerRS, innerMet,
innerOrigin.x, innerOrigin.y, 0);
innerRS->~nsHTMLReflowState();
} else {
} else if (mInnerTableFrame->GetPosition() != innerOrigin) {
// Invalidate both the old and new rects
mInnerTableFrame->Invalidate(mInnerTableFrame->GetOverflowRect());
mInnerTableFrame->SetPosition(innerOrigin);
nsTableFrame::RePositionViews(mInnerTableFrame);
mInnerTableFrame->Invalidate(mInnerTableFrame->GetOverflowRect());
}
UpdateReflowMetrics(captionSide, aDesiredSize, innerMargin, captionMargin);