LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jun 2006 04:57:51 +0000 (04:57 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jun 2006 04:57:51 +0000 (04:57 +0000)
commitfd346b49a8f7faf4de2fbb7f9f51bc3a47fec8ef
tree651fe0d7cfe84f4e995c13b16a13f18040962154
parentfeb9587e6affb833302c056f69639c93f95a6331
LayoutTests:

        Reviewed by levi

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=4468>
        Implement execCommand(Insert{Un}OrderedList)

        Added:
        * editing/execCommand/create-list-from-range-selection-expected.checksum: Added.
        * editing/execCommand/create-list-from-range-selection-expected.png: Added.
        * editing/execCommand/create-list-from-range-selection-expected.txt: Added.
        * editing/execCommand/create-list-from-range-selection.html: Added.
        * editing/execCommand/insert-list-and-stitch-expected.checksum: Added.
        * editing/execCommand/insert-list-and-stitch-expected.png: Added.
        * editing/execCommand/insert-list-and-stitch-expected.txt: Added.
        * editing/execCommand/insert-list-and-stitch.html: Added.
        * editing/execCommand/insert-list-with-id-expected.checksum: Added.
        * editing/execCommand/insert-list-with-id-expected.png: Added.
        * editing/execCommand/insert-list-with-id-expected.txt: Added.
        * editing/execCommand/insert-list-with-id.html: Added.
        * editing/execCommand/remove-list-from-range-selection-expected.checksum: Added.
        * editing/execCommand/remove-list-from-range-selection-expected.png: Added.
        * editing/execCommand/remove-list-from-range-selection-expected.txt: Added.
        * editing/execCommand/remove-list-from-range-selection.html: Added.
        * editing/execCommand/remove-list-items-expected.checksum: Added.
        * editing/execCommand/remove-list-items-expected.png: Added.
        * editing/execCommand/remove-list-items-expected.txt: Added.
        * editing/execCommand/remove-list-items.html: Added.
        * editing/execCommand/switch-list-type-expected.checksum: Added.
        * editing/execCommand/switch-list-type-expected.png: Added.
        * editing/execCommand/switch-list-type-expected.txt: Added.
        * editing/execCommand/switch-list-type.html: Added.

        Fixes:
        * editing/pasteboard/drag-drop-modifies-page-expected.txt:
        * editing/pasteboard/paste-list-001-expected.txt:
        * editing/selection/drag-to-contenteditable-iframe-expected.checksum:
        * editing/selection/drag-to-contenteditable-iframe-expected.png:
        * editing/selection/drag-to-contenteditable-iframe-expected.txt:
        * editing/style/block-style-005-expected.txt:
        * fast/text/textIteratorNilRenderer-expected.checksum:
        * fast/text/textIteratorNilRenderer-expected.png:
        * fast/text/textIteratorNilRenderer-expected.txt:
        * editing/deleting/delete-line-016-expected.checksum:
        * editing/deleting/delete-line-016-expected.png:
        * editing/deleting/delete-line-016-expected.txt:

WebCore:

        Reviewed by levi

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=4468>
        Implement execCommand(Insert{Un}OrderedList)

        * WebCore.xcodeproj/project.pbxproj: Added InsertListCommand.{h,cpp} to the project.
        * dom/Position.cpp:
        (WebCore::hasRenderedNonAnonymousDescendantsWithHeight):
        Added. A block with height is only a candidate if this is false.  This should fix the problems
        getting carets into empty blocks.
        (WebCore::Position::inRenderedContent):
        * editing/AppendNodeCommand.cpp:
        (WebCore::AppendNodeCommand::doApply):
        * editing/CompositeEditCommand.cpp:
        (WebCore::hasARenderedDescendant):
        (WebCore::CompositeEditCommand::prune): A node can have DOM descendants that are rendered, yet
        have no rendered descendants.  Fixed the pruning rule to avoid removing a node like this.
        (WebCore::CompositeEditCommand::mergeIdenticalElements): Put the two elements next to
        each other if they aren't already, as a convenience.
        (WebCore::CompositeEditCommand::moveParagraph): Added code to preserve the current selection.
        (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
        * editing/CompositeEditCommand.h:
        * editing/DeleteSelectionCommand.cpp:
        (WebCore::DeleteSelectionCommand::initializeStartEnd): Expansion for special elements should
        continue to happen until it is no longer possible.
        (WebCore::DeleteSelectionCommand::handleGeneralDelete): The code to adjust the start node
        wouldn't always avoid removing the start block.
        * editing/InsertListCommand.cpp: Added.
        (WebCore::InsertListCommand::fixOrphanedListChild): Puts a list item that isn't inside a list
        into a list.
        (WebCore::InsertListCommand::InsertListCommand):
        (WebCore::InsertListCommand::modifyRange):
        (WebCore::InsertListCommand::doApply):
        * editing/InsertListCommand.h: Added.
        (WebCore::InsertListCommand::):
        * editing/InsertNodeBeforeCommand.cpp:
        (WebCore::InsertNodeBeforeCommand::doApply):
        * editing/InsertParagraphSeparatorCommand.cpp:
        * editing/JSEditor.cpp:
        * editing/TextIterator.cpp:
        (WebCore::TextIterator::advance): Don't handle a node if the end of the range used to create the
        iterator ends at the start of that node.
        used to create the iterator.
        * editing/VisiblePosition.cpp:
        (WebCore::VisiblePosition::next):
        (WebCore::VisiblePosition::previous):
        * editing/VisiblePosition.h:
        Added a parameter to next/previous to prevent them from going outside the current editable region.
        * editing/htmlediting.cpp:
        (WebCore::highestAncestor):
        (WebCore::enclosingList):
        (WebCore::enclosingListChild):
        (WebCore::outermostEnclosingList):
        (WebCore::createListItemElement):
        * editing/htmlediting.h:
        * page/Frame.cpp:
        (WebCore::Frame::selectionListState): Added.
        * page/Frame.h:

WebKit:

        Reviewed by levi

        <http://bugzilla.opendarwin.org/show_bug.cgi?id=4468>
        Implement execCommand(Insert{Un}OrderedList)

        * WebView/WebFrame.m:
        (-[WebFrame _findFrameWithSelection]): Removed an assertion
        that we only have one frame with a selection.
        * WebView/WebView.m:
        (-[WebView selectedFrame]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
65 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-line-016-expected.checksum
LayoutTests/editing/deleting/delete-line-016-expected.png
LayoutTests/editing/deleting/delete-line-016-expected.txt
LayoutTests/editing/execCommand/create-list-from-range-selection-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/create-list-from-range-selection-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/create-list-from-range-selection-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/create-list-from-range-selection.html [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-list-and-stitch-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-list-and-stitch-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-list-and-stitch-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-list-and-stitch.html [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-list-with-id-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-list-with-id-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-list-with-id-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/insert-list-with-id.html [new file with mode: 0644]
LayoutTests/editing/execCommand/remove-list-from-range-selection-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/remove-list-from-range-selection-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/remove-list-from-range-selection-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/remove-list-from-range-selection.html [new file with mode: 0644]
LayoutTests/editing/execCommand/remove-list-items-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/remove-list-items-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/remove-list-items-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/remove-list-items.html [new file with mode: 0644]
LayoutTests/editing/execCommand/switch-list-type-expected.checksum [new file with mode: 0644]
LayoutTests/editing/execCommand/switch-list-type-expected.png [new file with mode: 0644]
LayoutTests/editing/execCommand/switch-list-type-expected.txt [new file with mode: 0644]
LayoutTests/editing/execCommand/switch-list-type.html [new file with mode: 0644]
LayoutTests/editing/pasteboard/drag-drop-modifies-page-expected.txt
LayoutTests/editing/pasteboard/paste-list-001-expected.txt
LayoutTests/editing/selection/3690703-2-expected.checksum
LayoutTests/editing/selection/3690703-2-expected.png
LayoutTests/editing/selection/3690703-2-expected.txt
LayoutTests/editing/selection/3690703-expected.checksum
LayoutTests/editing/selection/3690703-expected.png
LayoutTests/editing/selection/3690703-expected.txt
LayoutTests/editing/selection/drag-to-contenteditable-iframe-expected.checksum
LayoutTests/editing/selection/drag-to-contenteditable-iframe-expected.png
LayoutTests/editing/selection/drag-to-contenteditable-iframe-expected.txt
LayoutTests/editing/style/block-style-005-expected.txt
LayoutTests/fast/text/textIteratorNilRenderer-expected.checksum
LayoutTests/fast/text/textIteratorNilRenderer-expected.png
LayoutTests/fast/text/textIteratorNilRenderer-expected.txt
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/dom/Position.cpp
WebCore/editing/AppendNodeCommand.cpp
WebCore/editing/CompositeEditCommand.cpp
WebCore/editing/CompositeEditCommand.h
WebCore/editing/DeleteSelectionCommand.cpp
WebCore/editing/InsertListCommand.cpp [new file with mode: 0644]
WebCore/editing/InsertListCommand.h [new file with mode: 0644]
WebCore/editing/InsertNodeBeforeCommand.cpp
WebCore/editing/InsertParagraphSeparatorCommand.cpp
WebCore/editing/JSEditor.cpp
WebCore/editing/TextIterator.cpp
WebCore/editing/VisiblePosition.cpp
WebCore/editing/VisiblePosition.h
WebCore/editing/htmlediting.cpp
WebCore/editing/htmlediting.h
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebKit/ChangeLog
WebKit/WebView/WebFrame.m
WebKit/WebView/WebView.m