| Index: sky/engine/core/css/FontSize.cpp
|
| diff --git a/sky/engine/core/css/FontSize.cpp b/sky/engine/core/css/FontSize.cpp
|
| index 86e688d06aecb48eb086e63df477cba25857ec68..9bfedd64c7a4dd181697f7167f9159c1e8f8bb8e 100644
|
| --- a/sky/engine/core/css/FontSize.cpp
|
| +++ b/sky/engine/core/css/FontSize.cpp
|
| @@ -35,7 +35,7 @@
|
|
|
| namespace blink {
|
|
|
| -float FontSize::getComputedSizeFromSpecifiedSize(const Document* document, float zoomFactor, bool isAbsoluteSize, float specifiedSize, ESmartMinimumForFontSize useSmartMinimumForFontSize)
|
| +float FontSize::getComputedSizeFromSpecifiedSize(const Document* document, bool isAbsoluteSize, float specifiedSize, ESmartMinimumForFontSize useSmartMinimumForFontSize)
|
| {
|
| // Text with a 0px font size should not be visible and therefore needs to be
|
| // exempt from minimum font size rules. Acid3 relies on this for pixel-perfect
|
| @@ -60,22 +60,21 @@ float FontSize::getComputedSizeFromSpecifiedSize(const Document* document, float
|
|
|
| int minSize = 0;
|
| int minLogicalSize = 0;
|
| - float zoomedSize = specifiedSize * zoomFactor;
|
|
|
| // Apply the hard minimum first. We only apply the hard minimum if after zooming we're still too small.
|
| - if (zoomedSize < minSize)
|
| - zoomedSize = minSize;
|
| + if (specifiedSize < minSize)
|
| + specifiedSize = minSize;
|
|
|
| // Now apply the "smart minimum." This minimum is also only applied if we're still too small
|
| // after zooming. The font size must either be relative to the user default or the original size
|
| // must have been acceptable. In other words, we only apply the smart minimum whenever we're positive
|
| // doing so won't disrupt the layout.
|
| - if (useSmartMinimumForFontSize && zoomedSize < minLogicalSize && (specifiedSize >= minLogicalSize || !isAbsoluteSize))
|
| - zoomedSize = minLogicalSize;
|
| + if (useSmartMinimumForFontSize && specifiedSize < minLogicalSize && (specifiedSize >= minLogicalSize || !isAbsoluteSize))
|
| + specifiedSize = minLogicalSize;
|
|
|
| // Also clamp to a reasonable maximum to prevent insane font sizes from causing crashes on various
|
| // platforms (I'm looking at you, Windows.)
|
| - return std::min(maximumAllowedFontSize, zoomedSize);
|
| + return std::min(maximumAllowedFontSize, specifiedSize);
|
| }
|
|
|
| const int fontSizeTableMax = 16;
|
|
|