Граф коммитов

245 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew 74bf676eba Bug 1845552 - patch 1 - Don't let the presence of an invalid-hyphen error (which may be ignored during StringPrepForDNS) mask the presence of other (non-ignorable) types of error in the URL. r=necko-reviewers,valentin
This change gives us 46 new passes on the IdnaTestV2 test collection, with just 6 failures remaining
(to be resolved by the next patch).

Differential Revision: https://phabricator.services.mozilla.com/D186866
2023-08-29 09:20:05 +00:00
Mike Hommey 713c4adb84 Bug 1849072 - Avoid instantiating char_traits<const char>. r=platform-i18n-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D186420
2023-08-17 08:51:39 +00:00
Makoto Kato 80aa728f71 Bug 1719535 - Part 4. Add ICU4X Data Provider. r=platform-i18n-reviewers,dminor,sylvestre
ICU4X will be used by ECMA-402 implementation at future. So we should link it
to SpiderMonkey instead of libxul only.

Depends on D178157

Differential Revision: https://phabricator.services.mozilla.com/D167673
2023-08-07 06:23:48 +00:00
Sandor Molnar 13c7e4a350 Backed out 14 changesets (bug 1719535) for causing mochitest failures in accessible/tests/browser/mac/browser_text_basics.js CLOSED TREE
Backed out changeset 338c2c8d91af (bug 1719535)
Backed out changeset 3fdb2e999aba (bug 1719535)
Backed out changeset 63b9d2064827 (bug 1719535)
Backed out changeset 09c216cdbbc8 (bug 1719535)
Backed out changeset 29977dc00fb3 (bug 1719535)
Backed out changeset d3f8850a343b (bug 1719535)
Backed out changeset 90f1f621031f (bug 1719535)
Backed out changeset 52ca9bdc5bd4 (bug 1719535)
Backed out changeset 94536f0d5a1f (bug 1719535)
Backed out changeset d615264f9f5f (bug 1719535)
Backed out changeset f16f9e583378 (bug 1719535)
Backed out changeset e1abdee07587 (bug 1719535)
Backed out changeset 45f9ad406428 (bug 1719535)
Backed out changeset caa2b8a731dc (bug 1719535)
2023-08-02 14:55:26 +03:00
Makoto Kato 696dad9f78 Bug 1719535 - Part 4. Add ICU4X Data Provider. r=platform-i18n-reviewers,dminor,sylvestre
ICU4X will be used by ECMA-402 implementation at future. So we should link it
to SpiderMonkey instead of libxul only.

Depends on D178157

Differential Revision: https://phabricator.services.mozilla.com/D167673
2023-08-02 10:32:49 +00:00
serge-sans-paille bcc4d5e330 Bug 1845440 - Get rid of useless global constructor for kBidiLevelNone r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184550
2023-07-26 09:10:12 +00:00
André Bargull a5486477fc Bug 1519167 - Part 30: Add methods to retrieve time zone transitions and utf-offsets from local time. r=spidermonkey-reviewers,allstarschh
The `GetNamedTimeZoneEpochNanoseconds`, `GetNamedTimeZoneNextTransition`, and
`GetNamedTimeZonePreviousTransition` abstract operations from the Temporal API
proposal require these additional methods.

Differential Revision: https://phabricator.services.mozilla.com/D174287
2023-06-21 20:27:42 +00:00
André Bargull 6b464f9394 Bug 1838173: Allow to set the Gregorian change date for ISO-8601 calendars. r=platform-i18n-reviewers,dminor
Add a patch to work around <https://unicode-org.atlassian.net/jira/software/c/projects/ICU/issues/ICU-22412>.

Differential Revision: https://phabricator.services.mozilla.com/D180796
2023-06-14 05:38:46 +00:00
André Bargull ef5a81c474 Bug 1795756 - Part 5: Support roundingMode, roundingIncrement, and stripTrailingZero for PluralRules. r=platform-i18n-reviewers,dminor
Required updates for the next patch in this stack.

