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

Issue 2340993002: Tweaks to "Allow InkDropRipple to co-exist with highlight or not exist at all." (Closed)

Created:
4 years, 3 months ago by bruthig
Modified:
4 years, 1 month ago
Reviewers:
Evan Stade
CC:
chromium-reviews, tfarina, bruthig+ink_drop_chromium.org, dcheng
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Tweaks to "Allow InkDropRipple to co-exist with highlight or not exist at all." 1. Allow InkDropRipple to co-exist with highlight by adding InkDropRipple::OverridesHighlight. I initially made this part of InkDropHost but then realized that it was more a property of the ripple itself, and it would be too easy to overlook when adding an ink drop to a new surface. 2. Allow InkDropRipple to not exist but still retain an InkDropHighlight. This is desired for a couple menu-like UI surfaces in secondary UI. This is effected with an EmptyInkDropRipple class that just no-ops while allowing the hover effect to remain. The immediate effect of this change is that flood fill ripples will paint on top of the hover highlight effect (e.g. on bookmark buttons). BUG=617961 patch from issue 2250783002 at patchset 160001 (http://crrev.com/2250783002#ps160001)

Patch Set 1 #

Patch Set 2 : Updated InkDropRipple to not special case the EmptyInkDrop. #

Patch Set 3 : Added EmptyInkDropRippleTestApi. #

Patch Set 4 : Fixed InkDropImplTest.HighlightCanExistWithoutRipple. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -77 lines) Patch
M ui/views/BUILD.gn View 1 2 chunks +4 lines, -0 lines 0 comments Download
A ui/views/animation/empty_ink_drop_ripple.h View 1 chunk +37 lines, -0 lines 0 comments Download
A ui/views/animation/empty_ink_drop_ripple.cc View 1 1 chunk +30 lines, -0 lines 0 comments Download
M ui/views/animation/flood_fill_ink_drop_ripple.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/animation/flood_fill_ink_drop_ripple.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/views/animation/ink_drop_impl.cc View 1 2 3 7 chunks +35 lines, -23 lines 0 comments Download
M ui/views/animation/ink_drop_impl_unittest.cc View 1 2 3 2 chunks +86 lines, -0 lines 0 comments Download
M ui/views/animation/ink_drop_ripple.h View 1 chunk +5 lines, -2 lines 0 comments Download
M ui/views/animation/ink_drop_ripple.cc View 1 2 3 4 chunks +23 lines, -13 lines 2 comments Download
M ui/views/animation/ink_drop_ripple_unittest.cc View 1 20 chunks +62 lines, -23 lines 0 comments Download
M ui/views/animation/square_ink_drop_ripple.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/animation/square_ink_drop_ripple.cc View 1 chunk +2 lines, -2 lines 0 comments Download
A ui/views/animation/test/empty_ink_drop_ripple_test_api.h View 1 2 1 chunk +41 lines, -0 lines 0 comments Download
A ui/views/animation/test/empty_ink_drop_ripple_test_api.cc View 1 2 1 chunk +25 lines, -0 lines 0 comments Download
M ui/views/animation/test/test_ink_drop_host.h View 2 chunks +12 lines, -0 lines 0 comments Download
M ui/views/animation/test/test_ink_drop_host.cc View 1 5 chunks +18 lines, -6 lines 0 comments Download
M ui/views/controls/button/label_button.cc View 1 chunk +3 lines, -4 lines 0 comments Download

Messages

Total messages: 15 (13 generated)
Evan Stade
thanks for posting this https://codereview.chromium.org/2340993002/diff/60001/ui/views/animation/ink_drop_ripple.cc File ui/views/animation/ink_drop_ripple.cc (right): https://codereview.chromium.org/2340993002/diff/60001/ui/views/animation/ink_drop_ripple.cc#newcode45 ui/views/animation/ink_drop_ripple.cc:45: ui::CallbackLayerAnimationObserver* animation_observer = what happens ...
4 years, 3 months ago (2016-09-20 15:16:29 UTC) #14
bruthig
4 years, 3 months ago (2016-09-20 16:17:16 UTC) #15
https://codereview.chromium.org/2340993002/diff/60001/ui/views/animation/ink_...
File ui/views/animation/ink_drop_ripple.cc (right):

https://codereview.chromium.org/2340993002/diff/60001/ui/views/animation/ink_...
ui/views/animation/ink_drop_ripple.cc:45: ui::CallbackLayerAnimationObserver*
animation_observer =
On 2016/09/20 15:16:29, Evan Stade wrote:
> what happens to animation_observer when !GetRootLayer()?

A test would be the best way to know for sure, but I'm expecting the
|animation_observer| doesn't get any LayerAnimations added to it and when
SetActive() is called on line 67 it will invoke the callbacks synchronously.

Powered by Google App Engine
This is Rietveld 408576698