2006-06-24 Graham Dennis <Graham.Dennis@gmail.com>
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Jun 2006 14:43:23 +0000 (14:43 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Jun 2006 14:43:23 +0000 (14:43 +0000)
commitbcab1e63eaad8d2f95700fd229df6c603235b1db
tree2281ebb5e3b5727242a76ad2e8bf3b1c66e889e2
parentd4d5137827796478f1eddf01bfc8ad875ac396d2
2006-06-24  Graham Dennis  <Graham.Dennis@gmail.com>

        Reviewed by Darin, landed by ap.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9467
          TreeWalker/NodeIterator do not restrict the traversal

        Test: traversal/stay-within-root.html

        * dom/Node.cpp:
        (WebCore::Node::traversePreviousNode):
        * dom/Node.h:
        Add a stayWithin argument to traversePreviousNode just like the other
        traversal functions
        * dom/NodeIterator.cpp:
        (WebCore::NodeIterator::findNextNode):
        (WebCore::NodeIterator::findPreviousNode):
        Ensure that when moving forward or backward that the root node is not
        exited
        * dom/TreeWalker.cpp:
        (WebCore::TreeWalker::previousNode):
        (WebCore::TreeWalker::nextNode):
        Ditto
        (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
22 files changed:
LayoutTests/ChangeLog
LayoutTests/traversal/node-iterator-001.html
LayoutTests/traversal/node-iterator-002.html
LayoutTests/traversal/node-iterator-003.html
LayoutTests/traversal/node-iterator-004.html
LayoutTests/traversal/node-iterator-005.html
LayoutTests/traversal/node-iterator-006.html
LayoutTests/traversal/node-iterator-007.html
LayoutTests/traversal/stay-within-root-expected.checksum [new file with mode: 0644]
LayoutTests/traversal/stay-within-root-expected.png [new file with mode: 0644]
LayoutTests/traversal/stay-within-root-expected.txt [new file with mode: 0644]
LayoutTests/traversal/stay-within-root.html [new file with mode: 0644]
LayoutTests/traversal/tree-walker-001.html
LayoutTests/traversal/tree-walker-002.html
LayoutTests/traversal/tree-walker-003.html
LayoutTests/traversal/tree-walker-004.html
LayoutTests/traversal/tree-walker-005.html
WebCore/ChangeLog
WebCore/dom/Node.cpp
WebCore/dom/Node.h
WebCore/dom/NodeIterator.cpp
WebCore/dom/TreeWalker.cpp