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

Unified Diff: webkit/glue/context_menu_client_impl.cc

Issue 20280: [chromium-reviews] Fix bug where right click in a text area selects empty space. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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/context_menu_client_impl.cc
===================================================================
--- webkit/glue/context_menu_client_impl.cc (revision 9498)
+++ webkit/glue/context_menu_client_impl.cc (working copy)
@@ -92,7 +92,14 @@
misspelled_word_string = CollapseWhitespace(
webkit_glue::StringToStdWString(selected_frame->selectedText()),
false);
-
+
+ // If misspelled word is empty, then that portion should not be selected.
+ // Set the selection to that position only, and do not expand.
+ if (misspelled_word_string.empty()) {
+ selection = WebCore::Selection(pos);
+ selected_frame->selection()->setSelection(selection);
+ }
+
return misspelled_word_string;
}
« 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