| Index: Source/core/editing/SpellChecker.cpp
|
| diff --git a/Source/core/editing/SpellChecker.cpp b/Source/core/editing/SpellChecker.cpp
|
| index f99aaf9bf645c0cff89bdb7fca066ac385c3e3db..0d485df9d056c0e25440f739958b81b61193eda9 100644
|
| --- a/Source/core/editing/SpellChecker.cpp
|
| +++ b/Source/core/editing/SpellChecker.cpp
|
| @@ -416,7 +416,7 @@ void SpellChecker::markMisspellingsAfterTypingToWord(const VisiblePosition &word
|
| // If autocorrected word is non empty, replace the misspelled word by this word.
|
| if (!autocorrectedString.isEmpty()) {
|
| VisibleSelection newSelection(misspellingRange.get(), DOWNSTREAM);
|
| - if (newSelection != frame().selection().selection()) {
|
| + if (!VisibleSelection::InDOMTree::equalSelections(newSelection, frame().selection().selection())) {
|
| frame().selection().setSelection(newSelection);
|
| }
|
|
|
| @@ -863,7 +863,7 @@ void SpellChecker::spellCheckOldSelection(const VisibleSelection& oldSelection,
|
| {
|
| VisiblePosition oldStart(oldSelection.visibleStart());
|
| VisibleSelection oldAdjacentWords = VisibleSelection(startOfWord(oldStart, LeftWordIfOnBoundary), endOfWord(oldStart, RightWordIfOnBoundary));
|
| - if (oldAdjacentWords != newAdjacentWords) {
|
| + if (!VisibleSelection::InDOMTree::equalSelections(oldAdjacentWords, newAdjacentWords)) {
|
| if (isContinuousSpellCheckingEnabled() && isGrammarCheckingEnabled()) {
|
| VisibleSelection selectedSentence = VisibleSelection(startOfSentence(oldStart), endOfSentence(oldStart));
|
| markMisspellingsAndBadGrammar(oldAdjacentWords, true, selectedSentence);
|
|
|