WebCore:
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Sep 2004 23:56:20 +0000 (23:56 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Sep 2004 23:56:20 +0000 (23:56 +0000)
commite531455eae275787bb8d8ba77e2414c941d72f47
treec21c22108562d0dcf2eb6da776f8afdc8c1989f0
parentb20a9d0db2a353d8cb4cdb73da84d62fc34f3c7c
WebCore:

Fixed: <rdar://problem/3781290> REGRESSION (Mail): Crash in ReplaceSelectionCommandImpl attaching file to new message

        Reviewed by kocienda.

        * khtml/khtml_part.cpp:
        (KHTMLPart::setSelection): setFocusNodeIfNeeded now works on the current selection so call setFocusNodeIfNeeded after setting the selection
        (KHTMLPart::clearSelection): don't call setFocusNodeIfNeeded with the current selection
        (KHTMLPart::setCaretVisible): ditto
        (KHTMLPart::setFocusNodeIfNeeded): do nothing if the part isn't focused, work with the current selection
        * khtml/khtml_part.h:
        * khtml/khtmlpart_p.h:
        (KHTMLPartPrivate::KHTMLPartPrivate): added m_isFocused
        * kwq/KWQKHTMLPart.h:
        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::KWQKHTMLPart): removed _displaysWithFocusAttributes this is replaced by m_isFocused
        (KWQKHTMLPart::setSelectionFromNone): new, code factored out from setDisplaysWithFocusAttributes
        (KWQKHTMLPart::setDisplaysWithFocusAttributes): call setSelectionFromNone
        (KWQKHTMLPart::displaysWithFocusAttributes): now returns m_isFocused
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge setSelectionFromNone]): new

WebKit:

Fixed: <rdar://problem/3781290> REGRESSION (Mail): Crash in ReplaceSelectionCommandImpl attaching file to new message

        Reviewed by kocienda.

        * WebView.subproj/WebView.m:
        (-[WebView setEditable:]): call updateSelectionFromEmpty on the bridge if there is no selection

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/khtml/khtml_part.cpp
WebCore/khtml/khtml_part.h
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/WebView.m