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

Unified Diff: third_party/WebKit/Source/platform/text/LocaleToScriptMapping.cpp

Issue 2222283002: Fix scriptCodeForHanFromSubtags() may return non-Han scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « third_party/WebKit/Source/platform/text/LocaleToScriptMapping.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/text/LocaleToScriptMapping.cpp
diff --git a/third_party/WebKit/Source/platform/text/LocaleToScriptMapping.cpp b/third_party/WebKit/Source/platform/text/LocaleToScriptMapping.cpp
index d06e737f3075b2f553ac4740a832b1bb0e651e6d..ae2f92c6b5b5acad13fac354ce564f38c8b3bb7e 100644
--- a/third_party/WebKit/Source/platform/text/LocaleToScriptMapping.cpp
+++ b/third_party/WebKit/Source/platform/text/LocaleToScriptMapping.cpp
@@ -512,7 +512,7 @@ UScriptCode scriptCodeForHanFromSubtags(const String& locale, char delimiter)
break;
case 4: // script = 4ALPHA
script = scriptNameToCode(locale.substring(begin, len));
- if (script != USCRIPT_INVALID_CODE)
+ if (isUnambiguousHanScript(script))
return script;
}
}
« no previous file with comments | « third_party/WebKit/Source/platform/text/LocaleToScriptMapping.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698