Index: ui/views/animation/ink_drop_host_view.cc |
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc |
index b7ae651a92e932a7d831921b8fcd3d30694d407c..89f320d2a50664a66dac3f9aafdfd320ef91dceb 100644 |
--- a/ui/views/animation/ink_drop_host_view.cc |
+++ b/ui/views/animation/ink_drop_host_view.cc |
@@ -58,6 +58,8 @@ class InkDropHostView::InkDropGestureHandler : public ui::EventHandler { |
InkDropState ink_drop_state = InkDropState::HIDDEN; |
switch (event->type()) { |
case ui::ET_GESTURE_TAP_DOWN: |
+ if (current_ink_drop_state == InkDropState::ACTIVATED) |
bruthig
2016/08/25 19:18:35
These might benefit from some test cases if they a
mohsen
2016/08/30 18:03:32
I believe these are already tested in gesture test
bruthig
2016/09/01 16:12:54
Yeah, I meant in ink_drop_host_view_unittest.cc.
|
+ return; |
ink_drop_state = InkDropState::ACTION_PENDING; |
// The ui::ET_GESTURE_TAP_DOWN event needs to be marked as handled so |
// that |
@@ -65,16 +67,17 @@ class InkDropHostView::InkDropGestureHandler : public ui::EventHandler { |
event->SetHandled(); |
break; |
case ui::ET_GESTURE_LONG_PRESS: |
+ if (current_ink_drop_state == InkDropState::ACTIVATED) |
+ return; |
ink_drop_state = InkDropState::ALTERNATE_ACTION_PENDING; |
break; |
case ui::ET_GESTURE_LONG_TAP: |
ink_drop_state = InkDropState::ALTERNATE_ACTION_TRIGGERED; |
break; |
case ui::ET_GESTURE_END: |
+ case ui::ET_GESTURE_SCROLL_BEGIN: |
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: |