Chromium Code Reviews| Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
| diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
| index ce37e63e3dbf78cae113307a1998cf5fb894aa80..af32a22f579515347eac7e269a5d50b15cfd18e0 100644 |
| --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
| +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
| @@ -605,7 +605,7 @@ BookmarkBarView::BookmarkBarView(Browser* browser, BrowserView* browser_view) |
| // Don't let the bookmarks show on top of the location bar while animating. |
| SetPaintToLayer(); |
| layer()->SetMasksToBounds(true); |
| - layer()->SetFillsBoundsOpaquely(false); |
| + layer()->SetFillsBoundsOpaquely(true); |
|
Evan Stade
2017/05/30 21:39:33
you can just remove this line as opacity is the de
yiyix
2017/05/30 22:20:50
Done.
|
| size_animation_.Reset(1); |
| } |
| @@ -799,23 +799,19 @@ bool BookmarkBarView::IsDetached() const { |
| } |
| int BookmarkBarView::GetToolbarOverlap() const { |
| - int attached_overlap = kToolbarAttachedBookmarkBarOverlap + |
| - views::NonClientFrameView::kClientEdgeThickness; |
| + int attached_overlap = kToolbarAttachedBookmarkBarOverlap; |
| + |
| if (!IsDetached()) |
| return attached_overlap; |
| - int detached_overlap = views::NonClientFrameView::kClientEdgeThickness; |
| - |
| // Do not animate the overlap when the infobar is above us (i.e. when we're |
| // detached), since drawing over the infobar looks weird. |
| if (infobar_visible_) |
| - return detached_overlap; |
| + return 0; |
| // When detached with no infobar, animate the overlap between the attached and |
| // detached states. |
| - return detached_overlap + static_cast<int>( |
| - (attached_overlap - detached_overlap) * |
| - size_animation_.GetCurrentValue()); |
| + return static_cast<int>(attached_overlap * size_animation_.GetCurrentValue()); |
| } |
| int BookmarkBarView::GetPreferredHeight() const { |