| Index: content/browser/renderer_host/web_input_event_aura.cc
|
| diff --git a/content/browser/renderer_host/web_input_event_aura.cc b/content/browser/renderer_host/web_input_event_aura.cc
|
| index b754b494c81b3ad730a3204b19753c6cfecba48e..a4cf12b0e51041a305be9a491011f1d83cef90e9 100644
|
| --- a/content/browser/renderer_host/web_input_event_aura.cc
|
| +++ b/content/browser/renderer_host/web_input_event_aura.cc
|
| @@ -15,52 +15,6 @@
|
|
|
| namespace content {
|
|
|
| -#if defined(USE_X11) || defined(USE_OZONE)
|
| -// From third_party/WebKit/Source/web/gtk/WebInputEventFactory.cpp:
|
| -blink::WebUChar GetControlCharacter(int windows_key_code, bool shift) {
|
| - if (windows_key_code >= ui::VKEY_A &&
|
| - windows_key_code <= ui::VKEY_Z) {
|
| - // ctrl-A ~ ctrl-Z map to \x01 ~ \x1A
|
| - return windows_key_code - ui::VKEY_A + 1;
|
| - }
|
| - if (shift) {
|
| - // following graphics chars require shift key to input.
|
| - switch (windows_key_code) {
|
| - // ctrl-@ maps to \x00 (Null byte)
|
| - case ui::VKEY_2:
|
| - return 0;
|
| - // ctrl-^ maps to \x1E (Record separator, Information separator two)
|
| - case ui::VKEY_6:
|
| - return 0x1E;
|
| - // ctrl-_ maps to \x1F (Unit separator, Information separator one)
|
| - case ui::VKEY_OEM_MINUS:
|
| - return 0x1F;
|
| - // Returns 0 for all other keys to avoid inputting unexpected chars.
|
| - default:
|
| - break;
|
| - }
|
| - } else {
|
| - switch (windows_key_code) {
|
| - // ctrl-[ maps to \x1B (Escape)
|
| - case ui::VKEY_OEM_4:
|
| - return 0x1B;
|
| - // ctrl-\ maps to \x1C (File separator, Information separator four)
|
| - case ui::VKEY_OEM_5:
|
| - return 0x1C;
|
| - // ctrl-] maps to \x1D (Group separator, Information separator three)
|
| - case ui::VKEY_OEM_6:
|
| - return 0x1D;
|
| - // ctrl-Enter maps to \x0A (Line feed)
|
| - case ui::VKEY_RETURN:
|
| - return 0x0A;
|
| - // Returns 0 for all other keys to avoid inputting unexpected chars.
|
| - default:
|
| - break;
|
| - }
|
| - }
|
| - return 0;
|
| -}
|
| -#endif
|
| #if defined(OS_WIN)
|
| blink::WebMouseEvent MakeUntranslatedWebMouseEventFromNativeEvent(
|
| const base::NativeEvent& native_event);
|
| @@ -110,10 +64,9 @@ blink::WebKeyboardEvent MakeWebKeyboardEventFromAuraEvent(
|
| ui::EventFlagsFromNative(native_event));
|
|
|
| if (webkit_event.modifiers & blink::WebInputEvent::ControlKey) {
|
| - webkit_event.text[0] =
|
| - GetControlCharacter(
|
| - webkit_event.windowsKeyCode,
|
| - webkit_event.modifiers & blink::WebInputEvent::ShiftKey);
|
| + webkit_event.text[0] = ui::GetControlCharacterForKeycode(
|
| + webkit_event.windowsKeyCode,
|
| + webkit_event.modifiers & blink::WebInputEvent::ShiftKey);
|
| } else {
|
| webkit_event.text[0] = webkit_event.unmodifiedText[0];
|
| }
|
|
|