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

Unified Diff: ui/views/controls/button/menu_button.cc

Issue 2028303004: Hide hover effect on hidden ink drop host views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/menu_button.cc
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc
index 3602b45bc9cfbe483d28189ef9b6c93d3f8aed56..7d411ce05ee2ce283044804075cb50697b40408e 100644
--- a/ui/views/controls/button/menu_button.cc
+++ b/ui/views/controls/button/menu_button.cc
@@ -400,7 +400,8 @@ void MenuButton::DecrementPressedLocked() {
desired_state = STATE_HOVERED;
}
SetState(desired_state);
- if (ink_drop_delegate() && state() != STATE_PRESSED)
+ // The widget may be null during shutdown.
bruthig 2016/06/03 22:35:25 nit: Can you beef up this comment a little. It is
Evan Stade 2016/06/03 22:42:40 Done. Creating an ink drop requires a native theme
+ if (GetWidget() && ink_drop_delegate() && state() != STATE_PRESSED)
ink_drop_delegate()->OnAction(InkDropState::DEACTIVATED);
}
}
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698