Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Issue 11293124: Remove top and bottom margins from TrayBubbleView (Closed)

Created:
8 years, 1 month ago by bartfab (slow)
Modified:
8 years, 1 month ago
CC:
chromium-reviews, tfarina, alicet1, msw+watch_chromium.org, ben+watch_chromium.org, miket_OOO
Visibility:
Public.

Description

Remove top and bottom margins from TrayBubbleView This CL modifies TrayBubbleView so that instead of ~3px margins filled with a solid color at its top and bottom, the contents extends all the way to the edges. To prevent the content from drawing over the bubble's rounded corners, a mask is set on the hosting widget. Since the masking would not work on Windows non-aura, the previous behavior is preserved there. BUG=159682 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=167967

Patch Set 1 #

Total comments: 8

Patch Set 2 : Comments addressed. Restored previous behavior on Windows non-aura. #

Total comments: 2

Patch Set 3 : Made TrayBubbleView aura-only, removed #ifdefs. #

Total comments: 2

Patch Set 4 : Nit addressed. #

Total comments: 2

Patch Set 5 : Added TODO owner. #

Patch Set 6 : Provide mask layers with device scale information, fixing high-DPI rendering. #

Total comments: 8

Patch Set 7 : Comments addressed. #

Total comments: 6

Patch Set 8 : Comments addressed. #

Total comments: 6

Patch Set 9 : Nits addressed. #

Patch Set 10 : Compile fix. #

Total comments: 2

Patch Set 11 : Nit addressed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -73 lines) Patch
M ash/system/tray/system_tray.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -3 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M ui/message_center/message_bubble_base.cc View 2 1 chunk +0 lines, -1 line 0 comments Download
M ui/message_center/message_popup_bubble.cc View 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/bubble/tray_bubble_view.h View 2 4 chunks +3 lines, -3 lines 0 comments Download
M ui/views/bubble/tray_bubble_view.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +56 lines, -60 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -4 lines 0 comments Download

Messages

