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:
parent
b7ff9c9b90
commit
391149c4d4
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user