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

5498 Коммитов

Автор SHA1 Сообщение Дата
Greg Tatum 072e80dc1d Bug 1719735 - Have IcuLocale take a null-terminated Span; r=platform-i18n-reviewers,dminor
This simplifies the call sites that take Span locale, and ensures null
termination.

Differential Revision: https://phabricator.services.mozilla.com/D131534
2021-11-30 19:05:56 +00:00
Greg Tatum e61871c813 Bug 1719553 - Use unified Intl API in OSPreferences_gtk.cpp; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D132038
2021-11-29 20:43:07 +00:00
Nika Layzell 26555d958a Bug 1734739 - Part 1: Stop requiring otherpid for ShareTo, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D128218
2021-11-24 17:56:00 +00:00
Dan Minor e12f42285c Bug 1733659 - Clean up naming style in Locale; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D131511
2021-11-23 12:36:41 +00:00
Zibi Braniecki 07f49c8f68 Bug 1742106 - Add basic C++ Localization gtests. r=nordzilla,eemeli,emilio
Differential Revision: https://phabricator.services.mozilla.com/D131615
2021-11-22 21:57:34 +00:00
Sandor Molnar 2594d2ac61 Backed out 2 changesets (bug 1733659) for causing build bustages. CLOSED TREE
Backed out changeset 9e23aa79fda9 (bug 1733659)
Backed out changeset e316768591c0 (bug 1733659)
2021-11-22 20:51:20 +02:00
Dan Minor bcbfdb6d73 Bug 1733659 - Clean up naming style in Locale; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D131511
2021-11-22 18:32:41 +00:00
Yoshi Cheng-Hao Huang 5b9420c13f Bug 1719545 - Part 1: Add Script::GetExtensions. r=anba,platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D130975
2021-11-19 13:20:22 +00:00
Dan Minor 2da248e720 Bug 1728121 - Use std::is_same_v in unified intl; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D131262
2021-11-17 15:05:52 +00:00
André Bargull a62c197b64 Bug 1741222: Add include guards to MeasureUnitGenerated.h files. r=allstarschh
Add include guard and place the definitions into the correct namespace.

The name had to be changed to `SimpleMeasureUnit` to avoid a conflict with the
existing `mozilla::intl::MeasureUnit` class.

Depends on D131244

Differential Revision: https://phabricator.services.mozilla.com/D131245
2021-11-17 08:55:08 +00:00
Zibi Braniecki 8d28718532 Bug 1563128 - Handle broken l10n-args gracefully. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D131251
2021-11-16 18:28:26 +00:00
André Bargull 2b25e46cab Bug 1738422 - Part 13: Remove no longer needed ICU workarounds and conditional code. r=platform-i18n-reviewers,dminor
Number range formatting is stable in ICU 70, which means we can remove
`MOZ_INTL_HAS_NUMBER_RANGE_FORMAT` and `MOZ_INTL_PLURAL_RULES_HAS_SELECT_RANGE`.

The following bugs have been fixed in ICU 70, so we can remove the workarounds
for them:
- https://unicode-org.atlassian.net/browse/ICU-21109
- https://unicode-org.atlassian.net/browse/ICU-21622
- https://unicode-org.atlassian.net/browse/ICU-21641
- https://unicode-org.atlassian.net/browse/ICU-21683
- https://unicode-org.atlassian.net/browse/ICU-21685
- https://unicode-org.atlassian.net/browse/ICU-21686

Depends on D129934

Differential Revision: https://phabricator.services.mozilla.com/D129935
2021-11-16 17:02:59 +00:00
André Bargull ff9c1aa3c8 Bug 1738422 - Part 11: Update expected test results. r=platform-i18n-reviewers,dminor
Depends on D129932

Differential Revision: https://phabricator.services.mozilla.com/D129933
2021-11-16 17:02:58 +00:00
André Bargull 03c3a9ff0e Bug 1738422 - Part 10: Remove approximately sign detection code. r=platform-i18n-reviewers,dminor
This is no longer necessary after part 9.

Depends on D129931

Differential Revision: https://phabricator.services.mozilla.com/D129932
2021-11-16 17:02:58 +00:00
André Bargull 2e3c881a95 Bug 1738422 - Part 9: Add a separate UNumberFormatFields constant for the approximately sign. r=platform-i18n-reviewers,dminor
Our previous heuristic no longer works, so we now have to patch ICU directly to
support detecting the approximately sign.

Depends on D129930

Differential Revision: https://phabricator.services.mozilla.com/D129931
2021-11-16 17:02:57 +00:00
André Bargull 1c1c5bd5f9 Bug 1738422 - Part 5: Update language tag mappings. r=platform-i18n-reviewers,dminor
Update language tag mappings by running `./make_intl_data.py langtags core.zip`.

The direct invocation `./make_intl_data.py langtags` doesn't work, because
"https://unicode.org/Public/cldr/40/core.zip" was incorrectly generated and
contains another "core.zip" file within "core.zip".

Depends on D129926

Differential Revision: https://phabricator.services.mozilla.com/D129927
2021-11-16 17:02:55 +00:00
André Bargull 5e425546cd Bug 1738422 - Part 4: Update Gecko to Unicode 14. r=platform-i18n-reviewers,dminor
Update to Unicode 14 by running `genUnicodePropertyData.pl` and `genSpecialCasingData.pl`.

Depends on D129925

Differential Revision: https://phabricator.services.mozilla.com/D129926
2021-11-16 17:02:54 +00:00
André Bargull d814742408 Bug 1738422 - Part 2: Update in-tree ICU to release 70.1. r=platform-i18n-reviewers,dminor
Update to ICU 70.1 by running "update-icu.sh" with "maint/maint-70" as the target.

Differential Revision: https://phabricator.services.mozilla.com/D129924
2021-11-16 17:02:38 +00:00
André Bargull 0b5e68fd05 Bug 1738422 - Part 1: Update or remove ICU patches. r=platform-i18n-reviewers,dminor
Remove the patches for bug 1636984, bug 1648137, and bug 1714933 because the
underlying bugs were fixed in ICU 70 resp. the local patches were backports from
the ICU development branch.

And update the local patches for Sorbian to apply cleanly on ICU 70.

Differential Revision: https://phabricator.services.mozilla.com/D129921
2021-11-16 17:02:38 +00:00
Greg Tatum ec908112f4 Bug 1738057 - Split out BidiEmbeddingLevel into its own file; r=platform-i18n-reviewers,dminor
This should speed up re-compile times, as mozilla/intl/Bidi.h will only
be included in a few places.

Differential Revision: https://phabricator.services.mozilla.com/D129662
2021-11-16 15:11:58 +00:00
Greg Tatum 0f0b78cc1d Bug 1736907 - Add a build flag to experimentally build with ICU4X static data; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D129080
2021-11-16 15:09:09 +00:00
Andi-Bogdan Postelnicu d6be8bb00a Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,firefox-build-system-reviewers,mhentges
Updated with rustfmt 1.4.38-nightly (936238a9 2021-11-11)

Depends on D129119

Differential Revision: https://phabricator.services.mozilla.com/D129120
2021-11-16 08:07:30 +00:00
Andi-Bogdan Postelnicu 1faa3d40cf Bug 1519636 - Reformat recent changes to the Google coding style. r=firefox-build-system-reviewers,mhentges,sylvestre
Reformat with clang-format version 12.0.1 (taskcluster-FYV2l5wGTseBAhiqf8cxfQ)

Differential Revision: https://phabricator.services.mozilla.com/D131114
2021-11-16 08:07:29 +00:00
Sylvestre Ledru 1df999712f Bug 1714788 - doc: do not provide the language if the code isn't valid r=firefox-source-docs-reviewers,championshuttler DONTBUILD
Otherwise, the warning is displayed:
```
WARNING: Could not lex literal_block as "json". Highlighting skipped.
```

