WebCore:
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2005 00:43:57 +0000 (00:43 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 28 Jan 2005 00:43:57 +0000 (00:43 +0000)
commitec02296c0983adbade389517dddded43234dbda5
tree7d5733838aa70a04eda4aef10cdee216ff808674
parent269b21b2a02a61870da822c0e98d8590abaf49ae
WebCore:

        Reviewed by Maciej

        Fix for this bug:

        <rdar://problem/3973254> Deletions of ranges does not coalesce correctly with subsequent typing

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertTextCommand::deleteCharacter): Remove this dead code.
        (khtml::ReplaceSelectionCommand::editingAction): Moved this code to a better place in the file.
        It was in with unrelated functions.
        (khtml::TypingCommand::TypingCommand): Reorganize initialization list so it is easier to read.
        (khtml::TypingCommand::issueCommandForDeleteKey): Remove dead code. Roll in remaining code into deleteKeyPressed.
        (khtml::TypingCommand::deleteKeyPressed): Add in support for carrying along smart delete flag.
        (khtml::TypingCommand::forwardDeleteKeyPressed): New function. Makes forward delete work like
        "regular" delete in terms of coalescing typing.
        (khtml::TypingCommand::doApply): Add case for ForwardDeleteKey.
        (khtml::TypingCommand::preservesTypingStyle): Ditto.
        * khtml/editing/htmlediting.h:
        (khtml::TypingCommand::): Add ForwardDeleteKey constant. Remove a couple declarations for now-dead code.
        (khtml::TypingCommand::smartDelete): New accessor.
        (khtml::TypingCommand::setSmartDelete): Ditto.
        * kwq/WebCoreBridge.h:
        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge deleteKeyPressedWithSmartDelete:]): Add smart delete flag.
        (-[WebCoreBridge forwardDeleteKeyPressedWithSmartDelete:]): New method.
        * khtml/editing/jsediting.cpp: Add supprt for ForwardDelete command
        * layout-tests/editing/editing.js: Ditto.
        * layout-tests/editing/deleting/delete-and-undo-expected.txt: Added.
        * layout-tests/editing/deleting/delete-and-undo.html: Added.
        * layout-tests/editing/deleting/forward-delete-expected.txt: Added.
        * layout-tests/editing/deleting/forward-delete.html: Added.

WebKit:

        Reviewed by Maciej

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _handleKillRing:prepend:]): New helper function. Code factored out from
         _deleteRange:killRing:prepend:smartDeleteOK:isTypingAction:.
        (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:isTypingAction:]): No longer takes
        unused preflight argument. Now takes new isTypingAction argument. Uses isTypingAction to
        determine which flavor of delete command to call.
        (-[WebHTMLView _deleteSelection]): No longer passes unused preflight argument. Now passes new isTypingAction argument.
        (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Rearranged code to call
        correct flavor of delete command, based on whether typing should be preserved. Some other cleanups.
        (-[WebHTMLView deleteForward:]): Add _isEditable check.
        (-[WebHTMLView deleteBackward:]): Now calls _deleteWithDirection instead of having unique behavior different
        from forward delete.
        (-[WebHTMLView deleteWordForward:]): Add new isTypingAction flag to _deleteWithDirection call.
        (-[WebHTMLView deleteWordBackward:]): Ditto.
        (-[WebHTMLView deleteToBeginningOfLine:]): Ditto.
        (-[WebHTMLView deleteToEndOfLine:]): Ditto.
        (-[WebHTMLView deleteToBeginningOfParagraph:]): Ditto.
        (-[WebHTMLView deleteToEndOfParagraph:]): Ditto.
        (-[WebHTMLView deleteToMark:]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/editing/deleting/delete-and-undo-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/delete-and-undo.html [new file with mode: 0644]
LayoutTests/editing/deleting/forward-delete-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/forward-delete.html [new file with mode: 0644]
LayoutTests/editing/editing.js
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/htmlediting.h
WebCore/khtml/editing/jsediting.cpp
WebCore/kwq/WebCoreBridge.h
WebCore/kwq/WebCoreBridge.mm
WebKit/ChangeLog
WebKit/WebView.subproj/WebHTMLView.m