Source/core/dom/SelectorQuery.cpp
// FIXME: Move the following helper functions, authorShadowRootOf, firstWithinTraversingShadowTree,
// nextTraversingShadowTree to the best place, e.g. NodeTraversal.
Move the following helper functions, authorShadowRootOf, firstWithinTraversingShadowTree,
nextTraversingShadowTree to the best place, e.g.
Move the following helper functions authorShadowRootOf firstWithinTraversingShadowTree nextTraversingShadowTree to the best place e . g .
static ShadowRoot* authorShadowRootOf(const ContainerNode& node)
{
    if (!node.isElementNode() || !isShadowHost(&node))
        return 0;
    ElementShadow* shadow = toElement(node).shadow();
    ASSERT(shadow);
    for (ShadowRoot* shadowRoot = shadow->oldestShadowRoot(); shadowRoot; shadowRoot = shadowRoot->youngerShadowRoot()) {
        if (shadowRoot->type() == ShadowRoot::AuthorShadowRoot)
            return shadowRoot;
    }
    return 0;
}
static ShadowRoot * authorShadowRootOf ( const ContainerNode & node ) { if ( ! node . isElementNode ( ) || ! isShadowHost ( & node ) ) return 0 ; ElementShadow * shadow = toElement ( node ) . shadow ( ) ; ASSERT ( shadow ) ; for ( ShadowRoot * shadowRoot = shadow -> oldestShadowRoot ( ) ; shadowRoot ; shadowRoot = shadowRoot -> youngerShadowRoot ( ) ) { if ( shadowRoot -> type ( ) == ShadowRoot :: AuthorShadowRoot ) return shadowRoot ; } return 0 ; }
FIXME: Move the following helper functions, authorShadowRootOf, firstWithinTraversingShadowTree,
nextTraversingShadowTree to the best place, e.g.
FIXME : Move the following helper functions authorShadowRootOf firstWithinTraversingShadowTree nextTraversingShadowTree to the best place e . g .