Index: content/renderer/render_widget.cc |
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc |
index d4c3ac0cfd952ec8df8051347de27672e1e6dfd4..fa1900addeabd7fdbf3dff7e3f98b23ca07604dd 100644 |
--- a/content/renderer/render_widget.cc |
+++ b/content/renderer/render_widget.cc |
@@ -329,6 +329,7 @@ bool RenderWidget::Send(IPC::Message* message) { |
} |
void RenderWidget::Resize(const gfx::Size& new_size, |
+ const gfx::Size& physical_backing_size, |
const gfx::Rect& resizer_rect, |
bool is_fullscreen, |
ResizeAck resize_ack) { |
@@ -340,7 +341,10 @@ void RenderWidget::Resize(const gfx::Size& new_size, |
if (!webwidget_) |
return; |
- // Remember the rect where the resize corner will be drawn. |
+ if (compositor_) |
+ compositor_->setViewportSize(new_size, physical_backing_size); |
+ |
+ physical_backing_size_ = physical_backing_size_; |
resizer_rect_ = resizer_rect; |
// NOTE: We may have entered fullscreen mode without changing our size. |
@@ -414,9 +418,11 @@ void RenderWidget::OnCreatingNewAck() { |
} |
void RenderWidget::OnResize(const gfx::Size& new_size, |
+ const gfx::Size& physical_backing_size, |
const gfx::Rect& resizer_rect, |
bool is_fullscreen) { |
- Resize(new_size, resizer_rect, is_fullscreen, SEND_RESIZE_ACK); |
+ Resize(new_size, physical_backing_size, resizer_rect, is_fullscreen, |
+ SEND_RESIZE_ACK); |
} |
void RenderWidget::OnChangeResizeRect(const gfx::Rect& resizer_rect) { |
@@ -1347,6 +1353,7 @@ void RenderWidget::initializeLayerTreeView( |
return; |
compositor_->setRootLayer(root_layer); |
+ compositor_->setViewportSize(size_, physical_backing_size_); |
if (init_complete_) |
compositor_->setSurfaceReady(); |
} |