Also replaces `PluralRulesOptions::RoundingPriority` with an alias to
`NumberFormatOptions::RoundingPriority`, so we don't have to duplicate the
`RoundingPriority` and `RoundingMode` enums.

Differential Revision: https://phabricator.services.mozilla.com/D179946
2023-06-06 06:42:07 +00:00
André Bargull 9e6f20b341 Bug 1824744 - Part 7: Remove no longer needed ICU draft API guards. r=platform-i18n-reviewers,gregtatum
`UNUM_APPROXIMATELY_SIGN_FIELD` is no longer a draft API.

Depends on D176268

Differential Revision: https://phabricator.services.mozilla.com/D176269
2023-05-25 20:41:02 +00:00
André Bargull 3df7435860 Bug 1824744 - Part 4: Update language tag mappings. r=platform-i18n-reviewers,gregtatum
- Update the URL because the "core.zip" is no longer present.
- Add code to remove redundant language mappings.

Depends on D176265

Differential Revision: https://phabricator.services.mozilla.com/D176266
2023-05-25 20:41:01 +00:00
serge-sans-paille cd880dc521 Bug 1824508 - Make intl/components buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D173608
2023-03-30 13:48:31 +00:00
Jonathan Kew b3fc2def82 Bug 208789 - patch 1 - Create an intl::GeneralCategory enum for UnicodeProperties::CharType() to return, to avoid directly referring to ICU4C constants or mapping via harfbuzz constants. r=platform-i18n-reviewers,nordzilla
No change in behavior; this just gives us our own version of the general category constants,
so we can avoid depending on ICU's constants elsewhere in the codebase.

Differential Revision: https://phabricator.services.mozilla.com/D173203
2023-03-23 13:54:33 +00:00
Andi-Bogdan Postelnicu fa5d4cca1f Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 11:35:33 +00:00
Andi-Bogdan Postelnicu 10f49d4180 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 11:35:33 +00:00
Stanca Serban e31a178029 Backed out 7 changesets (bug 1660405) for causing bustages on Linux x64 opt. CLOSED TREE
Backed out changeset ad1a5f59214f (bug 1660405)
Backed out changeset a39e95f0aafe (bug 1660405)
Backed out changeset 48629ee0d70d (bug 1660405)
Backed out changeset 8419b99aab60 (bug 1660405)
Backed out changeset 535cc12c8bed (bug 1660405)
Backed out changeset e27052da4927 (bug 1660405)
Backed out changeset 11b0f9cf8091 (bug 1660405)
2023-03-22 13:05:53 +02:00
Andi-Bogdan Postelnicu 0b692b5a96 Bug 1660405 - Move away from mozilla::IsFinite in favor of std::isfinite. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173036
2023-03-22 09:27:57 +00:00
Andi-Bogdan Postelnicu a5d28acdd6 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 09:27:56 +00:00
Tom Schuster 7b3f9f5ef0 Bug 1822980 - Fix system ICU build error. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D172978
2023-03-21 15:13:23 +00:00
Tom Schuster c46852b04b Bug 1709867 - Add a ICU-only DateTimeInfo::timeZoneId method. r=anba,platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D169611
2023-03-15 13:53:54 +00:00
serge-sans-paille 9b1f15288f Bug 1819822 - Make intl buildable outside of a unified build environment r=andi
Depends on D171428

Differential Revision: https://phabricator.services.mozilla.com/D171429
2023-03-02 07:44:31 +00:00
Andi-Bogdan Postelnicu d7e8a09c21 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D168658
2023-02-13 15:02:07 +00:00
Jonathan Kew 859eb99179 Bug 1806042 - Update tests to expect normal spaces rather than U+202F/2009 in formatted date/time strings. r=gregtatum
We'll need to revert this when we're ready to disable the workaround.

Depends on D165408

