| Index: third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| index 6382ae112ef75d7402e48413cfd378bd46655c88..be3c2be2fc9d9e13cdde28a7ea7daae24be372f9 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| @@ -33,6 +33,7 @@
|
| #include "core/editing/Editor.h"
|
| #include "core/editing/PlainTextRange.h"
|
| #include "core/editing/SelectionModifier.h"
|
| +#include "core/editing/TextSuggestionController.h"
|
| #include "core/editing/VisiblePosition.h"
|
| #include "core/editing/VisibleUnits.h"
|
| #include "core/editing/commands/BreakBlockquoteCommand.h"
|
| @@ -266,9 +267,13 @@ void TypingCommand::insertText(Document& document,
|
| LocalFrame* frame = document.frame();
|
| DCHECK(frame);
|
|
|
| - if (!text.isEmpty())
|
| + if (!text.isEmpty()) {
|
| + bool firstCharIsSpaceOrNewline = isSpaceOrNewline(text[0]);
|
| document.frame()->spellChecker().updateMarkersForWordsAffectedByEditing(
|
| - isSpaceOrNewline(text[0]));
|
| + firstCharIsSpaceOrNewline);
|
| + frame->textSuggestionController().removeSuggestionMarkersAffectedByEditing(
|
| + firstCharIsSpaceOrNewline);
|
| + }
|
|
|
| insertText(document, text, frame->selection().selectionInDOMTree(), options,
|
| composition, isIncrementalInsertion);
|
| @@ -693,6 +698,10 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity,
|
| return;
|
|
|
| frame->spellChecker().updateMarkersForWordsAffectedByEditing(false);
|
| + document()
|
| + .frame()
|
| + ->textSuggestionController()
|
| + .removeSuggestionMarkersAffectedByEditing(false);
|
|
|
| VisibleSelection selectionToDelete;
|
| VisibleSelection selectionAfterUndo;
|
| @@ -851,6 +860,10 @@ void TypingCommand::forwardDeleteKeyPressed(TextGranularity granularity,
|
| return;
|
|
|
| frame->spellChecker().updateMarkersForWordsAffectedByEditing(false);
|
| + document()
|
| + .frame()
|
| + ->textSuggestionController()
|
| + .removeSuggestionMarkersAffectedByEditing(false);
|
|
|
| VisibleSelection selectionToDelete;
|
| VisibleSelection selectionAfterUndo;
|
|
|