Chromium Code Reviews| Index: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc |
| diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc |
| index 3e8164ae9056ad09f76d197e17b4854489c70a14..dc1ec57f16682510f7fb3e01d65545b2cb6183c3 100644 |
| --- a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc |
| +++ b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc |
| @@ -333,16 +333,12 @@ void GestureInterpreterLibevdevCros::OnGestureFling(const Gesture* gesture, |
| if (!cursor_) |
| return; // No cursor! |
| - // We may receive a request for a GESTURE_FLING_START with zero velocity; in |
| - // this case send a ET_SCROLL_FLING_CANCEL in case it's needed to stop a |
| - // fling in progress. |
| - // TODO(wjmaclean): is it possible to get consecutive GESTURE_FLING_STARTs? |
| - bool should_fling_start = fling->fling_state == GESTURES_FLING_START && |
| - (fling->vx != 0 || fling->vy != 0); |
| EventType type = |
| - (should_fling_start ? ET_SCROLL_FLING_START : ET_SCROLL_FLING_CANCEL); |
| + (fling->fling_state == GESTURES_FLING_START ? ET_SCROLL_FLING_START |
| + : ET_SCROLL_FLING_CANCEL); |
| - // Fling is like 2-finger scrolling but with velocity instead of displacement. |
| + // Fling is like 2-finger scrolling but with |
| + // velocity instead of displacement. |
|
wjmaclean
2016/07/22 00:42:01
I'll undo this unintended re-formatting before lan
|
| dispatcher_->DispatchScrollEvent(ScrollEventParams( |
| id_, type, cursor_->GetLocation(), gfx::Vector2dF(fling->vx, fling->vy), |
| gfx::Vector2dF(fling->ordinal_vx, fling->ordinal_vy), |