diff options
author | ananta <ananta@chromium.org> | 2014-09-08 22:45:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-09 05:47:31 +0000 |
commit | 79359cecd0ce534e356e3380a4d7e4dc4a29e07b (patch) | |
tree | 8859f5e98e802aae1dbf640d3d9c64f810835f7c | |
parent | a3e727222442a84542c508bf9b436691a217e08d (diff) | |
download | chromium_src-79359cecd0ce534e356e3380a4d7e4dc4a29e07b.zip chromium_src-79359cecd0ce534e356e3380a4d7e4dc4a29e07b.tar.gz chromium_src-79359cecd0ce534e356e3380a4d7e4dc4a29e07b.tar.bz2 |
Fix a crash which occurs while translating the windows message WM_DEADCHAR to our events format.
The crash occurs because the EventTypeFromNative helper function on windows does not handle this
message and returns ET_UNKNOWN as the type leading to a CHECK later on. The WM_DEADCHAR message
is posted while translating certain character sequences in the context of WM_KEYUP.
Fix is to return the type for WM_DEADCHAR as ET_KEY_RELEASED.
BUG=411811
Review URL: https://codereview.chromium.org/551863003
Cr-Commit-Position: refs/heads/master@{#293859}
-rw-r--r-- | ui/events/win/events_win.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/events/win/events_win.cc b/ui/events/win/events_win.cc index a1c512e..9f6b8f0 100644 --- a/ui/events/win/events_win.cc +++ b/ui/events/win/events_win.cc @@ -151,6 +151,10 @@ EventType EventTypeFromNative(const base::NativeEvent& native_event) { case WM_SYSKEYDOWN: case WM_CHAR: return ET_KEY_PRESSED; + // The WM_DEADCHAR message is posted to the window with the keyboard focus + // when a WM_KEYUP message is translated. This happens for special keyboard + // sequences. + case WM_DEADCHAR: case WM_KEYUP: case WM_SYSKEYUP: return ET_KEY_RELEASED; |