Total messages: 50 (0 generated)
bartfab (slow)
Hi Steven, Could you please review the system_tray and message_center changes? Hi Mike, Could you ...
8 years, 1 month ago (2012-11-06 20:58:44 UTC) #1
stevenjb
This seems reasonable, but I'll wait for MSW's review since I'm unfamiliar with how masks ...
8 years, 1 month ago (2012-11-06 21:43:26 UTC) #2
msw
Would BubbleDelegateView::set_color() suffice for this functionality? If not, could we improve support there instead?
8 years, 1 month ago (2012-11-06 22:05:33 UTC) #3
bartfab (slow)
The problem is that a single color is not sufficient. When a submenu is being ...
8 years, 1 month ago (2012-11-06 23:06:41 UTC) #4
bartfab (slow)
https://codereview.chromium.org/11293124/diff/1/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://codereview.chromium.org/11293124/diff/1/ui/views/bubble/tray_bubble_view.cc#newcode133 ui/views/bubble/tray_bubble_view.cc:133: paint.setStyle(SkPaint::kFill_Style); Since this is a mask layer, only alpha ...
8 years, 1 month ago (2012-11-06 23:09:14 UTC) #5
stevenjb
https://codereview.chromium.org/11293124/diff/1/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://codereview.chromium.org/11293124/diff/1/ui/views/bubble/tray_bubble_view.cc#newcode133 ui/views/bubble/tray_bubble_view.cc:133: paint.setStyle(SkPaint::kFill_Style); On 2012/11/06 23:09:14, bartfab wrote: > Since this ...
8 years, 1 month ago (2012-11-06 23:17:44 UTC) #6
bartfab (slow)
Hi Scott, This CL uses layer masking that has existed in Views for a while ...
8 years, 1 month ago (2012-11-06 23:33:07 UTC) #7
sky
https://codereview.chromium.org/11293124/diff/1/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://codereview.chromium.org/11293124/diff/1/ui/views/bubble/tray_bubble_view.cc#newcode120 ui/views/bubble/tray_bubble_view.cc:120: class TrayBubbleContentMask : public ui::Layer, public ui::LayerDelegate { This ...
8 years, 1 month ago (2012-11-07 00:37:04 UTC) #8
bartfab (slow)
https://chromiumcodereview.appspot.com/11293124/diff/1/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://chromiumcodereview.appspot.com/11293124/diff/1/ui/views/bubble/tray_bubble_view.cc#newcode120 ui/views/bubble/tray_bubble_view.cc:120: class TrayBubbleContentMask : public ui::Layer, public ui::LayerDelegate { I ...
8 years, 1 month ago (2012-11-07 12:12:16 UTC) #9
sky
https://codereview.chromium.org/11293124/diff/8001/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://codereview.chromium.org/11293124/diff/8001/ui/views/bubble/tray_bubble_view.cc#newcode332 ui/views/bubble/tray_bubble_view.cc:332: bubble_content_mask_.reset(new TrayBubbleContentMask(bubble_border_)); Can we instead use ClipPath when painting ...
8 years, 1 month ago (2012-11-07 15:30:37 UTC) #10
bartfab (slow)
https://codereview.chromium.org/11293124/diff/8001/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://codereview.chromium.org/11293124/diff/8001/ui/views/bubble/tray_bubble_view.cc#newcode332 ui/views/bubble/tray_bubble_view.cc:332: bubble_content_mask_.reset(new TrayBubbleContentMask(bubble_border_)); The problem is that the ash tray ...
8 years, 1 month ago (2012-11-07 15:34:05 UTC) #11
sky
Sorry for the questions. Why do we need animated layers in the menu? -Scott On ...
8 years, 1 month ago (2012-11-07 17:27:08 UTC) #12
stevenjb
On 2012/11/07 15:34:05, bartfab wrote: > https://codereview.chromium.org/11293124/diff/8001/ui/views/bubble/tray_bubble_view.cc > File ui/views/bubble/tray_bubble_view.cc (right): > > https://codereview.chromium.org/11293124/diff/8001/ui/views/bubble/tray_bubble_view.cc#newcode332 > ...
8 years, 1 month ago (2012-11-07 17:53:43 UTC) #13
stevenjb
Since we do not have a use case that we need to support on Windows, ...
8 years, 1 month ago (2012-11-07 22:08:16 UTC) #14
stevenjb
+ cc:miket@ FYI
8 years, 1 month ago (2012-11-07 22:08:56 UTC) #15
sky
If that's the case, can we exclude compiling the file on windows and get rid ...
8 years, 1 month ago (2012-11-07 22:43:57 UTC) #16
stevenjb
On 2012/11/07 22:43:57, sky wrote: > If that's the case, can we exclude compiling the ...
8 years, 1 month ago (2012-11-07 23:02:04 UTC) #17
bartfab (slow)
The animated layers are used for submenus: When you click on an item in the ...
8 years, 1 month ago (2012-11-08 09:10:41 UTC) #18
bartfab (slow)
> When you say "ash tray context menu" are you referring to the bubble itself ...
8 years, 1 month ago (2012-11-08 09:12:10 UTC) #19
sky
Why does that necessitate using layers? On Thu, Nov 8, 2012 at 1:10 AM, <bartfab@chromium.org> ...
8 years, 1 month ago (2012-11-08 17:06:37 UTC) #20
bartfab (slow)
This is the way it has been implemented by whoever wrote this code in the ...
8 years, 1 month ago (2012-11-08 17:13:34 UTC) #21
sky
I'm not suggesting using layers. If the code is turning on layers on views it ...
8 years, 1 month ago (2012-11-08 17:22:25 UTC) #22
bartfab (slow)
I am a bit confused now. Just to get back in sync: The existing code ...
8 years, 1 month ago (2012-11-08 17:28:57 UTC) #23
sadrul
On 2012/11/08 17:28:57, bartfab wrote: > I am a bit confused now. Just to get ...
8 years, 1 month ago (2012-11-08 17:34:09 UTC) #24
sky
Sadrul set me straight. Go with the ifdef for now. Hopefully not to far in ...
8 years, 1 month ago (2012-11-08 17:42:35 UTC) #25
sky
Sorry, by ifdef I mean not compiling the file at all on windows (non aura). ...
8 years, 1 month ago (2012-11-08 17:43:00 UTC) #26
bartfab (slow)
On 2012/11/08 17:43:00, sky wrote: > Sorry, by ifdef I mean not compiling the file ...
8 years, 1 month ago (2012-11-08 17:44:40 UTC) #27
msw
https://chromiumcodereview.appspot.com/11293124/diff/5002/ui/views/views.gyp File ui/views/views.gyp (right): https://chromiumcodereview.appspot.com/11293124/diff/5002/ui/views/views.gyp#newcode458 ui/views/views.gyp:458: ['exclude', 'bubble/tray_bubble_view.cc'], nit: specific files should be listed in ...
8 years, 1 month ago (2012-11-08 18:32:53 UTC) #28
bartfab (slow)
https://chromiumcodereview.appspot.com/11293124/diff/5002/ui/views/views.gyp File ui/views/views.gyp (right): https://chromiumcodereview.appspot.com/11293124/diff/5002/ui/views/views.gyp#newcode458 ui/views/views.gyp:458: ['exclude', 'bubble/tray_bubble_view.cc'], On 2012/11/08 18:32:54, msw wrote: > nit: ...
8 years, 1 month ago (2012-11-08 18:40:15 UTC) #29
stevenjb
lgtm
8 years, 1 month ago (2012-11-08 19:33:19 UTC) #30
sky
https://chromiumcodereview.appspot.com/11293124/diff/3006/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://chromiumcodereview.appspot.com/11293124/diff/3006/ui/views/bubble/tray_bubble_view.cc#newcode263 ui/views/bubble/tray_bubble_view.cc:263: // Inform host items (models) that their views are ...
8 years, 1 month ago (2012-11-08 20:34:24 UTC) #31
bartfab (slow)
https://chromiumcodereview.appspot.com/11293124/diff/3006/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://chromiumcodereview.appspot.com/11293124/diff/3006/ui/views/bubble/tray_bubble_view.cc#newcode263 ui/views/bubble/tray_bubble_view.cc:263: // Inform host items (models) that their views are ...
8 years, 1 month ago (2012-11-09 09:27:55 UTC) #32
sky
Nice, LGTM
8 years, 1 month ago (2012-11-09 17:25:53 UTC) #33
bartfab (slow)
Hi Antoine, Could you take a look at the ui/compositor/layer.cc change? As far as I ...
8 years, 1 month ago (2012-11-12 18:16:18 UTC) #34
msw
https://codereview.chromium.org/11293124/diff/12002/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://codereview.chromium.org/11293124/diff/12002/ui/views/bubble/tray_bubble_view.cc#newcode125 ui/views/bubble/tray_bubble_view.cc:125: class TrayBubbleContentMask : public ui::Layer, public ui::LayerDelegate { Include ...
8 years, 1 month ago (2012-11-12 19:15:02 UTC) #35
bartfab (slow)
https://codereview.chromium.org/11293124/diff/12002/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://codereview.chromium.org/11293124/diff/12002/ui/views/bubble/tray_bubble_view.cc#newcode125 ui/views/bubble/tray_bubble_view.cc:125: class TrayBubbleContentMask : public ui::Layer, public ui::LayerDelegate { On ...
8 years, 1 month ago (2012-11-13 09:58:54 UTC) #36
msw
tray_bubble_view.cc LGTM with nits and out-of-lining (or opposing consensus). https://codereview.chromium.org/11293124/diff/5005/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://codereview.chromium.org/11293124/diff/5005/ui/views/bubble/tray_bubble_view.cc#newcode129 ui/views/bubble/tray_bubble_view.cc:129: ...
8 years, 1 month ago (2012-11-13 17:03:26 UTC) #37
bartfab (slow)
https://chromiumcodereview.appspot.com/11293124/diff/5005/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://chromiumcodereview.appspot.com/11293124/diff/5005/ui/views/bubble/tray_bubble_view.cc#newcode129 ui/views/bubble/tray_bubble_view.cc:129: TrayBubbleContentMask(int corner_radius) : layer_(ui::LAYER_TEXTURED), On 2012/11/13 17:03:26, msw wrote: ...
8 years, 1 month ago (2012-11-13 17:16:11 UTC) #38
msw
Sorry, I got a couple more nits. https://chromiumcodereview.appspot.com/11293124/diff/17003/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://chromiumcodereview.appspot.com/11293124/diff/17003/ui/views/bubble/tray_bubble_view.cc#newcode129 ui/views/bubble/tray_bubble_view.cc:129: TrayBubbleContentMask(int corner_radius); ...
8 years, 1 month ago (2012-11-13 20:28:04 UTC) #39
bartfab (slow)
https://chromiumcodereview.appspot.com/11293124/diff/17003/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://chromiumcodereview.appspot.com/11293124/diff/17003/ui/views/bubble/tray_bubble_view.cc#newcode129 ui/views/bubble/tray_bubble_view.cc:129: TrayBubbleContentMask(int corner_radius); On 2012/11/13 20:28:04, msw wrote: > nit: ...
8 years, 1 month ago (2012-11-13 20:41:15 UTC) #40
msw
LGTM with one last nit (I'm very sorry for the churn). https://chromiumcodereview.appspot.com/11293124/diff/10005/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): ...
8 years, 1 month ago (2012-11-13 21:13:38 UTC) #41
bartfab (slow)
All done. Only waiting for Antoine's review now. https://chromiumcodereview.appspot.com/11293124/diff/10005/ui/views/bubble/tray_bubble_view.cc File ui/views/bubble/tray_bubble_view.cc (right): https://chromiumcodereview.appspot.com/11293124/diff/10005/ui/views/bubble/tray_bubble_view.cc#newcode167 ui/views/bubble/tray_bubble_view.cc:167: float ...
8 years, 1 month ago (2012-11-14 10:02:56 UTC) #42
bartfab (slow)
Hi Jonathan, Could you take a look at the ui/compositor/layer.cc change? I had asked Antoine ...
8 years, 1 month ago (2012-11-15 15:52:56 UTC) #43
jonathan.backer
lgtm
8 years, 1 month ago (2012-11-15 15:58:41 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/11293124/13012
8 years, 1 month ago (2012-11-15 16:36:49 UTC) #45
commit-bot: I haz the power
Change committed as 167967
8 years, 1 month ago (2012-11-15 18:35:28 UTC) #46
piman
On Mon, Nov 12, 2012 at 10:16 AM, <bartfab@chromium.org> wrote: > Hi Antoine, > > ...
8 years, 1 month ago (2012-11-19 23:03:28 UTC) #47
bartfab (slow)
I will try on a Lucas tomorrow. On 2012/11/19 23:03:28, piman wrote: > On Mon, ...
8 years, 1 month ago (2012-11-19 23:18:43 UTC) #48
bartfab (slow)
I just tested performance against a build from ~2 weeks ago. There appear to be ...
8 years, 1 month ago (2012-11-20 13:18:41 UTC) #49
bartfab (slow)
8 years, 1 month ago (2012-11-22 15:59:36 UTC) #50
As a final data point before I let this CL rest in peace: I just verified that
there are no performance regressions when the bubble is open and/or being
scrolled on Mario either.

On 2012/11/20 13:18:41, bartfab wrote:
> I just tested performance against a build from ~2 weeks ago. There appear to
be
> no regression. The bubble is snappy, an HTML5 benchmark running while the
bubble
> is open reaches the same speeds as it did with the older build.
> 
> On 2012/11/19 23:18:43, bartfab wrote:
> > I will try on a Lucas tomorrow.
> > 
> > On 2012/11/19 23:03:28, piman wrote:
> > > On Mon, Nov 12, 2012 at 10:16 AM, <mailto:bartfab@chromium.org> wrote:
> > > 
> > > > Hi Antoine,
> > > >
> > > > Could you take a look at the ui/compositor/layer.cc change? As far as I
> can
> > > > tell, nobody else is actually using mask layers in Views - hence, nobody
> > > > noticed
> > > > that they do not pick up scale settings.
> > > >
> > > 
> > > LGTM for that, but FYI, masks are very expensive. Did you check the
> > > performance on device? I would hate for the frame rate to drop when a
> > > bubble comes up.
> > > 
> > > Antoine
> > > 
> > > 
> > > > Hi Mike,
> > > >
> > > > Could you do an owner review for the tray_bubble_view changes when you
> have
> > > > time?
> > > >
> > > >
> > >
> >
>
https://codereview.chromium.**org/11293124/%25253Chttps://codereview.chromium...>
> > > >

Powered by Google App Engine
This is Rietveld 408576698