summaryrefslogtreecommitdiffstats
path: root/chrome/views/root_view.cc
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-10 21:31:59 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-10 21:31:59 +0000
commitf704ee742d36f65d92893873f9c23e743cbc0608 (patch)
tree610817635f24e86646f7810259f5639cafec4cca /chrome/views/root_view.cc
parentf7a391a1808906f50e978355e911e2f7c2c31eb2 (diff)
downloadchromium_src-f704ee742d36f65d92893873f9c23e743cbc0608.zip
chromium_src-f704ee742d36f65d92893873f9c23e743cbc0608.tar.gz
chromium_src-f704ee742d36f65d92893873f9c23e743cbc0608.tar.bz2
Changes tree/table to pass in an appropriate location when the context
menu is invoked from the keyboard. BUG=4029 TEST=In the bookmark manager bring up the context menu of the tree/table via the menu key and make sure the menu appears at a reasonable location. Review URL: http://codereview.chromium.org/10256 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5125 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/root_view.cc')
-rw-r--r--chrome/views/root_view.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/views/root_view.cc b/chrome/views/root_view.cc
index aa8f1b3..4b4027d 100644
--- a/chrome/views/root_view.cc
+++ b/chrome/views/root_view.cc
@@ -805,8 +805,8 @@ void RootView::ProcessKeyEvent(const KeyEvent& event) {
(event.GetCharacter() == VK_F10 && event.IsShiftDown())) {
v = GetFocusedView();
if (v->IsEnabled()) {
- v->ShowContextMenu(v->x() + (v->width() / 2),
- v->y() + (v->height() / 2), false);
+ gfx::Point screen_loc = v->GetKeyboardContextMenuLocation();
+ v->ShowContextMenu(screen_loc.x(), screen_loc.y(), false);
return;
}
}