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

10938 Коммитов

Автор SHA1 Сообщение Дата
James Teh 673de145ac Bug 1840574: Don't try to get the selection in HyperTextAccessible::GetSelectionDOMRanges if the initial tree hasn't been constructed yet. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D199601
2024-01-30 01:19:23 +00:00
Anna Yeddi 6894f9a115 Bug 1871980 - Add a programmatic role and expanded/collapsed state to the Search expand/collapse image button on the Searchbar. r=search-reviewers,Standard8,Jamie
`searchbar-search-button` includes two `<image>` elements, one of which is aimed to visually communicate that this `overlay` image could expand/collapse the search autosuggest list. This `<hbox>` that has an accessible name but lacks an appropriate interactive role and state, because it functions as a button (not focusable with keyboard because the alternative - `Escape` key - exists and works to collapse the autosuggest list and we do not want to create an additional tab stop for keyboard-only users). This would prevent users of speech-to-text/Voice Control from being able to send a click to it by calling its label and screen reader users and users of other assistive technology would not be able to get to this control via shortcuts like a list of controls, etc.

This issue is similar to the `Go` button on the URL bar resolved in the bug 1864962 and to the `Submit search` button tracked in bug 1871596

To activate the searchbar next to the URL Bar that includes this go button: `about:preferences` > `Search` > `Search Bar` > select `Add search bar in toolbar`.

Depends on D199504

Differential Revision: https://phabricator.services.mozilla.com/D197335
2024-01-29 19:24:07 +00:00
Anna Yeddi d9c5fe6995 Bug 1876315 - Adding a ROLE_BUTTONMENU constant to mochitest/role.js. r=morgan
This would allow browser test like `accessible/tests/browser/tree/browser_searchbar.js` to test accessible roles in the Accessibility tree for buttons with `aria-haspopup` attributes.

Depends on D199394

Differential Revision: https://phabricator.services.mozilla.com/D199504
2024-01-29 19:24:07 +00:00
Tom Marble 3c78905f47 Bug 1868866 - adds ManifestParser TOML linter r=jmaher,linter-reviewers,ahal,webdriver-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,cookie-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,valentin,whimboo,Standard8,sclements,jesup
Differential Revision: https://phabricator.services.mozilla.com/D199054
2024-01-29 17:30:48 +00:00
Sandor Molnar 51bb77759a Backed out changeset 2be67d91cf16 (bug 1868866) for causing Mn failures at toolkit/xre/test/marionette/test_exitcode.py CLOSED TREE 2024-01-27 00:15:22 +02:00
Tom Marble 2434015dc5 Bug 1868866 - adds ManifestParser TOML linter r=jmaher,linter-reviewers,ahal,webdriver-reviewers,settings-reviewers,search-reviewers,devtools-reviewers,fxview-reviewers,cookie-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,valentin,whimboo,Standard8,sclements,jesup
Differential Revision: https://phabricator.services.mozilla.com/D199054
2024-01-26 20:06:56 +00:00
Stanca Serban 5a48aa44db Backed out 6 changesets (bug 1875528) for causing leakcheck failures. CLOSED TREE
Backed out changeset dcbbb7316940 (bug 1875528)
Backed out changeset a5c0564f9761 (bug 1875528)
Backed out changeset f3bc6e972f79 (bug 1875528)
Backed out changeset 535378dd79b0 (bug 1875528)
Backed out changeset 3cef14ed0f25 (bug 1875528)
Backed out changeset f0941fdbbabb (bug 1875528)
2024-01-25 01:26:46 +02:00
Nika Layzell 3c0d6b5c0b Bug 1875528 - Part 1: Make IProtocol hold a strong reference to manager, r=ipc-reviewers,mccr8
This makes accessing `Manager()` on an IPDL protocol safer, and replaces the
previous ActorLifecycleProxy reference, which would only keep the manager alive
until IPDL drops its reference.

Unfortunately this introduces some leaks due to reference cycles, which will be
fixed in follow-up parts.

Differential Revision: https://phabricator.services.mozilla.com/D198624
2024-01-24 20:54:40 +00:00
Eitan Isaacson ba3c5e3b7b Bug 1849398 - Gecko initiated a11y focus should not scroll. r=Jamie
If we send an Android ACCESSIBILITY_FOCUSED event because of a content
update (ie. scrolling to anchor or DOM selection changes) we should not
scroll the accessible into view. We should assume the content is being
brought into view by itself.

