diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 23:47:56 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-27 23:47:56 +0000 |
commit | 60b1d5ea100aaef4463836dbeaf7f23bc059fd30 (patch) | |
tree | d25499ef2ef5a07df0c9a0e24026ecbdfb19b467 /webkit/glue/editor_client_impl.cc | |
parent | 95b0d2ff52f0f11323bc0c6a41359c47352bb0ad (diff) | |
download | chromium_src-60b1d5ea100aaef4463836dbeaf7f23bc059fd30.zip chromium_src-60b1d5ea100aaef4463836dbeaf7f23bc059fd30.tar.gz chromium_src-60b1d5ea100aaef4463836dbeaf7f23bc059fd30.tar.bz2 |
The layout test fast/events/key-events-in-input-button.html fails because we treat a key-press when a button is focused as a text insert.
Trying here to match the code in mac/WebView/WebHTMLView.mm (line 5425).
TEST=Run layout tests.
BUG=None
R=ojan
Review URL: http://codereview.chromium.org/27288
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/editor_client_impl.cc')
-rw-r--r-- | webkit/glue/editor_client_impl.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc index 2f2214e..f7fc4e4 100644 --- a/webkit/glue/editor_client_impl.cc +++ b/webkit/glue/editor_client_impl.cc @@ -619,6 +619,9 @@ bool EditorClientImpl::handleEditingKeyboardEvent( return false; } + if (!frame->editor()->canEdit()) + return false; + return frame->editor()->insertText(evt->keyEvent()->text(), evt); } |