summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-27 22:07:18 +0000
committerpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-27 22:07:18 +0000
commit06ed413ad1f5bf8e6487382dcf7f5fb9ba282da8 (patch)
tree7b90db338becc8d35d1b1196e99cbd637cce053b
parent9541a9acf9062af72674d37bd99c8aa404b182ee (diff)
downloadchromium_src-06ed413ad1f5bf8e6487382dcf7f5fb9ba282da8.zip
chromium_src-06ed413ad1f5bf8e6487382dcf7f5fb9ba282da8.tar.gz
chromium_src-06ed413ad1f5bf8e6487382dcf7f5fb9ba282da8.tar.bz2
Fix a popup menu offset bug.
BUG=8389 Review URL: http://codereview.chromium.org/99075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14673 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index 9e6b88f..da5347a 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -276,7 +276,9 @@ void RenderWidgetHostViewMac::ShowPopupWithItems(
int selected_item,
const std::vector<WebMenuItem>& items) {
NSRect view_rect = [cocoa_view_ bounds];
- NSRect position = NSMakeRect(bounds.x(), bounds.y() - bounds.height(),
+ NSRect parent_rect = [parent_view_ bounds];
+ int y_offset = bounds.y() + bounds.height();
+ NSRect position = NSMakeRect(bounds.x(), parent_rect.size.height - y_offset,
bounds.width(), bounds.height());
// Display the menu.