Now that textbox value calculation doesn't compress whitespace, etc., we can use it for HTMlTextFieldAccessible rather than querying the value from DOM.
There should be no user visible difference.
However, this simplifies our code and makes it consistent with what is possible in RemoteAccessible, which obviously doesn't have access to DOM.
One tiny difference is that the value no longer updates synchronously, since it is now based on the accessibility tree (which updates async) rather than querying DOM.
mochitests/value/test_password.html relied on this synchronous behaviour, so it has been removed in favour of the browser tests added in part 1 of this stack.
Those browser tests for password inputs will also be expanded in a subsequent patch.
Differential Revision: https://phabricator.services.mozilla.com/D279972
This reverts commit 763c1c8083.
Revert "Bug 2010498 part 3: For LocalAccessible, use textbox value calculation for HTML text input/textarea, AKA HTMLTextFieldAccessible. r=morgan"
This reverts commit 1dc286a790.
Revert "Bug 2010498 part 2: Use the text content from the subtree when calculating the value of role=textbox/contentEditable, not nsTextEquivUtils. r=morgan"
This reverts commit 70ca939007.
Revert "Bug 2010498 part 1: Add a11y browser tests for value of <input>, <textarea> and <input type="password"> elements. r=morgan"
This reverts commit ecc02c2433.
Now that textbox value calculation doesn't compress whitespace, etc., we can use it for HTMlTextFieldAccessible rather than querying the value from DOM.
There should be no user visible difference.
However, this simplifies our code and makes it consistent with what is possible in RemoteAccessible, which obviously doesn't have access to DOM.
One tiny difference is that the value no longer updates synchronously, since it is now based on the accessibility tree (which updates async) rather than querying DOM.
mochitests/value/test_password.html relied on this synchronous behaviour, so it has been removed in favour of the browser tests added in part 1 of this stack.
Those browser tests for password inputs will also be expanded in a subsequent patch.
Differential Revision: https://phabricator.services.mozilla.com/D279972
This change adds attr-associated element observers, which observe changes in the element associated with a single-element attribute.
For example, if an element has an attribute |attr| with a value |value|, and an AttrTargetObserver has been added for |attr| on that element, the observer would fire if an element with an ID matching |value| was added to the element's document or shadow root.
Attr-associated element observers are tracked in mAttrElementObserverMap in an element's nsExtendedDOMSlots.
An attr-associated element can change in multiple ways:
- The attribute value changes;
- An element matching the content attribute value is added or removed from the element's document or shadow root;
- The explicitly-set attr element is added or removed from the element's document or shadow root;
- The resolved reference target for the explicitly set attr-element or the element whose ID matches the string value of the attribute changes.
The resolved reference target can likewise change in multiple ways:
- The referenceTarget property of the element's shadow root is added, changed or removed;
- An element whose ID matches the element's shadow root's referenceTarget value is added or removed from the shadow root;
- The resolved reference target of the element whose ID matches the shadow root's referenceTarget value changes.
These changes are tracked via reference target change observers, which observe changes to an element's resolved reference target.
Reference target change observers are added on the host element's document or shadow root, and fired when one of the above circumstances occurs.
Differential Revision: https://phabricator.services.mozilla.com/D261367
This reverts commit d46abe6d76.
Revert "Bug 1981346 - Add referenceTarget support for the form attribute. r=credential-management-reviewers,webidl,dimi,Jamie,smaug"
This reverts commit df11a4666d.
Revert "Bug 1981345 - Implement referenceTarget support for multiple element attributes. r=dom-core,Jamie,smaug"
This reverts commit 89cc779f5e.
Revert "Bug 1984685 - Refactor: consistently return Maybe<nsTArray<RefPtr<Element>>> when getting attr-associated elements, and key AttrRelProviders on nsAtom rather than nsString. r=dom-core,morgan,Jamie,smaug"
This reverts commit 33130e712d.
Revert "Bug 1981344 - Implement referenceTarget support for single-element attributes. r=dom-core,credential-management-reviewers,webidl,layout-reviewers,emilio,keithamus,smaug,mtigley"
This reverts commit d6440c4cae.
Revert "Bug 1983766 - Split single element attribute getters into bindings/internals versions. r=dom-core,credential-management-reviewers,webidl,layout-reviewers,smaug,keithamus,jwatt,mtigley"
This reverts commit 83b70e0645.
Revert "Bug 1989323 - Make `referenceTarget` IDL attributes on ShadowRoot, HTMLTemplateElement and ShadowRootInit nullable. r=dom-core,webidl,saschanaz,smaug"
This reverts commit 3a0b29121e.
This change adds attr-associated element observers, which observe changes in the element associated with a single-element attribute.
For example, if an element has an attribute |attr| with a value |value|, and an AttrTargetObserver has been added for |attr| on that element, the observer would fire if an element with an ID matching |value| was added to the element's document or shadow root.
Attr-associated element observers are tracked in mAttrElementObserverMap in an element's nsExtendedDOMSlots.
An attr-associated element can change in multiple ways:
- The attribute value changes;
- An element matching the content attribute value is added or removed from the element's document or shadow root;
- The explicitly-set attr element is added or removed from the element's document or shadow root;
- The resolved reference target for the explicitly set attr-element or the element whose ID matches the string value of the attribute changes.
The resolved reference target can likewise change in multiple ways:
- The referenceTarget property of the element's shadow root is added, changed or removed;
- An element whose ID matches the element's shadow root's referenceTarget value is added or removed from the shadow root;
- The resolved reference target of the element whose ID matches the shadow root's referenceTarget value changes.
These changes are tracked via reference target change observers, which observe changes to an element's resolved reference target.
Reference target change observers are added on the host element's document or shadow root, and fired when one of the above circumstances occurs.
Differential Revision: https://phabricator.services.mozilla.com/D261367
This reverts commit 1b5cf4cdf8.
Revert "Bug 1981346 - Add referenceTarget support for the form attribute. r=credential-management-reviewers,webidl,dimi,Jamie,smaug"
This reverts commit 2394d9205a.
Revert "Bug 1981345 - Implement referenceTarget support for multiple element attributes. r=dom-core,Jamie,smaug"
This reverts commit 571a17ff82.
Revert "Bug 1984685 - Refactor: consistently return Maybe<nsTArray<RefPtr<Element>>> when getting attr-associated elements, and key AttrRelProviders on nsAtom rather than nsString. r=dom-core,morgan,Jamie,smaug"
This reverts commit 3b389fdd62.
Revert "Bug 1981344 - Implement referenceTarget support for single-element attributes. r=dom-core,credential-management-reviewers,webidl,layout-reviewers,emilio,keithamus,smaug,mtigley"
This reverts commit 5cc2a12756.
Revert "Bug 1983766 - Split single element attribute getters into bindings/internals versions. r=dom-core,credential-management-reviewers,webidl,layout-reviewers,smaug,keithamus,jwatt,mtigley"
This reverts commit 68e2d26aa9.
Revert "Bug 1989323 - Make `referenceTarget` IDL attributes on ShadowRoot, HTMLTemplateElement and ShadowRootInit nullable. r=dom-core,webidl,saschanaz,smaug"
This reverts commit 1234b31599.
This change adds attr-associated element observers, which observe changes in the element associated with a single-element attribute.
For example, if an element has an attribute |attr| with a value |value|, and an AttrTargetObserver has been added for |attr| on that element, the observer would fire if an element with an ID matching |value| was added to the element's document or shadow root.
Attr-associated element observers are tracked in mAttrElementObserverMap in an element's nsExtendedDOMSlots.
An attr-associated element can change in multiple ways:
- The attribute value changes;
- An element matching the content attribute value is added or removed from the element's document or shadow root;
- The explicitly-set attr element is added or removed from the element's document or shadow root;
- The resolved reference target for the explicitly set attr-element or the element whose ID matches the string value of the attribute changes.
The resolved reference target can likewise change in multiple ways:
- The referenceTarget property of the element's shadow root is added, changed or removed;
- An element whose ID matches the element's shadow root's referenceTarget value is added or removed from the shadow root;
- The resolved reference target of the element whose ID matches the shadow root's referenceTarget value changes.
These changes are tracked via reference target change observers, which observe changes to an element's resolved reference target.
Reference target change observers are added on the host element's document or shadow root, and fired when one of the above circumstances occurs.
Differential Revision: https://phabricator.services.mozilla.com/D261367
LocalAccessible::Name now has 3 parts:
1. DirectName() - Gets name from aria and native attributes and labels, if
nothing retrieved:
2. nsTextEquivUtils::GetNameFromSubtree() - Walks the accessible subtree
to construct a name. If nothing retrieved:
3. Tooltip - get the name from the accessible's toolkit.
Since GetNameFromSubtree is factored out of NativeName, falling back
on alt and value in input[type=image] doesn't work anymore. But this
just brings us more in line with how regular img element names are
calculated, so I think that is fine.
Depends on D271311
Differential Revision: https://phabricator.services.mozilla.com/D271312
Mark Name() as final in LocalAccessible and RemoteAccessible, and rely
on DirectName for overriding name calculation in local accessibles.
Depends on D271310
Differential Revision: https://phabricator.services.mozilla.com/D271311
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.
Mark Name() as final in LocalAccessible and RemoteAccessible, and rely
on DirectName for overriding name calculation in local accessibles.
Depends on D271310
Differential Revision: https://phabricator.services.mozilla.com/D271311
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.
Mark Name() as final in LocalAccessible and RemoteAccessible, and rely
on DirectName for overriding name calculation in local accessibles.
Depends on D271310
Differential Revision: https://phabricator.services.mozilla.com/D271311
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.
Mark Name() as final in LocalAccessible and RemoteAccessible, and rely
on DirectName for overriding name calculation in local accessibles.
Depends on D271310
Differential Revision: https://phabricator.services.mozilla.com/D271311
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.
Mark Name() as final in LocalAccessible and RemoteAccessible, and rely
on DirectName for overriding name calculation in local accessibles.
Depends on D271310
Differential Revision: https://phabricator.services.mozilla.com/D271311
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.
In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.
One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.
Most of the heavy lifting was done through:
$ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
$ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'
Differential Revision: https://phabricator.services.mozilla.com/D268706
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.
Calculate COLLAPSED as a presence of EXPANDABLE with an absence of
EXPANDED. Also, tried to remove direct uses of COLLAPSED whereever
reasonable.
Note: We will still fire COLLAPSED state changes, so that's good.
Differential Revision: https://phabricator.services.mozilla.com/D251745
Calculate COLLAPSED as a presence of EXPANDABLE with an absence of
EXPANDED. Also, tried to remove direct uses of COLLAPSED whereever
reasonable.
Note: We will still fire COLLAPSED state changes, so that's good.
Differential Revision: https://phabricator.services.mozilla.com/D251745
This reverts commit 779b2feecd.
Revert "Bug 1899960 - P2: Imply an unavailable state if focusable is in unavailable subtree. r=Jamie"
This reverts commit 6e4b35e663.
Revert "Bug 1899960 - P1: Don't cache implicit states. r=Jamie"
This reverts commit eacb22ed13.
Revert "Bug 1967813 - Check menu's frame IsOpen to determine if menu is active. r=ayeddi"
This reverts commit f1f8ac785d.
This reverts commit 779b2feecd.
Revert "Bug 1899960 - P2: Imply an unavailable state if focusable is in unavailable subtree. r=Jamie"
This reverts commit 6e4b35e663.
Revert "Bug 1899960 - P1: Don't cache implicit states. r=Jamie"
This reverts commit eacb22ed13.
Revert "Bug 1967813 - Check menu's frame IsOpen to determine if menu is active. r=ayeddi"
This reverts commit f1f8ac785d.
Revert "Bug 1934096 - Minimize differences between `site.py` and `python.py` implementations of `pip_command` functions r=ahal"
This reverts commit e5ef1c9835.
Revert "Bug 1934096 - Use `uv` in `mozharness/base/python.py` r=ahal"
This reverts commit 48b3d309b5.
Revert "Bug 1968593 - Upgrade `uv` toolchain version to `0.7.2` r=firefox-build-system-reviewers,sergesanspaille"
This reverts commit 8b828d5f58.
Revert "Bug 1968592 - Fix `test_site_activation.py` test in CI after `uv` enable r=firefox-build-system-reviewers,sergesanspaille"
This reverts commit 8cfd9ee70b.
Revert "Bug 1968592: Enable `use-uv` by default for `test` and `source-test` kinds r=ahal,taskgraph-reviewers"
This reverts commit 994220ef5d.
Revert "Bug 1962485 - Fix `jj` tests in `mozversioncontrol` r=sfink,ahal"
This reverts commit 52e5f009bd.
Revert "Bug 1962485 - Add `jj` toolchain to `mozversioncontrol` Python source test r=firefox-build-system-reviewers,nalexander"
This reverts commit f0c553f479.
Revert "Bug 1962485 - Add `jj` toolchain tasks r=firefox-build-system-reviewers,nalexander"
This reverts commit 166ddbd3fe.
Revert "Bug 1967634 - Bump vendored `pyyaml` version to `6.0.2` to match mozharness and grizzly r=ahal,mach-reviewers"
This reverts commit 495e3e0a95.
Revert "Bug 1969203 - Fix `.gitignore` pattern regarding `.egg-info` for vendored packages in `jj` r=ahal"
This reverts commit b993509711.
Revert "Bug 1967634 - Apply fixes from `python-sites` lint r=ahal,mach-reviewers"
This reverts commit 5953da8cb8.
Revert "Bug 1967634 - Add `python-sites` lint to facilitate adding rules specific to `python/sites/` r=ahal"
This reverts commit 83917ff26d.
Revert "Bug 1965907 - Re-enable `test_vendor.py` r=ahal"
This reverts commit 6777024795.
Calculate COLLAPSED as a presence of EXPANDABLE with an absence of
EXPANDED. Also, tried to remove direct uses of COLLAPSED whereever
reasonable.
Note: We will still fire COLLAPSED state changes, so that's good.
Differential Revision: https://phabricator.services.mozilla.com/D251745
1. Return this role as appropriate in HTMLTextFieldAccessible and update ARIAMap.
2. Remove Accessible::IsSearchbox, which is no longer required.
3. Remove Mac mozTextAccessible moxSubrole override. This was only used for password inputs and searchboxes, but we can now specify these subroles in the RoleMap instead.
4. Tweak the iOS code for the removal of IsSearchbox.
Differential Revision: https://phabricator.services.mozilla.com/D233230