WebCore:
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2007 21:05:22 +0000 (21:05 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2007 21:05:22 +0000 (21:05 +0000)
commit9eb63367940b2b61710cd83e5715663f9ba6ed7d
treedd55ca0e218925ca8a1f0beb5a13940470602aa1
parent2fc4d750a7cd447383f273d69190fde17b5186d9
WebCore:

        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: https://svn.webkit.org/repository/webkit/trunk@27264 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/manual-tests/password-caps-lock.html [new file with mode: 0644]
WebCore/page/EventHandler.cpp
WebCore/page/EventHandler.h
WebCore/page/Frame.cpp
WebCore/platform/PlatformKeyboardEvent.h
WebCore/platform/mac/KeyEventMac.mm
WebCore/platform/win/KeyEventWin.cpp
WebCore/rendering/RenderObject.h
WebCore/rendering/RenderTextControl.cpp
WebCore/rendering/RenderTextControl.h
WebCore/rendering/RenderTheme.h
WebCore/rendering/RenderThemeMac.h
WebCore/rendering/RenderThemeMac.mm
WebCore/rendering/RenderThemeSafari.cpp
WebCore/rendering/RenderThemeSafari.h
WebKit/ChangeLog
WebKit/WebView/WebHTMLView.mm
WebKit/win/ChangeLog
WebKit/win/WebView.cpp