Bug 1800048: Don't expose the LINKS_TO relation via ATK and IA2. r=morgan

This relation isn't part of the ATK and IA2 specs.
In ATK and the older way of retrieving relations in IA2, we have to calculate all relations.
Since LINKS_TO can be slow and it isn't supported by ATK and IA2 anyway, let's just not expose it at all for them.

Differential Revision: https://phabricator.services.mozilla.com/D161775
This commit is contained in:
James Teh 2022-11-11 10:13:27 +00:00
Родитель 00750e17e2
Коммит 99e5d6af82
4 изменённых файлов: 8 добавлений и 8 удалений

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

@ -86,5 +86,5 @@ RELATIONTYPE(ERRORMSG, "error", ATK_RELATION_ERROR_MESSAGE, NAVRELATION_ERROR,
RELATIONTYPE(ERRORMSG_FOR, "error for", ATK_RELATION_ERROR_FOR,
NAVRELATION_ERROR_FOR, IA2_RELATION_ERROR_FOR)
RELATIONTYPE(LINKS_TO, "links to", ATK_RELATION_LINKS_TO, NAVRELATION_LINKS_TO,
IA2_RELATION_LINKS_TO)
RELATIONTYPE(LINKS_TO, "links to", ATK_RELATION_NULL, NAVRELATION_LINKS_TO,
IA2_RELATION_NULL)

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

@ -215,7 +215,12 @@ addAccessibleTask(
await testCachedRelation(link, RELATION_LINKS_TO, item2);
},
{ chrome: true, iframe: true, remoteIframe: true }
{
chrome: true,
// IA2 doesn't have a LINKS_TO relation and Windows non-cached
// RemoteAccessible uses IA2, so we can't run these tests in this case.
topLevel: !isWinNoCache, iframe: !isWinNoCache, remoteIframe: !isWinNoCache
}
);
/*

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

@ -80,7 +80,6 @@ G_BEGIN_DECLS
*@ATK_RELATION_ERROR_FOR: Reciprocal of %ATK_RELATION_ERROR_MESSAGE. Indicates that this object
* contains an error message describing an invalid condition in the target object(s). @Since:
* ATK_2.26.
*@ATK_RELATION_LINKS_TO: For an anchor link, indicates the element that the link is anchored to.
*@ATK_RELATION_LAST_DEFINED: Not used, this value indicates the end of the enumeration.
*
*Describes the type of the relation
@ -108,7 +107,6 @@ typedef enum
ATK_RELATION_DETAILS_FOR,
ATK_RELATION_ERROR_MESSAGE,
ATK_RELATION_ERROR_FOR,
ATK_RELATION_LINKS_TO,
ATK_RELATION_LAST_DEFINED
} AtkRelationType;

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

@ -172,9 +172,6 @@ const WCHAR *const IA2_RELATION_ERROR = L"error";
/** This object is the error message for the target object. */
const WCHAR *const IA2_RELATION_ERROR_FOR = L"errorFor";
/** The target object is the anchor referenced by this link. */
const WCHAR *const IA2_RELATION_LINKS_TO = L"linksTo";
///@}
/** This interface gives access to an object's set of relations.