-
justing authored
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: http://svn.webkit.org/repository/webkit/trunk@20923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
e7a1a8fc