Commit b5506610 authored by justing's avatar justing

LayoutTests:

        Reviewed by harrison

        * editing/inserting/redo-expected.checksum: Added.
        * editing/inserting/redo-expected.png: Added.
        * editing/inserting/redo-expected.txt: Added.
        * editing/inserting/redo.html: Added.
        * editing/pasteboard/copy-paste-bidi-expected.txt:

WebCore:

        Reviewed by harrison
        
        <rdar://problem/4700341>
        REGRESSION: In new mail message, caret isn't placed at end of line after redoing typing

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply): Added a FIXME.
        * page/Frame.cpp:
        (WebCore::Frame::reappliedEditing): Restore the endingSelection(), not the startingSelection().



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 575e5ea3
2006-08-28 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
* editing/inserting/redo-expected.checksum: Added.
* editing/inserting/redo-expected.png: Added.
* editing/inserting/redo-expected.txt: Added.
* editing/inserting/redo.html: Added.
* editing/pasteboard/copy-paste-bidi-expected.txt:
2006-08-28 Alice Liu <alice.liu@apple.com>
Reviewed by Geoff.
b486dc303f66ca3808e6b8ceb3cc62e8
\ No newline at end of file
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 48 of #text > DIV > BODY > HTML > #document to 48 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 48 of #text > DIV > BODY > HTML > #document to 48 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderBlock {DIV} at (0,0) size 784x18
RenderText {#text} at (0,0) size 294x18
text run at (0,0) width 294: "The caret should be at the end of this sentence."
caret: position 48 of child 0 {#text} of child 0 {DIV} of child 0 {BODY} of child 0 {HTML} of document
<div id="test" contenteditable="true"></div>
<script>
window.getSelection().setPosition(document.getElementById("test"), 0);
document.execCommand("InsertText", false, "The caret should be at the end of this sentence.");
document.execCommand("Undo");
document.execCommand("Redo");
</script>
\ No newline at end of file
......@@ -45,7 +45,6 @@ layer at (0,0) size 800x600
text run at (0,0) width 32: "1234"
text run at (32,0) width 36 RTL: "\x{5E9}\x{5D3}\x{5D2}\x{5DB}"
text run at (68,0) width 4: ":"
RenderBlock (anonymous) at (0,18) size 784x0
RenderBlock {DIV} at (0,18) size 784x18
RenderText {#text} at (712,0) size 72x18
text run at (712,0) width 40 RTL: "\x{5E9}\x{5D3}\x{5D2}\x{5DB}:"
......
2006-08-28 Justin Garcia <justin.garcia@apple.com>
Reviewed by harrison
<rdar://problem/4700341>
REGRESSION: In new mail message, caret isn't placed at end of line after redoing typing
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply): Added a FIXME.
* page/Frame.cpp:
(WebCore::Frame::reappliedEditing): Restore the endingSelection(), not the startingSelection().
2006-08-28 Tim Omernick <timo@apple.com>
Reviewed by John Sullivan.
......
......@@ -568,7 +568,9 @@ void ReplaceSelectionCommand::doApply()
if (shouldMergeStart(selectionStartWasStartOfParagraph, fragment.hasInterchangeNewlineAtStart())) {
VisiblePosition destination = startOfInsertedContent.previous();
VisiblePosition startOfParagraphToMove = startOfInsertedContent;
// FIXME: Maintain positions for the start and end of inserted content instead of keeping nodes. The nodes are
// only ever used to create positions where inserted content starts/ends.
moveParagraph(startOfParagraphToMove, endOfParagraph(startOfParagraphToMove), destination);
m_firstNodeInserted = endingSelection().visibleStart().deepEquivalent().downstream().node();
if (!m_lastNodeInserted->inDocument())
......
......@@ -2090,7 +2090,7 @@ void Frame::reappliedEditing(PassRefPtr<EditCommand> cmd)
{
dispatchEditableContentChangedEvents(*cmd);
SelectionController sel(cmd->startingSelection());
SelectionController sel(cmd->endingSelection());
if (shouldChangeSelection(sel))
setSelection(sel, true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment