PseudoElement::PseudoElement(Element* parent, PseudoId pseudoId) : Element(pseudoElementTagName(), &parent->document(), CreateElement) , m_pseudoId(pseudoId) { ASSERT(pseudoId != NOPSEUDO); setParentOrShadowHostNode(parent); setHasCustomStyleCallbacks(); }
PseudoElement::PseudoElement(Element* parent, PseudoId pseudoId) : Element(pseudoElementTagName(pseudoId), &parent->document(), CreateElement) , m_pseudoId(pseudoId) { ASSERT(pseudoId != NOPSEUDO); parent->treeScope().adoptIfNeeded(*this); setParentOrShadowHostNode(parent); setHasCustomStyleCallbacks(); if ((pseudoId == BEFORE || pseudoId == AFTER) && parent->hasTagName(HTMLNames::inputTag)) UseCounter::count(parent->document(), UseCounter::PseudoBeforeAfterForInputElement); }
void PseudoElement::dispose() { InspectorInstrumentation::pseudoElementDestroyed(this); ASSERT(!nextSibling()); ASSERT(!previousSibling()); detach(); RefPtr<Element> parent = parentOrShadowHostElement(); setParentOrShadowHostNode(0); removedFrom(parent.get()); }
PseudoElement::PseudoElement(Element* parent, PseudoId pseudoId) : Element(pseudoElementTagName(pseudoId), &parent->document(), CreateElement), m_pseudoId(pseudoId) { DCHECK_NE(pseudoId, PseudoIdNone); parent->treeScope().adoptIfNeeded(*this); setParentOrShadowHostNode(parent); setHasCustomStyleCallbacks(); if ((pseudoId == PseudoIdBefore || pseudoId == PseudoIdAfter) && parent->hasTagName(HTMLNames::inputTag)) UseCounter::count(parent->document(), UseCounter::PseudoBeforeAfterForInputElement); }
void PseudoElement::dispose() { DCHECK(parentOrShadowHostElement()); InspectorInstrumentation::pseudoElementDestroyed(this); DCHECK(!nextSibling()); DCHECK(!previousSibling()); detachLayoutTree(); Element* parent = parentOrShadowHostElement(); document().adoptIfNeeded(*this); setParentOrShadowHostNode(0); removedFrom(parent); }