void HTMLContentElement::UnbindFromTree(bool aDeep, bool aNullParent) { if (mIsInsertionPoint) { ShadowRoot* containingShadow = GetContainingShadow(); // Make sure that containingShadow exists, it may have been nulled // during unlinking in which case the ShadowRoot is going away. if (containingShadow) { containingShadow->RemoveInsertionPoint(this); // Remove all the assigned nodes now that the // insertion point now that the insertion point is // no longer a descendant of a ShadowRoot. ClearMatchedNodes(); containingShadow->SetInsertionPointChanged(); } mIsInsertionPoint = false; } nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent); }