Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 8555020: aura: Fix popup window positioning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
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 39ff64a863d11f5a0cad44a8cde2a32f3eba377a..f89fc2dc965fc5a227471b70925c85f19541767b 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 coordinate. So convert it to
Ben Goodger (Google) 2011/11/14 23:36:17 coordinates
sadrul 2011/11/14 23:42:51 Done.
+ // |popup_parent_host_view_|'s coordinate first.
Ben Goodger (Google) 2011/11/14 23:36:17 coordinates
sadrul 2011/11/14 23:42:51 Done.
+ gfx::Point origin = pos.origin();
+ aura::Window::ConvertPointToWindow(
+ static_cast<aura::Window*>(aura::Desktop::GetInstance()),
Ben Goodger (Google) 2011/11/14 23:36:17 cast isn't necessary?
sadrul 2011/11/14 23:42:51 Indeed. Removed.
+ popup_parent_host_view_->window_, &origin);
+ SetBounds(gfx::Rect(origin, pos.size()));
}
void RenderWidgetHostViewAura::InitAsFullscreen(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698