Moved cde that does damage repair for a resize reflow from the

body to the root content frame
This commit is contained in:
troy%netscape.com 1998-07-23 20:19:05 +00:00
Родитель 900e6cc477
Коммит 37a9603e3b
2 изменённых файлов: 7 добавлений и 14 удалений

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

@ -242,16 +242,9 @@ NS_METHOD nsBodyFrame::Reflow(nsIPresContext& aPresContext,
ComputeDesiredSize(desiredRect, rsp->maxSize, borderPadding, aDesiredSize);
// Decide how much to repaint based on the reflow type.
// Note: we don't have to handle the initial reflow case, because that's
// handled by the root content frame
switch (rsp->reason) {
case eReflowReason_Resize:
// For a resize just repaint the entire frame
damageArea.width = aDesiredSize.width;
damageArea.height = aDesiredSize.height;
break;
case eReflowReason_Incremental:
// Note: we don't have to handle the initial reflow case and the resize reflow
// case, because they're handled by the root content frame
if (eReflowReason_Incremental == rsp->reason) {
// For append reflow commands that target the body just repaint the newly
// added part of the frame.
if ((nsIReflowCommand::FrameAppended == reflowCmdType) &&
@ -260,7 +253,7 @@ NS_METHOD nsBodyFrame::Reflow(nsIPresContext& aPresContext,
damageArea.y = kidOldRect.YMost();
damageArea.width = aDesiredSize.width;
damageArea.height = aDesiredSize.height - kidOldRect.height;
} else {
// Ideally the frame that is the target of the reflow command (or its parent
// frame) would generate a damage rect, but since none of the frame classes

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

@ -443,9 +443,9 @@ NS_METHOD RootContentFrame::Reflow(nsIPresContext& aPresContext,
nsRect rect(0, 0, aDesiredSize.width, aDesiredSize.height);
mFirstChild->SetRect(rect);
// If this is the initial reflow of the child then repaint the entire
// visible area
if (eReflowReason_Initial == reflowReason) {
// For initial reflow and resize reflow repaint the entire visible area
if ((eReflowReason_Initial == reflowReason) ||
(eReflowReason_Resize == aReflowState.reason)) {
Invalidate(nsRect(0, 0, aReflowState.maxSize.width, aReflowState.maxSize.height));
}
}