WebCore:
authorjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2007 05:32:35 +0000 (05:32 +0000)
committerjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Dec 2007 05:32:35 +0000 (05:32 +0000)
commitf15bd9a5b2aefbcfaa41e21a872cfe096ee69d1b
tree7069c87767c8414eecf2a2c029142e988ac31dd2
parent357bc8d5ae344d2797d900ad0d13563e2aa7b614
WebCore:

        Reviewed by Oliver Hunt.

        <rdar://problem/5607069> In Mail, a crash occurs at WebCore::AppendNodeCommand() after dragging image into a <FORM> element

        * editing/InsertLineBreakCommand.cpp:
        (WebCore::InsertLineBreakCommand::shouldUseBreakElement): Equip this function to
        handle editing positions, like [input, 0];
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply): Pass enclosingBlock a node peeled
        off of a non-editing position, to fix a bug where the enclosing block of [input, 0] was
        the input element itself.
        Insert a <br> when a <form> element is the enclosing block instead of splitting/cloning or
        nesting a <div>.

LayoutTests:

        Reviewed by Oliver Hunt.

        <rdar://problem/5607069> In Mail, a crash occurs at WebCore::AppendNodeCommand() after dragging image into a <FORM> element

        * editing/inserting/5607069-1-expected.checksum: Added.
        * editing/inserting/5607069-1-expected.png: Added.
        * editing/inserting/5607069-1-expected.txt: Added.
        * editing/inserting/5607069-1.html: Added.
        * editing/inserting/5607069-2.html: Added.
        * editing/inserting/5607069-3.html: Added.
        * platform/mac/editing/inserting/5607069-2-expected.checksum: Added.
        * platform/mac/editing/inserting/5607069-2-expected.png: Added.
        * platform/mac/editing/inserting/5607069-2-expected.txt: Added.
        * platform/mac/editing/inserting/5607069-3-expected.checksum: Added.
        * platform/mac/editing/inserting/5607069-3-expected.png: Added.
        * platform/mac/editing/inserting/5607069-3-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/inserting/5607069-1-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/5607069-1-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/5607069-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/5607069-1.html [new file with mode: 0644]
LayoutTests/editing/inserting/5607069-2.html [new file with mode: 0644]
LayoutTests/editing/inserting/5607069-3.html [new file with mode: 0644]
LayoutTests/platform/mac/editing/inserting/5607069-2-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/editing/inserting/5607069-2-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/editing/inserting/5607069-2-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/editing/inserting/5607069-3-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/editing/inserting/5607069-3-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/editing/inserting/5607069-3-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/InsertLineBreakCommand.cpp
WebCore/editing/InsertParagraphSeparatorCommand.cpp