LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Apr 2006 20:11:45 +0000 (20:11 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Apr 2006 20:11:45 +0000 (20:11 +0000)
commita6b4c8442e772d57caf8c3177f44df8978b0b740
tree62d0f686fd72de7f32bd6aadb79ba5da011f6920
parent23f926a8cf4a77482a515cd41bf45febc0590e7f
LayoutTests:

        Reviewed by darin

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=8624>
        Placeholders aren't always removed during paste
        <rdar://problem/4059807>
        Seed: Mail: pasting quoted content sometimes adds a phantom newline

        If a webkit-block-placeholder has been introduced by a bug in deletion,
        we shouldn't remove it during paste if it is now acting as a linebreak.
        * editing/pasteboard/bad-placeholder-expected.checksum: Added.
        * editing/pasteboard/bad-placeholder-expected.png: Added.
        * editing/pasteboard/bad-placeholder-expected.txt: Added.
        * editing/pasteboard/bad-placeholder.html: Added.
        Generic placeholder brs should be removed if they are displaced by pasted content.
        * editing/pasteboard/displaced-generic-placeholder-expected.checksum: Added.
        * editing/pasteboard/displaced-generic-placeholder-expected.png: Added.
        * editing/pasteboard/displaced-generic-placeholder-expected.txt: Added.
        * editing/pasteboard/displaced-generic-placeholder.html: Added.
        So should placeholder brs with our special class on them.
        * editing/pasteboard/displaced-placeholder-expected.checksum: Added.
        * editing/pasteboard/displaced-placeholder-expected.png: Added.
        * editing/pasteboard/displaced-placeholder-expected.txt: Added.
        * editing/pasteboard/displaced-placeholder.html: Added.
        Removed an unnecessary collapsed br.
        * editing/pasteboard/paste-text-010-expected.txt:
        Two fixes, an extra line was present after pasting with an interchange newline.
        * editing/pasteboard/paste-text-016-expected.checksum: Added.
        * editing/pasteboard/paste-text-016-expected.png: Added.
        * editing/pasteboard/paste-text-016-expected.txt: Added.
        * editing/pasteboard/paste-text-017-expected.checksum: Added.
        * editing/pasteboard/paste-text-017-expected.png: Added.
        * editing/pasteboard/paste-text-017-expected.txt: Added.
        The code that interprets the incoming br as a br in strict mode had a bug.
        * editing/pasteboard/quirks-mode-br-1-expected.checksum: Added.
        * editing/pasteboard/quirks-mode-br-1-expected.png: Added.
        * editing/pasteboard/quirks-mode-br-1-expected.txt: Added.
        * editing/pasteboard/quirks-mode-br-1.html: Added.
        The linePlaceholder removal was negating the work to interpret the last
        incoming br as a br in strict mode.
        * editing/pasteboard/quirks-mode-br-2-expected.checksum: Added.
        * editing/pasteboard/quirks-mode-br-2-expected.png: Added.
        * editing/pasteboard/quirks-mode-br-2-expected.txt: Added.
        * editing/pasteboard/quirks-mode-br-2.html: Added.
        Don't let collapsed brs become rendered as a result of the paste operation.
        * editing/pasteboard/unrendered-br-expected.checksum: Added.
        * editing/pasteboard/unrendered-br-expected.png: Added.
        * editing/pasteboard/unrendered-br-expected.txt: Added.
        * editing/pasteboard/unrendered-br.html: Added.

WebCore:

        Reviewed by darin

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=8624>
        Placeholders aren't always removed during paste
        <rdar://problem/4059807>
        Seed: Mail: pasting quoted content sometimes adds a phantom newline

        * editing/CompositeEditCommand.cpp: Added a FIXME.
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):
        Removed two no-op setEndingSelection calls.
        Store away a br at the position where we'll start inserting content in case the
        br a) is made unnecessary by the insertion (it's collapsed away) b) was acting
        as a placeholder and should therefore be displaced by inserted content or c) was
        acting as a line break and, as a result of the insertion, is now acting as a
        placeholder.
        Don't only store away brs that have the webkit-block-placeholder class on them.
        Any br that does any of the three things just mentioned should be removed.
        The linePlaceholder removal was run after the code that makes sure to interpret
        incoming brs strictly, and was negating that work in certain cases.

        (WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded): Described above.
        * editing/ReplaceSelectionCommand.h:
        * editing/VisiblePosition.cpp:
        (WebCore::isEqualIgnoringAffinity):
        Added a workaround for 8622.  We want this function to return true even if one of
        the two visible positions has been incorrectly canonicalized.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
37 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/bad-placeholder-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/bad-placeholder-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/bad-placeholder-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/bad-placeholder.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/displaced-generic-placeholder-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/displaced-generic-placeholder-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/displaced-generic-placeholder-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/displaced-generic-placeholder.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/displaced-placeholder-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/displaced-placeholder-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/displaced-placeholder-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/displaced-placeholder.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/paste-text-010-expected.txt
LayoutTests/editing/pasteboard/paste-text-016-expected.checksum
LayoutTests/editing/pasteboard/paste-text-016-expected.png
LayoutTests/editing/pasteboard/paste-text-016-expected.txt
LayoutTests/editing/pasteboard/paste-text-017-expected.checksum
LayoutTests/editing/pasteboard/paste-text-017-expected.png
LayoutTests/editing/pasteboard/paste-text-017-expected.txt
LayoutTests/editing/pasteboard/quirks-mode-br-1-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/quirks-mode-br-1-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/quirks-mode-br-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/quirks-mode-br-1.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/quirks-mode-br-2-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/quirks-mode-br-2-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/quirks-mode-br-2-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/quirks-mode-br-2.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/unrendered-br-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/unrendered-br-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/unrendered-br-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/unrendered-br.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/ReplaceSelectionCommand.h
WebCore/editing/VisiblePosition.cpp