Commit graph

55 commits

Author SHA1 Message Date
Morgan Reschenberg
b45f079410 Bug 1730949: Send initial cache update for doc accessibles if accessibility.cache.enabled r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D125743
2021-09-17 22:08:17 +00:00
Eitan Isaacson
e233a15fc7 Bug 1728442 - P3: Push description to cache. r=Jamie
Rely on name/description changes.

Differential Revision: https://phabricator.services.mozilla.com/D124235
2021-09-02 18:06:52 +00:00
Eitan Isaacson
338d221423 Bug 1728442 - P2: Make LocalAccessible:Description const. r=Jamie
This makes it consistent with the remote Description method and will
allow us to merge them in Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D124234
2021-09-02 18:06:51 +00:00
Eitan Isaacson
20b6875ab9 Bug 1728437 - Keep cache sparse and only store populated fields. r=Jamie
When constructing the initial cache, don't push empty or default fields.
Also, have a way to remove fields from an established cache if it
becomes empty/default.

Differential Revision: https://phabricator.services.mozilla.com/D124127
2021-09-01 22:20:09 +00:00
Eitan Isaacson
6c538e2f0e Bug 1728403 - Introduce CacheUpdateType as argument for Cache IPDL message. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D124117
2021-09-01 20:32:17 +00:00
Edgar Chen
262f7ec893 Bug 1728081 - Part 4: Make HTMLFormElement::GetDefaultSubmitElement return nsGenericHTMLFormElement; r=smaug
so that the callers don't need to queryInterface it back to nsIContent.

Differential Revision: https://phabricator.services.mozilla.com/D123952
2021-08-30 18:44:51 +00:00
Edgar Chen
bae585f79e Bug 1728081 - Part 3: Merge nsIForm into HTMLFormElement; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D123951
2021-08-30 18:44:51 +00:00
Eitan Isaacson
17e9670742 Bug 1727643 - P2: Send numeric value fields to cache. r=morgan
Also added double to AccAttributes.

Differential Revision: https://phabricator.services.mozilla.com/D123696
2021-08-26 19:40:05 +00:00
Eitan Isaacson
3c7fe28200 Bug 1727643 - P1: Add cache convinience methods in LocalAccessible. r=morgan
Also introduce "cache domains" to have a shorthand for which things in
the cache needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D123695
2021-08-26 19:40:04 +00:00
Eitan Isaacson
a926de70ee Bug 1727640 - Push name change cache updates on windows. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123688
2021-08-26 18:45:58 +00:00
Andi-Bogdan Postelnicu
75ed803f7c Bug 1725145 - fixes for linking in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122344
2021-08-22 10:21:56 +00:00
Edgar Chen
3d5334b444 Bug 1726393 - Part 2: Rename nsIFormControl::GetFormElement to GetForm; r=smaug
Depends on D122995

Differential Revision: https://phabricator.services.mozilla.com/D122996
2021-08-19 09:20:24 +00:00
Eitan Isaacson
5090a9049a Bug 1700264 - Cache names. r=Jamie
Eventually we will want to add the Name method as an abstract method in
Accessible and implemented it platform-independent in
RemoteAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D121925
2021-08-17 18:17:39 +00:00
Eitan Isaacson
7255c6bf8e Bug 1723614 - P2: Robustify name change events and use events in name tests. r=Jamie
Changed the browser and mochitest name tests to rely exclusively on name change
events. To make this happen, I fixed all the cases where we were
event-deficient in the code:

* Examine target in PushNameOrDescriptionChange if it has eNameFromSubtreeRule.
  Fixes cases where a text change event happens with the subtree name root as target.
* Change in aria-labelledby should always result in a name change event because
  that attribute has highest prescedence.
* Add eHasNameDependent/eHasDescriptionDependent context flags when dependee accessible
  is added after dependent accessible to tree.
* Handle value attribute change in HTML buttons and determine if they should trigger a
  name changed event.
* Use accessible tree instead of content tree when calculating HTMLSelectOptionAccessible
  name, this keeps the PushNameOrDescriptionChange sees in name flags consistent with
  the actual tree.
* Handle label attribute change in select options and determine if they should trigger
  a name changed event.
* Determine if s summary attribute change on a table triggers a name change event.
* If a title attribute is changed, reliably fire a name change event if
  it is used in name calculation.

Differential Revision: https://phabricator.services.mozilla.com/D121580
2021-08-05 23:04:17 +00:00
Eitan Isaacson
caafeaea2a Bug 1723614 - P1: Override DOMAttributeChanged where it makes sense. r=Jamie
Added a MIXED state change event when progress goes from determinate to
undeterminate.

