diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 19:12:23 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-23 19:12:23 +0000 |
commit | be892f97de9174e762111faceb54e3b082aea449 (patch) | |
tree | 5d0a8e71ddbfd33753bd042e78bb14c917be33d7 /webkit | |
parent | b086e8071269fc23c6fb9fef3785da4e41a1d82c (diff) | |
download | chromium_src-be892f97de9174e762111faceb54e3b082aea449.zip chromium_src-be892f97de9174e762111faceb54e3b082aea449.tar.gz chromium_src-be892f97de9174e762111faceb54e3b082aea449.tar.bz2 |
Fix bug 15795: make the capslock indicator in password fields (on Mac) work.
(Hook up WebKit's Frame::eventHandler()->capsLockStateMayHaveChanged() in
WebViewImpl::KeyEvent() and -flagsChanged: to -keyEvent: in BaseView.)
Patch from viettrungluu@gmail.com.
BUG=http://crbug.com/15795
TEST=go to some password field (e.g., in gmail login), cycle capslock
Review URL: http://codereview.chromium.org/159215
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webview_impl.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 04c18ef..89af941 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -622,6 +622,14 @@ bool WebViewImpl::KeyEvent(const WebKeyboardEvent& event) { } #endif + // It's not clear if we should continue after detecting a capslock keypress. + // I'll err on the side of continuing, which is the pre-existing behaviour. + if (event.windowsKeyCode == base::VKEY_CAPITAL && + (event.type == WebInputEvent::KeyUp || + event.type == WebInputEvent::KeyDown)) { + handler->capsLockStateMayHaveChanged(); + } + MakePlatformKeyboardEvent evt(event); if (WebInputEvent::RawKeyDown == event.type) { |