Skip to content

Address infinite loop in TreeWalker's nextNode()#1433

Merged
annevk merged 2 commits into
mainfrom
annevk/infinite-loop
May 21, 2026
Merged

Address infinite loop in TreeWalker's nextNode()#1433
annevk merged 2 commits into
mainfrom
annevk/infinite-loop

Conversation

@annevk

@annevk annevk commented Nov 28, 2025

Copy link
Copy Markdown
Member

Tests: web-platform-tests/wpt#60053.

Fixes #1102.

@Lubrsi @awesomekling @smaug---- care to review? (Specification is based on Gecko's implementation, but clearly missed the mark here.)


Preview | Diff

@annevk annevk added needs tests Moving the issue forward requires someone to write tests topic: traversal labels Nov 28, 2025
@abrhimaiiye-dev

This comment was marked as spam.

abrhimaiiye-dev

This comment was marked as spam.

@annevk
annevk merged commit e1e7699 into main May 21, 2026
2 checks passed
@annevk
annevk deleted the annevk/infinite-loop branch May 21, 2026 14:11
annevk added a commit to web-platform-tests/wpt that referenced this pull request May 27, 2026
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request May 29, 2026
…, a=testonly

Automatic update from web-platform-tests
DOM: more TreeWalker nextNode() coverage

Complements whatwg/dom#1433.
--

wpt-commits: d2cf5e8afc8df9f64481ce9709ff7c1afb34ed7c
wpt-pr: 60053
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jun 1, 2026
…, a=testonly

Automatic update from web-platform-tests
DOM: more TreeWalker nextNode() coverage

Complements whatwg/dom#1433.
--

wpt-commits: d2cf5e8afc8df9f64481ce9709ff7c1afb34ed7c
wpt-pr: 60053

UltraBlame original commit: 8538c7d778118f531b4f39817e43fb9b7ab204be
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jun 1, 2026
…, a=testonly

Automatic update from web-platform-tests
DOM: more TreeWalker nextNode() coverage

Complements whatwg/dom#1433.
--

wpt-commits: d2cf5e8afc8df9f64481ce9709ff7c1afb34ed7c
wpt-pr: 60053

UltraBlame original commit: 8538c7d778118f531b4f39817e43fb9b7ab204be
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jun 1, 2026
…, a=testonly

Automatic update from web-platform-tests
DOM: more TreeWalker nextNode() coverage

Complements whatwg/dom#1433.
--

wpt-commits: d2cf5e8afc8df9f64481ce9709ff7c1afb34ed7c
wpt-pr: 60053

UltraBlame original commit: 8538c7d778118f531b4f39817e43fb9b7ab204be
@AtkinsSJ

Copy link
Copy Markdown

Sorry for the wait! I've just implemented this instead of the hack that Ladybird had previously, and I'm not seeing any regressions so I think this is correct. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs tests Moving the issue forward requires someone to write tests topic: traversal

Development

Successfully merging this pull request may close these issues.

TreeWalker.nextNode loops forever if last node of a detached node tree is not accepted by the filter

4 participants