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

Unified Diff: chrome/browser/ui/webui/chrome_url_data_manager.cc

Issue 9328020: [uber page] Update web-ui font settings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebase Created 8 years, 10 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 | « chrome/browser/resources/uber/uber_frame.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chrome_url_data_manager.cc
===================================================================
--- chrome/browser/ui/webui/chrome_url_data_manager.cc (revision 120636)
+++ chrome/browser/ui/webui/chrome_url_data_manager.cc (working copy)
@@ -155,19 +155,21 @@
// static
void ChromeURLDataManager::DataSource::SetFontAndTextDirection(
DictionaryValue* localized_strings) {
- localized_strings->SetString("fontfamily",
- l10n_util::GetStringUTF16(IDS_WEB_FONT_FAMILY));
-
+ int web_font_family_id = IDS_WEB_FONT_FAMILY;
int web_font_size_id = IDS_WEB_FONT_SIZE;
#if defined(OS_WIN)
- // Some fonts used for some languages changed a lot in terms of the font
- // metric in Vista. So, we need to use different size before Vista.
- if (base::win::GetVersion() < base::win::VERSION_VISTA)
+ // Vary font settings for Windows Vista and/or Windows XP.
+ if (base::win::GetVersion() == base::win::VERSION_VISTA) {
+ web_font_family_id = IDS_WEB_FONT_FAMILY_VISTA;
+ } else if (base::win::GetVersion() < base::win::VERSION_VISTA) {
+ web_font_family_id = IDS_WEB_FONT_FAMILY_XP;
web_font_size_id = IDS_WEB_FONT_SIZE_XP;
+ }
#endif
+ localized_strings->SetString("fontfamily",
+ l10n_util::GetStringUTF16(web_font_family_id));
localized_strings->SetString("fontsize",
l10n_util::GetStringUTF16(web_font_size_id));
-
localized_strings->SetString("textdirection",
base::i18n::IsRTL() ? "rtl" : "ltr");
}
« no previous file with comments | « chrome/browser/resources/uber/uber_frame.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698