| Index: chrome/browser/ui/views/toolbar/toolbar_button.cc
|
| diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
|
| index aefdb0dfb59fc197ba2705bfb49da38d0d310cde..8c93e6fb03b977330c6c295ea606173caa52e4d3 100644
|
| --- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
|
| +++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
|
| @@ -191,19 +191,29 @@ void ToolbarButton::OnGestureEvent(ui::GestureEvent* event) {
|
| case ui::ET_GESTURE_LONG_PRESS:
|
| ink_drop_state = views::InkDropState::SLOW_ACTION_PENDING;
|
| break;
|
| - case ui::ET_GESTURE_TAP:
|
| - ink_drop_state = views::InkDropState::QUICK_ACTION;
|
| - break;
|
| case ui::ET_GESTURE_LONG_TAP:
|
| ink_drop_state = views::InkDropState::SLOW_ACTION;
|
| break;
|
| + case ui::ET_GESTURE_SCROLL_BEGIN:
|
| case ui::ET_GESTURE_END:
|
| - case ui::ET_GESTURE_TAP_CANCEL:
|
| ink_drop_state = views::InkDropState::HIDDEN;
|
| break;
|
| default:
|
| return;
|
| }
|
| +
|
| + views::InkDropState current_ink_drop_state =
|
| + ink_drop_animation_controller_->GetInkDropState();
|
| +
|
| + if (ink_drop_state == views::InkDropState::HIDDEN &&
|
| + (current_ink_drop_state == views::InkDropState::QUICK_ACTION ||
|
| + current_ink_drop_state == views::InkDropState::SLOW_ACTION ||
|
| + current_ink_drop_state == views::InkDropState::DEACTIVATED)) {
|
| + // These InkDropStates automatically transition to the HIDDEN state so we
|
| + // don't make an explicit call. Explicitly animating to HIDDEN in this case
|
| + // would prematurely pre-empt these animations.
|
| + return;
|
| + }
|
| ink_drop_animation_controller_->AnimateToState(ink_drop_state);
|
| }
|
|
|
|
|