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

1249 Коммитов

Автор SHA1 Сообщение Дата
James Teh 502efae488 Bug 1781536 part 3: Move RelationByType to base Accessible. r=morgan
This required changing the RemoteAccessible implementations to return Relation instead of an array of RemoteAccessible.
Platform implementations have been updated to use the unified method where appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D152959
2022-08-03 23:58:51 +00:00
James Teh 8c97854cbe Bug 1781536 part 1: Support base Accessible in Relation. r=morgan
Previously, Relation::Next returned a LocalAccessible.
Now, it returns an Accessible so that it can support RemoteAccessible as well.
Relation::LocalNext has been added as a convenience to return a LocalAccessible when the caller is certain that only LocalAccessible is relevant.
Callers have either been updated to use LocalNext or to handle an Accessible returned from Next.
ia2AccessibleRelation now holds an array of MsaaAccessible, as we need to hold references and we can't hold references to RemoteAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D152957
2022-08-03 23:58:50 +00:00
Morgan Rae Reschenberg 073e3d32d2 Bug 1780878: [Part 3] Cache FLOWS_TO and FLOWS_FROM relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152581
2022-08-03 05:09:56 +00:00
Morgan Rae Reschenberg 7c7272c8f2 Bug 1780878: [Part 2] Cache DESCRIBED_BY and DESCRIPTION_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152580
2022-08-03 05:09:55 +00:00
Morgan Rae Reschenberg 16fcce1b8a Bug 1780878: [Part 1] Cache CONTROLLED_BY and CONTROLLER_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152578
2022-08-03 05:09:55 +00:00
Morgan Rae Reschenberg f84015c1ae Bug 1774043: [Part 1] Add cache domains, caching logic for LABEL_FOR and LABELLED_BY relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152100
2022-08-03 05:09:53 +00:00
James Teh 711cfeacdd Bug 1772476: Invalidate a CachedTableAccessible when a cell is moved out of it. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D153443
2022-08-02 23:58:50 +00:00
Eitan Isaacson 92afd6db93 Bug 1782550 - Don't treat list bullets as block items. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D153371
2022-08-02 16:27:31 +00:00
Norisz Fay f411d84051 Backed out 7 changesets (bug 1774043, bug 1780878) for causing gv-junit failures
Backed out changeset 465a045a5068 (bug 1780878)
Backed out changeset 05aac2c873a6 (bug 1780878)
Backed out changeset f3039b217acd (bug 1780878)
Backed out changeset 63a4b92b5453 (bug 1774043)
Backed out changeset f44a9d0f46ab (bug 1774043)
Backed out changeset 5fff79016cb6 (bug 1774043)
Backed out changeset ffbb26d2a3c1 (bug 1774043)
2022-08-02 10:47:21 +03:00
Morgan Rae Reschenberg e58f00a0c6 Bug 1780878: [Part 3] Cache FLOWS_TO and FLOWS_FROM relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152581
2022-08-02 02:51:06 +00:00
Morgan Rae Reschenberg 186ab99a74 Bug 1780878: [Part 2] Cache DESCRIBED_BY and DESCRIPTION_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152580
2022-08-02 02:51:05 +00:00
Morgan Rae Reschenberg 2743551b63 Bug 1780878: [Part 1] Cache CONTROLLED_BY and CONTROLLER_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152578
2022-08-02 02:51:05 +00:00
Morgan Rae Reschenberg 4d3f82861a Bug 1774043: [Part 1] Add cache domains, caching logic for LABEL_FOR and LABELLED_BY relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152100
2022-08-02 02:51:03 +00:00
Butkovits Atila e4fc988843 Backed out 7 changesets (bug 1780878, bug 1774043) for causing build bustages. CLOSED TREE
Backed out changeset 34a9e10a9f87 (bug 1780878)
Backed out changeset 3b1c3fdc386b (bug 1780878)
Backed out changeset e1e6fc68d024 (bug 1780878)
Backed out changeset c0cdd3e2efa2 (bug 1774043)
Backed out changeset 14e4b5310a9a (bug 1774043)
Backed out changeset 8a7e2374e0b2 (bug 1774043)
Backed out changeset 9309568a622d (bug 1774043)
2022-07-27 00:58:03 +03:00
Morgan Rae Reschenberg fb48e7882f Bug 1780878: [Part 3] Cache FLOWS_TO and FLOWS_FROM relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152581
2022-07-26 21:35:42 +00:00
Morgan Rae Reschenberg 198910faa7 Bug 1780878: [Part 2] Cache DESCRIBED_BY and DESCRIPTION_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152580
2022-07-26 21:35:42 +00:00
Morgan Rae Reschenberg 7467b0247a Bug 1780878: [Part 1] Cache CONTROLLED_BY and CONTROLLER_FOR relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152578
2022-07-26 21:35:41 +00:00
Morgan Rae Reschenberg 094be633a1 Bug 1774043: [Part 1] Add cache domains, caching logic for LABEL_FOR and LABELLED_BY relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152100
2022-07-26 21:35:38 +00:00
Emilio Cobos Álvarez 92c9ff22dc Bug 1780385 - Remove canvas hit region api. r=jrmuizel
Add a pref for MouseEvent.region since that wasn't un-exposed. No other
browser supports it so we can probably safely remove it, but just in
case.