Testing: We already have tests to show that we scroll an accessible into
view when navigating content, testing for the inverse (that the scroll
is done by other means and NOT a11y) is very hard.

Differential Revision: https://phabricator.services.mozilla.com/D199433
2024-01-24 04:49:03 +00:00
Brad Werth 50561a75dc Bug 1876180: Make MOXAccessibleBase moxFindAncestor check for selector moxUnignoredParent before calling it. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D199432
2024-01-23 23:54:17 +00:00
Morgan Rae Reschenberg f85f46278f Bug 1863436: Add HCM Media Query documentation r=Jamie,ayeddi,jules,mstriemer,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D192901
2024-01-23 21:00:10 +00:00
Tom Schuster 97be7de9ad Bug 1875466 - Remove browser.opaqueResponseBlocking.syntheticBrowsingContext pref. r=emilio
Depends on D199115

Differential Revision: https://phabricator.services.mozilla.com/D199116
2024-01-22 14:26:11 +00:00
Eitan Isaacson 970977ffc7 Bug 1871385 - Enabled popover in caching tests. r=ayeddi
This pref needs to be set when the browser starts. I think setting
it in browser.toml does the trick.

Differential Revision: https://phabricator.services.mozilla.com/D198715
2024-01-16 21:55:25 +00:00
Frédéric Wang 01d8813ff7 Bug 1765615 - Improve browser_treeupdate_csscontentvisibility.js. r=Jamie
Extend a bit the test for dynamic changes to content-visibility, adding
the following checks:

* If there are text descendants in the content-visibility subtree,
  make sure they are created when switching to auto ; and removed
  when switching back to hidden.
* If there is a content-visibility: hidden or a visibility: hidden
  descendant, make sure pruning still applies when switching to
  auto.
* If there is a shadow host in the  content-visibility subtree,
  make sure that shadow subtree is properly updated when
  content-visibility changes.

Differential Revision: https://phabricator.services.mozilla.com/D196964
2024-01-10 09:26:17 +00:00
Daniel Holbert eec12e877e Bug 1860705: Use pushPrefEnv instead of setBoolPref in mochitest test_statechange.html. r=eeejay
setBoolPref has a persistent effect for the rest of the test run (potentially
affecting the behavior of other prefs), so we don't want to use
that. This test is currently failing when run in test-verify mode as a result
of this.  With pushPrefEnv, the test will properly undo its pref-modification
when it completes.

Note: I'm moving the pref-toggle statement inside of a function so that I can
use the ergonomic `await` syntax. This is still essentially right at the start
of the test, since `doTests` is the main function here.

Differential Revision: https://phabricator.services.mozilla.com/D197830
2024-01-09 20:22:57 +00:00
Frédéric Wang c1463070d9 Bug 1871361 - Fix typo "recieved" in accessibility code. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D197062
2024-01-05 07:32:39 +00:00
Masayuki Nakano cd53d5600e Bug 1816581 - part 6: Move the static methods used for moving caret or considering caret geometry into new utility class r=emilio
The methods are in `nsCaret`, `nsFrameSelection` and `dom::Selection`.  That
makes harder to read, and they are called each other, so, they are reused for
different purpose.  Therefore, it must be better to move them into a new class.
Then, the name differences may become more unclear.  If you think so, feel free
to request renaming some methods of them.

Differential Revision: https://phabricator.services.mozilla.com/D197288
2023-12-27 04:42:12 +00:00
Masayuki Nakano fe9fef936b Bug 1816581 - part 1: Make `CaretAssociationHint` an enum class r=emilio
For forward-decl-able.

