mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1557231. Stop using [array] in nsIInlineSpellChecker. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D33908 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8e84b11096
commit
dc2b7685d7
@ -31,7 +31,7 @@ interface nsIInlineSpellChecker : nsISupports
|
||||
void removeWordFromDictionary(in AString aWord);
|
||||
|
||||
void ignoreWord(in AString aWord);
|
||||
void ignoreWords([array, size_is(aCount)] in wstring aWordsToIgnore, in unsigned long aCount);
|
||||
void ignoreWords(in Array<AString> aWordsToIgnore);
|
||||
void updateCurrentDictionary();
|
||||
|
||||
readonly attribute boolean spellCheckPending;
|
||||
|
@ -923,14 +923,13 @@ mozInlineSpellChecker::IgnoreWord(const nsAString& word) {
|
||||
// mozInlineSpellChecker::IgnoreWords
|
||||
|
||||
NS_IMETHODIMP
|
||||
mozInlineSpellChecker::IgnoreWords(const char16_t** aWordsToIgnore,
|
||||
uint32_t aCount) {
|
||||
mozInlineSpellChecker::IgnoreWords(const nsTArray<nsString>& aWordsToIgnore) {
|
||||
NS_ENSURE_TRUE(mSpellCheck, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
// add each word to the ignore list and then recheck the document
|
||||
for (uint32_t index = 0; index < aCount; index++)
|
||||
mSpellCheck->IgnoreWordAllOccurrences(
|
||||
nsDependentString(aWordsToIgnore[index]));
|
||||
for (auto& word : aWordsToIgnore) {
|
||||
mSpellCheck->IgnoreWordAllOccurrences(word);
|
||||
}
|
||||
|
||||
auto status = MakeUnique<mozInlineSpellStatus>(this);
|
||||
nsresult rv = status->InitForSelection();
|
||||
|
Loading…
Reference in New Issue
Block a user