Description[Mac] Allow vibrancy & transparency on WebContentsView
In order to make a view vibrant we need to:
1. Place the view inside NSVisualEffectView
2. Return YES from allowsVibrancy
In order to make it possible to use WebContentsViewCocoa in vibrant view hierarchy, we need to implement allowsVibrancy.
From NSView documentation for allowsVibrancy:
"AppKit checks this property when the view is incorporated into a view hierarchy that uses vibrancy."
This means that only returning YES from allowsVibrancy will have no effect on the way view is rendered, we are safe to just return YES here.
Note: returning YES from isOpaque causes problems with vibrancy, that is why a setter is needed on RenderWidgetHostViewCocoa.
Committed: https://crrev.com/9b7defaa80bca9d488021c36df27fc94ef446496
Cr-Commit-Position: refs/heads/master@{#316210}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Add comment to [WebContentsViewCocoa allowsVibrancy] #
Messages
Total messages: 29 (9 generated)
|