Differential Revision: https://phabricator.services.mozilla.com/D197283
2023-12-27 04:42:09 +00:00
James Teh a09e359b77 Bug 1871385: Set pref to enable popover in related a11y test. r=ayeddi
Differential Revision: https://phabricator.services.mozilla.com/D197126
2023-12-22 21:19:59 +00:00
Emilio Cobos Álvarez 06608371e0 Bug 1871023 - Trivially fix some orange.
MANUAL PUSH: Trivial orange fix CLOSED TREE
2023-12-21 11:16:20 +01:00
James Teh 06eb0ca294 Bug 1834718: Don't process a duplicate DocAccessible::ContentRemoved call for a DOM node we've already processed. r=morgan
ContentRemoved recursively walks both AllChildrenIterator and direct DOM children.
In addition, we might get duplicate notifications from DOM and layout, plus PruneOrInsertSubtree might do a recursive walk and it too calls ContentRemoved.
To avoid this duplicate processing, keep a set of removed DOM nodes on the DocAccessible which we clear after mutation events are processed.

Differential Revision: https://phabricator.services.mozilla.com/D196707
2023-12-20 21:59:41 +00:00
Emilio Cobos Álvarez 07c2523b91 Bug 1870512 - Remove accessibility hack that should not longer be needed. r=Jamie
There's no windows with popup=true anymore as of the previous patch.

Depends on D196665

Differential Revision: https://phabricator.services.mozilla.com/D196666
2023-12-20 21:51:06 +00:00
Ziran Sun 584d474cc3 Bug 1867811 - Expose EXPANDED state for element with popovertarget. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D196541
2023-12-19 17:30:56 +00:00
Norisz Fay 90733dd7b4 Backed out changeset 846e436ca1c2 (bug 1870512) for causing automation.py related Windows failures CLOSED TREE 2023-12-18 21:53:13 +02:00
Emilio Cobos Álvarez 1fb0635d77 Bug 1870512 - Remove accessibility hack that should not longer be needed. r=Jamie
There's no windows with popup=true anymore as of the previous patch.

Depends on D196665

Differential Revision: https://phabricator.services.mozilla.com/D196666
2023-12-18 17:56:42 +00:00
Jens Stutte 5ad7616e60 Bug 1839051 - Make AccIdxComparator resilient against calls with r=Jamie=b.
std::sort used by nsTArray::Sort expects the comparator to be tolerant
for being called to compare the very same element with itself.

Differential Revision: https://phabricator.services.mozilla.com/D195482
2023-12-11 06:53:28 +00:00
James Teh 583b9dc159 Bug 1836823: If we create an Accessible for SVG <foreignObject> due to an ARIA role, etc., use a HyperTextAccessible. r=morgan
We don't normally create an Accessible for <foreignObject>.
However, if there's an ARIA role or similar, we forceably create one.
Previously, if we ever did this for an SVG element, we would use an AccessibleWrap, which doesn't support HyperText.
This is normally correct because most SVG elements can't contain text.
However, a <foreignObject> can most definitely contain text, so we must use HyperTextAccessible.
This fixes assertions and text attributes.

Differential Revision: https://phabricator.services.mozilla.com/D195387
2023-12-11 00:39:25 +00:00
Randell Jesup 55cad8d48f Bug 1847298: IPC constructor cleanup r=nika,padenot,dom-storage-reviewers,necko-reviewers,cookie-reviewers,asuth,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D185472
2023-12-08 15:56:39 +00:00
Eitan Isaacson 45e41353ee Bug 1868092 - Don't call DoPivot on a null leaf in caret move. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D195599
2023-12-06 22:06:07 +00:00
Joel Maher c993099c60 Bug 1865385 - remove win7/win-aarch64 annotations from reftest manifests. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D193995
2023-12-05 21:49:04 +00:00
Daniel Holbert 53fd58f26a Bug 1867886: Ensure that NotificationController can't re-register with the refresh driver after it's been unregistered in Shutdown. r=eeejay
This is just a "belt-and-suspenders" invariant tightening.  Shouldn't impact
behavior at all, assuming that we don't call methods on NotificationController
objects that have been nerfed with Shutdown().

Differential Revision: https://phabricator.services.mozilla.com/D195321
2023-12-04 20:42:05 +00:00
Daniel Holbert 2982f9468b Bug 1867358 part 4: Add some release asserts (and upgrade an existing assert), to validate that NotificationController isn't still registered as a refresh observer when it's destroyed. r=eeejay
If these assertions somehow fail, then we are probably doomed to crash anyway.
The new release assertions just make it so we'll crash in a controlled way,
with a more actionable backtrace, closer to the problem-spot.

This patch also removes one mDocument null-check that's becoming redundant
since it follows a release-assert that would make us abort if the pointer is
null.

