Closed Bug 1735722 Opened 3 years ago Closed 3 years ago

Unify LinkAt in HyperTextAccessibleBase

Categories

(Core :: Disability Access APIs, task)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: Jamie, Assigned: Jamie)

References

Details

Attachments

(6 files)

LinkAt is needed to get embedded objects for hypertext clients. In particular, it's needed for NVDA to render a virtual buffer.

This required renaming LocalAccessible::GetEmbeddedChildAt to EmbeddedChildAt.
LocalAccessible::EmbeddedChildAt uses a covariant return type to return a LocalAccessible* while still overriding the base method (which returns Accessible*).
Unfortunately, this can't be done for RemoteAccessible, since the Derived type isn't complete in time due to the templating.
There was only one caller of RemoteAccessible::EmbeddedChildAt, so I just changed it to call AsRemote.
Eventually, even that caller will use the unified tree anyway.

This uses the unified Accessible::EmbeddedChildAt from the previous patch.
HyperTextAccessible::LinkAt still exists, since there are still some callers that depend on it returning a LocalAccessible.
xpcAccessibleHyperText has also been updated to call this, which means tests will work on Windows when the cache is enabled.

We don't support any of the methods in this interface for RemoteAccessible yet.
However, IAccessibleHypertext::get_hyperlink returns an IAccessibleHyperlink, so we must support QI to it.

This makes way for a new unified TextAcc method in a subsequent patch.

Strictly speaking, doing it like this isn't correct because methods will return CO_E_OBJNOTCONNECTED for a RemoteAccessible instead of E_NOTIMPL.
I fixed this for IAccessibleText, but I realised fixing this for all interfaces is going to involve a lot of churn which we're going to end up removing anyway once we unify everything.
Clients don't really care about the error code, so I think this situation is acceptable while this is still in early development.

Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7d5b04d917ab
part 1: Move EmbeddedChildAt into base Accessible. r=morgan
https://hg.mozilla.org/integration/autoland/rev/f5d402b9c8e0
part 2: Add HyperTextAccessibleBase::LinkAt. r=morgan
https://hg.mozilla.org/integration/autoland/rev/3c9adcebbd98
part 3: Add test for HyperTextAccessibleBase::LinkAt. r=morgan
https://hg.mozilla.org/integration/autoland/rev/417190cd31c6
part 4: Support QueryInterface to IAccessibleHyperlink for RemoteAccessible. r=morgan
https://hg.mozilla.org/integration/autoland/rev/c4747685e885
part 5: Rename ia2AccessibleHypertext::TextAcc to LocalTextAcc. r=morgan
https://hg.mozilla.org/integration/autoland/rev/5ce097bae426
part 6: Support QueryInterface to IAccessibleHypertext and IAccessibleHypertext::get_hyperlink for RemoteAccessible. r=morgan
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: