diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 79f260caa10..3fedc9fa189 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -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 )); } diff --git a/layout/base/tests/font-inflation/bug707855-innerFrame-ref.html b/layout/base/tests/font-inflation/bug707855-innerFrame-ref.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/layout/base/tests/font-inflation/bug707855-innerFrame.html b/layout/base/tests/font-inflation/bug707855-innerFrame.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/layout/base/tests/font-inflation/bug707855-ref.html b/layout/base/tests/font-inflation/bug707855-ref.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/layout/base/tests/font-inflation/bug707855.html b/layout/base/tests/font-inflation/bug707855.html deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/layout/base/tests/font-inflation/container-with-clamping-innerFrame-ref.html b/layout/base/tests/font-inflation/container-with-clamping-innerFrame-ref.html deleted file mode 100644 index 966612ec453..00000000000 --- a/layout/base/tests/font-inflation/container-with-clamping-innerFrame-ref.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -