Bug 675870 - Remove nsIAccessible::relationsCount and getRelation(); f=tbsaunde r=surkov.alexander

This commit is contained in:
Marco Castelluccio 2011-08-27 11:49:40 +01:00
parent aae0d71ffc
commit 643aefc778
2 changed files with 1 additions and 47 deletions

View File

@ -56,7 +56,7 @@ interface nsIAccessibleRelation;
* Mozilla creates the implementations of nsIAccessible on demand.
* See http://www.mozilla.org/projects/ui/accessibility for more information.
*/
[scriptable, uuid(c81d8f8c-8585-4094-bc7c-71dd01494906)]
[scriptable, uuid(c7ac764a-b4c5-4479-9fb7-06e3c9f3db34)]
interface nsIAccessible : nsISupports
{
/**
@ -247,18 +247,6 @@ interface nsIAccessible : nsISupports
*/
nsIAccessibleRelation getRelationByType(in unsigned long aRelationType);
/**
* Returns the number of accessible relations for this object.
*/
readonly attribute unsigned long relationsCount;
/**
* Returns one accessible relation for this object.
*
* @param index - relation index (0-based)
*/
nsIAccessibleRelation getRelation(in unsigned long index);
/**
* Returns multiple accessible relations for this object.
*/

View File

@ -2189,40 +2189,6 @@ nsAccessible::RelationByType(PRUint32 aType)
}
}
NS_IMETHODIMP
nsAccessible::GetRelationsCount(PRUint32* aCount)
{
NS_ENSURE_ARG_POINTER(aCount);
*aCount = 0;
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIArray> relations;
nsresult rv = GetRelations(getter_AddRefs(relations));
NS_ENSURE_SUCCESS(rv, rv);
return relations->GetLength(aCount);
}
NS_IMETHODIMP
nsAccessible::GetRelation(PRUint32 aIndex, nsIAccessibleRelation** aRelation)
{
NS_ENSURE_ARG_POINTER(aRelation);
*aRelation = nsnull;
if (IsDefunct())
return NS_ERROR_FAILURE;
nsCOMPtr<nsIArray> relations;
nsresult rv= GetRelations(getter_AddRefs(relations));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIAccessibleRelation> relation = do_QueryElementAt(relations,
aIndex, &rv);
NS_ADDREF(*aRelation = relation);
return rv;
}
NS_IMETHODIMP
nsAccessible::GetRelations(nsIArray **aRelations)
{