Commit Graph

10148 Commits

Author SHA1 Message Date
Morgan Rae Reschenberg
f7de79f06d Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-09-14 17:47:43 +00:00
Morgan Rae Reschenberg
d143da6750 Bug 1788547: Null check table acc exists before firing styling changed event, add assert for debugging r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156987
2022-09-13 19:57:53 +00:00
Nathan LaPre
b5c69b9980 Bug 1788143 - Rely on selection state to determine combo box value, r=Jamie
Previously, we were not firing active state change events for the options in
<select> elements when the drop-down was expanded. This leads to possibly-stale
cached 'active' state in the parent process, which can cause Firefox to report
incorrect combo box values based on stale state. Rather than fire more 'active'
state change events to fix the problem, this revision addresses the problem by
not firing 'active' state change events for combo boxes at all, and instead
relying on the selection state when determining the combo box value in the
parent process. This revision also adds a test to verify that the behavior is
as expected.

Differential Revision: https://phabricator.services.mozilla.com/D156627
2022-09-13 16:18:52 +00:00
James Teh
640af21671 Bug 1789750: Don't try to get a COM proxy in Windows RemoteAccessible when the cache is disabled. r=nlapre
For methods supported by the cache, we already delegate to RemoteAccessibleBase where the caching implementation lives.
However, there are still some less used methods which aren't supported by the cache yet.
These methods are never called by the code which Windows a11y clients interact with (MsaaAccessible and friends).
However, they can be called from XPCOM; e.g. when using the Browser Console.
For now, just early return in these cases so we don't crash.
Eventually, we'll need to unify these methods and support them with the cache enabled.

Differential Revision: https://phabricator.services.mozilla.com/D156771
2022-09-09 01:44:52 +00:00
James Teh
fbc63fb814 Bug 1789790: 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/D156810
2022-09-08 23:47:37 +00:00
James Teh
ea7dd2e2cd Bug 1789396: Null check acc before calling AsLocal() in RemoteAccessibleBase::BoundsWithOffset. r=morgan
We expect acc to be a local OuterDocAccessible.
However, the OuterDocAccessible might die before the top level DocAccessibleParent, in which case acc will be null.
In this case, the DocAccessibleParent is about to die anyway, so it doesn't matter that the bounds we return are slightly wrong (since they can't take the OuterDoc into account).

Differential Revision: https://phabricator.services.mozilla.com/D156773
2022-09-08 23:47:01 +00:00
Daniel Holbert
61d63a37b0 Bug 1789903: Remove unused member-var AccMutationEvent::mNode. r=morgan
This variable was supposed to be removed long ago in bug 813019, but the
declaration was left behind by accident, it seems.

Differential Revision: https://phabricator.services.mozilla.com/D156879
2022-09-08 19:04:10 +00:00
criss
be23bbe9af Merge mozilla-central to autoland on a CLOSED TREE 2022-09-08 00:23:23 +03:00
Ryan VanderMeulen
d7d5c89ee7 Backed out changeset e8354032aaf6 (bug 1787274) for being the likely cause of Fenix & Focus UI test bustage. 2022-09-07 13:41:40 -04:00
Olli Pettay
93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Morgan Rae Reschenberg
c2cd0ee189 Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-09-06 21:00:29 +00:00
Morgan Rae Reschenberg
ec1c2a165e Bug 1787282: [Part 2] Cache LINKS_TO relation information r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156138
2022-09-06 19:27:17 +00:00
Morgan Rae Reschenberg
c8469d0ad8 Bug 1787282: [Part 1] Modify relations caching infrastructure for rels with no implicit partner r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156126
2022-09-06 19:27:16 +00:00
James Teh
41073adfb6 Bug 1787692: Partially support ISimpleDOMNode::nodeInfo for cached RemoteAccessibles. r=morgan
JAWS won't expose MathML without this.
We can't fully support it; we don't cache info about namespaces, for example.
However, this implementation is enough to get MathML working with JAWS.