Depends on D131092

Differential Revision: https://phabricator.services.mozilla.com/D131093
2021-11-16 07:59:48 +00:00
Ting-Yu Lin 2c88da9b0e Bug 1740831 Part 2 - Replace LineBreaker::Strictness with LineBreakRule. r=m_kato
LineBreaker::Strictness is just an alias of LineBreakRule in Segmenter.h. This
is to reduce the dependency of the legacy LineBreaker.

Differential Revision: https://phabricator.services.mozilla.com/D131026
2021-11-15 17:20:36 +00:00
Ting-Yu Lin 638eb14439 Bug 1740831 Part 1 - Replace LineBreaker::WordBreak with WordBreakRule. r=m_kato
LineBreaker::WordBreak is just an alias of WordBreakRule in Segmenter.h. This is
to reduce the dependency of the legacy LineBreaker.

Differential Revision: https://phabricator.services.mozilla.com/D131025
2021-11-15 17:20:35 +00:00
Zibi Braniecki 1aa25b7d0b Bug 1739143 - Capture DOM L10n initial translation and mutations rejections and report to console. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D130797
2021-11-10 23:40:43 +00:00
Butkovits Atila 7f1436e4bc Backed out changeset 4f859ea95ec6 (bug 1739143) for causing failures at document_l10n/non-system-principal/browser_resource_uri.js. CLOSED TREE 2021-11-10 02:14:34 +02:00
Zibi Braniecki d32521c61b Bug 1739143 - Capture DOM L10n initial translation and mutations rejections and report to console. r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D130797
2021-11-09 23:10:26 +00:00
Nika Layzell 4bf7ce347c Bug 1732343 - Part 5: Use attached handles for Windows SharedMemory serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126567
2021-11-09 14:17:33 +00:00
Nika Layzell d73755617d Bug 1732343 - Part 2: Migrate all uses of base::FileDescriptor to UniqueFileHandle, r=handyman
This is useful for the following parts, as UniqueFileHandle is a cross-platform
type which can also be used to support transferring HANDLEs between processes.

This change requires fairly sweeping changes to existing callsites, which
previously did not require owning access to the handle types when transferring.
For the most part these changes were straightforward, but manual.

Differential Revision: https://phabricator.services.mozilla.com/D126564
2021-11-09 14:17:32 +00:00
Andreas Farre 4cf077692f Bug 1733963 - Part 2: Add BitSet tests. r=glandium
Depends on D127447

Differential Revision: https://phabricator.services.mozilla.com/D127448
2021-11-09 12:34:51 +00:00
Brad Werth 09431f9208 Bug 1738107 Part 2: Remove deprecated std::iterator from ICU4CGlue. r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D130314
2021-11-09 05:02:25 +00:00
Ting-Yu Lin 4a00f61720 Bug 1722484 Part 1 - Introduce mozilla::intl::Segmenter and break iterators. r=m_kato,dminor
intl/component is already linked with Javascript. However, segmenter is still
backed by lwbrk, which highly couples with xpcom APIs, so we cannnot add it
under intl/component until we integrate ICU4X segmenter. I added it under
intl/lwbrk for now.

The enum `WordBreakRule` and `LineBreakRule` are named after their counterpart
in ICU4X.
https://unicode-org.github.io/icu4x-docs/doc/icu_segmenter/index.html#enums

