Expand the hard-coded mapping of locales to script in LocaleToScriptMappingDefault.cpp (see comments on bug 10874).
Created attachment 105762 [details] Patch
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.
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.
Comment on attachment 105762 [details] Patch Yes, looks reasonable.
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.
Created attachment 120145 [details] add const
Comment on attachment 120145 [details] add const ok
Comment on attachment 120145 [details] add const Clearing flags on attachment: 120145 Committed r103397: <http://trac.webkit.org/changeset/103397>
All reviewed patches have been landed. Closing bug.