From 783b60e565116b02e354f18bd2bd66094568f5c1 Mon Sep 17 00:00:00 2001 From: "jschuh@chromium.org" Date: Thu, 22 Sep 2011 15:32:55 +0000 Subject: Don't cache keystate if not blocked by UIPI BUG=94240 TEST=Input @ character in a Flash text input with a Danish keyboard Review URL: http://codereview.chromium.org/7978050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102278 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/plugins/npapi/webplugin_delegate_impl_win.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'webkit/plugins') diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc index ce24dec..d0b1888 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc +++ b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc @@ -106,7 +106,9 @@ bool GetSavedKeyState(WPARAM vkey) { void SetSavedKeyState(WPARAM vkey) { CHECK_LT(vkey, kBitsPerType * sizeof(g_saved_key_state)); - g_saved_key_state[vkey / kBitsPerType] |= 1 << (vkey % kBitsPerType); + // Cache the key state only for keys blocked by UIPI. + if (g_iat_orig_get_key_state(vkey) == 0) + g_saved_key_state[vkey / kBitsPerType] |= 1 << (vkey % kBitsPerType); } void UnsetSavedKeyState(WPARAM vkey) { -- cgit v1.1