Differential Revision: https://phabricator.services.mozilla.com/D129193
2021-11-09 01:14:14 +00:00
Iulian Moraru 36283a9a3b Backed out 2 changesets (bug 1722484) for causing multiple build bustages. CLOSED TREE
Backed out changeset bef547b588ff (bug 1722484)
Backed out changeset e676fa1a0cb7 (bug 1722484)
2021-11-09 01:42:20 +02:00
Ting-Yu Lin b2dc37c08a Bug 1722484 Part 1 - Introduce mozilla::intl::Segmenter and break iterators. r=m_kato,dminor
intl/component is already linked with Javascript. However, segmenter is still
backed by lwbrk, which highly couples with xpcom APIs, so we cannnot add it
under intl/component until we integrate ICU4X segmenter. I added it under
intl/lwbrk for now.

The enum `WordBreakRule` and `LineBreakRule` are named after their counterpart
in ICU4X.
https://unicode-org.github.io/icu4x-docs/doc/icu_segmenter/index.html#enums

Differential Revision: https://phabricator.services.mozilla.com/D129193
2021-11-08 22:24:18 +00:00
Marian-Vasile Laza 7241c1f9e9 Backed out 3 changesets (bug 1733963) for causing build bustages on TestEnumSet.cpp. CLOSED TREE
Backed out changeset 83b804a449c2 (bug 1733963)
Backed out changeset 434e10a0c39a (bug 1733963)
Backed out changeset d7d88b948f71 (bug 1733963)
2021-11-08 19:42:46 +02:00
Andreas Farre e7ee97fb29 Bug 1733963 - Part 2: Add BitSet tests. r=glandium
Depends on D127447

Differential Revision: https://phabricator.services.mozilla.com/D127448
2021-11-08 16:01:26 +00:00
ssummar 0992acc367 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-08 08:14:00 +00:00
Jonathan Kew 37bb886753 Bug 1737147 - Treat characters with LB=BreakAfter as Breakable in LineBreaker.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130477
2021-11-06 19:05:43 +00:00
Narcis Beleuzu 3144ccc409 Backed out changeset 551d3e02d2f7 (bug 1737147) for wr failures on word-break-normal-bo-000.html . CLOSED TREE 2021-11-05 23:44:50 +02:00
Marian-Vasile Laza fca6bc6241 Backed out 3 changesets (bug 1733963) for causing build bustages on SyncedContext.h. CLOSED TREE
Backed out changeset de5c7a16378c (bug 1733963)
Backed out changeset f5f3a27abf60 (bug 1733963)
Backed out changeset cc3a0603f88a (bug 1733963)
2021-11-05 20:54:33 +02:00
Andreas Farre 694649bec3 Bug 1733963 - Part 2: Add BitSet tests. r=glandium
Depends on D127447

Differential Revision: https://phabricator.services.mozilla.com/D127448
2021-11-05 17:23:02 +00:00
Jonathan Kew 97209d1f8a Bug 1737147 - Treat characters with LB=BreakAfter as Breakable in LineBreaker.cpp. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130477
2021-11-05 16:22:29 +00:00
Cristian Tuns 71486b8924 Backed out changeset 7e8e3747c3f8 (bug 1603127) for causing toolchains build bustages (Bug 1739589). CLOSED TREE 2021-11-05 07:23:45 -04:00
Cristian Tuns cbd178830f Backed out 10 changesets (bug 1732343) for causing coverage build bustages (Bug 1739590).
Backed out changeset bba94c79f3e1 (bug 1732343)
Backed out changeset d30fa1e1f605 (bug 1732343)
Backed out changeset ed0b4f757c4b (bug 1732343)
Backed out changeset a272da134c34 (bug 1732343)
Backed out changeset ccb259d73843 (bug 1732343)
Backed out changeset a292990b62de (bug 1732343)
Backed out changeset 7d1854782ca8 (bug 1732343)
Backed out changeset 29eaabd9ffb3 (bug 1732343)
Backed out changeset 1aa26657a7a6 (bug 1732343)
Backed out changeset 7a6708dc620a (bug 1732343)
2021-11-05 07:21:04 -04:00
ssummar 508562cc85 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-05 05:33:58 +00:00
Nika Layzell fc6ef2a44a Bug 1732343 - Part 5: Use attached handles for Windows SharedMemory serialization, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D126567
2021-11-04 19:20:19 +00:00
Nika Layzell b8279164db Bug 1732343 - Part 2: Migrate all uses of base::FileDescriptor to UniqueFileHandle, r=handyman
This is useful for the following parts, as UniqueFileHandle is a cross-platform
type which can also be used to support transferring HANDLEs between processes.

