Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TreeWalker's nextNode() #612

Merged
merged 2 commits into from Apr 9, 2018
Merged

Fix TreeWalker's nextNode() #612

merged 2 commits into from Apr 9, 2018

Conversation

annevk
Copy link
Member

@annevk annevk commented Mar 22, 2018

The prose supposed to be equivalent to iterating over following siblings and siblings of ancestors did not skip over descendants.

See #87 (comment).


Preview | Diff

The prose supposed to be equivalent to iterating over following siblings and siblings of ancestors did not skip over descendants.

See #87 (comment).
@annevk
Copy link
Member Author

annevk commented Mar 22, 2018

@triple-underscore thanks for reporting this. I didn't make it check for result being FILTER_REJECT is FILTER_SKIP is already handled by the earlier algorithm that goes through children.

@annevk
Copy link
Member Author

annevk commented Mar 22, 2018

(I also worked out the prose that would just do the next sibling / parent traversal, but it ends up adding a significant number of steps and I'm not sure it's really any clearer.)

@annevk
Copy link
Member Author

annevk commented Mar 22, 2018

Looking at https://www.w3.org/Bugs/Public/show_bug.cgi?id=28107 again I went with the longer algorithm after all since "following root" was also wrong.

@annevk annevk merged commit 826d66b into master Apr 9, 2018
@annevk annevk deleted the annevk/treewalker-nextnode branch April 9, 2018 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant