| Index: third_party/WebKit/Source/core/editing/Editor.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp
|
| index a84363f25882ba3ac78ca7e62a3d5de8f68149c6..6ac01cdf4159227f26899b2694297968b60a8101 100644
|
| --- a/third_party/WebKit/Source/core/editing/Editor.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/Editor.cpp
|
| @@ -512,7 +512,11 @@ void Editor::replaceSelectionWithFragment(PassRefPtrWillBeRawPtr<DocumentFragmen
|
|
|
| if (frame().selection().isInPasswordField() || !spellChecker().isContinuousSpellCheckingEnabled())
|
| return;
|
| - spellChecker().chunkAndMarkAllMisspellingsAndBadGrammar(frame().selection().rootEditableElement());
|
| + ASSERT(lastEditCommand()->isReplaceSelectionCommand());
|
| + const EphemeralRange& insertedRange = toReplaceSelectionCommand(lastEditCommand())->insertedRange();
|
| + if (insertedRange.isNull())
|
| + return;
|
| + spellChecker().chunkAndMarkAllMisspellingsAndBadGrammar(frame().selection().rootEditableElement(), insertedRange);
|
| }
|
|
|
| void Editor::replaceSelectionWithText(const String& text, bool selectReplacement, bool smartReplace)
|
|
|