Differential Revision: https://phabricator.services.mozilla.com/D156150
2022-09-05 04:30:44 +00:00
Morgan Rae Reschenberg
956c373882 Bug 1788597: Null check acc before creating cache update r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D156230
2022-09-02 16:53:47 +00:00
Eitan Isaacson
3774262195 Bug 1788132 - Introduce TextLeafPoint::IsParagraphStart. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156025
2022-08-31 20:52:46 +00:00
Eitan Isaacson
96c72183cc Bug 1788116 - Introduce TextLeafRange iterator. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156003
2022-08-31 20:34:18 +00:00
Nathan LaPre
982410361d Bug 1732280 - Implement mappings for sub, sup elements and subscript, superscript roles, r=Jamie
This commit adds mappings for HTML sub and sup elements, as well as ARIA
role mappings for subscript, superscript roles, with the goal of properly
exposing this information to the accessibility tree. This commit also updates
text attribute code to account for the attributes implied by those roles.
Finally, this commit updates tests to verify that the role and attribute
information is working properly.

Differential Revision: https://phabricator.services.mozilla.com/D155523
2022-08-31 16:48:56 +00:00
Morgan Rae Reschenberg
45fe2a97f1 Bug 1786086: [Part 3] Queue table cache update on table acc in PruneOrInsertSubtree r=Jamie
Depends on D155132

Differential Revision: https://phabricator.services.mozilla.com/D155133
2022-08-30 23:12:20 +00:00
Morgan Rae Reschenberg
70e8d2d0be Bug 1786086: [Part 2] Queue table cache update when TableLayoutGuessMaybeChanged is called r=Jamie
Depends on D155131

Differential Revision: https://phabricator.services.mozilla.com/D155132
2022-08-30 23:12:20 +00:00
Morgan Rae Reschenberg
b30a39e89d Bug 1786086: [Part 1] Add test to verify changing border style changes layout status r=Jamie
Depends on D154011

Differential Revision: https://phabricator.services.mozilla.com/D155131
2022-08-30 23:12:19 +00:00
Morgan Rae Reschenberg
6d134e1ab6 Bug 1726124: [Part 2] Only fire TABLE_STYLING_CHANGED events on tables, not table parts r=Jamie
Depends on D155276

Differential Revision: https://phabricator.services.mozilla.com/D154011
2022-08-30 23:12:19 +00:00
Morgan Rae Reschenberg
c6c9f2d743 Bug 1726124: [Part 1] Generalise nsAccUtils::TableFor for table parts r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155276
2022-08-30 23:12:18 +00:00
Eitan Isaacson
ebe08f86d0 Bug 1786519 - Null check BrowserParent's element and its owner doc. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155729
2022-08-30 23:04:14 +00:00
James Teh
0787850ef9 Bug 1759971: Support MathML on a cached RemoteAccessible for Windows a11y clients. r=morgan
Windows a11y clients retrieve MathML markup using ISimpleDOMNode::innerHTML.
We cache innerHTML to support this, but only on math elements and only on Windows.
sdnAccessible had to be modified to support RemoteAccessible and to use the cache for this method.

Differential Revision: https://phabricator.services.mozilla.com/D155806
2022-08-30 02:29:17 +00:00
James Teh
551e1f9ba8 Bug 1787686: Expose the URL of a link as its value, as well as the value of text/image leaf descendants. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D155810
2022-08-30 02:26:02 +00:00
Cosmin Sabou
3840d81095 Backed out 5 changesets (bug 1726124, bug 1786086) for failures on browser_table.js. CLOSED TREE
Backed out changeset 169c9576cb7b (bug 1786086)
Backed out changeset 76dd155c66b8 (bug 1786086)
Backed out changeset 25a5c81eded3 (bug 1786086)
Backed out changeset 1c5f2f67382b (bug 1726124)
Backed out changeset 8c82b5407ff3 (bug 1726124)
2022-08-29 21:22:27 +03:00
Morgan Rae Reschenberg
9c668d29f9 Bug 1786086: [Part 3] Queue table cache update on table acc in PruneOrInsertSubtree r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155133
2022-08-29 17:18:34 +00:00
Morgan Rae Reschenberg
f8da65f648 Bug 1786086: [Part 2] Queue table cache update when TableLayoutGuessMaybeChanged is called r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155132
2022-08-29 17:18:33 +00:00
Morgan Rae Reschenberg
0a22a5d265 Bug 1786086: [Part 1] Add test to verify changing border style changes layout status r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155131
2022-08-29 17:18:33 +00:00
Morgan Rae Reschenberg
8fe73fc09a Bug 1726124: [Part 2] Only fire TABLE_STYLING_CHANGED events on tables, not table parts r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D154011
2022-08-29 17:18:32 +00:00
Morgan Rae Reschenberg
77f810cf5c Bug 1726124: [Part 1] Generalise nsAccUtils::TableFor for table parts r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155276
2022-08-29 17:18:32 +00:00
Eitan Isaacson
c039e2a85b Bug 1785930 - Introduce aStopInEditable argument in TextLeafPoint::FindBoundary. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155030
2022-08-26 16:26:31 +00:00
Mark Banner
8fd5aae050 Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for accessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155166
2022-08-26 13:39:34 +00:00
James Teh
08d6b123a8 Bug 1787101: HyperTextAccessibleBase::OffsetAtPoint: Transform the offset before returning it. r=morgan
Otherwise, the returned offset is incorrect if the point is in a child other than the first.

