void InsertionPoint::detach() { if (ShadowRoot* root = toShadowRoot(shadowTreeRootNode())) { ShadowTree* tree = root->tree(); if (doesSelectFromHostChildren()) clearDistribution(tree); else if (ShadowRoot* assignedShadowRoot = assignedFrom()) clearAssignment(assignedShadowRoot); // When shadow element is detached, shadow tree should be recreated to re-calculate selector for // other insertion points. tree->setNeedsReattachHostChildrenAndShadow(); } ASSERT(m_selections.isEmpty()); HTMLElement::detach(); }
bool VisibleSelection::isAll(EditingBoundaryCrossingRule rule) const { return !shadowTreeRootNode() && visibleStart().previous(rule).isNull() && visibleEnd().next(rule).isNull(); }
bool VisibleSelection::isAll(StayInEditableContent stayInEditableContent) const { return !shadowTreeRootNode() && visibleStart().previous(stayInEditableContent).isNull() && visibleEnd().next(stayInEditableContent).isNull(); }