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

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: rebase 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') | no next file » | 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 d5796b0e21cbe0c402aeed7b88f916582080ef8a..20b3452374de8f1e6335e34c97250b56a45e2456 100644
--- a/ui/views/controls/button/menu_button.cc
+++ b/ui/views/controls/button/menu_button.cc
@@ -395,7 +395,9 @@ void MenuButton::DecrementPressedLocked() {
desired_state = STATE_HOVERED;
}
SetState(desired_state);
- if (state() != STATE_PRESSED)
+ // The widget may be null during shutdown. If so, it doesn't make sense to
+ // try to add an ink drop effect.
+ if (GetWidget() && state() != STATE_PRESSED)
AnimateInkDrop(InkDropState::DEACTIVATED);
}
}
« no previous file with comments | « ui/views/controls/button/custom_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698