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

Side by Side Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 28191: Fixes regression where bookmark bar would appear all black. Actually,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/views/frame/browser_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/views/bookmark_bar_view.h" 5 #include "chrome/browser/views/bookmark_bar_view.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/base_drag_source.h" 10 #include "base/base_drag_source.h"
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 } 864 }
865 865
866 void BookmarkBarView::DidChangeBounds(const gfx::Rect& previous, 866 void BookmarkBarView::DidChangeBounds(const gfx::Rect& previous,
867 const gfx::Rect& current) { 867 const gfx::Rect& current) {
868 Layout(); 868 Layout();
869 } 869 }
870 870
871 void BookmarkBarView::ViewHierarchyChanged(bool is_add, 871 void BookmarkBarView::ViewHierarchyChanged(bool is_add,
872 View* parent, 872 View* parent,
873 View* child) { 873 View* child) {
874 // See http://code.google.com/p/chromium/issues/detail?id=7857 . It seems
875 // as though the bookmark bar is getting unintentionally removed.
876 DCHECK(testing_ || child != this || is_add ||
877 static_cast<BrowserView*>(parent)->is_removing_bookmark_bar());
878
879 if (is_add && child == this && height() > 0) { 874 if (is_add && child == this && height() > 0) {
880 // We only layout while parented. When we become parented, if our bounds 875 // We only layout while parented. When we become parented, if our bounds
881 // haven't changed, DidChangeBounds won't get invoked and we won't layout. 876 // haven't changed, DidChangeBounds won't get invoked and we won't layout.
882 // Therefore we always force a layout when added. 877 // Therefore we always force a layout when added.
883 Layout(); 878 Layout();
884 } 879 }
885 } 880 }
886 881
887 void BookmarkBarView::Paint(ChromeCanvas* canvas) { 882 void BookmarkBarView::Paint(ChromeCanvas* canvas) {
888 if (IsDetachedStyle()) { 883 if (IsDetachedStyle()) {
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 } 1860 }
1866 1861
1867 void BookmarkBarView::StopThrobbing(bool immediate) { 1862 void BookmarkBarView::StopThrobbing(bool immediate) {
1868 if (!throbbing_view_) 1863 if (!throbbing_view_)
1869 return; 1864 return;
1870 1865
1871 // If not immediate, cycle through 2 more complete cycles. 1866 // If not immediate, cycle through 2 more complete cycles.
1872 throbbing_view_->StartThrobbing(immediate ? 0 : 4); 1867 throbbing_view_->StartThrobbing(immediate ? 0 : 4);
1873 throbbing_view_ = NULL; 1868 throbbing_view_ = NULL;
1874 } 1869 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698