Reviewed by John
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Mar 2005 21:18:59 +0000 (21:18 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 Mar 2005 21:18:59 +0000 (21:18 +0000)
commitd4ea7f68eac83a07bedfa41796a5335b748c1bec
tree8954c84eb0bc6bd9dd76d8b203ecf005a1422bc7
parentf88d898f29e6af8b7d248f068ae9075aba6feaa7
    Reviewed by John

        Fix for this bug:

        <rdar://problem/4039676> REGRESSION (Mail): in reply, <cr> on pasted text (without trailing newline) is eaten when pasted above date

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplaceSelectionCommand::doApply): Code to "eat" a <br> element, that was creating an otherwise empty line, was running
        when it should not. If the content being pasted in does not end in a "logical" newline itself, then the <br> already
        in the content needs to be preserved. A simple one-line change now sees to this.

        * layout-tests/editing/pasteboard/paste-text-010-expected.txt: This test now has an extra, but harmless,
        <br> at the end of a paragraph. This makes sense given the code change.

        New test:
        * layout-tests/editing/pasteboard/paste-text-018-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-018.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/editing/pasteboard/paste-text-010-expected.txt
LayoutTests/editing/pasteboard/paste-text-018-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/paste-text-018.html [new file with mode: 0644]
WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp