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 2ed1c42890ba53f5e6532d609fc8b23a61006c17..9d0d19e8ce679bfecf89444937bbf517980a00a7 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -756,6 +756,8 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { |
} |
void RenderWidgetHostViewAura::SetBackgroundColor(SkColor color) { |
+ if (color == background_color()) |
+ return; |
RenderWidgetHostViewBase::SetBackgroundColor(color); |
bool opaque = GetBackgroundOpaque(); |
host_->SetBackgroundOpaque(opaque); |
@@ -906,6 +908,12 @@ void RenderWidgetHostViewAura::OnSwapCompositorFrame( |
cc::CompositorFrame frame) { |
TRACE_EVENT0("content", "RenderWidgetHostViewAura::OnSwapCompositorFrame"); |
+ // Override the background color to the current compositor background. |
+ // This allows us to, when navigating to a new page, transfer this color to |
+ // that page. This allows us to pass this background color to new views on |
+ // navigation. |
+ SetBackgroundColor(frame.metadata.root_background_color); |
+ |
last_scroll_offset_ = frame.metadata.root_scroll_offset; |
if (frame.render_pass_list.empty()) |
return; |