443 Commits

Author SHA1 Message Date
Serban Stanca
254eb70a9d Revert "Bug 1899960 - P2: Imply an unavailable state if focusable is in unavailable subtree. r=Jamie" for casuing junit failures.
This reverts commit 5906bff6eb.

This reverts commit f491f2de6e.

This reverts commit 047d7acfa2.
2025-05-23 22:39:55 +00:00
Eitan Isaacson
5906bff6eb Bug 1899960 - P2: Imply an unavailable state if focusable is in unavailable subtree. r=Jamie
I decided not to use aria-disabled directly because we currently don't
cache it in the parent, and I don't think the benefit would be great
enough.

Differential Revision: https://phabricator.services.mozilla.com/D250357
2025-05-23 19:09:23 +00:00
Eitan Isaacson
f491f2de6e Bug 1899960 - P1: Don't cache implicit states. r=Jamie
This also removes some duplication and unifies the logic we use for
states that are calculated from other ones.

Differential Revision: https://phabricator.services.mozilla.com/D250356
2025-05-23 19:09:19 +00:00
Atila Butkovits
f645ec7ded Revert "Bug 1899960 - P2: Imply an unavailable state if focusable is in unavailable subtree. r=Jamie" for causing Geckoview failures.
This reverts commit d4794289e7.

Revert "Bug 1899960 - P1: Don't cache implicit states. r=Jamie"

This reverts commit dd5d2cd561.

Revert "Bug 1967813 - Check menu's frame IsOpen to determine if menu is active. r=morgan"

This reverts commit 2d6a0f17e3.
2025-05-22 23:36:44 +00:00
Eitan Isaacson
d4794289e7 Bug 1899960 - P2: Imply an unavailable state if focusable is in unavailable subtree. r=Jamie
I decided not to use aria-disabled directly because we currently don't
cache it in the parent, and I don't think the benefit would be great
enough.

Differential Revision: https://phabricator.services.mozilla.com/D250357
2025-05-22 20:15:23 +00:00
Eitan Isaacson
dd5d2cd561 Bug 1899960 - P1: Don't cache implicit states. r=Jamie
This also removes some duplication and unifies the logic we use for
states that are calculated from other ones.

Differential Revision: https://phabricator.services.mozilla.com/D250356
2025-05-22 20:15:19 +00:00
Eitan Isaacson
77a5fc0c85 Bug 1867044 - Fire name change for xul labels. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D248979
2025-05-15 19:18:00 +00:00
Eitan Isaacson
18c81c366f Bug 1467382 - Support aria-keyshortcuts. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D246695
2025-04-29 16:42:31 +00:00
David Shin
40e6a5c66e Bug 1923959: Resolve anchor for margins. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D240863
2025-04-08 02:29:18 +00:00
Edgar Chen
c111b0a57c Bug 1934246 - Get rid of dom.popup.experimental; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D242688
2025-03-24 16:15:49 +00:00
Morgan Rae Reschenberg
0d750ce645 Bug 1950235: Add markers to PlatformShowHideEvent call sites r=bdekoz
Differential Revision: https://phabricator.services.mozilla.com/D239457
2025-03-10 20:11:00 +00:00
Morgan Rae Reschenberg
766d0df3f6 Bug 1950235: Add PerfStats markers for medium and low priority non-platform-specific code r=bdekoz
Differential Revision: https://phabricator.services.mozilla.com/D239446
2025-03-10 20:11:00 +00:00
Cristian Tuns
e9b5bd777c Backed out 2 changesets (bug 1950235) for causing build bustages in LocalAccessible.cpp CLOSED TREE
Backed out changeset a7ee39abfd2a (bug 1950235)
Backed out changeset f1de564abb08 (bug 1950235)
2025-03-03 20:57:45 -05:00
Morgan Rae Reschenberg
0006dac68c Bug 1950235: Add markers to PlatformShowHideEvent call sites r=bdekoz
Differential Revision: https://phabricator.services.mozilla.com/D239457
2025-03-04 00:42:26 +00:00
Morgan Rae Reschenberg
961806856f Bug 1950235: Add PerfStats markers for medium and low priority non-platform-specific code r=bdekoz
Differential Revision: https://phabricator.services.mozilla.com/D239446
2025-03-04 00:42:25 +00:00
Eitan Isaacson
7991e8091e Bug 1912520 - Morph aria-owns to controls relationship when container is combobox. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D236931
2025-02-07 00:47:55 +00:00
Nathan LaPre
b44ba6655f Bug 1938958: Set kMaxAccsPerMessage to 1000, send once one batch is full, r=Jamie
This revision modifies AppendMutationEventData such that it can actually send
mutation event batches over IPC. Previously, we were waiting for massive batches
of mutation events before sending, which leaves the parent process with little
to do until it receives one big message. While more efficient from the content
and parent process' perspective individually, the overall load time of pages
suffered from having such large batch sizes sent after all mutation events have
been calculated. The overall page load time benefits from having both content
and parent processes execute accessibility-related tree building code in
parallel, even though there is some inefficiency associated with interrupting
tree-building to serialize, send, and receive an IPC message more often.

