Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.
Depends on D271309
Differential Revision: https://phabricator.services.mozilla.com/D271310
This reverts commit 7b7f37ff69.
Revert "Bug 1998255 - P4: Calculate labeled names remotely. r=morgan"
This reverts commit 7265cce8b1.
Revert "Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan"
This reverts commit dbe3c2b954.
Revert "Bug 1998255 - P2: Have GetTextEquivFromIDRefs return true if it used hidden content or referenced itself. r=morgan"
This reverts commit f30cc8c2c8.
Revert "Bug 1998255 - P1: Intro and use ArrayAccIterator. r=morgan"
This reverts commit 312430263f.
Revert "Bug 1998242 - P5: Perform subtree name calculation in RemoteAccessible::Name. r=morgan"
This reverts commit 4deac16ef9.
Revert "Bug 1998242 - P4: Break up name calculation to allow remote subtree calc. r=morgan"
This reverts commit ab72073e90.
Revert "Bug 1998242 - P3: Introduce DirectName() to be used by Name(). r=morgan"
This reverts commit 6f8ce31065.
Revert "Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan"
This reverts commit 1fbfdefcef.
Revert "Bug 1998242 - P1: Factor out tooltip calculation. r=morgan"
This reverts commit 695b65952f.
Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.
Depends on D271309
Differential Revision: https://phabricator.services.mozilla.com/D271310
This reverts commit d42283eaec.
Revert "Bug 1998255 - P4: Calculate labeled names remotely. r=morgan"
This reverts commit 4684fdbfa0.
Revert "Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan"
This reverts commit 15919fad2f.
Revert "Bug 1998255 - P2: Have GetTextEquivFromIDRefs return true if it used hidden content or referenced itself. r=morgan"
This reverts commit 2b6d3df0da.
Revert "Bug 1998255 - P1: Intro and use ArrayAccIterator. r=morgan"
This reverts commit c6454665b0.
Revert "Bug 1998242 - P5: Perform subtree name calculation in RemoteAccessible::Name. r=morgan"
This reverts commit 0629edfc29.
Revert "Bug 1998242 - P4: Break up name calculation to allow remote subtree calc. r=morgan"
This reverts commit 24e6864b25.
Revert "Bug 1998242 - P3: Introduce DirectName() to be used by Name(). r=morgan"
This reverts commit 63a23a03e0.
Revert "Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan"
This reverts commit 95638bb76c.
Revert "Bug 1998242 - P1: Factor out tooltip calculation. r=morgan"
This reverts commit 25a9efa9b2.
Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.
Depends on D271309
Differential Revision: https://phabricator.services.mozilla.com/D271310
This reverts commit d0c68a8888.
Revert "Bug 1998255 - P4: Calculate labeled names remotely. r=morgan"
This reverts commit 3bfddbb990.
Revert "Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan"
This reverts commit a66669765f.
Revert "Bug 1998255 - P2: Have GetTextEquivFromIDRefs return true if it used hidden content or referenced itself. r=morgan"
This reverts commit 99158f058d.
Revert "Bug 1998255 - P1: Intro and use ArrayAccIterator. r=morgan"
This reverts commit 5d3dbed390.
Revert "Bug 1998242 - P5: Perform subtree name calculation in RemoteAccessible::Name. r=morgan"
This reverts commit 68053ff36f.
Revert "Bug 1998242 - P4: Break up name calculation to allow remote subtree calc. r=morgan"
This reverts commit 0d01bdd7e0.
Revert "Bug 1998242 - P3: Introduce DirectName() to be used by Name(). r=morgan"
This reverts commit 9ee273d6c6.
Revert "Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan"
This reverts commit 55dc166a46.
Revert "Bug 1998242 - P1: Factor out tooltip calculation. r=morgan"
This reverts commit 602b768450.
Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.
Depends on D271309
Differential Revision: https://phabricator.services.mozilla.com/D271310
This reverts commit 7c76213cf0.
Revert "Bug 1998255 - P4: Calculate labeled names remotely. r=morgan"
This reverts commit ebe32a1bcc.
Revert "Bug 1998255 - P3: Return eNameFromRelations when name was exclusively calculated from relations. r=morgan"
This reverts commit f4a05b1359.
Revert "Bug 1998255 - P2: Have GetTextEquivFromIDRefs return true if it used hidden content or referenced itself. r=morgan"
This reverts commit bbd365ae27.
Revert "Bug 1998255 - P1: Intro and use ArrayAccIterator. r=morgan"
This reverts commit 4cf9fc73f1.
Revert "Bug 1998242 - P5: Perform subtree name calculation in RemoteAccessible::Name. r=morgan"
This reverts commit 5a3dff09a7.
Revert "Bug 1998242 - P4: Break up name calculation to allow remote subtree calc. r=morgan"
This reverts commit 69925bd2e6.
Revert "Bug 1998242 - P3: Introduce DirectName() to be used by Name(). r=morgan"
This reverts commit a0cf5d9cd6.
Revert "Bug 1998242 - P2: Don't rely on NativeName override to suppress subtree name calc. r=morgan"
This reverts commit a4155e38e4.
Revert "Bug 1998242 - P1: Factor out tooltip calculation. r=morgan"
This reverts commit 8c278d8b8f.
Suppressing name tree calculation in local subclasses is going to become
useless when we do name tree calculation remotely, so this decision
branch for HTML rows needs to happen elsewhere.
Depends on D271309
Differential Revision: https://phabricator.services.mozilla.com/D271310
This reverts commit 48db718d40.
Revert "Bug 1781153 - Simplify use of AXTitle/AXDescription. r=morgan"
This reverts commit 14eb8560c7.
Revert "Bug 1970234 - Add new eNameFromRelations name flag. r=morgan"
This reverts commit 799312555c.
This is now just an alias for HyperTextAccessible on all platforms.
This was done with the following bash script:
```
cd accessible
find -name HyperTextAccessibleWrap.h -delete
sed -i 's/#include "HyperTextAccessibleWrap.h"/#include "HyperTextAccessible.h"/;/"HyperTextAccessibleWrap.h",/d;s/HyperTextAccessibleWrap/HyperTextAccessible/g' `git grep -l HyperTextAccessibleWrap`
```
Differential Revision: https://phabricator.services.mozilla.com/D184796
Role.h will soon be generated, but it is generated within the obj dir, so local includes won't work.
Our C++ style guide says we should prefer exported includes wherever possible anyway.
This was done with this shell command inside the accessible/ directory:
```
sed -i 's,#include "Role.h",#include "mozilla/a11y/Role.h",' `git grep -l '#include "Role.h"'`
```
Differential Revision: https://phabricator.services.mozilla.com/D183940
In some edge cases (such as in accessible/tests/crashtests/1472024-1.html), there can be an outer HTML table which contains an inner table according to layout, but the inner table isn't included in the a11y tree.
The inner table has no semantic value, so including it wouldn't be appropriate.
However, HTMLTableAccessible::Col/RowExtent previously retrieved the table using the a11y tree, which meant we used the layout frame for the outer table instead of the inner table.
This resulted in assertions.
To fix this, always ask the cell's layout frame for the correct table frame, rather than walking the a11y tree.
As a bonus, this simplifies and trims the code somewhat.
Differential Revision: https://phabricator.services.mozilla.com/D184066
This revision removes unnecssary include directives from cpp files in the
accessible/html directory. These suggestions came from the Include What You Use
tool.
Depends on D182400
Differential Revision: https://phabricator.services.mozilla.com/D182401
This revision changes the table classification algorithm such that tables with
cells that have non-zero border width are identified as data tables. This revision
moves the check for border width above the nested table check, since we consider
that to be a more pertinent indicator. This revision also adds a test to verify
the changes.
Differential Revision: https://phabricator.services.mozilla.com/D181825
We have more readable and faster versions (that just omit the namespace
arg).
Mostly done via sed, with a couple helpers to use the faster lookups
where possible.
Differential Revision: https://phabricator.services.mozilla.com/D181795
Now that the local-only TableAccessible and TableCellAccessible have been removed, we no longer need this Base suffix for the unified classes.
Aside from renaming the header files, most of the rest of this was done with the following script:
```
function replace {
sed -i 's/'$1'/'$2'/g' `git grep -l $1`
}
replace TableAccessibleBase TableAccessible
replace TableCellAccessibleBase TableCellAccessible
replace AsTableBase AsTable
replace AsTableCellBase AsTableCell
```
Differential Revision: https://phabricator.services.mozilla.com/D179803
We now use CachedTableAccessible for HTML tables, so much of the code in the HTMLTable*Accessible classes was unused.
However, we still depend on these classes for some data needed to build the cached table.
1. HTMLTableAccessible and HTMLTableCellAccessible no longer derive from TableAccessible and TableCellAccessible, respectively. Instead, callers which need specific access to HTML table data use the HTMLTable*Accessible class directly.
2. All table specific methods have been removed except those that provide data required to build a CachedTableAccessible. The remaining methods are those for querying the row/column span (which depends on layout) and getting the caption (which depends on DOM).
3. HTMLTable*Accessible are now used for all <table>, <td>, <th> and <tr> elements and MathML equivalents. ARIA*Accessible are never used for these elements. This improves consistency, simplifies the code and means that behavior specific to these HTML elements is handled in these classes, rather than in the ARIA classes as well.
4. The table and row roles are now specified in HTMLMarkupMap and MathMLMarkupMap, rather than overriding NativeRole. Cell roles are still handled in a NativeRole override; see the code comments for details.
5. IsProbablyLayoutTable has been moved from TableAccessible to HTMLTableAccessible, as it is only relevant for HTML tables, not for ARIA tables.
6. HTMLTableHeaderCellAccessible::NativeRole has been rewritten such that it no longer depends on querying table coordinates, as that would now require building a CachedTableAccessible, which would be very wasteful here. This replaces TableCellAccessible::HeaderCellRole, which has been removed.
Differential Revision: https://phabricator.services.mozilla.com/D179799
This revision addresses an issue with th elements within tables that don't have
the table CSS display style. In these cases, where we create an
ARIAGridCellAccessible for a th, we fail to report rowheader and columnheader
properly, since ARIAGridCellAccessible doesn't know how to handle th elements.
This revision fixes the problem by moving the th NativeRole logic into the
TableCellAccessible class, then calling that logic from both the ARIA grid cell
accessible NativeRole and from HTMLTableHeaderCellAccessible, as before. This
revision also updates tests reliant on the old behavior, including beefing up
an existing test aimed at this bug specifically.
Differential Revision: https://phabricator.services.mozilla.com/D163371