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

Unified Diff: chrome/browser/ui/prefs/prefs_tab_helper.cc

Issue 10532105: Use ICU script code "Jpan" instead of "Hrkt" in Japanese pref names (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better sample texts 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/ui/prefs/prefs_tab_helper.cc
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc
index 75008cf6f748a51b25d9af29e328a6184ab68775..2742e6477f2989eb4b47fa43155c594b189ef631 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper.cc
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc
@@ -111,7 +111,7 @@ const int kPrefsToObserveLength = arraysize(kPrefsToObserve);
// Registers a preference under the path |map_name| for each script used for
// per-script font prefs. For example, if |map_name| is "fonts.serif", then
-// "fonts.serif.Arab", "fonts.serif.Hang", etc. are registered.
+// "fonts.serif.Arab", "fonts.serif.Kore", etc. are registered.
jungshik at Google 2012/06/14 21:49:47 Leave alone 'Hang' and exclude 'Kore'.
falken 2012/06/15 03:58:11 Done.
void RegisterFontFamilyMap(PrefService* prefs, const char* map_name) {
for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) {
const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i];
@@ -224,19 +224,19 @@ UScriptCode GetScriptOfFontPref(const char* pref_name) {
// If |scriptCode| is a member of a family of "similar" script codes, returns
// the script code in that family that is used in font pref names. For example,
// USCRIPT_HANGUL and USCRIPT_KOREAN are considered equivalent for the purposes
-// of font selection. Chrome uses the script code USCRIPT_HANGUL (script name
-// "Hang") in Korean font pref names (for example,
-// "webkit.webprefs.fonts.serif.Hang"). So, if |scriptCode| is USCRIPT_KOREAN,
-// the function returns USCRIPT_HANGUL. If |scriptCode| is not a member of such
+// of font selection. Chrome uses the script code USCRIPT_KOREAN (script name
+// "Kore") in Korean font pref names (for example,
+// "webkit.webprefs.fonts.serif.Kore"). So, if |scriptCode| is USCRIPT_HANGUL,
+// the function returns USCRIPT_KOREAN. If |scriptCode| is not a member of such
// a family, returns |scriptCode|.
UScriptCode GetScriptForFontPrefMatching(UScriptCode scriptCode) {
switch (scriptCode) {
case USCRIPT_HIRAGANA:
case USCRIPT_KATAKANA:
- case USCRIPT_JAPANESE:
- return USCRIPT_KATAKANA_OR_HIRAGANA;
- case USCRIPT_KOREAN:
- return USCRIPT_HANGUL;
+ case USCRIPT_KATAKANA_OR_HIRAGANA:
+ return USCRIPT_JAPANESE;
+ case USCRIPT_HANGUL:
+ return USCRIPT_KOREAN;
jungshik at Google 2012/06/14 21:49:47 Perhaps, Kore -> Hang mapping makes more sense.
falken 2012/06/15 03:58:11 Done.
default:
return scriptCode;
}

Powered by Google App Engine
This is Rietveld 408576698