Reviewed by John
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Dec 2004 22:41:27 +0000 (22:41 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Dec 2004 22:41:27 +0000 (22:41 +0000)
commit67f04ab07ec086d386b33a3efc76592b7e862140
tree2265e9c136175f6eb59d4f94f232406d91aa26f8
parent6d9daa7155acfcdc3bfda32cc9aa338bf71a3d7a
    Reviewed by John

        Fix for this bug:

        <rdar://problem/3917863> REGRESSION (Mail): pasting two lines of plain text copied from an RTF document results in two styles

        Code to figuire out the end node to merge was missing the font tag in the second paragraph
        written out by AppKit convert-to-HTML function. I refined the algorithm to be smarter.

        * khtml/editing/htmlediting.cpp:
        (khtml::ReplacementFragment::mergeEndNode): Refine algorithm used to walk through the fragment being pasted
        looking for the node that is the last inline in the last block of the fragment. The old algorithm was
        insufficiently powerful.
        (khtml::ReplacementFragment::enclosingBlock): New helper function.
        * khtml/editing/htmlediting.h: Add declaration for new helper function.
        * layout-tests/editing/pasteboard/paste-text-011-expected.txt: Added.
        * layout-tests/editing/pasteboard/paste-text-011.html: Added.

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