mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 672515 - remove nsIAccessible getAccessibleToRight/Left/Above/Below; r=trev.saunders
This commit is contained in:
parent
c47a1f425d
commit
f3ece1a7ba
@ -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(c7ac764a-b4c5-4479-9fb7-06e3c9f3db34)]
|
||||
[scriptable, uuid(3126544c-826c-4694-a2ed-67bfe56a1f37)]
|
||||
interface nsIAccessible : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -221,26 +221,6 @@ interface nsIAccessible : nsISupports
|
||||
*/
|
||||
nsIAccessible getChildAt(in long aChildIndex);
|
||||
|
||||
/**
|
||||
* Accessible node geometrically to the right of this one
|
||||
*/
|
||||
nsIAccessible getAccessibleToRight();
|
||||
|
||||
/**
|
||||
* Accessible node geometrically to the left of this one
|
||||
*/
|
||||
nsIAccessible getAccessibleToLeft();
|
||||
|
||||
/**
|
||||
* Accessible node geometrically above this one
|
||||
*/
|
||||
nsIAccessible getAccessibleAbove();
|
||||
|
||||
/**
|
||||
* Accessible node geometrically below this one
|
||||
*/
|
||||
nsIAccessible getAccessibleBelow();
|
||||
|
||||
/**
|
||||
* Return accessible relation by the given relation type (see.
|
||||
* constants defined in nsIAccessibleRelation).
|
||||
|
@ -1974,30 +1974,6 @@ NS_IMETHODIMP nsAccessible::GetHelp(nsAString& _retval)
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccessibleToRight(); */
|
||||
NS_IMETHODIMP nsAccessible::GetAccessibleToRight(nsIAccessible **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccessibleToLeft(); */
|
||||
NS_IMETHODIMP nsAccessible::GetAccessibleToLeft(nsIAccessible **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccessibleAbove(); */
|
||||
NS_IMETHODIMP nsAccessible::GetAccessibleAbove(nsIAccessible **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
/* nsIAccessible getAccessibleBelow(); */
|
||||
NS_IMETHODIMP nsAccessible::GetAccessibleBelow(nsIAccessible **_retval)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
nsIContent*
|
||||
nsAccessible::GetAtomicRegion() const
|
||||
{
|
||||
|
@ -810,42 +810,35 @@ __try {
|
||||
if (!pvarEndUpAt)
|
||||
return E_INVALIDARG;
|
||||
|
||||
nsAccessible *xpAccessibleStart = GetXPAccessibleFor(varStart);
|
||||
if (!xpAccessibleStart || IsDefunct())
|
||||
nsAccessible* accessible = GetXPAccessibleFor(varStart);
|
||||
if (!accessible || accessible->IsDefunct())
|
||||
return E_FAIL;
|
||||
|
||||
VariantInit(pvarEndUpAt);
|
||||
|
||||
nsCOMPtr<nsIAccessible> xpAccessibleResult;
|
||||
nsAccessible* navAccessible = nsnull;
|
||||
PRUint32 xpRelation = 0;
|
||||
|
||||
switch(navDir) {
|
||||
case NAVDIR_DOWN:
|
||||
xpAccessibleStart->GetAccessibleBelow(getter_AddRefs(xpAccessibleResult));
|
||||
break;
|
||||
case NAVDIR_FIRSTCHILD:
|
||||
if (!nsAccUtils::MustPrune(xpAccessibleStart))
|
||||
xpAccessibleStart->GetFirstChild(getter_AddRefs(xpAccessibleResult));
|
||||
if (!nsAccUtils::MustPrune(accessible))
|
||||
navAccessible = accessible->FirstChild();
|
||||
break;
|
||||
case NAVDIR_LASTCHILD:
|
||||
if (!nsAccUtils::MustPrune(xpAccessibleStart))
|
||||
xpAccessibleStart->GetLastChild(getter_AddRefs(xpAccessibleResult));
|
||||
break;
|
||||
case NAVDIR_LEFT:
|
||||
xpAccessibleStart->GetAccessibleToLeft(getter_AddRefs(xpAccessibleResult));
|
||||
if (!nsAccUtils::MustPrune(accessible))
|
||||
navAccessible = accessible->LastChild();
|
||||
break;
|
||||
case NAVDIR_NEXT:
|
||||
xpAccessibleStart->GetNextSibling(getter_AddRefs(xpAccessibleResult));
|
||||
navAccessible = accessible->NextSibling();
|
||||
break;
|
||||
case NAVDIR_PREVIOUS:
|
||||
xpAccessibleStart->GetPreviousSibling(getter_AddRefs(xpAccessibleResult));
|
||||
navAccessible = accessible->PrevSibling();
|
||||
break;
|
||||
case NAVDIR_DOWN:
|
||||
case NAVDIR_LEFT:
|
||||
case NAVDIR_RIGHT:
|
||||
xpAccessibleStart->GetAccessibleToRight(getter_AddRefs(xpAccessibleResult));
|
||||
break;
|
||||
case NAVDIR_UP:
|
||||
xpAccessibleStart->GetAccessibleAbove(getter_AddRefs(xpAccessibleResult));
|
||||
break;
|
||||
return E_NOTIMPL;
|
||||
|
||||
// MSAA relationship extensions to accNavigate
|
||||
case NAVRELATION_CONTROLLED_BY:
|
||||
@ -896,17 +889,20 @@ __try {
|
||||
case NAVRELATION_DESCRIPTION_FOR:
|
||||
xpRelation = nsIAccessibleRelation::RELATION_DESCRIPTION_FOR;
|
||||
break;
|
||||
|
||||
default:
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
pvarEndUpAt->vt = VT_EMPTY;
|
||||
|
||||
if (xpRelation) {
|
||||
Relation rel = RelationByType(xpRelation);
|
||||
xpAccessibleResult = rel.Next();
|
||||
navAccessible = rel.Next();
|
||||
}
|
||||
|
||||
if (xpAccessibleResult) {
|
||||
pvarEndUpAt->pdispVal = NativeAccessible(xpAccessibleResult);
|
||||
if (navAccessible) {
|
||||
pvarEndUpAt->pdispVal = NativeAccessible(navAccessible);
|
||||
pvarEndUpAt->vt = VT_DISPATCH;
|
||||
return S_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user