summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authoraurimas@chromium.org <aurimas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-25 21:48:38 +0000
committeraurimas@chromium.org <aurimas@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-25 21:48:38 +0000
commitedde96fd7348eb8ef2523c2e07d76d5a9839ead7 (patch)
treea909127787d46ded29c2d790ffc9655d54e9d329 /webkit
parent5348fc7c6bf457c74e31b856b06bf432e22ab3f6 (diff)
downloadchromium_src-edde96fd7348eb8ef2523c2e07d76d5a9839ead7.zip
chromium_src-edde96fd7348eb8ef2523c2e07d76d5a9839ead7.tar.gz
chromium_src-edde96fd7348eb8ef2523c2e07d76d5a9839ead7.tar.bz2
FontScaleFactor and ForceEnableZoom pref_names.
Adding prefs::kWebKitFontScaleFactor and prefs::kWebKitForceEnableZoom to the pref_names. It will be used by font boosting on Android. BUG=151216 Review URL: https://chromiumcodereview.appspot.com/10983010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158664 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/webpreferences.cc8
-rw-r--r--webkit/glue/webpreferences.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc
index bcb8df6..e6ff557 100644
--- a/webkit/glue/webpreferences.cc
+++ b/webkit/glue/webpreferences.cc
@@ -99,6 +99,10 @@ WebPreferences::WebPreferences()
fullscreen_enabled(false),
allow_displaying_insecure_content(true),
allow_running_insecure_content(false),
+#if defined(OS_ANDROID)
+ font_scale_factor(1.0f),
+ force_enable_zoom(false),
+#endif
password_echo_enabled(false),
should_print_backgrounds(false),
enable_scroll_animator(false),
@@ -390,6 +394,10 @@ void WebPreferences::Apply(WebView* web_view) const {
settings->setFullScreenEnabled(fullscreen_enabled);
settings->setAllowDisplayOfInsecureContent(allow_displaying_insecure_content);
settings->setAllowRunningOfInsecureContent(allow_running_insecure_content);
+#if defined(OS_ANDROID)
+ settings->setTextAutosizingFontScaleFactor(font_scale_factor);
+ web_view->setIgnoreViewportTagMaximumScale(force_enable_zoom);
+#endif
settings->setPasswordEchoEnabled(password_echo_enabled);
settings->setShouldPrintBackgrounds(should_print_backgrounds);
settings->setEnableScrollAnimator(enable_scroll_animator);
diff --git a/webkit/glue/webpreferences.h b/webkit/glue/webpreferences.h
index 03b759d..1a4bb1b 100644
--- a/webkit/glue/webpreferences.h
+++ b/webkit/glue/webpreferences.h
@@ -116,6 +116,10 @@ struct WEBKIT_GLUE_EXPORT WebPreferences {
bool fullscreen_enabled;
bool allow_displaying_insecure_content;
bool allow_running_insecure_content;
+#if defined(OS_ANDROID)
+ float font_scale_factor;
+ bool force_enable_zoom;
+#endif
bool password_echo_enabled;
bool should_print_backgrounds;
bool enable_scroll_animator;