Index: content/browser/renderer_host/render_widget_host_impl.cc |
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
index 85108c053db54eb8daea217da1176964d6d4d462..daba667757bc0b06966c7747ee1da73842a9dc54 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.cc |
+++ b/content/browser/renderer_host/render_widget_host_impl.cc |
@@ -481,26 +481,30 @@ void RenderWidgetHostImpl::WasResized() { |
gfx::Rect view_bounds = view_->GetViewBounds(); |
gfx::Size new_size(view_bounds.size()); |
+ gfx::Size old_physical_backing_size = physical_backing_size_; |
+ physical_backing_size_ = view_->GetPhysicalBackingSize(); |
bool was_fullscreen = is_fullscreen_; |
is_fullscreen_ = IsFullscreen(); |
- bool fullscreen_changed = was_fullscreen != is_fullscreen_; |
+ |
bool size_changed = new_size != current_size_; |
+ bool side_payload_changed = |
+ old_physical_backing_size != physical_backing_size_ || |
+ was_fullscreen != is_fullscreen_; |
- // Avoid asking the RenderWidget to resize to its current size, since it |
- // won't send us a PaintRect message in that case. |
- if (!size_changed && !fullscreen_changed) |
+ if (!size_changed && !side_payload_changed) |
return; |
if (in_flight_size_ != gfx::Size() && new_size == in_flight_size_ && |
- !fullscreen_changed) |
+ !side_payload_changed) |
return; |
- // We don't expect to receive an ACK when the requested size is empty. |
+ // We don't expect to receive an ACK when the requested size is empty or when |
+ // the main viewport size didn't change. |
if (!new_size.IsEmpty() && size_changed) |
resize_ack_pending_ = true; |
- if (!Send(new ViewMsg_Resize(routing_id_, new_size, |
- GetRootWindowResizerRect(), is_fullscreen_))) { |
+ if (!Send(new ViewMsg_Resize(routing_id_, new_size, physical_backing_size_, |
+ GetRootWindowResizerRect(), is_fullscreen_))) { |
resize_ack_pending_ = false; |
} else { |
in_flight_size_ = new_size; |