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

Issue 22865036: Add support for reposting the ET_GESTURE_TAP_DOWN gesture event to the RootWindow and in the (Closed)

Created:
7 years, 4 months ago by ananta
Modified:
7 years, 4 months ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, tfarina, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Add support for reposting the ET_GESTURE_TAP_DOWN gesture event to the RootWindow and in the corresponding function in the MenuController class. This is on the same lines as posting the mouse down messages when we are exiting a menu loop. In this case the user touches outside the menu bounds and the menu should abort while reposting the gesture to the concerned window. The other change is to process touch events in the HWNDMessageHandler class asynchronously as we don't receive touch events if a modal loop is entered in the context of a touch message. Appears to be a bug in Windows. BUG=277018 R=sky@chromium.org TBR=sadrul TEST=RepostTapdownGestureTest Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219190

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -16 lines) Patch
M ui/aura/root_window.h View 1 2 2 chunks +6 lines, -0 lines 1 comment Download
M ui/aura/root_window.cc View 1 2 4 chunks +38 lines, -9 lines 2 comments Download
M ui/aura/root_window_unittest.cc View 1 chunk +26 lines, -0 lines 1 comment Download
M ui/base/events/event.h View 2 chunks +4 lines, -2 lines 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M ui/views/win/hwnd_message_handler.h View 1 2 4 chunks +11 lines, -0 lines 0 comments Download
M ui/views/win/hwnd_message_handler.cc View 1 2 5 chunks +23 lines, -5 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
ananta
7 years, 4 months ago (2013-08-22 21:48:14 UTC) #1
sky
+sadrul as he knows more about touch than I. https://codereview.chromium.org/22865036/diff/6001/ui/aura/root_window.cc File ui/aura/root_window.cc (right): https://codereview.chromium.org/22865036/diff/6001/ui/aura/root_window.cc#newcode219 ui/aura/root_window.cc:219: ...
7 years, 4 months ago (2013-08-22 22:07:16 UTC) #2
ananta
https://codereview.chromium.org/22865036/diff/6001/ui/aura/root_window.cc File ui/aura/root_window.cc (right): https://codereview.chromium.org/22865036/diff/6001/ui/aura/root_window.cc#newcode219 ui/aura/root_window.cc:219: if (event.type() != ui::ET_MOUSE_PRESSED && On 2013/08/22 22:07:16, sky ...
7 years, 4 months ago (2013-08-22 22:48:15 UTC) #3
sky
LGTM
7 years, 4 months ago (2013-08-22 23:28:29 UTC) #4
ananta
TBR'ing sadrul. Will address comments in a followup.
7 years, 4 months ago (2013-08-23 02:22:37 UTC) #5
ananta
Committed patchset #5 manually as r219190 (presubmit successful).
7 years, 4 months ago (2013-08-23 02:23:18 UTC) #6
sadrul
7 years, 4 months ago (2013-08-23 03:16:02 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/22865036/diff/38001/ui/aura/root_window.cc
File ui/aura/root_window.cc (right):

https://codereview.chromium.org/22865036/diff/38001/ui/aura/root_window.cc#ne...
ui/aura/root_window.cc:232: held_repostable_event_.reset(new ui::GestureEvent(
Can you use 'new ui::GestureEvent(event, event.target(), this)' here? That would
be more like the code above used for MouseEvent (and it wouldn't be necessary to
expose GestureEvent::touch_ids_bitfield())

https://codereview.chromium.org/22865036/diff/38001/ui/aura/root_window.cc#ne...
ui/aura/root_window.cc:1038: Window* new_consumer =
GetEventHandlerForPoint(event->root_location());
This code should dispatch a GESTURE_BEGIN event before the TAP_DOWN, because
some code may depend on that behaviour.

https://codereview.chromium.org/22865036/diff/38001/ui/aura/root_window.h
File ui/aura/root_window.h (right):

https://codereview.chromium.org/22865036/diff/38001/ui/aura/root_window.h#new...
ui/aura/root_window.h:405: bool DispatchGestureEventRepost(ui::GestureEvent*
event);
I would move this up, just below DispatchTouchEventImpl()

https://codereview.chromium.org/22865036/diff/38001/ui/aura/root_window_unitt...
File ui/aura/root_window_unittest.cc (right):

https://codereview.chromium.org/22865036/diff/38001/ui/aura/root_window_unitt...
ui/aura/root_window_unittest.cc:908: filter->events().clear();
An interesting test would be to generate a Tap, or a Scroll gesture using
EventGenerator, in a way that the Window that receives the TAP_DOWN does a
repost. The test would verify that after TAP_DOWN is reposted, the rest of the
events (i.e. TAP, or SCROLL_BEGIN etc.) go to the new target.

Powered by Google App Engine
This is Rietveld 408576698