From b8bb3ce56e6a05317f556674df2a87a47637e92e Mon Sep 17 00:00:00 2001 From: Mirko Brodesser Date: Mon, 29 Mar 2021 08:03:11 +0000 Subject: [PATCH] Bug 1700051: part 19) `const`-qualify and rename `mozInlineSpellChecker::SpellCheckSelectionIsFull`. r=smaug Depends on D109895 Differential Revision: https://phabricator.services.mozilla.com/D109896 --- extensions/spellcheck/src/mozInlineSpellChecker.cpp | 6 +++--- extensions/spellcheck/src/mozInlineSpellChecker.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/spellcheck/src/mozInlineSpellChecker.cpp b/extensions/spellcheck/src/mozInlineSpellChecker.cpp index a6c2f93f33ef..0ff263fe8982 100644 --- a/extensions/spellcheck/src/mozInlineSpellChecker.cpp +++ b/extensions/spellcheck/src/mozInlineSpellChecker.cpp @@ -1288,7 +1288,7 @@ nsresult mozInlineSpellChecker::DoSpellCheck( return NS_ERROR_NOT_INITIALIZED; } - if (SpellCheckSelectionIsFull()) { + if (IsSpellCheckSelectionFull()) { return NS_OK; } @@ -1493,7 +1493,7 @@ void mozInlineSpellChecker::CheckCurrentWordsNoSuggest( AutoChangeNumPendingSpellChecks pendingChecks(self, -1); - if (self->SpellCheckSelectionIsFull()) { + if (self->IsSpellCheckSelectionFull()) { return; } @@ -1684,7 +1684,7 @@ nsresult mozInlineSpellChecker::AddRange(Selection* aSpellCheckSelection, nsresult rv = NS_OK; - if (!SpellCheckSelectionIsFull()) { + if (!IsSpellCheckSelectionFull()) { IgnoredErrorResult err; aSpellCheckSelection->AddRangeAndSelectFramesAndNotifyListeners(*aRange, err); diff --git a/extensions/spellcheck/src/mozInlineSpellChecker.h b/extensions/spellcheck/src/mozInlineSpellChecker.h index 42335576d7cf..5a6f252db615 100644 --- a/extensions/spellcheck/src/mozInlineSpellChecker.h +++ b/extensions/spellcheck/src/mozInlineSpellChecker.h @@ -253,7 +253,7 @@ class mozInlineSpellChecker final : public nsIInlineSpellChecker, RemoveRange(mozilla::dom::Selection* aSpellCheckSelection, nsRange* aRange); MOZ_CAN_RUN_SCRIPT_BOUNDARY nsresult AddRange(mozilla::dom::Selection* aSpellCheckSelection, nsRange* aRange); - bool SpellCheckSelectionIsFull() { + bool IsSpellCheckSelectionFull() const { return mNumWordsInSpellSelection >= mMaxNumWordsInSpellSelection; } -- 2.11.4.GIT