summaryrefslogtreecommitdiffstats
path: root/chrome/browser/external_tab_container.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-12 21:55:48 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-12 21:55:48 +0000
commit01dba671701e7bb89f272084296fcca77b2f66cb (patch)
tree4dd852f1471ba71684a0e731dabcfd1a0941e326 /chrome/browser/external_tab_container.cc
parent3b1c18191d41eac0a551b3009269a259757ca070 (diff)
downloadchromium_src-01dba671701e7bb89f272084296fcca77b2f66cb.zip
chromium_src-01dba671701e7bb89f272084296fcca77b2f66cb.tar.gz
chromium_src-01dba671701e7bb89f272084296fcca77b2f66cb.tar.bz2
Fix an IE7 crash caused when ChromeFrame would pass keystrokes to be processed as accelerators. The crash
occured in the call to IBrowserService2::v_MayTranslateAccelerator which takes in a MSG as a parameter. This message contains the hwnd of the ChromeRenderWidgetHost. Eventually this method tries to DispatchMessage this message to the same hwnd, which causes a crash possibly because this window is in a different process. Fix is to switch the hwnd to the parent of the ChromeFrame ActiveX. The other fix is to send over all keystrokes from the ExternalTabContainer instead of filtering them. With this fix in BackSpace works correctly in IE7, i.e. it goes back in history. However the other keystrokes like Shift Backspace, etc don't work. They are probably processed by mshtml. It appears that we may have to prcess these accelerators in our active document and do the right thing there. That in a separate CL. Fixes bug http://code.google.com/p/chromium/issues/detail?id=35355 Bug=35355 Review URL: http://codereview.chromium.org/603041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38962 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/external_tab_container.cc')
-rw-r--r--chrome/browser/external_tab_container.cc35
1 files changed, 11 insertions, 24 deletions
diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc
index 9d0d089..9e098fd 100644
--- a/chrome/browser/external_tab_container.cc
+++ b/chrome/browser/external_tab_container.cc
@@ -678,30 +678,17 @@ bool ExternalTabContainer::ProcessUnhandledKeyStroke(HWND window,
return false;
}
- unsigned int flags = HIWORD(lparam);
- bool alt = (flags & KF_ALTDOWN) != 0;
- if (!alt && (message == WM_SYSKEYUP || message == WM_KEYUP)) {
- // In case the Alt key is being released.
- alt = (wparam == VK_MENU);
- }
-
- if ((flags & KF_EXTENDED) || alt || (wparam >= VK_F1 && wparam <= VK_F24) ||
- wparam == VK_ESCAPE || wparam == VK_RETURN ||
- win_util::IsShiftPressed() || win_util::IsCtrlPressed()) {
- // If this is an extended key or if one or more of Alt, Shift and Control
- // are pressed, this might be an accelerator that the external host wants
- // to handle. If the host does not handle this accelerator, it will reflect
- // the accelerator back to us via the ProcessUnhandledAccelerator method.
- MSG msg = {0};
- msg.hwnd = window;
- msg.message = message;
- msg.wParam = wparam;
- msg.lParam = lparam;
- automation_->Send(new AutomationMsg_HandleAccelerator(0, tab_handle_, msg));
- return true;
- }
-
- return false;
+ // Send this keystroke to the external host as it could be processed as an
+ // accelerator there. If the host does not handle this accelerator, it will
+ // reflect the accelerator back to us via the ProcessUnhandledAccelerator
+ // method.
+ MSG msg = {0};
+ msg.hwnd = window;
+ msg.message = message;
+ msg.wParam = wparam;
+ msg.lParam = lparam;
+ automation_->Send(new AutomationMsg_HandleAccelerator(0, tab_handle_, msg));
+ return true;
}
bool ExternalTabContainer::InitNavigationInfo(IPC::NavigationInfo* nav_info,