Backout changeset 602d2761e409.

This commit is contained in:
Scott Johnson
2011-12-20 00:02:01 -06:00
parent cbd3039764
commit 72b95319b5
10 changed files with 2 additions and 66 deletions

View File

@@ -4506,14 +4506,9 @@ MinimumFontSizeFor(nsPresContext* aPresContext, nscoord aContainerWidth)
if (sFontSizeInflationEmPerLine == 0 && sFontSizeInflationMinTwips == 0) {
return 0;
}
// Clamp the container width to the device dimensions
nscoord iFrameWidth = aPresContext->GetVisibleArea().width;
nscoord effectiveContainerWidth = NS_MIN(iFrameWidth, aContainerWidth);
nscoord byLine = 0, byInch = 0;
if (sFontSizeInflationEmPerLine != 0) {
byLine = effectiveContainerWidth / sFontSizeInflationEmPerLine;
byLine = aContainerWidth / sFontSizeInflationEmPerLine;
}
if (sFontSizeInflationMinTwips != 0) {
// REVIEW: Is this giving us app units and sizes *not* counting
@@ -4523,7 +4518,7 @@ MinimumFontSizeFor(nsPresContext* aPresContext, nscoord aContainerWidth)
dx->GetClientRect(clientRect); // FIXME: GetClientRect looks expensive
float deviceWidthInches =
float(clientRect.width) / float(dx->AppUnitsPerPhysicalInch());
byInch = NSToCoordRound(effectiveContainerWidth /
byInch = NSToCoordRound(aContainerWidth /
(deviceWidthInches * 1440 /
sFontSizeInflationMinTwips ));
}