diff options
author | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-07 01:00:28 +0000 |
---|---|---|
committer | tkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-07 01:00:28 +0000 |
commit | 64f969cc85a57a0596a8281aa32a9c1560f9e220 (patch) | |
tree | b46b8ef7952804fa758851b808f5575b5f00b451 | |
parent | 632fbb17bac3bca1c0a6e8f45a7357eefae9925f (diff) | |
download | chromium_src-64f969cc85a57a0596a8281aa32a9c1560f9e220.zip chromium_src-64f969cc85a57a0596a8281aa32a9c1560f9e220.tar.gz chromium_src-64f969cc85a57a0596a8281aa32a9c1560f9e220.tar.bz2 |
Fix TextInputController::insertText() so that it clear selected text before insertion.
TEST=none
BUG=20993
Review URL: http://codereview.chromium.org/199020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25595 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/tools/layout_tests/test_expectations.txt | 3 | ||||
-rw-r--r-- | webkit/tools/test_shell/text_input_controller.cc | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt index 66c5bff..a68bd59 100644 --- a/webkit/tools/layout_tests/test_expectations.txt +++ b/webkit/tools/layout_tests/test_expectations.txt @@ -2302,9 +2302,6 @@ BUG20886 WIN DEBUG : LayoutTests/fast/js/regexp-non-capturing-groups.html = CRAS BUG20898 MAC DEBUG : LayoutTests/svg/W3C-SVG-1.1/painting-marker-02-f.svg = FAIL PASS // WebKit 48001:48020 -// New Webkit test: http://trac.webkit.org/changeset/48011 -// maxLength does not work for IME input in this test. -BUG20993 : LayoutTests/fast/forms/input-maxlength-ime-completed.html = FAIL // Need to implement clearAllDatabases in layoutTestController. BUG20995 SKIP : LayoutTests/storage/statement-error-callback.html = FAIL diff --git a/webkit/tools/test_shell/text_input_controller.cc b/webkit/tools/test_shell/text_input_controller.cc index 8dfb9a1..8ab7576 100644 --- a/webkit/tools/test_shell/text_input_controller.cc +++ b/webkit/tools/test_shell/text_input_controller.cc @@ -52,8 +52,13 @@ void TextInputController::insertText( 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( |