Differential Revision: https://phabricator.services.mozilla.com/D195042
2023-12-01 17:18:24 +00:00
Daniel Holbert 9ef65f2fc2 Bug 1867358 part 3: Adjust NotificationController to avoid modifying mObservingState after Shutdown has been called. r=eeejay
We can sometimes reach the code that this patch is touching, just we've been
shutdown (as can be seen by the fact that we have a null mDocument pointer); in
that case, it's problematic for us to be assigning 'mObservingState' here. The
mObservingState assignment is meant to be *undoing* the temporary assignments
earlier in the function, but in this post-Shutdown situation, it's actually
causing us to forget that we already unregistered as a refresh observer, in a
nested stack level's call to Shutdown().

I think this one place is the only mObservingState assignment that's got this
problem. The other mObservingState assignments should all be OK (they don't
need a "have we shut down" check), because they're all either:
a) modifying mObservingState to record an actual change that we just made to
our RefreshDriver registration,
...or:
b) immediately adjacent to code that dereferences mDocument, implying that
mDocument is known-to-be-non-null at that point, which means we know we haven't
been Shutdown.

This patch unblocks us from adding a release assert in the
NotificationController destructor in the next patch in this series. (Without
this patch, that assertion can be made to fail, via this inadvertent
mObservingState assignment.)

Depends on D195041

Differential Revision: https://phabricator.services.mozilla.com/D195200
2023-12-01 17:18:23 +00:00
Daniel Holbert 2fb4a5340d Bug 1867358 part 2: Assert that EventQueue's mDocument member is initialized to something non-null. r=eeejay
This patch is non-functional; it's just adding a debug-only assert, for
documentation and lightweight validation purposes.

As far as I can tell, the asserted condition must hold, since it looks like
this constructor is only invoked via this instantiation of the subclass, which
passes `this` as the aDocument arg (and `this` must trivially be non-null):
https://searchfox.org/mozilla-central/rev/12ea2c521cdd071a6d25b0894f31f8f23b18b76a/accessible/generic/DocAccessible.cpp#422

This assertion makes it easier to reason about the usages of this member-var.
There are lots of checks for whether mDocument is nullptr, and it's useful to
know that it'll always be non-null to begin with (though it becomes null
eventually, as part of teardown, when NotificationController::Shutdown is
called).

Differential Revision: https://phabricator.services.mozilla.com/D195041
2023-12-01 17:18:23 +00:00
Daniel Holbert 6bc34b0d8d Bug 1867358 part 1: Fix up unbraced single-line if-statements in NotificationController and its superclass. r=eeejay
This patch has no functional change; it's just some trivial fixups to align
with with Mozilla C++ coding style.

Differential Revision: https://phabricator.services.mozilla.com/D195040
2023-12-01 17:18:22 +00:00
James Teh 6f5b841acc Bug 1864015: Correctly handle removal of the conceptual parent. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D194322
2023-11-30 23:53:08 +00:00
Natalia Csoregi 6cc014163b Backed out 3 changesets (bug 1867358) as per request. CLOSED TREE
Backed out changeset 0ce8fcf63e62 (bug 1867358)
Backed out changeset 6d9bf8dfbb4d (bug 1867358)
Backed out changeset e995a2b2ff4d (bug 1867358)
2023-11-30 07:09:25 +02:00
Daniel Holbert 06b443c110 Bug 1867358 part 3: Add some release asserts (and upgrade an existing assert), to validate that NotificationController isn't still registered as a refresh observer when it's destroyed. r=eeejay
If these assertions somehow fail, then we are probably doomed to crash anyway.
The new release assertions just make it so we'll crash in a controlled way,
with a more actionable backtrace, closer to the problem-spot.

This patch also removes one mDocument null-check that's becoming redundant
since it follows a release-assert that would make us abort if the pointer is
null.

Depends on D195041

Differential Revision: https://phabricator.services.mozilla.com/D195042
2023-11-29 23:32:23 +00:00
Daniel Holbert 3d7fe55b5b Bug 1867358 part 2: Assert that EventQueue's mDocument member is initialized to something non-null. r=eeejay
This patch is non-functional; it's just adding a debug-only assert, for
documentation and lightweight validation purposes.

