From 35164e672e636d3a281b7bb610f55e31ad0b97b4 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 22 Sep 2015 13:20:04 +0200 Subject: [PATCH] Mac: Fix background color (issue #1161) --- patch/patch.cfg | 6 ++++++ patch/patches/render_widget_host_1070383005.patch | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 patch/patches/render_widget_host_1070383005.patch diff --git a/patch/patch.cfg b/patch/patch.cfg index 52b7f5f6d..21bc36ae8 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -211,4 +211,10 @@ patches = [ 'name': 'widevine_cdm_1631', 'path': '../media/cdm/stub/', }, + { + # Fix background color on Mac. + # https://codereview.chromium.org/1070383005 (reverted) + 'name': 'render_widget_host_1070383005', + 'path': '../content/browser/renderer_host/', + }, ] diff --git a/patch/patches/render_widget_host_1070383005.patch b/patch/patches/render_widget_host_1070383005.patch new file mode 100644 index 000000000..63625f984 --- /dev/null +++ b/patch/patches/render_widget_host_1070383005.patch @@ -0,0 +1,14 @@ +diff --git render_widget_host_view_mac.mm render_widget_host_view_mac.mm +index b060993..60ecb70 100644 +--- render_widget_host_view_mac.mm ++++ render_widget_host_view_mac.mm +@@ -569,9 +569,6 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget, + // Paint this view host with |background_color_| when there is no content + // ready to draw. + background_layer_.reset([[CALayer alloc] init]); +- // Set the default color to be white. This is the wrong thing to do, but many +- // UI components expect this view to be opaque. +- [background_layer_ setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)]; + [cocoa_view_ setLayer:background_layer_]; + [cocoa_view_ setWantsLayer:YES]; +