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

Unified Diff: ui/views/animation/ink_drop_host_view.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, 7 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 dc7f67e92c6f4439e9ce396826e5a39ec17b7c16..f265b0102f8c3b5190c8b6d7bb961136e3a1961c 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -72,6 +72,12 @@ std::unique_ptr<InkDropHover> InkDropHostView::CreateInkDropHover() const {
return hover;
}
+void InkDropHostView::VisibilityChanged(View* starting_from, bool is_visible) {
+ View::VisibilityChanged(starting_from, is_visible);
+ if (ink_drop_delegate() && GetWidget() && !is_visible)
sky 2016/06/02 03:07:26 Why do you care if there is a widget here?
Evan Stade 2016/06/02 19:34:07 Without this check it crashes in GetInkDropBaseCol
+ ink_drop_delegate()->GetInkDrop()->SetHovered(false);
Evan Stade 2016/06/01 22:46:20 analogous to CustomButton::VisibilityChanged
bruthig 2016/06/02 19:02:59 Is OnBlur() and more importantly SetFocused(false)
Evan Stade 2016/06/02 19:34:07 I didn't investigate with extreme thoroughness but
bruthig 2016/06/02 19:46:36 Awesome, might be worth a test by a good Samaritan
+}
+
void InkDropHostView::OnFocus() {
views::View::OnFocus();
if (ink_drop_delegate() && ShouldShowInkDropForFocus())

Powered by Google App Engine
This is Rietveld 408576698