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

1310 Коммитов

Автор SHA1 Сообщение Дата
Dan Minor 05acd763f8 Bug 1676137 - Remove intl.uidirection pref; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D108789
2021-03-29 14:22:52 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke 8ecfb38a41 Bug 1691913 - Remove uses of nsDataHashtable::GetValue. r=xpcom-reviewers,necko-reviewers,dragana,nika
GetValue is going to be removed in a subsequent patch. It is no longer needed,
because it can be replaced by functions already provided by nsBaseHashtable,
in particular Lookup and Contains.

Also, its name was confusing, since it specifically returns a pointer that
allows and is intended for modifying the entry within the hashtable, rather
than returning by-value. According to the naming rules to be set on
nsBaseHashtable, it would also needed to be renamed to "Lookup*. Removing
its uses saves this effort.

Differential Revision: https://phabricator.services.mozilla.com/D105476
2021-03-01 09:59:30 +00:00
Jens Stutte 1e19379853 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-27 14:38:14 +00:00
Butkovits Atila bb3fe218a4 Backed out changeset be43a81b35f9 (bug 1689953) for causing failure at test_terminator_record.js. CLOSED TREE 2021-02-27 05:03:11 +02:00
Jens Stutte f6d52040b9 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-26 21:33:29 +00:00
Simon Giesecke 43bacaa3f9 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in intl/locale. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D106117
2021-02-26 11:36:39 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Francesco Lodolo (:flod) fbba0e121c Bug 1692135 - Add Silesian (szl) to allowed accept-languages locales, r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D104792
2021-02-11 17:41:56 +00:00
Petr Sumbera 7d307fafee Bug 1497581 - Avoid debug assertion with --disable-updater r=zbraniecki DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D104655
2021-02-11 08:57:19 +00:00
Daisuke Akatsuka 82ebfda679 Bug 1678619: Release UDateFormat instance by udat_close after using it. r=zbraniecki
Depends on D100461

Differential Revision: https://phabricator.services.mozilla.com/D102256
2021-01-21 15:51:03 +00:00
smolnar 6652db1a08 Backed out 6 changesets (bug 1678619) on suspicion of causing crashes (bug 1687914). a=backout DONTBUILD
Backed out changeset c8b691b8e793 (bug 1678619)
Backed out changeset 37b2f438bd2b (bug 1678619)
Backed out changeset 0a92dfd99dac (bug 1678619)
Backed out changeset 2043a28e668e (bug 1678619)
Backed out changeset 53e385030d67 (bug 1678619)
Backed out changeset 9a1d599b4060 (bug 1678619)
2021-01-21 17:25:23 +02:00
Daisuke Akatsuka 2dc3194ddb Bug 1678619: Release UDateFormat instance by udat_close after using it. r=zbraniecki
Depends on D100461

Differential Revision: https://phabricator.services.mozilla.com/D102256
2021-01-20 12:44:06 +00:00
Dan Minor 57ae936f38 Bug 1420335 - Make OSPreferences::ReadDateTimePattern check 12h/24h on Android; r=zbraniecki
As is the case with GTK, Android provides an OS override to display times in
AM/PM or 24 hour format. This moves the code for rewriting skeletons from the
GTK specific code to OSPreferences, and calls it from the Android OSPreferences
implementation.

This was tested manually by visiting the file:/// uri. I don't believe this is
feasible to test from automation, as it would require changing Android OS settings
from within our test code.

