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