Ignore:
Timestamp:
Feb 11, 2016, 1:24:52 PM (9 years ago)
Author:
Sukolsak Sakshuwong
Message:

[INTL] Implement Intl.NumberFormat.prototype.resolvedOptions ()
https://bugs.webkit.org/show_bug.cgi?id=147602

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch implements Intl.NumberFormat.prototype.resolvedOptions() according
to the ECMAScript 2015 Internationalization API spec (ECMA-402 2nd edition.)

  • runtime/IntlDateTimeFormat.cpp:

(JSC::localeData):

  • runtime/IntlNumberFormat.cpp:

(JSC::localeData):
(JSC::computeCurrencySortKey):
(JSC::extractCurrencySortKey):
(JSC::computeCurrencyDigits):
(JSC::IntlNumberFormat::initializeNumberFormat):
(JSC::IntlNumberFormat::styleString):
(JSC::IntlNumberFormat::currencyDisplayString):
(JSC::IntlNumberFormat::resolvedOptions):
(JSC::IntlNumberFormat::setBoundFormat):

  • runtime/IntlNumberFormat.h:
  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::constructIntlNumberFormat):
(JSC::callIntlNumberFormat):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):

  • runtime/IntlObject.cpp:

(JSC::intlNumberOption):
(JSC::numberingSystemsForLocale):
(JSC::getNumberingSystemsForLocale): Deleted.

  • runtime/IntlObject.h:

LayoutTests:

  • js/intl-numberformat-expected.txt:
  • js/script-tests/intl-numberformat.js:

(testNumberFormat):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/IntlObject.h

    r194387 r196434  
    6262bool intlBooleanOption(ExecState&, JSValue options, PropertyName, bool& usesFallback);
    6363String intlStringOption(ExecState&, JSValue options, PropertyName, std::initializer_list<const char*> values, const char* notFound, const char* fallback);
     64unsigned intlNumberOption(ExecState&, JSValue options, PropertyName, unsigned minimum, unsigned maximum, unsigned fallback);
    6465Vector<String> canonicalizeLocaleList(ExecState&, JSValue locales);
    6566HashMap<String, String> resolveLocale(const HashSet<String>& availableLocales, const Vector<String>& requestedLocales, const HashMap<String, String>& options, const char* const relevantExtensionKeys[], size_t relevantExtensionKeyCount, Vector<String> (*localeData)(const String&, size_t));
     
    6768String removeUnicodeLocaleExtension(const String& locale);
    6869String bestAvailableLocale(const HashSet<String>& availableLocales, const String& requestedLocale);
    69 Vector<String> getNumberingSystemsForLocale(const String& locale);
     70Vector<String> numberingSystemsForLocale(const String& locale);
    7071
    7172} // namespace JSC
Note: See TracChangeset for help on using the changeset viewer.