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

Unified Diff: ui/views/animation/ink_drop_impl.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
Index: ui/views/animation/ink_drop_impl.cc
diff --git a/ui/views/animation/ink_drop_impl.cc b/ui/views/animation/ink_drop_impl.cc
index ba234127affc013b5b47ba79b2ef65abea8b4166..f206f8f833e2393aa7a0fe85cb8058c85a704fcc 100644
--- a/ui/views/animation/ink_drop_impl.cc
+++ b/ui/views/animation/ink_drop_impl.cc
@@ -73,10 +73,6 @@ InkDropState InkDropImpl::GetTargetInkDropState() const {
return ink_drop_ripple_->target_ink_drop_state();
}
-bool InkDropImpl::IsVisible() const {
- return ink_drop_ripple_ && ink_drop_ripple_->IsVisible();
-}
-
void InkDropImpl::AnimateToState(InkDropState ink_drop_state) {
DestroyHiddenTargetedAnimations();
if (!ink_drop_ripple_)
@@ -224,7 +220,7 @@ void InkDropImpl::SetHighlight(bool should_highlight,
if (should_highlight) {
CreateInkDropHover();
- if (hover_ && !IsVisible())
+ if (hover_ && !(ink_drop_ripple_ && ink_drop_ripple_->IsVisible()))
hover_->FadeIn(animation_duration);
} else {
hover_->FadeOut(animation_duration, explode);

Powered by Google App Engine
This is Rietveld 408576698