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

Issue 6609047: [linux_views][Win] spoof proof redesign infobar extension with tab. (Closed)

Created:
9 years, 9 months ago by Sheridan Rawlins
Modified:
9 years, 6 months ago
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, pam+watch_chromium.org
Visibility:
Public.

Description

[linux_views][Win] spoof proof redesign infobar extension with tab. This Refactor causes InfoBarViews to be layout overlapping each other. This has the following benefits: - InfoBarBackground can draw one gradient from top of tab to bottom of the bar. - InfoBarView can draw everything including its tab at the same time. - If the image needs to be drawn into the tab area, it may be drawn exactly one time (instead of in two chunks). It had the following challenges: - Because all InfoBarViews may be animating independently, all of InfoBarContainer's children must be considered to find the overlay amount |bar_height|. - clipPath has a bug in skia where text is not clipped, so a rectangle is used currently. - InfoBarView must InvalidateLayout when animating because changing the tab height on the lowest InfoBarView does not cause the bounds of InfoBarContainer to change. Note: Hit testing was not tackled in this CL. it doesn't seem to cause a problem with underlying bookmarks because the InfoBarView doesn't intercept events and none of its children which do overlap the toolbar separator. Summary of changes: - Draw tab not arrow. - Prepare/cache the stroke & fill paths in InfoBarView::OnBoundsChanged - Move tab drawing iniation from BrowserView::PaintChildren to InfoBarBackground, which fills & strokes the paths. - Overlap the infobars during layout (InfoBarContainer & BrowserViewLayout) so that InfoBarView/InfoBarBackground can draw all of the bar & tab within its bounds. - Center the icon within the tab (horizontally & vertically). - Animate by sliding the bar downward, then sliding the tab upwards. BUG=74437 TEST=Browse to http://russia.ru to cause translate infobar. Kill the flash plugin to cause another infobar. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=77397

Patch Set 1 #

Total comments: 28

Patch Set 2 : nits, 1 animation, vertical_overlap, path fix #

Patch Set 3 : Cast stroke width. #

Total comments: 45

Patch Set 4 : More review changes. #

Patch Set 5 : more review changes. #

Patch Set 6 : Offset stroke path by 0.5, 0.5. #

Patch Set 7 : No slow animation. #

Patch Set 8 : Pulled latest. #

Total comments: 18

Patch Set 9 : nit fixes. #

Total comments: 10

