Commit Graph

274 Commits

Author SHA1 Message Date
Sylvestre Ledru
a3ea006705 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Henri Sivonen
41b363d50d Bug 1889536 - Migrate IDNA handling to ICU4X. r=necko-reviewers,geckoview-reviewers,credential-management-reviewers,home-newtab-reviewers,valentin,owlish,dimi,thecount,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D206579
2024-07-09 11:26:43 +00:00
Tamas Szentpeteri
c1ca326517 Backed out 2 changesets (bug 1889536) for causing bpnu bustages on nsIDNService.cpp. CLOSED TREE
Backed out changeset 87d0e483dd8c (bug 1889536)
Backed out changeset c3d6429d8a59 (bug 1889536)
2024-07-09 14:08:25 +03:00
Henri Sivonen
057d6de297 Bug 1889536 - Migrate IDNA handling to ICU4X. r=necko-reviewers,geckoview-reviewers,credential-management-reviewers,home-newtab-reviewers,valentin,owlish,dimi,thecount,supply-chain-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D206579
2024-07-09 09:50:38 +00:00
Makoto Kato
b574b44616 Bug 1899411 - Part 4. Build fix for ICU4X 1.5. r=TYLin,spidermonkey-reviewers,anba
icu_capi 1.5 has small changes for 8-bit char type.

Differential Revision: https://phabricator.services.mozilla.com/D213009
2024-06-17 02:03:32 +00:00
Jonathan Kew
95217b504d Bug 1899990 - Eliminate dependency on ICU4C's ubidi.h in BidiEmbeddingLevel.cpp. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D212243
2024-05-31 13:13:27 +00:00
Jonathan Kew
2866be791d Bug 1896117 - Let the unicode-bidi implementation of the intl::Bidi component ride the train to release. r=platform-i18n-reviewers,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D210039
2024-05-15 10:39:38 +00:00
Amit Prakash Ambasta
896a01eb65 Bug 1889054 - Fix issues with non-unified builds missing header inclusions. r=emilio
Signed-off-by: Amit Prakash Ambasta <amit.prakash.ambasta@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D207004
2024-04-09 12:09:53 +00:00
Jonathan Kew
8922d50ca7 Bug 1881232 - Restrict use of the Rust unicode-bidi implementation to Nightly builds for now. r=emilio
There are a few testcases that were affected by the switch in bidi implementations
(see patches 5 and 6 in bug 1824671), so we need to update the metadata to reflect
the differing behavior between Nightly and Beta/Release builds. These changes will
be reverted when we allow unicode-bidi to ride the train to Release.

