Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: Source/core/css/resolver/FontBuilder.cpp

Issue 472893004: Apply the text autosizing multiplier in FontBuilder::updateComputedSize. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/text-autosizing/inherited-multiplier-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/FontBuilder.cpp
diff --git a/Source/core/css/resolver/FontBuilder.cpp b/Source/core/css/resolver/FontBuilder.cpp
index 03b07328256de5683cd6f3cd7ca072a8ba40ce5a..073dd94d3eee6eba6a54fa4014126dcc2c2069c6 100644
--- a/Source/core/css/resolver/FontBuilder.cpp
+++ b/Source/core/css/resolver/FontBuilder.cpp
@@ -30,6 +30,7 @@
#include "core/frame/Settings.h"
#include "core/rendering/RenderTheme.h"
#include "core/rendering/RenderView.h"
+#include "core/rendering/TextAutosizer.h"
#include "platform/fonts/FontDescription.h"
#include "platform/text/LocaleToScriptMapping.h"
@@ -533,7 +534,12 @@ void FontBuilder::updateComputedSize(RenderStyle* style, const RenderStyle* pare
{
FontDescriptionChangeScope scope(this);
- scope.fontDescription().setComputedSize(getComputedSizeFromSpecifiedSize(scope.fontDescription(), style->effectiveZoom(), scope.fontDescription().specifiedSize()));
+ float computedSize = getComputedSizeFromSpecifiedSize(scope.fontDescription(), style->effectiveZoom(), scope.fontDescription().specifiedSize());
+ float multiplier = style->textAutosizingMultiplier();
+ if (multiplier > 1)
+ computedSize = TextAutosizer::computeAutosizedFontSize(computedSize, multiplier);
+
+ scope.fontDescription().setComputedSize(computedSize);
}
// FIXME: style param should come first
« no previous file with comments | « LayoutTests/fast/text-autosizing/inherited-multiplier-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698