| Index: third_party/WebKit/Source/core/layout/TextAutosizer.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
|
| index 52f838534546151afd49ff3a41f589996f509d5a..c3182045b3795df1d94ca11987543054e0ef9624 100644
|
| --- a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
|
| @@ -1038,10 +1038,15 @@ void TextAutosizer::applyMultiplier(LayoutObject* layoutObject,
|
| ASSERT(layoutObject);
|
| ComputedStyle& currentStyle = layoutObject->mutableStyleRef();
|
| if (!currentStyle.getTextSizeAdjust().isAuto()) {
|
| - // The accessibility font scale factor is applied by the autosizer so we need to apply that
|
| - // scale factor on top of the text-size-adjust multiplier.
|
| - multiplier = currentStyle.getTextSizeAdjust().multiplier() *
|
| - m_pageInfo.m_accessibilityFontScaleFactor;
|
| + // The accessibility font scale factor is applied by the autosizer so we
|
| + // need to apply that scale factor on top of the text-size-adjust
|
| + // multiplier. Only apply the accessibility factor if the autosizer has
|
| + // determined a multiplier should be applied so that text-size-adjust:none
|
| + // does not cause a multiplier to be applied when it wouldn't be otherwise.
|
| + bool shouldApplyAccessibilityFontScaleFactor = multiplier > 1;
|
| + multiplier = currentStyle.getTextSizeAdjust().multiplier();
|
| + if (shouldApplyAccessibilityFontScaleFactor)
|
| + multiplier *= m_pageInfo.m_accessibilityFontScaleFactor;
|
| } else if (multiplier < 1) {
|
| // Unlike text-size-adjust, the text autosizer should only inflate fonts.
|
| multiplier = 1;
|
|
|