LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 May 2006 21:43:03 +0000 (21:43 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 May 2006 21:43:03 +0000 (21:43 +0000)
commit5fccf62c07a62e2493258d15d78d1946054df1cf
tree780a6df63e8107fc1abd323729f46b53fc8da397
parent1ea9b45707be82decb0782d985b66b2c38aae81c
LayoutTests:

        Reviewed by darin

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=8653>
        Remove a use of hasMoreThanOneBlock

        Deleting didn't merge because of code that stopped the merge whenever
        the end of the selection to delete was in a fully selected line.
        * editing/deleting/merge-endOfParagraph-expected.checksum: Added.
        * editing/deleting/merge-endOfParagraph-expected.png: Added.
        * editing/deleting/merge-endOfParagraph-expected.txt: Added.
        * editing/deleting/merge-endOfParagraph.html: Added.

        Two testcases where paste did not request a merge from deletion, but should have.
        * editing/pasteboard/merge-after-delete-1-expected.checksum: Added.
        * editing/pasteboard/merge-after-delete-1-expected.png: Added.
        * editing/pasteboard/merge-after-delete-1-expected.txt: Added.
        * editing/pasteboard/merge-after-delete-1.html: Added.
        * editing/pasteboard/merge-after-delete-2-expected.checksum: Added.
        * editing/pasteboard/merge-after-delete-2-expected.png: Added.
        * editing/pasteboard/merge-after-delete-2-expected.txt: Added.
        * editing/pasteboard/merge-after-delete-2.html: Added.

        Code that prevents nesting incoming blocks in the block being pasted into
        could reverse the order of pasted paragraphs.
        * editing/pasteboard/prevent-block-nesting-01-expected.checksum: Added.
        * editing/pasteboard/prevent-block-nesting-01-expected.png: Added.
        * editing/pasteboard/prevent-block-nesting-01-expected.txt: Added.
        * editing/pasteboard/prevent-block-nesting-01.html: Added.

WebCore:

        Reviewed by darin

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=8653>
        Remove a use of hasMoreThanOneBlock, which uses info from the test rendering.

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::initializePositionData):
        Removed code that stopped the merge if the end of the selection to delete
        was in a fully selected line, which was nonsense.

        (WebCore::DeleteSelectionCommand::mergeParagraphs):
        Deletion does a bad job of updating the endpoints of the selection as it removes
        content.  If the endpoints have been flip flipped, bail.
        If deletion has removed everything from the block that contained the
        start of the selection to delete, we can't create a visible position inside
        that block to serve as a destination for the merge.  So, we insert a placeholder
        at that position to prop the block open to let content in.

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):
        Added an assert and two early returns for cases where we'll crash.
        Removed a use of !fragment.hasMoreThanOneBlock, which uses test rendering info
        and which was wrong.
        If we've already inserted content during the start merge, insertionPos will be
        the position just after that content, so inserting new content before insertionPos
        will reverse its order.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/merge-endOfParagraph-expected.checksum [new file with mode: 0644]
LayoutTests/editing/deleting/merge-endOfParagraph-expected.png [new file with mode: 0644]
LayoutTests/editing/deleting/merge-endOfParagraph-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/merge-endOfParagraph.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-after-delete-1-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-after-delete-1-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-after-delete-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-after-delete-1.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-after-delete-2-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-after-delete-2-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-after-delete-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-after-delete-2.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/prevent-block-nesting-01-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/prevent-block-nesting-01-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/prevent-block-nesting-01-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/prevent-block-nesting-01.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/DeleteSelectionCommand.cpp
WebCore/editing/ReplaceSelectionCommand.cpp