WebCore:
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jul 2004 23:17:24 +0000 (23:17 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Jul 2004 23:17:24 +0000 (23:17 +0000)
commit7731a6f708c468b7d863aea1592953496aec4e1c
tree2594d72300b132f3398838c3a411d5f300266726
parenta2249fad955b18c00837f05b3ac813a129920f80
WebCore:

        Reviewed by Trey

        Fix for this bug:

        <rdar://problem/3738920> Caret blinks in inactive window

        As part of the fix, I cleaned up the way we handle special drawing that needs
        to be done in the HTML view that is first responder in the key window (e.g the
        drawing of text selection highlight and caret blinking).

        * khtml/khtml_part.cpp: Removed setCaretVisible function. Updating caret visibility
        is now done in setDisplaysWithFocusAttributes, described below.
        * khtml/khtml_part.h: Ditto.
        * khtml/khtmlpart_p.h:
        (KHTMLPartPrivate::KHTMLPartPrivate): m_caretVisible now defaults to false. This prevents
        the caret from blinking when an app is started from the command line and remains in the
        background.
        * khtml/khtmlview.cpp:
        (KHTMLView::focusInEvent): Remove caret code from here. Not needed.
        (KHTMLView::focusOutEvent): Ditto.
        * kwq/KWQKHTMLPart.h:
        (KWQKHTMLPart::displaysWithFocusAttributes): New accessor to return cached value to other code
        in WebCore.
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart):
        (KWQKHTMLPart::setDisplaysWithFocusAttributes): Renamed from setShowsFirstResponder and modified
        to do the display updating in a clearer way....and now has comments!
        * kwq/WebCoreBridge.h: Remove several obsolete functions that use to try to do the work of the new
        setDisplaysWithFocusAttributes function (and did so less well).
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge drawRect:]): Now calls displaysWithFocusAttributes to figure out how to draw the
        text selection background.
        (-[WebCoreBridge setDisplaysWithFocusAttributes:]): Calls through to setDisplaysWithFocusAttributes in
        KWQKHTMLPart.
        (-[WebCoreBridge selectionColor]): Flipped the value of this ternary expression to accommodate the
        change from usesInactiveTextBackgroundColor to setDisplaysWithFocusAttributes.
        (-[WebCoreBridge setCaretVisible:]): Removed.

WebKit:

        Reviewed by Trey

        Fix for this bug:

        <rdar://problem/3738920> Caret blinks in inactive window

        As part of the fix, I cleaned up the way we handle special drawing that needs
        to be done in the HTML view that is first responder in the key window (e.g the
        drawing of text selection highlight and caret blinking).

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView updateFocusDisplay]): New method that centralizes the changes
        we need to make when the first responder-ness of the view or key-ness of the
        window changes.
        (-[WebHTMLView viewDidMoveToWindow]): Call new updateFocusDisplay helper.
        (-[WebHTMLView windowDidBecomeKey:]): Ditto.
        (-[WebHTMLView windowDidResignKey:]): Ditto.
        (-[WebHTMLView becomeFirstResponder]): Ditto.
        (-[WebHTMLView resignFirstResponder]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/khtml/khtmlpart_p.h
WebCore/kwq/KWQKHTMLPart.h
WebCore/kwq/KWQKHTMLPart.mm
WebCore/kwq/WebCoreBridge.h
WebCore/kwq/WebCoreBridge.mm
WebKit/ChangeLog
WebKit/WebView.subproj/WebHTMLView.m