Commit 7ef219e0 authored by jcampan@chromium.org's avatar jcampan@chromium.org

In an effort to make the FocusManager class platform independent, moving some...

In an effort to make the FocusManager class platform independent, moving some Windows specific code around.

BUG=9117
TEST=None
Review URL: http://codereview.chromium.org/42621

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12571 0039d316-1c4b-4281-b951-d872f2087c98
parent fbaf179e
...@@ -73,6 +73,7 @@ class TextField::Edit ...@@ -73,6 +73,7 @@ class TextField::Edit
MSG_WM_CREATE(OnCreate) MSG_WM_CREATE(OnCreate)
MSG_WM_CUT(OnCut) MSG_WM_CUT(OnCut)
MSG_WM_DESTROY(OnDestroy) MSG_WM_DESTROY(OnDestroy)
MESSAGE_HANDLER_EX(WM_IME_CHAR, OnImeChar)
MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeStartComposition) MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeStartComposition)
MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition) MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition)
MSG_WM_KEYDOWN(OnKeyDown) MSG_WM_KEYDOWN(OnKeyDown)
...@@ -121,6 +122,7 @@ class TextField::Edit ...@@ -121,6 +122,7 @@ class TextField::Edit
LRESULT OnCreate(CREATESTRUCT* create_struct); LRESULT OnCreate(CREATESTRUCT* create_struct);
void OnCut(); void OnCut();
void OnDestroy(); void OnDestroy();
LRESULT OnImeChar(UINT message, WPARAM wparam, LPARAM lparam);
LRESULT OnImeStartComposition(UINT message, WPARAM wparam, LPARAM lparam); LRESULT OnImeStartComposition(UINT message, WPARAM wparam, LPARAM lparam);
LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam); LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam);
void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags); void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags);
...@@ -439,6 +441,15 @@ void TextField::Edit::OnDestroy() { ...@@ -439,6 +441,15 @@ void TextField::Edit::OnDestroy() {
TRACK_HWND_DESTRUCTION(m_hWnd); TRACK_HWND_DESTRUCTION(m_hWnd);
} }
LRESULT TextField::Edit::OnImeChar(UINT message, WPARAM wparam, LPARAM lparam) {
// http://crbug.com/7707: a rich-edit control may crash when it receives a
// WM_IME_CHAR message while it is processing a WM_IME_COMPOSITION message.
// Since view controls don't need WM_IME_CHAR messages, we prevent WM_IME_CHAR
// messages from being dispatched to view controls via the CallWindowProc()
// call.
return 0;
}
LRESULT TextField::Edit::OnImeStartComposition(UINT message, LRESULT TextField::Edit::OnImeStartComposition(UINT message,
WPARAM wparam, WPARAM wparam,
LPARAM lparam) { LPARAM lparam) {
......
...@@ -84,13 +84,6 @@ static LRESULT CALLBACK FocusWindowCallback(HWND window, UINT message, ...@@ -84,13 +84,6 @@ static LRESULT CALLBACK FocusWindowCallback(HWND window, UINT message,
return 0; return 0;
return result; return result;
} }
case WM_IME_CHAR:
// Issue 7707: A rich-edit control may crash when it receives a
// WM_IME_CHAR message while it is processing a WM_IME_COMPOSITION
// message. Since view controls don't need WM_IME_CHAR messages,
// we prevent WM_IME_CHAR messages from being dispatched to view
// controls via the CallWindowProc() call.
return 0;
default: default:
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment