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

Unified Diff: chrome/browser/renderer_preferences_util.cc

Issue 10540038: linux: Pass subpixel positioning setting to WebKit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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: chrome/browser/renderer_preferences_util.cc
diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/renderer_preferences_util.cc
index 96cbbc4bb95822565ab8db3eacfc8bcbe25ff1a0..7c66eb275f001d323f1c55bb8d09612e2cf53708 100644
--- a/chrome/browser/renderer_preferences_util.cc
+++ b/chrome/browser/renderer_preferences_util.cc
@@ -12,6 +12,9 @@
#if defined(TOOLKIT_GTK)
#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
+#elif defined(USE_ASH)
+#include "base/command_line.h"
+#include "ui/base/ui_base_switches.h"
#endif
namespace renderer_preferences_util {
@@ -36,6 +39,12 @@ void UpdateFromSystemSettings(
prefs->inactive_selection_fg_color =
theme_service->get_inactive_selection_fg_color();
#elif defined(USE_ASH)
+ // TODO(derat): This code and GetCairoFontOptions() from ui/gfx/pango_util.cc
+ // should get their settings from the same place.
+ prefs->use_subpixel_positioning =
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableTextSubpixelPositioning);
+
// This color is 0x544d90fe modulated with 0xffffff.
prefs->active_selection_bg_color = SkColorSetRGB(0xCB, 0xE4, 0xFA);
prefs->active_selection_fg_color = SK_ColorBLACK;

Powered by Google App Engine
This is Rietveld 408576698