Commit Graph

10121 Commits

Author SHA1 Message Date
Morgan Rae Reschenberg
771a9f1a94 Bug 1795221: Implement LINKS_TO relation as a tree traversal r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D159451
2022-10-27 20:32:18 +00:00
Morgan Rae Reschenberg
dbeec6c2f2 Bug 1787284: [Part 2] Cache name and create radio name pivot rule r=eeejay
Depends on D158892

Differential Revision: https://phabricator.services.mozilla.com/D159118
2022-10-27 20:32:18 +00:00
Morgan Rae Reschenberg
6e6dc5a06e Bug 1787284: [Part 1] Use tree heirarchy to compute MEMBER_OF in parent process for aria radio buttons r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D158892
2022-10-27 20:32:17 +00:00
Christian Holler
7e34a3062a Bug 1795124 - Add missing target check in DocAccessibleParent. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159326
2022-10-26 08:53:39 +00:00
James Teh
0ab70514cb Bug 1730431: Fix incorrect default min/cur/max/text values for ARIA spinbuttons. r=eeejay
For spinbutton, the spec says there should be "no value" for all of these.
Importantly, this prevents the incorrect value of "50" being reported for ARIA spinbuttons with no value.

Differential Revision: https://phabricator.services.mozilla.com/D159924
2022-10-26 00:38:15 +00:00
Eitan Isaacson
3d10b581aa Bug 1796876 - Allow selected option and list to be null. r=morgan
HTMLComboboxListAccessible::SelectedOption can return null, so we need
to prepare for that. Same with HTMLComboboxListAccessible::List when
the combo box's child is removed.

Differential Revision: https://phabricator.services.mozilla.com/D159961
2022-10-24 16:03:06 +00:00
Eitan Isaacson
d152e213a3 Bug 1796710 - Don't include newline when finding line start after table. r=Jamie
This tweak is needed to allow this test to pass with our new caching
text implementation.

Differential Revision: https://phabricator.services.mozilla.com/D159909
2022-10-21 21:43:18 +00:00
Csoregi Natalia
34701eeef7 Backed out 4 changesets (bug 1787284) for causing failures on browser_caching_relations.js. CLOSED TREE
Backed out changeset fe4a5fa0fa27 (bug 1787284)
Backed out changeset 54e0b1365f89 (bug 1787284)
Backed out changeset c6db418af190 (bug 1787284)
Backed out changeset fda6706bb580 (bug 1787284)
2022-10-21 02:43:42 +03:00
Morgan Rae Reschenberg
ae86ca7bdd Bug 1787284: [Part 4] Core tests for MEMBER_OF relation r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159120
2022-10-20 21:40:06 +00:00
Morgan Rae Reschenberg
af39c3b5c0 Bug 1787284: [Part 3] Use cached name to compute MEMBER_OF rel for HTML radio buttons r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159119
2022-10-20 21:40:06 +00:00
Morgan Rae Reschenberg
91b749da9e Bug 1787284: [Part 2] Cache name and create radio name pivot rule r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159118
2022-10-20 21:40:06 +00:00
Morgan Rae Reschenberg
8b54dbbb47 Bug 1787284: [Part 1] Use tree heirarchy to compute MEMBER_OF in parent process for aria radio buttons r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D158892
2022-10-20 21:40:05 +00:00
Morgan Rae Reschenberg
f52164c7b8 Bug 1774708: Queue cache update for viewport cache when transform change detected r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D159529
2022-10-20 20:48:35 +00:00
Morgan Rae Reschenberg
019604b467 Bug 1787274: Manually add combobox lists, options to the viewport cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D159768
2022-10-20 16:33:01 +00:00
Emilio Cobos Álvarez
f1cb20723d Bug 1796199 - Remove script access to XUL layout attributes. r=Gijs
These don't work on emulated flexbox. We only have a couple of uses.

See D159726 for the diagnostic patch I used to catch these.