Differential Revision: https://phabricator.services.mozilla.com/D165409
2022-12-24 10:35:10 +00:00
Jonathan Kew 34a08b7422 Bug 1806042 - Replace Narrow No-Break Space (U+202F) and Thin Space (U+2009) in DateTimeFormat/DateTimeIntervalFormat output with regular Space to mitigate breakage on fragile websites. r=anba
The data for a bunch of locales was updated in ICU 72 to use U+202F and U+2009 in places where previously it had regular Space characters.
Unfortunately, this breaks some sites that attempt to parse the formatted output using naive regular expressions (or similar)
that just expect space, rather than "any whitespace", and fail to match against the new formatted output.

To mitigate this, until more browsers update to the newer ICU/CLDR data and pressure builds on sites to fix such fragile scripts,
we can post-process the formatted output from ICU to replace these "special" spaces with standard ASCII space characters.

This workaround is designed to be easily disabled at build time by just changing the DATE_TIME_FORMAT_REPLACE_SPECIAL_SPACES #define,
when we're ready to try re-enabling the updated formats.

Differential Revision: https://phabricator.services.mozilla.com/D165408
2022-12-24 10:35:10 +00:00
André Bargull 86a29191ae Bug 1792775 - Part 11.1: Update expected test results in non-SpiderMonkey files. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D162707
2022-11-23 17:56:18 +00:00
André Bargull ff0958538f Bug 1792775 - Part 8: Remove no longer needed ICU draft API guards. r=platform-i18n-reviewers,jfkthame
`UDAT_STANDALONE_NARROW_QUARTERS` has been promoted from draft to stable.

Differential Revision: https://phabricator.services.mozilla.com/D160186
2022-11-23 17:56:16 +00:00
André Bargull c79afec58b Bug 1792775 - Part 7: Update Gecko to Unicode 15. r=platform-i18n-reviewers,jfkthame
Update Gecko to Unicode 15 by running `genUnicodePropertyData.pl` and
`genSpecialCasingData.pl`.

Differential Revision: https://phabricator.services.mozilla.com/D160185
2022-11-23 17:56:16 +00:00
André Bargull 44945dd321 Bug 1792775 - Part 3: Update language tag mappings. r=platform-i18n-reviewers,dminor
Update language tags by running `./make_intl_data.py langtags`.

Differential Revision: https://phabricator.services.mozilla.com/D160181
2022-11-23 17:56:14 +00:00
Noemi Erli 57fbfda9e8 Backed out 16 changesets (bug 1792775) for causing build bustage in TestDateIntervalFormat.cpp CLOSED TREE
Backed out changeset 240681aef215 (bug 1792775)
Backed out changeset e15aea6bb46b (bug 1792775)
Backed out changeset ee9cd4c8d5cd (bug 1792775)
Backed out changeset 0be61a39756f (bug 1792775)
Backed out changeset 7db4fb376f48 (bug 1792775)
Backed out changeset 7009b35a05a0 (bug 1792775)
Backed out changeset 5abc2704004e (bug 1792775)
Backed out changeset 6d76fe50cf35 (bug 1792775)
Backed out changeset d6300cbbf628 (bug 1792775)
Backed out changeset 8f5e0e60d195 (bug 1792775)
Backed out changeset 0b9cf0354dc0 (bug 1792775)
Backed out changeset 7136c85641b7 (bug 1792775)
Backed out changeset 486778427d64 (bug 1792775)
Backed out changeset 7acee89c2699 (bug 1792775)
Backed out changeset 654c5f659fed (bug 1792775)
Backed out changeset a60b1bc33f91 (bug 1792775)
2022-11-23 17:18:45 +02:00
André Bargull 0fedffe9f5 Bug 1792775 - Part 11.1: Update expected test results in non-SpiderMonkey files. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D162707
2022-11-23 10:42:45 +00:00
André Bargull 4a0ac37d47 Bug 1792775 - Part 8: Remove no longer needed ICU draft API guards. r=platform-i18n-reviewers,jfkthame
`UDAT_STANDALONE_NARROW_QUARTERS` has been promoted from draft to stable.

Differential Revision: https://phabricator.services.mozilla.com/D160186
2022-11-23 10:42:43 +00:00
André Bargull 8fb15ffe9d Bug 1792775 - Part 7: Update Gecko to Unicode 15. r=platform-i18n-reviewers,jfkthame
Update Gecko to Unicode 15 by running `genUnicodePropertyData.pl` and
`genSpecialCasingData.pl`.

