Bug 174055, part 6: eliminate pointless nsresult return values.

This commit is contained in:
Zack Weinberg
2011-04-07 21:18:43 -07:00
parent 63aa6196ff
commit 12c96408b6
41 changed files with 271 additions and 399 deletions

View File

@@ -656,8 +656,8 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
// The height of our box is the sum of our font size plus the top
// and bottom border and padding. The height of children do not
// affect our height.
fm->GetMaxAscent(aMetrics.ascent);
fm->GetMaxHeight(aMetrics.height);
aMetrics.ascent = fm->MaxAscent();
aMetrics.height = fm->MaxHeight();
} else {
NS_WARNING("Cannot get font metrics - defaulting sizes to 0");
aMetrics.ascent = aMetrics.height = 0;
@@ -914,8 +914,9 @@ nsInlineFrame::GetBaseline() const
{
nscoord ascent = 0;
nsRefPtr<nsFontMetrics> fm;
if (NS_SUCCEEDED(nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fm)))) {
fm->GetMaxAscent(ascent);
nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fm));
if (fm) {
ascent = fm->MaxAscent();
}
return NS_MIN(mRect.height, ascent + GetUsedBorderAndPadding().top);
}