LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2007 20:27:58 +0000 (20:27 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2007 20:27:58 +0000 (20:27 +0000)
commit8d60a101bb0d687d11dc0c7232d5ddca628eb1c5
tree02a7d7368210ea255dffd4f62599b3b64e37d284
parentb4652efebda95bd46fc96bb2f6c073dc122cf991
LayoutTests:

        Reviewed by darin

        <rdar://problem/5136770>
        Gmail Editor: Hang when turning a particular multi-line selection into a list

        Demonstrates the bug:
        * editing/execCommand/5136770-expected.checksum: Added.
        * editing/execCommand/5136770-expected.png: Added.
        * editing/execCommand/5136770-expected.txt: Added.
        * editing/execCommand/5136770.html: Added.

        Added placeholders in empty list items:
        * editing/execCommand/4747450-expected.txt:
        * editing/execCommand/insert-list-empty-div-expected.txt:
        * editing/execCommand/4917055-expected.txt:

        A horizontal rule pushed into a list item appears *before*
        the list marker in the render tree, although, the new results
        look more correct (13376):
        * editing/execCommand/create-list-with-hr-expected.checksum:
        * editing/execCommand/create-list-with-hr-expected.png:
        * editing/execCommand/create-list-with-hr-expected.txt:
        * editing/execCommand/create-list-with-hr.html:

WebCore:

        Reviewed by darin

        <rdar://problem/5136770>
        Gmail Editor: Hang when turning a particular multi-line selection into a list

        When InsertListCommand pushes content into list items,
        it creates an empty list item and then calls moveParagraphs.
        But moveParagraphs' selection preservation code fails when
        it encounters empty list items (list items w/o placeholders).
        This causes InsertListCommand to lose track of where it has
        already been performed, which causes the hang.

        * editing/InsertListCommand.cpp:
        (WebCore::InsertListCommand::doApply): Use brs to hold open
        empty list items.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/4747450-expected.txt
LayoutTests/editing/execCommand/4917055-expected.txt
LayoutTests/editing/execCommand/5136770-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/5136770-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/5136770-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/5136770.html [new file with mode: 0644]
LayoutTests/editing/execCommand/create-list-with-hr-expected.checksum
LayoutTests/editing/execCommand/create-list-with-hr-expected.png
LayoutTests/editing/execCommand/create-list-with-hr-expected.txt
LayoutTests/editing/execCommand/create-list-with-hr.html
LayoutTests/editing/execCommand/insert-list-empty-div-expected.txt
WebCore/ChangeLog
WebCore/editing/InsertListCommand.cpp