WebCore:
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Mar 2005 22:24:18 +0000 (22:24 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Mar 2005 22:24:18 +0000 (22:24 +0000)
commit5b2adce0eb4732c952cadfb2c6a4165f698abb2f
treeec462987f046b96b804e5a9cb95f9da49dce6488
parentf7bbaee95e78efa3c8c24ff8cb7d2249ce7186f7
WebCore:

        Reviewed by John.

        - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut

        * khtml/editing/htmlediting.h: Added insertTextRunWithoutNewlines.
        * khtml/editing/htmlediting.cpp:
        (khtml::InsertTextCommand::input): Added assertion to make sure strings with newlines don't get
        down to this level.
        (khtml::TypingCommand::insertText): Added. Takes the name of the old function, but is a new
        level that breaks runs into lines and inserts each one separately.
        (khtml::TypingCommand::insertTextRunWithoutNewlines): Renamed old insertText to this.

        * khtml/dom/dom_string.h: Made substring be a const member function.
        * khtml/dom/dom_string.cpp: (DOM::DOMString::substring): Made this const.

WebKit:

        Reviewed by John.

        - fixed <rdar://problem/4036817> REGRESSION: ctrl-y broken when a line + carriage return cut

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView _deleteRange:killRing:prepend:smartDeleteOK:deletionAction:]): Merged _handleKillRing behavior
        into this function, since there's now a more-complicated way the startNewKillRingSequence boolean needs to
        be handled. Set the startNewKillRingSequence boolean after the entire process so changing the selection before
        and during the editing dosn't clear it. Also change "isTypingAction" parameter to "deletionAction" so we can
        handle forward delete with this method.
        (-[WebHTMLView _deleteSelection]): Pass deleteSelectionAction for action rather than NO for isTypingAction,
        which is the way to say the same thing using the new parameter.
        (-[WebHTMLView _deleteWithDirection:granularity:killRing:isTypingAction:]): Refactor to use the _deleteRange
        method above. Also calls _shouldDeleteRange: for the pre-existing selection case; not doing that before was
        a bug.
        (-[WebHTMLView deleteToMark:]): Pass deleteSelectionAction for action rather than NO for isTypingAction,
        which is the way to say the same thing using the new parameter.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog-2005-08-23
WebCore/khtml/dom/dom_string.cpp
WebCore/khtml/dom/dom_string.h
WebCore/khtml/editing/htmlediting.cpp
WebCore/khtml/editing/htmlediting.h
WebKit/ChangeLog
WebKit/WebView.subproj/WebHTMLView.m