| Index: ui/views/controls/scrollbar/base_scroll_bar.cc
|
| diff --git a/ui/views/controls/scrollbar/base_scroll_bar.cc b/ui/views/controls/scrollbar/base_scroll_bar.cc
|
| index 833ac7983e9295e27318225aa91728e4351d15ed..6643735b5ce83fab6b67059c8b90d69cef4b9845 100644
|
| --- a/ui/views/controls/scrollbar/base_scroll_bar.cc
|
| +++ b/ui/views/controls/scrollbar/base_scroll_bar.cc
|
| @@ -172,7 +172,7 @@ bool BaseScrollBar::OnMouseWheel(const ui::MouseWheelEvent& event) {
|
| return true;
|
| }
|
|
|
| -ui::EventResult BaseScrollBar::OnGestureEvent(ui::GestureEvent* event) {
|
| +void BaseScrollBar::OnGestureEvent(ui::GestureEvent* event) {
|
| // If a fling is in progress, then stop the fling for any incoming gesture
|
| // event (except for the GESTURE_END event that is generated at the end of the
|
| // fling).
|
| @@ -184,13 +184,14 @@ ui::EventResult BaseScrollBar::OnGestureEvent(ui::GestureEvent* event) {
|
|
|
| if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
|
| ProcessPressEvent(*event);
|
| - return ui::ER_CONSUMED;
|
| + event->SetHandled();
|
| + return;
|
| }
|
|
|
| if (event->type() == ui::ET_GESTURE_LONG_PRESS) {
|
| // For a long-press, the repeater started in tap-down should continue. So
|
| // return early.
|
| - return ui::ER_UNHANDLED;
|
| + return;
|
| }
|
|
|
| ResetState();
|
| @@ -198,17 +199,21 @@ ui::EventResult BaseScrollBar::OnGestureEvent(ui::GestureEvent* event) {
|
| if (event->type() == ui::ET_GESTURE_TAP) {
|
| // TAP_DOWN would have already scrolled some amount. So scrolling again on
|
| // TAP is not necessary.
|
| - return ui::ER_CONSUMED;
|
| + event->SetHandled();
|
| + return;
|
| }
|
|
|
| if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN ||
|
| - event->type() == ui::ET_GESTURE_SCROLL_END)
|
| - return ui::ER_CONSUMED;
|
| + event->type() == ui::ET_GESTURE_SCROLL_END) {
|
| + event->SetHandled();
|
| + return;
|
| + }
|
|
|
| if (event->type() == ui::ET_GESTURE_SCROLL_UPDATE) {
|
| ScrollByContentsOffset(IsHorizontal() ? event->details().scroll_x() :
|
| event->details().scroll_y());
|
| - return ui::ER_CONSUMED;
|
| + event->SetHandled();
|
| + return;
|
| }
|
|
|
| if (event->type() == ui::ET_SCROLL_FLING_START) {
|
| @@ -217,10 +222,8 @@ ui::EventResult BaseScrollBar::OnGestureEvent(ui::GestureEvent* event) {
|
| scroll_animator_->Start(
|
| IsHorizontal() ? event->details().velocity_x() : 0.f,
|
| IsHorizontal() ? 0.f : event->details().velocity_y());
|
| - return ui::ER_CONSUMED;
|
| + event->SetHandled();
|
| }
|
| -
|
| - return ui::ER_UNHANDLED;
|
| }
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|