WebCore:
authorjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2007 19:55:37 +0000 (19:55 +0000)
committerjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2007 19:55:37 +0000 (19:55 +0000)
commit1f4c4d66af6be700fbfc4c5bf40cc7e27b6a1a72
treea15f8dbabccdd484bf8b6d051a45bf89053c5185
parent03d094a554f315e7597571f1832c74edd7b232da
WebCore:

        Reviewed by Darin Adler.

        <rdar://problem/5575101> GoogleDocs: Hang in SplitElementCommand::doApply when outdenting a list item in a particular list

        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::splitTreeToNode): Moved here.
        * editing/CompositeEditCommand.h:
        * editing/IndentOutdentCommand.cpp: Moved splitTreeToNode.
        * editing/IndentOutdentCommand.h: Ditto, and removed unimplemented splitTreeTo.
        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::doApply): Split ancestors of listChildNode between
        it and listNode, if they exists, so that moving listChildNode doesn't put it out
        of order.  Added a test case to cover each change.
        * editing/SplitElementCommand.cpp:
        (WebCore::SplitElementCommand::doApply): Added an ASSERT to catch code that
        tries to split a container at a bogus child, and an early return to avoid a
        hang in that case.

LayoutTests:

        Reviewed by Darin Adler.

        <rdar://problem/5575101> Hang in SplitElementCommand::doApply when outdenting a list item in a particular list

        * editing/execCommand/5575101-1-expected.txt: Added.
        * editing/execCommand/5575101-1.html: Added.
        * editing/execCommand/5575101-2-expected.txt: Added.
        * editing/execCommand/5575101-2.html: Added.
        * editing/execCommand/5575101-3-expected.txt: Added.
        * editing/execCommand/5575101-3.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28716 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/5575101-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/5575101-1.html [new file with mode: 0644]
LayoutTests/editing/execCommand/5575101-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/5575101-2.html [new file with mode: 0644]
LayoutTests/editing/execCommand/5575101-3-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/5575101-3.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/CompositeEditCommand.h
WebCore/editing/IndentOutdentCommand.cpp
WebCore/editing/IndentOutdentCommand.h
WebCore/editing/InsertListCommand.cpp
WebCore/editing/SplitElementCommand.cpp