This change requires fairly sweeping changes to existing callsites, which
previously did not require owning access to the handle types when transferring.
For the most part these changes were straightforward, but manual.

Differential Revision: https://phabricator.services.mozilla.com/D126564
2021-11-04 19:20:17 +00:00
Dan Minor 2266940c0d Bug 1736017 - Remove MozLocale; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129213
2021-11-04 16:36:05 +00:00
Dan Minor 690f8a34f1 Bug 1736017 - Replace MozLocale with Locale in OSPreferences_win.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129212
2021-11-04 16:36:05 +00:00
Dan Minor b82d0c7706 Bug 1736017 - Replace MozLocale with Locale in nsLanguageAtomService.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129211
2021-11-04 16:36:04 +00:00
Dan Minor 45d66d673c Bug 1736017 - Replace MozLocale with Locale in Quotes.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129210
2021-11-04 16:36:04 +00:00
Dan Minor ef542a2f3b Bug 1736017 - Replace MozLocale with Locale in LocaleService.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129209
2021-11-04 16:36:04 +00:00
Jonathan Kew 0511cbc54e Bug 1738903 - Update locale-specific quotation-mark data to CLDR release 40.0. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D130304
2021-11-04 14:06:21 +00:00
Yoshi Cheng-Hao Huang b4c3f94c5f Bug 1737814 - Part 3: Simplify parts data structure. r=platform-i18n-reviewers,anba,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129563
2021-11-01 14:23:23 +00:00
Yoshi Cheng-Hao Huang 2349231e66 Bug 1737814 - Part 2: ListFormat.FormatToParts doesn't take a callback. r=platform-i18n-reviewers,anba,gregtatum
The caller now will provide a buffer, which owns the memory pointed by the span.

Differential Revision: https://phabricator.services.mozilla.com/D129562
2021-11-01 14:23:22 +00:00
Yoshi Cheng-Hao Huang 24dcdf0726 Bug 1737814 - Part 1: Add a AutoFormatResult class. r=platform-i18n-reviewers,anba,gregtatum
This AutoFormatResult class could be shared later by ListFormat.

Differential Revision: https://phabricator.services.mozilla.com/D129561
2021-11-01 14:23:22 +00:00
Noemi Erli 25dd04d4c5 Backed out 9 changesets (bug 1736017) for causing bustages in nsLineBreaker.cpp
Backed out changeset d7b7427bb29e (bug 1736017)
Backed out changeset 7249dec70600 (bug 1736017)
Backed out changeset f16572806b0c (bug 1736017)
Backed out changeset a78125c71b3e (bug 1736017)
Backed out changeset 84ba2cbd596a (bug 1736017)
Backed out changeset f771265e0930 (bug 1736017)
Backed out changeset c0cef271022d (bug 1736017)
Backed out changeset 19be73147fcc (bug 1736017)
Backed out changeset 11721cc861b0 (bug 1736017)
2021-10-28 00:06:35 +03:00
Dan Minor 739d179b38 Bug 1736017 - Remove MozLocale; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129213
2021-10-27 20:35:58 +00:00
Dan Minor f00bcd8df5 Bug 1736017 - Replace MozLocale with Locale in OSPreferences_win.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129212
2021-10-27 20:35:57 +00:00
Dan Minor b686783787 Bug 1736017 - Replace MozLocale with Locale in nsLanguageAtomService.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129211
2021-10-27 20:35:57 +00:00
Dan Minor 48c258c5fe Bug 1736017 - Replace MozLocale with Locale in Quotes.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129210
2021-10-27 20:35:57 +00:00
Dan Minor 635033c165 Bug 1736017 - Replace MozLocale with Locale in LocaleService.cpp; r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129209
2021-10-27 20:35:56 +00:00
Bob Owen b77c3841c1 Bug 1737914: Add missing MOZ_SANDBOX guards in nsUniscribeBreaker.cpp. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D129637
2021-10-27 14:42:12 +00:00
André Bargull 33694d390f Bug 1737765 - Part 1: Update tzdata in ICU data files to 2021a3. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129486
2021-10-26 13:50:53 +00:00
Bob Owen 93b7d525df Bug 1713973 p4: Test brokered complex breaker against Uniscribe in content. r=jfkthame
Depends on D129143

