LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Apr 2006 20:52:10 +0000 (20:52 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Apr 2006 20:52:10 +0000 (20:52 +0000)
commit1cbf07526ebe5ca25df369db65b866767c1545cc
treeec4940dea3be5d3bef21fbd91e31821cc1152bbd
parent760188fde8e472b97d8addf6f71d53f28d562c44
LayoutTests:

        Reviewed by darin

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
        REGRESSION: Line disappears when deleting

        Added:
        * editing/deleting/merge-different-styles-expected.checksum: Added.
        * editing/deleting/merge-different-styles-expected.png: Added.
        * editing/deleting/merge-different-styles-expected.txt: Added.
        * editing/deleting/merge-different-styles.html: Added.
        * editing/deleting/merge-no-br-expected.checksum: Added.
        * editing/deleting/merge-no-br-expected.png: Added.
        * editing/deleting/merge-no-br-expected.txt: Added.
        * editing/deleting/merge-no-br.html: Added.
        * editing/deleting/merge-whitespace-pre-expected.checksum: Added.
        * editing/deleting/merge-whitespace-pre-expected.png: Added.
        * editing/deleting/merge-whitespace-pre-expected.txt: Added.
        * editing/deleting/merge-whitespace-pre.html: Added.

        Fixes (not enough style on nodes for the fixes to be reflected in pixel results):
        * editing/deleting/delete-block-merge-contents-005-expected.txt:
        * editing/deleting/delete-block-merge-contents-006-expected.txt:
        * editing/deleting/delete-block-merge-contents-008-expected.txt:

        Equivalent render trees:
        * editing/deleting/delete-3857753-fix-expected.txt:
        * editing/inserting/insert-div-026-expected.txt:

        Forgot to checkin these new expected results after fixing the DRT bug:
        * fast/lists/drag-into-marker-expected.checksum:
        * fast/lists/drag-into-marker-expected.png:
        * fast/lists/drag-into-marker-expected.txt:

WebCore:

        Reviewed by darin

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=6608>
        REGRESSION: Line disappears when deleting

        Rewrote moveNodesAfterNode to address these problems:
        It moved nodes without preserving their style.
        It traversed over siblings looking for a br to know when
        to stop merging.  If the br was burried inside a span, it
        wouldn't find it.  If the text is whitespace:pre, it wouldn't
        stop.
        In theory it would crash if the "enclosingInlineElements" of the start of the
        selection to delete and the end of the selection to delete were the
        same.  We think that this will fix these:
        <rdar://problems/3950559&4498113>
        CrashTracer: 2116 crashes in Mail at com.apple.WebCore: khtml::CompositeEditCommand::insertNodeAfter + 32
        CrashTracer: 1569 crashes in Mail at com.apple.WebCore: khtml::DeleteSelectionCommand::moveNodesAfterNode + 340
        But we haven't been able to construct a reproducible case.

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Moved from ReplaceSelectionCommand.
        (WebCore::CompositeEditCommand::prune): Ditto.
        * editing/CompositeEditCommand.h:
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::mergeParagraphs):
        (WebCore::DeleteSelectionCommand::doApply):
        * editing/DeleteSelectionCommand.h:
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):
        * editing/ReplaceSelectionCommand.h:
        (WebCore::):
        * editing/markup.cpp:
        (WebCore::createMarkup):
        Was crashing when passed a collapsed range.  I early return an empty string instead.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
29 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-3857753-fix-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-005-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-006-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-008-expected.txt
LayoutTests/editing/deleting/merge-different-styles-expected.checksum [new file with mode: 0644]
LayoutTests/editing/deleting/merge-different-styles-expected.png [new file with mode: 0644]
LayoutTests/editing/deleting/merge-different-styles-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/merge-different-styles.html [new file with mode: 0644]
LayoutTests/editing/deleting/merge-no-br-expected.checksum [new file with mode: 0644]
LayoutTests/editing/deleting/merge-no-br-expected.png [new file with mode: 0644]
LayoutTests/editing/deleting/merge-no-br-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/merge-no-br.html [new file with mode: 0644]
LayoutTests/editing/deleting/merge-whitespace-pre-expected.checksum [new file with mode: 0644]
LayoutTests/editing/deleting/merge-whitespace-pre-expected.png [new file with mode: 0644]
LayoutTests/editing/deleting/merge-whitespace-pre-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/merge-whitespace-pre.html [new file with mode: 0644]
LayoutTests/editing/inserting/insert-div-026-expected.txt
LayoutTests/fast/lists/drag-into-marker-expected.checksum
LayoutTests/fast/lists/drag-into-marker-expected.png
LayoutTests/fast/lists/drag-into-marker-expected.txt
WebCore/ChangeLog
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/CompositeEditCommand.h
WebCore/editing/DeleteSelectionCommand.cpp
WebCore/editing/DeleteSelectionCommand.h
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/ReplaceSelectionCommand.h
WebCore/editing/markup.cpp