Previously, when we were about to add text from a text node, we looked at the parent to determine if it was a block element and added space based on that.
This caused problems if there were multiple text nodes inside a block because we ended up adding space between those text nodes, even if there was no intervening block.
Instead, since we're walking the tree, we now add space whenever we encounter a block, both before and after its descendants.
If there are multiple adjacent blocks, this does mean we append multiple spaces, but we compress space befor returning to the caller anyway.
This fixes highlights in address bar suggestions being separated from the rest of the suggestion.
Differential Revision: https://phabricator.services.mozilla.com/D141722
Testing this is hard because the point of failure would be if we
recieved NotifyOfResolutionChange before the IPC doc is constructed.
Differential Revision: https://phabricator.services.mozilla.com/D141904
Previously, when we were about to add text from a text node, we looked at the parent to determine if it was a block element and added space based on that.
This caused problems if there were multiple text nodes inside a block because we ended up adding space between those text nodes, even if there was no intervening block.
Instead, since we're walking the tree, we now add space whenever we encounter a block, both before and after its descendants.
If there are multiple adjacent blocks, this does mean we append multiple spaces, but we compress space befor returning to the caller anyway.
This fixes highlights in address bar suggestions being separated from the rest of the suggestion.
Differential Revision: https://phabricator.services.mozilla.com/D141722
We can use the base classes for both local and cached remote Accessibles.
However, non-cached RemoteAccessibles need to be handled separately still because we can't implement the table interfaces for those.
Differential Revision: https://phabricator.services.mozilla.com/D141219
We can use the base classes for both local and cached remote Accessibles.
However, non-cached RemoteAccessibles need to be handled separately still because we can't implement the table interfaces for those.
Differential Revision: https://phabricator.services.mozilla.com/D141218
This doesn't work for non-cached RemoteAccessibles, but this wasn't previously implemented anyway.
With this patch (and all earlier patches in the stack) applied, all the tests in accessible/tests/mochitest pass with the cache enabled, thus testing CachedTableAccessible.
Differential Revision: https://phabricator.services.mozilla.com/D141216
This just redirects to the local TableAccessible methods.
This allows us to test selection in our mochitests.
As far as I know, real clients don't actually use these methods , so they haven't been implemented for cached RemoteAccessibles yet.
Differential Revision: https://phabricator.services.mozilla.com/D141215
This allows us to test CachedTableAccessible against our mochitest suite.
We'll eventually want to switch LocalAccessible to use this anyway, as it provides advantages beyond support for cached RemoteAccessibles.
This also ensures the experience is consistent between local and remote.
Differential Revision: https://phabricator.services.mozilla.com/D141214
Headers are associated using the headers DOM attribute, which is a list of DOM node ids.
For the cache, we send and store these as Accessible ids.
Differential Revision: https://phabricator.services.mozilla.com/D141212
We need to be able to iterate through explicitly associated headers for both local and remote Accessibles.
AccIterable will serve nicely as a base class, but it needs to support the Accessible base class to do that.
Differential Revision: https://phabricator.services.mozilla.com/D141210
This gets/creates the CachedTableAccessible when AsTableBase/AsTableCellBase is called.
It also invalidates the table cache when mutations occur.
Differential Revision: https://phabricator.services.mozilla.com/D141208
This is a completely new table implementation which can work with the cache.
We lazily create a cache data structure only when table information is requested by a client, looping through the entire table and calculating all the information we need (counts, coordinates, implicit headers, etc.).
Whenever the cache is invalidated due to a mutation of the table structure, we throw away the entire cache, rebuilding it next time the client requests information.
Differential Revision: https://phabricator.services.mozilla.com/D141206
These are needed to support RemoteAccessible tables.
Stuff specific to LocalAccessible is still in TableAccessible and TableCellAccessible, which now inherit from the new Base classes.
Covariant return types have been used to minimise changes in LocalAccessible callers.
Differential Revision: https://phabricator.services.mozilla.com/D141205
There is no base class for local (DocAccessible) and remote (DocAccessibleParent) documents, so this adds nsAccUtils::GetAccessibleByID.
Differential Revision: https://phabricator.services.mozilla.com/D141207
Previously, there were variants for LocalAccessible and RemoteAccessible, but they did exactly the same thing anyway.
We still need to support LocalAccessible and RemoteAccessible arrays, but we also want to support just Accessible.
Use a template to allow for all three.
Differential Revision: https://phabricator.services.mozilla.com/D141204
A non-document RemoteAccessible can have a null parent while it is being moved.
This is only temporary, but it's possible for a client call to execute in this state.
We must not return the local OuterDoc in this case, as this definitely isn't a valid child of an OuterDoc.
To achieve this, the logic for handling document parents was moved to DocAccessibleParent.
This makes it easier to understand exactly how documents are handled in contrast to normal RemoteAccessibles.
Differential Revision: https://phabricator.services.mozilla.com/D141065
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