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

1399 Коммитов

Автор SHA1 Сообщение Дата
Mark Banner ff47c36f9b Bug 1803914 - Automatically replace Cu.reportError with console.error (misc). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D163772
2022-12-06 14:34:57 +00:00
André Bargull 86a29191ae Bug 1792775 - Part 11.1: Update expected test results in non-SpiderMonkey files. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D162707
2022-11-23 17:56:18 +00:00
André Bargull c79afec58b Bug 1792775 - Part 7: Update Gecko to Unicode 15. r=platform-i18n-reviewers,jfkthame
Update Gecko to Unicode 15 by running `genUnicodePropertyData.pl` and
`genSpecialCasingData.pl`.

Differential Revision: https://phabricator.services.mozilla.com/D160185
2022-11-23 17:56:16 +00:00
Noemi Erli 57fbfda9e8 Backed out 16 changesets (bug 1792775) for causing build bustage in TestDateIntervalFormat.cpp CLOSED TREE
Backed out changeset 240681aef215 (bug 1792775)
Backed out changeset e15aea6bb46b (bug 1792775)
Backed out changeset ee9cd4c8d5cd (bug 1792775)
Backed out changeset 0be61a39756f (bug 1792775)
Backed out changeset 7db4fb376f48 (bug 1792775)
Backed out changeset 7009b35a05a0 (bug 1792775)
Backed out changeset 5abc2704004e (bug 1792775)
Backed out changeset 6d76fe50cf35 (bug 1792775)
Backed out changeset d6300cbbf628 (bug 1792775)
Backed out changeset 8f5e0e60d195 (bug 1792775)
Backed out changeset 0b9cf0354dc0 (bug 1792775)
Backed out changeset 7136c85641b7 (bug 1792775)
Backed out changeset 486778427d64 (bug 1792775)
Backed out changeset 7acee89c2699 (bug 1792775)
Backed out changeset 654c5f659fed (bug 1792775)
Backed out changeset a60b1bc33f91 (bug 1792775)
2022-11-23 17:18:45 +02:00
André Bargull 8fb15ffe9d Bug 1792775 - Part 7: Update Gecko to Unicode 15. r=platform-i18n-reviewers,jfkthame
Update Gecko to Unicode 15 by running `genUnicodePropertyData.pl` and
`genSpecialCasingData.pl`.

Differential Revision: https://phabricator.services.mozilla.com/D160185
2022-11-23 10:42:43 +00:00
Noemi Erli d26dc9e9e0 Backed out 13 changesets (bug 1792775) for causing bustages
Backed out changeset f2c8e2200194 (bug 1792775)
Backed out changeset 3392ce042fb6 (bug 1792775)
Backed out changeset f5461baa7c5a (bug 1792775)
Backed out changeset d810c2b2d0bd (bug 1792775)
Backed out changeset af6164024ade (bug 1792775)
Backed out changeset 8c97026ef2b5 (bug 1792775)
Backed out changeset d396bec29ac2 (bug 1792775)
Backed out changeset a9aaa2387313 (bug 1792775)
Backed out changeset a4461db138b7 (bug 1792775)
Backed out changeset a7b39a5105a9 (bug 1792775)
Backed out changeset 5e746d85926a (bug 1792775)
Backed out changeset 3ea531c10813 (bug 1792775)
Backed out changeset 78811cdadd63 (bug 1792775)
2022-11-23 11:48:28 +02:00
André Bargull 52649f0d2a Bug 1792775 - Part 7: Update Gecko to Unicode 15. r=platform-i18n-reviewers,jfkthame
Update Gecko to Unicode 15 by running `genUnicodePropertyData.pl` and
`genSpecialCasingData.pl`.

Differential Revision: https://phabricator.services.mozilla.com/D160185
2022-11-23 08:43:20 +00:00
Sylvestre Ledru 97f4c646c8 Bug 1801196 - remove unused crates r=xpcom-reviewers,nika,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D162334
2022-11-18 16:31:05 +00:00
Mark Banner 9613c19f16 Bug 1795880 - Add an ESLint rule to enforce using static imports where possible. r=arai,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D160131
2022-10-26 09:37:46 +00:00
Mark Banner a9ba6e830d Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 21:47:50 +00:00
Marian-Vasile Laza 130adc5d9a Backed out changeset 0679274d6ed5 (bug 1792398) for causing bc failures on browser_sendQuery.js. CLOSED TREE 2022-09-26 22:53:00 +03:00
Mark Banner 3e99025d45 Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 18:51:57 +00:00
Narcis Beleuzu 6c2d0d8cea Backed out changeset 849faf753208 (bug 1792398) for bc failures on browser_sendQuery.js . CLOSED TREE 2022-09-26 20:44:40 +03:00
Mark Banner 05dcda5a7f Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 16:51:10 +00:00
Nika Layzell 0316dc51b9 Bug 1790614 - Part 2: Use {ASSERT,ENSURE}_NS_{SUCCEEEDED,FAILED} in gtests, r=ahal,necko-reviewers
These macros will produce better outputs when they fail than these existing
patterns using `ENSURE_TRUE(NS_SUCCEEDED(...))` or similar, so this is a bulk
rewrite of existing tests to use them.

It should also help with discoverability when people base their tests off of
other existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D157214
2022-09-15 14:51:50 +00:00
Mike Kaply 0ce6d5df0f Bug 1297520 - For Snap, only install language for system locale. r=nalexander,OlivierTilloy
Differential Revision: https://phabricator.services.mozilla.com/D151052
2022-09-12 18:41:56 +00:00
Ed Lee 96460bcff8 Bug 1784901 - Show Language Mismatch Screen with negotiated language on left secondary section and switch button r=pdahiya
As part of installing the lang pack, add the negotiated language as string args and convert to raw if it wants to use the lang pack.

Differential Revision: https://phabricator.services.mozilla.com/D155021
2022-08-19 22:07:10 +00:00
Mark Banner 53b35796e0 Bug 1784699 - Add more ESLint worker annotations to test files. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D154601
2022-08-15 16:50:31 +00:00
André Bargull 8c3a6dad95 Bug 1784375: Call LocaleParser::TryParse() with a new, empty Locale. r=platform-i18n-reviewers,dminor
For this to work, we need to add a move-constructor to `Locale`, so that it's
possible to write `loc = {}`. (We need move instead of copy semantics, because
`Locale` has UniquePtr members.) All other `Locale` members except for
`LanguageTagSubtag` already support move semantics. Add copy-constructors to
`LanguageTagSubtag`, so defaulted move-constructor/assignment works for `Locale`.
`LanguageTagSubtag` gets copy- instead of move-constructors, because there isn't
a good reason to disallow copying when moving is allowed.

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

Differential Revision: https://phabricator.services.mozilla.com/D154496
2022-08-15 15:37:20 +00:00
Nika Layzell c15823d075 Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-07-30 00:12:48 +00:00
Nika Layzell 997047e2a4 Bug 1772006 - Part 4: Simplify and move the string comparison APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,dragana,barret
This patch moves EqualsIgnoreCase to ns[T]StringObsolete, and removes
the aCount argument, instead migrating callers to use `StringBeginsWith`
with a case-insensitive comparator.

In addition, nsTStringRepr::Compare was removed and replaced with either
calls to methods like `StringBeginsWith` or the global `Compare` method.

These changes required some modifications at call-sites but should make
the behaviour less surprising and more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D148299
2022-07-30 00:12:48 +00:00
Dan Minor 043ae52e12 Bug 1779621 - Migrate intl/locale from jsm to esm; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D151865
2022-07-26 12:28:41 +00:00
Tooru Fujisawa 54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel 7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa 8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Tooru Fujisawa f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Narcis Beleuzu 2838b177f3 Backed out changeset 94420b6eff4c (bug 1297520) for xpcshell failures on test_snap.js 2022-07-06 19:16:34 +03:00
Mike Kaply 288d325a1c Bug 1297520 - For Snap, only install language for system locale. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D151052
2022-07-06 13:34:18 +00:00
criss c6b2c5db61 Backed out 9 changesets (bug 1772006) causing build bustages on nsTString.cpp. CLOSED TREE
Backed out changeset f17c7565707b (bug 1772006)
Backed out changeset c725fe1f5882 (bug 1772006)
Backed out changeset d19663161261 (bug 1772006)
Backed out changeset b6611ab002d9 (bug 1772006)
Backed out changeset 790f42b64af9 (bug 1772006)
Backed out changeset 79a734b4e4d9 (bug 1772006)
Backed out changeset 42730aae16ea (bug 1772006)
Backed out changeset b2542aef3054 (bug 1772006)
Backed out changeset 962bfea4a309 (bug 1772006)
2022-06-11 01:13:42 +03:00
Nika Layzell b3c13bf114 Bug 1772006 - Part 6: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-06-10 21:12:08 +00:00
Tooru Fujisawa 0acf5d541a Bug 1772313 - Part 10: Stop calling XPCOMUtils.defineLazyModuleGetters for Services in intl/. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D148163
2022-06-06 04:42:08 +00:00
Molnar Sandor 77402a5caa Backed out 15 changesets (bug 1772313, bug 1772351, bug 1772360) for causing xpc failures in telemetry/tests/unit/test_SocketScalars.js CLOSED TREE
Backed out changeset c8b0a2ed239e (bug 1772360)
Backed out changeset 1922adad6abe (bug 1772351)
Backed out changeset 6d3634cce489 (bug 1772351)
Backed out changeset f03968a9d053 (bug 1772351)
Backed out changeset e7a38ef90fe4 (bug 1772351)
Backed out changeset b389e7654771 (bug 1772313)
Backed out changeset 59a33598ff51 (bug 1772313)
Backed out changeset ab60885a8a93 (bug 1772313)
Backed out changeset aad8efac9d05 (bug 1772313)
Backed out changeset 4378e519a8e7 (bug 1772313)
Backed out changeset 302ac54741f8 (bug 1772313)
Backed out changeset 74c59f9fd51c (bug 1772313)
Backed out changeset 575fb877c56c (bug 1772313)
Backed out changeset 2eaa68f10b19 (bug 1772313)
Backed out changeset 4a8b3ba193dc (bug 1772313)
2022-06-06 07:04:25 +03:00
Tooru Fujisawa d332568199 Bug 1772313 - Part 10: Stop calling XPCOMUtils.defineLazyModuleGetters for Services in intl/. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D148163
2022-06-06 02:49:12 +00:00
Tooru Fujisawa b844fd7815 Bug 1772102 - Use plain object for lazy getter in intl/locale/. r=platform-i18n-reviewers,dminor
Depends on D147889

