Bug 1008917 - part 2,3,4, make Reflow() return type 'void', and make a few reflow related helper methods 'void' too. r=roc

This commit is contained in:
Mats Palmgren
2014-05-12 17:40:28 +00:00
parent c59a9558ec
commit 4a79e08cae
120 changed files with 542 additions and 721 deletions

View File

@@ -462,7 +462,7 @@ nsTextControlFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
return autoSize;
}
nsresult
void
nsTextControlFrame::Reflow(nsPresContext* aPresContext,
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
@@ -490,10 +490,8 @@ nsTextControlFrame::Reflow(nsPresContext* aPresContext,
NS_AUTOHEIGHT, inflation);
}
nsRefPtr<nsFontMetrics> fontMet;
nsresult rv = nsLayoutUtils::GetFontMetricsForFrame(this,
getter_AddRefs(fontMet),
inflation);
NS_ENSURE_SUCCESS(rv, rv);
nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fontMet),
inflation);
// now adjust for our borders and padding
aDesiredSize.SetTopAscent(
nsLayoutUtils::GetCenteredFontBaseline(fontMet, lineHeight)
@@ -513,7 +511,6 @@ nsTextControlFrame::Reflow(nsPresContext* aPresContext,
aStatus = NS_FRAME_COMPLETE;
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
return NS_OK;
}
void