Moved code that repaints after a resize or initial reflow to the viewport

git-svn-id: svn://10.0.0.236/trunk@40977 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com 1999-07-24 15:18:24 +00:00
parent b7ff9c9b90
commit 391149c4d4
4 changed files with 14 additions and 14 deletions

View File

@ -299,13 +299,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
kidFrame->SetRect(rect);
}
// If this is a resize reflow or the initial reflow, then do a repaint
if ((eReflowReason_Initial == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)) {
nsRect damageRect(0, 0, aReflowState.availableWidth, aReflowState.availableHeight);
Invalidate(damageRect, PR_FALSE);
}
// Return our desired size
aDesiredSize.width = kidDesiredSize.width + kidReflowState.mComputedMargin.left +
kidReflowState.mComputedMargin.right;

View File

@ -524,6 +524,13 @@ ViewportFrame::Reflow(nsIPresContext& aPresContext,
aDesiredSize.descent = 0;
}
// If this is a resize reflow or the initial reflow, then do a repaint
if ((eReflowReason_Initial == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)) {
nsRect damageRect(0, 0, aDesiredSize.width, aDesiredSize.height);
Invalidate(damageRect, PR_FALSE);
}
NS_FRAME_TRACE_REFLOW_OUT("ViewportFrame::Reflow", aStatus);
return NS_OK;
}

View File

@ -299,13 +299,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
kidFrame->SetRect(rect);
}
// If this is a resize reflow or the initial reflow, then do a repaint
if ((eReflowReason_Initial == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)) {
nsRect damageRect(0, 0, aReflowState.availableWidth, aReflowState.availableHeight);
Invalidate(damageRect, PR_FALSE);
}
// Return our desired size
aDesiredSize.width = kidDesiredSize.width + kidReflowState.mComputedMargin.left +
kidReflowState.mComputedMargin.right;

View File

@ -524,6 +524,13 @@ ViewportFrame::Reflow(nsIPresContext& aPresContext,
aDesiredSize.descent = 0;
}
// If this is a resize reflow or the initial reflow, then do a repaint
if ((eReflowReason_Initial == aReflowState.reason) ||
(eReflowReason_Resize == aReflowState.reason)) {
nsRect damageRect(0, 0, aDesiredSize.width, aDesiredSize.height);
Invalidate(damageRect, PR_FALSE);
}
NS_FRAME_TRACE_REFLOW_OUT("ViewportFrame::Reflow", aStatus);
return NS_OK;
}