Commit Graph
212 Commits
Author SHA1 Message Date
James Teh d1b0c09a01 Bug 2022104: Process initial aria-owns relocations as part of the initial tree build. r=eeejay
Previously, DoInitialUpdate built the initial tree and sent it over IPC.
aria-owns relocations were processed later in WillRefresh.
This caused two problems.
First, it meant that we sent the initial tree over IPC and then immediately sent a bunch of mutations for the aria-owns relocations, as well as firing client events for those mutations, which is wasteful.
Second, because tagged PDF generation only performs the initial update and expects the document to be completely ready thereafter, this meant that our tagged PDF output didn't take aria-owns into account.

To fix this, process the initial aria-owns relocations as part of DoInitialUpdate, before we send the tree over IPC.
We don't want to queue mutation events as part of this, as this would be redundant and break IPC expectations.
To avoid that, we set eTreeConstructed after processing relocations and avoid queuing events in various places if that flag isn't set.

Differential Revision: https://phabricator.services.mozilla.com/D286838
2026-03-21 00:18:13 +00:00
Sylvestre Ledru eafe8b152d Bug 2023419 - Remove Emacs/Vim modelines from accessible/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287834
2026-03-18 10:29:47 +00:00
Serban Stanca 5a709d4a9a Revert "Bug 2023419 - Remove Emacs/Vim modelines from accessible/ r=emilio" for causing mochitests failures in browser_action.js.
This reverts commit 2fa4815c8d.
2026-03-17 15:34:26 +00:00
Sylvestre Ledru 2fa4815c8d Bug 2023419 - Remove Emacs/Vim modelines from accessible/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287834
2026-03-17 09:21:51 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00
serge-sans-paille e98adca292 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 15:05:17 +00:00
Cristina Horotan aab924e90d Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing build bustage at nsBrowserApp.cpp
This reverts commit fd0ffa193c.
2025-10-21 10:44:13 +00:00
serge-sans-paille fd0ffa193c Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 09:44:11 +00:00
Narcis Beleuzu e1e6bbb1c9 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing bustages on Document.cpp
This reverts commit b23c15e927.
2025-10-21 06:34:58 +00:00
serge-sans-paille b23c15e927 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 06:01:36 +00:00
James Teh 85fb355c64 Bug 1974131: If there is a pending accessibility tree update, process an anchor jump after the tree is updated. r=morgan
Previously, if there was an anchor jump to a DOM node that wasn't yet rendered in the accessibility tree, we could fail in one of two ways:

1. If none of the target's ancestors (other than the document itself) were in the accessibility tree, we wouldn't fire a scrolling start event until the document was next re-focused.
2. If the target did have a container already in the accessibility tree, we would fire a scrolling start event on the container, which might effectively be a long way from the target.

To fix this, if there is a pending tree update, process the anchor jump only after the tree is up to date (in WillRefresh).
As part of this, anchor jump processing has been refactored into a single, unified function.
Aside from avoiding additional code duplication, this ensures that anchor jump handling is consistent going forward, as there are quite a few subtle details to get right which have bitten us in the past; e..g bug 1926198.

Differential Revision: https://phabricator.services.mozilla.com/D255274
2025-06-30 23:58:12 +00:00
Emilio Cobos Álvarez cd5c811fe0 Bug 1959927 - Turn layout into a regular render phase. r=dshin
Run it in the right step of the rendering loop as per spec. Keep
the interruptible layout behavior by detecting whether we have any
frame with content-visibility: auto / ResizeObserver / etc around.

Also make the IntersectionObserver phase not unconditional, make it
conditional on needing layout or having scrolled.

I want to look a bit whether we can avoid flushing the whole browsing
context tree, but that is pre-existing so not touching it as part of
this work.

Differential Revision: https://phabricator.services.mozilla.com/D245214
2025-04-14 10:15:13 +00:00
James Teh 510cf177bc Bug 1951720: Don't exclude 0 width whitespace text nodes from the accessibility tree if they're at the end of a wrapped line. r=morgan
In bug 1951067, I pruned all 0 width whitespace text nodes from the accessibility tree.
However, it turns out that whitespace text nodes at the end of wrapped lines can also be 0 width.
These have semantic importance, since otherwise, words in separate inline nodes can be merged together without a space.
To fix this, explicitly check that the node is before a hard line break, not a soft (wrapped) line break.