Differential Revision: https://phabricator.services.mozilla.com/D155571
2022-08-26 07:25:12 +00:00
James Teh
fff8d45634 Bug 1787105: HyperTextAccessibleBase::OffsetAtPoint: Don't try to move forward if the end point moves before the start point. r=morgan
This can happen in a container containing no actual characters.
Previously, we would end up in an infinite loop in this case.

Differential Revision: https://phabricator.services.mozilla.com/D155570
2022-08-26 07:25:11 +00:00
Eitan Isaacson
23fc627ed6 Bug 1787291 - Modify mac popup test to wait for cache updates. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D155617
2022-08-25 23:22:53 +00:00
Morgan Rae Reschenberg
da8ff39165 Bug 1785958: Set offscreen state based on BrowsingContext::IsActive r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155528
2022-08-25 21:00:34 +00:00
Daniel Holbert
c6ad0aa8e2 Bug 1472024 part 2: Add curly braces around if-controlled statements in HTMLTableAccessible.cpp. r=eeejay
This patch doesn't impact behavior.

This changes the code to align with this Mozilla coding style rule:
"Always brace controlled statements, even a single-line consequent [...]"
https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html#control-structures

Depends on D155123

Differential Revision: https://phabricator.services.mozilla.com/D155143
2022-08-25 20:31:17 +00:00
Kagami Sascha Rosylight
102bd338be Bug 1695435 - Part 2: Add more words to the chrome script heuristic in use-isInstance r=preferences-reviewers,Gijs,webdriver-reviewers,whimboo,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D110932
2022-08-24 22:47:42 +00:00
Eitan Isaacson
ab16248fa6 Bug 1786963 - Make cached TextBounds return rect of whole input if it is empty. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D155513
2022-08-24 22:00:47 +00:00
Eitan Isaacson
7faa334970 Bug 1786649 - Await for untilCacheOk to resolve in browser position test. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D155434
2022-08-24 16:32:12 +00:00
Morgan Rae Reschenberg
2d7344edbe Bug 1786638: Return early if we can't fetch an internal obj when computing ATK relations r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155426
2022-08-24 04:44:38 +00:00
James Teh
a15f3cb0ce Bug 1781169: Ensure that the cached start/end containers contain characters before returning them in DocAccessibleParent::SelectionRanges. r=eeejay
In bug 1772170, I added code to ensure that the cached offsets are valid.
However, this didn't account for the possibility that one of the containers contained 0 characters.
In that case, offset 0 is itself invalid.
If there were also no children, this might in GetChildAtOffset being called and returning null, causing a crash when retrieving selection.

Differential Revision: https://phabricator.services.mozilla.com/D154964
2022-08-24 02:40:55 +00:00
Eitan Isaacson
8130d7e4dc Bug 1783733 - Return null if registered accessible is defunct. r=Jamie
Assert if we reach that condition, since the accessible failed to
unregister.

Differential Revision: https://phabricator.services.mozilla.com/D155086
2022-08-23 21:46:09 +00:00
Daniel Holbert
90e860f7bd Bug 1472024 part 1: Check for & gracefully handle failure return values from HTMLTableCellAccessible::GetCellIndexes. r=eeejay
HTMLTableCellAccessible::GetCellIndexes can fail via its NS_ENSURE_STATE macro,
and this patch updates its callsites to account for that possibility.  In each
case, I've just copied the existing graceful-fallback behavior that the
surrounding code uses for other unexpected conditions.

