diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 21:59:43 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 21:59:43 +0000 |
commit | 789e915d30f635f26016b30482d13bca2db6b12c (patch) | |
tree | f65dcd19784d84511dd19c4404af218f0b9c0013 /chrome | |
parent | 558e2779768bfc4b77539fdc6dafc8d9fafedc0a (diff) | |
download | chromium_src-789e915d30f635f26016b30482d13bca2db6b12c.zip chromium_src-789e915d30f635f26016b30482d13bca2db6b12c.tar.gz chromium_src-789e915d30f635f26016b30482d13bca2db6b12c.tar.bz2 |
Activate scrollbars (etc.) upon selecting a tab.
(Conceivably, the SetActive() could be pushed into the RWHV's
DidBecomeSelected(). Conceivably, one could imagine selection without
activation, so I chose to put it closer to the UI side of the code in
the TabContents. Hmmm. Maybe we should also put in the RWHV::SetActive()
method on all platforms.)
Patch by viettrungluu.
BUG=http://crbug.com/18262
TEST=Make your browser window really small, create new tabs, switch between
them.
Review URL: http://codereview.chromium.org/160505
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22422 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 5446bb5..5b816f19 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -600,8 +600,12 @@ void TabContents::NotifyNavigationStateChanged(unsigned changed_flags) { void TabContents::DidBecomeSelected() { controller_.SetActive(true); - if (render_widget_host_view()) + if (render_widget_host_view()) { render_widget_host_view()->DidBecomeSelected(); +#if defined(OS_MACOSX) + render_widget_host_view()->SetActive(true); +#endif + } // If pid() is -1, that means the RenderProcessHost still hasn't been // initialized. It'll register with CacheManagerHost when it is. |