Esempio n. 1
0
HTMLContentElement* ShadowRoot::insertionPointFor(Node* node) const
{
    if (!m_selector)
        return 0;
    HTMLContentSelection* found = m_selector->findFor(node);
    if (!found)
        return 0;
    return found->insertionPoint();
}
Esempio n. 2
0
InsertionPoint* ShadowTree::insertionPointFor(const Node* node) const
{
    ASSERT(node && node->parentNode());

    if (node->parentNode()->isShadowRoot()) {
        if (InsertionPoint* insertionPoint = toShadowRoot(node->parentNode())->assignedTo())
            return insertionPoint;

        return 0;
    }

    HTMLContentSelection* found = selector().findFor(node);
    if (!found)
        return 0;
    return found->insertionPoint();
}