Bug 1008917 - part 16, make nsFrame::BoxReflow() return type 'void'. r=roc

This commit is contained in:
Mats Palmgren 2014-05-13 00:47:54 +00:00
parent e7eba30d1e
commit 97cc36f507
2 changed files with 17 additions and 21 deletions

View File

@ -7843,7 +7843,6 @@ nsFrame::RefreshSizeCache(nsBoxLayoutState& aState)
// line height. This can be done with the line iterator.
// if we do have a rendering context
nsresult rv = NS_OK;
nsRenderingContext* rendContext = aState.GetRenderingContext();
if (rendContext) {
nsPresContext* presContext = aState.PresContext();
@ -7875,9 +7874,9 @@ nsFrame::RefreshSizeCache(nsBoxLayoutState& aState)
const WritingMode wm = aState.OuterReflowState() ?
aState.OuterReflowState()->GetWritingMode() : GetWritingMode();
nsHTMLReflowMetrics desiredSize(wm);
rv = BoxReflow(aState, presContext, desiredSize, rendContext,
rect.x, rect.y,
metrics->mBlockPrefSize.width, NS_UNCONSTRAINEDSIZE);
BoxReflow(aState, presContext, desiredSize, rendContext,
rect.x, rect.y,
metrics->mBlockPrefSize.width, NS_UNCONSTRAINEDSIZE);
metrics->mBlockMinSize.height = 0;
// ok we need the max ascent of the items on the line. So to do this
@ -7922,7 +7921,7 @@ nsFrame::RefreshSizeCache(nsBoxLayoutState& aState)
#endif
}
return rv;
return NS_OK;
}
/* virtual */ nsILineIterator*
@ -8063,12 +8062,11 @@ nsFrame::DoLayout(nsBoxLayoutState& aState)
const WritingMode wm = aState.OuterReflowState() ?
aState.OuterReflowState()->GetWritingMode() : GetWritingMode();
nsHTMLReflowMetrics desiredSize(wm);
nsresult rv = NS_OK;
if (rendContext) {
rv = BoxReflow(aState, presContext, desiredSize, rendContext,
ourRect.x, ourRect.y, ourRect.width, ourRect.height);
BoxReflow(aState, presContext, desiredSize, rendContext,
ourRect.x, ourRect.y, ourRect.width, ourRect.height);
if (IsCollapsed()) {
SetSize(nsSize(0, 0));
@ -8127,10 +8125,10 @@ nsFrame::DoLayout(nsBoxLayoutState& aState)
SyncLayout(aState);
return rv;
return NS_OK;
}
nsresult
void
nsFrame::BoxReflow(nsBoxLayoutState& aState,
nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
@ -8375,8 +8373,6 @@ nsFrame::BoxReflow(nsBoxLayoutState& aState,
#ifdef DEBUG_REFLOW
gIndent2--;
#endif
return NS_OK;
}
static void

View File

@ -636,15 +636,15 @@ protected:
void FireDOMEvent(const nsAString& aDOMEventName, nsIContent *aContent = nullptr);
private:
nsresult BoxReflow(nsBoxLayoutState& aState,
nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
nsRenderingContext* aRenderingContext,
nscoord aX,
nscoord aY,
nscoord aWidth,
nscoord aHeight,
bool aMoveFrame = true);
void BoxReflow(nsBoxLayoutState& aState,
nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
nsRenderingContext* aRenderingContext,
nscoord aX,
nscoord aY,
nscoord aWidth,
nscoord aHeight,
bool aMoveFrame = true);
NS_IMETHODIMP RefreshSizeCache(nsBoxLayoutState& aState);