Differential Revision: https://phabricator.services.mozilla.com/D152274
2022-07-20 16:52:47 +00:00
James Teh ef6f7fb547 Bug 1757126 part 4: Support AccessKey on cached RemoteAccessible. r=morgan
1. Move AccessKey to base Accessible.
2. Retrieve AccessKey from the cache for RemoteAccessible.
3. Update XPCOM and platform specific code accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D151202
2022-07-14 05:48:16 +00:00
James Teh 96dc8466b6 Bug 1757126 part 3: Push AccessKey to the parent process cache. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D151201
2022-07-14 05:48:16 +00:00
James Teh 2d82055fe8 Bug 1757126 part 2: Move KeyBinding to base Accessible header. r=morgan
We'll need this to unify AccessKey.

Differential Revision: https://phabricator.services.mozilla.com/D151200
2022-07-14 05:48:16 +00:00
Norisz Fay d152ee99bf Backed out 4 changesets (bug 1757126) for causing build bustages on xpcAccessible.cpp CLOSED TREE
Backed out changeset e57b1129fd48 (bug 1757126)
Backed out changeset 6ee5d245c2fc (bug 1757126)
Backed out changeset b0809e6a3de3 (bug 1757126)
Backed out changeset 4d10b2dfdc99 (bug 1757126)
2022-07-14 04:18:36 +03:00
James Teh e83581aacd Bug 1757126 part 4: Support AccessKey on cached RemoteAccessible. r=morgan
1. Move AccessKey to base Accessible.
2. Retrieve AccessKey from the cache for RemoteAccessible.
3. Update XPCOM and platform specific code accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D151202
2022-07-14 00:49:47 +00:00
James Teh 1e23a19e0f Bug 1757126 part 3: Push AccessKey to the parent process cache. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D151201
2022-07-14 00:49:46 +00:00
James Teh b64daafc2b Bug 1757126 part 2: Move KeyBinding to base Accessible header. r=morgan
We'll need this to unify AccessKey.

Differential Revision: https://phabricator.services.mozilla.com/D151200
2022-07-14 00:49:46 +00:00
James Teh c838f807ed Bug 1762116: When a global ARIA attribute is added to an element, create an Accessible if there isn't one already. r=morgan
We don't create Accessibles for all elements.
If an element has a global ARIA attribute when it is shown, we do create an Accessible for it.
However, previously, if we didn't initially create an Accessible for an element (e.g. no global ARIA attributes) and it subsequently gained a global ARIA attribute, we didn't create an Accessible at that point.
We now explicitly handle this case when such an attribute is added.

Differential Revision: https://phabricator.services.mozilla.com/D151348
2022-07-14 00:48:47 +00:00
James Teh e29e5e6308 Bug 1778644: When a row is added to a table, push a cache update for the table's layout guess. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D151454
2022-07-14 00:47:55 +00:00
James Teh d2d7992aaf Bug 1748755: Support IAccessibleText::get_new/oldText for cached RemoteAccessible. r=morgan
1. Make ia2AccessibleText::UpdateTextChangeData (and sLastTextChangeAcc) use HyperTextAccessibleBase instead of HyperTextAccessibleWrap.
2. Make ProxyTextChangeEvent call UpdateTextChangeData when the cache is enabled.
3. Don't send sync text change events when the cache is enabled. They don't need to be sync because clients query the cache, not the content process a11y tree. Even if the content process a11y tree mutates, the cache can't update until in-process clients have synchronously handled the event.

Differential Revision: https://phabricator.services.mozilla.com/D139677
2022-07-12 02:45:58 +00:00
James Teh 99afe5c014 Bug 1757121 part 2: Rewrite nsAccUtils::SetLiveContainerAttributes to use the a11y tree instead of the DOM tree. r=morgan
This makes it possible for it to work for RemoteAccessible.
There is a functional change here in that using the a11y tree means we traverse parents set via aria-owns, where previously we only walked the DOM ancestry.
I doubt this will have any impact in the wild and Chromium already does this anyway.