Differential Revision: https://phabricator.services.mozilla.com/D129144
2021-10-26 09:58:52 +00:00
Bob Owen 75ff7d4c1e Bug 1713973 p3: Use brokered complex line breaking when win32k lockdown is enabled. r=jfkthame,tkikuchi
Depends on D126809

Differential Revision: https://phabricator.services.mozilla.com/D129143
2021-10-26 09:58:52 +00:00
Bob Owen 25f1dc489f Bug 1713973 p1: Add caching for calls to NS_GetComplexLineBreaks. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D129125
2021-10-26 09:58:51 +00:00
André Bargull 4037b90f13 Bug 1736805: Register written normalised length. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129428
2021-10-26 07:21:13 +00:00
Ting-Yu Lin 8dddb69ae7 Bug 1736938 Part 5 - Convert LineBreaker and WordBreaker into utility classes. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D129363
2021-10-25 19:00:23 +00:00
Ting-Yu Lin c2f6ef7a09 Bug 1736938 Part 3 - Make all WordBreaker's methods static, and adapt the callers. r=jfkthame
The motivation is the same as the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D129109
2021-10-25 19:00:22 +00:00
Ting-Yu Lin 427cc27771 Bug 1736938 Part 2 - Make all LineBreaker's methods static, and adapt the callers. r=jfkthame
LineBreaker has no member variables and acts like "namespaces" with
utility functions. Therefore, its methods can be static and called
directly without needing a LineBreaker instance.

Rename GetJISx4051Breaks() to ComputeBreakPositions() per review
feedbacks.

Differential Revision: https://phabricator.services.mozilla.com/D129107
2021-10-25 19:00:22 +00:00
Ting-Yu Lin db09924f17 Bug 1736938 Part 1 - Expand LineBreaker::WordMove() within Next(). r=jfkthame
After removing Prev() in Bug 1733009, WordMove()'s argument aDirection
now always equals to 1 passed from its remaining caller Next(). Thus, we
can expand WordMove() within Next(), and simply the logic.

Differential Revision: https://phabricator.services.mozilla.com/D129361
2021-10-25 19:00:21 +00:00
Yoshi Cheng-Hao Huang 4d0b49fcd3 Bug 1737107 - Add documentation for Collator::GetSortKey. r=platform-i18n-reviewers,anba,dminor
Differential Revision: https://phabricator.services.mozilla.com/D129177
2021-10-25 18:24:07 +00:00
Yoshi Cheng-Hao Huang 817bdf1566 Bug 1719542 - Part 4: Make calling nsTArray::SetCapacity fallible. r=platform-i18n-reviewers,dminor
Originally nsCollation::AllocateRawSortKey used an infallible nsTArray[1],
however, for IndexedDB it used a fallible nsTArray instead[2], so making
SetCapacity fallible.

[1]: https://hg.mozilla.org/mozilla-central/rev/1a74809df6b9#l3.150
[2]: https://searchfox.org/mozilla-central/rev/ff5309e67b20a9976ea762f9ec5f657da0801490/dom/indexedDB/Key.cpp#673

