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

Unified Diff: ui/views/controls/menu/submenu_view.cc

Issue 2418523004: Makes Chrome's app menu have a vertical orientation. (Closed)
Patch Set: Moved clarifying comments to a previous line. Created 4 years, 2 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
« no previous file with comments | « ui/views/controls/menu/menu_scroll_view_container.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/submenu_view.cc
diff --git a/ui/views/controls/menu/submenu_view.cc b/ui/views/controls/menu/submenu_view.cc
index a04d83292a64b7fabb80a78afd85b9c39f84f7ca..b09eadd165ffa565afc27361fe59f26a98791c5d 100644
--- a/ui/views/controls/menu/submenu_view.cc
+++ b/ui/views/controls/menu/submenu_view.cc
@@ -182,10 +182,13 @@ gfx::Size SubmenuView::GetPreferredSize() const {
}
void SubmenuView::GetAccessibleState(ui::AXViewState* state) {
- // Inherit most of the state from the parent menu item, except the role.
+ // Inherit most of the state from the parent menu item, except the role and
+ // the orientation.
if (GetMenuItem())
GetMenuItem()->GetAccessibleState(state);
state->role = ui::AX_ROLE_MENU_LIST_POPUP;
+ // Menus in Chrome are always traversed in a vertical direction.
+ state->AddStateFlag(ui::AX_STATE_VERTICAL);
}
void SubmenuView::PaintChildren(const ui::PaintContext& context) {
« no previous file with comments | « ui/views/controls/menu/menu_scroll_view_container.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698