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

Issue 2447523002: [ash-md] Added different highlighting modes to the InkDropImpl. (Closed)

Created:
4 years, 2 months ago by bruthig
Modified:
4 years, 1 month ago
Reviewers:
sky
CC:
chromium-reviews, asanka, sadrul, tfarina, dcheng, bruthig+ink_drop_chromium.org, kalyank, dbeam+watch-downloads_chromium.org, mohsen
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added a 'show highlight on ripple' mode to the InkDropImpl. Depends on WIP: https://codereview.chromium.org/2473483013/ to fix the failing test: InkDropImplHideAutoHighlightTest.DeactivatedAnimationSkippedWhenFocused_0 Currently the InkDropImpl implements 2 highlight modes: 1. Based only off of hover/focus state. 2. Hide the ripple when a ripple is visible in addition to the hover/focus states. This is used by the toolbar buttons, e.g. Back, Forward, etc. This CL adds a 3rd highlight mode: 3. Show the highlight when the ripple is visible in addition to the hover/focus states. This will be used by buttons in the system menu as well as the bookmark row buttons. There are 2 major problems with the existing implementation: 1. InkDropHostView's were allowed to decide when a highlight is to be shown instead of the InkDropImpl making the decision. The main mechanism used to implement this was via CustomButton::ShouldShowInkDropHighlight(). This is problematic since the InkDropImpl will now request an InkDropHighlight instance even when the host view is not hovered/focused. 2. The InkDropImpl was informed of the highlighting strategy via a property of the InkDropRipple, namely InkDropRipple::OverridesHighlight(). This was used as a workaround since the overrides of InkDropHostView did not have an opportunity to configure InkDropImpl properties. There are 3 major aspects to this change: 1. Add an overrideable InkDropHost::CreateInkDrop() method to allow subclasses to configure the InkDropImpl instance. 2. Remove CustomButton::ShouldShowInkDropHighlight(), InkDropHostView::ShouldShowInkDropForFocus(), and InkDropRipple::OverridesHighlight() and replace them with InkDropHost::CreateInkDrop() overrides that configure the InkDropImpl as desired. 3. Refactor InkDropImpl to support the new highlight mode using a state machine. Follow-up work: - Remove safe guards for null return values from InkDropHost::CreateInkDropHighlight() - Implement a better mechanism to inject the desired type/configuration of the ink drop to the host view. BUG=649734 TEST=views_unittests, ash_unittests Committed: https://crrev.com/ca8b19cd01cfb691bfa31e4605f4204dd8da8aab Cr-Commit-Position: refs/heads/master@{#430490}

Patch Set 1 #

Patch Set 2 : Fixed compiler errors. #

Patch Set 3 : Deleted unnecessary includes and some commented code. #

Patch Set 4 : Fixed compile errors. #

Total comments: 22

Patch Set 5 : Snapshot of test re-work before merge with master. #

Patch Set 6 : Merge branch 'master' into ink_drop_highlight_mode #

Patch Set 7 : Addressed review comments + added recursive SetHighlightState() guard. #

Patch Set 8 : Snapshot of polish work before a merge with master. #

Patch Set 9 : Merge branch 'master' into ink_drop_highlight_mode #

Patch Set 10 : Snapshot of work before merge with master. #

Patch Set 11 : Merge branch 'master' into ink_drop_highlight_mode #

Patch Set 12 : Polish and tests #

Patch Set 13 : Removed TODO's from InkDropImplHideAutoHighlightTest.DeactivatedAnimationSkippedWhenFocused. #

Patch Set 14 : Merge branch 'master' into ink_drop_highlight_mode #

Patch Set 15 : Merge branch 'master' into ink_drop_highlight_mode #

