mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibJS: Update AOs involved in locale resolution to the latest ECMA-402
There have been a number of changes to the locale resolution AOs that we've fallen behind on. Mostly editorial, but includes one normative change to canonicalize Unicode extension keywords in the Intl.Locale constructor.
This commit is contained in:
parent
2c311448c7
commit
9c3a775395
Notes:
sideshowbarker
2024-07-16 20:12:13 +09:00
Author: https://github.com/trflynn89
Commit: 9c3a775395
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/198
19 changed files with 242 additions and 311 deletions
|
@ -89,12 +89,12 @@ ThrowCompletionOr<NonnullGCPtr<Object>> DurationFormatConstructor::construct(Fun
|
|||
duration_format->set_locale(move(locale));
|
||||
|
||||
// 12. Set durationFormat.[[DataLocale]] to r.[[dataLocale]].
|
||||
duration_format->set_data_locale(move(result.data_locale));
|
||||
// NOTE: The [[dataLocale]] internal slot no longer exists.
|
||||
|
||||
// 13. Let dataLocale be durationFormat.[[DataLocale]].
|
||||
// 14. Let dataLocaleData be durationFormat.[[LocaleData]].[[<dataLocale>]].
|
||||
// 15. Let digitalFormat be dataLocaleData.[[DigitalFormat]].
|
||||
auto digital_format = ::Locale::digital_format(duration_format->data_locale());
|
||||
auto digital_format = ::Locale::digital_format(duration_format->locale());
|
||||
|
||||
// 16. Let twoDigitHours be digitalFormat.[[TwoDigitHours]].
|
||||
// 17. Set durationFormat.[[TwoDigitHours]] to twoDigitHours.
|
||||
|
@ -172,8 +172,8 @@ JS_DEFINE_NATIVE_FUNCTION(DurationFormatConstructor::supported_locales_of)
|
|||
// 2. Let requestedLocales be ? CanonicalizeLocaleList(locales).
|
||||
auto requested_locales = TRY(canonicalize_locale_list(vm, locales));
|
||||
|
||||
// 3. Return ? SupportedLocales(availableLocales, requestedLocales, options).
|
||||
return TRY(supported_locales(vm, requested_locales, options));
|
||||
// 3. Return ? FilterLocales(availableLocales, requestedLocales, options).
|
||||
return TRY(filter_locales(vm, requested_locales, options));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue