本文整理汇总了C++中ShadowRoot::isYoungest方法的典型用法代码示例。如果您正苦于以下问题:C++ ShadowRoot::isYoungest方法的具体用法?C++ ShadowRoot::isYoungest怎么用?C++ ShadowRoot::isYoungest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShadowRoot
的用法示例。
在下文中一共展示了ShadowRoot::isYoungest方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: traverseSiblings
// TODO(hayato): This may return a wrong result for a node which is not in a
// document flat tree. See FlatTreeTraversalTest's redistribution test for details.
Node* FlatTreeTraversal::traverseSiblings(const Node& node, TraversalDirection direction)
{
if (node.isChildOfV1ShadowHost())
return traverseSiblingsForV1HostChild(node, direction);
if (shadowWhereNodeCanBeDistributed(node))
return traverseSiblingsForV0Distribution(node, direction);
if (Node* found = resolveDistributionStartingAt(direction == TraversalDirectionForward ? node.nextSibling() : node.previousSibling(), direction))
return found;
if (!node.isInV0ShadowTree())
return nullptr;
// For v0 older shadow tree
if (node.parentNode() && node.parentNode()->isShadowRoot()) {
ShadowRoot* parentShadowRoot = toShadowRoot(node.parentNode());
if (!parentShadowRoot->isYoungest()) {
HTMLShadowElement* assignedInsertionPoint = parentShadowRoot->shadowInsertionPointOfYoungerShadowRoot();
DCHECK(assignedInsertionPoint);
return traverseSiblings(*assignedInsertionPoint, direction);
}
}
return nullptr;
}
示例2: traverseParentOrHost
ContainerNode* FlatTreeTraversal::traverseParentOrHost(const Node& node)
{
ContainerNode* parent = node.parentNode();
if (!parent)
return nullptr;
if (!parent->isShadowRoot())
return parent;
ShadowRoot* shadowRoot = toShadowRoot(parent);
DCHECK(!shadowRoot->shadowInsertionPointOfYoungerShadowRoot());
if (!shadowRoot->isYoungest())
return nullptr;
return &shadowRoot->host();
}
示例3: traverseBackToYoungerShadowRoot
Node* ComposedShadowTreeWalker::traverseBackToYoungerShadowRoot(const Node* node, TraversalDirection direction)
{
ASSERT(node);
if (node->parentNode() && node->parentNode()->isShadowRoot()) {
ShadowRoot* parentShadowRoot = toShadowRoot(node->parentNode());
if (!parentShadowRoot->isYoungest()) {
InsertionPoint* assignedInsertionPoint = parentShadowRoot->insertionPoint();
ASSERT(assignedInsertionPoint);
return traverseSiblingInCurrentTree(assignedInsertionPoint, direction);
}
}
return 0;
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:13,代码来源:ComposedShadowTreeWalker.cpp
示例4: traverseParentOrHost
inline Node* ComposedTreeWalker::traverseParentOrHost(const Node* node) const
{
Node* parent = node->parentNode();
if (!parent)
return 0;
if (!parent->isShadowRoot())
return parent;
ShadowRoot* shadowRoot = toShadowRoot(parent);
ASSERT(!shadowRoot->shadowInsertionPointOfYoungerShadowRoot());
if (!shadowRoot->isYoungest())
return 0;
return shadowRoot->host();
}