Chromium Code Reviews| Index: components/exo/pointer.cc |
| diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc |
| index 46fbcb109b8397317b0599b9f6c6e5d28149da82..6e3ac3c2e13da104a98170fa160e58820c405858 100644 |
| --- a/components/exo/pointer.cc |
| +++ b/components/exo/pointer.cc |
| @@ -247,8 +247,11 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) { |
| } |
| break; |
| case ui::ET_SCROLL_FLING_CANCEL: |
| - if (focus_) { |
| - delegate_->OnPointerScrollCancel(event->time_stamp()); |
| + if (focus_ && last_event_type_ == ui::ET_SCROLL_FLING_START) { |
| + delegate_->OnPointerScroll(event->time_stamp(), gfx::Vector2dF(), |
| + false); |
| + delegate_->OnPointerFrame(); |
| + delegate_->OnPointerScrollStop(event->time_stamp()); |
| delegate_->OnPointerFrame(); |
| } |
| break; |
| @@ -263,8 +266,10 @@ void Pointer::OnMouseEvent(ui::MouseEvent* event) { |
| break; |
| } |
| - if ((event->flags() & ui::EF_IS_SYNTHESIZED) == 0) |
| + if ((event->flags() & ui::EF_IS_SYNTHESIZED) == 0) { |
|
reveman
2016/10/31 18:14:19
nit: chromium style is "if (!(event->flags() & ui:
denniskempin
2016/10/31 22:08:35
Done.
|
| is_direct_input_ = (event->flags() & ui::EF_DIRECT_INPUT) != 0; |
|
reveman
2016/10/31 18:14:19
nit: s/(event->flags() & ui::EF_DIRECT_INPUT) != 0
denniskempin
2016/10/31 22:08:35
Done.
|
| + last_event_type_ = event->type(); |
| + } |
| // Update cursor widget to reflect current focus and pointer location. |
| if (focus_ && !is_direct_input_) { |