Changeset 263837 in webkit
- Timestamp:
- Jul 2, 2020, 1:47:57 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/intl-numberformat-nu.js (added)
-
JSTests/test262/expectations.yaml (modified) (1 diff)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/IntlNumberFormat.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r263833 r263837 1 2020-07-02 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Configure option-offered numberingSystem in Intl.NumberFormat through locale 4 https://bugs.webkit.org/show_bug.cgi?id=213872 5 6 Reviewed by Ross Kirsling. 7 8 * stress/intl-numberformat-nu.js: Added. 9 (shouldBe): 10 * test262/expectations.yaml: 11 1 12 2020-07-01 Yusuke Suzuki <ysuzuki@apple.com> 2 13 -
trunk/JSTests/test262/expectations.yaml
r263833 r263837 1702 1702 default: 'Test262Error: "und".minimize() should be "en" Expected SameValue(«en-u-va-posix», «en») to be true' 1703 1703 strict mode: 'Test262Error: "und".minimize() should be "en" Expected SameValue(«en-u-va-posix», «en») to be true' 1704 test/intl402/NumberFormat/prototype/format/numbering-systems.js:1705 default: 'Test262Error: numberingSystem: adlm, digit: 0 Expected SameValue(«0», «𞥐») to be true'1706 strict mode: 'Test262Error: numberingSystem: adlm, digit: 0 Expected SameValue(«0», «𞥐») to be true'1707 1704 test/intl402/RelativeTimeFormat/constructor/constructor/locales-valid.js: 1708 1705 default: 'Test262Error: Grandfathered Expected a RangeError to be thrown but no exception was thrown at all' -
trunk/Source/JavaScriptCore/ChangeLog
r263833 r263837 1 2020-07-02 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Configure option-offered numberingSystem in Intl.NumberFormat through locale 4 https://bugs.webkit.org/show_bug.cgi?id=213872 5 6 Reviewed by Ross Kirsling. 7 8 We need to pass numberingSystem option to ICU through locale when constructing UNumberFormat. 9 We are passing it when we get "en-US-u-nu-hanidec" locale, but we are not passing it when 10 we are getting `new Intl.NumberFormat("en-US", { numberingSystem: "hanidec" })`. 11 12 * runtime/IntlNumberFormat.cpp: 13 (JSC::IntlNumberFormat::initializeNumberFormat): 14 1 15 2020-07-01 Yusuke Suzuki <ysuzuki@apple.com> 2 16 -
trunk/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
r261755 r263837 43 43 namespace IntlNumberFormatInternal { 44 44 constexpr const char* relevantExtensionKeys[1] = { "nu" }; 45 constexpr bool verbose = false; 45 46 } 46 47 … … 311 312 } 312 313 314 CString dataLocaleWithExtensions = makeString(result.get("dataLocale"_s), "-u-nu-", m_numberingSystem).utf8(); 315 dataLogLnIf(IntlNumberFormatInternal::verbose, "dataLocaleWithExtensions:(", dataLocaleWithExtensions , ")"); 316 313 317 UErrorCode status = U_ZERO_ERROR; 314 m_numberFormat = std::unique_ptr<UNumberFormat, UNumberFormatDeleter>(unum_open(style, nullptr, 0, m_locale.utf8().data(), nullptr, &status));318 m_numberFormat = std::unique_ptr<UNumberFormat, UNumberFormatDeleter>(unum_open(style, nullptr, 0, dataLocaleWithExtensions.data(), nullptr, &status)); 315 319 if (U_FAILURE(status)) { 316 320 throwTypeError(globalObject, scope, "failed to initialize NumberFormat"_s);
Note:
See TracChangeset
for help on using the changeset viewer.