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

11086 Коммитов

Автор SHA1 Сообщение Дата
James Teh 1fcd045e66 Bug 1771736 part 1: Update cached spelling errors when a spelling error is removed. r=morgan,smaug
I originally thought we didn't need to be explicitly notified about removals because a correction always triggers a text change and we push a cache update for spelling errors whenever the text changes.
However, it seems that even when a correction is made and the text changes, the spell check ranges aren't yet up to date.
Previously, we were pushing a cache update whenever text was reflowed, which was taking care of this.
Soon, we don't want to push text cache updates if the text doesn't actually change.
We remove the reliance on these redundant text updates by having an explicit notification for spell check removals.

Differential Revision: https://phabricator.services.mozilla.com/D147655
2022-06-01 00:35:26 +00:00
James Teh 7564ed957c Bug 1737919 part 4: Update cached spelling errors when a spelling error is added without the text changing. r=morgan,smaug
We already have an nsISelectionListener, but that only tells us that a change happened somewhere in the selection, not which range changed.
We don't want to push a cache update for all ranges when only one changed.
Therefore, this patch adds an accessibility notification in mozInlineSpellChecker::AddRange.
We don't need this for removed ranges because the text will change for any spelling error corrections and text updates trigger spelling error cache updates.

Differential Revision: https://phabricator.services.mozilla.com/D147244
2022-05-27 10:56:41 +00:00
Andrew McCreight 01913de302 Bug 1769442 - Remove nsIFactory::lockFactory, breaking compatibility with IClassFactory. r=xpcom-reviewers,Jamie,necko-reviewers,kershaw,nika
nsIFactory is binary compatible with Windows COM's IClassFactory,
but nothing seems to depend on it. This patch removes the test
for compatibility, TestCOM, and removes the lockFactory
method that isn't otherwise needed.

Differential Revision: https://phabricator.services.mozilla.com/D146386
2022-05-16 22:38:51 +00:00
Mike Hommey 2d6c8fdbc6 Bug 1766561 - Adjust UTF-16 string formatting. r=nika
With MOZ_FORMAT_PRINTF annotations, the compiler expects a wchar_t*, and
it won't automatically consider char16ptr_t to be compatible with that.

While handling strings, there's one case of formatting that doesn't need
to use %S at all.

Differential Revision: https://phabricator.services.mozilla.com/D144919
2022-05-03 20:49:09 +00:00
Mike Hommey 08edf30a1b Bug 1766561 - Add missing l modifier for long formatting. r=Jamie,media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,mhowell,rkraesig,gerald,application-update-reviewers,bytesized,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144917
2022-05-03 20:49:08 +00:00
Tooru Fujisawa bc20f01f72 Bug 1765156 - Part 5: Use SpecialPowers.ChromeUtils.import in extensions/. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D144086
2022-05-03 06:32:26 +00:00
Tooru Fujisawa 72001c3fe3 Bug 1766114 - Part 2: Use Services.jsm in AutoConfig prefcalls.js. r=mkaply
Depends on D144939

Differential Revision: https://phabricator.services.mozilla.com/D144940
2022-04-28 14:53:12 +00:00
Tooru Fujisawa e52c566f4d Bug 1766114 - Part 1: Define ChromeUtils in privideged AutoConfig sandbox. r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D144939
2022-04-28 14:53:12 +00:00
Timothy Nikkel 0c959232b6 Bug 1765113. Silence spammy warning in extensions/permissions/PermissionDelegateHandler.cpp. r=timhuang
Depends on D143891

Differential Revision: https://phabricator.services.mozilla.com/D143892
2022-04-19 09:49:50 +00:00
Dan Minor 7bfa09587b Bug 1761464 - Load dictionaries lazily; r=smaug
Loading dictionaries is time consuming and must occur on the main thread. By
loading them lazily, we can hopefully spread these loads across multiple calls
rather than loading them all at once, which results in noticeable jank on
slower systems.

