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

Unified Diff: webkit/tools/test_shell/text_input_controller.cc

Issue 199020: Fix TextInputController::insertText() so that it celar selected text before i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 | « webkit/tools/layout_tests/test_expectations.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/text_input_controller.cc
===================================================================
--- webkit/tools/test_shell/text_input_controller.cc (revision 25409)
+++ webkit/tools/test_shell/text_input_controller.cc (working copy)
@@ -52,8 +52,13 @@
if (!main_frame)
return;
- if (args.size() >= 1 && args[0].isString())
+ if (args.size() >= 1 && args[0].isString()) {
+ if (main_frame->hasMarkedText()) {
+ main_frame->unmarkText();
+ main_frame->replaceSelection(WebString());
+ }
main_frame->insertText(WebString::fromUTF8(args[0].ToString()));
+ }
}
void TextInputController::doCommand(
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698