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

Unified Diff: mojo/services/html_viewer/blink_input_events_type_converters.cc

Issue 476283006: mojo: Fix double character inserts on Windows by removing a Linux hack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move input method to its own file. Created 6 years, 4 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 | « mojo/mojo_services.gypi ('k') | mojo/services/native_viewport/platform_viewport_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/blink_input_events_type_converters.cc
diff --git a/mojo/services/html_viewer/blink_input_events_type_converters.cc b/mojo/services/html_viewer/blink_input_events_type_converters.cc
index 4b2a0a1a641a9a6d7ba240528acd38083dacecfa..2e15c0d72b7929cc332ad668f6265e152aabe850 100644
--- a/mojo/services/html_viewer/blink_input_events_type_converters.cc
+++ b/mojo/services/html_viewer/blink_input_events_type_converters.cc
@@ -118,15 +118,9 @@ scoped_ptr<blink::WebInputEvent> BuildWebKeyboardEvent(
web_event->timeStampSeconds =
base::TimeDelta::FromInternalValue(event->time_stamp).InSecondsF();
- // TODO(erg): This derivation of is_char is a bad hack, and exists because
- // the platform doesn't seem to be sending character events to us.
- bool is_char =
- event->key_data->is_char ||
- (event->key_data->key_code >= 32 && event->key_data->key_code < 127);
-
switch (event->action) {
case EVENT_TYPE_KEY_PRESSED:
- web_event->type = is_char ? blink::WebInputEvent::Char :
+ web_event->type = event->key_data->is_char ? blink::WebInputEvent::Char :
blink::WebInputEvent::RawKeyDown;
break;
case EVENT_TYPE_KEY_RELEASED:
« no previous file with comments | « mojo/mojo_services.gypi ('k') | mojo/services/native_viewport/platform_viewport_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698