void InsertionPoint::removedFrom(ContainerNode* insertionPoint)
{
ShadowRoot* root = containingShadowRoot();
if (!root)
    root = insertionPoint->containingShadowRoot();

if (root) {
    if (ElementShadow* rootOwner = root->owner())
        rootOwner->setNeedsDistributionRecalc();
}

// host can be null when removedFrom() is called from ElementShadow destructor.
ElementShadow* rootOwner = root ? root->owner() : 0;

// Since this insertion point is no longer visible from the shadow subtree, it need to clean itself up.
clearDistribution();

if (m_registeredWithShadowRoot && insertionPoint->treeScope().rootNode() == root) {
    ASSERT(root);
    m_registeredWithShadowRoot = false;
    root->didRemoveInsertionPoint(this);
    if (rootOwner) {
        if (canAffectSelector())
            rootOwner->willAffectSelector();
    }
}

HTMLElement::removedFrom(insertionPoint);
}