зеркало из https://github.com/mozilla/pjs.git
Moved code that repaints after a resize or initial reflow to the viewport
This commit is contained in:
Родитель
5db9b18e74
Коммит
c06a058608
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче