Bug 394832. Remove overeager rounding that causes underlines to appear too close to the text. r=smontagu,a=dbaron

This commit is contained in:
roc+@cs.cmu.edu 2007-09-17 19:48:19 -07:00
Родитель 7fc4e1ab75
Коммит ce5b122a6e
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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;