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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 27527003: Skip per-script font preferences registration and filling on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address falken's remark. 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 | « no previous file | chrome/browser/ui/prefs/prefs_tab_helper.cc » ('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 49fe6b1d5b98ce3b0175ac24ff087f3c7d82b582..aea10e320d1718a488d7bd6402de6ecdcf5bfc07 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -479,6 +479,8 @@ bool CertMatchesFilter(const net::X509Certificate& cert,
void FillFontFamilyMap(const PrefService* prefs,
const char* map_name,
webkit_glue::ScriptFontFamilyMap* map) {
+ // TODO: Get rid of the brute-force scan over possible (font family / script)
+ // combinations - see http://crbug.com/308095.
for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) {
const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i];
std::string pref_name = base::StringPrintf("%s.%s", map_name, script);
@@ -2090,6 +2092,9 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
rvh->GetProcess()->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
+ // Fill per-script font preferences. These are not registered on Android
+ // - http://crbug.com/308033.
+#if !defined(OS_ANDROID)
FillFontFamilyMap(prefs, prefs::kWebKitStandardFontFamilyMap,
&web_prefs->standard_font_family_map);
FillFontFamilyMap(prefs, prefs::kWebKitFixedFontFamilyMap,
@@ -2104,6 +2109,7 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
&web_prefs->fantasy_font_family_map);
FillFontFamilyMap(prefs, prefs::kWebKitPictographFontFamilyMap,
&web_prefs->pictograph_font_family_map);
+#endif
web_prefs->default_font_size =
prefs->GetInteger(prefs::kWebKitDefaultFontSize);
« no previous file with comments | « no previous file | chrome/browser/ui/prefs/prefs_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698