After performance testing, we've found that we can accumulate Accessibles in
events up to a reasonable max before sending the batch. From testing, 1000 looks
like a good number. This gives us big performance wins for loading pages, while
maintaining our performance in fast-mutating pages.

Differential Revision: https://phabricator.services.mozilla.com/D235515
2025-02-05 23:54:40 +00:00
James Teh
2d1f7bfece Bug 1942887: When building the a11y viewport cache, skip inline frames that aren't the primary frame. r=morgan
Otherwise, an inline element might match before some of its text when hit testing.
See the code comments for details.

Differential Revision: https://phabricator.services.mozilla.com/D236309
2025-02-05 01:49:39 +00:00
James Teh
c27eb29aff Bug 1938624 part 5: Remove Accessible::InputType, which is now unused. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D233325
2025-02-03 01:47:44 +00:00
Alexandru Marc
6ac9f66aa8 Backed out 5 changesets (bug 1938624) for causing multiple perma failures CLOSED TREE
Backed out changeset 7d0d375749dd (bug 1938624)
Backed out changeset d94f65a880a8 (bug 1938624)
Backed out changeset b5eb92a5953f (bug 1938624)
Backed out changeset 90842ecb4293 (bug 1938624)
Backed out changeset 7c0e1419e6b5 (bug 1938624)
2025-01-29 11:33:36 +02:00
James Teh
7e0c702662 Bug 1938624 part 5: Remove Accessible::InputType, which is now unused. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D233325
2025-01-29 04:30:52 +00:00
Eitan Isaacson
b389ad5fbb Bug 1942413 - Fix EDITABLE state updates for descendants of a contentEditable. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D234768
2025-01-23 16:36:56 +00:00
Morgan Rae Reschenberg
6832a448b8 Bug 1931814: Always send the viewport cache, even if it is empty r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D234263
2025-01-22 21:44:01 +00:00
Morgan Rae Reschenberg
4b619892e7 Bug 1941683: Update the viewport cache when a CacheDomain::APZ update happens r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D234256
2025-01-22 21:44:00 +00:00
Eitan Isaacson
f45fd502c0 Bug 1934489 - P2: Update scroll position on CSS overflow change in each axis. r=morgan
The way the code was written it would expect a uniform overflow style
for both x and y. We need to make sure to handle each axis separately.

Differential Revision: https://phabricator.services.mozilla.com/D231997
2024-12-18 23:10:09 +00:00
Eitan Isaacson
901bc7516d Bug 1934489 - P1: Update ScrollPosition cache when "scrollable" element has no scrollable frame. r=morgan
A document's body element can lose its scroll frame if the root element (eg. <html>) is restyled to overflow scroll/auto. In that case we will not get any useful notifications for the body element except for a reframe to a non-scrolling frame.

The place where we see this as a problem is in hit testing because
accessibles get erroneously clipped out because of stale scroll
positions.

Differential Revision: https://phabricator.services.mozilla.com/D231821
2024-12-18 23:10:08 +00:00
Nathan LaPre
93ff9682eb Bug 1774918: Consolidate accessibility mutation events in fewer IPC messages, r=Jamie,geckoview-reviewers,m_kato
This revision modifies the way that ProcessMutationEvents works. Rather than
firing mutation events immediately, it instead causes them to be queued on
DocAccessibleChild via HandleAccEvent. The code then fires the events in batches
with a new IPC method, SendMutationEvents. The net effect of this change is a
significant reduction in pressure on the IPC system, in favor of fewer, larger
messages. For pages that generate many mutation events often, this represents a
big win for performance. Without this, the IPC queue can get backed up, failing
to keep up with the amount of accessibility IPC messages as they flood in.

