LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jan 2007 01:00:36 +0000 (01:00 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jan 2007 01:00:36 +0000 (01:00 +0000)
commit707d65fe89318e53d8253e17910ea495cd7f6cd3
treee6e74fdf8c30f28dd8deb47eb0b3508ec4537350
parent78e9f2dcc74ed6f3e92433b98ed20e0a5bdf094b
LayoutTests:

        Reviewed by harrison

        <rdar://problem/4916235>
        <rdar://problem/4857269>
        <rdar://problem/4916583>
        <rdar://problem/4928635>

        Fixed and removed FIXME:
        * editing/execCommand/create-list-from-range-selection-expected.checksum:
        * editing/execCommand/create-list-from-range-selection-expected.png:
        * editing/execCommand/create-list-from-range-selection-expected.txt:
        * editing/execCommand/create-list-from-range-selection.html:
        Added:
        * editing/deleting/4916235-1-expected.txt: Added.
        * editing/deleting/4916235-1.html: Added.
        * editing/execCommand/4916235-expected.txt: Added.
        * editing/execCommand/4916235.html: Added.
        * editing/execCommand/4916583-expected.checksum: Added.
        * editing/execCommand/4916583-expected.png: Added.
        * editing/execCommand/4916583-expected.txt: Added.
        * editing/execCommand/4916583.html: Added.
        * editing/execCommand/4928635-expected.txt: Added.
        * editing/execCommand/4928635.html: Added.
        Equivalent trees:
        * editing/execCommand/remove-list-item-1-expected.txt:
        * editing/execCommand/remove-list-items-expected.txt:
        * editing/execCommand/switch-list-type-expected.txt:
        Introduced an extraneous newline because of the poor substitute for
        VisiblePosition creation in shouldEmitNewlineAfterNode:
        * dom/xhtml/level3/core/nodecomparedocumentposition12-expected.txt:
        * dom/xhtml/level3/core/nodecomparedocumentposition17-expected.txt:
        * dom/xhtml/level3/core/nodeinsertbefore09-expected.txt:

WebCore:

        Reviewed by harrison

        <rdar://problem/4916235>
        eBay Editor: Crash occurs at WebCore::Range::startPosition() after applying ordered list styling to selected text
        <rdar://problem/4857269>
        REGRESSION: editing/execCommand/create-list-from-range-selection.html no longer works as intended
        <rdar://problem/4916583>
        eBay Editor: Removing a indent from a list item actually deletes the list item instead
        <rdar://problem/4928635>
        designMode outdent causes crash (11750)

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraphs): Fixed br insertion
        after the pruning of empty containers left over after the paragraph
        to move is removed.
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::DeleteSelectionCommand): There are
        bugs that leave the wrong number of line breaks after a deletion
        that expands to include special elements (lists/tables).  Added
        a workaround so that moveParagraphs can avoid these until they
        are fixed.
        (WebCore::DeleteSelectionCommand::initializeStartEnd): Ditto.
        (WebCore::DeleteSelectionCommand::initializePositionData): Ditto.
        * editing/DeleteSelectionCommand.h:
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::advance): We used to not call exitNode for
        ancestors of a node where the next node in a pre-order traversal is
        the ranges's pastEndNode().  This is only correct for ancestors that
        contain the end of the range.
        (WebCore::shouldEmitNewlineAfterNode): Added, we should only emit newlines
        after blocks that have VisiblePositions after them.  VisiblePosition creation
        though is too expensive to do here, what I added here is an OK substitute.
        (WebCore::shouldEmitNewlineBeforeNode): Added.  No special logic yet.
        (WebCore::TextIterator::handleNonTextNode): Call shouldEmitNewlineBeforeNode.
        (WebCore::TextIterator::exitNode): Call shouldEmitNewlineAfterNode.
        (WebCore::SimplifiedBackwardsTextIterator::handleNonTextNode): Call
        shouldEmitNewlineAfterNode.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
26 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition12-expected.txt
LayoutTests/dom/xhtml/level3/core/nodecomparedocumentposition17-expected.txt
LayoutTests/dom/xhtml/level3/core/nodeinsertbefore09-expected.txt
LayoutTests/editing/deleting/4916235-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/4916235-1.html [new file with mode: 0644]
LayoutTests/editing/execCommand/4916235-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/4916235.html [new file with mode: 0644]
LayoutTests/editing/execCommand/4916583-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/4916583-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/4916583-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/4916583.html [new file with mode: 0644]
LayoutTests/editing/execCommand/4928635-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/4928635.html [new file with mode: 0644]
LayoutTests/editing/execCommand/create-list-from-range-selection-expected.checksum
LayoutTests/editing/execCommand/create-list-from-range-selection-expected.png
LayoutTests/editing/execCommand/create-list-from-range-selection-expected.txt
LayoutTests/editing/execCommand/create-list-from-range-selection.html
LayoutTests/editing/execCommand/remove-list-item-1-expected.txt
LayoutTests/editing/execCommand/remove-list-items-expected.txt
LayoutTests/editing/execCommand/switch-list-type-expected.txt
WebCore/ChangeLog
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/DeleteSelectionCommand.cpp
WebCore/editing/DeleteSelectionCommand.h
WebCore/editing/TextIterator.cpp