LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 May 2006 01:26:20 +0000 (01:26 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 May 2006 01:26:20 +0000 (01:26 +0000)
commit0c422573752a2c22c5e52d849411287d51aebab8
treefe2811825ac41158b2b4fcf418c1e2c7dbb92dac
parentb899ba9827133cbf6fc8678a5f3de74a458a9a7c
LayoutTests:

        Reviewed by darin

        Fixed a select-after-replacement problem:
        * editing/pasteboard/drag-drop-modifies-page-expected.checksum:
        * editing/pasteboard/drag-drop-modifies-page-expected.png:
        * editing/pasteboard/drag-drop-modifies-page-expected.txt:

        The trailing interchange newline used to be lost:
        * editing/pasteboard/paste-text-012-expected.checksum:
        * editing/pasteboard/paste-text-012-expected.png:
        * editing/pasteboard/paste-text-012-expected.txt:
        * editing/pasteboard/paste-text-012.html:
        * editing/pasteboard/paste-text-016-expected.checksum:
        * editing/pasteboard/paste-text-016-expected.png:
        * editing/pasteboard/paste-text-016-expected.txt:
        * editing/pasteboard/paste-text-017-expected.checksum:
        * editing/pasteboard/paste-text-017-expected.png:
        * editing/pasteboard/paste-text-017-expected.txt:

        Illustrates the bug fixed in smart replace whitespace handling:
        * editing/pasteboard/smart-paste-008.html
        * editing/pasteboard/smart-paste-008-expected.txt
        * editing/pasteboard/smart-paste-008-expected.png
        * editing/pasteboard/smart-paste-008-expected.checksum

WebCore:

        Reviewed by darin

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):
        Removed the code to find out if we must later add smart replace whitespace.  We can
        wait until we've done the insertion to figure it out, and the position sampled (startPos)
        to make the decision about trailing whitespace was wrong.
        Changed the order that work is done during a paste: 1) Insert everything 2) Do one of
        the following: a) handle a trailing interchange newline, b) uncollapse the last incoming
        br if it has been collapsed because of quirks mode, c) do an end merge 3) Add smart replace
        whitespace (2 and 3 were reversed because the end merge must happen before we can know
        whether or not we need to add a trailing space).
        Don't do an end merge if the last node inserted was a br because the end merge will
        clobber it.

        (WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded):
        brs that are at the end of a block and not at the start of a block are not the one brs
        that are collapsed because of quirks mode.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/drag-drop-modifies-page-expected.checksum
LayoutTests/editing/pasteboard/drag-drop-modifies-page-expected.png
LayoutTests/editing/pasteboard/drag-drop-modifies-page-expected.txt
LayoutTests/editing/pasteboard/paste-text-012-expected.checksum
LayoutTests/editing/pasteboard/paste-text-012-expected.png
LayoutTests/editing/pasteboard/paste-text-012-expected.txt
LayoutTests/editing/pasteboard/paste-text-012.html
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/smart-paste-008-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/smart-paste-008-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/smart-paste-008-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/smart-paste-008.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/editing/ReplaceSelectionCommand.cpp