mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
As `node->parent()` was being called before comparing `node` with `stay_within`, the code was incorrectly allowing traversal to the parent node even when it should not have. This change ensures that the parent is only checked after confirming that the current node is not the `stay_within` node. All `dom/traversal/NodeIterator.html` WPT tests get fixed after this change.