Differential Revision: https://phabricator.services.mozilla.com/D147890
2022-06-01 16:56:14 +00:00
Greg Tatum d621733e7f Bug 1767537 - Dispatch intl:app-locales-changed for pseudo-locale changes; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D145371
2022-05-05 16:25:31 +00:00
Greg Tatum f30d9ead28 Bug 1764920 - Install the langpack even if it is the fallback; r=platform-i18n-reviewers,preferences-reviewers,mstriemer,dminor
The fallback locale is not guaranteed to have all of the strings for
non-fluent files, even if it is one of the available locales. This patch
shares the logic with about:preferences for getting the available
locales.

Differential Revision: https://phabricator.services.mozilla.com/D143910
2022-04-28 15:00:57 +00:00
Noemi Erli b72aebe50e Backed out changeset 015c2c72a2a2 (bug 1761835) for causing failures in browser_stringBundleInvalidation.js CLOSED TREE 2022-04-21 04:32:28 +03:00
Greg Tatum 85d131c3dc Bug 1761835 - Add a test for switching locales and string bundles; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D144032
2022-04-20 18:02:02 +00:00
Greg Tatum 852ecad7f2 Bug 1762659 - Use MozIntl for stand-alone display names in LangPackMatcher.jsm; r=Mardak,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D142730
2022-04-01 21:39:17 +00:00
Greg Tatum 3a2de7b49d Bug 1755961 - Delete the format cache in AppDateTimeFormat; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D142470
2022-03-30 21:10:46 +00:00
Greg Tatum 4ab6ee38f3 Bug 1759577 - Create logic to check if live reloading is supported; r=platform-i18n-reviewers,dminor
Depends on D141003

Differential Revision: https://phabricator.services.mozilla.com/D141004
2022-03-22 15:26:09 +00:00
Greg Tatum 0737dd81d2 Bug 1755181 - Invalidate locale cache in AppDateTimeFormat; r=platform-i18n-reviewers,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D140666
2022-03-22 15:19:47 +00:00
Emilio Cobos Álvarez 1353b25e32 Bug 1758997 - Remove RoInitialize/RoUninitialize from OSPreferences_win. r=Jamie
As per bug 1757647 comment 4, the main thread already initializes COM
early, and we should be able to rely on it in OSPreferences.

Differential Revision: https://phabricator.services.mozilla.com/D140745
2022-03-11 10:02:32 +00:00
Greg Tatum 669f31b897 Bug 1755519 - Add JSM for langpack matching logic; r=platform-i18n-reviewers,nordzilla
The TestUtils file is broken out as it will be shared with the
about:welcome browser chrome tests.

Differential Revision: https://phabricator.services.mozilla.com/D138830
2022-03-02 15:52:43 +00:00
Iulian Moraru 51fd8df2e2 Backed out 2 changesets (bug 1755519) for causing node test failures (About:welcome bundle out of date). CLOSED TREE
Backed out changeset 67e6561012ad (bug 1755519)
Backed out changeset 873d83eaa24e (bug 1755519)
2022-03-02 17:08:47 +02:00
Greg Tatum 2aa7af8502 Bug 1755519 - Add JSM for langpack matching logic; r=platform-i18n-reviewers,nordzilla
The TestUtils file is broken out as it will be shared with the
about:welcome browser chrome tests.

Differential Revision: https://phabricator.services.mozilla.com/D138830
2022-03-02 13:54:16 +00:00
Jonathan Kew 9f7ae29b2c Bug 1757578 - For resolving font prefs, accept lang attribute with underscore in place of hyphen separators. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D139951
2022-03-02 13:15:27 +00:00
Francesco Lodolo (:flod) b7b8c80192 Bug 1059603: Add pt-PT to available Accept-Languages locale, r=eemeli
Differential Revision: https://phabricator.services.mozilla.com/D138027
2022-02-07 16:45:07 +00:00
Greg Tatum 3839eb0a11 Bug 1715892 - Add thread safety notice and asserts for AppDateTimeFormat; r=platform-i18n-reviewers,dminor
Differential Revision: https://phabricator.services.mozilla.com/D131672
2021-12-01 17:41:38 +00:00