Note that I'm intentionally not using NS_ENSURE_SUCCESS in my error-handling
here, to avoid redundant warning-spam.  (In the failure scenario,
GetCellIndexes will already have spammed a warning, via its own aforementioned
NS_ENSURE_STATE call; it's usually not useful to repeat the warning in the
caller.)

Differential Revision: https://phabricator.services.mozilla.com/D155123
2022-08-23 17:30:19 +00:00
Nathan LaPre
7bda7f2c18 Bug 1785182 - prune children of progressbar elements from the acc tree, r=Jamie
Per the ARIA spec, children of progressbar elements are purely
presentational. So, we should prune their children from the
accessibility tree. This commit adds some logic to nsAccUtils::MustPrune
to forcibly prune these children, ultimately unbreaking the experience
for screen reader users who would otherwise not be told about some ARIA
progressbars.

Differential Revision: https://phabricator.services.mozilla.com/D155307
2022-08-23 16:54:54 +00:00
Morgan Rae Reschenberg
5e8dfcb2e3 Bug 1234121: Unify FocusedChild() in Accessible base class r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D154949
2022-08-19 02:42:30 +00:00
Morgan Rae Reschenberg
498f9328f9 Bug 1234121: Add GetFrom method to DocAccessibleParent r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D153997
2022-08-19 02:42:29 +00:00
Eitan Isaacson
baa3f51d6b Bug 1776907 - Detect line breaks with inputs correctly. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D150492
2022-08-18 17:10:43 +00:00
Nathan LaPre
936dba8ae0 Bug 1779252 - implicitly map address element to role=group, r=Jamie
This commit remaps the HTML address element such that it is implicitly
mapped to the group role rather than being a generic element. It also
updates a test to reflect the new role.

Differential Revision: https://phabricator.services.mozilla.com/D154910
2022-08-18 15:18:02 +00:00
James Teh
fff810fb26 Bug 1784841: Use unified OffsetAtPoint in platform specific code. r=morgan
Most importantly, this means OffsetAtPoint is now supported for cached RemoteAccessible on Windows.
I also included a drive-by fix to make ATK use the unified CharacterCount method instead of the old unnecessary conditional local/remote paths.

Differential Revision: https://phabricator.services.mozilla.com/D154628
2022-08-17 04:59:12 +00:00
Andreas Farre
e6bdbb5f03 Bug 1595491 - Part 2: Adapt test files to <embed> and <object> behaving more like <iframe>. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148118
2022-08-16 16:42:59 +00:00
Morgan Rae Reschenberg
83e97e1c04 Bug 1782172: [Part 3] Support RelationType::CONTAINING_TAB_PANE in RemoteAccessibleBase r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D153797
2022-08-15 20:43:55 +00:00
Morgan Rae Reschenberg
9b717bd77e Bug 1782172: [Part 2] Support RelationType::EMBEDS in RootAccessible r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D153796
2022-08-15 20:43:55 +00:00
Morgan Rae Reschenberg
439d408a9e Bug 1782172: [Part 1] Support creating a Relation with a RemoteAccessible r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D153795
2022-08-15 20:43:54 +00:00
Morgan Rae Reschenberg
fbec461253 Bug 1783549: Null check mContent before attempting to process CacheDomain::Relations r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D154174
2022-08-15 18:22:29 +00:00
Morgan Rae Reschenberg
b6665e6e70 Bug 1783095: Add relation caching test for input wrapped in <label> r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D154010
2022-08-10 19:45:48 +00:00
Morgan Rae Reschenberg
2469d25ec9 Bug 1783096: Attempt to fetch tag from aFields if TagName() is null r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D153798
2022-08-10 19:45:48 +00:00
James Teh
01e1aa0df7 Bug 1783133: Don't report unexpected test passes when CTW is enabled for bugs that CTW fixes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D153718
2022-08-08 23:41:41 +00:00
James Teh
4cc7738319 Bug 1783094: Support non-cached RemoteAccessible relation targets in ia2Accessible relation methods. r=morgan
When the cache is disabled, MsaaAccessible::GetFrom won't give us an object we can return to the client.
Instead, we must use MsaaAccessible::NativeAccessible, which knows how to return a COM proxy in this case.

Differential Revision: https://phabricator.services.mozilla.com/D153694
2022-08-05 04:50:21 +00:00
James Teh
1b18b0a41d Bug 1783098: Fix COM reference leak in MsaaRootAccessible::get_accFocus. r=morgan
NativeAccessible AddRefs, so we don't want to implicitly AddRef again when assigning to a RefPtr.

