您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch |

自学教程:C++ AXObjectCache类代码示例

51自学网 2021-06-03 12:04:44
  C++
这篇教程C++ AXObjectCache类代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中AXObjectCache的典型用法代码示例。如果您正苦于以下问题:C++ AXObjectCache类的具体用法?C++ AXObjectCache怎么用?C++ AXObjectCache使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

在下文中一共展示了AXObjectCache类的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: firstAccessibleObjectFromNode

AccessibilityObject* AccessibilityObject::firstAccessibleObjectFromNode(const Node* node){    if (!node)        return 0;    Document* document = node->document();    if (!document)        return 0;    AXObjectCache* cache = document->axObjectCache();    AccessibilityObject* accessibleObject = cache->getOrCreate(node->renderer());    while (accessibleObject && accessibleObject->accessibilityIsIgnored()) {        node = NodeTraversal::next(node);        while (node && !node->renderer())            node = NodeTraversal::nextSkippingChildren(node);        if (!node)            return 0;        accessibleObject = cache->getOrCreate(node->renderer());    }    return accessibleObject;}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_WebKit,代码行数:26,


示例2: HAVE

bool Scrollbar::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier){#if HAVE(ACCESSIBILITY)    if (AXObjectCache::accessibilityEnabled()) {        if (parent() && parent()->isFrameView()) {            Document* document = static_cast<FrameView*>(parent())->frame()->document();            AXObjectCache* cache = document->axObjectCache();            AccessibilityScrollbar* axObject = static_cast<AccessibilityScrollbar*>(cache->getOrCreate(ScrollBarRole));            axObject->setScrollbar(this);            cache->postNotification(axObject, document, AXObjectCache::AXValueChanged, true);        }    }#endif    // Ignore perpendicular scrolls.    if ((m_orientation == HorizontalScrollbar) ? (direction == ScrollUp || direction == ScrollDown) : (direction == ScrollLeft || direction == ScrollRight))        return false;    float step = 0;    switch (granularity) {    case ScrollByLine:     step = m_lineStep;  break;    case ScrollByPage:     step = m_pageStep;  break;    case ScrollByDocument: step = m_totalSize; break;    case ScrollByPixel:    step = m_pixelStep; break;    }    if (direction == ScrollUp || direction == ScrollLeft)        multiplier = -multiplier;    if (client())        return client()->scroll(m_orientation, granularity, step, multiplier);    return setCurrentPos(max(min(m_currentPos + (step * multiplier), static_cast<float>(m_totalSize - m_visibleSize)), 0.0f), NotFromScrollAnimator);}
开发者ID:achellies,项目名称:WinCEWebKit,代码行数:31,


示例3: accessibilityRootObjectWrapper

static AtkObject* accessibilityRootObjectWrapper(AtkObject* atkObject){    if (!AXObjectCache::accessibilityEnabled())        AXObjectCache::enableAccessibility();    WebPageAccessibilityObject* accessible = WEB_PAGE_ACCESSIBILITY_OBJECT(atkObject);    if (!accessible->m_page)        return 0;    Page* corePage = accessible->m_page->corePage();    if (!corePage)        return 0;    Frame& coreFrame = corePage->mainFrame();    if (!coreFrame.document())        return 0;    AXObjectCache* cache = coreFrame.document()->axObjectCache();    if (!cache)        return nullptr;    AccessibilityObject* coreRootObject = cache->rootObject();    if (!coreRootObject)        return 0;    AtkObject* rootObject = coreRootObject->wrapper();    if (!rootObject || !ATK_IS_OBJECT(rootObject))        return 0;    return rootObject;}
开发者ID:cheekiatng,项目名称:webkit,代码行数:31,


示例4: notifyAccessibilityForSelectionChange

void FrameSelection::notifyAccessibilityForSelectionChange(const AXTextStateChangeIntent&){    if (!AXObjectCache::accessibilityEnabled())        return;    if (!m_selection.start().isNotNull() || !m_selection.end().isNotNull())        return;    RenderObject* focusedNode = m_selection.end().containerNode()->renderer();    AXObjectCache* cache = m_frame->document()->existingAXObjectCache();    if (!cache)        return;    AccessibilityObject* accessibilityObject = cache->getOrCreate(focusedNode);    if (!accessibilityObject)        return;    int offset;    RefPtr<AccessibilityObject> object = objectFocusedAndCaretOffsetUnignored(accessibilityObject, offset);    if (!object)        return;    emitTextSelectionChange(object.get(), m_selection, offset);    maybeEmitTextFocusChange(WTFMove(object));}
开发者ID:edcwconan,项目名称:webkit,代码行数:25,


示例5: axObjectCache

bool AXObject::accessibilityIsIgnored() const{    AXObjectCache* cache = axObjectCache();    if (!cache)        return true;    AXComputedObjectAttributeCache* attributeCache = cache->computedObjectAttributeCache();    if (attributeCache) {        AXObjectInclusion ignored = attributeCache->getIgnored(axObjectID());        switch (ignored) {        case IgnoreObject:            return true;        case IncludeObject:            return false;        case DefaultBehavior:            break;        }    }    bool result = computeAccessibilityIsIgnored();    if (attributeCache)        attributeCache->setIgnored(axObjectID(), result ? IgnoreObject : IncludeObject);    return result;}
开发者ID:coinpayee,项目名称:blink,代码行数:26,


示例6: ASSERT

void AccessibilityARIAGrid::addChildren(){    ASSERT(!m_haveChildren);         if (!isAccessibilityTable()) {        AccessibilityRenderObject::addChildren();        return;    }        m_haveChildren = true;    if (!m_renderer)        return;        AXObjectCache* axCache = m_renderer->document().axObjectCache();        // add only rows that are labeled as aria rows    HashSet<AccessibilityObject*> appendedRows;    unsigned columnCount = 0;    for (RefPtr<AccessibilityObject> child = firstChild(); child; child = child->nextSibling())        addRowDescendant(child.get(), appendedRows, columnCount);        // make the columns based on the number of columns in the first body    for (unsigned i = 0; i < columnCount; ++i) {        AccessibilityTableColumn* column = toAccessibilityTableColumn(axCache->getOrCreate(ColumnRole));        column->setColumnIndex((int)i);        column->setParent(this);        m_columns.append(column);        if (!column->accessibilityIsIgnored())            m_children.append(column);    }        AccessibilityObject* headerContainerObject = headerContainer();    if (headerContainerObject && !headerContainerObject->accessibilityIsIgnored())        m_children.append(headerContainerObject);}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:35,


示例7: document

void AccessibilityMenuList::didUpdateActiveOption(int optionIndex){    Ref<Document> document(m_renderer->document());    AXObjectCache* cache = document->axObjectCache();    const auto& childObjects = children();    if (!childObjects.isEmpty()) {        ASSERT(childObjects.size() == 1);        ASSERT(childObjects[0]->isMenuListPopup());        // We might be calling this method in situations where the renderers for list items        // associated to the menu list have not been created (e.g. they might be rendered        // in the UI process, as it's the case in the GTK+ port, which uses GtkMenuItem).        // So, we need to make sure that the accessibility popup object has some children        // before asking it to update its active option, or it will read invalid memory.        // You can reproduce the issue in the GTK+ port by removing this check and running        // accessibility/insert-selected-option-into-select-causes-crash.html (will crash).        int popupChildrenSize = static_cast<int>(childObjects[0]->children().size());        if (childObjects[0]->isMenuListPopup() && optionIndex >= 0 && optionIndex < popupChildrenSize) {            if (AccessibilityMenuListPopup* popup = toAccessibilityMenuListPopup(childObjects[0].get()))                popup->didUpdateActiveOption(optionIndex);        }    }    cache->postNotification(this, &document.get(), AXObjectCache::AXMenuListValueChanged, TargetElement, PostSynchronously);}
开发者ID:ddxxyy,项目名称:webkit,代码行数:26,


示例8: ASSERT

AccessibilityObject* AccessibilityObject::firstAccessibleObjectFromNode(const Node* node){    ASSERT(AXObjectCache::accessibilityEnabled());    if (!node)        return 0;    Document* document = node->document();    if (!document)        return 0;    AXObjectCache* cache = document->axObjectCache();    AccessibilityObject* accessibleObject = cache->getOrCreate(node->renderer());    while (accessibleObject && accessibleObject->accessibilityIsIgnored()) {        node = node->traverseNextNode();        while (node && !node->renderer())            node = node->traverseNextSibling();        if (!node)            return 0;        accessibleObject = cache->getOrCreate(node->renderer());    }    return accessibleObject;}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:28,


示例9: document

void SimpleEditCommand::notifyAccessibilityForTextChange(Node* node, AXTextEditType type, const String& text, const VisiblePosition& position){    if (!AXObjectCache::accessibilityEnabled())        return;    AXObjectCache* cache = document().existingAXObjectCache();    if (!cache)        return;    cache->postTextStateChangeNotification(node, type, text, position);}
开发者ID:biddyweb,项目名称:switch-oss,代码行数:9,


示例10: ASSERT_ARG

void AccessibilityMenuListPopup::didUpdateActiveOption(int optionIndex){    ASSERT_ARG(optionIndex, optionIndex >= 0);    ASSERT_ARG(optionIndex, optionIndex < static_cast<int>(m_children.size()));    AXObjectCache* cache = axObjectCache();    RefPtr<AccessibilityObject> child = m_children[optionIndex].get();    cache->postNotification(child.get(), document(), AXObjectCache::AXFocusedUIElementChanged, TargetElement, PostSynchronously);    cache->postNotification(child.get(), document(), AXObjectCache::AXMenuListItemSelected, TargetElement, PostSynchronously);}
开发者ID:CannedFish,项目名称:webkit,代码行数:11,


示例11: document

void EditCommand::postTextStateChangeNotification(AXTextEditType type, const String& text, const VisiblePosition& position){    if (!AXObjectCache::accessibilityEnabled())        return;    if (!text.length())        return;    AXObjectCache* cache = document().existingAXObjectCache();    if (!cache)        return;    Node* node = highestEditableRoot(position.deepEquivalent(), HasEditableAXRole);    cache->postTextStateChangeNotification(node, type, text, position);}
开发者ID:emutavchi,项目名称:WebKitForWayland,代码行数:12,


示例12: ASSERT

void AccessibilityARIAGrid::addChildren(){    ASSERT(!m_haveChildren);         if (!isAccessibilityTable()) {        AccessibilityRenderObject::addChildren();        return;    }        m_haveChildren = true;    if (!m_renderer)        return;        AXObjectCache* axCache = m_renderer->document().axObjectCache();        // Add the children rows but be mindful in case there are footer sections in this table.    HashSet<AccessibilityObject*> appendedRows;    unsigned columnCount = 0;    AccessibilityChildrenVector footerSections;    for (RefPtr<AccessibilityObject> child = firstChild(); child; child = child->nextSibling()) {        bool footerSection = false;        if (RenderObject* childRenderer = child->renderer()) {            if (childRenderer->isTableSection()) {                if (RenderTableSection* childSection = toRenderTableSection(childRenderer)) {                    if (childSection == childSection->table()->footer()) {                        footerSections.append(child);                        footerSection = true;                    }                }            }        }        if (!footerSection)            addRowDescendant(child.get(), appendedRows, columnCount);    }        for (const auto& footerSection : footerSections)        addRowDescendant(footerSection.get(), appendedRows, columnCount);        // make the columns based on the number of columns in the first body    for (unsigned i = 0; i < columnCount; ++i) {        AccessibilityTableColumn* column = toAccessibilityTableColumn(axCache->getOrCreate(ColumnRole));        column->setColumnIndex((int)i);        column->setParent(this);        m_columns.append(column);        if (!column->accessibilityIsIgnored())            m_children.append(column);    }        AccessibilityObject* headerContainerObject = headerContainer();    if (headerContainerObject && !headerContainerObject->accessibilityIsIgnored())        m_children.append(headerContainerObject);}
开发者ID:CannedFish,项目名称:webkit,代码行数:52,


示例13: ASSERT

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,


示例14: axObjectCache

AccessibilityScrollbar* AccessibilityScrollView::addChildScrollbar(Scrollbar* scrollbar){    if (!scrollbar)        return nullptr;        AXObjectCache* cache = axObjectCache();    if (!cache)        return nullptr;    auto& scrollBarObject = downcast<AccessibilityScrollbar>(*cache->getOrCreate(scrollbar));    scrollBarObject.setParent(this);    m_children.append(&scrollBarObject);    return &scrollBarObject;}
开发者ID:biddyweb,项目名称:switch-oss,代码行数:14,


示例15: axObjectCache

AccessibilityScrollbar* AccessibilityScrollView::addChildScrollbar(Scrollbar* scrollbar){    if (!scrollbar)        return nullptr;        AXObjectCache* cache = axObjectCache();    if (!cache)        return nullptr;    AccessibilityScrollbar* scrollBarObject = toAccessibilityScrollbar(cache->getOrCreate(scrollbar));    scrollBarObject->setParent(this);    m_children.append(scrollBarObject);    return scrollBarObject;}
开发者ID:chenbk85,项目名称:webkit2-wincairo,代码行数:14,


示例16: ASSERT

void AccessibilityARIAGrid::addChildren(){    ASSERT(!m_haveChildren);         if (!isAccessibilityTable()) {        AccessibilityRenderObject::addChildren();        return;    }        m_haveChildren = true;    if (!m_renderer)        return;        AXObjectCache* axCache = m_renderer->document()->axObjectCache();        // add only rows that are labeled as aria rows    HashSet<AccessibilityObject*> appendedRows;    unsigned columnCount = 0;    for (RefPtr<AccessibilityObject> child = firstChild(); child; child = child->nextSibling()) {        if (!addTableCellChild(child.get(), appendedRows, columnCount)) {                        // in case the render tree doesn't match the expected ARIA hierarchy, look at the children            if (!child->hasChildren())                child->addChildren();            // The children of this non-row will contain all non-ignored elements (recursing to find them).             // This allows the table to dive arbitrarily deep to find the rows.            AccessibilityChildrenVector children = child->children();            size_t length = children.size();            for (size_t i = 0; i < length; ++i)                addTableCellChild(children[i].get(), appendedRows, columnCount);        }    }        // make the columns based on the number of columns in the first body    for (unsigned i = 0; i < columnCount; ++i) {        AccessibilityTableColumn* column = static_cast<AccessibilityTableColumn*>(axCache->getOrCreate(ColumnRole));        column->setColumnIndex((int)i);        column->setParent(this);        m_columns.append(column);        if (!column->accessibilityIsIgnored())            m_children.append(column);    }        AccessibilityObject* headerContainerObject = headerContainer();    if (headerContainerObject && !headerContainerObject->accessibilityIsIgnored())        m_children.append(headerContainerObject);}
开发者ID:fatman2021,项目名称:webkitgtk,代码行数:49,


示例17: axObjectCache

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,


示例18: ASSERT

void AccessibilityTable::addChildren(){    if (!isAccessibilityTable()) {        AccessibilityRenderObject::addChildren();        return;    }        ASSERT(!m_haveChildren);         m_haveChildren = true;    if (!m_renderer || !m_renderer->isTable())        return;        RenderTable* table = toRenderTable(m_renderer);    // Go through all the available sections to pull out the rows and add them as children.    table->recalcSectionsIfNeeded();        unsigned maxColumnCount = 0;    RenderTableSection* footer = table->footer();        for (RenderTableSection* tableSection = table->topSection(); tableSection; tableSection = table->sectionBelow(tableSection, SkipEmptySections)) {        if (tableSection == footer)            continue;        addChildrenFromSection(tableSection, maxColumnCount);    }        // Process the footer last, in case it was ordered earlier in the DOM.    if (footer)        addChildrenFromSection(footer, maxColumnCount);        AXObjectCache* axCache = m_renderer->document().axObjectCache();    // make the columns based on the number of columns in the first body    unsigned length = maxColumnCount;    for (unsigned i = 0; i < length; ++i) {        AccessibilityTableColumn* column = toAccessibilityTableColumn(axCache->getOrCreate(ColumnRole));        column->setColumnIndex((int)i);        column->setParent(this);        m_columns.append(column);        if (!column->accessibilityIsIgnored())            m_children.append(column);    }        AccessibilityObject* headerContainerObject = headerContainer();    if (headerContainerObject && !headerContainerObject->accessibilityIsIgnored())        m_children.append(headerContainerObject);}
开发者ID:CannedFish,项目名称:webkit,代码行数:46,


示例19: children

void AccessibilityMenuList::didUpdateActiveOption(int optionIndex){    const AccessibilityChildrenVector& childObjects = children();    if (childObjects.isEmpty())        return;    ASSERT(childObjects.size() == 1);    ASSERT(childObjects[0]->isMenuListPopup());    RefPtr<Document> document = m_renderer->document();    AXObjectCache* cache = document->axObjectCache();    if (AccessibilityMenuListPopup* popup = static_cast<AccessibilityMenuListPopup*>(childObjects[0].get()))        popup->didUpdateActiveOption(optionIndex);    cache->postNotification(this, document.get(), AXObjectCache::AXMenuListValueChanged, true, PostSynchronously);}
开发者ID:Treeeater,项目名称:WebPermission,代码行数:17,


示例20: document

void AccessibilityMenuList::didUpdateActiveOption(int optionIndex){    Ref<Document> document(m_renderer->document());    AXObjectCache* cache = document->axObjectCache();    const AccessibilityChildrenVector& childObjects = children();    if (!childObjects.isEmpty()) {        ASSERT(childObjects.size() == 1);        ASSERT(childObjects[0]->isMenuListPopup());        if (childObjects[0]->isMenuListPopup()) {            if (AccessibilityMenuListPopup* popup = toAccessibilityMenuListPopup(childObjects[0].get()))                popup->didUpdateActiveOption(optionIndex);        }    }    cache->postNotification(this, &document.get(), AXObjectCache::AXMenuListValueChanged, TargetElement, PostSynchronously);}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:18,


示例21: notifyAccessibilityStatus

static void notifyAccessibilityStatus(WebKitWebFrame* frame, WebKitLoadStatus loadStatus){    if (loadStatus != WEBKIT_LOAD_PROVISIONAL        && loadStatus != WEBKIT_LOAD_FAILED        && loadStatus != WEBKIT_LOAD_FINISHED)        return;    WebKitWebFramePrivate* priv = frame->priv;    if (!priv->coreFrame || !priv->coreFrame->document())        return;    RenderView* contentRenderer = priv->coreFrame->contentRenderer();    if (!contentRenderer)        return;    AXObjectCache* axObjectCache = priv->coreFrame->document()->axObjectCache();    if (!axObjectCache)        return;    AccessibilityObject* coreAxObject = axObjectCache->getOrCreate(contentRenderer);    if (!coreAxObject)        return;    AtkObject* axObject = coreAxObject->wrapper();    if (!axObject || !ATK_IS_DOCUMENT(axObject))        return;    switch (loadStatus) {    case WEBKIT_LOAD_PROVISIONAL:        g_signal_emit_by_name(axObject, "state-change", "busy", true);        if (core(frame)->loader()->loadType() == FrameLoadTypeReload)            g_signal_emit_by_name(axObject, "reload");        break;    case WEBKIT_LOAD_FAILED:        g_signal_emit_by_name(axObject, "load-stopped");        g_signal_emit_by_name(axObject, "state-change", "busy", false);        break;    case WEBKIT_LOAD_FINISHED:        g_signal_emit_by_name(axObject, "load-complete");        g_signal_emit_by_name(axObject, "state-change", "busy", false);    default:        break;    }}
开发者ID:sysrqb,项目名称:chromium-src,代码行数:44,


示例22: ownerFrame

void TextFinder::reportFindInPageResultToAccessibility(int identifier){    AXObjectCache* axObjectCache = ownerFrame().frame()->document()->existingAXObjectCache();    if (!axObjectCache)        return;    AXObject* startObject = axObjectCache->get(m_activeMatch->startContainer());    AXObject* endObject = axObjectCache->get(m_activeMatch->endContainer());    if (!startObject || !endObject)        return;    WebLocalFrameImpl* mainFrameImpl = ownerFrame().viewImpl()->mainFrameImpl();    if (mainFrameImpl && mainFrameImpl->client()) {        mainFrameImpl->client()->handleAccessibilityFindInPageResult(            identifier, m_activeMatchIndexInCurrentFrame + 1,            WebAXObject(startObject), m_activeMatch->startOffset(),            WebAXObject(endObject), m_activeMatch->endOffset());    }}
开发者ID:RobinWuDev,项目名称:Qt,代码行数:19,


示例23: ASSERT

void WebRemoteFrameImpl::setReplicatedOrigin(const WebSecurityOrigin& origin) const{    ASSERT(frame());    frame()->securityContext()->setReplicatedOrigin(origin);    // If the origin of a remote frame changed, the accessibility object for the owner    // element now points to a different child.    //    // TODO(dmazzoni, dcheng): there's probably a better way to solve this.    // Run SitePerProcessAccessibilityBrowserTest.TwoCrossSiteNavigations to    // ensure an alternate fix works.  http://crbug.com/566222    FrameOwner* owner = frame()->owner();    if (owner && owner->isLocal()) {        HTMLElement* ownerElement = toHTMLFrameOwnerElement(owner);        AXObjectCache* cache = ownerElement->document().existingAXObjectCache();        if (cache)            cache->childrenChanged(ownerElement);    }}
开发者ID:howardroark2018,项目名称:chromium,代码行数:19,


示例24: VisiblePosition

VisiblePosition AXObjectCache::visiblePositionForTextMarkerData(TextMarkerData& textMarkerData){    VisiblePosition visiblePos = VisiblePosition(textMarkerData.node, textMarkerData.offset, textMarkerData.affinity);    Position deepPos = visiblePos.deepEquivalent();    if (deepPos.isNull())        return VisiblePosition();        RenderObject* renderer = deepPos.node()->renderer();    if (!renderer)        return VisiblePosition();        AXObjectCache* cache = renderer->document()->axObjectCache();    if (!cache->isIDinUse(textMarkerData.axID))        return VisiblePosition();        if (deepPos.node() != textMarkerData.node || deepPos.deprecatedEditingOffset() != textMarkerData.offset)        return VisiblePosition();        return visiblePos;}
开发者ID:UIKit0,项目名称:WebkitAIR,代码行数:20,


示例25: 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,


示例26: 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,



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


C++ AbiCollabSessionManager类代码示例
C++ AXObject类代码示例
51自学网,即我要自学网,自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1