As far as I can tell, the asserted condition must hold, since it looks like
this constructor is only invoked via this instantiation of the subclass, which
passes `this` as the aDocument arg (and `this` must trivially be non-null):
https://searchfox.org/mozilla-central/rev/12ea2c521cdd071a6d25b0894f31f8f23b18b76a/accessible/generic/DocAccessible.cpp#422

This assertion makes it easier to reason about the usages of this member-var.
There are lots of checks for whether mDocument is nullptr, and it's useful to
know that it'll always be non-null to begin with (though it becomes null
eventually, as part of teardown, when NotificationController::Shutdown is
called).

Depends on D195040

Differential Revision: https://phabricator.services.mozilla.com/D195041
2023-11-29 23:32:23 +00:00
Daniel Holbert 19f58281bb Bug 1867358 part 1: Fix up unbraced single-line if-statements in NotificationController and its superclass. r=eeejay
This patch has no functional change; it's just some trivial fixups to align
with with Mozilla C++ coding style.

Differential Revision: https://phabricator.services.mozilla.com/D195040
2023-11-29 23:32:22 +00:00
James Teh f36ae8432b Bug 1862802 part 5: Remove virtual cursor change event. r=eeejay
Depends on D192645

Differential Revision: https://phabricator.services.mozilla.com/D192646
2023-11-29 03:53:20 +00:00
James Teh 603681f423 Bug 1862802 part 4: Remove SessionAccessibility call to AccessibleWrap::PivotTo. r=eeejay
This now just calls DoPivot and SendAccessibilityFocusEvent directly.

Depends on D192644

Differential Revision: https://phabricator.services.mozilla.com/D192645
2023-11-29 03:53:20 +00:00
James Teh 4edd64405a Bug 1862802 part 3: Directly handle scrolling start events on Android instead of converting them to virtual cursor change events. r=eeejay
Depends on D192643

Differential Revision: https://phabricator.services.mozilla.com/D192644
2023-11-29 03:53:19 +00:00
James Teh c1a190ef64 Bug 1862802 part 2: Support find in page on Android using only caret events instead of converting them to virtual cursor change events. r=eeejay
Depends on D192642

Differential Revision: https://phabricator.services.mozilla.com/D192643
2023-11-29 03:53:19 +00:00
James Teh 447aa32c0e Bug 1862802 part 1: Provide an argument to PlatformCaretMoveEvent specifying whether the event was caused by user input. r=eeejay
This is needed in order to support find in page on Android using remote caret events instead of virtual cursor change events.

Depends on D192641

Differential Revision: https://phabricator.services.mozilla.com/D192642
2023-11-29 03:53:19 +00:00
Butkovits Atila 1cb12b49dd Backed out 5 changesets (bug 1862802) for causing multiple failures. CLOSED TREE
Backed out changeset 786805a2cdcc (bug 1862802)
Backed out changeset effe12f2120a (bug 1862802)
Backed out changeset 7488e7ba80c5 (bug 1862802)
Backed out changeset 3d0747ce0174 (bug 1862802)
Backed out changeset d1558d374cef (bug 1862802)
2023-11-29 03:10:17 +02:00
James Teh 44caba5c0c Bug 1862802 part 5: Remove virtual cursor change event. r=eeejay
Depends on D192645

Differential Revision: https://phabricator.services.mozilla.com/D192646
2023-11-28 22:03:21 +00:00
James Teh 0bafc2f978 Bug 1862802 part 4: Remove SessionAccessibility call to AccessibleWrap::PivotTo. r=eeejay
This now just calls DoPivot and SendAccessibilityFocusEvent directly.

Depends on D192644

Differential Revision: https://phabricator.services.mozilla.com/D192645
2023-11-28 22:03:20 +00:00
James Teh 3f0c5fad25 Bug 1862802 part 3: Directly handle scrolling start events on Android instead of converting them to virtual cursor change events. r=eeejay
Depends on D192643

Differential Revision: https://phabricator.services.mozilla.com/D192644
2023-11-28 22:03:20 +00:00
James Teh ea3ee1204a Bug 1862802 part 2: Support find in page on Android using only caret events instead of converting them to virtual cursor change events. r=eeejay
Depends on D192642

Differential Revision: https://phabricator.services.mozilla.com/D192643
2023-11-28 22:03:19 +00:00