当前位置: 首页>>代码示例>>C++>>正文


C++ AXObjectCache::remove方法代码示例

本文整理汇总了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
}
开发者ID:kingysu,项目名称:blink-crosswalk,代码行数:52,代码来源:TreeScopeAdopter.cpp

示例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();
}
开发者ID:CannedFish,项目名称:webkit,代码行数:15,代码来源:AccessibilityMenuListPopup.cpp

示例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);
}
开发者ID:,项目名称:,代码行数:18,代码来源:

示例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();
}
开发者ID:ddxxyy,项目名称:webkit,代码行数:20,代码来源:AccessibilityMenuList.cpp

示例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();
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:20,代码来源:AccessibilityMenuList.cpp


注:本文中的AXObjectCache::remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。