Inline TwipsToPixels and PixelsToTwips on nsIPresContext. Bug 229371, r+sr=dbaron.

This commit is contained in:
bryner@brianryner.com
2004-02-11 04:57:07 +00:00
parent e4b9f42173
commit 4b3323b7b2
94 changed files with 230 additions and 283 deletions

View File

@@ -1407,7 +1407,7 @@ nsTextControlFrame::ReflowStandard(nsIPresContext* aPresContext,
// Add in the size of the scrollbars for textarea
if (IsTextArea()) {
float p2t;
aPresContext->GetPixelsToTwips(&p2t);
p2t = aPresContext->PixelsToTwips();
nsIDeviceContext *dx = aPresContext->DeviceContext();
@@ -1468,7 +1468,7 @@ nsTextControlFrame::CalculateSizeStandard(nsIPresContext* aPresContext,
// certainly a fixed-width font.
if (charWidth != charMaxAdvance) {
float p2t;
aPresContext->GetPixelsToTwips(&p2t);
p2t = aPresContext->PixelsToTwips();
nscoord internalPadding = PR_MAX(charMaxAdvance - NSToCoordRound(4 * p2t), 0);
// round to a multiple of p2t
nscoord t = NSToCoordRound(p2t);