summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_plugin.h
diff options
context:
space:
mode:
authortwiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-13 17:53:04 +0000
committertwiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-13 17:53:04 +0000
commit26edf1d3c373fe9b6044b57fc218a5f20bb65cda (patch)
treea3afa9fa326a14f331ca9fa48c6891f4168afc05 /chrome_frame/chrome_frame_plugin.h
parent20561034292529440bbd7eb34f8be10a9c39b0fe (diff)
downloadchromium_src-26edf1d3c373fe9b6044b57fc218a5f20bb65cda.zip
chromium_src-26edf1d3c373fe9b6044b57fc218a5f20bb65cda.tar.gz
chromium_src-26edf1d3c373fe9b6044b57fc218a5f20bb65cda.tar.bz2
Modification to the initial focus assignment behaviour. By giving focus to chrome, and requesting that |restore_focus_to_view| be passed as true, the Chrome-Frame instance will immediately focus the first focusable item on the loaded page. This does not match the focus behaviour of Chrome, or other browsers.
This focus behaviour was introduced in CL http://codereview.chromium.org/664009 . See changes TabProxy::SetInitialFocus. I also corrected the Chrome-Frame unit-test file so that it no longer assumes that assigning focus to the Chrome-Frame instance will propagate the focus to the first focusable element in the loaded page. BUG=none TEST=ChromeFrameTestWithWebServer.WidgetModeIE_ObjectFocus Review URL: http://codereview.chromium.org/3555020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_plugin.h')
-rw-r--r--chrome_frame/chrome_frame_plugin.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome_frame/chrome_frame_plugin.h b/chrome_frame/chrome_frame_plugin.h
index 6fa795e..9f483bc 100644
--- a/chrome_frame/chrome_frame_plugin.h
+++ b/chrome_frame/chrome_frame_plugin.h
@@ -156,7 +156,10 @@ END_MSG_MAP()
LRESULT OnSetFocus(UINT message, WPARAM wparam, LPARAM lparam,
BOOL& handled) { // NO_LINT
if (!ignore_setfocus_ && IsValid()) {
- GiveFocusToChrome(true);
+ // Pass false to |restore_focus_view|, because we do not want Chrome
+ // to focus the first focusable element in the current view, only the
+ // view itself.
+ GiveFocusToChrome(false);
}
return 0;
}