Differential Revision: https://phabricator.services.mozilla.com/D153699
2022-08-05 04:40:32 +00:00
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
5348408b05 Bug 1781536 part 2: Introduce RemoteAccIterator. r=morgan
This is basically RemoteExplicitHeadersIterator with naming generalised.
Support has been added for transferring ownership of the array into the iterator, which will be needed when the cache is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D152958
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
Mark Banner
7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +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
2d5f28289f Bug 1774043: [Part 4] Add tests for relations caching r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D151883
2022-08-03 05:09:54 +00:00
Morgan Rae Reschenberg
8180b70ae7 Bug 1774043: [Part 3] Make remote ::Relations and ::RelationByType functions to use cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152102
2022-08-03 05:09:54 +00:00
Morgan Rae Reschenberg
2cd46a7d14 Bug 1774043: [Part 2] Add implicit relations map, pre- and post-update map processing in ApplyCache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152101
2022-08-03 05:09:53 +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
James Teh
c5ca1dd163 Bug 1782146: Invalidate the HyperText offset cache for RemoteAccessible in some additional cases. r=eeejay
1. When we receive text for a text leaf, even for an initial cache push. Previously, we only did this for a cache update. However, a client call could arrive between the tree push and the initial cache push, resulting in an incorrect offsets cache.
2. When an Accessible is moved. Previously, if a client queried an Accessible while it was being moved or if an Accessible had children before the move but no children after, the cached HyperText offsets could be invalid.

Differential Revision: https://phabricator.services.mozilla.com/D153139
2022-08-02 21:20:59 +00:00
Eitan Isaacson
d66b7102eb Bug 1782563 - Support END_OF_TEXT offset in TextLeafPoint constructor. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D153386
2022-08-02 16:29:07 +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
Eitan Isaacson
53df39bb4d Bug 1779156 - Defer show event until after the cache is populated. r=Jamie
If this is an initial cache push, dispatch a show event after it is
populated.

Differential Revision: https://phabricator.services.mozilla.com/D153124
2022-08-02 16:25:30 +00:00
Christian Holler
99924b2804 Bug 1781043 - Disable some diagnostic asserts in a11y for IPC fuzzing. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D152638
2022-08-02 09:14:28 +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
6a2350e1e7 Bug 1774043: [Part 4] Add tests for relations caching r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D151883
2022-08-02 02:51:04 +00:00
Morgan Rae Reschenberg
65f8ec4b9d Bug 1774043: [Part 3] Make remote ::Relations and ::RelationByType functions to use cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152102
2022-08-02 02:51:04 +00:00
Morgan Rae Reschenberg
42cc6cfdb8 Bug 1774043: [Part 2] Add implicit relations map, pre- and post-update map processing in ApplyCache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152101
2022-08-02 02:51:04 +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
James Teh
0fcb0cca6e Bug 1782151: Don't assert that mCachedFields isn't null in RemoteAccessibleBase::RetrieveCachedBounds. r=morgan
This is possible if a client query arrives between the two IPDL calls for the tree and the cache.
This might even happen for an ancestor in the case of an OOP iframe, where IPDL calls for the two documents might be interspersed.

Differential Revision: https://phabricator.services.mozilla.com/D153134
2022-08-01 22:24:49 +00:00
Eitan Isaacson
908558a3ae Bug 1775681 - Separate @alt attribute removal and setting in description test. r=Jamie
The two attribute operations cause two name changes that need to be
captured for a reliable test.

Differential Revision: https://phabricator.services.mozilla.com/D153125
2022-08-01 16:24:14 +00:00
Nika Layzell
c15823d075 Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.

In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.

These patches do the following major changes to the searching APIs:

1. The ASCII case-insensitive search method was split out as
   LowerCaseFindASCII, rather than using a boolean. This should be less
   error-prone and more explicit, and allows the method to continue to use
   narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
   matching character types. I considered adding a FindASCII method which would
   use narrow string literals for both wide and narrow strings but it would've
   been the same amount of work as changing all of the literals to unicode
   literals.
   This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
   algorithm or stl algorithms to reduce code complexity, and avoid the need to
   carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
   called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
   to booleans normally implicitly coercing to `index_type`. This should
   probably be removed at some point, but may be useful during the transition.