Differential Revision: https://phabricator.services.mozilla.com/D160185
2022-11-23 10:42:43 +00:00
André Bargull 645f61adee Bug 1792775 - Part 3: Update language tag mappings. r=platform-i18n-reviewers,dminor
Update language tags by running `./make_intl_data.py langtags`.

Differential Revision: https://phabricator.services.mozilla.com/D160181
2022-11-23 10:42:41 +00:00
Noemi Erli d26dc9e9e0 Backed out 13 changesets (bug 1792775) for causing bustages
Backed out changeset f2c8e2200194 (bug 1792775)
Backed out changeset 3392ce042fb6 (bug 1792775)
Backed out changeset f5461baa7c5a (bug 1792775)
Backed out changeset d810c2b2d0bd (bug 1792775)
Backed out changeset af6164024ade (bug 1792775)
Backed out changeset 8c97026ef2b5 (bug 1792775)
Backed out changeset d396bec29ac2 (bug 1792775)
Backed out changeset a9aaa2387313 (bug 1792775)
Backed out changeset a4461db138b7 (bug 1792775)
Backed out changeset a7b39a5105a9 (bug 1792775)
Backed out changeset 5e746d85926a (bug 1792775)
Backed out changeset 3ea531c10813 (bug 1792775)
Backed out changeset 78811cdadd63 (bug 1792775)
2022-11-23 11:48:28 +02:00
André Bargull 995289f140 Bug 1792775 - Part 11.1: Update expected test results in non-SpiderMonkey files. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D162707
2022-11-23 08:43:23 +00:00
André Bargull ff7bda35a3 Bug 1792775 - Part 8: Remove no longer needed ICU draft API guards. r=platform-i18n-reviewers,jfkthame
`UDAT_STANDALONE_NARROW_QUARTERS` has been promoted from draft to stable.

Differential Revision: https://phabricator.services.mozilla.com/D160186
2022-11-23 08:43:21 +00:00
André Bargull 52649f0d2a Bug 1792775 - Part 7: Update Gecko to Unicode 15. r=platform-i18n-reviewers,jfkthame
Update Gecko to Unicode 15 by running `genUnicodePropertyData.pl` and
`genSpecialCasingData.pl`.

Differential Revision: https://phabricator.services.mozilla.com/D160185
2022-11-23 08:43:20 +00:00
André Bargull 70aaaa7f06 Bug 1792775 - Part 3: Update language tag mappings. r=platform-i18n-reviewers,dminor
Update language tags by running `./make_intl_data.py langtags`.

Differential Revision: https://phabricator.services.mozilla.com/D160181
2022-11-23 08:43:19 +00:00
André Bargull 7d0125b8c7 Bug 1799859: Add support for "microsecond" and "nanosecond" units. r=dminor
Steps performed:
- Add "microsecond" and "nanosecond" to "intl/icu/data_filter.json".
- Run "icu_sources_data.py" to update the ICU data file.
- Run "update-tzdata.sh" to reapply the tzdata 2022f changes.
- Add "microsecond" and "nanosecond" to "SanctionedSimpleUnitIdentifiers.yaml".
- Run "make_intl_data.py units" to regenerate additional SpiderMonkey files.

Spec PR: https://github.com/tc39/ecma402/pull/708

Differential Revision: https://phabricator.services.mozilla.com/D161676
2022-11-09 16:45:43 +00:00
Dan Minor d6d0fb6210 Bug 1799250 - Don't use extractOrCopyRawBuffer in Locale.cpp; r=anba
Differential Revision: https://phabricator.services.mozilla.com/D161471
2022-11-08 17:41:49 +00:00
Valentin Gosu f4e5d22860 Bug 1793521 - Make sure URLs with invalid IDNA labels parse the same round-trip r=necko-reviewers,kershaw
This was regressed by bug 1788115, which allowed us to parse ASCII labels
again to enforce they're valid. However, the existing code only checked for
invalid punycode (that fails decoding), not ACE labels that are invalid.

