diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-08 00:44:16 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-08 00:44:16 +0000 |
commit | 11da7028425a758f1b30d19c802410747b4a98ad (patch) | |
tree | 8f602fd40e25c0c5930f74607412aa814d30b10a /chrome/browser | |
parent | 76855757706810dbe575ccf5c0996f0d7932671d (diff) | |
download | chromium_src-11da7028425a758f1b30d19c802410747b4a98ad.zip chromium_src-11da7028425a758f1b30d19c802410747b4a98ad.tar.gz chromium_src-11da7028425a758f1b30d19c802410747b4a98ad.tar.bz2 |
Fix for bookmark bar text not being correct in subsequent Windows. I believe this bug was masked by how long bookmarks take to create in the primary window (as the bookmark system is loaded late)
BUG=18550
TEST=Install a theme with custom colors for bookmark bar text, then open a new window and verify that the bookmark bar text is themed correctly.
Review URL: http://codereview.chromium.org/165172
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/views/bookmark_bar_view.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.cc b/chrome/browser/views/bookmark_bar_view.cc index 7ea968a..2785bfd 100644 --- a/chrome/browser/views/bookmark_bar_view.cc +++ b/chrome/browser/views/bookmark_bar_view.cc @@ -567,11 +567,18 @@ void BookmarkBarView::DidChangeBounds(const gfx::Rect& previous, void BookmarkBarView::ViewHierarchyChanged(bool is_add, View* parent, View* child) { - if (is_add && child == this && height() > 0) { - // We only layout while parented. When we become parented, if our bounds - // haven't changed, DidChangeBounds won't get invoked and we won't layout. - // Therefore we always force a layout when added. - Layout(); + if (is_add && child == this) { + // We may get inserted into a hierarchy with a profile - this typically + // occurs when the bar's contents get populated fast enough that the + // buttons are created before the bar is attached to a frame. + UpdateButtonColors(); + + if (height() > 0) { + // We only layout while parented. When we become parented, if our bounds + // haven't changed, DidChangeBounds won't get invoked and we won't layout. + // Therefore we always force a layout when added. + Layout(); + } } } |