-
adele authored
Reviewed by Darin. WebCore part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577 <rdar://problem/5103625> REGRESSION: Caps lock icon should show in password fields Test: manual-tests/password-caps-lock.html * WebCore.base.exp: Added symbol for capsLockStateMayHaveChanged. * page/Frame.cpp: (WebCore::Frame::setIsActive): Calls capsLockStateMayHaveChanged. * page/EventHandler.cpp: (WebCore::EventHandler::capsLockStateMayHaveChanged): Added. Tells the focused node's renderer that the capsLockStateMayHaveChanged. * page/EventHandler.h: * platform/PlatformKeyboardEvent.h: * platform/mac/KeyEventMac.mm: (WebCore::PlatformKeyboardEvent::currentCapsLockState): Added. * platform/win/KeyEventWin.cpp: (WebCore::PlatformKeyboardEvent::currentCapsLockState): Added. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::RenderTextControl): (WebCore::RenderTextControl::paint): Added. If m_shouldDrawCapsLockIndicator is true, paints the caps lock indicator after the background. (WebCore::RenderTextControl::forwardEvent): When the control gets and loses focus, update the caps lock state. (WebCore::RenderTextControl::capsLockStateMayHaveChanged): Added. Updates m_shouldDrawCapsLockIndicator, which is true if the field is a password field, and the frame is active, and the element is focused, and the caps lock is on. Causes a repaint when m_shouldDrawCapsLockIndicator changes state. * rendering/RenderTextControl.h: Added m_shouldDrawCapsLockIndicator. * rendering/RenderObject.h: (WebCore::RenderObject::capsLockStateMayHaveChanged): Added. * rendering/RenderTheme.h: (WebCore::RenderTheme::paintCapsLockIndicator): Added. * rendering/RenderThemeMac.h: * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintCapsLockIndicator): Added. Calls wkDrawCapsLockIndicator. * rendering/RenderThemeSafari.cpp: (WebCore::RenderThemeSafari::paintCapsLockIndicator): Added. Calls paintThemePart for the CapsLockPart. * rendering/RenderThemeSafari.h: WebKit: Reviewed by Darin. WebKit part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577 <rdar://problem/5103625> REGRESSION: Caps lock icon should show in password fields * WebView/WebHTMLView.mm: (-[WebHTMLView flagsChanged:]): Call capsLockStateMayHaveChanged so WebCore knows it may have to update a password field. (+[WebHTMLView _postFlagsChangedEvent:]): Added a comment with a Radar number for why this isn't just in flagsChanged. (-[WebHTMLView scrollWheel:]): Instead of calling the next responder explicitly, we can just call super, which will take care of this. win: Reviewed by Darin. WebKitWin part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577 <rdar://problem/5110427> REGRESSION: Caps lock icon should show in password fields * WebView.cpp: (WebView::keyDown): Call capsLockStateMayHaveChanged so WebCore knows it may have to update a password field. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e902c4c2