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

Issue 2655303004: Add id properties to PointerEvent (Closed)

Created:
3 years, 11 months ago by lanwei
Modified:
3 years, 9 months ago
CC:
chromium-reviews, kalyank, dtapuska+chromiumwatch_chromium.org, tdresser+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add id properties to PointerEvent We add id to PointerDetails which will be used as PointerEvent's pointerId, so we can use it to keep the id from lower level events from each OS. In this patch, we also remove touch_id from ui::TouchEvent and pointer_id from ui::PointerEvent, which are redundant to this new id. BUG=685817 Review-Url: https://codereview.chromium.org/2655303004 Cr-Commit-Position: refs/heads/master@{#450807} Committed: https://chromium.googlesource.com/chromium/src/+/31739e48ae970cbc39e8b8cceb168ca86848150a

Patch Set 1 : pointer id #

Patch Set 2 : change id type to uint32_t #

Total comments: 4

Patch Set 3 : Add todo to remove touch id #

Patch Set 4 : pointer id #

Total comments: 8

Patch Set 5 : pointer id #

Patch Set 6 : pointer id #

Total comments: 10

Patch Set 7 : pointer id #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -161 lines) Patch
M ash/host/ash_window_tree_host_x11_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ash/touch/touch_hud_debug.cc View 1 2 3 4 3 chunks +6 lines, -6 lines 0 comments Download
M ash/touch/touch_uma.cc View 1 2 3 4 5 6 3 chunks +17 lines, -16 lines 0 comments Download
M ash/touch_hud/touch_hud_renderer.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M components/exo/touch.cc View 1 2 3 4 5 6 5 chunks +13 lines, -14 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_event_handler.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M content/common/input/synthetic_web_input_event_builders.cc View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M mash/simple_wm/move_loop.cc View 1 2 3 4 5 chunks +4 lines, -7 lines 0 comments Download
M services/ui/ws/drag_controller.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M services/ui/ws/event_dispatcher.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M services/ui/ws/event_dispatcher_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M services/ui/ws/window_manager_state.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M ui/aura/env_input_state_controller.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M ui/aura/gestures/gesture_recognizer_unittest.cc View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download
M ui/chromeos/touch_accessibility_enabler.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/chromeos/touch_exploration_controller.cc View 1 2 3 17 chunks +34 lines, -27 lines 0 comments Download
M ui/chromeos/touch_exploration_controller_unittest.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M ui/events/blink/web_input_event.cc View 1 chunk +1 line, -0 lines 0 comments Download
M ui/events/blink/web_input_event_builders_win.cc View 1 2 3 4 1 chunk +1 line, -1 line 1 comment Download
M ui/events/blink/web_input_event_unittest.cc View 2 chunks +3 lines, -1 line 0 comments Download
M ui/events/event.h View 1 2 3 4 5 6 8 chunks +16 lines, -29 lines 0 comments Download
M ui/events/event.cc View 1 2 3 4 5 6 11 chunks +73 lines, -12 lines 1 comment Download
M ui/events/event_unittest.cc View 1 2 3 4 5 4 chunks +9 lines, -5 lines 0 comments Download
M ui/events/events_default.cc View 1 2 3 4 5 6 2 chunks +5 lines, -2 lines 0 comments Download
M ui/events/gestures/gesture_recognizer_impl.cc View 1 2 3 3 chunks +5 lines, -4 lines 0 comments Download
M ui/events/gestures/motion_event_aura.cc View 1 2 3 6 chunks +6 lines, -6 lines 0 comments Download
M ui/events/gestures/motion_event_aura_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/events/mojo/event_struct_traits.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/events/mojo/struct_traits_unittest.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M ui/events/ozone/evdev/event_factory_evdev.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M ui/events/test/event_generator.cc View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M ui/events/x/events_x.cc View 1 2 3 4 1 chunk +3 lines, -1 line 1 comment Download

Messages

