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