Граф коммитов

969 Коммитов

Автор SHA1 Сообщение Дата
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
Eitan Isaacson 0867ef1f8f Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
2021-08-04 21:31:18 +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
Eitan Isaacson 3e83dc6403 Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
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
Eitan Isaacson 175bbedef8 Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
2021-08-02 22:51:49 +00:00
James Teh f2a0bfe104 Bug 1722621: Fix detection of autocomplete popups in XULListboxAccessible after recent DOM changes. r=morgan
Previously, we used GetFlattenedTreeParent from the list box to find the autocomplete popup.
After bug 1708735, this now returns a slot instead of the panel.
We now use GetParentElement instead, which works as expected and is consistent with other code in this class anyway.

I also added a new test so this doesn't regress yet again.
We already have test_focus_autocomplete.xhtml which is supposed to test this, but that test is broken, was thus disabled and is complicated enough that I don't think we're going to fix it any time soon, if ever.

The new test was triggering an assertion on Windows when trying to handle a caret event, so HyperTextAccessible::GetCaretRect had to be tweaked slightly to fix this.

Differential Revision: https://phabricator.services.mozilla.com/D121163
2021-07-30 18:03:04 +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
Eitan Isaacson 4e671c8353 Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
2021-07-29 20:22:27 +00:00
James Teh 500cfa49c4 Bug 1721666: Clear the embedder accessible on PBrowserBridge if that accessible is destroyed. r=eeejay
If an iframe is hidden, its OuterDocAccessible will be destroyed, but the PBrowserBridge still exists.
Since the OuterDocAccessible was destroyed, its id can be reused.
Therefore, if a new embedder accessible hasn't already been set, clear the embedder accessible on PBrowserBridge.
This ensures that the wrong accessible can't accidentally be used when an OOP iframe document is added while the iframe is hidden.

Differential Revision: https://phabricator.services.mozilla.com/D121015
2021-07-28 23:42:12 +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
Eitan Isaacson 61f3152be8 Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
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
James Teh e8bf6a16fd Bug 1715230 part 2: Stop using RemoteIframeDocRemoteAccessibleWrap. r=morgan
This was previously used to wrap the COM proxy for the document child of an OOP iframe in a content process.
It was returned by OuterDocAccessible::LocalChildAt*.
Instead, BrowserBridgeChild now directly holds the COM proxy and MsaaAccessible traversal methods have specific code paths to return that as appropriate.

Since we no longer need the Windows OuterDocAccessible traversal overrides for OOP iframes nor remote top level documents, they have been removed entirely.

Differential Revision: https://phabricator.services.mozilla.com/D117526
2021-07-19 03:44:10 +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 848bbe1cb6 Bug 1691813 - Use TreeWalker to find accessible descendants. r=Jamie
This speeds up reflows on pages like view source that have a single
giant container. But this maybe slows down other cases? I'm not 100%
sure.

Differential Revision: https://phabricator.services.mozilla.com/D117948
2021-06-16 18:05:13 +00:00
Butkovits Atila 8378288f6c Backed out changeset af44502e176a (bug 1691813) for causing build bustages on DocAccessible.cpp. CLOSED TREE 2021-06-16 20:43:03 +03:00
Eitan Isaacson ac98d85fc6 Bug 1691813 - Use TreeWalker to find accessible descendants. r=Jamie
This speeds up reflows on pages like view source that have a single
giant container. But this maybe slows down other cases? I'm not 100%
sure.

Differential Revision: https://phabricator.services.mozilla.com/D117948
2021-06-16 16:42:47 +00:00
Mats Palmgren a901b05850 Bug 1542807 part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers. r=emilio
The change from 0x25FE to 0x25AA for list-style-type:square
was approved here:
https://github.com/w3c/csswg-drafts/issues/6200#issuecomment-828616747

