コード例 #1
0
ファイル: AccessibleWrap.cpp プロジェクト: piatra/gecko-dev
gint
getIndexInParentCB(AtkObject* aAtkObj)
{
  // We don't use Accessible::IndexInParent() because we don't include text
  // leaf nodes as children in ATK.
  if (ProxyAccessible* proxy = GetProxy(aAtkObj)) {
    if (ProxyAccessible* parent = proxy->Parent())
      return parent->IndexOfEmbeddedChild(proxy);

    if (proxy->OuterDocOfRemoteBrowser())
      return 0;

    return -1;
  }

    AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
    if (!accWrap) {
        return -1;
    }

    Accessible* parent = accWrap->Parent();
    if (!parent)
        return -1; // No parent

    return parent->GetIndexOfEmbeddedChild(accWrap);
}
コード例 #2
0
gint
getIndexInParentCB(AtkObject *aAtkObj)
{
    // We don't use nsIAccessible::GetIndexInParent() because
    // for ATK we don't want to include text leaf nodes as children
    AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
    if (!accWrap) {
        return -1;
    }

    Accessible* parent = accWrap->Parent();
    if (!parent)
        return -1; // No parent

    return parent->GetIndexOfEmbeddedChild(accWrap);
}
コード例 #3
0
ファイル: AccessibleWrap.cpp プロジェクト: Mardak/tiles-dev
gint
getIndexInParentCB(AtkObject* aAtkObj)
{
  // We don't use Accessible::IndexInParent() because we don't include text
  // leaf nodes as children in ATK.
    AccessibleWrap* accWrap = GetAccessibleWrap(aAtkObj);
    if (!accWrap) {
        return -1;
    }

    Accessible* parent = accWrap->Parent();
    if (!parent)
        return -1; // No parent

    return parent->GetIndexOfEmbeddedChild(accWrap);
}