本文整理汇总了C++中TreeScope::olderShadowRootOrParentTreeScope方法的典型用法代码示例。如果您正苦于以下问题:C++ TreeScope::olderShadowRootOrParentTreeScope方法的具体用法?C++ TreeScope::olderShadowRootOrParentTreeScope怎么用?C++ TreeScope::olderShadowRootOrParentTreeScope使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TreeScope
的用法示例。
在下文中一共展示了TreeScope::olderShadowRootOrParentTreeScope方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findRelatedNode
EventTarget* EventPath::findRelatedNode(TreeScope& scope, RelatedTargetMap& relatedTargetMap)
{
WillBeHeapVector<RawPtrWillBeMember<TreeScope>, 32> parentTreeScopes;
EventTarget* relatedNode = 0;
for (TreeScope* current = &scope; current; current = current->olderShadowRootOrParentTreeScope()) {
parentTreeScopes.append(current);
RelatedTargetMap::const_iterator iter = relatedTargetMap.find(current);
if (iter != relatedTargetMap.end() && iter->value) {
relatedNode = iter->value;
break;
}
}
ASSERT(relatedNode);
for (WillBeHeapVector<RawPtrWillBeMember<TreeScope>, 32>::iterator iter = parentTreeScopes.begin(); iter < parentTreeScopes.end(); ++iter)
relatedTargetMap.add(*iter, relatedNode);
return relatedNode;
}