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

Unified Diff: third_party/WebKit/Source/core/layout/TextAutosizer.cpp

Issue 2100013002: Implement the new text-size-adjust CSS property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update virtual expectation, minor cleanup. Created 4 years, 6 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
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 3f6ee8e3974e65d83458b685f84a00f7f0967815..a0ac433151ddabd28c37285fc99fec2b67a122f7 100644
--- a/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
+++ b/third_party/WebKit/Source/core/layout/TextAutosizer.cpp
@@ -988,6 +988,13 @@ void TextAutosizer::applyMultiplier(LayoutObject* layoutObject, float multiplier
{
ASSERT(layoutObject);
ComputedStyle& currentStyle = layoutObject->mutableStyleRef();
+ if (!currentStyle.getTextSizeAdjust().isAuto()) {
+ multiplier = currentStyle.getTextSizeAdjust().multiplier();
+ } else if (multiplier < 1) {
skobes 2016/06/27 21:37:03 Some callers of ComputedStyle::textAutosizingMulti
pdr. 2016/06/27 22:29:43 Good catch, done.
+ // Unlike text-size-adjust, the text autosizer should only inflate fonts.
+ multiplier = 1;
+ }
+
if (currentStyle.textAutosizingMultiplier() == multiplier)
return;

Powered by Google App Engine
This is Rietveld 408576698