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 @@ - - - -
Test to see if too large of a container causes a giant escalation of the font size when font inflation is enabled.
diff --git a/layout/base/tests/font-inflation/container-with-clamping-innerFrame.html b/layout/base/tests/font-inflation/container-with-clamping-innerFrame.html deleted file mode 100644 index f6a0cec990c..00000000000 --- a/layout/base/tests/font-inflation/container-with-clamping-innerFrame.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -
Test to see if too large of a container causes a giant escalation of the font size when font inflation is enabled.
diff --git a/layout/base/tests/font-inflation/container-with-clamping-ref.html b/layout/base/tests/font-inflation/container-with-clamping-ref.html deleted file mode 100644 index 74e73798eb5..00000000000 --- a/layout/base/tests/font-inflation/container-with-clamping-ref.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - diff --git a/layout/base/tests/font-inflation/container-with-clamping.html b/layout/base/tests/font-inflation/container-with-clamping.html deleted file mode 100644 index 69afa734e3b..00000000000 --- a/layout/base/tests/font-inflation/container-with-clamping.html +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/layout/base/tests/test_font_inflation_reftests.html b/layout/base/tests/test_font_inflation_reftests.html index 9b3378dcae5..81c29f25278 100644 --- a/layout/base/tests/test_font_inflation_reftests.html +++ b/layout/base/tests/test_font_inflation_reftests.html @@ -45,7 +45,6 @@ var gTests = [ "== textarea-3.html textarea-3-ref.html", "== css-transform-1.html css-transform-1-ref.html", "== css-transform-2.html css-transform-2-ref.html", - "== container-with-clamping.html container-with-clamping-ref.html", ]; // Maintain a reference count of how many things we're waiting for until