fix for bug 99948 - added rounding to pixel in CalculateSizeStandard

r= rods sr= attinasi
This commit is contained in:
alexsavulov%netscape.com 2001-09-27 21:45:14 +00:00
parent 7976b00cff
commit 4acf6b2c72

View File

@ -1588,6 +1588,13 @@ nsGfxTextControlFrame2::CalculateSizeStandard (nsIPresContext* aPresContex
// To better match IE, take the size (in twips) and remove 4 pixels
// add this on as additional padding
internalPadding = PR_MAX(font->size - NSToCoordRound(4 * p2t), 0);
// round to a multiple of p2t
nscoord rest = internalPadding%NSToCoordRound(p2t);
if( rest < NSToCoordRound(p2t) - rest) {
internalPadding = internalPadding - rest;
} else {
internalPadding = internalPadding + NSToCoordRound(p2t) - rest;
}
}
#else