Index: ui/views/animation/button_ink_drop_delegate.cc |
diff --git a/ui/views/animation/button_ink_drop_delegate.cc b/ui/views/animation/button_ink_drop_delegate.cc |
index 2ca3ef12ec57ac40515196fd57346fe7d2b679a0..2fa6000574b196631b220bde9ca8a3fa8e494b30 100644 |
--- a/ui/views/animation/button_ink_drop_delegate.cc |
+++ b/ui/views/animation/button_ink_drop_delegate.cc |
@@ -47,6 +47,9 @@ void ButtonInkDropDelegate::OnAction(InkDropState state) { |
// ui::EventHandler: |
void ButtonInkDropDelegate::OnGestureEvent(ui::GestureEvent* event) { |
+ InkDropState current_ink_drop_state = |
+ ink_drop_animation_controller_->GetInkDropState(); |
+ |
InkDropState ink_drop_state = InkDropState::HIDDEN; |
switch (event->type()) { |
case ui::ET_GESTURE_TAP_DOWN: |
@@ -61,17 +64,17 @@ void ButtonInkDropDelegate::OnGestureEvent(ui::GestureEvent* event) { |
case ui::ET_GESTURE_LONG_TAP: |
ink_drop_state = InkDropState::SLOW_ACTION; |
break; |
- case ui::ET_GESTURE_SCROLL_BEGIN: |
case ui::ET_GESTURE_END: |
+ if (current_ink_drop_state == InkDropState::ACTIVATED) |
+ return; |
+ // Fall through to ui::ET_GESTURE_SCROLL_BEGIN case. |
+ case ui::ET_GESTURE_SCROLL_BEGIN: |
ink_drop_state = InkDropState::HIDDEN; |
break; |
default: |
return; |
} |
- InkDropState current_ink_drop_state = |
- ink_drop_animation_controller_->GetInkDropState(); |
- |
if (ink_drop_state == InkDropState::HIDDEN && |
(current_ink_drop_state == InkDropState::QUICK_ACTION || |
current_ink_drop_state == InkDropState::SLOW_ACTION || |