The method of batching is carefully written to maximize the amount of
accessibles that can be touched in a mutation event batch without going
over the IPC message size limit. This revision does not implement size
tracking, but does make a reasonable approximation. With these changes,
heterogenous mutation event types can sit together in batches, including
sub-batches of show events. A side effect of this change is that initial
page load is further amalgamated; multiple document children that
produce separate calls to InsertIntoIpcTree now use this queueing
mechanism and can have their show events sent together.

Some messages may fire differently from their former ordering with this change,
particularly EVENT_MENUPOPUP_END for content processes. However, that event
appears to have been fired out of order with the existing code, meaning
that this change represents a fix to that ordering issue as well.

Finally, this revision makes a slight modification to an Android test
for clarity and correctness. I discovered this issue while debugging
event ordering and realized it was valuable to fix.

Differential Revision: https://phabricator.services.mozilla.com/D229842
2024-12-18 20:53:52 +00:00
James Teh
b8f1e1a37e Bug 1794780: Don't expose group position attributes in Accessible::Attributes. r=eeejay
Windows screen readers must call IAccessible2::attributes for every show or text inserted event in order to determine whether the inserted content is within a live region, since this is only exposed via an object attribute.
These attributes include group position attributes: posinset, setsize and level.
When thousands of items are being inserted into a container such as a list, these queries can become expensive, even despite some of the information being cached.
For IA2, including group position attributes is redundant in most cases, since there is a dedicated IAccessible2::groupPosition property for this purpose.

Similarly, Mac code sometimes calls Accessible::Attributes, but it never uses the group position attributes, since it can use Accessible::GroupPosition() instead.
That said, I don't know of a case where this is actually a problem in practice on mac.

To address this:

1. No longer return group position attributes in Accessible::Attributes.
2. XPCOM clients, including tests and DevTools, still depend on these attributes, so update xpcAccessible::GetAttributes to include them.
3. ATK has no dedicated group position query, so update the ATK code to include these attributes too.
4. On Android, we could call GroupPosition directly, but it's easier to just pass AccAttributes to AccessibleWrap::GetRoleDescription, so include these attributes there too.
5. As an exception, IA2 requires the level attribute for headings, so include them just for roles::HEADING.

Differential Revision: https://phabricator.services.mozilla.com/D231653
2024-12-18 06:01:37 +00:00
Eitan Isaacson
97afec1c14 Bug 1769586 - P3: Rename IDRefsIterator AssociatedElementsIterator. r=Jamie
The iterator uses both explicitly set element attributes and content attributes
with IDs to iterate over all associated elements

Differential Revision: https://phabricator.services.mozilla.com/D215688
2024-11-29 03:26:35 +00:00
Eitan Isaacson
22d305c374 Bug 1769586 - P2: Implement a11y support of ARIA element reflection. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D209768
2024-11-29 03:26:35 +00:00
Morgan Rae Reschenberg
298696a753 Bug 1899658: Cache visual viewport offset and consider it in bounds calculation. r=nlapre,botond,Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D228266
2024-11-23 08:55:19 +00:00
Norisz Fay
067619a122 Backed out changeset 17c06ee2f513 (bug 1899658) for causing bustages on RootAccessible.cpp CLOSED TREE 2024-11-23 06:58:50 +02:00
Morgan Rae Reschenberg
625470f083 Bug 1899658: Cache visual viewport offset and consider it in bounds calculation. r=nlapre,botond,Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D228266
2024-11-23 02:03:11 +00:00
Alexandru Marc
c71ae69095 Backed out 4 changesets (bug 1769586) for causing wpt failures @ property-reflection.html. CLOSED TREE
Backed out changeset dc6aa76ec6c5 (bug 1769586)
Backed out changeset d9ff02e6c435 (bug 1769586)
Backed out changeset 446faf4cccab (bug 1769586)
Backed out changeset 49f68df69db0 (bug 1769586)
2024-11-21 10:50:49 +02:00
Eitan Isaacson
130e5ed0cf Bug 1769586 - P3: Rename IDRefsIterator AssociatedElementsIterator. r=Jamie
The iterator uses both explicitly set element attributes and content attributes
with IDs to iterate over all associated elements

Differential Revision: https://phabricator.services.mozilla.com/D215688
2024-11-21 04:39:14 +00:00
Eitan Isaacson
4191ad46a5 Bug 1769586 - P2: Implement a11y support of ARIA element reflection. r=Jamie
Depends on D209767

