Node* ComposedShadowTreeWalker::traverseSiblingInCurrentTree(const Node* node, TraversalDirection direction) { ASSERT(node); if (Node* found = traverseSiblings(direction == TraversalDirectionForward ? node->nextSibling() : node->previousSibling(), direction)) return found; return escapeFallbackContentElement(node, direction); }
Node* ComposedShadowTreeWalker::traverseSiblingInCurrentTree(const Node* node, TraversalDirection direction) { ASSERT(node); if (Node* next = (direction == TraversalDirectionForward ? node->nextSibling() : node->previousSibling())) return traverseNode(next, direction); if (Node* next = traverseSiblingOrBackToYoungerShadowRoot(node, direction)) return next; return escapeFallbackContentElement(node, direction); }