Backout changeset 602d2761e409.

This commit is contained in:
Scott Johnson 2011-12-20 00:02:01 -06:00
Родитель 576667aa18
Коммит 3345e7226c
10 изменённых файлов: 2 добавлений и 66 удалений

Просмотреть файл

@ -4506,14 +4506,9 @@ MinimumFontSizeFor(nsPresContext* aPresContext, nscoord aContainerWidth)
if (sFontSizeInflationEmPerLine == 0 && sFontSizeInflationMinTwips == 0) { if (sFontSizeInflationEmPerLine == 0 && sFontSizeInflationMinTwips == 0) {
return 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; nscoord byLine = 0, byInch = 0;
if (sFontSizeInflationEmPerLine != 0) { if (sFontSizeInflationEmPerLine != 0) {
byLine = effectiveContainerWidth / sFontSizeInflationEmPerLine; byLine = aContainerWidth / sFontSizeInflationEmPerLine;
} }
if (sFontSizeInflationMinTwips != 0) { if (sFontSizeInflationMinTwips != 0) {
// REVIEW: Is this giving us app units and sizes *not* counting // 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 dx->GetClientRect(clientRect); // FIXME: GetClientRect looks expensive
float deviceWidthInches = float deviceWidthInches =
float(clientRect.width) / float(dx->AppUnitsPerPhysicalInch()); float(clientRect.width) / float(dx->AppUnitsPerPhysicalInch());
byInch = NSToCoordRound(effectiveContainerWidth / byInch = NSToCoordRound(aContainerWidth /
(deviceWidthInches * 1440 / (deviceWidthInches * 1440 /
sFontSizeInflationMinTwips )); sFontSizeInflationMinTwips ));
} }

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -1,15 +0,0 @@
<!DOCTYPE HTML>
<style>
div { background: yellow }
div { font-size: 20px; line-height: 1.0; width: 450px }
</style>
<!--
Without the patch for bug 707855, we have a 450px container, and the minimum font size
at 15em per line is 30px. This means we map 0px-45px into 30px-45px, so 12px gets mapped
to 34px.
With the patch, then we have a 240px container, so the minimum font size
at 15 em per line is 16px. So, we map 0px-24px into 16px-24px, so 12px gets
mapped to 20px.
-->
<div>Test to see if too large of a container causes a giant escalation of the font size when font inflation is enabled.</div>

Просмотреть файл

@ -1,15 +0,0 @@
<!DOCTYPE HTML>
<style>
div { background: yellow }
div { font-size: 12px; line-height: 1.0; width: 450px }
</style>
<!--
Without the patch for bug 707855, we have a 450px container, and the minimum font size
at 15em per line is 30px. This means we map 0px-45px into 30px-45px, so 12px gets mapped
to 34px.
With the patch, then we have a 240px container, so the minimum font size
at 15 em per line is 16px. So, we map 0px-24px into 16px-24px, so 12px gets
mapped to 20px.
-->
<div>Test to see if too large of a container causes a giant escalation of the font size when font inflation is enabled.</div>

Просмотреть файл

@ -1,16 +0,0 @@
<!DOCTYPE HTML>
<style>
div { background: yellow }
div { font-size: 12px; line-height: 1.0; width: 1200px }
</style>
<!--
Without the patch for bug 707855, we have a 450px container, and the minimum font size
at 15em per line is 30px. This means we map 0px-45px into 30px-45px, so 12px gets mapped
to 34px.
With the patch, then we have a 240px container, so the minimum font size
at 15 em per line is 16px. So, we map 0px-24px into 16px-24px, so 12px gets
mapped to 20px.
-->
<iframe src="container-with-clamping-innerFrame-ref.html" width="240" height="400">
</iframe>

Просмотреть файл

@ -1,12 +0,0 @@
<!DOCTYPE HTML>
<!--
Without the patch for bug 707855, we have a 450px container, and the minimum font size
at 15em per line is 30px. This means we map 0px-45px into 30px-45px, so 12px gets mapped
to 34px.
With the patch, then we have a 240px container, so the minimum font size
at 15 em per line is 16px. So, we map 0px-24px into 16px-24px, so 12px gets
mapped to 20px.
-->
<iframe src="container-with-clamping-innerFrame.html" width="240" height="400">
</iframe>

Просмотреть файл

@ -45,7 +45,6 @@ var gTests = [
"== textarea-3.html textarea-3-ref.html", "== textarea-3.html textarea-3-ref.html",
"== css-transform-1.html css-transform-1-ref.html", "== css-transform-1.html css-transform-1-ref.html",
"== css-transform-2.html css-transform-2-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 // Maintain a reference count of how many things we're waiting for until