LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2006 03:17:55 +0000 (03:17 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 May 2006 03:17:55 +0000 (03:17 +0000)
commite12c14ef578d09fb16e7d595e31bc53076d7e6b4
tree2ff19f72ef000a400862a081efac724d39ef9497
parent17b1fb3105395baecff85755f4dde9d24f939d77
LayoutTests:

        Reviewed by harrison

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=8704>
        Fix a few end merge bugs
        <rdar://problem/4424044>
        REGRESSION: Extra line appears when typing

        Added a function so that selection changes can participate in slow-motion-mode:
        * editing/editing.js:
        Extra newlines were added:
        * editing/inserting/paragraph-separator-01-expected.checksum: Added.
        * editing/inserting/paragraph-separator-01-expected.png: Added.
        * editing/inserting/paragraph-separator-01-expected.txt: Added.
        * editing/inserting/paragraph-separator-01.html: Added.
        * editing/inserting/paragraph-separator-02-expected.checksum: Added.
        * editing/inserting/paragraph-separator-02-expected.png: Added.
        * editing/inserting/paragraph-separator-02-expected.txt: Added.
        * editing/inserting/paragraph-separator-02.html: Added.
        A preserved newline was turned into a nbsp:
        * editing/inserting/paragraph-separator-03-expected.checksum: Added.
        * editing/inserting/paragraph-separator-03-expected.png: Added.
        * editing/inserting/paragraph-separator-03-expected.txt: Added.
        * editing/inserting/paragraph-separator-03.html: Added.
        End merge didn't happen:
        * editing/pasteboard/merge-end-4-expected.checksum: Added.
        * editing/pasteboard/merge-end-4-expected.png: Added.
        * editing/pasteboard/merge-end-4-expected.txt: Added.
        * editing/pasteboard/merge-end-4.html: Added.
        Content was pulled out of these special elements:
        * editing/pasteboard/merge-end-blockquote-expected.checksum: Added.
        * editing/pasteboard/merge-end-blockquote-expected.png: Added.
        * editing/pasteboard/merge-end-blockquote-expected.txt: Added.
        * editing/pasteboard/merge-end-blockquote.html: Added.
        * editing/pasteboard/merge-end-list-expected.checksum: Added.
        * editing/pasteboard/merge-end-list-expected.png: Added.
        * editing/pasteboard/merge-end-list-expected.txt: Added.
        * editing/pasteboard/merge-end-list.html: Added.
        * editing/pasteboard/merge-end-table-expected.checksum: Added.
        * editing/pasteboard/merge-end-table-expected.png: Added.
        * editing/pasteboard/merge-end-table-expected.txt: Added.
        * editing/pasteboard/merge-end-table.html: Added.

WebCore:

        Reviewed by harrison

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=8704>
        Fix a few end merge bugs
        <rdar://problem/4424044>
        REGRESSION: Extra line appears when typing

        * bridge/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge smartInsertForString:replacingRange:beforeString:afterString:]):
        Use renamed characterAfter.
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):
        Regenerate a VisiblePosition that became stale during a text node split.
        Don't rebalance whitespace after the operation, 1) it has a bug that turns preserved
        newlines into nbsps, 2) I think it should only be done during serialization, not after
        every command (since editable regions now always have -webkit-nbsp-mode:space on them).
        Use a regular br for the placeholder as I think we can move away from -webkit-block-placeholders.

        * editing/RebalanceWhitespaceCommand.cpp: Added FIXMEs.
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::shouldMergeStart): Removed FIXME.
        (WebCore::ReplaceSelectionCommand::shouldMergeEnd): Can now use rendering information.
        (WebCore::ReplaceSelectionCommand::doApply):
        Call shouldMergeEnd after the insertion so that it can use rendering information.
        Don't use positionAfterNode of the last node inserted to mark the position at the end
        of inserted content because canonicalization can send it into content that was already
        in the document.

        * editing/ReplaceSelectionCommand.h:
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::characterAfter):
        Renamed.  When two candidates are visually equivalent, the rightmost candidate will be
        the one inside the text node where the character will be.

        * editing/VisiblePosition.h:
        * editing/htmlediting.cpp:
        (WebCore::enclosingTableCell): Added.
        (WebCore::enclosingList):
        * editing/htmlediting.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
40 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/editing.js
LayoutTests/editing/inserting/paragraph-separator-01-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-01-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-01-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-01.html [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-02-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-02-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-02-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-02.html [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-03-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-03-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-03-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/paragraph-separator-03.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-4-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-4-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-4-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-4.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-blockquote-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-blockquote-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-blockquote-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-blockquote.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-list-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-list-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-list-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-list.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-table-expected.checksum [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-table-expected.png [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-table-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/merge-end-table.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/bridge/mac/WebCoreFrameBridge.mm
WebCore/editing/InsertParagraphSeparatorCommand.cpp
WebCore/editing/RebalanceWhitespaceCommand.cpp
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/ReplaceSelectionCommand.h
WebCore/editing/VisiblePosition.cpp
WebCore/editing/VisiblePosition.h
WebCore/editing/htmlediting.cpp
WebCore/editing/htmlediting.h