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

Issue 1775533002: Fixes incorrect clearing of hot-tracked state when context menu is opened from a menu item (Closed)

Created:
4 years, 9 months ago by varkha
Modified:
4 years, 8 months ago
Reviewers:
jonross, sky
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixes incorrect clearing of hot-tracked state when context menu is opened from a menu item Broken with the last change here: https://codereview.chromium.org/1741093002 Since menus can be nested using the same MenuController I think it would be correct to move |hot_button_| and its accessors into MenuItemView. This way there can be multiple views in hot-tracked state in the same MenuController as long as only one hot-tracked view is in any given menu item. BUG=592359 Committed: https://crrev.com/34943cb4f328c269cb53091c0702c5380a675407 Cr-Commit-Position: refs/heads/master@{#383128}

Patch Set 1 : Moves hot_button tracking from MenuController to MenuItemView #

Patch Set 2 : Moves hot_button tracking from MenuController to MenuItemView #

Total comments: 4

Patch Set 3 : Moves hot_button tracking from MenuController to MenuController::State #

Total comments: 4

Patch Set 4 : Moves hot_button tracking from MenuController to MenuController::State (comments) #

Patch Set 5 : Moves hot_button tracking from MenuController to MenuController::State (unit test) #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -9 lines) Patch
M ui/views/controls/menu/menu_controller.h View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M ui/views/controls/menu/menu_controller.cc View 1 2 3 6 chunks +20 lines, -7 lines 2 comments Download
M ui/views/controls/menu/menu_controller_unittest.cc View 1 2 3 4 3 chunks +73 lines, -1 line 0 comments Download

Messages

Total messages: 38 (17 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775533002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775533002/20001
4 years, 9 months ago (2016-03-08 02:44:39 UTC) #3
varkha
sky@, can you please take a look? The bug got triggered because extension button context ...
4 years, 9 months ago (2016-03-08 02:48:55 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/192848) win8_chromium_ng on ...
4 years, 9 months ago (2016-03-08 03:24:33 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775533002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775533002/40001
4 years, 9 months ago (2016-03-08 04:12:40 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/185517)
4 years, 9 months ago (2016-03-08 04:49:04 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775533002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775533002/60001
4 years, 9 months ago (2016-03-08 13:45:38 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-08 15:00:42 UTC) #17
sky
How about some test coverage? https://codereview.chromium.org/1775533002/diff/60001/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/1775533002/diff/60001/ui/views/controls/menu/menu_controller.cc#newcode562 ui/views/controls/menu/menu_controller.cc:562: button->GetAncestorWithClassName(MenuItemView::kViewClassName)); What if button ...
4 years, 9 months ago (2016-03-08 16:45:37 UTC) #18
varkha
sky@, can you PTAL if this is what you had in mind? Still need to ...
4 years, 9 months ago (2016-03-23 21:16:01 UTC) #20
sky
https://codereview.chromium.org/1775533002/diff/100001/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/1775533002/diff/100001/ui/views/controls/menu/menu_controller.cc#newcode367 ui/views/controls/menu/menu_controller.cc:367: hot_button(NULL), nullptr (feel free to change NULL on the ...
4 years, 9 months ago (2016-03-23 21:42:40 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775533002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775533002/140001
4 years, 9 months ago (2016-03-24 18:33:16 UTC) #23
varkha
PTAL. Also added a test that checks that the hot-tracked button state as well as ...
4 years, 9 months ago (2016-03-24 18:36:18 UTC) #24
jonross
https://codereview.chromium.org/1775533002/diff/140001/ui/views/controls/menu/menu_controller.cc File ui/views/controls/menu/menu_controller.cc (right): https://codereview.chromium.org/1775533002/diff/140001/ui/views/controls/menu/menu_controller.cc#newcode2606 ui/views/controls/menu/menu_controller.cc:2606: hot_button_->SetHotTracked(true); Is it possible for this hot_button_ to no ...
4 years, 9 months ago (2016-03-24 18:48:19 UTC) #26
sky
One question though. If we cache the hot button before opening another menu and restore ...
4 years, 9 months ago (2016-03-24 19:12:56 UTC) #27
varkha
On 2016/03/24 19:12:56, sky wrote: > One question though. If we cache the hot button ...
4 years, 9 months ago (2016-03-24 19:30:02 UTC) #28
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-24 19:31:01 UTC) #30
sky
Good point. LGTM
4 years, 9 months ago (2016-03-24 19:55:37 UTC) #31
jonross
On 2016/03/24 19:55:37, sky wrote: > Good point. LGTM LGTM
4 years, 9 months ago (2016-03-24 19:57:03 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1775533002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1775533002/140001
4 years, 9 months ago (2016-03-24 20:08:17 UTC) #34
commit-bot: I haz the power
Committed patchset #5 (id:140001)
4 years, 9 months ago (2016-03-24 20:14:35 UTC) #36
commit-bot: I haz the power
4 years, 9 months ago (2016-03-24 20:15:29 UTC) #38
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/34943cb4f328c269cb53091c0702c5380a675407
Cr-Commit-Position: refs/heads/master@{#383128}

Powered by Google App Engine
This is Rietveld 408576698