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

Unified Diff: Source/core/rendering/TextAutosizer.cpp

Issue 49913005: Add Settings::deviceScaleAdjustment. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments. Created 7 years, 2 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 | « Source/core/page/Settings.cpp ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/TextAutosizer.cpp
diff --git a/Source/core/rendering/TextAutosizer.cpp b/Source/core/rendering/TextAutosizer.cpp
index 0424b5a6e365d27923be17813dc1644291d63025..044d80e93749abd26dc2b782ab85757f4b2ac61d 100644
--- a/Source/core/rendering/TextAutosizer.cpp
+++ b/Source/core/rendering/TextAutosizer.cpp
@@ -208,6 +208,12 @@ float TextAutosizer::clusterMultiplier(WritingMode writingMode, const TextAutosi
float multiplier = logicalClusterWidth / logicalWindowWidth;
multiplier *= m_document->settings()->textAutosizingFontScaleFactor();
+
+ // If the page has a meta viewport or @viewport, don't apply the device scale adjustment.
+ const ViewportDescription& viewportDescription = m_document->page()->mainFrame()->document()->viewportDescription();
+ if (!viewportDescription.isSpecifiedByAuthor()) {
johnme 2013/11/05 18:56:40 Didn't we say we'd disable the fontScaleFactor if
skobes 2013/11/05 19:02:46 Actually what we are doing is disabling the 1.05-1
+ multiplier *= m_document->settings()->deviceScaleAdjustment();
+ }
return std::max(1.0f, multiplier);
}
« no previous file with comments | « Source/core/page/Settings.cpp ('k') | Source/web/WebSettingsImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698