Chromium Code Reviews| 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..4fcf7711c7e8b343783dffbf75b5d97b252f084c 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( |
| @@ -214,18 +207,6 @@ 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); |
|
tfarina
2012/02/29 16:35:59
nit: you don't need the temp here too. Just do:
wi
yoshiki
2012/03/01 03:05:10
Done.
|
| host_->WasResized(); |
| } |