RESOLVED FIXED 67274
Add all ICU languages to LocaleToScriptMappingDefault.cpp
https://bugs.webkit.org/show_bug.cgi?id=67274
Summary Add all ICU languages to LocaleToScriptMappingDefault.cpp
Matt Falkenhagen
Reported 2011-08-31 02:02:38 PDT
Expand the hard-coded mapping of locales to script in LocaleToScriptMappingDefault.cpp (see comments on bug 10874).
Attachments
Patch (14.28 KB, patch)
2011-08-31 02:20 PDT, Matt Falkenhagen
no flags
add const (14.39 KB, patch)
2011-12-20 22:45 PST, Matt Falkenhagen
no flags
Matt Falkenhagen
Comment 1 2011-08-31 02:20:38 PDT
Kent Tamura
Comment 2 2011-12-13 22:53:43 PST
Comment on attachment 105762 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=105762&action=review > Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp:157 > + for (size_t i = 0; i < sizeof(scriptNameCodeList) / sizeof(scriptNameCodeList[0]); ++i) You can use WTF_ARRAY_LENGTH(scriptNameCodeList) in wtf/StdLibExtras.h.
Eric Seidel (no email)
Comment 3 2011-12-19 13:52:14 PST
Comment on attachment 105762 [details] Patch seems reasonable to me. ap or jungshik know the most about ICU in WebCore. Post a new patch using the ARRAY_SIZE macro and I'm ready to r+ this.
Alexey Proskuryakov
Comment 4 2011-12-20 18:16:09 PST
Comment on attachment 105762 [details] Patch Yes, looks reasonable.
Matt Falkenhagen
Comment 5 2011-12-20 22:14:46 PST
I get an error: no matching function for call to ‘ArrayLengthHelperFunction(const WebCore::getScriptCode(const WTF::St ring&)::ScriptNameCode [104])’ for WTF_ARRAY_LENGTH(scriptNameCodeList). I think maybe it can't be used on arrays of local structs. I could get it to work on an array of ints. I'll upload a new patch soon that just makes scriptNameCodeList const.
Matt Falkenhagen
Comment 6 2011-12-20 22:45:50 PST
Created attachment 120145 [details] add const
Kent Tamura
Comment 7 2011-12-20 23:03:19 PST
Comment on attachment 120145 [details] add const ok
WebKit Review Bot
Comment 8 2011-12-21 00:19:47 PST
Comment on attachment 120145 [details] add const Clearing flags on attachment: 120145 Committed r103397: <http://trac.webkit.org/changeset/103397>
WebKit Review Bot
Comment 9 2011-12-21 00:19:52 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.