summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 17:33:13 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 17:33:13 +0000
commit1a38062ae062156d9074bfdd90effb8f09ff6dc3 (patch)
treea9b2b36510dc612a11cf31637a234fa887f26325 /chrome/browser/tab_contents
parent32e17a58405c129e4ad95ebd6786e24482a87394 (diff)
downloadchromium_src-1a38062ae062156d9074bfdd90effb8f09ff6dc3.zip
chromium_src-1a38062ae062156d9074bfdd90effb8f09ff6dc3.tar.gz
chromium_src-1a38062ae062156d9074bfdd90effb8f09ff6dc3.tar.bz2
When internal functions try to focus the location bar, check whether it's focusable, and clear the focus if it's not. This shouldn't kick in in any cases today (I don't think), but it will matter in fullscreen mode, where creating a new tab should not attempt to focus the (unfocusable) location bar, but should not do nothing either, since these leaves focus in a hosed state.
There are other choices here. I could make View::RequestFocus() try and clear the focus if the view is not focusable. That seems likely to cause side-effects unless I restore a lot of the calls to IsFocusable() that I previously removed. I also don't know whether sticking this on BrowserWindow was the right approach; if there's a better spot architecturally, speak up. Review URL: http://codereview.chromium.org/21368 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9882 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/native_ui_contents.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/native_ui_contents.cc b/chrome/browser/tab_contents/native_ui_contents.cc
index 9ff65ce..fecc5e2 100644
--- a/chrome/browser/tab_contents/native_ui_contents.cc
+++ b/chrome/browser/tab_contents/native_ui_contents.cc
@@ -317,7 +317,7 @@ void NativeUIContents::SetInitialFocus() {
Browser* browser = Browser::GetBrowserForController(
this->controller(), &tab_index);
if (browser)
- browser->FocusLocationBar();
+ browser->SetFocusToLocationBar();
else
TabContents::SetInitialFocus(); // Will set focus to our HWND.
}