[Webkit-unassigned] [Bug 17252] Acid3 test removing Nodes during NodeIterator walk fails

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 9 07:15:56 PST 2008


http://bugs.webkit.org/show_bug.cgi?id=17252





------- Comment #1 from darin at apple.com  2008-02-09 07:15 PDT -------
This could be a little challenging.

When I did my first NodeIterator/TreeWalker patch I attempted to fix this
issue. However, it was quite tricky. The specification is unclear on what to do
when nodes are removed inside the filter function.

- It specifies clearly what should happen to the current node when a node is
removed.
- It specifies clearly what current node should be on return from NodeIterator
functions.
- But it does not specify what the current node should be during execution of
the NodeIterator functions.

In particular, if a function fails because it can't find, for example, a next
sibling, currentNode is supposed to be left unchanged. This means that during
the execution of the function we should not be changing currentNode from one
candidate to another while calling the filter, because if the filter rejects
all the nodes we'll have to change currentNode back to the original node.

All this led me to creation of a second "current node" that's just internal to
NodeIterator. However, I was not able to get that model into working shape yet.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list