diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 07:38:06 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 07:38:06 +0000 |
commit | f17709bbedbdc5cf3bdc88dc93d264e0191b8f2b (patch) | |
tree | 04e899a7dc1edaf1152f9419671338505a65ca06 /chrome/common/native_web_keyboard_event.h | |
parent | fb6ec999c0d049c78b16ca6106d5e45624f94ac8 (diff) | |
download | chromium_src-f17709bbedbdc5cf3bdc88dc93d264e0191b8f2b.zip chromium_src-f17709bbedbdc5cf3bdc88dc93d264e0191b8f2b.tar.gz chromium_src-f17709bbedbdc5cf3bdc88dc93d264e0191b8f2b.tar.bz2 |
Implement the NSTextInput protocol.
This change implements the NSTextInput protocol to integrate dead-keys and IME support into Mac Chromium.
Same as Linux, to improve compatibility with Windows Chrome, this change emulates IPC messages sent on Windows when we input characters to fix Issue 11952 and Issue 11981.
Even though I notice we need more work for fixing edge cases (e.g. disabling IMEs on a password input) also on Mac, it is the good starting point. (Supporting edge-cases requires complicated code and it makes hard to review.)
BUG=11952 "IME support is not implemented"
BUG=11981 "Deadkeys do not work"
BUG=16393 "Mac: Not able to insert any letter using "Special Characters" pallet"
TEST=Open a web page which contains an <input> form (e.g. <http://www.google.com/>), type a '[{' key and an 'A' key on a Canadian-French keyboard, and see a Latin character "U+00E2" is displayed in the <input> form.
TEST=Open a web page which contains an <input> form (e.g. <http://www.google.com/>), enable an Chinese Pinyin IME, type a 'W' key, type an 'O' key, and see a Chinese character is displayed in the <input> form.
TEST=Open a web page which contains a <textarea> form, type a return key, and see a new line is inserted.
Review URL: http://codereview.chromium.org/150206
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/native_web_keyboard_event.h')
-rw-r--r-- | chrome/common/native_web_keyboard_event.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/common/native_web_keyboard_event.h b/chrome/common/native_web_keyboard_event.h index 021d061..87f5a90 100644 --- a/chrome/common/native_web_keyboard_event.h +++ b/chrome/common/native_web_keyboard_event.h @@ -29,6 +29,9 @@ struct NativeWebKeyboardEvent : public WebKit::WebKeyboardEvent { NativeWebKeyboardEvent(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); #elif defined(OS_MACOSX) explicit NativeWebKeyboardEvent(NSEvent *event); + NativeWebKeyboardEvent(wchar_t character, + int state, + double time_stamp_seconds); #elif defined(OS_LINUX) explicit NativeWebKeyboardEvent(const GdkEventKey* event); NativeWebKeyboardEvent(wchar_t character, |