Граф коммитов

9713 Коммитов

Автор SHA1 Сообщение Дата
James Teh 28d9ce246b Bug 1735970 part 18: Add browser tests to exercise table support for both local and remote Accessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141221
2022-04-01 09:50:02 +00:00
James Teh dbbb25abc4 Bug 1735970 part 17: Load a11y browser test snippets in standards mode instead of quirks mode. r=morgan
This is needed to make rowspan="0" work, as this is ignored in quirks mode.

Differential Revision: https://phabricator.services.mozilla.com/D141220
2022-04-01 09:50:02 +00:00
James Teh 77ee8feb56 Bug 1735970 part 16: Support TableAccessibleBase and TableCellAccessibleBase on Mac. r=morgan
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
2022-04-01 09:50:02 +00:00
James Teh d5d775e886 Bug 1735970 part 15: Support TableAccessibleBase and TableCellAccessibleBase for ATK. r=morgan
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
2022-04-01 09:50:01 +00:00
James Teh e394578c67 Bug 1735970 part 14: Support TableAccessibleBase and TableCellAccessibleBase on Windows. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141217
2022-04-01 09:50:01 +00:00
James Teh c3bb22d493 Bug 1735970 part 13: Support TableAccessibleBase and TableCellAccessibleBase in XPCOM. r=morgan
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
2022-04-01 09:50:00 +00:00
James Teh 15449df8fd Bug 1735970 part 12: Implement selection setter methods in CachedTableAccessible for LocalAccessibles. r=morgan
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
2022-04-01 09:50:00 +00:00
James Teh 5a51a59c7d Bug 1735970 part 11: Use CachedTableAccessible for LocalAccessible tables if the cache is enabled. r=morgan
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
2022-04-01 09:50:00 +00:00
James Teh 497cf621d5 Bug 1735970 part 10: Cache whether a table is probably a layout table. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141213
2022-04-01 09:49:59 +00:00
James Teh 1a56a1b78a Bug 1735970 part 9: Support explicitly associated headers for both local and remote cells. r=morgan
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
2022-04-01 09:49:59 +00:00
James Teh ed3aeb2201 Bug 1735970 part 8: Enable AccAttributes to store an array of uint64_t. r=morgan
We need this to cache explicitly associated headers.
This should also be useful later for relations.

Differential Revision: https://phabricator.services.mozilla.com/D141211
2022-04-01 09:49:58 +00:00
James Teh cdc489e318 Bug 1735970 part 7: Make AccIterable::Next return an Accessible. r=morgan
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
2022-04-01 09:49:58 +00:00
James Teh 1f562c2009 Bug 1735970 part 6: Retrieve row/column extent for both local and remote cells. r=morgan
CachedTableAccessible already knew how to support extents (AKA spans), but it didn't know how to retrieve them yet.

Differential Revision: https://phabricator.services.mozilla.com/D141209
2022-04-01 09:49:58 +00:00
James Teh 78f3eb8987 Bug 1735970 part 5: Use CachedTableAccessible for cached RemoteAccessible. r=morgan
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
2022-04-01 09:49:57 +00:00
James Teh 3f9f54bfb2 Bug 1735970 part 4: Introduce CachedTableAccessible and CachedTableCellAccessible. r=morgan
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
2022-04-01 09:49:57 +00:00
James Teh 6021c4755d Bug 1735970 part 3: Add TableAccessibleBase and TableCellAccessibleBase. r=morgan
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
2022-04-01 09:49:57 +00:00
James Teh d91d6ecdec Bug 1735970 part 2: Add methods to unify querying an Accessible's id and retrieval of an Accessible from a document given an id. r=morgan
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
2022-04-01 09:49:56 +00:00
James Teh 4a2e6a75e3 Bug 1735970 part 1: Templatise ConvertToNSArray so it can take an array of Accessible*. r=morgan
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
2022-04-01 09:49:56 +00:00
Emilio Cobos Álvarez 1ce0975b8e Bug 1761493 - Make Gecko internally consistent wrt what a link is. r=smaug
This is mostly edge-casey, but see bug 1757156 for an example where it's
causing some issues (granted, they could use `href="#"` or something
instead of an empty href).

It feels weird if a link looks like a link (because the CSS definition
of a link matches, which is "has an href") but then mostly doesn't
behave as a link.

We can't navigate anywhere if we don't have a valid URI but maybe JS
handles the relevant events as in bug 1757156.

Use the CSS definition (has href) since that's interoperable across
browsers. This should also make some stuff much faster (since checking
'is link' is now just a bit check instead of a virtual call).

(Awaiting try results, if no tests need adjustments then I need to write
some)

