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

Issue 22154002: Not to show context menu if there are no visible items to show. (Closed)

Created:
7 years, 4 months ago by yoshiki
Modified:
7 years, 4 months ago
CC:
chromium-reviews, oshima+watch_chromium.org
Visibility:
Public.

Description

Not to show context menu if there are no visible items to show. This patch prevents the item-less context menu from being visible. In cr.ui.menu, some menu items may be made hidden by Command.canExecute(). Even if all the menu items were hidden, the menu could be shown and the only the border was visible to user. BUG=none TEST=manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216241

Patch Set 1 #

Patch Set 2 : remove a debug comment #

Total comments: 2

Patch Set 3 : addressed comment #

Total comments: 4

Patch Set 4 : addressed comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
M ui/webui/resources/js/cr/ui/context_menu_handler.js View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M ui/webui/resources/js/cr/ui/menu.js View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
yoshiki
@arv: Could you take a look? Thanks.
7 years, 4 months ago (2013-08-07 09:36:24 UTC) #1
arv (Not doing code reviews)
https://codereview.chromium.org/22154002/diff/3001/ui/webui/resources/js/cr/ui/menu.js File ui/webui/resources/js/cr/ui/menu.js (right): https://codereview.chromium.org/22154002/diff/3001/ui/webui/resources/js/cr/ui/menu.js#newcode161 ui/webui/resources/js/cr/ui/menu.js:161: get visibleItemLength() { Do we really need to know ...
7 years, 4 months ago (2013-08-07 13:51:37 UTC) #2
yoshiki
@arv: PTAL. Thanks. https://codereview.chromium.org/22154002/diff/3001/ui/webui/resources/js/cr/ui/menu.js File ui/webui/resources/js/cr/ui/menu.js (right): https://codereview.chromium.org/22154002/diff/3001/ui/webui/resources/js/cr/ui/menu.js#newcode161 ui/webui/resources/js/cr/ui/menu.js:161: get visibleItemLength() { On 2013/08/07 13:51:37, ...
7 years, 4 months ago (2013-08-07 14:53:02 UTC) #3
arv (Not doing code reviews)
LGTM with nits https://codereview.chromium.org/22154002/diff/8001/ui/webui/resources/js/cr/ui/context_menu_handler.js File ui/webui/resources/js/cr/ui/context_menu_handler.js (right): https://codereview.chromium.org/22154002/diff/8001/ui/webui/resources/js/cr/ui/context_menu_handler.js#newcode39 ui/webui/resources/js/cr/ui/context_menu_handler.js:39: if (!menu.hasVisibleItem()) hasVisibleItems (plural form) https://codereview.chromium.org/22154002/diff/8001/ui/webui/resources/js/cr/ui/menu.js ...
7 years, 4 months ago (2013-08-07 15:30:40 UTC) #4
yoshiki
Thanks for reviewing. Going to commit. https://codereview.chromium.org/22154002/diff/8001/ui/webui/resources/js/cr/ui/context_menu_handler.js File ui/webui/resources/js/cr/ui/context_menu_handler.js (right): https://codereview.chromium.org/22154002/diff/8001/ui/webui/resources/js/cr/ui/context_menu_handler.js#newcode39 ui/webui/resources/js/cr/ui/context_menu_handler.js:39: if (!menu.hasVisibleItem()) On ...
7 years, 4 months ago (2013-08-07 15:45:41 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoshiki@chromium.org/22154002/15001
7 years, 4 months ago (2013-08-07 15:46:02 UTC) #6
commit-bot: I haz the power
7 years, 4 months ago (2013-08-07 18:52:31 UTC) #7
Message was sent while issue was closed.
Change committed as 216241

Powered by Google App Engine
This is Rietveld 408576698