Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(876)

Unified Diff: content/browser/renderer_host/input/web_input_event_builders_android.cc

Issue 1811553002: [Android] Synthetic composition event should have DomKey 'Unidentified' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Filter synthetic key event by checking |android_key_event| not null Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/input/web_input_event_builders_android_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/web_input_event_builders_android.cc
diff --git a/content/browser/renderer_host/input/web_input_event_builders_android.cc b/content/browser/renderer_host/input/web_input_event_builders_android.cc
index 6ccde311950b19cc20e0ecc771edcb6ff68ca0f5..c0ffc1b068390dd81b3aa1d67fcbf8c4fc405fef 100644
--- a/content/browser/renderer_host/input/web_input_event_builders_android.cc
+++ b/content/browser/renderer_host/input/web_input_event_builders_android.cc
@@ -45,6 +45,10 @@ ui::DomKey GetDomKeyFromEvent(
int keycode,
int modifiers,
int unicode_character) {
+ // Synthetic key event, not enough information to get DomKey.
+ if (android_key_event.is_null() && !unicode_character)
+ return ui::DomKey::UNIDENTIFIED;
chongz 2016/03/17 15:50:39 Sorry for the confusing logic... Will this look be
+
if (!unicode_character && env) {
// According to spec |kAllowedModifiers| should be Shift and AltGr, however
// Android doesn't have AltGr key and ImeAdapter::getModifiers won't pass it
« no previous file with comments | « no previous file | content/browser/renderer_host/input/web_input_event_builders_android_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698