Index: content/browser/frame_host/render_widget_host_view_child_frame.cc |
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc |
index eeaac95753fdf487fbebbd36a1a28fe3f22e65ab..6b12d18ad098e4d1283845aa0fde29ac79b7f89e 100644 |
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc |
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc |
@@ -59,6 +59,7 @@ RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame( |
ack_pending_count_(0), |
frame_connector_(nullptr), |
begin_frame_source_(nullptr), |
+ background_color_(SK_ColorWHITE), |
weak_factory_(this) { |
id_allocator_.reset(new cc::LocalSurfaceIdAllocator()); |
auto* manager = GetSurfaceManager(); |
@@ -226,9 +227,15 @@ RenderWidgetHostViewChildFrame::GetNativeViewAccessible() { |
} |
void RenderWidgetHostViewChildFrame::SetBackgroundColor(SkColor color) { |
- RenderWidgetHostViewBase::SetBackgroundColor(color); |
- bool opaque = GetBackgroundOpaque(); |
- host_->SetBackgroundOpaque(opaque); |
+ background_color_ = color; |
+ |
+ DCHECK(SkColorGetA(color) == SK_AlphaOPAQUE || |
+ SkColorGetA(color) == SK_AlphaTRANSPARENT); |
+ host_->SetBackgroundOpaque(SkColorGetA(color) == SK_AlphaOPAQUE); |
+} |
+ |
+SkColor RenderWidgetHostViewChildFrame::background_color() const { |
+ return background_color_; |
} |
gfx::Size RenderWidgetHostViewChildFrame::GetPhysicalBackingSize() const { |