diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 17:36:05 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 17:36:05 +0000 |
commit | 723e544542e1a22fee857dc2dd6e6619276559a7 (patch) | |
tree | a2733842ed9b6062c2e88f2eb4d230a3a523d1d1 /chrome_frame/chrome_active_document.h | |
parent | 995e402e14f8dd8c48efc6a191e9b8764700d617 (diff) | |
download | chromium_src-723e544542e1a22fee857dc2dd6e6619276559a7.zip chromium_src-723e544542e1a22fee857dc2dd6e6619276559a7.tar.gz chromium_src-723e544542e1a22fee857dc2dd6e6619276559a7.tar.bz2 |
Fix incorrect focus cycling issues in ChromeFrame full tab mode. This happens whenever a tab rendering a chrome frame
page receives focus by switching to it. Whenever we receive focus in ChromeFrame we send over an IPC to set the initial
focus to Chrome. In this IPc we invoke the FocusThroughTabTraversal function on the TabContents which basically cycles
through the focus on the page which is not correct for full tab mode.
Fix is to handle the WM_SETFOCUS message in the active document and invoke the GiveFocusToChrome with false indicating
that we don't want to invoke the FocusThroughTabTraversal function which cycles through the view. It is sufficient to
set focus to the tab.
We also handle the WM_SHOWWINDOW message in the active document and set focus to the document if it is visible. This
ensures that the page gets focused correctly.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=48459
Fixes bug http://code.google.com/p/chromium/issues/detail?id=25890
Bug=48459, 25890
Review URL: http://codereview.chromium.org/2825061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_active_document.h')
-rw-r--r-- | chrome_frame/chrome_active_document.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome_frame/chrome_active_document.h b/chrome_frame/chrome_active_document.h index 6bd8e4d..39b0e74 100644 --- a/chrome_frame/chrome_active_document.h +++ b/chrome_frame/chrome_active_document.h @@ -236,6 +236,8 @@ BEGIN_MSG_MAP(ChromeActiveDocument) MESSAGE_HANDLER(WM_FIRE_PRIVACY_CHANGE_NOTIFICATION, OnFirePrivacyChange) COMMAND_ID_HANDLER(IDC_CHROMEFRAME_FORWARD, OnForward) COMMAND_ID_HANDLER(IDC_CHROMEFRAME_BACK, OnBack) + MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) + MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus) CHAIN_MSG_MAP(BaseActiveX) END_MSG_MAP() @@ -340,7 +342,7 @@ END_EXEC_COMMAND_MAP() bool PreProcessContextMenu(HMENU menu); bool HandleContextMenuCommand(UINT cmd, const IPC::ContextMenuParams& params); - // ChromeFramePlugin overrides. + // ChromeFramePlugin overrides. virtual void OnAutomationServerReady(); // IEnumPrivacyRecords @@ -421,6 +423,10 @@ END_EXEC_COMMAND_MAP() LRESULT OnFirePrivacyChange(UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled); + LRESULT OnShowWindow(UINT message, WPARAM wparam, LPARAM lparam, + BOOL& handled); + LRESULT OnSetFocus(UINT message, WPARAM wparam, LPARAM lparam, + BOOL& handled); // Checks for the presence of known-to-be-buggy BHOs. If we find any // we do not fire the DocumentComplete event to avoid a crash. |