Patch Set 10 : renames, don't const_cast, ditch InfoBarView::VerticalOffset. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -109 lines) Patch
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view_layout.cc View 1 2 3 1 chunk +10 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_background.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_background.cc View 1 2 3 4 5 6 7 8 2 chunks +34 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_container.h View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_container.cc View 1 2 3 4 5 6 7 8 9 3 chunks +30 lines, -16 lines 0 comments Download
M chrome/browser/ui/views/infobars/infobar_view.h View 1 2 3 4 5 6 7 8 9 5 chunks +22 lines, -9 lines 1 comment Download
M chrome/browser/ui/views/infobars/infobar_view.cc View 1 2 3 4 5 6 7 8 7 chunks +105 lines, -61 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Sheridan Rawlins
Peter - you are the most involved in InfoBar refactoring, and I look forward to ...
9 years, 9 months ago (2011-03-04 02:23:19 UTC) #1
Peter Kasting
Please update your checkout to get my latest refactoring bits. http://codereview.chromium.org/6609047/diff/1/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): http://codereview.chromium.org/6609047/diff/1/chrome/browser/ui/views/frame/browser_view.cc#newcode1811 ...
9 years, 9 months ago (2011-03-04 22:23:41 UTC) #2
Sheridan Rawlins
Updates from Peter's review. http://codereview.chromium.org/6609047/diff/1/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): http://codereview.chromium.org/6609047/diff/1/chrome/browser/ui/views/frame/browser_view.cc#newcode1811 chrome/browser/ui/views/frame/browser_view.cc:1811: for (int i = 0, ...
9 years, 9 months ago (2011-03-05 18:06:54 UTC) #3
Sheridan Rawlins
small change to cast the stroke width.
9 years, 9 months ago (2011-03-07 18:18:32 UTC) #4
Peter Kasting
http://codereview.chromium.org/6609047/diff/5003/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): http://codereview.chromium.org/6609047/diff/5003/chrome/browser/ui/views/frame/browser_view.cc#newcode1812 chrome/browser/ui/views/frame/browser_view.cc:1812: DCHECK(child) << "Should not have a NULL child View ...
9 years, 9 months ago (2011-03-07 20:14:30 UTC) #5
Peter Kasting
One more. I forgot to review LayoutHelper(). http://codereview.chromium.org/6609047/diff/5003/chrome/browser/ui/views/infobars/infobar_container.cc File chrome/browser/ui/views/infobars/infobar_container.cc (right): http://codereview.chromium.org/6609047/diff/5003/chrome/browser/ui/views/infobars/infobar_container.cc#newcode42 chrome/browser/ui/views/infobars/infobar_container.cc:42: if (set_bounds) ...
9 years, 9 months ago (2011-03-07 22:23:07 UTC) #6
Sheridan Rawlins
review changes. http://codereview.chromium.org/6609047/diff/5003/chrome/browser/ui/views/frame/browser_view.cc File chrome/browser/ui/views/frame/browser_view.cc (right): http://codereview.chromium.org/6609047/diff/5003/chrome/browser/ui/views/frame/browser_view.cc#newcode1812 chrome/browser/ui/views/frame/browser_view.cc:1812: DCHECK(child) << "Should not have a NULL ...
9 years, 9 months ago (2011-03-08 01:38:19 UTC) #7
Sheridan Rawlins
Responded to Peter's concern about the stroke path needing to be offset by positive (0.5, ...
9 years, 9 months ago (2011-03-08 03:47:04 UTC) #8
Peter Kasting
http://codereview.chromium.org/6609047/diff/2013/chrome/browser/ui/views/infobars/infobar_background.cc File chrome/browser/ui/views/infobars/infobar_background.cc (right): http://codereview.chromium.org/6609047/diff/2013/chrome/browser/ui/views/infobars/infobar_background.cc#newcode54 chrome/browser/ui/views/infobars/infobar_background.cc:54: SkShader* gradient_shader = Nit: Could also wrap like this ...
9 years, 9 months ago (2011-03-08 23:21:31 UTC) #9
Sheridan Rawlins
http://codereview.chromium.org/6609047/diff/2013/chrome/browser/ui/views/infobars/infobar_background.cc File chrome/browser/ui/views/infobars/infobar_background.cc (right): http://codereview.chromium.org/6609047/diff/2013/chrome/browser/ui/views/infobars/infobar_background.cc#newcode54 chrome/browser/ui/views/infobars/infobar_background.cc:54: SkShader* gradient_shader = On 2011/03/08 23:21:31, Peter Kasting wrote: ...
9 years, 9 months ago (2011-03-09 00:18:26 UTC) #10
Peter Kasting
LGTM, let's get this in and then see if it needs to be tweaked further. ...
9 years, 9 months ago (2011-03-09 00:41:45 UTC) #11
Sheridan Rawlins
Here ya go. http://codereview.chromium.org/6609047/diff/13001/chrome/browser/ui/views/infobars/infobar_container.cc File chrome/browser/ui/views/infobars/infobar_container.cc (right): http://codereview.chromium.org/6609047/diff/13001/chrome/browser/ui/views/infobars/infobar_container.cc#newcode141 chrome/browser/ui/views/infobars/infobar_container.cc:141: int minimum_top = 0; On 2011/03/09 ...
9 years, 9 months ago (2011-03-09 01:09:33 UTC) #12
Peter Kasting
9 years, 9 months ago (2011-03-09 01:11:18 UTC) #13
Still LGTM

http://codereview.chromium.org/6609047/diff/13002/chrome/browser/ui/views/inf...
File chrome/browser/ui/views/infobars/infobar_view.h (right):

http://codereview.chromium.org/6609047/diff/13002/chrome/browser/ui/views/inf...
chrome/browser/ui/views/infobars/infobar_view.h:74: int AnimatedTabHeight()
const;
Nit: Probably should comment this and AnimatedBarHeight()

Powered by Google App Engine
This is Rietveld 408576698