Changeset 189811 in webkit for trunk/Source/JavaScriptCore/icu


Ignore:
Timestamp:
Sep 15, 2015, 10:43:27 AM (10 years ago)
Author:
[email protected]
Message:

[INTL] Implement supportedLocalesOf on Intl Constructors
https://bugs.webkit.org/show_bug.cgi?id=147599

Patch by Andy VanWagoner <[email protected]> on 2015-09-15
Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Implements all of the abstract operations used by supportedLocalesOf,
except during canonicalization it does not replace redundant tags,
or subtags with their preferred values.

  • icu/unicode/ucal.h: Added.
  • icu/unicode/udat.h: Added.
  • icu/unicode/umisc.h: Added.
  • icu/unicode/unum.h: Added.
  • icu/unicode/utypes.h: Clear the U_SHOW_CPLUSPLUS_API flag to prevent C++ headers from being included.
  • runtime/CommonIdentifiers.h: Adde localeMatcher.
  • runtime/IntlCollatorConstructor.cpp:

(JSC::IntlCollatorConstructorFuncSupportedLocalesOf): Implemented.

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf): Implemented.

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf): Implemented.

  • runtime/IntlObject.cpp:

(JSC::canonicalizeLanguageTag):
(JSC::getCanonicalLangTag):
(JSC::getPrivateUseLangTag):
(JSC::getGrandfatheredLangTag):
(JSC::canonicalizeLocaleList):
(JSC::bestAvailableLocale):
(JSC::lookupSupportedLocales):
(JSC::bestFitSupportedLocales):
(JSC::supportedLocales):
(JSC::getIntlStringOption):
(JSC::getIntlBooleanOption):

  • runtime/IntlObject.h:
  • runtime/JSCJSValue.h: Added toLength.
  • runtime/JSCJSValue.cpp: Added toLength.

(JSC::JSValue::toLength): Implement ToLength from ECMA 262 6.0 7.1.15

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::intlCollatorAvailableLocales): Added lazy locale list.
(JSC::JSGlobalObject::intlDateTimeFormatAvailableLocales): Added lazy locale list.
(JSC::JSGlobalObject::intlNumberFormatAvailableLocales): Added lazy locale list.

  • runtime/JSGlobalObject.h:

LayoutTests:

  • js/intl-collator-expected.txt: Added tests for supportedLocalesOf
  • js/intl-datetimeformat-expected.txt: Added tests for supportedLocalesOf
  • js/intl-numberformat-expected.txt: Added tests for supportedLocalesOf
  • js/script-tests/intl-collator.js: Added tests for supportedLocalesOf
  • js/script-tests/intl-datetimeformat.js: Added tests for supportedLocalesOf
  • js/script-tests/intl-numberformat.js: Added tests for supportedLocalesOf
Location:
trunk/Source/JavaScriptCore/icu/unicode
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.