Differential Revision: https://phabricator.services.mozilla.com/D159727
2022-10-20 08:36:00 +00:00
James Teh
ff93da3728 Bug 1793748: Don't treat a role="row" as a table row if it has an invalid parent. r=morgan
Previously, we were inconsistent in what we treated as a table row in various places.
This caused breakage after bug 1726124, since nsAccUtils::TableFor() started returning a table when an ARIA row had an invalid parent, but Filters::GetRow wouldn't find such a row
This was causing broken expectations (and consequently, an extremely long loop) in TableCellAccessible::PrevColHeader.
To fix this, avoid creating an ARIARowAccessible (and thus ARIAGridCellAccessibles) if the row's parent isn't valid.
This way, there aren't conflicting expectations because the TableCellAccessible code can never run.
Furthermore, clients don't get a broken table cell interface on invalid cells, which was a problem even before bug 1726124.

Differential Revision: https://phabricator.services.mozilla.com/D159679
2022-10-19 21:50:22 +00:00
Butkovits Atila
7f001fb596 Backed out changeset 39f39360ae48 (bug 1796199) for causing failures at test_panel.xhtml. CLOSED TREE 2022-10-20 00:39:56 +03:00
Emilio Cobos Álvarez
db485fd57c Bug 1796199 - Remove script access to XUL layout attributes. r=Gijs
These don't work on emulated flexbox. We only have a couple of uses.

See D159726 for the diagnostic patch I used to catch these.

Differential Revision: https://phabricator.services.mozilla.com/D159727
2022-10-19 19:18:04 +00:00
Morgan Rae Reschenberg
98c57d12c0 Bug 1792964: Add hittesting test for tables, table rows, table cells r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159524
2022-10-18 22:30:10 +00:00
Morgan Rae Reschenberg
98bda97716 Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-10-18 22:30:10 +00:00
James Teh
5e043f5fba Bug 1794100: Fix order of arguments for ATK GetPosition. r=eeejay
ATK expects row, col, but RemoteAccessible previously expected col, row.
The ATK code was passing row, col, thus querying the wrong cell.
To make things more confusing, PDocAccessible specified row, col, even though DocAccessibleChild and RemoteAccessible specified col, row.
Fix this by making the order of the arguments consistent with ATK everywhere; i.e. row, col.

Differential Revision: https://phabricator.services.mozilla.com/D159239
2022-10-18 21:59:02 +00:00
James Teh
afdcb2542f Bug 1794719: Fix retrieval of AtkObject from cached RemoteAccessible in GetColumn/RowHeaderCellsCB. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159238
2022-10-18 21:58:34 +00:00
James Teh
2770aa9376 Bug 1663796: Make Accessible::AppendTextTo produce text even if an Accessible has no frame. r=eeejay
Otherwise, we fail to fire a text removed event when something becomes display: none.

Differential Revision: https://phabricator.services.mozilla.com/D159362
2022-10-18 21:57:53 +00:00
Cosmin Sabou
02bc919daa Backed out 3 changesets (bug 1787274, bug 1792964, bug 1774708) for causing mochitest failures on browser_test_visibility.js. CLOSED TREE
Backed out changeset f9ec55a441c4 (bug 1774708)
Backed out changeset f942a92c1666 (bug 1792964)
Backed out changeset d60a24f2c8b8 (bug 1787274)
2022-10-18 22:54:12 +03:00
Morgan Rae Reschenberg
c9c0c77f86 Bug 1774708: Queue cache update for viewport cache when transform change detected r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D159529
2022-10-18 19:07:44 +00:00
Morgan Rae Reschenberg
afa76746a5 Bug 1792964: Add hittesting test for tables, table rows, table cells r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159524
2022-10-18 19:07:44 +00:00
Morgan Rae Reschenberg
32271e47f7 Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-10-18 19:07:44 +00:00
Nathan LaPre
3fc16a5a71 Bug 1787283: Provide NODE_CHILD_OF, NODE_PARENT_OF relations in remote acc, r=morgan,Jamie
We'd like to provide NODE_CHILD_OF and NODE_PARENT_OF relations in the parent
process, relying on cached information, to avoid sync IPDL messages. This
revision implements most of the use cases for this relation for remote
accessibles, notably setting aside handling of MathML's <mroot> parent/child
relation. ARIA trees, treegrids, lists, and so on are handled in the remote
accessible largely identically to how they were handled in LocalAccessible.
Rather than define a new rule for walking the tree to find children, this
revision unifies the ItemIterator so it works on generic Accessibles, and uses
it in RemoteAccessibleBase the same way it's used in LocalAccessible. The
special case carve-out for MSAA clients now exists as a simpler IsTopLevel
check in DocAccessibleParent.

