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

Issue 2206053002: Use KeyDown instead of RawKeyDown for Android key events. (Closed)

Created:
4 years, 4 months ago by aelias_OOO_until_Jul13
Modified:
4 years, 4 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, yabinh
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use KeyDown instead of RawKeyDown for Android key events. Blink supports two alternate ways of receiving key events, it can either receive a RawKeyDown IPC followed by a Char IPC (mapping to keydown and keypress JS events, respectively), or alternatively a single KeyDown IPC can be sent, which generates both JS events on the renderer side. The latter is a better mapping for the Android event model, allowing us to avoid using "skip_in_browser". This also fixes a timestamp unit conversion bug for keydown JS events (timestamps were 1000 times too high). This does not yet fix http://crbug.com/538377 about the InputEventConsistencyVerifier being unhappy with how textboxes handle KeyDowns but not KeyUps, but I added a (pre-disabled) test that should be useful to verify that behavior in the future. BUG=538377 Committed: https://crrev.com/1cd6848f54fbac5b6cda5cc947938e335d227954 Cr-Commit-Position: refs/heads/master@{#413491}

Patch Set 1 #

Patch Set 2 : Add test from issue 1378583003 #

Total comments: 3

Patch Set 3 : Fix action enum for failing tests #

Patch Set 4 : Address nits and fix all except alt-left test case #

Total comments: 1

Patch Set 5 : Remove alt-left test case and rename assert method #

Total comments: 8

Patch Set 6 : Code review comments and disable test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -116 lines) Patch
A android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java View 1 2 3 4 5 1 chunk +156 lines, -0 lines 0 comments Download
M android_webview/test/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.h View 1 2 3 4 5 1 chunk +2 lines, -12 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.cc View 1 2 3 4 5 3 chunks +9 lines, -45 lines 0 comments Download
M content/browser/renderer_host/native_web_keyboard_event_android.cc View 1 2 3 4 5 3 chunks +8 lines, -26 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java View 1 2 3 4 5 7 chunks +23 lines, -25 lines 0 comments Download
M content/public/browser/native_web_keyboard_event.h View 1 2 3 4 5 1 chunk +1 line, -8 lines 0 comments Download

Messages

Total messages: 41 (27 generated)
aelias_OOO_until_Jul13
Hi changwan@, PTAL.
4 years, 4 months ago (2016-08-02 23:37:46 UTC) #7
Changwan Ryu
Awesome! just some nits https://codereview.chromium.org/2206053002/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java (right): https://codereview.chromium.org/2206053002/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java#newcode1 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java:1: // Copyright 2015 The Chromium ...
4 years, 4 months ago (2016-08-02 23:57:10 UTC) #9
Changwan Ryu
lgtm assuming nits will be fixed
4 years, 4 months ago (2016-08-03 05:58:50 UTC) #15
aelias_OOO_until_Jul13
Hi changwan@, after getting your test file compiling, the test-case for alt-left is failing (commented ...
4 years, 4 months ago (2016-08-04 03:44:22 UTC) #18
Changwan Ryu
On 2016/08/04 03:44:22, aelias wrote: > Hi changwan@, after getting your test file compiling, the ...
4 years, 4 months ago (2016-08-08 00:12:37 UTC) #21
Changwan Ryu
https://codereview.chromium.org/2206053002/diff/60001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java (right): https://codereview.chromium.org/2206053002/diff/60001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java#newcode144 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java:144: private void assertDownAndUpKeyEventList(final int code) throws Throwable { nit: ...
4 years, 4 months ago (2016-08-08 00:12:50 UTC) #22
aelias_OOO_until_Jul13
Done, adding OWNERS: - sievers@ for content/public/ deletion - boliu@ for new test file in ...
4 years, 4 months ago (2016-08-08 22:08:38 UTC) #24
boliu
content change but test in webview? :| https://codereview.chromium.org/2206053002/diff/80001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java (right): https://codereview.chromium.org/2206053002/diff/80001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java#newcode67 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java:67: assertNoUnhandledKeyEvent(); it's ...
4 years, 4 months ago (2016-08-08 22:41:51 UTC) #27
no sievers
content lgtm https://codereview.chromium.org/2206053002/diff/80001/content/browser/renderer_host/native_web_keyboard_event_android.cc File content/browser/renderer_host/native_web_keyboard_event_android.cc (right): https://codereview.chromium.org/2206053002/diff/80001/content/browser/renderer_host/native_web_keyboard_event_android.cc#newcode51 content/browser/renderer_host/native_web_keyboard_event_android.cc:51: os_event(NULL), nit: nullptr here and elsewhere, while ...
4 years, 4 months ago (2016-08-08 23:08:51 UTC) #28
aelias_OOO_until_Jul13
Hi boliu@, PTAL at the latest changes to the test file. https://codereview.chromium.org/2206053002/diff/80001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientOnUnhandledKeyEventTest.java (right): ...
4 years, 4 months ago (2016-08-20 01:53:06 UTC) #32
boliu
lgtm
4 years, 4 months ago (2016-08-20 21:04:27 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2206053002/100001
4 years, 4 months ago (2016-08-22 17:34:52 UTC) #38
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-22 18:55:14 UTC) #39
commit-bot: I haz the power
4 years, 4 months ago (2016-08-22 19:01:31 UTC) #41
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/1cd6848f54fbac5b6cda5cc947938e335d227954
Cr-Commit-Position: refs/heads/master@{#413491}

Powered by Google App Engine
This is Rietveld 408576698