Differential Revision: https://phabricator.services.mozilla.com/D150378
2022-07-12 02:45:56 +00:00
James Teh b40ace7f06 Bug 1757121 part 1: Allow nsAccessibilityService::MarkupAttribute/MarkupAttributes to take an Accessible. r=morgan
Previously, these methods took a DOM nsIContent, making it impossible for them to work for RemoteAccessible.
GetMarkupMapInfoForNode has been renamed to GetMarkupMapInfoFor and has overloads for nsIContent and Accessible.
MarkupAttribute is a template which can take either, as we still need the nsIContent version elsewhere.
MarkupAttributes now only takes an Accessible, as it can get the nsIContent from the Accessible if necessary.

Differential Revision: https://phabricator.services.mozilla.com/D150377
2022-07-12 02:45:56 +00:00
James Teh 143b3ab931 Bug 1768269: Use IgnoredErrorResult instead of ErrorResult in LocalAccessible::IsActiveDescendant. r=eeejay
QuerySelector can fail if the id is invalid; e.g. if it contains a quote (") character.
ErrorResult treats a failure as an exception, so it asserts.
We explicitly check for and handle failure ourselves, so use IgnoredErrorResult instead.

Differential Revision: https://phabricator.services.mozilla.com/D151564
2022-07-12 02:44:31 +00:00
Morgan Rae Reschenberg 644b66ac98 Bug 1775329: Support cached OffsetAtPoint in HyperTextAccessibleBase r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150049
2022-07-05 19:50:45 +00:00
criss fc6d3e181e Backed out 2 changesets (bug 1775329, bug 1776275) for causing mochitest failures on browser_test_zoom_text.js. CLOSED TREE
Backed out changeset 72519abf87ee (bug 1775329)
Backed out changeset 365e262b3dad (bug 1776275)
2022-06-29 23:39:31 +03:00
Morgan Rae Reschenberg a68d0f55b4 Bug 1775329: Support cached OffsetAtPoint in HyperTextAccessibleBase r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150049
2022-06-29 19:00:14 +00:00
Bogdan Szekely a0e2dc5103 Backed out 5 changesets (bug 1748755, bug 1757121) for causing reftest failures on 448064.xhtml CLOSED TREE
Backed out changeset 4ff1f0c0d866 (bug 1748755)
Backed out changeset 41328f13fe58 (bug 1757121)
Backed out changeset 27631b3a007f (bug 1757121)
Backed out changeset 2d4cc5953773 (bug 1757121)
Backed out changeset 8d874e7a2a8f (bug 1757121)
2022-06-29 12:25:04 +03:00
James Teh ee4cfc52be Bug 1748755: Support IAccessibleText::get_new/oldText for cached RemoteAccessible. r=morgan
1. Make ia2AccessibleText::UpdateTextChangeData (and sLastTextChangeAcc) use HyperTextAccessibleBase instead of HyperTextAccessibleWrap.
2. Make ProxyTextChangeEvent call UpdateTextChangeData when the cache is enabled.
3. Don't send sync text change events when the cache is enabled. They don't need to be sync because clients query the cache, not the content process a11y tree. Even if the content process a11y tree mutates, the cache can't update until in-process clients have synchronously handled the event.

Differential Revision: https://phabricator.services.mozilla.com/D139677
2022-06-29 07:04:13 +00:00
James Teh 46c2de7cf7 Bug 1757121 part 2: Rewrite nsAccUtils::SetLiveContainerAttributes to use the a11y tree instead of the DOM tree. r=morgan
This makes it possible for it to work for RemoteAccessible.
There is a functional change here in that using the a11y tree means we traverse parents set via aria-owns, where previously we only walked the DOM ancestry.
I doubt this will have any impact in the wild and Chromium already does this anyway.

Differential Revision: https://phabricator.services.mozilla.com/D150378
2022-06-29 07:04:12 +00:00
James Teh a39fe994da Bug 1757121 part 1: Allow nsAccessibilityService::MarkupAttribute/MarkupAttributes to take an Accessible. r=morgan
Previously, these methods took a DOM nsIContent, making it impossible for them to work for RemoteAccessible.
GetMarkupMapInfoForNode has been renamed to GetMarkupMapInfoFor and has overloads for nsIContent and Accessible.
MarkupAttribute is a template which can take either, as we still need the nsIContent version elsewhere.
MarkupAttributes now only takes an Accessible, as it can get the nsIContent from the Accessible if necessary.

Differential Revision: https://phabricator.services.mozilla.com/D150377
2022-06-29 07:04:12 +00:00
James Teh e998d303d0 Bug 1773930: Expose xml-roles object attribute on cached RemoteAccessible. r=morgan
This also changes LocalAccessible::Attributes to ignore the edge case of an empty role attribute when calculating xml-roles.
This is consistent with how we handle the role attribute elsewhere (see aria::GetRoleMapIndex) and makes it easier to handle this consistently between local and remote.

Differential Revision: https://phabricator.services.mozilla.com/D149594
2022-06-24 05:28:53 +00:00
James Teh e03a5619fd Bug 1774197 part 2: Don't include the document in the viewport cache. r=morgan
Sometimes, the document occurs too early in the viewport cache, perhaps even right at the start.
We weren't benefitting from it being in the cache anyway, since we always skipped it.
We already have a fallback in ChildAtPoint for the case where we didn't find a matching Accessible, so we rely on that to handle returning the document when appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D149493
2022-06-23 04:57:04 +00:00
James Teh d73cd7641e Bug 1774197 part 1: Move sending of the viewport cache to ProcessQueuedCacheUpdates. r=morgan
This was moved to a post refresh observer on the misunderstanding that this would allow us to benefit from retained display lists.
In reality, it doesn't; work would need to be done in layout to benefit from those, and since there are different display lists for hit testing and painting, this may not be feasible anyway.
Furthermore, the post refresh implementation was broken because WillRefresh often removes the post refresh observer, which meant that a viewport cache update was never actually pushed!
We could fix this by adding the post refresh observer only if the viewport cache is dirty, removing the post refresh observer in DidRefresh and also removing the post refresh observer in Shutdown only if the viewport cache is dirty.
However, given that we can't benefit from retained display lists anyway, using a post refresh observer doesn't serve any purpose at this stage.
Among other things, this fixes intermittent problems with image maps, which often get inserted into the tree after the initial tree is built.

Differential Revision: https://phabricator.services.mozilla.com/D149492
2022-06-23 04:57:04 +00:00
Morgan Rae Reschenberg fdd6afc666 Bug 1772861: Cache offset for cross-proc iframe docs r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D148832
2022-06-21 20:23:18 +00:00
James Teh 1a49b1e666 Bug 1760739 part 6: Add unified GroupPosition and TotalItemCount support for aria-row/colcount/index. r=eeejay
While this removes most of the local-specific code, we can't remove ARIARowAccessible::GroupPosition yet because it also calculates row index/count compensating for intervening Accessibles between tables and rows.
Eventually, we should fix that properly in AccGroupInfo, at which point we can remove this.

Differential Revision: https://phabricator.services.mozilla.com/D149225
2022-06-16 06:25:52 +00:00
James Teh 32aea8c6e2 Bug 1760739 part 5: Add Accessible method to retrieve an integer ARIA attribute. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D149224
2022-06-16 06:25:51 +00:00
James Teh 237c1cc6fa Bug 1760739 part 3: Expose ARIA object attributes for cached RemoteAccessibles. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D149222
2022-06-16 06:25:51 +00:00
James Teh 70b810b3c0 Bug 1760739 part 2: Provide a way for ARIAMap's AttrIterator to expose values other than strings. r=eeejay
Previously, AttrIterator always exposed string values.
Soon, we'll be using this for caching, so we don't want to convert token values to strings.
We'll eventually need to expose numeric values as well.
To achieve this, an ExposeAttr method was added which takes an AccAttributes and sets the attribute on it using an appropriately typed value.

In addition, a small optimisation was made so we don't search the ARIA attributes map twice for each attribute we query.
The string version of AttrName was also removed, since it wasn't used.
Unfortunately, AttrValue can't be removed yet because our old UIA implementation depends on it, but that will have to be rewritten at some point in future.

Differential Revision: https://phabricator.services.mozilla.com/D149221
2022-06-16 06:25:50 +00:00
James Teh 06433bf920 Bug 1760739 part 1: Remove propagation of ARIA object attributes from iframes to documents. r=eeejay
This behaviour doesn't currently work for OOP iframes.
While we could make it work for OOP iframes using the cache, it isn't covered by the spec, nor does any other browser support it.

Differential Revision: https://phabricator.services.mozilla.com/D149220
2022-06-16 06:25:50 +00:00
James Teh 977aa35653 Bug 1774393: Support BoundsInCSSPixels for cached RemoteAccessible. r=morgan
Our hit testing tests need this.
This adds a base Accessible::BoundsInCSSPixels implementation which relies on BoundsInAppUnits.
BoundsInAppUnits was also moved to Accessible, but it is implemented differently for local and remote, so the base method is abstract.
I also did a drive-by removal of a pointless conditional in xpcAccessible::GetBounds.

Differential Revision: https://phabricator.services.mozilla.com/D149374
2022-06-16 01:03:26 +00:00
James Teh 23c3b53d41 Bug 1773996: Don't queue a11y cache updates if we're never going to send them. r=morgan
This was wasting memory for the parent process, and when the cache was disabled, all content processes.
QueueCacheUpdate now checks whether we are actually sending cache updates before it queues anything.
Simple calls rely on this check, rather than guarding the call to QueueCacheUpdate themselves.
We still call QueueCacheUpdate conditionally for more complex cases which would have to do work before calling QueueCacheUpdate, since we don't want to pointlessly do that prerequisite work.

Differential Revision: https://phabricator.services.mozilla.com/D149231
2022-06-14 22:10:37 +00:00