Differential Revision: https://phabricator.services.mozilla.com/D129378
2021-10-25 18:23:12 +00:00
Yoshi Cheng-Hao Huang ba3ef137f3 Bug 1719542 - Part 2: Add an overloading of FillBufferWithICUCall takes nsTArray. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D128999
2021-10-25 18:23:11 +00:00
Yoshi Cheng-Hao Huang 2a45093834 Bug 1719542 - Part 1: Collator::GetSortKey calls FillBufferWithICUCall. r=platform-i18n-reviewers,anba,gregtatum
Make GetSortKey call FillBufferWithICUCall so we have the same behavior
when resizeing the buffer.

Differential Revision: https://phabricator.services.mozilla.com/D128998
2021-10-25 18:23:11 +00:00
André Bargull 71bb35d484 Bug 1737533 - Part 1: Update tzdata in ICU data files to 2021a2. r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D129370
2021-10-25 13:13:06 +00:00
ssummar 51c0ff21e5 Bug 1626517 - Replaced mozilla::Unused with mozilla::Ignore in mozilla::Decoder/mozilla::Encoder calls. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D129022
2021-10-25 12:31:41 +00:00
Francesco Lodolo (:flod) 557468ff99 Bug 1735338 - Fix obsolete references (people, repos) in l10n docs, r=eemeli
Differential Revision: https://phabricator.services.mozilla.com/D128209
2021-10-22 09:58:04 +00:00
André Bargull 1d976b3b13 Bug 1736834 - Part 9: Expose Locale::{variants_,extension_} as an iterable structure. r=platform-i18n-reviewers,dminor
Expose both members only as an iterable structure to hide implementation details
like the `UniqueChars` storage.

Differential Revision: https://phabricator.services.mozilla.com/D129045
2021-10-22 08:41:14 +00:00
André Bargull a701a254af Bug 1736834 - Part 8: Use direct member access for Locale::{variants_, extensions_}. r=platform-i18n-reviewers,dminor
Use direct member access in preparation for the next part.

Differential Revision: https://phabricator.services.mozilla.com/D129044
2021-10-22 08:41:14 +00:00
André Bargull dd199665f6 Bug 1736834 - Part 7: Use Maybe instead of nullptr to represent absent private-use subtags. r=platform-i18n-reviewers,dminor
Use `Maybe` and return `Span` instead of raw `const char*`.

Differential Revision: https://phabricator.services.mozilla.com/D129043
2021-10-22 08:41:13 +00:00
André Bargull 9e6104f1a2 Bug 1736834 - Part 6: Use Maybe instead of nullptr to represent absent Unicode extensions. r=platform-i18n-reviewers,dminor
Use `Maybe` and return `Span` instead of raw `const char*`.

Differential Revision: https://phabricator.services.mozilla.com/D129042
2021-10-22 08:41:13 +00:00
André Bargull d5261e082c Bug 1736834 - Part 5: Use the existing ICUResult typedef for Locale::toString(). r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D129041
2021-10-22 08:41:13 +00:00
André Bargull 09e2d151a7 Bug 1736834 - Part 4: Change Locale::setUnicodeExtension() to accept a Span. r=platform-i18n-reviewers,dminor
This avoids unnecessary null-termination for the callers.

Differential Revision: https://phabricator.services.mozilla.com/D129040
2021-10-22 08:41:12 +00:00
André Bargull 9a63cb041d Bug 1736834 - Part 3: Resultify Locale::setUnicodeExtension(). r=platform-i18n-reviewers,dminor
Return `ICUResult` from `Locale::setUnicodeExtension()` instead of using `bool`.

Differential Revision: https://phabricator.services.mozilla.com/D129039
2021-10-22 08:41:12 +00:00
André Bargull 2853848369 Bug 1736834 - Part 2: Resultify Locale::{add,remove}LikelySubtags(). r=platform-i18n-reviewers,dminor
Return `ICUResult` from `Locale::{add,remove}LikelySubtags()` instead of using `bool`.

