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

Issue 2165043002: Don't create zero-velocity GestureFlingStarts. (Closed)

Created:
4 years, 5 months ago by wjmaclean
Modified:
4 years, 5 months ago
Reviewers:
Charlie Reis, nasko, spang
CC:
chromium-reviews, ozone-reviews_chromium.org, darin-cc_chromium.org, jam, kalyank, tdresser+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't create zero-velocity GestureFlingStarts. Currently trackpad initiated GestureFlingStarts on CrOS can have zero- velocity, but this causes crashes in the renderer. This CL converts these events to be GestureFlingCancels (just in case they are issued in the middle of ongoing fling). As it is hard to find the sources of such events after the fact, a DCHECK has been added to catch new pathways if they issue such events. BUG=627227 Committed: https://crrev.com/e80690ff28bf6db9392ab9b96a31105e1a6d4205 Cr-Commit-Position: refs/heads/master@{#406678}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -2 lines) Patch
M content/browser/renderer_host/render_widget_host_input_event_router.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc View 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 24 (11 generated)
wjmaclean
spang@ - does this look ok?
4 years, 5 months ago (2016-07-20 20:09:56 UTC) #6
spang
lgtm
4 years, 5 months ago (2016-07-20 20:26:59 UTC) #7
Charlie Reis
content/ LGTM. Did you want this to be a CHECK to catch it in the ...
4 years, 5 months ago (2016-07-20 21:25:47 UTC) #9
wjmaclean
On 2016/07/20 21:25:47, Charlie Reis (OOO til 7-20) wrote: > content/ LGTM. Did you want ...
4 years, 5 months ago (2016-07-20 21:28:50 UTC) #10
nasko
lgtm Lgtm
4 years, 5 months ago (2016-07-20 21:29:46 UTC) #11
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/2165043002/1
4 years, 5 months ago (2016-07-20 21:33:47 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-20 21:40:42 UTC) #17
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/e80690ff28bf6db9392ab9b96a31105e1a6d4205 Cr-Commit-Position: refs/heads/master@{#406678}
4 years, 5 months ago (2016-07-20 21:42:45 UTC) #19
khmel
On 2016/07/20 21:42:45, commit-bot: I haz the power wrote: > Patchset 1 (id:??) landed as ...
4 years, 5 months ago (2016-07-21 19:55:31 UTC) #20
wjmaclean
On 2016/07/21 19:55:31, khmel wrote: > On 2016/07/20 21:42:45, commit-bot: I haz the power wrote: ...
4 years, 5 months ago (2016-07-21 20:16:18 UTC) #21
spang
On 2016/07/21 20:16:18, wjmaclean wrote: > On 2016/07/21 19:55:31, khmel wrote: > > On 2016/07/20 ...
4 years, 5 months ago (2016-07-21 20:26:51 UTC) #22
wjmaclean
On 2016/07/21 20:26:51, spang wrote: > On 2016/07/21 20:16:18, wjmaclean wrote: > > On 2016/07/21 ...
4 years, 5 months ago (2016-07-21 20:40:41 UTC) #23
tdresser
4 years, 5 months ago (2016-07-21 20:45:29 UTC) #24
Message was sent while issue was closed.
On 2016/07/21 20:40:41, wjmaclean wrote:
> On 2016/07/21 20:26:51, spang wrote:
> > On 2016/07/21 20:16:18, wjmaclean wrote:
> > > On 2016/07/21 19:55:31, khmel wrote:
> > > > On 2016/07/20 21:42:45, commit-bot: I haz the power wrote:
> > > > > Patchset 1 (id:??) landed as
> > > > > https://crrev.com/e80690ff28bf6db9392ab9b96a31105e1a6d4205
> > > > > Cr-Commit-Position: refs/heads/master@{#406678}
> > > > 
> > > > I think we have to revert this CL. More details in the bug.
> > > 
> > > I'm ok with reverting this CL, but only if the hanging animation is
*worse*
> > than
> > > having the renderer possibly crash on every scroll. In my mind that's true
> if
> > > (1) two-finger navigation swiping is very common (I don't know, though I'd
> be
> > > surprised if it's more common than scrolling), and (2) if the resulting
hung
> > > animation leaves the user stuck, ie. they can't recover in some reasonable
> way
> > > like repeating the gesture.
> > > 
> > > Can you provide some more feedback?
> > 
> > Why is renderer crashing on zero velocity the right behavior? That really
> seems
> > like a poor choice to me. 
> > 
> > Floating point calculations are not exact and not-zero could still zero in
> some
> > innocent middle layer code.
> 
> The renderer code creates a standard curve with amplitude scaling ... in order
> to do the scaling it needs to invert the initial velocity.
> 
> So far as I know, the renderer never alters the velocity value, rather it just
> passes it along and then reads it when creating the curve, so I don't see much
> opportunity to have it go from non-zero to zero after it arrives in the
> renderer.
> 
> Ideally, and this has always been the case, is that for touch-screen based
> flings we just don't pass zero-velocity flings to the renderer. It seems also
> reasonable that we should try and do similar things for the touchpad as well.
> 
> Two-finger navigation swipe works for touchscreen as well, and to the best of
my
> knowledge we don't send zero-velocity flings there. And I cannot get the
> animation to hang for touchscreen with this change in place. (I've now been
able
> to reproduce the touchpad hang, but it's easily recovered by just putting the
> fingers down and finishing the swipe.) Why aren't the two the same?

I think the two are different because for touch we get events when the fingers
are lifted, but we don't for touchpad (or at least they aren't plumbed through
all the way).

Powered by Google App Engine
This is Rietveld 408576698