Index: third_party/WebKit/WebCore/page/Frame.cpp |
=================================================================== |
--- third_party/WebKit/WebCore/page/Frame.cpp (revision 11154) |
+++ third_party/WebKit/WebCore/page/Frame.cpp (working copy) |
@@ -1683,11 +1683,11 @@ |
VisiblePosition oldStart(oldSelection.visibleStart()); |
VisibleSelection oldAdjacentWords = VisibleSelection(startOfWord(oldStart, LeftWordIfOnBoundary), endOfWord(oldStart, RightWordIfOnBoundary)); |
if (oldAdjacentWords != newAdjacentWords) { |
- editor()->markMisspellings(oldAdjacentWords); |
if (isContinuousGrammarCheckingEnabled) { |
- VisibleSelection oldSelectedSentence = VisibleSelection(startOfSentence(oldStart), endOfSentence(oldStart)); |
- if (oldSelectedSentence != newSelectedSentence) |
- editor()->markBadGrammar(oldSelectedSentence); |
+ VisibleSelection oldSelectedSentence = VisibleSelection(startOfSentence(oldStart), endOfSentence(oldStart)); |
+ editor()->markMisspellingsAndBadGrammar(oldAdjacentWords, oldSelectedSentence != newSelectedSentence, oldSelectedSentence); |
+ } else { |
+ editor()->markMisspellingsAndBadGrammar(oldAdjacentWords, false, oldAdjacentWords); |
} |
} |
} |