Differential Revision: https://phabricator.services.mozilla.com/D159452
2022-10-18 16:40:32 +00:00
Mark Banner
2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Eitan Isaacson
3243bf997e Bug 1789474 - Allow detached documents to be overwritten in accessible mapping. r=Jamie,geckoview-reviewers,owlish
Also assure that unregistering an accessible removes the right one and
doesn't confuse the attached document with the detached one.

Add stderr output to Accessible::DebugPrint in Android as well.

Differential Revision: https://phabricator.services.mozilla.com/D157528
2022-10-17 23:10:19 +00:00
Sandor Molnar
6a467e1baf Backed out changeset 431649004dd4 (bug 1789474) for causing android gv-junit-fis-o crashes CLOSED TREE 2022-10-14 07:59:55 +03:00
Eitan Isaacson
1778c775fe Bug 1789474 - Allow detached documents to be overwritten in accessible mapping. r=Jamie,geckoview-reviewers,owlish
Also assure that unregistering an accessible removes the right one and
doesn't confuse the attached document with the detached one.

Add stderr output to Accessible::DebugPrint in Android as well.

Differential Revision: https://phabricator.services.mozilla.com/D157528
2022-10-13 22:03:03 +00:00
Mike Conley
8fb3f39f66 Bug 1794894 - Convert JSMs under accessible/ to ESMs. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D159221
2022-10-13 15:05:56 +00:00
Nathan LaPre
4f0c38f44d Bug 1794043: Improve AccAttributes ergonomics, r=eeejay
This revision modifies aspects of AccAttributes to make them a bit easier to
work with from a developer perspective. One big win here is the removal of
SFINAE logic that prunes the overload set when resolving calls to SetAttribute.
That logic, plus the other overloads of SetAttribute, have been translated
fairly directly into if constexpr blocks in a single SetAttribute
implementation. The upshot of this is that we can now explicitly disallow
people, at compile time, from accidentally making string copies when passing
strings to SetAttribute, with a nice error message! This revision also enables
us to use AccAttributes in a read-only fashion, particularly in range-based for
loops. This revision accomplishes that by adding const wherever is reasonable.
Next, this revision also removes some redundant special member function
definitions (deletions). My hope is that these changes will generally make
AccAttributes easier to use as safely as possible. Finally, this revision
updates a couple places where we use AccAttributes in a read-only way such
that they use the new const mechanisms.

Differential Revision: https://phabricator.services.mozilla.com/D158995
2022-10-13 01:00:57 +00:00
James Teh
62885a5651 Bug 1794747: Use ChildAt instead of NextSibling to iterate children in Accessible::GetLevel. r=nlapre
NextSibling uses IndexInParent, which is currently slow for RemoteAccessible.
Even if IndexInParent were faster, we're iterating all children here, so doing it this way is more efficient regardless.
This results in a significant performance improvement (> 25x) with NVDA when thousands of HTML select options are shown.

Differential Revision: https://phabricator.services.mozilla.com/D159149
2022-10-12 23:48:47 +00:00
James Teh
270c0a643d Bug 1786240: Clear a cached BUSY state before firing doc load complete. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D159136
2022-10-12 23:48:09 +00:00
Eitan Isaacson
8fff4f15d6 Bug 1794654 - Wait for cache update before comparing bounds to content. r=morgan
We first retrieve accessible bounds and then pass them to a content task to compare against content layout bounds. We are not guaranteed to have the cache in sync in that manner, most tests will wait for a content rAF but that is not sufficient for the parent cache's state.

Instead we need to pull the content layout bounds (since those are guaranteed to be in sync via rAF) into parent and then wait for the a11y cache to catch up.

Differential Revision: https://phabricator.services.mozilla.com/D159080
2022-10-12 22:47:55 +00:00
Eitan Isaacson
9b3628d6a4 Bug 1794634 - Stop using ARIARoleAtom sync message and remove it. r=morgan
Add role map index to RoleChangedEvent so remote doc accessibles have an ARIA role defined.