Patch Set 16 : Fixed InkDropHostView::GetInkDrop() to use CreateInkDrop(). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1526 lines, -529 lines) Patch
M ash/common/shelf/app_list_button.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M ash/common/shelf/app_list_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -2 lines 0 comments Download
M ash/common/shelf/overflow_button.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/common/shelf/overflow_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -4 lines 0 comments Download
M ash/common/shelf/shelf_button.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M ash/common/shelf/shelf_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +6 lines, -3 lines 0 comments Download
M ash/common/system/tray/actionable_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M ash/common/system/tray/actionable_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -0 lines 0 comments Download
M ash/common/system/tray/system_menu_button.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ash/common/system/tray/system_menu_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/download/download_item_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/download/download_item_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/bubble_icon_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/bubble_icon_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/location_bar/content_setting_image_view.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/location_bar/content_setting_image_view.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_action_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_action_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -3 lines 0 comments Download
M ui/views/animation/flood_fill_ink_drop_ripple.h View 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/animation/flood_fill_ink_drop_ripple.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M ui/views/animation/ink_drop_host.h View 1 2 3 4 5 6 2 chunks +14 lines, -2 lines 0 comments Download
M ui/views/animation/ink_drop_host_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +18 lines, -10 lines 0 comments Download
M ui/views/animation/ink_drop_host_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +45 lines, -22 lines 0 comments Download
M ui/views/animation/ink_drop_impl.h View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +181 lines, -17 lines 0 comments Download
M ui/views/animation/ink_drop_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +568 lines, -75 lines 0 comments Download
M ui/views/animation/ink_drop_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +394 lines, -246 lines 0 comments Download
M ui/views/animation/ink_drop_ripple.h View 1 chunk +0 lines, -3 lines 0 comments Download
M ui/views/animation/ink_drop_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -8 lines 0 comments Download
M ui/views/animation/square_ink_drop_ripple.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/animation/square_ink_drop_ripple.cc View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M ui/views/animation/test/ink_drop_impl_test_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +58 lines, -1 line 0 comments Download
M ui/views/animation/test/ink_drop_impl_test_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +89 lines, -1 line 0 comments Download
M ui/views/animation/test/test_ink_drop_host.h View 1 2 3 4 5 6 7 3 chunks +4 lines, -12 lines 0 comments Download
M ui/views/animation/test/test_ink_drop_host.cc View 1 2 3 4 5 6 7 6 chunks +14 lines, -20 lines 0 comments Download
M ui/views/controls/button/checkbox.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -4 lines 0 comments Download
M ui/views/controls/button/checkbox.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +8 lines, -8 lines 0 comments Download
M ui/views/controls/button/custom_button.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -5 lines 0 comments Download
M ui/views/controls/button/custom_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +7 lines, -12 lines 0 comments Download
M ui/views/controls/button/label_button.h View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M ui/views/controls/button/label_button.cc View 1 2 3 chunks +20 lines, -12 lines 0 comments Download
M ui/views/controls/button/md_text_button.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/button/md_text_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +5 lines, -8 lines 0 comments Download
M ui/views/controls/button/toggle_button.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M ui/views/controls/button/toggle_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +8 lines, -4 lines 0 comments Download
M ui/views/controls/combobox/combobox.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +7 lines, -4 lines 0 comments Download

Messages

Total messages: 57 (43 generated)
bruthig
mohsen@, consider this more an FYI at this point of the new InkDropHostView::CreateInkDrop() method and ...
4 years, 1 month ago (2016-10-26 22:06:43 UTC) #5
bruthig
sky@, can you please take a high level look first while I work on adding/fixing ...
4 years, 1 month ago (2016-11-01 21:00:11 UTC) #19
sky
Here's some random comments. I haven't looked at it all, but I think I looked ...
4 years, 1 month ago (2016-11-02 02:52:11 UTC) #20
bruthig
sky@, this is now ready for full review. Can you please take a look or ...
4 years, 1 month ago (2016-11-04 18:50:37 UTC) #29
sky
https://codereview.chromium.org/2447523002/diff/60001/ash/common/shelf/overflow_button.cc File ash/common/shelf/overflow_button.cc (right): https://codereview.chromium.org/2447523002/diff/60001/ash/common/shelf/overflow_button.cc#newcode87 ash/common/shelf/overflow_button.cc:87: return CreateDefaultFloodFillInkDropImpl(); On 2016/11/04 18:50:36, bruthig wrote: > On ...
4 years, 1 month ago (2016-11-04 20:36:13 UTC) #32
bruthig
https://codereview.chromium.org/2447523002/diff/60001/ash/common/shelf/overflow_button.cc File ash/common/shelf/overflow_button.cc (right): https://codereview.chromium.org/2447523002/diff/60001/ash/common/shelf/overflow_button.cc#newcode87 ash/common/shelf/overflow_button.cc:87: return CreateDefaultFloodFillInkDropImpl(); On 2016/11/04 20:36:12, sky wrote: > On ...
4 years, 1 month ago (2016-11-07 18:38:47 UTC) #33
sky
Ok, LGTM
4 years, 1 month ago (2016-11-07 23:30:19 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2447523002/250001
4 years, 1 month ago (2016-11-07 23:37:50 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/298955)
4 years, 1 month ago (2016-11-07 23:48:24 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2447523002/270001
4 years, 1 month ago (2016-11-08 01:52:20 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2447523002/290001
4 years, 1 month ago (2016-11-08 02:04:57 UTC) #52
commit-bot: I haz the power
Committed patchset #16 (id:290001)
4 years, 1 month ago (2016-11-08 02:54:29 UTC) #54
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/ca8b19cd01cfb691bfa31e4605f4204dd8da8aab Cr-Commit-Position: refs/heads/master@{#430490}
4 years, 1 month ago (2016-11-08 03:27:32 UTC) #56
stgao
4 years, 1 month ago (2016-11-17 20:29:03 UTC) #57
Message was sent while issue was closed.
FYI: this CL seems to introduce a flaky test
https://findit-for-me.appspot.com/waterfall/check-flake?master_name=chromium....

Powered by Google App Engine
This is Rietveld 408576698