Differential Revision: https://phabricator.services.mozilla.com/D209768
2024-11-21 04:39:13 +00:00
James Teh
111d3bdf4b Bug 1930322 part 4: Use LocalAccessible::RelativeBounds to calculate the coordinates in LocalAccessible::DispatchClickEvent. r=morgan
Previously, we used the primary frame.
This was problematic for image map areas because they don't have a frame, so we were always using the top left of the entire image.
RelativeBounds has been overridden for image map areas to correctly calculate coordinates.
Therefore, rather than special casing image map areas again, use RelativeBounds in DispatchClickEvent.

Differential Revision: https://phabricator.services.mozilla.com/D229300
2024-11-20 04:13:49 +00:00
James Teh
6a83734c0d Bug 1930322 part 2: cleanup: Use NS_NewRunnableFunction instead of an inline Runnable subclass. r=morgan
This just improves readability.
There should be no functional change except that I gave this Runnable a proper name while I was at it.

Differential Revision: https://phabricator.services.mozilla.com/D229298
2024-11-20 04:13:48 +00:00
James Teh
8f0cff7edd Bug 1930322 part 1: cleanup: Remove aContent argument to LocalAccessible::DoCommand/DispatchClickEvent. r=morgan
We never set this argument to anything other than the default, which meant it always used the LocalAccessible's mContent.
This makes the argument unnecessary and potentially confusing in an area which is already a bit difficult to follow, so just remove it.
There should be no functional change.

Differential Revision: https://phabricator.services.mozilla.com/D229297
2024-11-20 04:13:48 +00:00
Alexandru Marc
634f6d5c47 Backed out 4 changesets (bug 1769586) for causing multiple failures.
Backed out changeset 1125ec697fdd (bug 1769586)
Backed out changeset ced88b84eef3 (bug 1769586)
Backed out changeset 486c9854c11d (bug 1769586)
Backed out changeset f543f54d90a0 (bug 1769586)
2024-11-19 19:10:30 +02:00
Eitan Isaacson
4b4d801550 Bug 1769586 - P3: Rename IDRefsIterator AssociatedElementsIterator. r=Jamie
The iterator uses both explicitly set element attributes and content attributes
with IDs to iterate over all associated elements

Differential Revision: https://phabricator.services.mozilla.com/D215688
2024-11-19 15:02:18 +00:00
Eitan Isaacson
98723b9747 Bug 1769586 - P2: Implement a11y support of ARIA element reflection. r=Jamie
Depends on D209767

Differential Revision: https://phabricator.services.mozilla.com/D209768
2024-11-19 15:02:18 +00:00
Eitan Isaacson
49b31bd5ad Bug 1440950 - Remove unslotted subtree even when its root has no accessible. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D228101
2024-11-06 22:31:09 +00:00
Ryan VanderMeulen
5b997974cd Backed out 3 changesets (bug 1769586) for causing Bug 1920082.
Backed out changeset d684010261d6 (bug 1769586)
Backed out changeset b3264bc533e2 (bug 1769586)
Backed out changeset 049fd286ce0f (bug 1769586)
2024-10-17 16:44:16 -04:00
Timothy Nikkel
b085c602d2 Bug 1923790. Skip a matrix PostTranslate in GetResultingTransformMatrix when it's useless. r=gfx-reviewers,layout-reviewers,lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D225169
2024-10-16 09:52:03 +00:00
Olli Pettay
f1b3788478 Bug 1911736 - Enable dom.popup.experimental on Nightly, r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D225518
2024-10-15 19:06:51 +00:00
Iulian Moraru
44d79db71d Backed out 4 changesets (bug 1923790) for causing mass assertion failures. CLOSED TREE
Backed out changeset c77fbdd69b94 (bug 1923790)
Backed out changeset f81a6af120f5 (bug 1923790)
Backed out changeset 776dcd89f572 (bug 1923790)
Backed out changeset d68b9d899217 (bug 1923790)
2024-10-14 16:49:58 +03:00
Timothy Nikkel
8ceb94b19c Bug 1923790. Skip a matrix PostTranslate in GetResultingTransformMatrix when it's useless. r=gfx-reviewers,layout-reviewers,lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D225169
2024-10-14 10:43:06 +00:00
Nathan LaPre
979ac48d59 Bug 1922691: Avoid crash in BundleFieldsForCache with null check on mBounds, r=Jamie
This revision adds a null check on mBounds in BundleFieldsForCache, in order to
avoid crashing in release when mBounds is empty.

Differential Revision: https://phabricator.services.mozilla.com/D225273
2024-10-11 17:31:13 +00:00
David Shin
1fad4eeb43 Bug 1900232: Part 4 - Add anchor-size() to margin properties. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D222533
2024-09-23 13:58:38 +00:00