Differential Revision: https://phabricator.services.mozilla.com/D101641
2021-01-15 19:28:12 +00:00
Bogdan Tara 60482b14fc Backed out changeset dc9229077eaa (bug 1420335) for security/manager* and toolkit/mozapps/* xpc failures CLOSED TREE 2021-01-14 18:43:19 +02:00
Dan Minor 487bcdd4ea Bug 1420335 - Make OSPreferences::ReadDateTimePattern check 12h/24h on Android; r=zbraniecki
As is the case with GTK, Android provides an OS override to display times in
AM/PM or 24 hour format. This moves the code for rewriting skeletons from the
GTK specific code to OSPreferences, and calls it from the Android OSPreferences
implementation.

This was tested manually by visiting the file:/// uri. I don't believe this is
feasible to test from automation, as it would require changing Android OS settings
from within our test code.

Differential Revision: https://phabricator.services.mozilla.com/D101641
2021-01-14 13:45:40 +00:00
Dan Minor 1465995b22 Bug 1685804 - Use nsIGSettingsService in OSPreferences_gtk; r=zbraniecki
This switches over to using nsIGSettingsService. This makes the gtest results
on gtk based systems depend on the current OS settings, so the test expectations
are adjusted to accept both AM/PM and 24h settings.

Differential Revision: https://phabricator.services.mozilla.com/D101362
2021-01-12 14:20:07 +00:00
Cosmin Sabou c8d4553e77 Backed out changeset ae73e36cbf2a (bug 1685804) for causing gtest time related failures. CLOSED TREE 2021-01-11 23:42:40 +02:00
Dan Minor b2b774c844 Bug 1685804 - Use nsIGSettingsService in OSPreferences_gtk; r=zbraniecki
This switches over to using nsIGSettingsService.

Differential Revision: https://phabricator.services.mozilla.com/D101362
2021-01-11 20:05:14 +00:00
Kartik Gautam f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Dorel Luca 7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00
Dan Minor 0790cac85a Bug 1681357 - Use regional prefs locale if locale is not specified in GetDateTimePattern; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D99241
2020-12-09 16:50:14 +00:00
Dan Minor 3440d0e190 Bug 1681251 - Return AUTF8String from GetDateTimePattern in mozIOSPreferences; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D99162
2020-12-09 03:16:23 +00:00
Makoto Kato 350116618e Bug 1667493 - Locale service shouldn't shutdown during normal shutting down phase. r=jfkthame
Although ICUUtils uses LocaleService, LocaleService will be shut down before
shut down observer.

DOM might use Locale Service by UnbindFromTree. So LocaleService should be
shut down by ShutdownPhase::ShutdownPostLastCycleCollection.

Differential Revision: https://phabricator.services.mozilla.com/D94944
2020-11-11 03:33:04 +00:00
Dan Minor 57441aa8cc Bug 1673054 - Migrate uses of intl.uidirection to intl.l10n.pseudo; r=Gijs,zbraniecki
This also removes pref overrides from methods like LocaleService::IsLocaleRTL or
IntlService.getLocaleInfo, because it doesn't really make sense to override the
result of checking an arbitrary locale, the relevant use case is overriding the
result for the current app locale.

Removal of the intl.uidirection pref completely will be done in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D96235
2020-11-09 15:33:39 +00:00
Jonathan Kew f8d43ea75c Bug 1675714 - Improve reliability of OSPreferences instance getters. r=lsalzman
Depends on D96201

Differential Revision: https://phabricator.services.mozilla.com/D96202
2020-11-07 17:29:48 +00:00
Emilio Cobos Álvarez d3853cf882 Bug 1675069 - Use nsDependentCSubstring rather than ptr+length in unic-langid-ffi. r=zbraniecki
Turns out we have `nsCStr` just for this already. I wrote this to
confirm it works as expected and it does, so...

The code doesn't deal with raw pointers anymore so we can remove the
helpers module and so on.

Differential Revision: https://phabricator.services.mozilla.com/D95866
2020-11-04 16:17:30 +00:00
Dan Minor 492a70088c Bug 1674212 - Add override pref for date time connector pattern; r=zbraniecki
This adds an override pref for the connector pattern used when combining dates
and times. It also fixes a test which was relying upon a hard-coded connector
pattern.

Differential Revision: https://phabricator.services.mozilla.com/D95278
2020-11-02 12:36:04 +00:00
Dan Minor 429ae74074 Bug 1426907 - Add OSPreferences::OverrideDateTimePattern method; r=zbraniecki
This new method allows for the user to override the long and short date and
time patterns by prefs. If no overrides are set or it fails while processing
the prefs, it will fallback to the existing methods for determining the patterns.
Since the user may have only overriden one of date or time, it is necessary to
be able to look up the other separately and combine the results.

This adds a prefix callback that watches the new prefs and flushes the cache if
they change. Otherwise, the user would have to restart the browser to see the
results of changing a pref, and would make testing more difficult. Unregistering
this callback required changes to the destructor, which was previously defined
separately on each operating system. A new RemoveObservers method has been added
to handle OS specific cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D94433
2020-10-27 20:41:58 +00:00
Dan Minor 686b723d0d Bug 1426907 - Update OSPreferences API to use UTF-8 rather than UTF-16; r=zbraniecki
We'll want to use UTF-8 when we switch to using ICU4x because Rust is all UTF-8. We
can switch the external facing APIs now, and update the internal implementations
later.

Differential Revision: https://phabricator.services.mozilla.com/D94850
2020-10-27 20:45:19 +00:00
Dan Minor 3790450033 Bug 1426907 - Make OSPreferences::GetPatternForSkeleton public and use in DateTimeFormat; r=zbraniecki
This allows for the removal of duplicated code between DateTimeFormat and
OSPreferences.

Differential Revision: https://phabricator.services.mozilla.com/D94432
2020-10-27 20:45:17 +00:00
Dan Minor df2b7bf080 Bug 1426907 - Call OSPreferences::GetDateTimePattern once in FormatUDateTime; r=zbraniecki
Now that we've removed a lot of the special cases we were supporting in the date
and time format selectors, we can call GetDateTimePattern once with the two
selectors instead of calling it twice and combining the results. This will
simplifies the code and will make it easier to handle overriding patterns using
prefs.

A side effect of this change is that on OS X, you get a slightly different result
if you ask for the long format date and time all at once than if you ask for the
two separately and then combine them. The test expectations have been updated
accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D94431
2020-10-27 20:43:25 +00:00
Dan Minor f66c096d75 Bug 1426907 - Rework DateTimeFormat gtests to not rely on hard-coded connector patterns; r=zbraniecki
The connector patterns can change over time, we should instead check for the date time components
that we expect to be present.

Differential Revision: https://phabricator.services.mozilla.com/D94849
2020-10-27 20:39:57 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Dan Minor a67119a8ad Bug 1669573 - Replace kDateFormatYearMonth/kDateFormatYearMonthLong with FormatDateTime; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D93013
2020-10-15 12:19:42 +00:00
Dan Minor cc0579260c Bug 1669573 - Add DataTimeFormat::FormatDateTime; r=zbraniecki
This adds a FormatDateTime method that takes a skeleton as an argument and
returns the localized date and time according to the skeleton. In the future,
we'll add an overload that allows taking an DateTimeOptions property bag, but
for now, this will provide enough functionality to allow us to remove the
kDateFormatYearMonth and kDateFormatYearMonthLong selectors as well as the code
for handling skeletons from FormatPRExplodedTime.

Differential Revision: https://phabricator.services.mozilla.com/D93012
2020-10-15 12:21:52 +00:00
Dan Minor c7c8e3f274 Bug 1669573 - Rename kTimeFormatSeconds and kTimeFormatNoSeconds; r=zbraniecki
This renames kTimeFormatSeconds to kTimeFormatLong and kTimeFormatNoSeconds to
kTimeFormatShort. This is consistent with the naming used for date format
selectors.

Differential Revision: https://phabricator.services.mozilla.com/D93011
2020-10-15 12:20:15 +00:00
Dan Minor 9cd711db66 Bug 1669573 - Replace kDateFormatMonthLong/kDateFormatWeekday with GetCalendarSymbol; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D93010
2020-10-15 12:19:52 +00:00
Dan Minor da71b8a478 Bug 1669573 - Call DeleteCache when changing locale in TestDateTimeFormat; r=zbraniecki
The formatters in mFormatCache are only valid for the locale in which they were
created. Currently the tests change mLocale directly but leave the cache in
place which can lead to incorrect test results depending upon which tests are
executed. This is not a problem outside of the tests because mLocale is normally
only set once during the call to Initialize() which will not change the current
locale once it is set.

Differential Revision: https://phabricator.services.mozilla.com/D93009
2020-10-15 12:19:47 +00:00
Dan Minor 18cf8b1d11 Bug 1669573 - Add DataTimeFormat::GetCalendarSymbol; r=zbraniecki
This adds a method to get the calendar symbol for a month or a weekday in long
or short form. We'll add more fields and styles in the future, the current patch
provides enough functionality to replace the selectors for kDateFormatMonthLong
and kDateFormatWeekday, which are currently used to retrieve display names by
calling FormatPRExplodedTime.

Differential Revision: https://phabricator.services.mozilla.com/D93008
2020-10-15 12:19:45 +00:00
Doug Thayer 025f5fb9f0 Bug 1656261 - Back out all recent StartupCache work r=RyanVM
This backs out all work from bug 1627075 as well as all of its
descendents. There were a few conflicts when backing this out but
overall it was pretty clean, so I would say it's a fairly mild
level of risk. Historically Nathan Froyd has reviewed these patches,
but he is no longer at Mozilla, and no one else is particularly
familiar with the code, so I am passing this off to RyanVM who has
at least been familiar with the history of the bug.

Differential Revision: https://phabricator.services.mozilla.com/D90096
2020-09-14 17:00:53 +00:00
Alexis Beingessner e5dd298d13 Bug 1654807 - update thin-vec to 0.2.1 for potential endianess fix. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87019
2020-09-14 17:32:40 +00:00
Sylvestre Ledru ba8d39bfb3 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset

Depends on D89392

Differential Revision: https://phabricator.services.mozilla.com/D89393
2020-09-07 19:57:24 +00:00