Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c4d770d2e1c849df705d79021304ef37002cf62b
      
https://github.com/WebKit/WebKit/commit/c4d770d2e1c849df705d79021304ef37002cf62b
  Author: Chris Dumez <[email protected]>
  Date:   2026-04-23 (Thu, 23 Apr 2026)

  Changed paths:
    M Source/WebCore/dom/NodeIterator.cpp

  Log Message:
  -----------
  NodeIterator::updateForNodeRemoval: remove unreachable dead code with wrong 
traversal direction
https://bugs.webkit.org/show_bug.cgi?id=313119

Reviewed by Anne van Kesteren.

Remove a dead else branch in updateForNodeRemoval that contained a bug
(NodeTraversal::previous used where NodeTraversal::next was needed). The
branch was unreachable because NodeTraversal::previous() without a
stayWithin boundary only returns null when the node has no parent, and
removedNode is guaranteed to be in the tree at this point
(isDescendantOf(root) was already verified). Replace with an ASSERT.

* Source/WebCore/dom/NodeIterator.cpp:
(WebCore::NodeIterator::updateForNodeRemoval const):

Canonical link: https://commits.webkit.org/311903@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to