Differential Revision: https://phabricator.services.mozilla.com/D148300
2022-07-30 00:12:48 +00:00
James Teh
9287821f55 Bug 1780713: Fix a11y exposure of checkable XUL buttons/toolbarbuttons. r=eeejay
1. Expose role TOGGLE_BUTTON without the CHECKABLE state.
2. Fire a state change event when the button is toggled.

Differential Revision: https://phabricator.services.mozilla.com/D152486
2022-07-27 21:35:17 +00:00
Morgan Reschenberg
57e015377c Bug 1780228: Expose label, not title, on entries and spinbuttons r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D152812
2022-07-27 17:16:11 +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
ad4df31fa0 Bug 1774043: [Part 4] Add tests for relations caching r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D151883
2022-07-26 21:35:41 +00:00
Morgan Rae Reschenberg
8a4c97b65c Bug 1774043: [Part 3] Make remote ::Relations and ::RelationByType functions to use cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152102
2022-07-26 21:35:40 +00:00
Morgan Rae Reschenberg
5c572fd0ed Bug 1774043: [Part 2] Add implicit relations map, pre- and post-update map processing in ApplyCache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152101
2022-07-26 21:35:38 +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
Mark Banner
8a275d4d92 Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-26 15:11:30 +00:00
Emilio Cobos Álvarez
42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
smolnar
dc4f2d6a41 Backed out 5 changesets (bug 1780017, bug 1780347) for causing bc failures in browser/base/content/test/performance/browser_preferences_usage.js CLOSED TREE
Backed out changeset 86c3a9142535 (bug 1780347)
Backed out changeset 35abe35417a0 (bug 1780017)
Backed out changeset f448f044f028 (bug 1780017)
Backed out changeset a400cbe83084 (bug 1780017)
Backed out changeset 0a23c9e27f01 (bug 1780017)
2022-07-25 21:00:07 +03:00
Mike Conley
90013f044d Bug 1779516 - Make sure input / change events fire for range elements when changing their value via the a11y API. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D151847
2022-07-25 16:38:31 +00:00
Mark Banner
539b5dac0d Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-25 12:46:48 +00:00
Andreea Pavel
8d57d5a509 Bug 1779541 - change disabling condition for specific mac versions r=jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D152611
2022-07-25 03:25:03 +00:00
James Teh
bb8a4b5e7e Bug 1779975: Check whether a LocalAccessible has its own content before trying to get MarkupMapInfo from it. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D152254
2022-07-22 00:05:21 +00:00
Neia Finch
034d8039a6 Bug 1645904 - Fix swapped parameters for nsIAccessibleVirtualCursorChangeEvent r=eeejay
The fields are unused, but there's no reason to propagate them
incorrectly.

Differential Revision: https://phabricator.services.mozilla.com/D134907
2022-07-21 16:59:49 +00:00
Eitan Isaacson
f3cd181291 Bug 1778585 - Don't register non-top-level accessibles if there is no top-level regeistered. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D152328
2022-07-21 16:57:04 +00:00
Cosmin Sabou
31deb146e7 Bug 1779541 - disable browser_caching_actions.js on macOS opt due to permafailures. r=intermittent-reviewers,MasterWayZ DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D152334
2022-07-21 00:50:50 +00:00
Mark Banner
4bfafd41fa Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 22:34:21 +00:00
smolnar
102b779608 Backed out 8 changesets (bug 1779982, bug 1780017, bug 1780347) for causing doc generate failures. CLOSED TREE
Backed out changeset 3f22c0f99cf1 (bug 1780347)
Backed out changeset 6f20b7e4b21b (bug 1780017)
Backed out changeset ae6062c69aeb (bug 1780017)
Backed out changeset e668d7778d97 (bug 1780017)
Backed out changeset e158fc41594b (bug 1780017)
Backed out changeset d4c69c956271 (bug 1779982)
Backed out changeset 145212fd826d (bug 1779982)
Backed out changeset 54079aaa1857 (bug 1779982)
2022-07-20 22:43:53 +03: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
Mark Banner
fd37e0e9da Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-20 15:50:42 +00:00
Mark Banner
23086da9b9 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 15:50:40 +00:00
Iulian Moraru
1108246986 Backed out 7 changesets (bug 1779982, bug 1780017) for causing multiple failures. CLOSED TREE
Backed out changeset f33a58aa2f3f (bug 1780017)
Backed out changeset e21c85d61b91 (bug 1780017)
Backed out changeset 213ee5578e7c (bug 1780017)
Backed out changeset ea9b3bf42ea1 (bug 1780017)
Backed out changeset d2d8530f3c4d (bug 1779982)
Backed out changeset 088e5148c307 (bug 1779982)
Backed out changeset 267e08f3868a (bug 1779982)
2022-07-20 15:44:53 +03:00
Mark Banner
ac90e83952 Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-20 10:36:51 +00:00
Mark Banner
e84aaa1b85 Bug 1779982 - Migrate places consumers to use ESM imports directly. r=mak,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152005
2022-07-20 10:36:49 +00:00
Morgan Reschenberg
e8b96a564c Bug 1778550: Trim whitespace on mozAcc titles, prune empty mozTextLeafAccs from tree r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D151328
2022-07-18 15:48:17 +00:00
James Teh
6c7598c3fe Bug 1772050: Don't call Attributes() in Android's HandleLiveRegionEvent. r=eeejay
Attributes() might do computation that we'll just throw away; e.g. building a CachedTableAccessible.
In a content process, cached data structures like this will never get used by a client, so building them will always be wasteful.
Instead, use nsAccUtils::SetLiveContainerAttributes, which only computes live region stuff.

