|
|
Created:
5 years, 11 months ago by joleksy Modified:
5 years, 10 months ago Reviewers:
pink (ping after 24hrs), Alexei Svitkine (slow), Avi (use Gerrit), ccameron CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
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] #
Created: 5 years, 11 months ago
Messages
Total messages: 29 (9 generated)
joleksy@opera.com changed reviewers: + asvitkine@chromium.org
@reviewer: does it look OK to you?
https://codereview.chromium.org/869563003/diff/1/content/browser/web_contents... File content/browser/web_contents/web_contents_view_mac.mm (right): https://codereview.chromium.org/869563003/diff/1/content/browser/web_contents... content/browser/web_contents/web_contents_view_mac.mm:427: return YES; What's the effect of returning YES here? Does it change behavior by default or is it dependent on something else? (e.g. the view being opaque) If it doesn't change anything on its own, please document that here in a comment. (If it does change things, then probably we should make it configurable unless Chrome decides to actually adopt the changed behavior/appearance.)
https://codereview.chromium.org/869563003/diff/1/content/browser/web_contents... File content/browser/web_contents/web_contents_view_mac.mm (right): https://codereview.chromium.org/869563003/diff/1/content/browser/web_contents... content/browser/web_contents/web_contents_view_mac.mm:427: return YES; On 2015/01/22 16:41:21, Alexei Svitkine wrote: > What's the effect of returning YES here? > > Does it change behavior by default or is it dependent on something else? (e.g. > the view being opaque) > > If it doesn't change anything on its own, please document that here in a > comment. > > (If it does change things, then probably we should make it configurable unless > Chrome decides to actually adopt the changed behavior/appearance.) By itself it does not change anything, from the documentation: "AppKit checks this property when the view is incorporated into a view hierarchy that uses vibrancy." This means that in order to actually change how this view looks it would have to be put inside a vibrant hierarchy (i.e. within NSVisualEffectView). I will add comment.
lgtm
The CQ bit was checked by joleksy@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/869563003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
joleksy@opera.com changed reviewers: + pinkerton@chromium.org
On 2015/01/23 15:12:41, I haz the power (commit-bot) wrote: > Try jobs failed on following builders: > chromium_presubmit on tryserver.chromium.linux > (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) Missing LGTM from the owner of web_contents_view_mac.mm. @pink: could you take a look?
pinkerton@chromium.org changed reviewers: + ccameron@chromium.org
ccameron should be the one to take a look at this. I'm also concerned about the general perf impact.
On 2015/01/26 12:46:32, pink wrote: > ccameron should be the one to take a look at this. I'm also concerned about the > general perf impact. The perf impact *should* be none (according to Cocoa documentation), this property is taken into account only if the view is inside vibrant view hierarchy.
On 2015/01/26 15:36:53, joleksy wrote: > On 2015/01/26 12:46:32, pink wrote: > > ccameron should be the one to take a look at this. I'm also concerned about > the > > general perf impact. > > The perf impact *should* be none (according to Cocoa documentation), this > property is taken into account only if the view is inside vibrant view > hierarchy. Anyone?
This lgtm, since the default will be no change.
The CQ bit was checked by joleksy@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/869563003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
On 2015/02/10 08:08:05, I haz the power (commit-bot) wrote: > Try jobs failed on following builders: > chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, > http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) I got: Missing LGTM from an OWNER for these files: content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.mm @ccameron: I thought it was you, do you know what the problem is?
On 2015/02/10 08:52:53, joleksy wrote: > On 2015/02/10 08:08:05, I haz the power (commit-bot) wrote: > > Try jobs failed on following builders: > > chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, > > > http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) > > I got: > Missing LGTM from an OWNER for these files: > content/browser/web_contents/web_contents_view_mac.h > content/browser/web_contents/web_contents_view_mac.mm > > @ccameron: I thought it was you, do you know what the problem is? I don't have web_contents -- just renderer_host and compositor. The only Mac OWNER for content/ is avi@ I should add myself as an owner of web_contents as well.
joleksy@opera.com changed reviewers: + avi@chromium.org
On 2015/02/10 09:18:51, ccameron wrote: > On 2015/02/10 08:52:53, joleksy wrote: > > On 2015/02/10 08:08:05, I haz the power (commit-bot) wrote: > > > Try jobs failed on following builders: > > > chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, > > > > > > http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) > > > > I got: > > Missing LGTM from an OWNER for these files: > > content/browser/web_contents/web_contents_view_mac.h > > content/browser/web_contents/web_contents_view_mac.mm > > > > @ccameron: I thought it was you, do you know what the problem is? > > I don't have web_contents -- just renderer_host and compositor. The only Mac > OWNER for content/ is avi@ > > I should add myself as an owner of web_contents as well. Thanks! Added avi@. @avi: could you take a look?
I'm down with it. LGTM
The CQ bit was checked by joleksy@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/869563003/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/9b7defaa80bca9d488021c36df27fc94ef446496 Cr-Commit-Position: refs/heads/master@{#316210} |