LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Dec 2006 21:01:30 +0000 (21:01 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Dec 2006 21:01:30 +0000 (21:01 +0000)
commita9f98f7de28d3b21e9804fe5202b26701124071e
tree97feda627deb562856be5be7cdd7fa23ab58674a
parentdf8ad3fcb7959c503ee0a028f1876c5704f8520d
LayoutTests:

        Reviewed by harrison

        <rdar://problem/4753545>
        REGRESSION: Edited whitespace sequences are all nbsps (10636)

        * editing/inserting/edited-whitespace-1-expected.checksum: Added.
        * editing/inserting/edited-whitespace-1-expected.png: Added.
        * editing/inserting/edited-whitespace-1-expected.txt: Added.
        * editing/inserting/edited-whitespace-1.html: Added.

WebCore:

        Reviewed by harrison

        <rdar://problem/4753545>
        REGRESSION: Edited whitespace sequences are all nbsps (10636)

        * WebCore.xcodeproj/project.pbxproj: Removed RebalanceWhitespaceCommand.* from the project.
        * editing/CompositeEditCommand.cpp:
        (WebCore::isWhitespace): Moved from htmlediting.
        (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Moved the work that was
        once done in its own command here.
        (WebCore::CompositeEditCommand::prepareWhitespaceAtPositionForSplit): Prevents
        whitespace around a position from collapsing when it's pushed apart during Paste.
        This function can eventually be deployed to eliminate the need for leading/trailing
        whitespace handling in InsertParagraphSeparator, InsertLineBreak, Delete, and BreakBlockquote.
        (WebCore::CompositeEditCommand::rebalanceWhitespace): Cleaned up.
        * editing/CompositeEditCommand.h:
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::doApply): Do rebalanceWhitespaceAt *before*
        saving the typing style, because whitespace rebalancing is no longer it's own
        command that claims to preserve the typing style.
        * editing/RebalanceWhitespaceCommand.cpp: Removed.
        * editing/RebalanceWhitespaceCommand.h: Removed.
        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply): Moved the code to prepare whitespace
        arond a position for being pushed aparat to its own method.
        * editing/htmlediting.cpp:
        (WebCore::stringWithRebalancedWhitespace): Added.  Returns a rebalanced string.
        Takes in whether or not the beginning of that string will be at the start of
        a paragraph, because a space at such a position must have be nbsp, even if
        that doesn't follow the nbsp/space pattern used.  Similar stuff for the end
        of a paragraph.
        * editing/htmlediting.h:
        * editing/markup.cpp:
        (WebCore::fillContainerFromString): Call stringWithRelabacedWhitespace.  Pass
        it the startOfParagraph/endOfParagraph bools.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/inserting/edited-whitespace-1-expected.checksum [new file with mode: 0644]
LayoutTests/editing/inserting/edited-whitespace-1-expected.png [new file with mode: 0644]
LayoutTests/editing/inserting/edited-whitespace-1-expected.txt [new file with mode: 0644]
LayoutTests/editing/inserting/edited-whitespace-1.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/CompositeEditCommand.h
WebCore/editing/DeleteSelectionCommand.cpp
WebCore/editing/RebalanceWhitespaceCommand.cpp [deleted file]
WebCore/editing/RebalanceWhitespaceCommand.h [deleted file]
WebCore/editing/ReplaceSelectionCommand.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/htmlediting.h
WebCore/editing/markup.cpp