Differential Revision: https://phabricator.services.mozilla.com/D242290
2025-03-21 02:15:18 +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
James Teh 33f663a00c Bug 1951067: Don't include invisible whitespace text nodes in the accessibility tree. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D240001
2025-03-04 05:19:36 +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 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
Nazım Can Altınova ff6637364b Bug 1799109 - Replace AUTO_PROFILER_MARKER_TEXT markers without a text with the new untyped one r=profiler-reviewers,florian
Differential Revision: https://phabricator.services.mozilla.com/D238121
2025-02-27 21:45:18 +00:00
James Teh 6d64eda0aa Bug 1948375: After sending all mutation events for a tick to the parent process, defer accessibility updates until we receive an ACK from the parent process. r=nlapre
See the code comments in NotificationController::WillRefresh for explanation.

Differential Revision: https://phabricator.services.mozilla.com/D238585
2025-02-19 21:49:24 +00:00
Jens Stutte 5eb5987ffa Bug 1948736 - Move the global impending shutdown flag to AppShutdown. r=xpcom-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D238522
2025-02-18 08:18:58 +00:00
Morgan Rae Reschenberg cbf1d07b5e Bug 1919688: Add perfstats marker for NotificationController::CoalesceMutationEvents funciton r=bdekoz
Differential Revision: https://phabricator.services.mozilla.com/D237650
2025-02-13 23:39:50 +00:00
Florian Quèze 01c4e86ebd Bug 1935420 - Migrate histograms to use Glean APIs for A11Y_*, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D235342
2025-01-27 13:47:11 +00:00
Eitan Isaacson 9adac39ab9 Bug 682811 - Fire alert/menu events on subtree insertion/deletion. r=nlapre
I placed them in a way that will ensure the correct order of events and
not allow menu start or alert events to get fired before the show, and
not allow menu end events to fire after the hide.

Differential Revision: https://phabricator.services.mozilla.com/D235188
2025-01-23 22:19:32 +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
Eitan Isaacson b635145c89 Bug 1919087 - Defer PushNameOrDescriptionChange to WillRefresh tick. r=Jamie
Since the method is deferred we need to do extra guesswork for possible
situtations where the name has changed because we don't have the
privilege to calculate the name in-line when content is deleted.

I tried to account for all cases as we have in our test coverage. I
hope that if there are edge cases they are false positives, and we are
firing extra name changes and not the opposite.

Differential Revision: https://phabricator.services.mozilla.com/D223877
2024-10-17 04:46:20 +00:00
Stanca Serban f08d898483 Backed out changeset cbbe203e630b (bug 1919087) for causing build bustages in EventQueue.cpp. CLOSED TREE 2024-10-16 00:51:51 +03:00
Eitan Isaacson 9fafa7208a Bug 1919087 - Defer PushNameOrDescriptionChange to WillRefresh tick. r=Jamie
Since the method is deferred we need to do extra guesswork for possible
situtations where the name has changed because we don't have the
privilege to calculate the name in-line when content is deleted.

I tried to account for all cases as we have in our test coverage. I
hope that if there are edge cases they are false positives, and we are
firing extra name changes and not the opposite.

Differential Revision: https://phabricator.services.mozilla.com/D223877
2024-10-15 20:21:06 +00:00
James Teh 5b0958aae4 Bug 1897349: Don't update CSS pseudo-element TextLeafAccessibles if there is CSS content alt text. r=eeejay
When we create a TextLeafAccessible for a CSS pseudo-element, we already use the alt text if present.
However, it seems layout sometimes re-renders the text of pseudo-elements.
Previously, a11y would update the text in this case like it would for any other TextLeafAccessible, thus overwriting the alt text with the text rendered by layout.
To fix this, we now skip updating text if CSS alt text is present.

Differential Revision: https://phabricator.services.mozilla.com/D211139
2024-05-22 22:14:33 +00:00
Emilio Cobos Álvarez 0a1d2b49ff Bug 1895870 - Simplify refresh driver observer set-up. r=smaug
There's no call to AddRefreshObserver(FlushType::Layout), so we don't
need to track layout flushes. The only reason we need
mLayoutFlushObservers is so that reflows triggered from the style flush
get processed. But at that point, we can just flush layout directly.

There's no really good distinction between style flushes and layout
flushes with container queries anyways, so this makes the code simpler
to reason about.

Differential Revision: https://phabricator.services.mozilla.com/D209924
2024-05-14 08:12:03 +00:00
James Teh 80f5973772 Bug 1834718: Don't process a duplicate DocAccessible::ContentRemoved call for a DOM node we've already processed. r=morgan
ContentRemoved recursively walks both AllChildrenIterator and direct DOM children.
In addition, we might get duplicate notifications from DOM and layout, plus PruneOrInsertSubtree might do a recursive walk and it too calls ContentRemoved.
To avoid this duplicate processing, keep a set of removed DOM nodes on the DocAccessible which we clear after mutation events are processed.

