Bug 292431. Don't resize the scrolled frame's view until we know exactly what size it should be ... avoids unnecessary repainting. r+sr=bzbarsky,a=chofmann

This commit is contained in:
roc+%cs.cmu.edu 2005-05-08 22:17:03 +00:00
Родитель 7762d11c0b
Коммит f9db958cf9
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -490,9 +490,14 @@ nsHTMLScrollFrame::ReflowScrolledFrame(const ScrollReflowState& aState,
nsresult rv = ReflowChild(mInner.mScrolledFrame, GetPresContext(), *aMetrics,
kidReflowState, 0, 0,
NS_FRAME_NO_MOVE_FRAME | NS_FRAME_NO_MOVE_VIEW, status);
// Don't resize or position the view because we're going to resize
// it to the correct size anyway in PlaceScrollArea. Allowing it to
// resize here would size it to the natural height of the frame,
// which will usually be different from the scrollport height;
// invalidating the difference will cause unnecessary repainting.
FinishReflowChild(mInner.mScrolledFrame, GetPresContext(),
&kidReflowState, *aMetrics, 0, 0,
NS_FRAME_NO_MOVE_FRAME | NS_FRAME_NO_MOVE_VIEW);
NS_FRAME_NO_MOVE_FRAME | NS_FRAME_NO_MOVE_VIEW | NS_FRAME_NO_SIZE_VIEW);
// XXX Some frames (e.g., nsObjectFrame, nsFrameFrame, nsTextFrame) don't bother
// setting their mOverflowArea. This is wrong because every frame should