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

Unified Diff: webkit/glue/editor_client_impl.cc

Issue 159516: [chromium-reviews] Fix for spell check underlines disappearing when user clicks out of the Text ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/editor_client_impl.cc
===================================================================
--- webkit/glue/editor_client_impl.cc (revision 21682)
+++ webkit/glue/editor_client_impl.cc (working copy)
@@ -130,13 +130,19 @@
if (!document)
return false;
const WebCore::Node* node = document->focusedNode();
+ // If |node| is NULL, we default to allowing spellchecking. This is done in
+ // order to mitigate the issue when the user clicks outside the textbox, as a
+ // result of which |node| becomes NULL, resulting in all the spell check
+ // markers being deleted. Also, the Frame will decide not to do spellchecking
+ // if the user can't edit - so returning true here will not cause any problems
+ // to the Frame's behavior.
if (!node)
- return false;
+ return true;
const WebCore::RenderObject* renderer = node->renderer();
if (!renderer)
return false;
- return (!renderer->isTextField() && editor->canEdit());
+ return !renderer->isTextField();
}
bool EditorClientImpl::isContinuousSpellCheckingEnabled() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698