`TextServicesDocument::LastSelectedBlock()` may return `NS_OK` with
`UINT32_MAX` for both offset and length of the block. The assertions causes
the new test not runnable in debug build. So, we should make the situation
as an error case if they are required.
Ideally, we should fix the odd behavior, but it's not safe for uplift.
Therefore, this patch just adds the wallpapers.
Depends on D123282
Differential Revision: https://phabricator.services.mozilla.com/D123283
By bug 1719110, we replace sync IPC's spell checker suggestion with async
version. So we should remove this sync IPC call.
Differential Revision: https://phabricator.services.mozilla.com/D122579
CheckCurrentWord on content process causes sync IPC, so I would like to remove
this call on content process. New nsIEditorSpellChecker.suggest method can
avoid it.
Differential Revision: https://phabricator.services.mozilla.com/D119937
When getting suggestions from spellchecker's result, we use sync IPC
(`PRemoteSpellcheckEngine.CheckAndSuggest`). This is used by showing context
menu only on Gecko. So I think that we can remove this IPC if we add async API
to get spellchecker suggestions.
And in comm-central's code, `CheckCurrentWord` and `GetSuggestedWord` seems to
use on spellchecker dialog (content/dialogs/EdSpellCheck.js in mail and suite)
that runs on parent process. So c-c won't use this IPC method.
So I would like to add the promise version of getting spellchecker's
suggestion.
Differential Revision: https://phabricator.services.mozilla.com/D119936
For every cookie permission check CookieJarSettings::CookiePermission has to create a new principal.
This is slow. It uses a cloned principal so it can strip the origin attributes which should not be
used for the permission check.
With this patch we no longer need to clone the principal. We pass in the original principal and perform
the OA stripping on an OA copy in BasePrincipal::EqualsForPermission.
Before, EqualsForPermission was guaranteed to get a content principal, because ClonePrincipalForPermission
enforced it. BasePrincipal::EqualsForPermission was refactored to account for non content principals.
Differential Revision: https://phabricator.services.mozilla.com/D120834
Removing ranges is expensive. This reduces flickering of the spelling
mistakes and prevents 100% CPU usage of 1 core on slower machines.
The essence of this patch is, that when text doesn't change, all
existing spellchecking ranges are reused.
Before this patch, removing ranges was done as part of the time slice in
`mozInlineSpellChecker::SpellCheckSlice`. That is, slow removals of
ranges contributed to the amount of words to be spellchecked
asynchronously.
Therefore, the amount of words to be spellchecked in one chunk could
increase from the minimum, `INLINESPELL_MINIMUM_WORDS_BEFORE_TIMEOUT` to
the maxium `INLINESPELL_MAXIMUM_CHUNKED_WORDS_PER_TASK`.
Consequently, the asynchronous checking might take longer. If that turns
out to be problematic, reducing
`INLINESPELL_MAXIMUM_CHUNKED_WORDS_PER_TASK` could be a fix.
Differential Revision: https://phabricator.services.mozilla.com/D116096
This might lead to increased exceeding of the time slice, because the
ranges are removed after the time limit was checked. Therefore, this
change should only be landed together with the following review which
will remove unnecessary remove- and add-operations for ranges. It's a
separate review only to simplify reviewing and potential debugging.
Differential Revision: https://phabricator.services.mozilla.com/D116095
The fix of bug 1687263 will require determining which `nsRange`s of a
previous time slice to keep and for which `NodeOffsetRange`s to create
new `nsRange`s. The operator will be used in a following review.
Differential Revision: https://phabricator.services.mozilla.com/D116094
They are used by setting text value of `TextEditor` or replacing a misspelled
word with a new word in both `TextEditor` and `HTMLEditor`. Therefore,
they should be in the `EditorBase` rather than `TextEditor`.
Note that the path of the former case may be in a hot path. Therefore, we need
to keep redirecting to `TextEditor` for keeping the performance only in the
case.
Depends on D115785
Differential Revision: https://phabricator.services.mozilla.com/D115786