[webkit-reviews] review requested: [Bug 9467] TreeWalker/NodeIterator do not restrict the traversal : [Attachment 8966] patch

bugzilla-request-daemon at opendarwin.org bugzilla-request-daemon at opendarwin.org
Thu Jun 22 08:18:44 PDT 2006


Graham Dennis <Graham.Dennis at gmail.com> has asked  for review:
Bug 9467: TreeWalker/NodeIterator do not restrict the traversal
http://bugzilla.opendarwin.org/show_bug.cgi?id=9467

Attachment 8966: patch
http://bugzilla.opendarwin.org/attachment.cgi?id=8966&action=edit

------- Additional Comments from Graham Dennis <Graham.Dennis at gmail.com>
This patch fixes the problem. However, it does not pass the traversal layout
tests (it passes all other tests), but I believe that this is in fact a bug in
the other traversal layout tests. This is most definitely the case for the
TreeWalker layout tests, as they set the root element to be (e.g. <span
id="A">) and then expect the TreeWalker to reach a sibling span (e.g. <span
id="B">). In the NodeIterator case, it is not immediately clear to me whether
or not the 'root' node specified in the interator is simply a starting point,
or a root node that should not be left. The w3c Recommendation for the DOM
level 2 traversal interface says:
"Iterators are used to step through a set of nodes, e.g. the set of nodes in a
NodeList, the document subtree governed by a particular Node..."
Because of this I am inclined to believe that the root node is not to be exited
for a NodeIterator as well. However, it does still sound a bit ambiguous to me.


I have not modified the other traversal testcases in this patch (as I am not
certain that they are in fact wrong).



More information about the webkit-reviews mailing list