| Index: third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
|
| index 958592ff0f51f64b83773dd5293ce516018f72e3..79ce1e42e1a9487c6bf9e351aa61ee157ea576ae 100644
|
| --- a/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
|
| +++ b/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
|
| @@ -319,11 +319,14 @@ void FontBuilder::updateAdjustedSize(FontDescription& fontDescription,
|
|
|
| Font font(fontDescription);
|
| font.update(fontSelector);
|
| - if (!font.getFontMetrics().hasXHeight())
|
| +
|
| + const SimpleFontData* fontData = font.primaryFont();
|
| +
|
| + if (!fontData || !fontData->getFontMetrics().hasXHeight())
|
| return;
|
|
|
| const float sizeAdjust = fontDescription.sizeAdjust();
|
| - float aspectValue = font.getFontMetrics().xHeight() / specifiedSize;
|
| + float aspectValue = fontData->getFontMetrics().xHeight() / specifiedSize;
|
| float adjustedSize = (sizeAdjust / aspectValue) * specifiedSize;
|
| adjustedSize = getComputedSizeFromSpecifiedSize(
|
| fontDescription, style.effectiveZoom(), adjustedSize);
|
|
|