Differential Revision: https://phabricator.services.mozilla.com/D202305
2024-02-21 15:19:54 +00:00
Jonathan Kew
8d66644973 Bug 1824671 - patch 4 - Update Gtest to accept either ICU4C or unicode-bidi handling of the embedding controls (explicitly unspecified by UAX#9). r=platform-i18n-reviewers,dminor
unicode-bidi more closely follows the UAX#9 recommendations for processing embedding controls
if they're not actually removed from the text; but this is not an actual spec requirement,
so either behavior is acceptable.

Differential Revision: https://phabricator.services.mozilla.com/D197891
2024-02-06 11:41:09 +00:00
Jonathan Kew
2848e319bb Bug 1824671 - patch 3 - Convert intl Bidi component to be backed by the unicode-bidi crate. r=platform-i18n-reviewers,dminor
With this, the intl::Bidi component no longer relies on ICU4C's ubidi_* APIs.

Differential Revision: https://phabricator.services.mozilla.com/D197890
2024-02-06 11:41:09 +00:00
Cristian Tuns
ddbe00e9e2 Backed out 11 changesets (bug 1824671) for causing spidermonkey bustages in Bidi.h CLOSED TREE
Backed out changeset f41ef5e3f7b9 (bug 1824671)
Backed out changeset f029db1566d8 (bug 1824671)
Backed out changeset 7fe14219e95e (bug 1824671)
Backed out changeset 71dbcba23335 (bug 1824671)
Backed out changeset 5c20e50fc26b (bug 1824671)
Backed out changeset e16c7ccc64e5 (bug 1824671)
Backed out changeset d8414db5bc0c (bug 1824671)
Backed out changeset 89622f53da27 (bug 1824671)
Backed out changeset 9a2fbd21feb5 (bug 1824671)
Backed out changeset b273d641a26a (bug 1824671)
Backed out changeset 17e79f579645 (bug 1824671)
2024-01-23 10:19:32 -05:00
Jonathan Kew
7b4735fe9c Bug 1824671 - patch 4 - Update Gtest to accept either ICU4C or unicode-bidi handling of the embedding controls (explicitly unspecified by UAX#9). r=platform-i18n-reviewers,dminor
unicode-bidi more closely follows the UAX#9 recommendations for processing embedding controls
if they're not actually removed from the text; but this is not an actual spec requirement,
so either behavior is acceptable.

Differential Revision: https://phabricator.services.mozilla.com/D197891
2024-01-23 11:53:21 +00:00
Jonathan Kew
87d57d1d26 Bug 1824671 - patch 3 - Convert intl Bidi component to be backed by the unicode-bidi crate. r=platform-i18n-reviewers,dminor
With this, the intl::Bidi component no longer relies on ICU4C's ubidi_* APIs.

Differential Revision: https://phabricator.services.mozilla.com/D197890
2024-01-23 11:53:21 +00:00
Sylvestre Ledru
5bd4bc54a3 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,media-playback-reviewers,padenot
clang-format version 17.0.6 (taskcluster-QueHFUviQeyM8Y7r_d7MQQ)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D195397
2023-12-04 10:09:36 +00:00
Makoto Kato
e16ba4ca12 Bug 1854031 - Part 7. Gecko changes for ICU4X 1.4. r=TYLin
Depends on D193882

Differential Revision: https://phabricator.services.mozilla.com/D193883
2023-12-04 09:02:40 +00:00
Noemi Erli
0be4452349 Backed out 18 changesets (bug 1863960, bug 1859752) as requested in Bug 1864612 CLOSED TREE
Backed out changeset 814145392ecb (bug 1863960)
Backed out changeset f3564a69fd3f (bug 1863960)
Backed out changeset 35ff07f4726a (bug 1859752)
Backed out changeset b5bf398e3069 (bug 1859752)
Backed out changeset da94a164d4ea (bug 1859752)
Backed out changeset c5eca26f8dff (bug 1859752)
Backed out changeset a2c6ae62fbf7 (bug 1859752)
Backed out changeset 33d0d72d1abe (bug 1859752)
Backed out changeset a42248554021 (bug 1859752)
Backed out changeset 0e7eefda2425 (bug 1859752)
Backed out changeset 1e39572cb1c7 (bug 1859752)
Backed out changeset cbde31ce55a8 (bug 1859752)
Backed out changeset 152860574068 (bug 1859752)
Backed out changeset 16b9813a9c61 (bug 1859752)
Backed out changeset e4495cec8e4b (bug 1859752)
Backed out changeset 1e22b97c98ba (bug 1859752)
Backed out changeset b191be0ec825 (bug 1859752)
Backed out changeset 8b46595de6b5 (bug 1859752)
2023-11-14 17:07:57 +02:00
André Bargull
132dfb27cd Bug 1859752 - Part 11: Add workarounds for ICU bugs. r=platform-i18n-reviewers,dminor
The fix for <https://unicode-org.atlassian.net/browse/ICU-22547> only handled four
character long language subtags, but language subtags with more than four
characters are still handled incorrectly.

Depends on D192735

Differential Revision: https://phabricator.services.mozilla.com/D192736
2023-11-07 08:45:50 +00:00
André Bargull
961fbb298b Bug 1859752 - Part 10: Adjust currency display name fallback handling. r=platform-i18n-reviewers,dminor
The currency display name for multiple locales is now only defined in the "root" locale,
which triggers the `U_USING_DEFAULT_WARNING` case, so we have to change our detection
when no localisation was found.

Depends on D192734

Differential Revision: https://phabricator.services.mozilla.com/D192735
2023-11-07 08:45:50 +00:00
André Bargull
d922d03683 Bug 1859752 - Part 8: Update Gecko to Unicode 15.1. r=platform-i18n-reviewers,dminor
Update by running `genUnicodePropertyData.pl`, `genSpecialCasingData.pl`, and `cldr-quotes.pl`.

Depends on D192732

Differential Revision: https://phabricator.services.mozilla.com/D192733
2023-11-07 08:45:49 +00:00
André Bargull
b63a5e31f8 Bug 1859752 - Part 4: Update language tag mappings. r=platform-i18n-reviewers,dminor
Update language tag mappings by running `./make_intl_data.py langtags`.

Differential Revision: https://phabricator.services.mozilla.com/D192729
2023-11-07 08:45:47 +00:00
André Bargull
8c33289180 Bug 1855749 - Part 3: Correctly handle ignorePunctuation option. r=dminor
The default value for `GetOption` in `InitializeCollator` is changed from `false`
to `undefined` to avoid having to `intl_isIgnorePunctuation` in the constructor
function.

The corresponding spec PR is <https://github.com/tc39/ecma402/pull/833>, but
our behaviour is already not strictly spec-compliant as described in
<https://github.com/tc39/ecma402/issues/832>, so it seems reasonable to simply
implement the spec PR ahead of time. (We don't want to "fix" our implementation
to strictly follow the spec without the PR, because that could be web-incompatible
resp. at least disruptive for Thai users, which currently already get the expected
behaviour where punctuation characters are ignored in Thai.)

Differential Revision: https://phabricator.services.mozilla.com/D189545
2023-11-05 12:27:05 +00:00
André Bargull
e51a197156 Bug 1855749 - Part 1: Add intl::Collator::GetIgnorePunctuation(). r=dminor
Add `Collator::GetIgnorePunctuation()` similar to the existing
`Collator::GetCaseFirst()` function.

Drive-by change:
- Remove unnecessary macro with an inline function.

Differential Revision: https://phabricator.services.mozilla.com/D189543
2023-11-05 12:27:04 +00:00
André Bargull
1aeaefd9af Bug 1855748: Handle related year and year names when computing the resolved components. r=dminor
Map both "r" (related Gregorian year) and "U" (cyclic year name) to a resolved numeric year.

From <https://github.com/tc39/ecma402/issues/816#issuecomment-1667481214>:
> Per 11.2.3 Internal slots, "{relatedYear}" can only appear in a pattern string
> when the format record has a [[year]] field. And if a [[year]] field is present,
> CreateDateTimeFormat will set the Intl.DateTimeFormat's [[Year]] field to the
> format records [[year]] value. Intl.DateTimeFormat.prototype.resolvedOptions
> should then return the value of the [[Year]] internal slot.

Fixes <https://github.com/tc39/ecma402/issues/816>.

Differential Revision: https://phabricator.services.mozilla.com/D189542
2023-11-05 12:27:04 +00:00
André Bargull
9b67b560c3 Bug 1855747: Raise fractional digits limit to 100. r=dminor
Implements the changes from <https://github.com/tc39/ecma402/pull/786>.

Drive-by change:
Enable another test which no longer fails.

Differential Revision: https://phabricator.services.mozilla.com/D189541
2023-11-05 12:27:03 +00:00
Sylvestre Ledru
b0fe72dee5 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
7388749830 Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
4a97019e39 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Jan Varga
272327b326 Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189226
2023-09-28 20:46:07 +00:00
Jonathan Kew
98c70077c1 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
4defcc158b 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
35d0062f41 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
be1aa58702 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
cfd6430fe3 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
5ac1721dc9 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
68a19b5dc1 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
51e4b03482 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
ce11dcc3a3 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
bf0b2a2283 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
aabd7cdfe4 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
2b649a6769 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
6d0c23e772 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
fccbbc6b44 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
011e3fc2d9 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
98c675ed3f 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
2e64d79ba8 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
5e0156c1e4 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
e95341af1a 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
1d95ecc09b 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
6328560e91 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