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-15 06:46:24 +00:00
parent bddbaee16e
commit 8af11eab64
5 changed files with 15 additions and 10 deletions

View File

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

View File

@@ -215,7 +215,14 @@ addAccessibleTask(
await testCachedRelation(link, RELATION_LINKS_TO, item2); 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,
}
); );
/* /*

View File

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

View File

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

View File

@@ -172,9 +172,6 @@ const WCHAR *const IA2_RELATION_ERROR = L"error";
/** This object is the error message for the target object. */ /** This object is the error message for the target object. */
const WCHAR *const IA2_RELATION_ERROR_FOR = L"errorFor"; 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. /** This interface gives access to an object's set of relations.