Differential Revision: https://phabricator.services.mozilla.com/D142107
2022-03-30 17:34:31 +00:00
Eitan Isaacson 0de0993d51 Bug 1761200 - Check that parent is hypertext before getting attributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D141996
2022-03-25 18:41:12 +00:00
James Teh cc758fd688 Bug 1550644: nsTextEquivUtils: Add space for block elements when we encounter them. r=eeejay,adw
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
2022-03-24 00:06:15 +00:00
Eitan Isaacson ced0d9770b Bug 1760880 - Push document resolution in initial cache. r=morgan
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
2022-03-23 22:24:52 +00:00
criss 34d3fb88a2 Backed out 18 changesets (bug 1735970) for causing hazard bustages.CLOSED TREE
Backed out changeset e7af2be486ce (bug 1735970)
Backed out changeset 73c93a18f65b (bug 1735970)
Backed out changeset 7e48716784d2 (bug 1735970)
Backed out changeset 30f61cdfd3c0 (bug 1735970)
Backed out changeset 3e4697e57570 (bug 1735970)
Backed out changeset 16ac3bec2412 (bug 1735970)
Backed out changeset 945ef21895ec (bug 1735970)
Backed out changeset 5dbfbf341ff8 (bug 1735970)
Backed out changeset d498d61c8f5a (bug 1735970)
Backed out changeset 50a2ee53b763 (bug 1735970)
Backed out changeset 9e2e11ea1a3d (bug 1735970)
Backed out changeset cf84daf9e40f (bug 1735970)
Backed out changeset 003bbf7f5f24 (bug 1735970)
Backed out changeset 00f1fbedc774 (bug 1735970)
Backed out changeset b17a1182539b (bug 1735970)
Backed out changeset 6d0f4821ddcf (bug 1735970)
Backed out changeset d82660fb5408 (bug 1735970)
Backed out changeset e506a5b04bf4 (bug 1735970)
2022-03-23 10:27:08 +02:00
Marian-Vasile Laza a019566c16 Backed out changeset 60cf5a19aa68 (bug 1550644) for causing bc failures on browser_autocomplete_a11y_label.js. 2022-03-23 00:03:11 -07:00
James Teh eac5a2f41a Bug 1550644: nsTextEquivUtils: Add space for block elements when we encounter them. r=eeejay
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
2022-03-23 05:49:46 +00:00
James Teh 52f5f0fc2d Bug 1735970 part 18: Add browser tests to exercise table support for both local and remote Accessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141221
2022-03-23 04:00:32 +00:00
James Teh 5e8371dc5a Bug 1735970 part 17: Load a11y browser test snippets in standards mode instead of quirks mode. r=morgan
This is needed to make rowspan="0" work, as this is ignored in quirks mode.

Differential Revision: https://phabricator.services.mozilla.com/D141220
2022-03-23 04:00:32 +00:00
James Teh 0775d159c6 Bug 1735970 part 16: Support TableAccessibleBase and TableCellAccessibleBase on Mac. r=morgan
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
2022-03-23 04:00:31 +00:00
James Teh 75a52a928e Bug 1735970 part 15: Support TableAccessibleBase and TableCellAccessibleBase for ATK. r=morgan
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
2022-03-23 04:00:31 +00:00
James Teh 89e2b32644 Bug 1735970 part 14: Support TableAccessibleBase and TableCellAccessibleBase on Windows. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141217
2022-03-23 04:00:30 +00:00
James Teh b049082275 Bug 1735970 part 13: Support TableAccessibleBase and TableCellAccessibleBase in XPCOM. r=morgan
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
2022-03-23 04:00:30 +00:00
James Teh d487ef76d7 Bug 1735970 part 12: Implement selection setter methods in CachedTableAccessible for LocalAccessibles. r=morgan
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
2022-03-23 04:00:29 +00:00
James Teh 5227257425 Bug 1735970 part 11: Use CachedTableAccessible for LocalAccessible tables if the cache is enabled. r=morgan
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
2022-03-23 04:00:29 +00:00
James Teh 35dbb69b5b Bug 1735970 part 10: Cache whether a table is probably a layout table. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D141213
2022-03-23 04:00:29 +00:00
James Teh 8c49374f80 Bug 1735970 part 9: Support explicitly associated headers for both local and remote cells. r=morgan
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
2022-03-23 04:00:28 +00:00
James Teh 6fa2b18361 Bug 1735970 part 8: Enable AccAttributes to store an array of uint64_t. r=morgan
We need this to cache explicitly associated headers.
This should also be useful later for relations.

Differential Revision: https://phabricator.services.mozilla.com/D141211
2022-03-23 04:00:28 +00:00
James Teh b8984ccffa Bug 1735970 part 7: Make AccIterable::Next return an Accessible. r=morgan
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
2022-03-23 04:00:28 +00:00
James Teh dd6856961c Bug 1735970 part 6: Retrieve row/column extent for both local and remote cells. r=morgan
CachedTableAccessible already knew how to support extents (AKA spans), but it didn't know how to retrieve them yet.

Differential Revision: https://phabricator.services.mozilla.com/D141209
2022-03-23 04:00:27 +00:00
James Teh 69083561ac Bug 1735970 part 5: Use CachedTableAccessible for cached RemoteAccessible. r=morgan
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
2022-03-23 04:00:27 +00:00
James Teh 81fcebc77b Bug 1735970 part 4: Introduce CachedTableAccessible and CachedTableCellAccessible. r=morgan
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
2022-03-23 04:00:26 +00:00
James Teh 843eb0aed7 Bug 1735970 part 3: Add TableAccessibleBase and TableCellAccessibleBase. r=morgan
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
2022-03-23 04:00:26 +00:00
James Teh d76deafa14 Bug 1735970 part 2: Add methods to unify querying an Accessible's id and retrieval of an Accessible from a document given an id. r=morgan
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
2022-03-23 04:00:25 +00:00
James Teh 1511c1ab7a Bug 1735970 part 1: Templatise ConvertToNSArray so it can take an array of Accessible*. r=morgan
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
2022-03-23 04:00:25 +00:00
James Teh b6fe2e715b Bug 1759600: Don't return a local OuterDoc as the parent of a RemoteAccessible if the RemoteAccessible isn't a document. r=eeejay
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
2022-03-23 00:08:13 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Eitan Isaacson ce4771430d Bug 1713050 - P3: Add more granularities to AXSelectedTextChanged events. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D139747
2022-03-16 05:56:26 +00:00