Differential Revision: https://phabricator.services.mozilla.com/D142558
2022-04-01 18:57:41 +00:00
Dan Minor cf34ce99d8 Bug 1761464 - Pass nsCString to RLBoxHunspell::Create; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D142696
2022-04-01 18:57:40 +00:00
Dan Minor 1dc69c5bc0 Bug 1761464 - Don't free dictionaries when they are no longer in use; r=smaug
This adds an mEnabled flag which is used to hide dictionaries from the
spellchecker rather than freeing them. Loading dictionaries is an expensive
process which must occur on the main thread. By retaining dictionaries in
memory, we avoid having to reload them. If the number of dictionaries in use
exceeds a set number (10), we'll attempt to free any disabled dictionaries to
avoid memory use growing indefinitely.

Differential Revision: https://phabricator.services.mozilla.com/D142557
2022-04-01 18:57:40 +00:00
Dan Minor 37130e3638 Bug 1761085 - Check for existence of mEngine in mozSpellChecker; r=smaug
With the changes to EditorSpellCheck::SetFallbackDictionary to use a
promise chain to support calling either SetCurrentDictionaryFromList or
SetCurrentDictionaries as required, it is now possible that
RemoteSpellCheckEngineChild is destroyed by the time the second promise
runs. During destruction, RemoteSpellCheckEngineChild calls
mozSpellChecker::DeleteRemoteEngine, which sets mEngine to nullptr.
This patch adds a nullptr check for mEngine in both
SetCurrentDictionaryFromList and SetCurrentDictionaries.

Differential Revision: https://phabricator.services.mozilla.com/D141983
2022-03-24 19:23:56 +00:00
Dan Minor 337bc15035 Bug 1402822 - Update unit tests for multiple dictionaries; r=smaug
For the most part these are simple updates to account for multiple
dictionaries and the fact that SetDictionaries is async whereas
SetDictionary was sync.

Fixing test_async_UpdateCurrentDictionary was more involved because
there were flaws in the existing test and it is more difficult to
harmonize the UpdateCurrentDictionary callback with the changes to make
SetDictionaries async.

Differential Revision: https://phabricator.services.mozilla.com/D140245
2022-03-23 13:53:39 +00:00
Dan Minor 12a8486570 Bug 1402822 - Support multiple dictionaries in InlineSpellChecker; r=smaug,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D140242
2022-03-23 13:53:38 +00:00
Dan Minor ec7686738b Bug 1402822 - Support multiple dictionaries in RemoteSpellcheckEngine; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D140241
2022-03-23 13:53:37 +00:00
Dan Minor c6176cbf35 Bug 1402822 - Support multiple dictionaries in mozSpellChecker; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D140240
2022-03-23 13:53:37 +00:00
Dan Minor 4bfde31d98 Bug 1402822 - Support multiple hunspell instances in mozHunspell; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D140239
2022-03-23 13:53:36 +00:00
Dan Minor 69b8413be1 Bug 1402822 - Support multiple dictionaries in mozISpellCheckingEngine.idl; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D140238
2022-03-23 13:53:36 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Nika Layzell 05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
Jari Jalkanen 972848b50f Bug 1736844 - Add interrupt flag to storage service methods opening database; r=dom-storage-reviewers,mak,janv
Differential Revision: https://phabricator.services.mozilla.com/D129023
2022-02-17 06:22:27 +00:00
Marian-Vasile Laza 1004df96d4 Backed out changeset 0ef0b43b28f1 (bug 1736844) for causing gtest failures. CLOSED TREE 2022-02-16 09:27:30 +02:00
Haiyang Xu 4f8cc77665 Bug 1736844 - Add interrupt flag to storage service methods opening database; r=dom-storage-reviewers,mak,janv
* The same flags can be used to enable other features such as extented error codes

