コード例 #1
0
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();
}
コード例 #2
0
bool VisibleSelection::isAll(EditingBoundaryCrossingRule rule) const
{
    return !shadowTreeRootNode() && visibleStart().previous(rule).isNull() && visibleEnd().next(rule).isNull();
}
コード例 #3
0
bool VisibleSelection::isAll(StayInEditableContent stayInEditableContent) const
{
    return !shadowTreeRootNode() && visibleStart().previous(stayInEditableContent).isNull() && visibleEnd().next(stayInEditableContent).isNull();
}