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