WebCore:
authorjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2007 22:33:07 +0000 (22:33 +0000)
committerjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Nov 2007 22:33:07 +0000 (22:33 +0000)
commit04e4ad12be0921820e32423445ccb07a75007faa
tree3037b8029145b3ae0a85aac8b8a9135558179905
parentce76c1569b20473447bffb1e23a7745941c9b740
WebCore:

        Reviewed by Alexey Proskuryakov.

        <rdar://problem/5546763> CrashTracer: [USER] 362 crashes at WebCore::DeleteSelectionCommand::mergeParagraphs

        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
        Removed an irrelevant FIXME.
        (WebCore::DeleteSelectionCommand::mergeParagraphs): If the block that contained the end of the selection
        hasn't been removed but has been emptied by deletion, we would to try and fail to create a VisiblePosition
        inside that block, which could lead to a crash.  If that happens, there's no content in the block to move,
        so just remove the block and return.
        Preserve m_needPlaceholder during the call to moveParagraphs, since it may change it and since it does
        its own placeholder insertion when necessary.
        (WebCore::DeleteSelectionCommand::doApply): No need to check m_needPlaceholder before calling mergeParagraphs,
        because it handles preserving m_needPlaceholder when it calls moveParagraphs.

LayoutTests:

        Reviewed by Alexey Proskuryakov.

        <rdar://problem/5546763> CrashTracer: [USER] 362 crashes at WebCore::DeleteSelectionCommand::mergeParagraphs

        * editing/deleting/5546763-expected.txt: Added.
        * editing/deleting/5546763.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/deleting/5546763-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/5546763.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/DeleteSelectionCommand.cpp