Differential Revision: https://phabricator.services.mozilla.com/D121579
2021-08-05 23:04:17 +00:00
Eitan Isaacson
da0fa820e2 Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-08-04 21:31:19 +00:00
Eitan Isaacson
1924362000 Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Depends on D120900

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-08-04 21:31:19 +00:00
Marian-Vasile Laza
237ee94bb0 Backed out 3 changesets (bug 1722396) for causing gv-junit test failures. CLOSED TREE
Backed out changeset 086278457495 (bug 1722396)
Backed out changeset ea0639278659 (bug 1722396)
Backed out changeset 9c723d30ef5f (bug 1722396)
2021-08-04 07:29:15 +03:00
Eitan Isaacson
0e6ae6e8d0 Bug 1720185 - If a child is a member of name calc subtree, fire event on container when it changes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D119663
2021-08-03 20:31:52 +00:00
Eitan Isaacson
f188c700db Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-08-03 20:23:20 +00:00
Eitan Isaacson
d715681b78 Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Depends on D120900

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-08-03 20:23:19 +00:00
Dorel Luca
41530b2055 Backed out 3 changesets (bug 1722396) for Linting failure in accessible/tests/browser/mac/browser_aria_expanded.js. CLOSED TREE
Backed out changeset 86fc719a7a94 (bug 1722396)
Backed out changeset 02dea4423d5d (bug 1722396)
Backed out changeset 22f85fd34b27 (bug 1722396)
2021-08-03 02:48:13 +03:00
Eitan Isaacson
b1dff1168e Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-08-02 22:51:50 +00:00
Eitan Isaacson
7f9ccc4dce Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Depends on D120900

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-08-02 22:51:49 +00:00
Noemi Erli
d68b5533d1 Backed out 4 changesets (bug 1722396) for causing multiple failures CLOSED TREE
Backed out changeset 3fcd2aa75f63 (bug 1722396)
Backed out changeset 52cc9f22fbd8 (bug 1722396)
Backed out changeset 20b2120a002a (bug 1722396)
Backed out changeset e2cf9edf5d73 (bug 1722396)
2021-07-30 01:39:18 +03:00
Eitan Isaacson
f2ee930b01 Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-07-29 20:22:27 +00:00
Eitan Isaacson
db6ef08baf Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Depends on D120900

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-07-29 20:22:27 +00:00
Dorel Luca
481b88403e Backed out 3 changesets (bug 1722396) for Devtools failures in devtools/server/tests/browser/browser_accessibility_node_events.js. CLOSED TREE
Backed out changeset cda26075ae09 (bug 1722396)
Backed out changeset d953dc56b027 (bug 1722396)
Backed out changeset a1cbf6bbf0c3 (bug 1722396)
2021-07-29 01:47:13 +03:00
Eitan Isaacson
5318f826b9 Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-07-28 22:04:19 +00:00
Eitan Isaacson
fdf6272022 Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-07-28 22:04:18 +00:00
Morgan Reschenberg
a58920e618 Bug 1694571: Replace AccessibleOrProxy's with Accessible's r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D117927
2021-07-22 17:58:49 +00:00
Florian Quèze
ca7bbcc752 Bug 1720374 - Remove MOZ_GECKO_PROFILER ifdefs that are not useful, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119810
2021-07-15 22:04:23 +00:00
Eitan Isaacson
349592fb91 Bug 1714390 - P6: Make more attribute keys static atoms. r=Jamie
Keys should be static atoms whenever possible.

Differential Revision: https://phabricator.services.mozilla.com/D116787
2021-06-10 23:07:07 +00:00
Eitan Isaacson
4fc2c36ea8 Bug 1714390 - P5: Use static aria_* atoms for aria attributes. r=Jamie
ATK, Windows and XPCOM expect aria attribute keys to be stripped of
their aria- prefix. We should still store the item using the aria_ atom
and then strip the prefix when converting the key to a string.

Differential Revision: https://phabricator.services.mozilla.com/D116786
2021-06-10 23:07:07 +00:00
Eitan Isaacson
474a197205 Bug 1714390 - P4: Set non-string values in AccAttributes when possible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116785
2021-06-10 23:07:06 +00:00
Eitan Isaacson
62d0cdcad4 Bug 1714390 - P2: Use AccAttributes for accessible and text attributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116783
2021-06-10 23:07:05 +00:00
Morgan Reschenberg
5e6ca85357 Bug 1710751: Create LINKS_TO relation to track anchors and their corresponding elements r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D115841
2021-05-26 21:31:42 +00:00
Noemi Erli
6401ad3ad0 Backed out changeset f8b8dd8a7814 (bug 1710751) for causing windows build bustages CLOSED TREE 2021-05-26 02:23:23 +03:00
Morgan Reschenberg
bef9fad1db Bug 1710751: Create LINKS_TO relation to track anchors and their corresponding elements r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D115841
2021-05-25 23:06:42 +00:00
James Teh
ed1d421ba9 Bug 1710975: Fix child/sibling functions regarding top level remote documents. r=eeejay
1. OuterDocAccessible::ChildCount was previously Windows only. Implement it for all platforms.
2. OuterDocAccessible::ChildAt included  code for Windows which isn't necessary because it calls AccessibleWrap::LocalChildAt, not OuterDocAccessible::LocalChildAt (where the Windows specific RemoteAccessibleWrap stuff is implemented).
3. LocalAccessible::ChildAtPoint previously expected LocalChildAt() to succeed if ChildCount > 1. As per 1), this is no longer true for OuterDocAccessibles containing a remote document. Adjust accordingly.
4. IndexInParent on a top level remote document was previously returning -1. Implement DocAccessibleParent::IndexInParent to fix this.
5. Doing 4) means that RemoteNext/PrevSibling broke for top level documents because they use IndexInParent, but there is no remote parent. Add a specific early return for documents there.

