static RenderObject* lastRendererOf(HTMLContentElement* parent) { for (ShadowInclusion* inclusion = parent->inclusions()->last(); inclusion; inclusion = inclusion->previous()) { if (RenderObject* renderer = inclusion->content()->renderer()) return renderer; } return 0; }
ShadowContentElement* ShadowRoot::includerFor(Node* node) const { if (!m_inclusions) return 0; ShadowInclusion* found = m_inclusions->findFor(node); if (!found) return 0; return found->includer(); }
static RenderObject* firstRendererOf(ShadowContentElement* parent) { for (ShadowInclusion* inclusion = parent->inclusions()->first(); inclusion; inclusion = inclusion->next()) { if (RenderObject* renderer = inclusion->content()->renderer()) return renderer; } return 0; }
ShadowInclusion* ShadowInclusionList::find(Node* content) const { for (ShadowInclusion* item = first(); item; item = item->next()) { if (content == item->content()) return item; } return 0; }
static RenderObject* previousRendererOf(HTMLContentElement* parent, Node* current) { RenderObject* lastRenderer = 0; for (ShadowInclusion* inclusion = parent->inclusions()->first(); inclusion; inclusion = inclusion->next()) { if (inclusion->content() == current) break; if (RenderObject* renderer = inclusion->content()->renderer()) lastRenderer = renderer; } return lastRenderer; }
static RenderObject* nextRendererOf(HTMLContentElement* parent, Node* current) { ShadowInclusion* currentInclusion = parent->inclusions()->find(current); if (!currentInclusion) return 0; for (ShadowInclusion* inclusion = currentInclusion->next(); inclusion; inclusion = inclusion->next()) { if (RenderObject* renderer = inclusion->content()->renderer()) return renderer; } return 0; }
void ShadowInclusionSelector::unselect(ShadowInclusionList* list) { for (ShadowInclusion* inclusion = list->first(); inclusion; inclusion = inclusion->next()) m_inclusionSet.remove(inclusion); list->clear(); }