| Index: ui/views/controls/menu/menu_controller.cc
|
| diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
|
| index d24124aa2d95a1cfa7e0222469ab3e42bfa47be3..7fbccfb223b8e7d5e2df0610efa01d083c8ee63a 100644
|
| --- a/ui/views/controls/menu/menu_controller.cc
|
| +++ b/ui/views/controls/menu/menu_controller.cc
|
| @@ -50,6 +50,10 @@ static const int kShowDelay = 400;
|
| // Amount of time from when the drop exits the menu and the menu is hidden.
|
| static const int kCloseOnExitTime = 1200;
|
|
|
| +// If a context menu is invoked by touch, we shift the menu by this offset so
|
| +// that the finger does not obscure the menu.
|
| +static const int kCenteredContextMenuYOffset = -15;
|
| +
|
| namespace views {
|
|
|
| namespace {
|
| @@ -1091,6 +1095,8 @@ void MenuController::UpdateInitialLocation(
|
| // nicely and menus close prematurely.
|
| pending_state_.initial_bounds.Inset(0, 1);
|
| }
|
| + if (position == MenuItemView::BOTTOMCENTER)
|
| + pending_state_.initial_bounds.Offset(0, kCenteredContextMenuYOffset);
|
|
|
| // Reverse anchor position for RTL languages.
|
| if (base::i18n::IsRTL()) {
|
|
|