Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1678)

Unified Diff: ui/views/animation/ink_drop_host_view.cc

Issue 2178163002: Add ink drop ripple to shelf overflow button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
+ 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:

Powered by Google App Engine
This is Rietveld 408576698