WebCore:
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Sep 2004 01:30:34 +0000 (01:30 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Sep 2004 01:30:34 +0000 (01:30 +0000)
commitf77f7121514208421d6bd1a1b0de5a5f94f58a06
tree4f97cfce0c437bd570a07811eac3186de1a12d5e
parent8a99a0dadeb5b5042aa144758f8389b34e4bf94d
WebCore:

Fixed:
<rdar://problem/3735071> REGRESSION (Mail): WebCore Editing must do smart paste
<rdar://problem/3799163> REGRESSION (Mail): Deleting a word doesn't delete whitespace

        Reviewed by darin.

        * khtml/editing/htmlediting.cpp:
        (khtml::DeleteSelectionCommand::DeleteSelectionCommand): take smartDelete parameter
        (khtml::ReplaceSelectionCommand::ReplaceSelectionCommand): take smartReplace parameter
        * khtml/editing/htmlediting.h:
        * khtml/editing/htmlediting_impl.cpp:
        (khtml::DeleteSelectionCommandImpl::DeleteSelectionCommandImpl): take smartDelete parameter
        (khtml::DeleteSelectionCommandImpl::doApply): delete whitespace before and after selection if necessary
        (khtml::ReplaceSelectionCommandImpl::ReplaceSelectionCommandImpl): take smartReplace parameter
        (khtml::ReplaceSelectionCommandImpl::doApply): add whitespace before and after the replacement if necessary
        * khtml/editing/htmlediting_impl.h:
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge replaceSelectionWithFragment:selectReplacement:smartReplace:]): take smartReplace parameter
        (-[WebCoreBridge replaceSelectionWithNode:selectReplacement:smartReplace:]): ditto
        (-[WebCoreBridge replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): ditto
        (-[WebCoreBridge replaceSelectionWithText:selectReplacement:smartReplace:]): ditto
        (-[WebCoreBridge deleteSelectionWithSmartDelete:]): take smartDelete parameter

WebKit:

Fixed:
<rdar://problem/3735071> REGRESSION (Mail): WebCore Editing must do smart paste
<rdar://problem/3799163> REGRESSION (Mail): Deleting a word doesn't delete whitespace

        Reviewed by darin.

        * WebView.subproj/WebDataSource.m:
        (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): pass NO for smartReplace
        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): pass parameter for smartReplace using _canSmartReplaceWithPasteboard
        (-[WebHTMLView _changeSpellingFromMenu:]): pass NO for smartReplace
        (-[WebHTMLView pasteboardTypesForSelection]): include WebSmartPastePboardType when _canSmartCopyOrDelete return YES
        (-[WebHTMLView writeSelectionWithPasteboardTypes:toPasteboard:]): ditto
        (-[WebHTMLView concludeDragForDraggingInfo:actionMask:]): pass parameter for smartReplace using _canSmartReplaceWithPasteboard
        (-[WebHTMLView delete:]): call _deleteSelection
        (-[WebHTMLView cut:]): don't call delegate twice, call _deleteRange to delete
        (-[WebHTMLView pasteAsPlainText:]): pass parameter for smartReplace using _canSmartReplaceWithPasteboard
        (-[WebHTMLView _changeWordCaseWithSelector:]): pass NO for smartReplace
        (-[WebHTMLView deleteBackward:]): call _deleteSelection when there is a selected range
        (-[WebHTMLView _changeSpellingToWord:]): pass NO for smartReplace
        (-[WebHTMLView deleteToMark:]): pass NO for smartDeleteOK
        (-[WebHTMLView transpose:]): pass NO for smartReplace
        (-[WebHTMLView _shouldDeleteRange:]): moved
        (-[WebHTMLView _deleteRange:preflight:killRing:prepend:smartDeleteOK:]): moved, handle smartDelete
        (-[WebHTMLView _deleteWithDirection:granularity:killRing:]): moved
        (-[WebHTMLView _deleteSelection]): new
(-[WebHTMLView _canSmartReplaceWithPasteboard]): new
(-[WebHTMLView _canSmartCopyOrDelete]): new
        (-[WebHTMLView setMarkedText:selectedRange:]): pass NO for smartReplace
        (-[WebHTMLView _discardMarkedText]): call _deleteSelection
        (-[WebTextCompleteController _insertMatch:]): pass NO for smartReplace
        (-[WebTextCompleteController endRevertingChange:moveLeft:]): pass NO for smartReplace
        * WebView.subproj/WebHTMLViewInternal.h:
        * WebView.subproj/WebView.m:
        (-[WebView _commonInitializationWithFrameName:groupName:]): set smartInsertDeleteEnabled to YES
        (-[WebView replaceSelectionWithNode:]): pass NO for smartReplace
        (-[WebView replaceSelectionWithText:]): pass NO for smartReplace
        (-[WebView replaceSelectionWithMarkupString:]): pass NO for smartReplace
        (-[WebView deleteSelection]): call _deleteSelection on WebHTMLView

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7627 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/htmlediting.h
WebCore/khtml/editing/htmlediting_impl.cpp
WebCore/khtml/editing/htmlediting_impl.h
WebCore/kwq/WebCoreBridge.h
WebCore/kwq/WebCoreBridge.mm
WebKit/ChangeLog
WebKit/WebView.subproj/WebDataSource.m
WebKit/WebView.subproj/WebHTMLView.m
WebKit/WebView.subproj/WebHTMLViewInternal.h
WebKit/WebView.subproj/WebView.m