fix: [mac] restore SetBackgroundColor functionality
This commit is contained in:
		
					parent
					
						
							
								373ffa9fee
							
						
					
				
			
			
				commit
				
					
						30850f491f
					
				
			
		
					 1 changed files with 1 additions and 6 deletions
				
			
		|  | @ -997,20 +997,15 @@ bool NativeWindowMac::IsKiosk() { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void NativeWindowMac::SetBackgroundColor(SkColor color) { | void NativeWindowMac::SetBackgroundColor(SkColor color) { | ||||||
|   NOTIMPLEMENTED() << "TODO"; |  | ||||||
|   /* |  | ||||||
|   base::ScopedCFTypeRef<CGColorRef> cgcolor( |   base::ScopedCFTypeRef<CGColorRef> cgcolor( | ||||||
|       skia::CGColorCreateFromSkColor(color)); |       skia::CGColorCreateFromSkColor(color)); | ||||||
|   // views::Widget adds a layer for the content view. |   // views::Widget adds a layer for the content view. | ||||||
|   auto* bridge = views::NativeWidgetMac::GetBridgeForNativeWindow(window_); |   auto* bridge = views::NativeWidgetMac::GetBridgeForNativeWindow(window_); | ||||||
|   NSView* compositor_superview = |   auto* compositor_superview = bridge->ns_view(); | ||||||
|       static_cast<ui::AcceleratedWidgetMacNSView*>(bridge) |  | ||||||
|           ->AcceleratedWidgetGetNSView(); |  | ||||||
|   [[compositor_superview layer] setBackgroundColor:cgcolor]; |   [[compositor_superview layer] setBackgroundColor:cgcolor]; | ||||||
|   // When using WebContents as content view, the contentView also has layer. |   // When using WebContents as content view, the contentView also has layer. | ||||||
|   if ([[window_ contentView] wantsLayer]) |   if ([[window_ contentView] wantsLayer]) | ||||||
|     [[[window_ contentView] layer] setBackgroundColor:cgcolor]; |     [[[window_ contentView] layer] setBackgroundColor:cgcolor]; | ||||||
|     */ |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void NativeWindowMac::SetHasShadow(bool has_shadow) { | void NativeWindowMac::SetHasShadow(bool has_shadow) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jeremy Apthorp
				Jeremy Apthorp