diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 00:44:56 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-15 00:44:56 +0000 |
commit | 18a8f2d02a3d4ab14301b56bcbc2ed2beade4bab (patch) | |
tree | 399f084dc756c36b99ba1bf76f243639d764bdfd /content/browser/renderer_host | |
parent | ef362466544a6b3007f8ac44cee16a3e1a720dd9 (diff) | |
download | chromium_src-18a8f2d02a3d4ab14301b56bcbc2ed2beade4bab.zip chromium_src-18a8f2d02a3d4ab14301b56bcbc2ed2beade4bab.tar.gz chromium_src-18a8f2d02a3d4ab14301b56bcbc2ed2beade4bab.tar.bz2 |
aura: Fix popup window positioning.
Comboboxes in a web-page show up in the wrong place if the browser window is not
positioned at (0,0).
BUG=104224
TEST=manually
Review URL: http://codereview.chromium.org/8555020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110000 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host')
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_aura.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 39ff64a..fe07237 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -128,7 +128,14 @@ void RenderWidgetHostViewAura::InitAsPopup( window_->SetParent(NULL); Show(); - SetBounds(pos); + + // |pos| is in desktop coordinates. So convert it to + // |popup_parent_host_view_|'s coordinates first. + gfx::Point origin = pos.origin(); + aura::Window::ConvertPointToWindow( + aura::Desktop::GetInstance(), + popup_parent_host_view_->window_, &origin); + SetBounds(gfx::Rect(origin, pos.size())); } void RenderWidgetHostViewAura::InitAsFullscreen( |