WebCore:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2007 23:38:41 +0000 (23:38 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Oct 2007 23:38:41 +0000 (23:38 +0000)
commite131ed19c6b2019b44f129de7165373d095f7b35
tree1785d177a7e6dc3a6f479ed2ad262c2fd7581228
parentb6945a5c915553399151072641d29193c9a8480d
WebCore:

        Reviewed by Harrison.

        <rdar://problem/5483567> REGRESSION (Tiger only): Pasting words copied from TextEdit in Mail adds extra newline

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Added.
        We would like to insert the fragment as-is if possible, but AppKit on Tiger
        creates fragments from RTF data that have carriage returns and spaces at the
        beginning and end, and those need to be removed since they'll interfere with
        paragraph merging.
        (WebCore::ReplaceSelectionCommand::doApply):
        * editing/ReplaceSelectionCommand.h:

LayoutTests:

        Reviewed by Harrison.

        <rdar://problem/5483567> REGRESSION (Tiger only): Pasting words copied from TextEdit in Mail adds extra newline

        Re-enabling this test:
        * editing/pasteboard/5483567.html: Added.
        * editing/pasteboard/5483567.html-disabled: Removed.
        Also demonstrates fix:
        * platform/mac/editing/pasteboard/paste-RTFD-expected.checksum:
        * platform/mac/editing/pasteboard/paste-RTFD-expected.png:
        * platform/mac/editing/pasteboard/paste-RTFD-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@26374 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/5483567.html [new file with mode: 0644]
LayoutTests/platform/mac/editing/pasteboard/paste-RTFD-expected.checksum
LayoutTests/platform/mac/editing/pasteboard/paste-RTFD-expected.png
LayoutTests/platform/mac/editing/pasteboard/paste-RTFD-expected.txt
WebCore/ChangeLog
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/ReplaceSelectionCommand.h