Differential Revision: https://phabricator.services.mozilla.com/D196707
2023-12-20 21:59:41 +00:00
Jens Stutte a9b77464aa Bug 1839051 - Make AccIdxComparator resilient against calls with r=Jamie=b.
std::sort used by nsTArray::Sort expects the comparator to be tolerant
for being called to compare the very same element with itself.

Differential Revision: https://phabricator.services.mozilla.com/D195482
2023-12-11 06:53:28 +00:00
Daniel Holbert 6e38919bf1 Bug 1867886: Ensure that NotificationController can't re-register with the refresh driver after it's been unregistered in Shutdown. r=eeejay
This is just a "belt-and-suspenders" invariant tightening.  Shouldn't impact
behavior at all, assuming that we don't call methods on NotificationController
objects that have been nerfed with Shutdown().

Differential Revision: https://phabricator.services.mozilla.com/D195321
2023-12-04 20:42:05 +00:00
Daniel Holbert f0d8e9467b Bug 1867358 part 4: Add some release asserts (and upgrade an existing assert), to validate that NotificationController isn't still registered as a refresh observer when it's destroyed. r=eeejay
If these assertions somehow fail, then we are probably doomed to crash anyway.
The new release assertions just make it so we'll crash in a controlled way,
with a more actionable backtrace, closer to the problem-spot.

This patch also removes one mDocument null-check that's becoming redundant
since it follows a release-assert that would make us abort if the pointer is
null.

Differential Revision: https://phabricator.services.mozilla.com/D195042
2023-12-01 17:18:24 +00:00
Daniel Holbert 2db33fc30d Bug 1867358 part 3: Adjust NotificationController to avoid modifying mObservingState after Shutdown has been called. r=eeejay
We can sometimes reach the code that this patch is touching, just we've been
shutdown (as can be seen by the fact that we have a null mDocument pointer); in
that case, it's problematic for us to be assigning 'mObservingState' here. The
mObservingState assignment is meant to be *undoing* the temporary assignments
earlier in the function, but in this post-Shutdown situation, it's actually
causing us to forget that we already unregistered as a refresh observer, in a
nested stack level's call to Shutdown().

I think this one place is the only mObservingState assignment that's got this
problem. The other mObservingState assignments should all be OK (they don't
need a "have we shut down" check), because they're all either:
a) modifying mObservingState to record an actual change that we just made to
our RefreshDriver registration,
...or:
b) immediately adjacent to code that dereferences mDocument, implying that
mDocument is known-to-be-non-null at that point, which means we know we haven't
been Shutdown.

This patch unblocks us from adding a release assert in the
NotificationController destructor in the next patch in this series. (Without
this patch, that assertion can be made to fail, via this inadvertent
mObservingState assignment.)

Depends on D195041

Differential Revision: https://phabricator.services.mozilla.com/D195200
2023-12-01 17:18:23 +00:00
Daniel Holbert c93b025913 Bug 1867358 part 1: Fix up unbraced single-line if-statements in NotificationController and its superclass. r=eeejay
This patch has no functional change; it's just some trivial fixups to align
with with Mozilla C++ coding style.

Differential Revision: https://phabricator.services.mozilla.com/D195040
2023-12-01 17:18:22 +00:00
Natalia Csoregi 291f10e001 Backed out 3 changesets (bug 1867358) as per request. CLOSED TREE
Backed out changeset 0ce8fcf63e62 (bug 1867358)
Backed out changeset 6d9bf8dfbb4d (bug 1867358)
Backed out changeset e995a2b2ff4d (bug 1867358)
2023-11-30 07:09:25 +02:00
Daniel Holbert d7e00708f1 Bug 1867358 part 3: Add some release asserts (and upgrade an existing assert), to validate that NotificationController isn't still registered as a refresh observer when it's destroyed. r=eeejay
If these assertions somehow fail, then we are probably doomed to crash anyway.
The new release assertions just make it so we'll crash in a controlled way,
with a more actionable backtrace, closer to the problem-spot.

This patch also removes one mDocument null-check that's becoming redundant
since it follows a release-assert that would make us abort if the pointer is
null.

Depends on D195041

Differential Revision: https://phabricator.services.mozilla.com/D195042
2023-11-29 23:32:23 +00:00
Daniel Holbert b8a9cf8bd1 Bug 1867358 part 1: Fix up unbraced single-line if-statements in NotificationController and its superclass. r=eeejay
This patch has no functional change; it's just some trivial fixups to align
with with Mozilla C++ coding style.

Differential Revision: https://phabricator.services.mozilla.com/D195040
2023-11-29 23:32:22 +00:00
James Teh b9d8bf905e Bug 1771579 part 1: Process text leaf updates in the order in which they were received from layout. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D191815
2023-10-26 22:37:22 +00:00
Eitan Isaacson 3f95e6d57a Bug 1754905 - Match Pivot API in nsIAccessiblePivot. r=Jamie
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
   with something that is much more similar to the native Pivot
   interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
   xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.

