Index: third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
index 36a46a159e260952460b45896a45532eae905477..62f41d21ddda4c3580dc03911ea6b189b6b167fb 100644 |
--- a/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
+++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellChecker.cpp |
@@ -217,8 +217,8 @@ void SpellChecker::didBeginEditing(Element* element) { |
return; |
// We always recheck textfields because markers are removed from them on |
// blur. |
- VisibleSelection selection = |
- VisibleSelection::selectionFromContentsOfNode(element); |
+ const VisibleSelection selection = createVisibleSelection( |
+ SelectionInDOMTree::Builder().selectAllChildren(*element).build()); |
markMisspellingsAndBadGrammar(selection); |
if (!isTextField) |
parent->setAlreadySpellChecked(true); |