Differential Revision: https://phabricator.services.mozilla.com/D129023
2022-02-16 06:08:11 +00:00
Nika Layzell dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Nika Layzell 91ec85c593 Bug 1752444 - Part 2: Rewrite direct_call.py protocols to use {Parent,Child}Impl attributes, r=ipc-reviewers,media-playback-reviewers,alwu,mccr8
This is a mechanical change which was performed by a script based on the
contents of direct_call.py, and then manually checked over to fix
various rewriting bugs caused by my glorified sed script. See the
previous part for more context on the change.

Differential Revision: https://phabricator.services.mozilla.com/D137227
2022-02-09 17:29:46 +00:00
Hannah Peuckmann 9e561c3134 Bug 1750164 - Hand over the proper unit of time from ClearDataService to PermissionManager. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D136391
2022-01-31 16:33:33 +00:00
Joel Maher d55f10c407 Bug 1751264 - adjust tests that should be passing on win10. r=intermittent-reviewers,MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D136525
2022-01-20 21:02:44 +00:00
Kershaw Chang 8664bd40dd Bug 1748210 - Always release GetNextTokenCompleteEvent on main thread, r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D134948
2022-01-12 03:59:47 +00:00
Emilio Cobos Álvarez aae1c6e826 Bug 1748408 - Allow bigger chunks in hunspell. r=bholley
Some dictionaries might use more memory for some words than what we were
allowing.

Differential Revision: https://phabricator.services.mozilla.com/D135060
2022-01-05 18:22:47 +00:00
Mike Hommey e6e627c61f Bug 1746299 - Remove broken support for --enable-project=extensions and --enable-extensions. r=Gijs,firefox-build-system-reviewers,mhentges
The former is broken because of a lack of a app.mozbuild file and has
been broken for years.

The latter doesn't do anything useful outside --enable-project=extensions
because all the subdirectories of extensions/ are already covered by
other flags (or always used):
- auth, via --enable-negotiateauth (default on)
- permissions, always
- pref, via --enable-pref-extensions (default on)
- spellcheck, always
- universalchardet, via --enable-universalchardet (default on)

Also, nothing sets MOZ_EXTENSIONS_DEFAULT anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133970
2021-12-18 00:32:34 +00:00
Sandor Molnar eac95b4a93 Backed out 6 changesets (bug 1746539, bug 1746541, bug 1746544, bug 1746540, bug 1746542, bug 1746299) for causing android build bustages in cutils/properties. CLOSED TREE
Backed out changeset 9352292fa327 (bug 1746544)
Backed out changeset 3cc761d90071 (bug 1746542)
Backed out changeset 8d8fc11e8012 (bug 1746541)
Backed out changeset 5f53612aad1b (bug 1746540)
Backed out changeset afb601202b24 (bug 1746539)
Backed out changeset 90027c44c9af (bug 1746299)
2021-12-18 01:28:06 +02:00
Mike Hommey 26b16bad6e Bug 1746299 - Remove broken support for --enable-project=extensions and --enable-extensions. r=Gijs,firefox-build-system-reviewers,mhentges
The former is broken because of a lack of a app.mozbuild file and has
been broken for years.

The latter doesn't do anything useful outside --enable-project=extensions
because all the subdirectories of extensions/ are already covered by
other flags (or always used):
- auth, via --enable-negotiateauth (default on)
- permissions, always
- pref, via --enable-pref-extensions (default on)
- spellcheck, always
- universalchardet, via --enable-universalchardet (default on)

Also, nothing sets MOZ_EXTENSIONS_DEFAULT anymore.

Differential Revision: https://phabricator.services.mozilla.com/D133970
2021-12-17 22:52:09 +00:00
Jens Stutte 52992de4f8 Bug 1707963: Avoid a potential race on permission manager singleton creation. r=permissions-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D132215
2021-12-14 18:39:42 +00:00
Jens Stutte e8d4b2540f Bug 1707963: Let the PermissionManager be initialized lazily but not after shutdown started. r=permissions-reviewers,timhuang,janv
Differential Revision: https://phabricator.services.mozilla.com/D132088
2021-12-14 18:39:41 +00:00
Masayuki Nakano 2214b0dc00 Bug 1735446 - part 5: Make `nsIInlineSpellChecker` use `unsigned long` as offset in node r=m_kato
It has two methods which take (signed) `long` argument to specify offset in a
DOM node, but it's declared as "unsigned long" in the standards.  And now,
they work with rewritten Selection API which take `uint32_t` so that they should
use `unsigned long` for making the handling simpler and safer.

Differential Revision: https://phabricator.services.mozilla.com/D131034
2021-12-09 07:44:09 +00:00
Masayuki Nakano 82e2013683 Bug 1735446 - part 4: Make `Selection::GetRangeAt()` take `uint32_t` instead of `int32_t` r=smaug
It's an internal API corresponding to `Selection.getRangeAt` DOM API.
I think that it should use `uint32_t` rather than `size_t` because of the
consistency with the DOM API and `Selection::RangeCount()`.

This patch fixes all callers of `GetRangeAt()`, and rewrites it with ranged-
loops unless original ones do not refer `RangeCount()` every time and may run
script in the loop.

Differential Revision: https://phabricator.services.mozilla.com/D128848
2021-12-09 07:35:09 +00:00
Alexandru Michis 9028b0458c Backed out 2 changesets (bug 1707963) for causing bc failures in browser_xpcom_graph_wait.js
CLOSED TREE

Backed out changeset 4e7eac659186 (bug 1707963)
Backed out changeset 5d86acaf84da (bug 1707963)
2021-12-09 09:05:07 +02:00
Masayuki Nakano 8213a63459 Bug 1735446 - part 1: Make `Selection` use `uint32_t` for handling offset in DOM nodes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D128844
2021-12-09 00:45:19 +00:00
Jens Stutte e574cb98de Bug 1707963: Avoid a potential race on permission manager singleton creation. r=permissions-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D132215
2021-12-08 22:10:18 +00:00
Jens Stutte c05fc0f8b4 Bug 1707963: Let the PermissionManager be initialized lazily but not after shutdown started. r=permissions-reviewers,timhuang,janv
Differential Revision: https://phabricator.services.mozilla.com/D132088
2021-12-08 22:10:18 +00:00
Bobby Holley 12d3098eb4 Bug 1739761 - Scale down the hunspell sandbox size calculation to account for reduced fragmentation. r=shravanrn
Differential Revision: https://phabricator.services.mozilla.com/D132520
2021-12-03 20:28:51 +00:00
Bobby Holley bc22c870c5 Bug 1739761 - arena-allocate strings in hunspell. r=glandium
This reduces the number of wasm pages allocated from 64 to 47 on en_us
builds, corresponding to about 1 MB of reduced memory usage.

There are a few methods on HashMgr that can transfer buffers to external
consumers — namely decode_flags and encode_flag. Because the former is
also called by internal consumers, we need to be careful to
conditionally use the arena for only the internal consumers.

Differential Revision: https://phabricator.services.mozilla.com/D132519
2021-12-03 20:28:51 +00:00
Csoregi Natalia d380aeea76 Backed out 2 changesets (bug 1739761) for causing failures on test_hunspell.js. CLOSED TREE
Backed out changeset 97263298aa24 (bug 1739761)
Backed out changeset 74f7e61f745f (bug 1739761)
2021-12-02 05:10:29 +02:00
Bobby Holley ca676b757e Bug 1739761 - Scale down the hunspell sandbox size calculation to account for reduced fragmentation. r=shravanrn
Differential Revision: https://phabricator.services.mozilla.com/D132520
2021-12-02 01:21:15 +00:00
Bobby Holley 031f81a28e Bug 1739761 - arena-allocate strings in hunspell. r=glandium
This reduces the number of wasm pages allocated from 64 to 47 on en_us
builds, corresponding to about 1 MB of reduced memory usage.

Differential Revision: https://phabricator.services.mozilla.com/D132519
2021-12-02 01:21:14 +00:00