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

Issue 551373006: Re-enable Eager Gesture Recognition on Aura (Closed)

Created:
6 years, 3 months ago by tdresser
Modified:
6 years, 1 month ago
Reviewers:
jdduke (slow), sadrul
CC:
chromium-reviews, creis+watch_chromium.org, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, ben+aura_chromium.org, nasko+codewatch_chromium.org, jam, penghuang+watch_chromium.org, sadrul, sievers+watch_chromium.org, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, tdresser+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Closed - replaced by https://codereview.chromium.org/680413006 Re-enable Eager Gesture Recognition on Aura This enables eager gesture recognition on Aura for the unified gesture detector. The previous attempt at enabling eager gesture recognition (crrev.com/393953012) failed. See crbug.com/408594 for details. BUG=332418 TEST=GestureRecognizerTest.{*,EagerGestureDetection}

Patch Set 1 #

Patch Set 2 : Rebase. #

Patch Set 3 : Fix tests. #

Patch Set 4 : Whitespace. #

Total comments: 6

Patch Set 5 : Address jdduke's comments. #

Total comments: 11

Patch Set 6 : Address sadrul's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -95 lines) Patch
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 3 chunks +13 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura_browsertest.cc View 1 1 chunk +1 line, -3 lines 0 comments Download
M ui/aura/gestures/gesture_recognizer_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M ui/aura/window_event_dispatcher.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/window_event_dispatcher.cc View 1 2 3 4 5 3 chunks +24 lines, -26 lines 0 comments Download
M ui/aura/window_event_dispatcher_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M ui/events/gestures/gesture_recognizer.h View 1 2 3 4 5 1 chunk +4 lines, -10 lines 0 comments Download
M ui/events/gestures/gesture_recognizer_impl.h View 1 2 3 4 1 chunk +6 lines, -12 lines 0 comments Download
M ui/events/gestures/gesture_recognizer_impl.cc View 1 2 chunks +4 lines, -17 lines 0 comments Download
M ui/events/gestures/gesture_recognizer_impl_mac.cc View 1 1 chunk +8 lines, -12 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
tdresser
On 2014/10/22 14:15:11, tdresser wrote: > mailto:tdresser@chromium.org changed reviewers: > + mailto:jdduke@chromium.org I've done thorough ...
6 years, 2 months ago (2014-10-22 14:18:53 UTC) #2
tdresser
On 2014/10/22 14:18:53, tdresser wrote: > On 2014/10/22 14:15:11, tdresser wrote: > > mailto:tdresser@chromium.org changed ...
6 years, 2 months ago (2014-10-22 17:45:00 UTC) #3
jdduke (slow)
The window_event_dispatcher.cc is a bit outside my domain, but the rest seems reasonable. Will sadrul@ ...
6 years, 2 months ago (2014-10-22 17:51:02 UTC) #4
tdresser
He's back! sadrul@, can you take a look at ui/aura content (I know you aren't ...
6 years, 2 months ago (2014-10-22 18:24:08 UTC) #6
sadrul
https://codereview.chromium.org/551373006/diff/80001/ui/aura/window_event_dispatcher.cc File ui/aura/window_event_dispatcher.cc (right): https://codereview.chromium.org/551373006/diff/80001/ui/aura/window_event_dispatcher.cc#newcode163 ui/aura/window_event_dispatcher.cc:163: // pass an event here. Is this comment still ...
6 years, 2 months ago (2014-10-23 15:56:34 UTC) #7
tdresser
https://codereview.chromium.org/551373006/diff/80001/ui/aura/window_event_dispatcher.cc File ui/aura/window_event_dispatcher.cc (right): https://codereview.chromium.org/551373006/diff/80001/ui/aura/window_event_dispatcher.cc#newcode163 ui/aura/window_event_dispatcher.cc:163: // pass an event here. On 2014/10/23 15:56:34, sadrul ...
6 years, 1 month ago (2014-10-27 15:52:32 UTC) #8
tdresser
On 2014/10/27 15:52:32, tdresser wrote: > https://codereview.chromium.org/551373006/diff/80001/ui/aura/window_event_dispatcher.cc > File ui/aura/window_event_dispatcher.cc (right): > > https://codereview.chromium.org/551373006/diff/80001/ui/aura/window_event_dispatcher.cc#newcode163 > ...
6 years, 1 month ago (2014-10-29 14:57:09 UTC) #10
sadrul
6 years, 1 month ago (2014-10-29 19:35:00 UTC) #11
https://codereview.chromium.org/551373006/diff/80001/ui/aura/window_event_dis...
File ui/aura/window_event_dispatcher.cc (right):

https://codereview.chromium.org/551373006/diff/80001/ui/aura/window_event_dis...
ui/aura/window_event_dispatcher.cc:505: orig_event,
static_cast<Window*>(target))) {
On 2014/10/27 15:52:31, tdresser wrote:
> On 2014/10/23 15:56:34, sadrul wrote:
> > As the TODO you are removing mentions, shouldn't this move to PreDispatch
> phase?
> 
> I previously thought that was the correct path forward, but it turned out to
be
> trickier than I anticipated. The hard part is ensuring that every event passed
> to ProcessTouchEvent is also passed to ProcessTouchEventAck. The best way to
do
> that is to put both in PostDispatchEvent for the synchronous case, which has
the
> somewhat unfortunate side effect of giving more responsibility to the
> RenderWidgetHostViewAura.
> 
> I think this is the best approach though.

I thought one of the major points of eager GR was to do the gesture-recognition
before the touch-event is processed (i.e. dispatched). So it's odd that we are
doing this after the touch event has already been processed.

It looks like we always call GR::ProcessTouchEvent() during/after dispatch, and
then either immediately call GR::ProcessTouchEventAck(), or call it
asynchronously. Is this right? If so, can we do:

  WED receives touch event:
    GR::ProcessTouchEvent
    if continue:
      dispatch touch event
      if touch-event ER_CONSUMED: do nothing for now.
      otherwise, GR::ProcessTouchEventAck.


The RWHVA can then call into WED::ProcessedTouchEvent() when it receives the
ack, and we won't need WED::OnProcessingTouchEventAsync(). Would that work?

Powered by Google App Engine
This is Rietveld 408576698