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

Unified Diff: chrome/browser/ui/views/infobars/infobar_container_view.cc

Issue 6788014: Fix DCHECK() in infobar animation. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/infobars/infobar_container_view.cc
===================================================================
--- chrome/browser/ui/views/infobars/infobar_container_view.cc (revision 80169)
+++ chrome/browser/ui/views/infobars/infobar_container_view.cc (working copy)
@@ -18,7 +18,7 @@
InfoBarContainerView::~InfoBarContainerView() {
}
-int InfoBarContainerView::VerticalOverlap() {
+int InfoBarContainerView::GetVerticalOverlap() {
return GetVerticalOverlap(NULL);
}
@@ -31,14 +31,14 @@
}
void InfoBarContainerView::Layout() {
- int top = GetVerticalOverlap(NULL);
+ int top = GetVerticalOverlap();
for (int i = 0; i < child_count(); ++i) {
View* child = GetChildViewAt(i);
- gfx::Size ps = child->GetPreferredSize();
- top -= static_cast<InfoBarView*>(child)->AnimatedTabHeight();
- child->SetBounds(0, top, width(), ps.height());
- top += ps.height();
+ top -= static_cast<InfoBarView*>(child)->tab_height();
+ int child_height = child->GetPreferredSize().height();
+ child->SetBounds(0, top, width(), child_height);
+ top += child_height;
}
}
@@ -63,8 +63,7 @@
for (int i = 0; i < child_count(); ++i) {
View* child = GetChildViewAt(i);
- gfx::Size ps = child->GetPreferredSize();
- next_child_y -= static_cast<InfoBarView*>(child)->AnimatedTabHeight();
+ next_child_y -= static_cast<InfoBarView*>(child)->tab_height();
vertical_overlap = std::max(vertical_overlap, -next_child_y);
next_child_y += child->GetPreferredSize().height();
}
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_container_view.h ('k') | chrome/browser/ui/views/infobars/infobar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698