Re: [whatwg/dom] TreeWalker::nextNode() method, loops infinite (#787)

Using the currently published algorithm, the following web platform tests fail:
dom/traversal-TreeWalker-previousNodeLastChildReject
dom/traversal-TreeWalker-walking-outside-a-tree
dom/traversal-TreeWalker-previousSiblingLastChildSkip
dom/traversal-TreeWalker-traversal-skip (one subtest)

The following tests infinite loop:
web-platform-tests/dom/traversal-TreeWalker-acceptNode-filter
web-platform-tests/dom/traversal-TreeWalker-currentNode
web-platform-tests/dom/traversal-TreeWalker-traversal-reject

Steps 3.2 and 3.3 create variables 'sibling' and 'temporary'. Step 3.4's sub-steps traverse the tree setting sibling and temporary, but their values are never used. Step 3.5 just uses the 'node' value that was set in step 3.1.

If step 3.4.3 is modified to "If sibling is non-null, set node to sibling, then break.", then all the TreeWalker web platform tests pass, including the subtests in acid3.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/787#issuecomment-550485387

Received on Wednesday, 6 November 2019 20:25:05 UTC