[INTL] Implement Intl.DateTimeFormat.prototype.resolvedOptions ()
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Dec 2015 10:48:26 +0000 (10:48 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Dec 2015 10:48:26 +0000 (10:48 +0000)
commit20abee58b7bda4acf1f6d144a1fc705004b89a8a
tree76e7f16045df5187c773cce39b25f7fdb44decbb
parent7235062fb74eaf0b49331d366613dd317c798d8a
[INTL] Implement Intl.DateTimeFormat.prototype.resolvedOptions ()
https://bugs.webkit.org/show_bug.cgi?id=147603

Patch by Andy VanWagoner <andy@instructure.com> on 2015-12-23
Reviewed by Benjamin Poulain.

.:

* Source/cmake/OptionsWin.cmake: Disable INTL on Windows for now

Source/JavaScriptCore:

Implements InitializeDateTimeFormat and related abstract operations
using ICU. Lazy initialization is used for DateTimeFormat.prototype.
Refactor to align with Collator work.

* icu/unicode/udatpg.h: Added.
* icu/unicode/unumsys.h: Added.
* runtime/CommonIdentifiers.h:
* runtime/IntlDateTimeFormat.cpp:
(JSC::defaultTimeZone):
(JSC::canonicalizeTimeZoneName):
(JSC::localeData):
(JSC::toDateTimeOptions):
(JSC::IntlDateTimeFormat::setFormatsFromPattern):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::weekdayString):
(JSC::IntlDateTimeFormat::eraString):
(JSC::IntlDateTimeFormat::yearString):
(JSC::IntlDateTimeFormat::monthString):
(JSC::IntlDateTimeFormat::dayString):
(JSC::IntlDateTimeFormat::hourString):
(JSC::IntlDateTimeFormat::minuteString):
(JSC::IntlDateTimeFormat::secondString):
(JSC::IntlDateTimeFormat::timeZoneNameString):
(JSC::IntlDateTimeFormat::resolvedOptions):
(JSC::IntlDateTimeFormat::format):
(JSC::IntlDateTimeFormatFuncFormatDateTime): Deleted.
* runtime/IntlDateTimeFormat.h:
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):
* runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::IntlDateTimeFormatFuncFormatDateTime):
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):
* runtime/IntlObject.cpp:
(JSC::resolveLocale):
(JSC::getNumberingSystemsForLocale):
* runtime/IntlObject.h:

LayoutTests:

* js/intl-datetimeformat-expected.txt: Added resolvedOptions tests.
* js/script-tests/intl-datetimeformat.js: Added resolvedOptions tests.
(string_appeared_here):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/js/intl-datetimeformat-expected.txt
LayoutTests/js/script-tests/intl-datetimeformat.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/icu/unicode/udatpg.h [new file with mode: 0644]
Source/JavaScriptCore/icu/unicode/unumsys.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
Source/JavaScriptCore/runtime/IntlDateTimeFormat.h
Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp
Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp
Source/JavaScriptCore/runtime/IntlObject.cpp
Source/JavaScriptCore/runtime/IntlObject.h
Source/cmake/OptionsWin.cmake
Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj