Commit 18a8f2d0 authored by sadrul@chromium.org's avatar sadrul@chromium.org

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
parent ef362466
...@@ -128,7 +128,14 @@ void RenderWidgetHostViewAura::InitAsPopup( ...@@ -128,7 +128,14 @@ void RenderWidgetHostViewAura::InitAsPopup(
window_->SetParent(NULL); window_->SetParent(NULL);
Show(); 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( void RenderWidgetHostViewAura::InitAsFullscreen(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment