summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsimonrad@chromium.org <simonrad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 04:25:37 +0000
committersimonrad@chromium.org <simonrad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-18 04:25:37 +0000
commitb471ea7028c28eb6b192de34717f3d20c34c2165 (patch)
tree50808eb6e7f58602fb2ffebd5c383716f5ccb411 /chrome
parent3f15c373428b52a36ed443c04fd3273013c36d12 (diff)
downloadchromium_src-b471ea7028c28eb6b192de34717f3d20c34c2165.zip
chromium_src-b471ea7028c28eb6b192de34717f3d20c34c2165.tar.gz
chromium_src-b471ea7028c28eb6b192de34717f3d20c34c2165.tar.bz2
Fix find bar scrolling with the page after switching back to tab.
We need to do a BrowserView::Layout() (which updates things like the bookmarks bar and the find bar) both in between the TabContents detach/attach AND after the final attach. This way, we toggle the bookmarks bar at the right time, but we still end up setting the find bar properly. R=beng BUG=27960 TEST=Navigate to a page where you can see the vertical scroll bar. Press Ctrl+F to open the find bar. Switch to another tab and then back to the original tab. Scroll down/up the page. The find bar should stay in place, not scroll with the page or disappear. Review URL: http://codereview.chromium.org/397036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/frame/browser_view.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index c2fa27f..8fbd80d 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -1290,19 +1290,12 @@ void BrowserView::TabSelectedAt(TabContents* old_contents,
// Update various elements that are interested in knowing the current
// TabContents.
- // When we toggle the NTP floating bookmarks bar,
+ // When we toggle the NTP floating bookmarks bar and/or the info bar,
// we don't want any TabContents to be attached, so that we
// avoid an unnecessary resize and re-layout of a TabContents.
contents_container_->ChangeTabContents(NULL);
-
infobar_container_->ChangeTabContents(new_contents);
-
- // Update all the UI bits.
- UpdateTitleBar();
- toolbar_->SetProfile(new_contents->profile());
- UpdateToolbar(new_contents, true);
UpdateUIForContents(new_contents);
-
contents_container_->ChangeTabContents(new_contents);
UpdateDevToolsForContents(new_contents);
@@ -1317,6 +1310,12 @@ void BrowserView::TabSelectedAt(TabContents* old_contents,
// handlers when we are eventually shown.
new_contents->view()->RestoreFocus();
}
+
+ // Update all the UI bits.
+ UpdateTitleBar();
+ toolbar_->SetProfile(new_contents->profile());
+ UpdateToolbar(new_contents, true);
+ UpdateUIForContents(new_contents);
}
void BrowserView::TabStripEmpty() {