From bb5b242457311da28cdb881ed38ce1b09a1efc3d Mon Sep 17 00:00:00 2001 From: "tor%cs.brown.edu" Date: Sun, 26 Feb 2006 17:51:58 +0000 Subject: [PATCH] Bug 328477 - Use the right version of abs in nsSVGCairoGlyphMetrics. r=longsonr, sr=roc --- layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp b/layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp index ce90852bb55..c61f205cdc9 100644 --- a/layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp +++ b/layout/svg/renderer/src/cairo/nsSVGCairoGlyphMetrics.cpp @@ -191,7 +191,7 @@ nsSVGCairoGlyphMetrics::GetComputedTextLength(float *_retval) NS_ConvertUTF16toUTF8(text).get(), &extent); - *_retval = abs(extent.x_advance) + abs(extent.y_advance); + *_retval = fabs(extent.x_advance) + fabs(extent.y_advance); return NS_OK; } @@ -210,7 +210,7 @@ nsSVGCairoGlyphMetrics::GetSubStringLength(PRUint32 charnum, PRUint32 nchars, fl NS_ConvertUTF16toUTF8(Substring(text, charnum, nchars)).get(), &extent); - *_retval = abs(extent.x_advance) + abs(extent.y_advance); + *_retval = fabs(extent.x_advance) + fabs(extent.y_advance); return NS_OK; }