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
Yoshi Cheng-Hao Huang
e08bac2c1d
Bug 1719551 - Part 1: Add DateTimePatternGenerator::GetPlaceholderPattern. r=platform-i18n-reviewers,anba,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D128460
2021-10-19 07:34:00 +00:00
Dan Minor
a9e674d68d
Bug 1719746 - Rename Locale to MozLocale; r=platform-i18n-reviewers,zbraniecki
...
There is also a mozilla::intl::Locale in intl/locale/MozLocale.h. This naming
collision was causing crashes in debug builds where the wrong destructor ended
up being called. This patch renames the intl/locale/MozLocale.h class to
MozLocale.
I've filed Bug 1736017 to move callers of the MozLocale version to the
unified intl/components/Locale version.
Differential Revision: https://phabricator.services.mozilla.com/D128593
2021-10-18 13:38:24 +00:00
Dan Minor
1c51720ed4
Bug 1719746 - Update make_intl_data.py to generate LocaleGenerated.cpp; r=anba,gregtatum
...
This updates the script to generate intl/components/LocaleGenerated.cpp. I've
also tried to make it better match clang-format's style in places where that
wasn't too challenging.
Differential Revision: https://phabricator.services.mozilla.com/D126989
2021-10-18 13:38:23 +00:00
Dan Minor
2aec3f881c
Bug 1719746 - Add gtest for Locale; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D126985
2021-10-18 13:38:21 +00:00
Dan Minor
19bec7878b
Bug 1719746 - Rework SpiderMonkey specific code in unified Locale; r=platform-i18n-reviewers,gregtatum,anba
...
Differential Revision: https://phabricator.services.mozilla.com/D126984
2021-10-18 13:38:21 +00:00
Dan Minor
6de738dee6
Bug 1719746 - Add Locale to moz.build; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D126983
2021-10-18 13:38:20 +00:00
Dan Minor
9c7bff2c25
Bug 1719746 - Copy LanguageTag to intl/components as Locale; r=platform-i18n-reviewers,gregtatum
...
This moves the LanguageTag implementation from js/src/builtin/intl to
intl/components and renames them to Locale. The next commit will add
them to the build system.
Differential Revision: https://phabricator.services.mozilla.com/D126982
2021-10-18 13:38:20 +00:00
André Bargull
af633f0f36
Bug 1733352 - Part 2: Move IcuLocale calls from SpiderMonkey to mozilla::intl. r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D127097
2021-10-16 12:43:21 +00:00
André Bargull
a500a53471
Bug 1733352 - Part 1: Fix IcuLocale to test exactly for the string "und". r=platform-i18n-reviewers,gregtatum
...
Inputs like `IcuLocale("undef")` were also incorrectly changed to `""`.
Differential Revision: https://phabricator.services.mozilla.com/D127096
2021-10-16 12:43:21 +00:00
André Bargull
c473b3dcaf
Bug 1733353 - Part 2: Remove additional ToICUError declaration. r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D127095
2021-10-16 12:43:20 +00:00
André Bargull
441a8fd850
Bug 1733353 - Part 1: Remove unused includes and using statements. r=platform-i18n-reviewers,gregtatum
...
Remove includes and `using` statements no longer used after the unified Intl
work.
Differential Revision: https://phabricator.services.mozilla.com/D127094
2021-10-16 12:43:20 +00:00
André Bargull
a41fa71881
Bug 1733350: Return a Span from mozilla::intl::Calendar::GetBcp47Type(). r=platform-i18n-reviewers,gregtatum
...
Return a Span instead of `const char*` for consistency with the rest of the
unified Intl API.
Differential Revision: https://phabricator.services.mozilla.com/D127092
2021-10-16 12:43:19 +00:00
André Bargull
6297258cd3
Bug 1733349: Assert Spans are null-terminated when passed as `const char*` to ICU. r=platform-i18n-reviewers,gregtatum
...
Some functions are accepting `Span<const char>` and expect that the underlying
`const char*` is null-terminated. Add an assertion that the string is really
null-terminated before passing it to ICU.
And then fix-up any issues where the string span is including the null
terminator. Also see bug 1660161.
Differential Revision: https://phabricator.services.mozilla.com/D127091
2021-10-16 12:43:19 +00:00
Ting-Yu Lin
717c05c00c
Bug 1733009 - Remove LineBreaker::Prev(). r=jfkthame,m_kato
...
Differential Revision: https://phabricator.services.mozilla.com/D128559
2021-10-15 18:10:09 +00:00
Yoshi Cheng-Hao Huang
63e26820be
Bug 1735341 : Rename FillVectorWithICUCall to FillBufferWithICUCall. r=platform-i18n-reviewers,anba,dminor
...
So with this patch FillVectorWithICUCall could become an overload of FillBufferWithICUCall,
with the buffer type is mozilla::Vector.
The callers of mozilla::intl could provide a mozilla::Vector as the
buffer, instead of creating some buffer adapter like nsTArrayU8Buffer,
TestBuffer, or FormatBuffer.
Differential Revision: https://phabricator.services.mozilla.com/D128240
2021-10-15 12:29:03 +00:00
Butkovits Atila
7495be3566
Backed out 9 changesets (bug 1719746, bug 1735341) as requested by dev. CLOSED TREE
...
Backed out changeset f1b3e7dec7e2 (bug 1735341)
Backed out changeset e7675e3524da (bug 1719746)
Backed out changeset 05109157a4b5 (bug 1719746)
Backed out changeset b98f10477f44 (bug 1719746)
Backed out changeset dce9c0d6c79c (bug 1719746)
Backed out changeset 472767f43cad (bug 1719746)
Backed out changeset 4fa55bded471 (bug 1719746)
Backed out changeset 391c305dce1f (bug 1719746)
Backed out changeset 5f20632de2be (bug 1719746)
2021-10-15 02:02:25 +03:00
Yoshi Cheng-Hao Huang
e50fc2c267
Bug 1735341 : Rename FillVectorWithICUCall to FillBufferWithICUCall. r=platform-i18n-reviewers,anba,dminor
...
So with this patch FillVectorWithICUCall could become an overload of FillBufferWithICUCall,
with the buffer type is mozilla::Vector.
The callers of mozilla::intl could provide a mozilla::Vector as the
buffer, instead of creating some buffer adapter like nsTArrayU8Buffer,
TestBuffer, or FormatBuffer.
Differential Revision: https://phabricator.services.mozilla.com/D128240
2021-10-14 06:54:26 +00:00
criss
cccc71399f
Backed out changeset 517b566a350a (bug 1735341) for causing build bustages on Locale.cpp. CLOSED TREE
2021-10-13 23:48:18 +03:00
Yoshi Cheng-Hao Huang
1abdd0a388
Bug 1735341 : Rename FillVectorWithICUCall to FillBufferWithICUCall. r=platform-i18n-reviewers,anba,dminor
...
So with this patch FillVectorWithICUCall could become an overload of FillBufferWithICUCall,
with the buffer type is mozilla::Vector.
The callers of mozilla::intl could provide a mozilla::Vector as the
buffer, instead of creating some buffer adapter like nsTArrayU8Buffer,
TestBuffer, or FormatBuffer.
Differential Revision: https://phabricator.services.mozilla.com/D128240
2021-10-13 20:34:39 +00:00
Dan Minor
49de63ce42
Bug 1719746 - Update make_intl_data.py to generate LocaleGenerated.cpp; r=anba,gregtatum
...
This updates the script to generate intl/components/LocaleGenerated.cpp. I've
also tried to make it better match clang-format's style in places where that
wasn't too challenging.
Differential Revision: https://phabricator.services.mozilla.com/D126989
2021-10-13 12:07:03 +00:00
Dan Minor
fb0eb1a018
Bug 1719746 - Add gtest for Locale; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D126985
2021-10-13 12:07:02 +00:00
Dan Minor
e2c6f7fdff
Bug 1719746 - Rework SpiderMonkey specific code in unified Locale; r=platform-i18n-reviewers,gregtatum,anba
...
Differential Revision: https://phabricator.services.mozilla.com/D126984
2021-10-13 12:07:01 +00:00
Dan Minor
bef53f7ede
Bug 1719746 - Add Locale to moz.build; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D126983
2021-10-13 12:07:01 +00:00
Dan Minor
3289f9681a
Bug 1719746 - Copy LanguageTag to intl/components as Locale; r=platform-i18n-reviewers,gregtatum
...
This moves the LanguageTag implementation from js/src/builtin/intl to
intl/components and renames them to Locale. The next commit will add
them to the build system.
Differential Revision: https://phabricator.services.mozilla.com/D126982
2021-10-13 12:07:00 +00:00
André Bargull
2c8cb57da2
Bug 1735352 - Part 3: Add wrapper for ICU4C specific library functions. r=platform-i18n-reviewers,gregtatum
...
Adds abstractions for `u_init()`, `u_cleanup()`, and `u_setMemoryFunctions()`,
and additionally a method to retrieve `U_ICU_VERSION`.
Because these methods are unlikely to replaceable with ICU4X, the class was
named "ICU4CLibrary" to make clear that the functionality is specific to ICU4C.
Differential Revision: https://phabricator.services.mozilla.com/D128228
2021-10-12 17:09:04 +00:00
André Bargull
e5bef00d2b
Bug 1735352 - Part 2: Add String::GetUnicodeVersion(). r=platform-i18n-reviewers,gregtatum
...
Adds a method to retrieve `U_UNICODE_VERSION` to `mozilla::intl::String`.
Depends on D128226
Differential Revision: https://phabricator.services.mozilla.com/D128227
2021-10-12 17:09:04 +00:00
André Bargull
d65723b692
Bug 1735352 - Part 1: Add TimeZone::GetTZDataVersion(). r=platform-i18n-reviewers,gregtatum
...
Adds a method for `ucal_getTZDataVersion()` to `mozilla::intl::TimeZone`.
Differential Revision: https://phabricator.services.mozilla.com/D128226
2021-10-12 17:09:03 +00:00
Jonathan Kew
74b10b85a0
Bug 1734590 - Remove the LineBreaker::DeprecatedNext method. r=TYLin
...
Differential Revision: https://phabricator.services.mozilla.com/D127807
2021-10-11 12:20:42 +00:00
Greg Tatum
45bc20f472
Bug 1734679 - Fix regression for XSLT sorting with an invalid language tag; r=platform-i18n-reviewers,dminor
...
This includes an integration test as well as a unit test, so hopefully
this will not regress again in the future.
Differential Revision: https://phabricator.services.mozilla.com/D127983
2021-10-08 19:10:48 +00:00
Jonathan Kew
a2361076d9
Bug 1310559 - Modernize (and simplify) GetUnicharWidth implementation. r=m_kato
...
Differential Revision: https://phabricator.services.mozilla.com/D127814
2021-10-08 13:14:45 +00:00
Csoregi Natalia
e92f158606
Backed out 4 changesets (bug 1734590) for failures on test_xmlserializer.js. CLOSED TREE
...
Backed out changeset e492f8fd3d53 (bug 1734590)
Backed out changeset 0af985bb7569 (bug 1734590)
Backed out changeset 3751b93ae994 (bug 1734590)
Backed out changeset 45059121c015 (bug 1734590)
2021-10-08 14:41:06 +03:00
Jonathan Kew
6494d53d3f
Bug 1734590 - Remove the LineBreaker::DeprecatedNext method. r=TYLin
...
Differential Revision: https://phabricator.services.mozilla.com/D127807
2021-10-08 10:05:52 +00:00
Ting-Yu Lin
e558c2cbd9
Bug 1733872 Part 2 - Add a new LineBreaker::Next(), and deprecate the old Next(). r=m_kato
...
This patch is similar to Bug 1728708 Part 4, but for line breaker. This
should make the future integration of ICU4X line segmenter easier. A
UAX14 compatible line breaker always breaks at the end of text
(rule LB3 [1]), and ICU4X line segmenter has this behavior, too.
Current LineBreaker::Next() doesn't treat the end of text as a line
break opportunity, so this patch deprecates it by renaming it, and add a
new Next() method.
TestASCIILB() has adopted the new Next(). All the other callers of the
DeprecatedNext (nsPlainTextSerializer, nsXMLContentSerializer,
InternetCiter) should be audited later, possibly with the removal of
Prev() because the all the usages are very close to Prev().
[1] https://www.unicode.org/reports/tr14/#LB3
Differential Revision: https://phabricator.services.mozilla.com/D127379
2021-10-07 07:39:13 +00:00
Ting-Yu Lin
da1f64cd71
Bug 1733872 Part 1 - Modernize TestASCIILB and TestASCIIWB. r=m_kato
...
After Bug 1728708 Part 4 [1], WordBreaker always breaks at the end of
text. Therefore, we don't need to manually record the end of text as a
word break opportunity when we see NS_WORDBREAKER_NEED_MORE_TEXT.
Also, modernize the interface of each functions by using mozilla::Span
to remove the needs to pass array length as parameters.
[1] https://hg.mozilla.org/mozilla-central/rev/55efff2d5628
Differential Revision: https://phabricator.services.mozilla.com/D127378
2021-10-07 07:39:13 +00:00
Yoshi Cheng-Hao Huang
a19f20891a
Bug 1734108 - Fix typo in LocaleCanonicalizer. r=platform-i18n-reviewers,dminor
...
Differential Revision: https://phabricator.services.mozilla.com/D127530
2021-10-05 12:42:15 +00:00
Yoshi Cheng-Hao Huang
7d3aeae349
Bug 1734106 - include FloatPoint.h in NumberFormatFields. r=platform-i18n-reviewers,dminor
...
Differential Revision: https://phabricator.services.mozilla.com/D127529
2021-10-05 12:42:15 +00:00
André Bargull
f785b509a3
Bug 1733053 - Part 1: Update tzdata in ICU data files to 2021a1. r=platform-i18n-reviewers,dminor
...
Differential Revision: https://phabricator.services.mozilla.com/D126882
2021-09-30 08:32:45 +00:00
André Bargull
b6b8f02a94
Bug 1719748 - Part 8: Add mozilla::intl::Locale::GetDefaultLocale(). r=platform-i18n-reviewers,gregtatum
...
Add `GetDefaultLocale()` to replace the two calls to `uloc_getDefault()`.
Differential Revision: https://phabricator.services.mozilla.com/D126494
2021-09-24 10:22:47 +00:00
André Bargull
1994abfe54
Bug 1719748 - Part 6: Add an enumeration over the list of available locales. r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D126492
2021-09-24 10:22:46 +00:00
André Bargull
032bae8d79
Bug 1719748 - Part 4: Add TimeZone::GetAvailableTimeZones(). r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D126490
2021-09-24 10:22:45 +00:00
André Bargull
362e7b8fd6
Bug 1719748 - Part 2: Add Collator::GetFirstCase(). r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D126488
2021-09-24 10:22:44 +00:00
André Bargull
db871aaa56
Bug 1719748 - Part 1: Add an enumeration over the list of available locales. r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D126487
2021-09-24 10:22:44 +00:00
André Bargull
975b298483
Bug 1731620 - Part 8: Add TimeZone::GetHostTimeZone(). r=platform-i18n-reviewers,gregtatum
...
Add a wrapper for `ucal_getHostTimeZone` to `mozilla::intl::TimeZone`. This
function is only used for the "testing" function framework.
Differential Revision: https://phabricator.services.mozilla.com/D126198
2021-09-23 10:51:59 +00:00
André Bargull
f0ef6836c5
Bug 1731620 - Part 6: Add default time zone setters to mozila::intl::TimeZone. r=platform-i18n-reviewers,gregtatum
...
Add setters to change ICU's default time zone.
1. `SetDefaultTimeZone()` sets the default time zone from a time zone identifier.
2. `SetDefaultTimeZoneFromHostTimeZone()` synchronizes the default time zone with
the host system's time zone.
The two new methods will be used in the next part to replace ICU calls in
`js::DateTimeInfo::internalResyncICUDefaultTimeZone()`.
Differential Revision: https://phabricator.services.mozilla.com/D126196
2021-09-23 10:51:58 +00:00
André Bargull
7c924a2057
Bug 1731620 - Part 2: Use ICU C++ TimeZone API if available. r=platform-i18n-reviewers,gregtatum
...
ICU doesn't provide a C-API for time zone functions, but instead requires to
use `UCalendar`. This adds a noticeable overhead, because whenever time zone
offsets are computed, it's first necessary to set the time on a `UCalendar`,
which triggers a recomputation of all calendar fields. And because time zone
offset computation is used for JavaScript's `Date`, which is widely used, we
should avoid performance regressions compared to the current code which is
using the ICU C++ API.
We can only safely use the ICU C++ API when we don't use the system ICU,
because C++ doesn't have a stable ABI, so the ICU C++ API code paths are only
taken when `MOZ_SYSTEM_ICU` is `false`.
Differential Revision: https://phabricator.services.mozilla.com/D126192
2021-09-23 10:51:56 +00:00
André Bargull
216714975c
Bug 1731620 - Part 1: Add more time zone functions to mozilla::intl::TimeZone. r=platform-i18n-reviewers,gregtatum
...
Add four additional methods to `mozilla::intl::TimeZone`:
1. `GetDSTOffsetMs()` to return the daylight saving offset at a specific UTC time.
2. `GetOffsetMs()` to return the time zone offset at a specific UTC time.
3. `GetUTCOffsetMs()` to return the UTC offset at a specific local time.
4. `GetDisplayName()` to return the display name of a time zone.
All four methods will be used to replace ICU calls in "js/src/vm/DateTime.cpp".
Differential Revision: https://phabricator.services.mozilla.com/D126191
2021-09-23 10:51:56 +00:00
André Bargull
a3e91cb71a
Bug 1728180 - Part 2: Call mozilla::intl::Calendar methods in intl_GetCalendarInfo. r=platform-i18n-reviewers,dminor
...
Use `mozilla::intl::Calendar` instead of directly calling ICU in
`intl_GetCalendarInfo`. This implies that the days of the week are now ordered
the same way as in the "Intl Locale Info API" and the "Temporal" proposal, i.e.
starting from Monday=1 to Sunday=7.
Differential Revision: https://phabricator.services.mozilla.com/D126228
2021-09-23 07:43:51 +00:00
André Bargull
aae4fba66e
Bug 1728180 - Part 1: Change "Intl.getCalendarInfo" to return an array of weekend days. r=platform-i18n-reviewers,dminor
...
Returning an array matches the current "Intl Locale Info API" proposal and
actually also simplifies the single user of this function.
Differential Revision: https://phabricator.services.mozilla.com/D126227
2021-09-23 07:43:51 +00:00
Jonathan Kew
08373ecf28
Bug 1719544 - part 1 - Add low-level normalization-data accessors ComposePairNFC and DecomposeRawNFD to mozilla::intl::String. r=platform-i18n-reviewers,dminor
...
Differential Revision: https://phabricator.services.mozilla.com/D126259
2021-09-22 21:27:53 +00:00
criss
6685fa570d
Backed out 2 changesets (bug 1719544) for causing bustages on gtest.h:1445:11. CLOSED TREE
...
Backed out changeset 4ab330369412 (bug 1719544)
Backed out changeset b5d8d32d8326 (bug 1719544)
2021-09-22 23:33:48 +03:00
Jonathan Kew
2cfc8b9513
Bug 1719544 - part 1 - Add low-level normalization-data accessors ComposePairNFC and DecomposeRawNFD to mozilla::intl::String. r=platform-i18n-reviewers,dminor
...
Differential Revision: https://phabricator.services.mozilla.com/D126259
2021-09-22 18:48:53 +00:00
Dan Minor
f62d42b1d9
Bug 1642415 - Add metasource to L10nFileSourceDescriptor; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D125242
2021-09-22 18:16:08 +00:00
Dan Minor
451b4ef52f
Bug 1642415 - Add unit tests for metasources; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D125241
2021-09-22 18:16:08 +00:00
Dan Minor
2228681a5b
Bug 1642415 - Update existing tests to pass metasource into createMock; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D125240
2021-09-22 18:16:07 +00:00
Dan Minor
7e6caf3eeb
Bug 1642415 - Use metasource in FileSource; r=platform-i18n-reviewers,extension-reviewers,gregtatum,zombie
...
Differential Revision: https://phabricator.services.mozilla.com/D125239
2021-09-22 18:16:07 +00:00
Dan Minor
c5d2261220
Bug 1642415 - Remove unused L10nFileSource::Create method; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D125238
2021-09-22 18:16:06 +00:00
Dan Minor
6e6201d36c
Bug 1642415 - Use metasource in l10nregistry-ffi; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D125237
2021-09-22 18:16:06 +00:00
Dan Minor
89a5ba9d69
Bug 1642415 - Update to l10nregistry to 0.3.0; r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D125235
2021-09-22 18:16:05 +00:00
André Bargull
c495c4e12f
Bug 1731080 - Part 5: Add string normalization methods to intl::String. r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D125842
2021-09-21 15:42:18 +00:00
André Bargull
b0ea03793a
Bug 1731080 - Part 3: Add methods to test if a code point has the properties "Cased" or "Case_Ignorable". r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D125840
2021-09-21 15:42:17 +00:00
André Bargull
c6c4656477
Bug 1731080 - Part 1: Add a String class to the unified Intl API. r=platform-i18n-reviewers,gregtatum
...
The default constructor was deleted because all methods are static.
Differential Revision: https://phabricator.services.mozilla.com/D125838
2021-09-21 15:42:16 +00:00
André Bargull
27cd54a779
Bug 1693576 - Part 8: Add a method to retrieve week day information to Calendar. r=platform-i18n-reviewers,gregtatum
...
The last addition for the "Intl Locale Info API" proposal.
Differential Revision: https://phabricator.services.mozilla.com/D125578
2021-09-21 08:51:22 +00:00
André Bargull
ea30633946
Bug 1693576 - Part 7: Add method to enumerate over all time zones used in a region. r=platform-i18n-reviewers,gregtatum
...
The filter type is `UCAL_ZONE_TYPE_ANY` to ensure all possible time zones are
returned, and not just CLDR canonical time zones. (CLDR canonical time zones
are different from IANA canonical time zones.)
Differential Revision: https://phabricator.services.mozilla.com/D125576
2021-09-21 08:51:22 +00:00
André Bargull
17e8b2c855
Bug 1693576 - Part 6: Rename GetDefaultTimeZoneOffsetMs() to GetRawOffsetMs(). r=platform-i18n-reviewers,gregtatum
...
- `TimeZone` objects can be created with any time zone identifier, so the "Default"
part in the name isn't correct.
- The "TimeZone" part is no longer needed, now that there's a distinct class for
`TimeZone` objects.
Therefore let's rename `GetDefaultTimeZoneOffsetMs()` to `GetRawOffsetMs()`.
Differential Revision: https://phabricator.services.mozilla.com/D125575
2021-09-21 08:51:21 +00:00
André Bargull
5638c044f2
Bug 1693576 - Part 5: Move time zone functions from mozilla::Calendar into mozilla::TimeZone. r=platform-i18n-reviewers,gregtatum
...
Time zone functions being part of `UCalendar` is an internal implementation
detail of ICU4C. For the public unified Intl API we should rather follow
Temporal (or ICU4C's C++ API) and have a separate `TimeZone` class.
The files were moved using `hg cp` to preserve the file history.
Differential Revision: https://phabricator.services.mozilla.com/D125574
2021-09-21 08:51:21 +00:00
André Bargull
67b7d804e6
Bug 1693576 - Part 3: Add NumberingSystem class to the unified Intl API component. r=platform-i18n-reviewers,gregtatum
...
Differential Revision: https://phabricator.services.mozilla.com/D125572
2021-09-21 08:51:20 +00:00
André Bargull
1919267c6d
Bug 1693576 - Part 2: Add DateTimeFormat::GetAllowedHourCycles(). r=platform-i18n-reviewers,gregtatum
...
ICU's public API only provides a function to return the preferred hour cycle
(`udatpg_getDefaultHourCycle()`), whereas for `Intl.Locale` we want to be able
to determine all allowed hour cycles. So we have to do it the hard way and
directly read ICU resource bundles to get the data we need for this feature.
Differential Revision: https://phabricator.services.mozilla.com/D125571
2021-09-21 08:51:20 +00:00