Differential Revision: https://phabricator.services.mozilla.com/D151799
2022-07-14 21:58:37 +00:00
Andrew Osmond
a9049b5248 Bug 1779519 - gfxFontCache expiration tracker operations should be more atomic. r=jfkthame
gfxFontCache acquires and releases its mutex during various operations.
In order to keep the state internally consistent, we should only release
the lock after the full operation is complete. This involves moving the
deletion of gfxFont to outside the lock via a temporary discard array.

The expiration state should not be protected by the gfxFont's mutex
since we don't hold it during most operations. Instead we should hold
gfxFontCache's mutex because then we can guarantee the operation is
atomic, particularly when a worker wants a font, and the main thread is
aging the generations.

When a font is returned from gfxFontCache, we now return it already
removed from the tracker, and with its refcount updated. This avoids any
potential races between the expiration timer and a worker accessing the
font, as well as simplying the callers so they don't need to be aware of
addref-ing manually in case the result is to be discarded (so that it
gets readded to the tracker).

Differential Revision: https://phabricator.services.mozilla.com/D151821
2022-07-14 19:53:09 +00:00
criss
ba063e13c6 Backed out changeset e4cd98b5984d (bug 1779519) for causing build bustages. CLOSED TREE 2022-07-14 22:06:53 +03:00
Andrew Osmond
9f767ee84a Bug 1779519 - gfxFontCache expiration tracker operations should be more atomic. r=jfkthame
gfxFontCache acquires and releases its mutex during various operations.
In order to keep the state internally consistent, we should only release
the lock after the full operation is complete. This involves moving the
deletion of gfxFont to outside the lock via a temporary discard array.

The expiration state should not be protected by the gfxFont's mutex
since we don't hold it during most operations. Instead we should hold
gfxFontCache's mutex because then we can guarantee the operation is
atomic, particularly when a worker wants a font, and the main thread is
aging the generations.

When a font is returned from gfxFontCache, we now return it already
removed from the tracker, and with its refcount updated. This avoids any
potential races between the expiration timer and a worker accessing the
font, as well as simplying the callers so they don't need to be aware of
addref-ing manually in case the result is to be discarded (so that it
gets readded to the tracker).

Differential Revision: https://phabricator.services.mozilla.com/D151821
2022-07-14 18:35:49 +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
James Teh
52a9b98ce9 Bug 1757126 part 1: Remove RemoteAccessible::KeyboardShortcut. r=morgan,ipc-reviewers,nika
KeyboardShortcut is only supported for XUL menu items.
XUL menu items can never be remote, so there's no point in querying this via IPDL.

Differential Revision: https://phabricator.services.mozilla.com/D151199
2022-07-14 05:48:15 +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
4ea684224b Bug 1770878: Don't fire collapsed selection events on the container of a focused text field. r=morgan
These events were clobbering the text field selection in the cache.
They aren't useful to clients anyway.

