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 tree traversal of flat tree #1547

Merged
merged 3 commits into from
Jan 10, 2024
Merged

Fix tree traversal of flat tree #1547

merged 3 commits into from
Jan 10, 2024

Conversation

Jym77
Copy link
Contributor

@Jym77 Jym77 commented Jan 9, 2024

Fix a bug in tree traversal of flat tree for the rare case of comments being direct child of the shadow root.

We had an exception for elements and text to skip over the shadow root and return the host instead when querying the parent in the flat tree. This is correct because in the flat tree the shadow tree has been inserted by "merging" the host and the root. However, that exception was missing for comments, creating an issue in these cases.

Additionally fixed a missing tree traversal option in getNodeBetween.

@Jym77 Jym77 self-assigned this Jan 9, 2024
@Jym77 Jym77 added the patch Backwards-compatible change that doesn't touch public API label Jan 9, 2024
@Jym77 Jym77 marked this pull request as ready for review January 9, 2024 13:06
@Jym77 Jym77 requested a review from a team as a code owner January 9, 2024 13:06
rcj-siteimprove
rcj-siteimprove previously approved these changes Jan 9, 2024
Copy link
Contributor

@rcj-siteimprove rcj-siteimprove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, there seems to be an issue in the CI though

@Jym77
Copy link
Contributor Author

Jym77 commented Jan 9, 2024

!pr extract

@Jym77 Jym77 added this pull request to the merge queue Jan 10, 2024
Merged via the queue into main with commit 3b683ee Jan 10, 2024
@Jym77 Jym77 deleted the sia-r78-investigation branch January 10, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Backwards-compatible change that doesn't touch public API
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants