本文整理汇总了C++中AXObjectCache::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ AXObjectCache::remove方法的具体用法?C++ AXObjectCache::remove怎么用?C++ AXObjectCache::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AXObjectCache
的用法示例。
在下文中一共展示了AXObjectCache::remove方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: moveTreeToNewScope
void TreeScopeAdopter::moveTreeToNewScope(Node& root) const
{
ASSERT(needsScopeChange());
#if !ENABLE(OILPAN)
oldScope().guardRef();
#endif
// If an element is moved from a document and then eventually back again the collection cache for
// that element may contain stale data as changes made to it will have updated the DOMTreeVersion
// of the document it was moved to. By increasing the DOMTreeVersion of the donating document here
// we ensure that the collection cache will be invalidated as needed when the element is moved back.
Document& oldDocument = oldScope().document();
Document& newDocument = newScope().document();
bool willMoveToNewDocument = oldDocument != newDocument;
AXObjectCache* axObjectCache = oldDocument.existingAXObjectCache();
if (willMoveToNewDocument)
oldDocument.incDOMTreeVersion();
for (Node& node : NodeTraversal::inclusiveDescendantsOf(root)) {
updateTreeScope(node);
if (willMoveToNewDocument) {
if (axObjectCache)
axObjectCache->remove(&node);
moveNodeToNewDocument(node, oldDocument, newDocument);
} else if (node.hasRareData()) {
NodeRareData* rareData = node.rareData();
if (rareData->nodeLists())
rareData->nodeLists()->adoptTreeScope();
}
if (!node.isElementNode())
continue;
if (node.hasSyntheticAttrChildNodes()) {
WillBeHeapVector<RefPtrWillBeMember<Attr>>& attrs = *toElement(node).attrNodeList();
for (unsigned i = 0; i < attrs.size(); ++i)
moveTreeToNewScope(*attrs[i]);
}
for (ShadowRoot* shadow = node.youngestShadowRoot(); shadow; shadow = shadow->olderShadowRoot()) {
shadow->setParentTreeScope(newScope());
if (willMoveToNewDocument)
moveTreeToNewDocument(*shadow, oldDocument, newDocument);
}
}
#if !ENABLE(OILPAN)
oldScope().guardDeref();
#endif
}
示例2: childrenChanged
void AccessibilityMenuListPopup::childrenChanged()
{
AXObjectCache* cache = axObjectCache();
for (size_t i = m_children.size(); i > 0 ; --i) {
AccessibilityObject* child = m_children[i - 1].get();
if (child->actionElement() && !child->actionElement()->inRenderedDocument()) {
child->detachFromParent();
cache->remove(child->axObjectID());
}
}
m_children.clear();
m_haveChildren = false;
addChildren();
}
示例3: addChildren
void AccessibilitySlider::addChildren()
{
ASSERT(!m_haveChildren);
m_haveChildren = true;
AXObjectCache* cache = m_renderer->document()->axObjectCache();
AccessibilitySliderThumb* thumb = static_cast<AccessibilitySliderThumb*>(cache->getOrCreate(SliderThumbRole));
thumb->setParent(this);
// Before actually adding the value indicator to the hierarchy,
// allow the platform to make a final decision about it.
if (thumb->accessibilityIsIgnored())
cache->remove(thumb->axObjectID());
else
m_children.append(thumb);
}
示例4: addChildren
void AccessibilityMenuList::addChildren()
{
m_haveChildren = true;
AXObjectCache* cache = m_renderer->document().axObjectCache();
AccessibilityObject* list = cache->getOrCreate(MenuListPopupRole);
if (!list)
return;
toAccessibilityMockObject(list)->setParent(this);
if (list->accessibilityIsIgnored()) {
cache->remove(list->axObjectID());
return;
}
m_children.append(list);
list->addChildren();
}
示例5: addChildren
void AccessibilityMenuList::addChildren()
{
m_haveChildren = true;
AXObjectCache* cache = m_renderer->document()->axObjectCache();
AccessibilityObject* list = cache->getOrCreate(MenuListPopupRole);
if (!list)
return;
if (list->accessibilityPlatformIncludesObject() == IgnoreObject) {
cache->remove(list->axObjectID());
return;
}
static_cast<AccessibilityMenuListPopup*>(list)->setMenuList(this);
m_children.append(list);
list->addChildren();
}