An alternative would be to adjust the test expectation to not include
the trailing newline, but this seemed more likely to be what the test
wanted to test.
Differential Revision: https://phabricator.services.mozilla.com/D140954
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.
Differential Revision: https://phabricator.services.mozilla.com/D140004
This is a baby step in the caching direction. It isn't perfect yet.
Specifically, cache we have now in Android depends on a cache push
from content that doesn't happen if we do this all parent side.
So most of the junit tests pass, except for the heading one because
we don't cache heading levels in the less complete viewport cache.
tl;dr
This will work right when the accessibles being retrieved are from our
ctw cache. This will happen in followup bugs.
Differential Revision: https://phabricator.services.mozilla.com/D140120
There are several valid reasons for a HyperTextAccessible to have no frame.
As well as removing the assertion, document the (known) cases where GetFrame() might return null.
Also, document why we create a DocAccessible and call DoInitialUpdate despite a null root frame on its PresShell.
Differential Revision: https://phabricator.services.mozilla.com/D139908
There was already a code path to handle siblings, but this only applied if the boundary child at the range's start/end (often a text leaf) was a sibling of aContainer.
It didn't apply if aContainer was a direct sibling of the range's start/end container.
To fix this, don't restrict the code which handles the case where aContainer does not contain the start/end boundary.
This should always fail to crop, regardless of the ancestry.
Differential Revision: https://phabricator.services.mozilla.com/D139351
The original non-Windows RemoteAccessible SelectionBoundsAt method still exists because it allows the caller to retrieve both the offsets and the text in a single call, which can't be done with the unified API.
Thus, platform code still needs a separate code path for non-cached RemoteAccessible.
Differential Revision: https://phabricator.services.mozilla.com/D139343
Even though we'd ideally be using TextLeafRange for new things, TextRange is still needed by our selection events (which still use HyperText offsets) and IA2/ATK clients which depend on HyperText offsets.
Thus, we need TextRange to support RemoteAccessible.
Although the start and end containers are HyperTextAccessibles, I chose to store Accessible rather than HyperTextAccessibleBase because HyperTextAccessibleBase doesn't inherit from Accessible and having an Accessible is easier.
XPCOM needs to hold a reference to any state objects.
Because we can't hold a reference to an Accessible (due to RemoteAccessible), xpcAccessibleTextRange holds references to xpcAccessibleHyperText instead.
Differential Revision: https://phabricator.services.mozilla.com/D139341
This class needs to be updated to support base Accessible and it doesn't make sense to port methods that can never be used.
Also, any new functionality (e.g. needed for the UIA text pattern) should now be implemented using TextLeafPoint/Range, not TextRange.
Differential Revision: https://phabricator.services.mozilla.com/D139340
The code previously assumed that the base MsaaAccessible implementation would return failure for a remote Accessible.
That is no longer true, so we crashed when we try to get the local DocAccessible.
For now, we explicitly check for remote and return E_NOTIMPL in that case.
Differential Revision: https://phabricator.services.mozilla.com/D139450
This also causes HyperTextAccessible to use HyperTextAccessibleBase for BOUNDARY_CHAR when the cache is enabled.
The fact that we weren't doing this already was an oversight.
Differential Revision: https://phabricator.services.mozilla.com/D138753
Current mochitests should prove the soundness of this. The only thing
preventing this from becoming a non-virtual method is the reliance
on TagName which is only available when cached is enabled. When it
is disabled we need to fallback on the sync IPDL call.
Differential Revision: https://phabricator.services.mozilla.com/D138964