Backout changeset 602d2761e409.
This commit is contained in:
@@ -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 ));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user