Total messages: 190 (163 generated)
lanwei
3 years, 10 months ago (2017-01-27 15:43:19 UTC) #18
dtapuska
On 2017/01/27 15:43:19, lanwei wrote: Pointer Ids are unsigned. Does it really make sense for ...
3 years, 10 months ago (2017-01-27 15:50:01 UTC) #19
lanwei
On 2017/01/27 15:50:01, dtapuska wrote: > On 2017/01/27 15:43:19, lanwei wrote: > > Pointer Ids ...
3 years, 10 months ago (2017-01-27 16:12:22 UTC) #20
mustaq
On 2017/01/27 16:12:22, lanwei wrote: > On 2017/01/27 15:50:01, dtapuska wrote: > > On 2017/01/27 ...
3 years, 10 months ago (2017-01-27 17:00:38 UTC) #21
lanwei
3 years, 10 months ago (2017-01-30 16:45:15 UTC) #31
mustaq
https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h#newcode465 ui/events/event.h:465: uint32_t id = 0; Where do we set the ...
3 years, 10 months ago (2017-01-31 00:24:13 UTC) #32
dtapuska
On 2017/01/31 00:24:13, mustaq wrote: > https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h > File ui/events/event.h (right): > > https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h#newcode465 > ...
3 years, 10 months ago (2017-01-31 00:25:35 UTC) #33
dtapuska
lgtm
3 years, 10 months ago (2017-01-31 00:26:58 UTC) #34
lanwei
On 2017/01/31 00:25:35, dtapuska wrote: > On 2017/01/31 00:24:13, mustaq wrote: > > https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h > ...
3 years, 10 months ago (2017-01-31 02:31:55 UTC) #35
mustaq
lgtm
3 years, 10 months ago (2017-01-31 15:46:34 UTC) #36
lanwei
sadrul@chromium.org: Please review changes in ui/, thank you
3 years, 10 months ago (2017-01-31 16:43:34 UTC) #40
sadrul
https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h#newcode466 ui/events/event.h:466: ui::TouchEvent has a touch_id(), and a unique_event_id(). It also ...
3 years, 10 months ago (2017-01-31 17:05:13 UTC) #41
lanwei
https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h#newcode466 ui/events/event.h:466: On 2017/01/31 17:05:13, sadrul wrote: > ui::TouchEvent has a ...
3 years, 10 months ago (2017-02-01 02:58:12 UTC) #42
sadrul
https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h File ui/events/event.h (right): https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h#newcode466 ui/events/event.h:466: On 2017/02/01 02:58:12, lanwei wrote: > On 2017/01/31 17:05:13, ...
3 years, 10 months ago (2017-02-01 20:59:39 UTC) #43
lanwei
On 2017/02/01 20:59:39, sadrul wrote: > https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h > File ui/events/event.h (right): > > https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h#newcode466 > ...
3 years, 10 months ago (2017-02-02 17:44:44 UTC) #46
sadrul
On 2017/02/02 17:44:44, lanwei wrote: > On 2017/02/01 20:59:39, sadrul wrote: > > https://codereview.chromium.org/2655303004/diff/80001/ui/events/event.h > ...
3 years, 10 months ago (2017-02-02 17:46:34 UTC) #47
lanwei
Sadrul, could you please take another look, I removed the touch_id and pointer_id, thank you?
3 years, 10 months ago (2017-02-05 20:47:55 UTC) #99
sadrul
Can you update the CL description? Is there a reason to prefer uint32_t instead of ...
3 years, 10 months ago (2017-02-07 05:40:42 UTC) #100
lanwei
https://codereview.chromium.org/2655303004/diff/280001/mash/simple_wm/move_loop.cc File mash/simple_wm/move_loop.cc (right): https://codereview.chromium.org/2655303004/diff/280001/mash/simple_wm/move_loop.cc#newcode104 mash/simple_wm/move_loop.cc:104: // GetWindowUserSetBounds(target)), On 2017/02/07 05:40:41, sadrul wrote: > Since ...
3 years, 10 months ago (2017-02-10 20:54:38 UTC) #157
sadrul
Some more nits. lgtm with those addressed. Looks like GetTouchId() can be removed now, so ...
3 years, 10 months ago (2017-02-13 16:47:43 UTC) #164
sadrul
Also, this sets the id on all platforms. So please update the CL description accordingly.
3 years, 10 months ago (2017-02-13 16:48:21 UTC) #165
lanwei
brettw@ could you please take a look at files in ash/ , mash/, services/, dcheng@ ...
3 years, 10 months ago (2017-02-13 21:50:29 UTC) #175
dcheng
ipc lgtm
3 years, 10 months ago (2017-02-13 23:15:56 UTC) #178
brettw
LGTM for mechanical changes in ash, mash, and services.
3 years, 10 months ago (2017-02-15 18:13:37 UTC) #179
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/2655303004/630001
3 years, 10 months ago (2017-02-15 20:04:39 UTC) #186
commit-bot: I haz the power
Committed patchset #7 (id:630001) as https://chromium.googlesource.com/chromium/src/+/31739e48ae970cbc39e8b8cceb168ca86848150a
3 years, 10 months ago (2017-02-15 21:30:47 UTC) #189
mustaq
3 years, 9 months ago (2017-02-27 16:02:27 UTC) #190
Message was sent while issue was closed.
Re the pinch-zoom on CrOS (crbug.com/695905): TouchEvent(NativeEvent&) seems to
skip the id (plus a few drive-by comments)...

https://codereview.chromium.org/2655303004/diff/630001/ui/events/blink/web_in...
File ui/events/blink/web_input_event_builders_win.cc (right):

https://codereview.chromium.org/2655303004/diff/630001/ui/events/blink/web_in...
ui/events/blink/web_input_event_builders_win.cc:170: result.id =
ui::PointerEvent::kMousePointerId;
Are we sure that stylus events are not going through this? Hardcoded ids could
cause problems with stylus ids, even after we migrate to WM_POINTER events
because legacy systems could still pass stylus events as WM_MOUSE events.

https://codereview.chromium.org/2655303004/diff/630001/ui/events/event.cc
File ui/events/event.cc (right):

https://codereview.chromium.org/2655303004/diff/630001/ui/events/event.cc#new...
ui/events/event.cc:832: : LocatedEvent(native_event),
I think the bug with pinch-zoom on CrOS (crbug.com/695905) is caused by this
particular constructor: we are not using the value GetTouchId(native_event) now.
Please update this, ideally GetTouchPointerDetailsFromNative() should pull the
native id.

https://codereview.chromium.org/2655303004/diff/630001/ui/events/x/events_x.cc
File ui/events/x/events_x.cc (right):

https://codereview.chromium.org/2655303004/diff/630001/ui/events/x/events_x.c...
ui/events/x/events_x.cc:165: /* twist */ 0,
GetTouchIdFromXEvent(*native_event));
Nit: odd formatting.

Powered by Google App Engine
This is Rietveld 408576698