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

Unified Diff: chrome/browser/renderer_preferences_util.cc

Issue 10544103: Chromium change of sharing some WebKit API between Android/Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For landing Created 8 years, 5 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 | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_preferences_util.cc
diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/renderer_preferences_util.cc
index c2a27f952a7552c1c62af18525d62041c4c516fa..bb29ee26115e2cb659a4e607bd97b05f0792a450 100644
--- a/chrome/browser/renderer_preferences_util.cc
+++ b/chrome/browser/renderer_preferences_util.cc
@@ -9,7 +9,7 @@
#include "chrome/common/pref_names.h"
#include "content/public/common/renderer_preferences.h"
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_ANDROID)
#include "ui/gfx/font_render_params_linux.h"
#endif
@@ -29,7 +29,7 @@ namespace {
const double kGtkCursorBlinkCycleFactor = 2000.0;
#endif // defined(TOOLKIT_GTK)
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_ANDROID)
content::RendererPreferencesHintingEnum GetRendererPreferencesHintingEnum(
gfx::FontRenderParams::Hinting hinting) {
switch (hinting) {
@@ -67,7 +67,7 @@ GetRendererPreferencesSubpixelRenderingEnum(
return content::RENDERER_PREFERENCES_SUBPIXEL_RENDERING_SYSTEM_DEFAULT;
}
}
-#endif // defined(OS_LINUX)
+#endif // defined(OS_LINUX) || defined(OS_ANDROID)
} // namespace
@@ -105,11 +105,13 @@ void UpdateFromSystemSettings(
prefs->inactive_selection_fg_color = SK_ColorBLACK;
#endif
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_ANDROID)
const gfx::FontRenderParams& params = gfx::GetDefaultFontRenderParams();
prefs->should_antialias_text = params.antialiasing;
prefs->use_subpixel_positioning = params.subpixel_positioning;
prefs->hinting = GetRendererPreferencesHintingEnum(params.hinting);
+ prefs->use_autohinter = params.autohinter;
+ prefs->use_bitmaps = params.use_bitmaps;
prefs->subpixel_rendering =
GetRendererPreferencesSubpixelRenderingEnum(params.subpixel_rendering);
#endif
« no previous file with comments | « no previous file | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698