Reviewed by John
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Feb 2005 17:01:57 +0000 (17:01 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Feb 2005 17:01:57 +0000 (17:01 +0000)
commitfaf6bcc364a73f908686b6d97dba9a316470aa0b
treed4c74c5be5be71d31cd58f8e2f349c7fc584b35d
parent16607a5629aa21de1cf2d0a6d27bfa3df5a8a8af
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3951178> REGRESSION (Mail): blank line lost after pasting as quotation

        Problem was that the blank line after the selection was getting deleted incorrectly since the
        paste code thought this was an unneeded placeholder rather than a placeholder outside of the
        selection.

        * khtml/editing/htmlediting.cpp:
        (khtml::CompositeEditCommand::removeBlockPlaceholderIfNeeded): Now calls findBlockPlaceholder.
        (khtml::CompositeEditCommand::findBlockPlaceholder): Moved finding code formerly in
        removeBlockPlaceholderIfNeeded to this new helper.
        (khtml::ReplaceSelectionCommand::doApply): Do not delete placeholder up front. Call
        findBlockPlaceholder, and delete it later if needed in the already-existing cleanup step.
        * khtml/editing/htmlediting.h: Add new function.

        New layout test.

        * layout-tests/editing/pasteboard/paste-text-017-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-017.html: Added.

        Result changed for the better.

        * layout-tests/editing/pasteboard/paste-text-011-expected.txt

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