Chromium Code Reviews| 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..271e03a7024cceff40edba4aee42ae4c790a2cee 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,10 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs( |
| rvh->GetProcess()->GetBrowserContext()); |
| PrefService* prefs = profile->GetPrefs(); |
| + // Fill per-script font preferences. These are not available on Android and |
| + // filling the maps is CPU intensive (http://crbug.com/308033). The ifdef can |
| + // be removed after http://crbug.com/308095 is solved. |
| +#if !defined(OS_ANDROID) |
|
Yaron
2013/10/16 16:24:13
Theres' some related code in chrome/browser/ui/pre
ppi
2013/10/16 18:02:36
Thanks for the pointer! Actually, it looks like th
Yaron
2013/10/16 18:08:53
Ya, I measured after the observers were removed. W
|
| FillFontFamilyMap(prefs, prefs::kWebKitStandardFontFamilyMap, |
| &web_prefs->standard_font_family_map); |
| FillFontFamilyMap(prefs, prefs::kWebKitFixedFontFamilyMap, |
| @@ -2104,6 +2110,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); |