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

@@ -100,9 +100,8 @@ nsMathMLContainerFrame::ReflowError(nsRenderingContext& aRenderingContext,
// reflow metrics
nsFontMetrics* fm = aRenderingContext.FontMetrics();
fm->GetMaxAscent(aDesiredSize.ascent);
nscoord descent;
fm->GetMaxDescent(descent);
aDesiredSize.ascent = fm->MaxAscent();
nscoord descent = fm->MaxDescent();
aDesiredSize.height = aDesiredSize.ascent + descent;
aDesiredSize.width = mBoundingMetrics.width;
@@ -140,11 +139,11 @@ void nsDisplayMathMLError::Paint(nsDisplayListBuilder* aBuilder,
aCtx->FillRect(nsRect(pt, mFrame->GetSize()));
aCtx->SetColor(NS_RGB(255,255,255));
nscoord ascent;
aCtx->FontMetrics()->GetMaxAscent(ascent);
nscoord ascent = aCtx->FontMetrics()->MaxAscent();
nsAutoString errorMsg; errorMsg.AssignLiteral("invalid-markup");
aCtx->DrawString(errorMsg.get(), PRUint32(errorMsg.Length()), pt.x, pt.y+ascent);
NS_NAMED_LITERAL_STRING(errorMsg, "invalid-markup");
aCtx->DrawString(errorMsg.get(), PRUint32(errorMsg.Length()),
pt.x, pt.y+ascent);
}
/* /////////////