Index: views/controls/menu/menu_controller.cc |
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc |
index 70f1a8b444a89a37e4525f7c68bd3740242d89c0..e1b38aafa1a3c9256e4f763c74bbcc0332b9926a 100644 |
--- a/views/controls/menu/menu_controller.cc |
+++ b/views/controls/menu/menu_controller.cc |
@@ -1031,7 +1031,14 @@ void MenuController::UpdateInitialLocation( |
// nicely and menus close prematurely. |
pending_state_.initial_bounds.Inset(0, 1); |
} |
- pending_state_.anchor = position; |
+ |
+ // Reverse anchor position for RTL languages. |
+ if (base::i18n::IsRTL()) { |
+ pending_state_.anchor = position == MenuItemView::TOPRIGHT ? |
+ MenuItemView::TOPLEFT : MenuItemView::TOPRIGHT; |
+ } else { |
+ pending_state_.anchor = position; |
+ } |
// Calculate the bounds of the monitor we'll show menus on. Do this once to |
// avoid repeated system queries for the info. |