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

Issue 2054193002: Android mouse events shouldn't appear as TouchEvents (Closed)

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

Description

Android mouse events shouldn't appear as TouchEvents Android low-level mouse events in Chrome used to follow the "default" MotionEvent path which is designed for touches. In particular in Blink, mouse events appeared as PlatformTouchEvents which had some bad side-effects: A. TouchEvents were fired for mouse. B. Mouse events were suppressed through prevent-defaulting touch events. C. Mouse event suppression thru canceled touches apply only to non-hovering mouse. This CL fixes the mouse issues by routing Android mouse events through a dedicated Web/PlatformMouseEvent path. The stylus properties are also plumbed, to make Android stylus support easier (follow-up CL). Design doc: https://docs.google.com/document/d/1mpBR7J7kgTXvp0QACVjhxtwNJ7bgGoTMmxfxN2dupGg/edit?usp=sharing BUG=468806, 587550 Committed: https://crrev.com/5b679e43949bc52452422b453e81fb8e48d0594f Cr-Commit-Position: refs/heads/master@{#431571}

Patch Set 1 #

Patch Set 2 : WIP: Added Android ME plumbing. #

Patch Set 3 : Added button-changed-state #

Patch Set 4 : Working hacky patch, includes pen hack. #

Patch Set 5 : Added working mouse buttons. #

Total comments: 2

Patch Set 6 : Added meta_state plumbing. #

Total comments: 13

Patch Set 7 : Added enter/exit event plumbing. Rebased. #

Patch Set 8 : Added hover_move enums, skipped ME firing for them enter/leave. #

Patch Set 9 : Moved button state to render_widget_host_view_android. Rebased. #

Patch Set 10 : Added ACTION_BUTTON* plumbing, removed button state from rwhv. #

Patch Set 11 : Added ACTION_BUTTON* plumbing, removed button state from rwhv. #

Patch Set 12 : Fixed compile failures. #

Patch Set 13 : Kept old touch-like behavior in pre-M. #

Total comments: 18

Patch Set 14 : Addressed comments. #

Patch Set 15 : Unconditional call to getActionButton #

