LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Apr 2006 19:36:59 +0000 (19:36 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Apr 2006 19:36:59 +0000 (19:36 +0000)
commitcfd231179cf78eaced4a2501ac9782a4d658954a
tree7ca848fa0506ada84caa3a07124af3e986381312
parent55b54bd94de3a5cf7eeeae9ce628570e5299daed
LayoutTests:

        Reviewed by adele
        <http://bugzilla.opendarwin.org/show_bug.cgi?id=8219>
        REGRESSION: Two extra newlines added when pasting a single styled line into a plaintext-only region

        Updated to relfect fix:
        * editing/pasteboard/8145-1-expected.checksum:
        * editing/pasteboard/8145-1-expected.png:
        * editing/pasteboard/8145-1-expected.txt:
        * editing/pasteboard/8145-1.html:

WebCore:

        Reviewed by adele

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=8219>
        REGRESSION: Two extra newlines added when pasting a single styled line into a plaintext-only region

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplacementFragment::ReplacementFragment):
        Converting the fragment to plaintext introduced an extraneous newline because
        the range passed to plainText ended after the paragraph containing the fragment
        built from the markup that TextEdit put on the paste board.  TextIterator will
        emit a newline when it exits a paragraph.
        Two extra newlines were added because the '\n' in the plaintext string turns
        into an interchange newline, which isn't removed because of 8250, and the
        interchange newline looks like inline content that requires the insertion of
        a paragraph separator during paste.
        Fixed by creating a range using VisiblePositions at the start and the end of
        the node that holds the fragment during paste's test rendering.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13729 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/8145-1-expected.checksum
LayoutTests/editing/pasteboard/8145-1-expected.png
LayoutTests/editing/pasteboard/8145-1-expected.txt
LayoutTests/editing/pasteboard/8145-1.html
WebCore/ChangeLog
WebCore/editing/ReplaceSelectionCommand.cpp