mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
0fadf6b9da
mozInlineSpellChecker::ReplaceWord() is used for replacing misspelled word with a word. So, this is necessary to be distinguished from insertText command when we implement InputEvent.inputType. So, we should make it use TextEditor::ReplaceTextAsAction() instead (same as autocomplete). This patch makes TextEditor::ReplaceTextAsAction() take optional argument to make callers can specify replace range. Then, the range is a spellchecker selection range if the caller is mozInlineSpellChecker::ReplaceWord(). Prior to this patch, it clones the range for normal selection, but it's expensive and we may be able to reuse cached range of Selection in this case. So, this patch makes Selection::AddRangeInternal() checks if given range is in another Selection and use mCachedRange as far as possible. MozReview-Commit-ID: JIOTTsxlj4Q --HG-- extra : rebase_source : 7c26b0255f08608ebe8c7045c9bcdca1dc70cadf |
||
---|---|---|
.. | ||
composer | ||
libeditor | ||
reftests | ||
spellchecker | ||
txmgr | ||
AsyncSpellCheckTestHelper.jsm | ||
moz.build | ||
nsEditorCID.h | ||
nsIDocumentStateListener.idl | ||
nsIEditActionListener.idl | ||
nsIEditor.idl | ||
nsIEditorMailSupport.idl | ||
nsIEditorObserver.idl | ||
nsIEditorSpellCheck.idl | ||
nsIEditorStyleSheets.idl | ||
nsIEditorUtils.idl | ||
nsIHTMLAbsPosEditor.idl | ||
nsIHTMLEditor.idl | ||
nsIHTMLInlineTableEditor.idl | ||
nsIHTMLObjectResizer.idl | ||
nsIPlaintextEditor.idl | ||
nsITableEditor.idl | ||
nsIURIRefObject.idl |