mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out ab701cac6af8.
This commit is contained in:
parent
0dc4e51af7
commit
604f9257d2
@ -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 ));
|
||||
}
|
||||
|
@ -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",
|
||||
"== 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
|
||||
|
Loading…
Reference in New Issue
Block a user