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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 49043010: Plumb device scale adjustment separately. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rmquirk
Patch Set: 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 | « android_webview/native/aw_settings.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index c7b991c583bb7ec65cbb1e44d2ed0f8b24dce954..6c2082e4d9900591522e90ce953249725302ddce 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -594,7 +594,7 @@ void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) {
SingleTabModeTabHelper::FromWebContents(web_contents)->HandleOpenUrl(params);
}
-float GetFontScaleMultiplier() {
+float GetDeviceScaleAdjustment() {
static const float kMinFSM = 1.05f;
static const int kWidthForMinFSM = 320;
static const float kMaxFSM = 1.3f;
@@ -2219,9 +2219,9 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
web_prefs->allow_running_insecure_content =
prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent);
#if defined(OS_ANDROID)
- web_prefs->text_autosizing_font_scale_factor =
- static_cast<float>(prefs->GetDouble(prefs::kWebKitFontScaleFactor)) *
- GetFontScaleMultiplier();
+ web_prefs->font_scale_factor =
+ static_cast<float>(prefs->GetDouble(prefs::kWebKitFontScaleFactor));
+ web_prefs->device_scale_adjustment = GetDeviceScaleAdjustment();
web_prefs->force_enable_zoom =
prefs->GetBoolean(prefs::kWebKitForceEnableZoom);
#endif
« no previous file with comments | « android_webview/native/aw_settings.cc ('k') | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698