Differential Revision: https://phabricator.services.mozilla.com/D151004
2022-07-14 00:50:38 +00: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
01bc6196d8 Bug 1757126 part 1: Remove RemoteAccessible::KeyboardShortcut. r=morgan,ipc-reviewers,nika
KeyboardShortcut is only supported for XUL menu items.
XUL menu items can never be remote, so there's no point in querying this via IPDL.

Differential Revision: https://phabricator.services.mozilla.com/D151199
2022-07-14 00:49:45 +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
21a943f29d Bug 1779149: Remove/fix incorrect assertions in CachedTableAccessible. r=morgan
1. When updating the row/col map, there can be overlapping cells - we even have code to support that - so don't assert that there is no existing cell.
2. When retrieving the caption, the role assertion was accidentally reversed.

Differential Revision: https://phabricator.services.mozilla.com/D151569
2022-07-14 00:45:26 +00:00
James Teh
cd91557c45 Bug 1779162: Don't walk ancestors unnecessarily in CachedTableCellAccessible::RowHeaderCells. r=morgan
Previously, we used CellAt, but this returns the Accessible, discarding the CachedTableCellAccessible.
RowHeaderCells needs both, so it then called AsTableCellBase, which must walk ancestors to get the table.
We already have the table and access to its private data, so use it directly.
This is probably an insignificant performance improvement, but the unnecessary indirection was bothering me.

Differential Revision: https://phabricator.services.mozilla.com/D151571
2022-07-14 00:44:56 +00:00
James Teh
bbcfab7595 Bug 1779303: Don't add null attribute values for RemoteAccessibles with markup attributes that must be fetched from DOM. r=morgan
Some markup elements expose Accessible attributes which must be retrieved from DOM; e.g. the datetime attribute of the datetime element.
We don't cache these yet for RemoteAccessible.
Previously, these were unintentionally exposed from MarkupAttributes with null values.
For now, these should be skipped instead until we have caching code for them.
This fixes crashes whenever a client tries to fetch attributes from such an element.

Differential Revision: https://phabricator.services.mozilla.com/D151659
2022-07-14 00:21:27 +00:00
Norisz Fay
c58fc06b93 Backed out changeset 588fd65ea989 (bug 1778550) for causing mochitest failures on browser_hierarchy.js, browser_rootgroup.js, browser_text_leaf.js CLOSED TREE 2022-07-14 03:20:35 +03:00
Morgan Reschenberg
4da022c85c Bug 1778550: Trim whitespace on mozAcc titles, prune empty mozTextLeafAccs from tree r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D151328
2022-07-13 23:03:40 +00:00
Tooru Fujisawa
a4edb84be9 Bug 1777486 - Part 5: Remove unnecessary XPCOMUtils.jsm imports. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D151217
2022-07-12 04:21:35 +00:00
Tooru Fujisawa
54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +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
2e5729d4e9 Bug 1757121 part 5: Expose live region attributes on cached RemoteAccessibles. r=morgan
As part of this, aria-relevant is now exposed via object attributes.
This is necessary to ensure it is included in the cache.
There's no good reason not to expose it anyway, since we already expose the other live region attributes.

Differential Revision: https://phabricator.services.mozilla.com/D150380
2022-07-12 02:45:58 +00:00
James Teh
d0d3ec2479 Bug 1757121 part 4: Acquire the Android lock while shutting down the accessibility service. r=eeejay
RemoteAccessibleBase::Attributes will soon use the service to query markup attributes.
Thus, the service must not shut down while a client call is being handled on the UI thread.

Differential Revision: https://phabricator.services.mozilla.com/D150722
2022-07-12 02:45:57 +00:00
James Teh
d2615d1719 Bug 1757121 part 3: Normalize true/false/mixed ARIA tokens to atoms. r=morgan
This will be needed for easier checking of aria-atomic.
It is also more efficient in terms of cache storage, since we previously pushed strings for these values.
This moves the code from GetARIAToken into NormalizeARIAToken, since GetARIAToken isn't used any more and it makes sense to handle normalization in one place.

Differential Revision: https://phabricator.services.mozilla.com/D150379
2022-07-12 02:45:57 +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
Eitan Isaacson
87bdd97025 Bug 1776919 - Add Accessible::DebugPrint for debugging. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D150497
2022-07-12 02:41:02 +00:00