Exemplo n.º 1
0
HTMLContentSelection* HTMLContentSelectionList::find(Node* node) const
{
    for (HTMLContentSelection* item = first(); item; item = item->next()) {
        if (node == item->node())
            return item;
    }
    
    return 0;
}
void HTMLContentElement::attach()
{
    ShadowRoot* root = toShadowRoot(shadowTreeRootNode());

    // Before calling StyledElement::attach, selector must be calculated.
    if (root) {
        HTMLContentSelector* selector = root->ensureSelector();
        selector->unselect(m_selections.get());
        selector->select(this, m_selections.get());
    }

    HTMLElement::attach();

    if (root) {
        for (HTMLContentSelection* selection = m_selections->first(); selection; selection = selection->next())
            selection->node()->attach();
    }
}
Exemplo n.º 3
0
inline void InsertionPoint::attachDistributedNode()
{
    for (HTMLContentSelection* selection = m_selections.first(); selection; selection = selection->next())
        selection->node()->attach();
}