Patch Set 16 : Fixed a test, etc. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+396 lines, -126 lines) Patch
M blimp/client/app/android/blimp_view.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M blimp/client/core/contents/android/blimp_view.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -6 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +39 lines, -10 lines 0 comments Download
M content/browser/renderer_host/input/stylus_text_selector.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/input/web_input_event_builders_android.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/renderer_host/input/web_input_event_builders_android.cc View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -15 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 2 chunks +21 lines, -2 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +72 lines, -16 lines 0 comments Download
M ui/events/android/motion_event_android.h View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M ui/events/android/motion_event_android.cc View 1 2 3 4 5 6 7 8 9 5 chunks +38 lines, -10 lines 0 comments Download
M ui/events/android/motion_event_android_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10 chunks +13 lines, -16 lines 0 comments Download
M ui/events/blink/blink_event_util.h View 1 2 3 4 5 6 1 chunk +10 lines, -2 lines 0 comments Download
M ui/events/blink/blink_event_util.cc View 1 2 3 4 5 6 7 8 9 7 chunks +114 lines, -40 lines 0 comments Download
M ui/events/gesture_detection/gesture_detector.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M ui/events/gesture_detection/gesture_event_data_packet.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M ui/events/gesture_detection/gesture_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +20 lines, -0 lines 0 comments Download
M ui/events/gesture_detection/motion_event.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 64 (26 generated)
mustaq
ptal
4 years, 3 months ago (2016-09-20 19:51:41 UTC) #8
dtapuska
https://codereview.chromium.org/2054193002/diff/100001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (left): https://codereview.chromium.org/2054193002/diff/100001/content/browser/android/content_view_core_impl.cc#oldcode978 content/browser/android/content_view_core_impl.cc:978: const JavaParamRef<jobject>& obj, Can we pass const JavaParamRef<jobject>& motion_event, ...
4 years, 3 months ago (2016-09-20 20:56:16 UTC) #9
mustaq
aelias@chromium.org: ptal for early comments. I think it bypasses all TE generation. I am not ...
4 years, 3 months ago (2016-09-20 21:13:52 UTC) #11
mustaq
https://codereview.chromium.org/2054193002/diff/100001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (left): https://codereview.chromium.org/2054193002/diff/100001/content/browser/android/content_view_core_impl.cc#oldcode978 content/browser/android/content_view_core_impl.cc:978: const JavaParamRef<jobject>& obj, On 2016/09/20 20:56:16, dtapuska wrote: > ...
4 years, 3 months ago (2016-09-21 19:31:29 UTC) #12
dtapuska
On 2016/09/21 19:31:29, mustaq wrote: > https://codereview.chromium.org/2054193002/diff/100001/content/browser/android/content_view_core_impl.cc > File content/browser/android/content_view_core_impl.cc (left): > > https://codereview.chromium.org/2054193002/diff/100001/content/browser/android/content_view_core_impl.cc#oldcode978 > ...
4 years, 3 months ago (2016-09-21 19:40:56 UTC) #13
aelias_OOO_until_Jul13
The code structure seems OK at a glance, but my concerns around this are mainly ...
4 years, 3 months ago (2016-09-21 22:08:45 UTC) #14
mustaq
On 2016/09/21 22:08:45, aelias wrote: > The code structure seems OK at a glance, but ...
4 years, 3 months ago (2016-09-22 18:46:54 UTC) #15
mustaq
On 2016/09/22 18:46:54, mustaq wrote: > On 2016/09/21 22:08:45, aelias wrote: > > The code ...
4 years, 2 months ago (2016-10-20 14:13:20 UTC) #16
mustaq
On 2016/10/20 14:13:20, mustaq wrote: > On 2016/09/22 18:46:54, mustaq wrote: > > On 2016/09/21 ...
4 years, 2 months ago (2016-10-20 20:59:38 UTC) #17
aelias_OOO_until_Jul13
https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 content/browser/android/content_view_core_impl.cc:1024: // Ignore button state in MouseMove events: we have ...
4 years, 2 months ago (2016-10-20 23:26:29 UTC) #18
mustaq
https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 content/browser/android/content_view_core_impl.cc:1024: // Ignore button state in MouseMove events: we have ...
4 years, 2 months ago (2016-10-21 19:19:08 UTC) #19
aelias_OOO_until_Jul13
https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 content/browser/android/content_view_core_impl.cc:1024: // Ignore button state in MouseMove events: we have ...
4 years, 2 months ago (2016-10-21 21:26:54 UTC) #20
mustaq
ptal, had to skip hover exit/enter events... https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 content/browser/android/content_view_core_impl.cc:1024: // Ignore ...
4 years, 1 month ago (2016-10-26 17:45:09 UTC) #21
aelias_OOO_until_Jul13
https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 content/browser/android/content_view_core_impl.cc:1024: // Ignore button state in MouseMove events: we have ...
4 years, 1 month ago (2016-10-27 03:09:37 UTC) #22
mustaq
On 2016/10/27 03:09:37, aelias wrote: > https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc > File content/browser/android/content_view_core_impl.cc (right): > > https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 > ...
4 years, 1 month ago (2016-10-27 14:45:42 UTC) #23
aelias_OOO_until_Jul13
https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 content/browser/android/content_view_core_impl.cc:1024: // Ignore button state in MouseMove events: we have ...
4 years, 1 month ago (2016-10-27 18:27:57 UTC) #24
mustaq
On 2016/10/27 18:27:57, aelias wrote: > https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc > File content/browser/android/content_view_core_impl.cc (right): > > https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 > ...
4 years, 1 month ago (2016-10-27 20:05:19 UTC) #25
aelias_OOO_until_Jul13
https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 content/browser/android/content_view_core_impl.cc:1024: // Ignore button state in MouseMove events: we have ...
4 years, 1 month ago (2016-10-27 23:36:48 UTC) #26
mustaq
On 2016/10/27 23:36:48, aelias wrote: > https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc > File content/browser/android/content_view_core_impl.cc (right): > > https://codereview.chromium.org/2054193002/diff/120001/content/browser/android/content_view_core_impl.cc#newcode1024 > ...
4 years, 1 month ago (2016-10-28 16:58:36 UTC) #27
mustaq
ptal: - Moved the button state to render_widget_host_view_android. - Android codesearch didn't suggest anything about ...
4 years, 1 month ago (2016-11-07 20:46:05 UTC) #32
aelias_OOO_until_Jul13
OK, I looked into it a bit myself then. I'm not sure why you claimed ...
4 years, 1 month ago (2016-11-08 01:22:25 UTC) #33
mustaq
On 2016/11/08 01:22:25, aelias wrote: > OK, I looked into it a bit myself then. ...
4 years, 1 month ago (2016-11-08 15:16:19 UTC) #34
mustaq
ptal: this now works w/o any stored state, wohoo. Two caveats though: 1. The compiler ...
4 years, 1 month ago (2016-11-08 19:54:32 UTC) #35
mustaq
On 2016/11/08 19:54:32, mustaq wrote: > ptal: this now works w/o any stored state, wohoo. ...
4 years, 1 month ago (2016-11-08 21:08:30 UTC) #36
mustaq
On 2016/11/08 21:08:30, mustaq wrote: > On 2016/11/08 19:54:32, mustaq wrote: > > ptal: this ...
4 years, 1 month ago (2016-11-08 22:18:35 UTC) #37
aelias_OOO_until_Jul13
https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode1025 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:1025: // Pre-Andorid-L mouse button info is incomplete "Mouse button ...
4 years, 1 month ago (2016-11-09 02:43:14 UTC) #38
mustaq
https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode1025 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:1025: // Pre-Andorid-L mouse button info is incomplete On 2016/11/09 ...
4 years, 1 month ago (2016-11-09 17:04:33 UTC) #39
aelias_OOO_until_Jul13
https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode1054 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:1054: // The method getActionButton() is defined only for On ...
4 years, 1 month ago (2016-11-09 18:57:04 UTC) #42
mustaq
https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode1054 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:1054: // The method getActionButton() is defined only for On ...
4 years, 1 month ago (2016-11-09 19:55:59 UTC) #45
aelias_OOO_until_Jul13
lgtm modulo comment https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode1627 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:1627: // Work around Android bug where ...
4 years, 1 month ago (2016-11-09 20:08:51 UTC) #46
mustaq
Also fixed a constructor test. https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java File content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java (right): https://codereview.chromium.org/2054193002/diff/260001/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java#newcode1627 content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java:1627: // Work around Android ...
4 years, 1 month ago (2016-11-09 20:22:58 UTC) #47
mustaq
Need approval. dtrainor@chromium.org: Please review changes in blimp/client skyostil@chromium.org: Please review changes in content/browser/android
4 years, 1 month ago (2016-11-09 20:30:09 UTC) #49
David Trainor- moved to gerrit
blimp/client lgtm!
4 years, 1 month ago (2016-11-10 20:33:54 UTC) #55
dtapuska
lgtm
4 years, 1 month ago (2016-11-10 21:47:18 UTC) #56
Sami
content/browser/android/ lgtm.
4 years, 1 month ago (2016-11-11 14:16:28 UTC) #57
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/2054193002/320001
4 years, 1 month ago (2016-11-11 14:41:35 UTC) #60
commit-bot: I haz the power
Committed patchset #16 (id:320001)
4 years, 1 month ago (2016-11-11 16:14:37 UTC) #62
commit-bot: I haz the power
4 years, 1 month ago (2016-11-11 16:18:05 UTC) #64
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/5b679e43949bc52452422b453e81fb8e48d0594f
Cr-Commit-Position: refs/heads/master@{#431571}

Powered by Google App Engine
This is Rietveld 408576698