Bug 643711 - don't use GetChildCount xpcom version internally, r=trevor

This commit is contained in:
Alexander Surkov 2011-03-29 13:44:14 +09:00
Родитель 95b23184f8
Коммит 2da4603350
3 изменённых файлов: 3 добавлений и 20 удалений

Просмотреть файл

@ -374,16 +374,6 @@ public:
role != nsIAccessibleRole::ROLE_STATICTEXT;
}
/**
* Return true if the given accessible hasn't children.
*/
static inline PRBool IsLeaf(nsIAccessible *aAcc)
{
PRInt32 numChildren = 0;
aAcc->GetChildCount(&numChildren);
return numChildren == 0;
}
/**
* Return true if the given accessible can't have children. Used when exposing
* to platform accessibility APIs, should the children be pruned off?

Просмотреть файл

@ -195,11 +195,8 @@ nsHyperTextAccessible::GetStateInternal(PRUint32 *aState, PRUint32 *aExtraState)
*aState |= nsIAccessibleStates::STATE_READONLY;
}
PRInt32 childCount;
GetChildCount(&childCount);
if (childCount > 0) {
if (GetChildCount() > 0)
*aExtraState |= nsIAccessibleStates::EXT_STATE_SELECTABLE_TEXT;
}
return NS_OK;
}

Просмотреть файл

@ -236,9 +236,7 @@ __try {
if (nsAccUtils::MustPrune(this))
return NS_OK;
PRInt32 numChildren;
GetChildCount(&numChildren);
*pcountChildren = numChildren;
*pcountChildren = GetChildCount();
} __except(FilterA11yExceptions(::GetExceptionCode(), GetExceptionInformation())) { }
return S_OK;
@ -1014,9 +1012,7 @@ __try {
mEnumVARIANTPosition += aNumElements;
PRInt32 numChildren;
GetChildCount(&numChildren);
PRInt32 numChildren = GetChildCount();
if (mEnumVARIANTPosition > numChildren)
{
mEnumVARIANTPosition = numChildren;