Differential Revision: https://phabricator.services.mozilla.com/D159067
2022-10-12 22:08:33 +00:00
Emilio Cobos Álvarez
2a3fbb6c87 Bug 1794265 - Add a test for this bug. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D159035
2022-10-12 05:12:08 +00:00
Marian-Vasile Laza
8c3bea141f Backed out changeset be17ad2c9d94 (bug 1794634) for causing mochitest failures on browser_rootgroup.js. CLOSED TREE 2022-10-12 02:16:57 +03:00
Eitan Isaacson
dfcf32500b Bug 1794634 - Stop using ARIARoleAtom sync message and remove it. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D159067
2022-10-11 22:19:34 +00:00
Nathan LaPre
4c4f2f6984 Bug 1776416: Do not diff hypertext if not editable, r=Jamie
Diffing text can make for confusing screen reader readouts in live regions. To
address this, this revision causes gecko to avoid sending update events for
solely the diff. Instead, gecko will now send a text update event that causes
us to re-read the entire text node. This brings us in line with Chrome.
Notably, if the text is editable, we'll continue to diff as usual to avoid
clients reading too much text on each edit.

Differential Revision: https://phabricator.services.mozilla.com/D158822
2022-10-11 18:21:00 +00:00
James Teh
45537045d3 Bug 1794319: Remove a11y::EventTree, as it has been dead code for 6 years. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D158918
2022-10-11 01:41:42 +00:00
Morgan Rae Reschenberg
0554a1d02d Bug 1790910: Adjust getTableParent to deal gracefully with outline rows r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D158890
2022-10-10 16:22:47 +00:00
James Teh
8a72400cf5 Bug 1793073: Ensure Accessible::IsTable can't return true if AsTable will return null. r=eeejay
These should never be out of sync.
Previously, they could be out of sync for an ARIA table with display: contents, since we don't create an ARIAGridAccessible in that case (bug 1494196).
While that incorrect creation is itself a bug that we should fix, I don't want to deal with that here.
Instead, don't check ARIA generic types in Accessible::IsTable, only the class generic types, as we already do for IsTableCell.
This fixes a crash in BundleFieldsForCache.

In addition, while the crash is fixed by the above change, as an optimisation, BundleFieldsForCache now just calls AsTable instead of calling IsTable first, since the IsTable call is redundant.
This second fix alone would be sufficient to fix the crash, but the first will catch other potential instances of this problem.

Differential Revision: https://phabricator.services.mozilla.com/D158548
2022-10-09 23:32:24 +00:00
Eitan Isaacson
5ac02ef5ec Bug 1793488 - Add AccAttributes::DebugPrint. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D158529
2022-10-07 20:45:58 +00:00
James Teh
4b1188a81d Bug 1789378: Support IAccessibleAction for cached RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D158617
2022-10-07 01:04:51 +00:00
James Teh
6a4548dc57 Bug 1764750: Clear the stale state on cached DocAccessibleParents when the document finishes loading. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D158729
2022-10-07 00:22:00 +00:00
James Teh
c579cdfd2e Bug 1793408: Consistently treat OuterDocAccessibles as a single character in TextLeafPoint. r=morgan
1. When constructing a TextLeafPoint and searching for a leaf, do not descend inside an OuterDoc (iframe/browser).
  Otherwise, we end up inside another document.
  Other TextLeafPoint code avoids crossing document boundaries, so the constructor must do this too.
2. When searching for a leaf, include an OuterDoc, but don't walk inside it.
  Previously, we skipped OuterDocs altogether.
  This meant that if you started on an OuterDoc, walking backward and then forward by character would never return you to your origin.
  Also, clients walking the document text shouldn't just skip iframes altogether, so exposing them as a single character makes more sense.

This fixes infinite loops in OffsetAtPoint when querying a container with an iframe at the end.

Differential Revision: https://phabricator.services.mozilla.com/D158740
2022-10-06 23:47:50 +00:00
Masayuki Nakano
6b389daaf1 Bug 1793534 - part 2: Make the accessibility module handle exposable URIs which do not contain user-pass section r=Jamie
We shouldn't expose the user-pass section of document URI to another apps since
it's sensitive data, but non-malicious a11y API users must not need it.

Additionally, `data` and `blob` URI may be too big (e.g., can be some mega
bytes) and they may need to allocate too big string multiple times in the heap
per URI.  Therefore, the accessibility module should stop handling URI as-is if
the document URI is one of them.

Differential Revision: https://phabricator.services.mozilla.com/D158735
2022-10-06 10:04:45 +00:00