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

1260 Коммитов

Автор SHA1 Сообщение Дата
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 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 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 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
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
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 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 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 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 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
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
Eitan Isaacson a479c8f191 Bug 1713050 - P2: Add granularity to a11y caret move events. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D139746
2022-03-16 05:56:25 +00:00
Eitan Isaacson d4418e9378 Bug 1713050 - P1: Add granularity to selection change notification. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D139745
2022-03-16 05:56:25 +00:00
Morgan Reschenberg 1fcc546b3a Bug 1733268: Cache states::OPAQUE1, update state on style change r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D140894
2022-03-15 18:46:46 +00:00
Morgan Reschenberg 238bdbc5e9 Bug 1756229: Cache scroll position r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D139190
2022-03-14 19:52:50 +00:00
Iulian Moraru e8a5d3a8b3 Backed out 2 changesets (bug 1757661, bug 1756229) for causing build bustages on LocalAccessible.cpp. CLOSED TREE
Backed out changeset ba6ef5bc928e (bug 1757661)
Backed out changeset a6ea1aa0492a (bug 1756229)
2022-03-12 12:17:19 +02:00
Morgan Reschenberg 36590416d2 Bug 1756229: Cache scroll position r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D139190
2022-03-12 00:02:33 +00:00
Butkovits Atila bfa9c70d05 Backed out 2 changesets (bug 1756229, bug 1757661) for causing leaks. CLOSED TREE
Backed out changeset 20b9c772f7b5 (bug 1757661)
Backed out changeset 1dfe3b2c9405 (bug 1756229)
2022-03-09 01:12:55 +02:00
Morgan Reschenberg 06012cd8fd Bug 1756229: Cache scroll position r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D139190
2022-03-08 20:16:08 +00:00
Eitan Isaacson bbc77ff721 Bug 1758190 - Actually add AccGroupInfo instances to SetAttribute. r=morgan
The browser_obj_group.js test will pass when caching is enabled once
this lands.

Differential Revision: https://phabricator.services.mozilla.com/D140402
2022-03-08 17:29:18 +00:00
James Teh d128c0bf67 Bug 1757257: Don't assert for a null frame in TextAttrsMgr::GetAttributes. r=morgan
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
2022-03-01 21:16:43 +00:00
James Teh 2f2e5d80a2 Bug 1756528: Fix cropping of siblings in TextRange::Crop. r=eeejay
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
2022-02-26 23:01:56 +00:00
James Teh d637417f70 Bug 1741793 part 2: Update TextPoint/Range to use base Accessible. r=eeejay
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
2022-02-26 23:01:54 +00:00
James Teh 24238f9512 Bug 1741793 part 1: Remove TextRange stuff that was never implemented. r=eeejay
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
2022-02-26 23:01:54 +00:00
Morgan Reschenberg 618acab981 Bug 1744573: Cache the transform matrix r=eeejay,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D133134
2022-02-25 22:23:13 +00:00
James Teh a9fcf6f459 Bug 1756730: Null check atributes in TextLeafPoint::FindTextAttrsStart. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D139453
2022-02-23 21:28:20 +00:00
Eitan Isaacson cfaef68bb6 Bug 1746833 - P3: Make GetTextEquivFromSubtree take Accessible. r=Jamie
The previous patch moved Value to Accessible. We can now use it in
GetTextEquivFromSubtree.

Differential Revision: https://phabricator.services.mozilla.com/D138949
2022-02-18 18:21:00 +00:00
James Teh e9f99b869e Bug 1730090: Implement support for BOUNDARY_PARAGRAPH in TextLeafPoint and HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D138744
2022-02-18 11:41:41 +00:00
James Teh 4181fc7eb2 Bug 1755604: Add Accessible::IsBefore/IsAncestorOf. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D138743
2022-02-18 09:49:02 +00:00
smolnar a7d4b25671 Backed out 4 changesets (bug 1730090, bug 1755604, bug 1755420) for causing build bustages in accessible/base/TextLeafRange.cpp CLOSED TREE
Backed out changeset f1f8a381f403 (bug 1755420)
Backed out changeset a3cfe47a020c (bug 1755420)
Backed out changeset b3360b57cf38 (bug 1730090)
Backed out changeset 3fb940c71b19 (bug 1755604)
2022-02-18 08:11:20 +02:00
James Teh 3c0d005e1c Bug 1730090: Implement support for BOUNDARY_PARAGRAPH in TextLeafPoint and HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D138744
2022-02-18 02:19:11 +00:00
James Teh e9f8aa87b3 Bug 1755604: Add Accessible::IsBefore/IsAncestorOf. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D138743
2022-02-18 02:19:11 +00:00
James Teh bdcedbe127 Bug 1743968: Cache the display object attribute. r=morgan
This also adds Accessible::DisplayStyle, as we sometimes want to be able to get the display style without fetching all the Attributes.

Differential Revision: https://phabricator.services.mozilla.com/D138629
2022-02-17 21:56:34 +00:00
James Teh d39a7bf8c3 Bug 1754675: Fix crash in AccAttributes::Equal when a string value exists in this AccAttributes but not the other. r=morgan
We were checking for a non-existent entry in the other AccAttributes in most cases except when the value was a string.

Differential Revision: https://phabricator.services.mozilla.com/D138875
2022-02-17 21:54:41 +00:00
Eitan Isaacson b2f056737e Bug 1755383 - P1: Move SelectAccessible methods to Accessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D138728
2022-02-16 18:42:53 +00:00
James Teh d3319fc982 Bug 1747172: Support cached RemoteAccessible in Pivot text methods. r=eeejay
The XPCOM interface and AccVCChangeEvent still only support LocalAccessible.
These will need to be updated/refactored in the future.

Differential Revision: https://phabricator.services.mozilla.com/D138247
2022-02-15 05:35:14 +00:00
Marian-Vasile Laza 12a8ac0869 Backed out changeset 8a3535e92f63 (bug 1747172) for causing build bustages on AccessibleWrap.cpp. CLOSED TREE 2022-02-11 12:36:46 +02:00
James Teh 652fb6ceeb Bug 1747172: Support cached RemoteAccessible in Pivot text methods. r=eeejay
The XPCOM interface and AccVCChangeEvent still only support LocalAccessible.
These will need to be updated/refactored in the future.

Differential Revision: https://phabricator.services.mozilla.com/D138247
2022-02-11 10:07:25 +00:00
James Teh f65b9ea3f5 Bug 1730085 part 4: Implement support for BOUNDARY_WORD_END in TextLeafPoint and HyperTextAccessibleBase. r=eeejay
BOUNDARY_WORD_END is implemented using BOUNDARY_WORD_START and adjusting for spaces, which are word end boundaries.
This is arguably less efficient than it could be, since we will walk over space and then reverse course to compensate.
However, the alternative would mean keeping two slightly different versions of the word boundary check code in sync, plus compensating for the fact that a word often ends before a line start while still supporting words split by line wrapping.
I felt the lower complexity here outweighed the potential slight loss in efficiency.
We can always revisit this if this turns out to be a real problem.

Differential Revision: https://phabricator.services.mozilla.com/D138105
2022-02-11 06:27:03 +00:00