Depends on D129037

Differential Revision: https://phabricator.services.mozilla.com/D129038
2021-10-22 08:41:11 +00:00
André Bargull 7b21811d28 Bug 1736834 - Part 1: Replace manual string comparisons with Span comparisons. r=platform-i18n-reviewers,dminor
The original code was created before bug 1583953 and at that point of time, the
`Span` operators where still costly to call due to release-assertions overhead.

With the release assertions removed, the `Span` operators are now just as efficient
as manually calling `std::char_traits`. (Both will compile down to plain `memcmp`
calls.) But compared to using `std::char_traits`, the `Span` operators are more
ergonomic to use and result in less written code.

Depends on D129036

Differential Revision: https://phabricator.services.mozilla.com/D129037
2021-10-22 08:41:11 +00:00
André Bargull d1f12a9bd7 Bug 1734838: Remove null termination in CallLikelySubtags. r=platform-i18n-reviewers,dminor
We no longer need to null-terminate the result of `CallLikelySubtags`, because
the computed string isn't passed back to ICU anymore. Also update `AssignFromLocaleId`
now that the string isn't null-terminated anymore.

Differential Revision: https://phabricator.services.mozilla.com/D129036
2021-10-22 08:41:11 +00:00
Yoshi Cheng-Hao Huang a3c54356eb Bug 1719678 - Part 2: Unify FormatDateTimeToParts and FormatDateTimeRangeToParts. r=platform-i18n-reviewers,anba,gregtatum,tcampbell
Add DateTimeFormat::TryFormatToParts and
DateIntervalFormat::TryFormattedToParts methods.

Differential Revision: https://phabricator.services.mozilla.com/D126342
2021-10-21 06:55:57 +00:00
Yoshi Cheng-Hao Huang 166ac0c418 Bug 1719678 - Part 1: Add a mozilla::intl::DateIntervalFormat. r=platform-i18n-reviewers,anba,gregtatum,tcampbell
Add a mozilla::intl::DateIntervalFormat class, with two methods:
- TryFormatCalendar
- TryFormatDateTime

and a mozilla::intl::AutoFormattedDateInterval class, which is a RAII
class calling udtitvfmt_openResult and udtitvfmt_closeResult for
DateIntervalFormat operations.

Differential Revision: https://phabricator.services.mozilla.com/D125642
2021-10-21 06:55:57 +00:00
Greg Tatum ee2694c97d Bug 1719546 - Replace nsBidi with mozilla::intl::Bidi; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D128793
2021-10-20 14:01:21 +00:00
Greg Tatum e732101746 Bug 1719546 - Create a unified bidi component; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D128792
2021-10-20 14:01:21 +00:00
Butkovits Atila 01c5e2aed8 Backed out 3 changesets (bug 1719546) for causing SM bustages at Bidi.h. CLOSED TREE
Backed out changeset c4d6ffc7e445 (bug 1719546)
Backed out changeset a1f7ed6c4251 (bug 1719546)
Backed out changeset e69fc596f2c3 (bug 1719546)
2021-10-19 21:09:47 +03:00
Greg Tatum f250d90114 Bug 1719546 - Replace nsBidi with mozilla::intl::Bidi; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D128793
2021-10-19 16:55:36 +00:00
Greg Tatum 4411a88775 Bug 1719546 - Create a unified bidi component; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D128792
2021-10-19 16:55:36 +00:00
Jonathan Kew 9f67437d11 Bug 1736393 - Don't use ScriptBreak for Tibetan, just treat Tsheg character like a hyphen instead. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D128756
2021-10-19 13:11:37 +00:00
Yoshi Cheng-Hao Huang ec665f1714 Bug 1719551 - Part 2: Unify Intl API in OSPreferences. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D128461
2021-10-19 07:34:01 +00:00