Index: chrome/browser/renderer_host/render_widget_host_view_win.cc |
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc |
index 45714a27d26282d6bb83bc7d74235d50238e1ebf..602072d3fe0f0a5cdd7f7bf97f76ed5374bdfd58 100644 |
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc |
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc |
@@ -366,19 +366,25 @@ void RenderWidgetHostViewWin::WasHidden() { |
} |
void RenderWidgetHostViewWin::SetSize(const gfx::Size& size) { |
+ gfx::Rect rect = GetViewBounds(); |
Peter Kasting
2011/02/24 18:34:21
Nit: I just realized this function could be simple
honten.org
2011/02/25 01:15:37
Done.
|
+ rect.set_size(size); |
+ SetBounds(rect); |
+} |
+ |
+void RenderWidgetHostViewWin::SetBounds(const gfx::Rect& rect) { |
if (is_hidden_) |
return; |
- // No SWP_NOREDRAW as autofill popups can resize and the underneath window |
+ // No SWP_NOREDRAW as autofill popups can move and the underneath window |
// should redraw in that case. |
UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | |
- SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; |
- SetWindowPos(NULL, 0, 0, size.width(), size.height(), swp_flags); |
+ SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; |
+ gfx::Rect org_rect = GetViewBounds(); |
Peter Kasting
2011/02/24 18:34:21
Nit: This is unused, delete it
honten.org
2011/02/25 01:15:37
Done.
|
+ SetWindowPos(NULL, rect.x(), rect.y(), rect.width(), rect.height(), |
+ swp_flags); |
if (compositor_host_window_) { |
- ::SetWindowPos(compositor_host_window_, |
- NULL, |
- 0, 0, |
- size.width(), size.height(), |
+ ::SetWindowPos(compositor_host_window_, NULL, rect.x(), rect.y(), |
+ rect.width(), rect.height(), |
SWP_NOSENDCHANGING | SWP_NOCOPYBITS | SWP_NOZORDER | SWP_NOACTIVATE); |
} |
render_widget_host_->WasResized(); |