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

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

Issue 9489003: aura: Fix popup window positioning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 8 years, 10 months 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 8ff2a0b3f838ca0a253ac6b95f0d9d2e0c76aca4..6fc7350b8448b76a954bb4f464742c63cfe06e5a 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -173,15 +173,8 @@ void RenderWidgetHostViewAura::InitAsPopup(
window_->SetName("RenderWidgetHostViewAura");
window_->SetParent(NULL);
+ SetBounds(pos);
Show();
-
- // |pos| is in root window coordinates. So convert it to
- // |popup_parent_host_view_|'s coordinates first.
- gfx::Point origin = pos.origin();
- aura::Window::ConvertPointToWindow(
- window_->GetRootWindow(),
- popup_parent_host_view_->window_, &origin);
- SetBounds(gfx::Rect(origin, pos.size()));
}
void RenderWidgetHostViewAura::InitAsFullscreen(
@@ -213,20 +206,7 @@ void RenderWidgetHostViewAura::SetSize(const gfx::Size& size) {
}
void RenderWidgetHostViewAura::SetBounds(const gfx::Rect& rect) {
- gfx::Rect adjusted_rect = rect;
-
- if (popup_parent_host_view_) {
- gfx::Point translated_origin = adjusted_rect.origin();
- // |rect| is relative to |popup_parent_host_view_|; translate it for the
- // window's container.
- aura::Window::ConvertPointToWindow(
- popup_parent_host_view_->window_,
- window_->parent(),
- &translated_origin);
- adjusted_rect.set_origin(translated_origin);
- }
-
- window_->SetBounds(adjusted_rect);
+ window_->SetBounds(rect);
host_->WasResized();
}
« 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