From 6f951ca3eb91176bd56817697c30c817c49349b6 Mon Sep 17 00:00:00 2001 From: "roc+%cs.cmu.edu" Date: Tue, 18 Sep 2007 02:48:19 +0000 Subject: [PATCH] Bug 394832. Remove overeager rounding that causes underlines to appear too close to the text. r=smontagu,a=dbaron git-svn-id: svn://10.0.0.236/trunk@236187 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsTextFrameThebes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mozilla/layout/generic/nsTextFrameThebes.cpp b/mozilla/layout/generic/nsTextFrameThebes.cpp index e5fbfb0e889..0b907023ba9 100644 --- a/mozilla/layout/generic/nsTextFrameThebes.cpp +++ b/mozilla/layout/generic/nsTextFrameThebes.cpp @@ -3794,12 +3794,12 @@ nsTextFrame::PaintTextDecorations(gfxContext* aCtx, const gfxRect& aDirtyRect, return; gfxFont::Metrics fontMetrics = GetFontMetrics(aProvider.GetFontGroup()); - PRInt32 app = aTextPaintStyle.PresContext()->AppUnitsPerDevPixel(); + gfxFloat app = aTextPaintStyle.PresContext()->AppUnitsPerDevPixel(); // XXX aFramePt is in AppUnits, shouldn't it be nsFloatPoint? gfxPoint pt(aFramePt.x / app, (aTextBaselinePt.y - mAscent) / app); - gfxSize size(GetRect().width / app, 0); - gfxFloat ascent = mAscent / app; + gfxSize size(gfxFloat(GetRect().width) / app, 0); + gfxFloat ascent = gfxFloat(mAscent) / app; if (decorations & NS_FONT_DECORATION_OVERLINE) { size.height = fontMetrics.underlineSize;