Differential Revision: https://phabricator.services.mozilla.com/D181813
2023-06-28 21:45:16 +00:00
Nathan LaPre 58e974f65a Bug 1838752: Handle other event types in DropMutationEvent,r=eeejay
This revision updates DropMutationEvent such that it handles other event
types besides REORDER, HIDE, and SHOW. If we somehow put a different event
type through this function (particularly an inner reorder, which indicates
a reorder event that's already been dropped), we should (and now do) handle
it more gracefully.

Differential Revision: https://phabricator.services.mozilla.com/D182218
2023-06-28 19:14:55 +00:00
Iulian Moraru 2cdfa8bd32 Backed out changeset f3095da827d9 (bug 1754905) for causing build bustages on DocAccessibleWrap. CLOSED TREE 2023-06-28 03:03:37 +03:00
Eitan Isaacson 1cb554dcd7 Bug 1754905 - Match Pivot API in nsIAccessiblePivot. r=Jamie
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
   with something that is much more similar to the native Pivot
   interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
   xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.

Differential Revision: https://phabricator.services.mozilla.com/D181813
2023-06-27 16:59:54 +00:00
Eitan Isaacson 5504aa2091 Bug 1834874 - P2: Remove DocAccessiblePlatformExt. r=Jamie,ipc-reviewers,mccr8
Since we removed the last dependency on this subprotocol, we can now
remove it.

Differential Revision: https://phabricator.services.mozilla.com/D181321
2023-06-20 18:15:43 +00:00
Nathan LaPre 8571f688ad Bug 1837315: Avoid queueing a hide event on an accessible that's already being moved, r=Jamie
If we move an accessible via an aria-owns relocation on a grandparent, then move
it again via an aria-owns relocation on a parent, we can end up with multiple
hide events in the queue: one for the shallowest hide (of the grandparent), and
one for the hide of the grandchild accessible. We can't always coalesce (drop)
the hide event of the grandchild since the first move severs the relationship
between its parent and its grandparent. To address this, this revision stops us
from queueing a hide event on an accessible that's already being moved. This
revision also adds a test to verify we're getting the proper events.

Differential Revision: https://phabricator.services.mozilla.com/D180888
2023-06-15 23:12:00 +00:00
James Teh 446bf3da6e Bug 1821956 part 6: Remove event deferral and sync text change events from Windows PDocAccessible. r=nlapre
We only needed to defer events because of the need to wait for a parent COM proxy.
Similarly, sync text change events (as opposed to async) were only necessary with the COM proxy architecture.
Now that there are no COM proxies, neither of these are necessary.

Differential Revision: https://phabricator.services.mozilla.com/D177899
2023-05-21 22:23:47 +00:00
James Teh a8c3928847 Bug 1821956 part 4: Remove COM proxy, HWND and MSAA id code from PDocAccessible. r=nlapre
All of this is only used to support content process COM proxies.

Differential Revision: https://phabricator.services.mozilla.com/D177897
2023-05-21 22:23:47 +00:00
James Teh ddfdb64368 Bug 1821955 part 5: Change all CtW pref checks to use a11y::IsCacheActive. r=eeejay,taskgraph-reviewers,bhearsum
This was done using the following script:

```
matchingFiles=`git grep -l accessibility_cache_enabled`
sed -i 's/StaticPrefs::accessibility_cache_enabled_AtStartup/a11y::IsCacheActive/' $matchingFiles
for f in $matchingFiles; do
  usesA11yPref=
  grep -q StaticPrefs::accessibility_ $f && usesA11yPref=1
  hasA11yInclude=
  grep -q 'nsAccessibilityService.h' $f && hasA11yInclude=1
  if [ -z $usesA11yPref ] && [ -z $hasA11yInclude ]; then
    sed -i 's,mozilla/StaticPrefs_accessibility.h,nsAccessibilityService.h,' $f
  elif [ -z $usesA11yPref ] && [ $hasA11yInclude ]; then
    sed -i '/"mozilla.StaticPrefs_accessibility.h"/d' $f
  elif [ $usesA11yPref ] && [ -z $hasA11yInclude ]; then
    sed -i '/"mozilla.StaticPrefs_accessibility.h"/a#include "nsAccessibilityService.h"' $f
  fi
done
```

Differential Revision: https://phabricator.services.mozilla.com/D177722
2023-05-19 02:56:48 +00:00
James Teh 69d9ca1161 Bug 1824064: When cleaning up a11y mutation events, clear the next pointer as well as the previous pointer to reduce pressure on the cycle collector. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D173503
2023-03-27 18:16:32 +00:00