Differential Revision: https://phabricator.services.mozilla.com/D111691
2021-06-14 01:22:04 +00:00
Kagami Sascha Rosylight 55dbc99e55 Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 23:54:06 +00:00
Butkovits Atila ed3da455ae Backed out 7 changesets (bug 1542807) for causing failures at inert-retargeting-iframe.tentative.html. CLOSED TREE
Backed out changeset e9ef32fa2f2e (bug 1542807)
Backed out changeset 8fa0cb199975 (bug 1542807)
Backed out changeset 38daf64afe59 (bug 1542807)
Backed out changeset e3aee052c495 (bug 1542807)
Backed out changeset a71056d4c7cc (bug 1542807)
Backed out changeset cf91e7d0a37f (bug 1542807)
Backed out changeset eee949e5fd67 (bug 1542807)
2021-06-12 01:38:25 +03:00
Butkovits Atila 53cb932555 Backed out changeset aa6c7477c4d2 (bug 1713491) for causing build bustages on nsIFrame.cpp. CLOSED TREE 2021-06-12 00:12:06 +03:00
Kagami Sascha Rosylight 9d0b659349 Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 18:53:28 +00:00
Mats Palmgren 906fd4d388 Bug 1542807 part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers. r=emilio
The change from 0x25FE to 0x25AA for list-style-type:square
was approved here:
https://github.com/w3c/csswg-drafts/issues/6200#issuecomment-828616747

Differential Revision: https://phabricator.services.mozilla.com/D111691
2021-06-11 18:10:38 +00:00
Dorel Luca e1f4d9bb38 Backed out changeset 17e7b969b830 (bug 1713491) for Linux build bustage in gecko/dom/events/ContentEventHandler.cpp. CLOSED TREE 2021-06-11 17:52:10 +03:00
Kagami Sascha Rosylight 74760a9a0e Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 11:37:11 +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
Masayuki Nakano 4bc0632c23 Bug 1713758 - Make everyone outside editor module use `EditorBase` instead of `TextEditor` if the instance can be an `HTMLEditor` instance r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D117119
2021-06-09 23:51:37 +00:00
James Teh 552af4f9de Bug 1695116 part 10: When the cache is enabled, don't send COM proxies and MSAA ids from the content process. r=morgan
Sending these doesn't really do any harm, as we already disregard them in the parent process.
However, it's certainly unnecessary and wasteful.

Differential Revision: https://phabricator.services.mozilla.com/D116204
2021-06-08 07:20:53 +00:00
James Teh cca8d5e473 Bug 1695116 part 1: When the cache is enabled, use a real MsaaAccessible for RemoteAccessibles. r=morgan
With the cache disabled (which was previously always the case), we create a RemoteAccessibleWrap for each RemoteAccessible, stored as the RemoteAccessible's "Wrapper".
This in turn creates an MsaaAccessible.
However, both of these are little more than stubs: the MsaaAccessible itself is never returned to clients and most of the methods would crash if called.
They exist only to store the MSAA id received from the content process and to return the COM proxy from the content process to clients.

With the cache enabled, we now create a real MsaaAccessible for each RemoteAccessible, stored as the RemoteAccessible's "Wrapper".
This MsaaAccessible is directly returned to clients.
Soon, it will generate its own id in the parent process and will delegate to the underlying RemoteAccessible to serve queries from clients.

As part of this:

1. We stop managing COM proxies in the parent process when the cache is enabled, since we don't need those and can't store them anyway.
2. We stop setting the id on the MsaaAccessible when the cache is enabled, since it will soon generate its own id like local MsaaAccessibles do.
3. OuterDocAccessible::ChildCount had to be tweaked so it doesn't try to return a RemoteAccessibleWrap when the cache is enabled. (It previously called RemoteChildDocAccessible, which fetches a RemoteAccessibleWrap.)

Differential Revision: https://phabricator.services.mozilla.com/D116191
2021-06-08 07:20:49 +00:00
James Teh e1f5c9ff7c Bug 1387308: When aria-owning a node which doesn't have an accessible yet, check that the owned child isn't an ancestor of the owner via relocation. r=eeejay
Previously, we only checked whether the owner was a DOM descendant of the owned child.
However, the owner could be in a different DOM subtree, but an a11y descendant due to aria-owns relocation.
Now, we walk the a11y ancestors, doing the DOM descendant check again whenever the DOM lineage changes due to relocation.

Differential Revision: https://phabricator.services.mozilla.com/D115811
2021-05-27 00:49:23 +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