Bug 174055, part 6: eliminate pointless nsresult return values.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user