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 8fbaad82ee016e1739ea068b586ac9b7a0ab1629..61aa218fde97d6ff2a0b46b667da573b7e579161 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -677,17 +677,7 @@ void RenderWidgetHostViewAura::InitAsPopup( |
aura::RootWindow* root = popup_parent_host_view_->window_->GetRootWindow(); |
window_->SetDefaultParentByRootWindow(root, bounds_in_screen); |
- // TODO(erg): While I could make sure details of the StackingClient are |
- // hidden behind aura, hiding the details of the ScreenPositionClient will |
- // take another effort. |
- aura::client::ScreenPositionClient* screen_position_client = |
- aura::client::GetScreenPositionClient(root); |
- gfx::Point origin_in_parent(bounds_in_screen.origin()); |
- if (screen_position_client) { |
- screen_position_client->ConvertPointFromScreen( |
- window_->parent(), &origin_in_parent); |
- } |
- SetBounds(gfx::Rect(origin_in_parent, bounds_in_screen.size())); |
+ SetBounds(bounds_in_screen); |
Show(); |
} |
@@ -763,11 +753,22 @@ void RenderWidgetHostViewAura::WasHidden() { |
} |
void RenderWidgetHostViewAura::SetSize(const gfx::Size& size) { |
- SetBounds(gfx::Rect(window_->bounds().origin(), size)); |
+ gfx::Rect bounds = window_->GetBoundsInScreen(); |
+ bounds.set_size(size); |
+ SetBounds(bounds); |
} |
void RenderWidgetHostViewAura::SetBounds(const gfx::Rect& rect) { |
- window_->SetBounds(rect); |
+ aura::RootWindow* root_window = window_->GetRootWindow(); |
sky
2013/07/22 14:48:28
Please add a comment as to why this is necessary.
|
+ aura::client::ScreenPositionClient* screen_position_client = |
+ aura::client::GetScreenPositionClient(root_window); |
sky
2013/07/22 14:48:28
nit: indent 2 more.
|
+ gfx::Point origin_in_parent(rect.origin()); |
+ if (screen_position_client) { |
+ screen_position_client->ConvertPointFromScreen( |
+ window_->parent(), &origin_in_parent); |
+ } |
+ |
+ window_->SetBounds(gfx::Rect(origin_in_parent, rect.size())); |
host_->WasResized(); |
MaybeCreateResizeLock(); |
if (touch_editing_client_) { |