If we don't check for this condition uidna_labelToUnicode will add a U+FFFD
character to the end of the label, making us encode it again, changing the URL.
When that happens, the principal's origin may change between serializations,
which is not OK.

Depends on D159373

Differential Revision: https://phabricator.services.mozilla.com/D160785
2022-11-01 09:50:18 +00:00
André Bargull b9446c85e2 Bug 1797248: Update time zone data to tzdata2022e. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D160173
2022-10-27 11:32:17 +00:00
André Bargull eff8ea5f7f Bug 1752253: Change era skeleton to "GGG" to produce the expected era field length. r=platform-i18n-reviewers,gregtatum
This is actually exploiting an ICU bug, but ensures we return the same results
as other browsers. When the ICU bug has been fixed, we can revert this back to
"G".

Differential Revision: https://phabricator.services.mozilla.com/D156413
2022-09-08 06:05:55 +00:00
André Bargull 52aed99c43 Bug 1786025: Update time zone data to tzdata2022b. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D155068
2022-08-19 17:14:03 +00:00
André Bargull 8c3a6dad95 Bug 1784375: Call LocaleParser::TryParse() with a new, empty Locale. r=platform-i18n-reviewers,dminor
For this to work, we need to add a move-constructor to `Locale`, so that it's
possible to write `loc = {}`. (We need move instead of copy semantics, because
`Locale` has UniquePtr members.) All other `Locale` members except for
`LanguageTagSubtag` already support move semantics. Add copy-constructors to
`LanguageTagSubtag`, so defaulted move-constructor/assignment works for `Locale`.
`LanguageTagSubtag` gets copy- instead of move-constructors, because there isn't
a good reason to disallow copying when moving is allowed.

Also add extra assertions and comments to document the requirement that `TryParse`
expects a new, empty `Locale`.

Differential Revision: https://phabricator.services.mozilla.com/D154496
2022-08-15 15:37:20 +00:00
André Bargull 0d0356d4a0 Bug 1767961 - Part 4: Make TryCreateFromSkeleton a private method. r=platform-i18n-reviewers,dminor
`TryCreateFromSkeleton()` is only called internally in `DateTimeFormat`, so we
can make it a private method to reduce the API surface.

Differential Revision: https://phabricator.services.mozilla.com/D145583
2022-05-05 15:00:35 +00:00
André Bargull 011e248afb Bug 1767961 - Part 3: Remove no longer used TryCreateFromSkeleton() method. r=platform-i18n-reviewers,dminor
There aren't any callers left for `TryCreateFromSkeleton()` after part 2.

Depends on D145581

Differential Revision: https://phabricator.services.mozilla.com/D145582
2022-05-05 15:00:34 +00:00
André Bargull e6d82f6c5e Bug 1767961 - Part 1: Remove hour-cycle override from TryCreateFromSkeleton public API. r=platform-i18n-reviewers,dminor
All callers were passing `Nothing()` for the hour-cycle override parameter, so
we might as well remove the parameter from the public API surface.

Differential Revision: https://phabricator.services.mozilla.com/D145580
2022-05-05 15:00:34 +00:00
André Bargull 8d87ceda13 Bug 1763783 - Part 10: Remove no longer needed workarounds for ICU-21154 and ICU-21155. r=platform-i18n-reviewers,jfkthame
ICU-21154 and ICU-21155 have been fixed in ICU 71, so we can remove this
workaround.

Depends on D143282

Differential Revision: https://phabricator.services.mozilla.com/D143283
2022-04-10 09:18:06 +00:00
André Bargull 2130cb5dbf Bug 1763783 - Part 9: Update ICU draft API guards. r=platform-i18n-reviewers,jfkthame
- `UCAL_TZ_LOCAL_FORMER` and `UCAL_TZ_LOCAL_FORMER` are now stable.
- `UNUM_APPROXIMATELY_SIGN_FIELD` is a new draft API.

Depends on D143281

Differential Revision: https://phabricator.services.mozilla.com/D143282
2022-04-10 09:18:05 +00:00