LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jun 2006 23:23:50 +0000 (23:23 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Jun 2006 23:23:50 +0000 (23:23 +0000)
commitd6e95766d0c669e453fabcea1d4f0b52ecb99599
tree751996c2983c0d2088d98b5d63b7c16dda19c4ca
parent236fdbd83dce9370d84cae4b1ac218324d6cee08
LayoutTests:

        Reviewed by justin

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=7580>
        TinyMCE: Implement execCommand(formatBlock, ...)

        * editing/deleting/delete-ws-fixup-002-expected.checksum:
        * editing/deleting/delete-ws-fixup-002-expected.png:
        * editing/deleting/delete-ws-fixup-002-expected.txt:
        * editing/deleting/delete-ws-fixup-002.html:
        * editing/execCommand/format-block-expected.checksum: Added.
        * editing/execCommand/format-block-expected.png: Added.
        * editing/execCommand/format-block-expected.txt: Added.
        * editing/execCommand/format-block-from-range-selection-expected.checksum: Added.
        * editing/execCommand/format-block-from-range-selection-expected.png: Added.
        * editing/execCommand/format-block-from-range-selection-expected.txt: Added.
        * editing/execCommand/format-block-from-range-selection.html: Added.
        * editing/execCommand/format-block.html: Added.

WebCore:

        Reviewed by justin

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=7580>
        TinyMCE: Implement execCommand(formatBlock, ...)

        * WebCore.xcodeproj/project.pbxproj: Added FormatBlock.{h,cpp} to the project.
        * WebCore.vcproj/WebCore/WebCore.vcproj: Ditto.
        * bridge/mac/WebCoreFrameBridge.h: Added WebUndoActions
        * editing/CompositeEditCommand.cpp:
        (WebCore::CompositeEditCommand::moveParagraph): Added a preserveStyle bool.
        (WebCore::CompositeEditCommand::moveParagraphs): Ditto.  downstream() the start
        or else we'll move collapsed whitespace and uncollapse it.
        * editing/CompositeEditCommand.h:
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::initializePositionData):
        (WebCore::DeleteSelectionCommand::handleSpecialCaseBRDelete): Don't update m_endingPosition
        because that's removeNode's responsibility.
        (WebCore::updatePositionForNodeRemoval): Added.
        (WebCore::DeleteSelectionCommand::removeNode): Turned removeFullySelectedNode into a virtual
        overload of removeNode so that we can update positions as we remove nodes.
        (WebCore::updatePositionForTextRemoval): Added.
        (WebCore::DeleteSelectionCommand::deleteTextFromNode):
        (WebCore::DeleteSelectionCommand::handleGeneralDelete):
        (WebCore::DeleteSelectionCommand::fixupWhitespace): Got rid of m_trailingWhitespaceValid
        since m_trailingWhitespace is always valid (we update it as we remove nodes).
        (WebCore::DeleteSelectionCommand::mergeParagraphs):
        (WebCore::DeleteSelectionCommand::doApply): Leading and trailing spaces should
        be fixed if they have collapsed before merging paragraphs.
        * editing/DeleteSelectionCommand.h:
        * editing/EditAction.h:
        (WebCore::):
        * editing/FormatBlockCommand.cpp: Added.
        (WebCore::FormatBlockCommand::FormatBlockCommand):
        (WebCore::FormatBlockCommand::modifyRange): Similar to InsertListCommand::modifyRange().
        (WebCore::FormatBlockCommand::doApply):
        * editing/FormatBlockCommand.h: Added.
        (WebCore::FormatBlockCommand::editingAction):
        * editing/InsertListCommand.h:
        (WebCore::InsertListCommand::editingAction):
        * editing/JSEditor.cpp:
        * editing/MergeIdenticalElementsCommand.cpp:
        (WebCore::MergeIdenticalElementsCommand::doApply):
        * editing/htmlediting.cpp:
        (WebCore::validBlockTag):
        (WebCore::createElement):
        * editing/htmlediting.h:

WebKit:

        Reviewed by justin

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=7580>
        TinyMCE: Implement execCommand(formatBlock, ...)

        * English.lproj/Localizable.strings:
        * WebCoreSupport/WebFrameBridge.m:
        (-[WebFrameBridge nameForUndoAction:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14868 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-ws-fixup-002-expected.checksum
LayoutTests/editing/deleting/delete-ws-fixup-002-expected.png
LayoutTests/editing/deleting/delete-ws-fixup-002-expected.txt
LayoutTests/editing/deleting/delete-ws-fixup-002.html
LayoutTests/editing/execCommand/format-block-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/format-block-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/format-block-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/format-block-from-range-selection-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/format-block-from-range-selection-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/format-block-from-range-selection-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/format-block-from-range-selection.html [new file with mode: 0644]
LayoutTests/editing/execCommand/format-block.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bridge/mac/WebCoreFrameBridge.h
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/CompositeEditCommand.h
WebCore/editing/DeleteSelectionCommand.cpp
WebCore/editing/DeleteSelectionCommand.h
WebCore/editing/EditAction.h
WebCore/editing/FormatBlockCommand.cpp [new file with mode: 0644]
WebCore/editing/FormatBlockCommand.h [new file with mode: 0644]
WebCore/editing/InsertListCommand.h
WebCore/editing/JSEditor.cpp
WebCore/editing/MergeIdenticalElementsCommand.cpp
WebCore/editing/htmlediting.cpp
WebCore/editing/htmlediting.h
WebKit/ChangeLog
WebKit/English.lproj/Localizable.strings
WebKit/WebCoreSupport/WebFrameBridge.m