Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: Source/web/EditorClientImpl.cpp

Issue 21694005: Spell check whole content of an editable element when it gets focused. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: style & spurious comment removal. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/EditorClientImpl.cpp
diff --git a/Source/web/EditorClientImpl.cpp b/Source/web/EditorClientImpl.cpp
index e6e8eb79e786cd9229ba66ab13cb5e4850922bb6..26b8689bb8e3baa8475ba6efbc030aab46254ad0 100644
--- a/Source/web/EditorClientImpl.cpp
+++ b/Source/web/EditorClientImpl.cpp
@@ -151,13 +151,10 @@ void EditorClientImpl::toggleContinuousSpellChecking()
} else {
m_spellCheckThisFieldStatus = SpellCheckForcedOn;
if (Frame* frame = m_webView->focusedWebCoreFrame()) {
- if (unifiedTextCheckerEnabled(frame)) {
- VisibleSelection frameSelection = frame->selection()->selection();
- // If a selection is in an editable element spell check its content.
- if (Element* rootEditableElement = frameSelection.rootEditableElement()) {
- VisibleSelection selection = VisibleSelection::selectionFromContentsOfNode(rootEditableElement);
- frame->editor()->markMisspellingsAndBadGrammar(selection);
- }
+ VisibleSelection frameSelection = frame->selection()->selection();
+ // If a selection is in an editable element spell check its content.
+ if (Element* rootEditableElement = frameSelection.rootEditableElement()) {
+ frame->editor()->elementDidBeginEditing(rootEditableElement);
}
}
}
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698