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

Unified Diff: chrome/renderer/render_view.cc

Issue 557019: Merge 37160 - Spellchecker: fix render view autosuggest context menu items... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/302/src/
Patch Set: Created 10 years, 11 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: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 37292)
+++ chrome/renderer/render_view.cc (working copy)
@@ -1713,12 +1713,13 @@
ContextMenuParams params = ContextMenuParams(data);
if (!params.misspelled_word.empty() && RenderThread::current()) {
int misspelled_offset, misspelled_length;
- bool misspelled = RenderThread::current()->spellchecker()->SpellCheckWord(
- params.misspelled_word.c_str(), params.misspelled_word.size(),
- document_tag_,
- &misspelled_offset, &misspelled_length,
- &params.dictionary_suggestions);
- if (!misspelled)
+ bool spelled_right = RenderThread::current()->spellchecker()->
+ SpellCheckWord(
+ params.misspelled_word.c_str(), params.misspelled_word.size(),
+ document_tag_,
+ &misspelled_offset, &misspelled_length,
+ &params.dictionary_suggestions);
+ if (spelled_right)
params.misspelled_word.clear();
}
« 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