| Index: Source/core/css/resolver/FontBuilder.cpp
|
| diff --git a/Source/core/css/resolver/FontBuilder.cpp b/Source/core/css/resolver/FontBuilder.cpp
|
| index 28cebbcf4a2ddf7ff454393fd5d60a4840e8ef1d..e0ad871842175142093dd5f3bc8701cc68985723 100644
|
| --- a/Source/core/css/resolver/FontBuilder.cpp
|
| +++ b/Source/core/css/resolver/FontBuilder.cpp
|
| @@ -329,21 +329,21 @@ void FontBuilder::updateSpecifiedSize(FontDescription& fontDescription, const La
|
|
|
| void FontBuilder::updateAdjustedSize(FontDescription& fontDescription, const LayoutStyle& style, FontSelector* fontSelector)
|
| {
|
| - const float sizeAdjust = fontDescription.sizeAdjust();
|
| const float specifiedSize = fontDescription.specifiedSize();
|
| - if (!sizeAdjust || !specifiedSize)
|
| + if (!fontDescription.hasSizeAdjust() || !specifiedSize)
|
| return;
|
|
|
| // We need to create a temporal Font to get xHeight of a primary font.
|
| // The aspect value is based on the xHeight of the font for the computed font size,
|
| - // so we need to reset the adjustment.
|
| - fontDescription.setAdjustedSize(0);
|
| + // so we need to reset the adjustedSize to computedSize. See FontDescription::effectiveFontSize.
|
| + fontDescription.setAdjustedSize(fontDescription.computedSize());
|
|
|
| Font font(fontDescription);
|
| font.update(fontSelector);
|
| if (!font.fontMetrics().hasXHeight())
|
| return;
|
|
|
| + const float sizeAdjust = fontDescription.sizeAdjust();
|
| float aspectValue = font.fontMetrics().xHeight() / specifiedSize;
|
| float adjustedSize = (sizeAdjust / aspectValue) * specifiedSize;
|
| adjustedSize = getComputedSizeFromSpecifiedSize(fontDescription, style.effectiveZoom(), adjustedSize);
|
|
|