summaryrefslogtreecommitdiffstats
path: root/webkit/glue/editor_client_impl.cc
diff options
context:
space:
mode:
authoravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-22 15:25:01 +0000
committeravi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-22 15:25:01 +0000
commit52766a6760e2af542e92ee4127bceae221a308ef (patch)
tree0498556f7c479100670b34711e86612f3861a6f6 /webkit/glue/editor_client_impl.cc
parent0e60f294d4d94a105588cb08ee7351f5bb5efef0 (diff)
downloadchromium_src-52766a6760e2af542e92ee4127bceae221a308ef.zip
chromium_src-52766a6760e2af542e92ee4127bceae221a308ef.tar.gz
chromium_src-52766a6760e2af542e92ee4127bceae221a308ef.tar.bz2
Don't ignore special character input on the Mac.
Patch by ukai@google.com. Review URL: http://codereview.chromium.org/88052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/editor_client_impl.cc')
-rw-r--r--webkit/glue/editor_client_impl.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc
index 4655f7a..877f0e3 100644
--- a/webkit/glue/editor_client_impl.cc
+++ b/webkit/glue/editor_client_impl.cc
@@ -624,8 +624,17 @@ bool EditorClientImpl::handleEditingKeyboardEvent(
// Note that on Windows, we'll have a Char key event with ctrlKey() == true
// and text = "\x0c".
if (evt->keyEvent()->ctrlKey() || evt->keyEvent()->altKey() ||
- evt->keyEvent()->metaKey() || evt->keyEvent()->text().isEmpty())
+ evt->keyEvent()->metaKey() || evt->keyEvent()->text().isEmpty()) {
+#if defined(OS_MACOSX)
+ // Alt-<key> may produce special characters.
+ if (!(evt->keyEvent()->altKey() &&
+ evt->keyEvent()->text().length() == 1 &&
+ evt->keyEvent()->text()[0U] >= 0x80))
+ return false;
+#else
return false;
+#endif
+ }
if (evt->keyEvent()->text().length() == 1) {
UChar ch = evt->keyEvent()->text()[0U];