Differential Revision: https://phabricator.services.mozilla.com/D115045
2021-05-21 06:18:19 +00:00
Csoregi Natalia
f352760325 Backed out changeset 59a17ca79018 (bug 1710975) for assertion failures on RemoteAccessibleBase.h. CLOSED TREE 2021-05-21 07:00:08 +03:00
James Teh
9e2f11c4ef Bug 1710975: Fix child/sibling functions regarding top level remote documents. r=eeejay
1. OuterDocAccessible::ChildCount was previously Windows only. Implement it for all platforms.
2. OuterDocAccessible::ChildAt included  code for Windows which isn't necessary because it calls AccessibleWrap::LocalChildAt, not OuterDocAccessible::LocalChildAt (where the Windows specific RemoteAccessibleWrap stuff is implemented).
3. LocalAccessible::ChildAtPoint previously expected LocalChildAt() to succeed if ChildCount > 1. As per 1), this is no longer true for OuterDocAccessibles containing a remote document. Adjust accordingly.
4. IndexInParent on a top level remote document was previously returning -1. Implement DocAccessibleParent::IndexInParent to fix this.
5. Doing 3) means that RemoteNext/PrevSibling crash for top level documents because they use IndexInParent, but there is no remote parent. Add assertions to ensure these are never called for documents.
6. Implement DocAccessibleParent::Next/PrevSibling so that RemoteNext/PrevSibling isn't used there (as per 4).

Differential Revision: https://phabricator.services.mozilla.com/D115045
2021-05-21 00:29:10 +00:00
James Teh
cc19c08fbf Bug 1703171: Support a11y exposure of accessKey for elements in shadow DOM. r=morgan
Previously, when determining the modifier, the code used the uncomposed document, which will be null for an element inside shadow DOM.

Differential Revision: https://phabricator.services.mozilla.com/D111033
2021-04-08 22:58:34 +00:00
Daniel Holbert
824ffd6518 Bug 1699029: Switch to use wrapper-API GetCrossDocParentFrameInProcess() in LocalAccessible::VisibilityState(). r=hiro
This patch doesn't change behavior; it's just switching us between two
functions that do the same thing.  (One is literally a trivial wrapper for the
other.)

We're using the new "InProcess" version of this API as a way of annotating
callsites that have been vetted as behaving properly in out-of-process iframes.

In this case in LocalAccessible.cpp, there's an existing code-comment that
indicates that the contextual code already considers & accounts for this
possibility, so it looks like this spot is OK.

Differential Revision: https://phabricator.services.mozilla.com/D108738
2021-03-17 16:09:19 +00:00
Morgan Reschenberg
78d79399ab Bug 1695716: Use ink overflow rect to calculated relative bounds when frame area is zero r=Jamie,emilio
Depends on D107001

Differential Revision: https://phabricator.services.mozilla.com/D106384
2021-03-09 21:01:37 +00:00
Alexandru Michis
df8238361e Backed out 2 changesets (bug 1695716, bug 1696023) for causing bc failures in browser_zero_area.js
CLOSED TREE

Backed out changeset 08322b1067aa (bug 1695716)
Backed out changeset 1ab658549265 (bug 1696023)
2021-03-09 20:30:18 +02:00
Morgan Reschenberg
af1f74102c Bug 1695716: Use ink overflow rect to calculated relative bounds when frame area is zero r=Jamie,emilio
Depends on D107001

Differential Revision: https://phabricator.services.mozilla.com/D106384
2021-03-09 16:47:30 +00:00
Butkovits Atila
006007c9fe Backed out 2 changesets (bug 1695716, bug 1696023) for causing failure at browser_zero_area.js. CLOSED TREE
Backed out changeset a95a4a2b140a (bug 1695716)
Backed out changeset 318e51f44e8b (bug 1696023)
2021-03-08 20:56:45 +02:00
Morgan Reschenberg
50e94d569d Bug 1695716: Use ink overflow rect to calculated relative bounds when frame area is zero r=Jamie,emilio
Depends on D107001

Differential Revision: https://phabricator.services.mozilla.com/D106384
2021-03-08 17:50:37 +00:00
Eitan Isaacson
38989e5335 Bug 1694566 - P4: Introduce polymorphic ChildAtPoint that returns remote or local accessibles. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D106680
2021-03-03 06:10:02 +00:00