Exemple #1
0
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);
}
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);
}
Exemple #3
0
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);
}