| Index: ui/views/controls/button/custom_button.cc
|
| diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
|
| index 905f81d07696a7e3989266b4d1ce456f9f97bbcd..ec99b60f798f6752749e6d4975d3e12754b58efd 100644
|
| --- a/ui/views/controls/button/custom_button.cc
|
| +++ b/ui/views/controls/button/custom_button.cc
|
| @@ -164,15 +164,16 @@ bool CustomButton::OnMousePressed(const ui::MouseEvent& event) {
|
|
|
| bool CustomButton::OnMouseDragged(const ui::MouseEvent& event) {
|
| if (state_ != STATE_DISABLED) {
|
| + bool should_enter_pushed = ShouldEnterPushedState(event);
|
| if (HitTestPoint(event.location())) {
|
| - SetState(ShouldEnterPushedState(event) ? STATE_PRESSED : STATE_HOVERED);
|
| - if (!InDrag() && ink_drop_delegate() &&
|
| + SetState(should_enter_pushed ? STATE_PRESSED : STATE_HOVERED);
|
| + if (!InDrag() && should_enter_pushed && ink_drop_delegate() &&
|
| ink_drop_delegate()->GetTargetInkDropState() ==
|
| views::InkDropState::HIDDEN)
|
| ink_drop_delegate()->OnAction(views::InkDropState::ACTION_PENDING);
|
| } else {
|
| SetState(STATE_NORMAL);
|
| - if (!InDrag() && ink_drop_delegate() &&
|
| + if (!InDrag() && should_enter_pushed && ink_drop_delegate() &&
|
| ink_drop_delegate()->GetTargetInkDropState() ==
|
| views::InkDropState::ACTION_PENDING)
|
| ink_drop_delegate()->OnAction(views::InkDropState::HIDDEN);
|
|
|