Bug 1008917 - part 5,6,7, make ReflowChild() and FinishReflowChild() return type 'void', and make a few related helper methods 'void' too. r=roc

This commit is contained in:
Mats Palmgren
2014-05-13 00:47:53 +00:00
parent 84ce46d68c
commit e03220a2e3
11 changed files with 82 additions and 107 deletions

View File

@@ -932,7 +932,7 @@ nsContainerFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
* requested), and then calls Reflow(). If the reflow succeeds and the child
* frame is complete, deletes any next-in-flows using DeleteNextInFlowChild()
*/
nsresult
void
nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
@@ -974,7 +974,6 @@ nsContainerFrame::ReflowChild(nsIFrame* aKidFrame,
->DeleteNextInFlowChild(kidNextInFlow, true);
}
}
return NS_OK;
}
@@ -1030,7 +1029,7 @@ nsContainerFrame::PositionChildViews(nsIFrame* aFrame)
* don't want to automatically sync the frame and view
* NS_FRAME_NO_SIZE_VIEW - don't size the frame's view
*/
nsresult
void
nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame,
nsPresContext* aPresContext,
const nsHTMLReflowMetrics& aDesiredSize,
@@ -1064,7 +1063,7 @@ nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame,
}
}
return aKidFrame->DidReflow(aPresContext, aReflowState, nsDidReflowStatus::FINISHED);
aKidFrame->DidReflow(aPresContext, aReflowState, nsDidReflowStatus::FINISHED);
}
nsresult
@@ -1075,7 +1074,6 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
nsReflowStatus& aStatus)
{
NS_PRECONDITION(aPresContext, "null pointer");
nsresult rv = NS_OK;
nsFrameList* overflowContainers =
GetPropTableFrames(OverflowContainersProperty());
@@ -1146,14 +1144,12 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
nsReflowStatus frameStatus;
// Reflow
rv = ReflowChild(frame, aPresContext, desiredSize, frameState,
prevRect.x, 0, aFlags, frameStatus, &tracker);
NS_ENSURE_SUCCESS(rv, rv);
ReflowChild(frame, aPresContext, desiredSize, frameState,
prevRect.x, 0, aFlags, frameStatus, &tracker);
//XXXfr Do we need to override any shrinkwrap effects here?
// e.g. desiredSize.Width() = prevRect.width;
rv = FinishReflowChild(frame, aPresContext, desiredSize, &frameState,
prevRect.x, 0, aFlags);
NS_ENSURE_SUCCESS(rv, rv);
FinishReflowChild(frame, aPresContext, desiredSize, &frameState,
prevRect.x, 0, aFlags);
// Handle continuations
if (!NS_FRAME_IS_FULLY_COMPLETE(frameStatus)) {
@@ -1177,7 +1173,7 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres
}
else if (!(nif->GetStateBits() & NS_FRAME_IS_OVERFLOW_CONTAINER)) {
// used to be a normal next-in-flow; steal it from the child list
rv = static_cast<nsContainerFrame*>(nif->GetParent())
nsresult rv = static_cast<nsContainerFrame*>(nif->GetParent())
->StealFrame(nif);
NS_ENSURE_SUCCESS(rv, rv);
}