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

10540 Коммитов

Автор SHA1 Сообщение Дата
Otto Länd 129697ae6a Bug 1811092: apply code formatting via Lando
# ignore-this-changeset
2023-01-27 20:20:51 +00:00
Eitan Isaacson 80156311b1 Bug 1811092 - P3: Add browser text selection tests and increase coverage. r=Jamie
Added more coverage for generated content too.

Depends on D167202

Differential Revision: https://phabricator.services.mozilla.com/D167203
2023-01-27 20:15:12 +00:00
Eitan Isaacson eb7fe304b8 Bug 1811092 - P2: Add async text selection removal message. r=Jamie
Depends on D167201

Differential Revision: https://phabricator.services.mozilla.com/D167202
2023-01-27 20:15:12 +00:00
Eitan Isaacson dbdb811bfa Bug 1811092 - P1: Add new async add/set text selection message. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D167201
2023-01-27 20:15:11 +00:00
Sandor Molnar 41b0aaaaac Backed out changeset b27d83c0aa57 (bug 1806356) for causint dt failures in devtools/client/netmonitor/test/browser_net_basic-search.js 2023-01-27 05:23:17 +02:00
James Teh 0c12a12bbd Bug 1811972: When an Accessible is moved in the tree, queue a bounds cache update. r=morgan
When an Accessible is moved, it's possible it is re-parented.
In that case, since our cached bounds are relative to the parent, the bounds are now incorrect.
To fix this, queue a bounds cache update whenever an Accessible is moved.
This will also trigger when an Accessible remains under the same parent.
However, because we cache bounds in LocalAccessible, we won't actually push a cache update unless the bounds really changed.

Differential Revision: https://phabricator.services.mozilla.com/D167866
2023-01-26 23:43:08 +00:00
Nathan LaPre 0f763d9ab4 Bug 1806356: Create an accessible if the element's frame has a transform, r=Jamie
This revision changes the logic of MustCreateAccessible such that we always create
an accessible if the content's frame has been transformed. This ensures that we
have accessibles to which we apply transforms when calculating accessible bounds.
This revision also adds a test to verify that the accessible is created, even
when the element has role="presentation".

Differential Revision: https://phabricator.services.mozilla.com/D167760
2023-01-26 18:40:45 +00:00
Emilio Cobos Álvarez af31750cc0 Bug 1775062 - Fix various using statements to use properly qualified names. r=nika,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D167710
2023-01-25 10:52:10 +00:00
James Teh 5bfe8feec7 Bug 1811949: If we use the ink overflow rect for the parent's bounds, take this into account when calculating parent relative bounds for children. r=morgan
If a container has a 0 width/height, we use the ink overflow rect.
A container can overflow beyond the top left of its main rect; e.g. with align-items: flex-end.
Previously, when calculating the parent relative bounds of children, we always calculated relative to the parent's main rect.
If we ended up using the ink overflow rect for the parent, this meant that the parent relative bounds of children were wrong.
To fix this, compensate for the ink overflow offset in this case.

Differential Revision: https://phabricator.services.mozilla.com/D167636
2023-01-25 03:05:27 +00:00
James Teh ed23883a3a Bug 1812208: Push a cache update if bounds change as a result of a frame moving even though it wasn't reflowed. r=morgan,emilio
A frame doesn't have to be reflowed to change its position.
For example, if there is a container c followed by a node outside the container o, inserting a node into c reflows c, but moves o down the page without reflowing o.
In this case, we previously weren't being notified that there was a possible bounds change, which meant we weren't updating the cache.
Now, we get notified about frames moving regardless of reflow.
Since this notification includes changes to CSS left/right/top/bottom, we can also remove the code added in bug 1774705 to explicitly watch for changes to these properties.

Differential Revision: https://phabricator.services.mozilla.com/D167645
2023-01-25 03:03:53 +00:00
Gijs Kruitbosch 129735a58b Bug 1811854 - switch remaining tests to BrowserTestUtils.loadURIString from BrowserTestUtils.loadURI, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D167558
2023-01-24 13:19:11 +00:00
Emilio Cobos Álvarez 9e530f224a Bug 1811834 - Clean up nsWidgetInitData. r=cmartin,geckoview-reviewers,calu
Move it to the mozilla::widget namespace.

Use enum classes for transparency, popup type, popup level, etc.

Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).

Differential Revision: https://phabricator.services.mozilla.com/D167537
2023-01-23 23:58:41 +00:00
Dão Gottwald 05e5fefb46 Bug 1810647 - Prepare for enable urlbar result menu in Nightly. r=mak,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D167004
2023-01-23 15:54:53 +00:00
Emilio Cobos Álvarez 236a544bba Bug 1793747 - Address comment nits that I forgot to upload.
DONTBUILD

MANUAL PUSH: Trivial change CLOSED TREE
2023-01-23 11:40:23 +01:00
Emilio Cobos Álvarez a822daf7cf Bug 1793747 - Clean-ups and test fixes on top of the previous patch. r=Jamie
This should be a tad simpler.

Depends on D159879

Differential Revision: https://phabricator.services.mozilla.com/D167446
2023-01-23 09:19:43 +00:00
Jihye Hong 85bfb346b9 Bug 1793747 - Omit the element hidden by 'content-visibility:hidden' from the accessibility tree r=emilio,Jamie
There is an issue that when the element is hidden because its ancestor has 'content-visibility:hidden', it still appears in the accessibility tree.
Depending on CSS Containment Spec (https://www.w3.org/TR/css-contain-2/#cv-a11y),
it should be omitted from the accessibility tree.
This change fixes the issue above.

The approach is not to create the node in accessibility tree if the element has any ancestor specified with 'content-visibility:hidden'.

This patch can be tested such as:
(1) Check if the accessibility tree is created correctly
  ./mach test accessible/tests/browser/tree/browser_css_content_visibility.js
(2) Check if the accessibility tree is updated correctly
  ./mach test accessible/tests/browser/e10s/browser_treeupdate_csscontentvisibility.js

Differential Revision: https://phabricator.services.mozilla.com/D159879
2023-01-23 09:19:43 +00:00
Gijs Kruitbosch 8be066753c Bug 1810995 - update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - other directories - r=Standard8,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D167154
2023-01-19 20:16:43 +00:00
Dão Gottwald 477eb99f64 Bug 1801298 - Fix down/up arrow behavior with multiple selectable elements per row. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D166803
2023-01-19 10:26:53 +00:00
Sandor Molnar af55a388e5 Backed out changeset 357170b2f52a (bug 1801298) for causing bc failures in browser/components/urlbar/tests/browser-tips/browser_selection.js CLOSED TREE 2023-01-19 12:00:27 +02:00
Dão Gottwald 8881cfae2a Bug 1801298 - Fix down/up arrow behavior with multiple selectable elements per row. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D166803
2023-01-19 08:25:15 +00:00
James Teh 4eeda8a4ad Bug 1774705 part 2: Queue a bounds cache update when the CSS left/right/top/bottom CSS properties change on positioned elements. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D166768
2023-01-18 17:52:57 +00:00
James Teh 8bdfc0d756 Bug 1774705 part 1: Fall back to `this` when hit testing a cached RemoteAccessible if the point is inside `this`. r=morgan
For deepest child, previously, if the requested point was inside a different subtree to the origin Accessible (e.g. out-of-flow), we would return null because the origin wasn't an ancestor of the target.
We still check the ancestry, but if the point is inside the origin, we return the origin.
This is consistent with LocalAccessible (and thus non-cached RemoteAccessible).

For direct child, previously, we would return a child of the origin even if another element in a different subtree was higher in the z-order.
This is because we kept walking the viewport cache until `this`.
Instead, we now stop at the deepest match and walk up to the direct child if the origin is an ancestor.
If it isn't an ancestor, we still fall back to the origin if the point is inside it, just as we do for deepest child.

This change is necessary here because our test for out-of-flow hit testing changes the CSS left property to move an out-of-flow element.
That test passed because the bounds cache for that element was never updated, so we always found the target we expected.
In the next patch, we fix the bounds cache update, which would break this test without this hit testing fix.

In addition, this patch also changes our test for overlapping elements to match this new expectation.
There were also some bugs in the test that had to be fixed; e.g. using y instead of height to get the centre.
Since this is now consistent, we can remove the cache restriction and test LocalAccessible as well.

Differential Revision: https://phabricator.services.mozilla.com/D166849
2023-01-18 17:52:57 +00:00
James Teh 29c03d7779 Bug 1757127 part 2: Use the unified Language method for ATK, IA2 and XPCOM. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D166858
2023-01-17 20:35:22 +00:00
James Teh 4b0234eb8e Bug 1757127 part 1: Move LocalAccessible::Language to Accessible and implement for cached RemoteAccessible. r=nlapre
Since language is also exposed as a text attribute and we cache all text attributes, we already cache this.
Thus, the RemoteAccessibleBase implementation just fetches it from the text attributes cache.

Differential Revision: https://phabricator.services.mozilla.com/D166857
2023-01-17 20:35:21 +00:00
Morgan Rae Reschenberg 455f71d2fd Bug 1808828: Compute ancestor transform for continuations that span multiple subtrees r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D166485
2023-01-12 19:10:12 +00:00
James Teh 07b00111a1 Bug 1809379: If a scroll event is fired on inaccessible anonymous content, redirect it to the closest non-anonymous ancestor. r=morgan
textareas contain an anonymous div which fires the scroll event.
We don't have an Accessible for this div, so previously, we were just ignoring the scroll event.
Now, we'll redirect it to the textarea and get its Accessible.
This ensures that we push a cache update so that the scroll position (and thus the bounds) are correct.
This also means that a11y scroll events are fired on textareas where they weren't previously.

Differential Revision: https://phabricator.services.mozilla.com/D166508
2023-01-12 03:48:44 +00:00
Morgan Rae Reschenberg ad2f396003 Bug 1793941: Don't fire EVENT_TABLE_STYLING_CHANGED when the cache is enabled r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D166117
2023-01-11 22:34:04 +00:00
Cosmin Sabou cc3cda2cdc Backed out changeset 9f8d4babe01d (bug 1808828) for causing ancestor related assertion failures. CLOSED TREE 2023-01-12 00:32:06 +02:00
Morgan Rae Reschenberg 49bb2654cb Bug 1808828: Compute ancestor transform for continuations that span multiple subtrees r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D166485
2023-01-11 21:08:17 +00:00
Sandor Molnar cc2d0f07e4 Backed out changeset f5ee2900f8e3 (bug 1793941) for causing mochitest failures in accessible/tests/mochitest/events/test_stylechange.html CLOSED TREE 2023-01-11 20:40:37 +02:00
Morgan Rae Reschenberg d260be60d5 Bug 1793941: Don't fire EVENT_TABLE_STYLING_CHANGED when the cache is enabled r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D166117
2023-01-11 17:06:33 +00:00
Nathan LaPre b690b77391 Bug 995064: Rework group position calculation to allow intervening accs in compound ARIA widgets, r=Jamie
Transition the group position calculation - specifically the code in Update -
to Pivot such that we can handle finding siblings across intervening generic
container accessibles, such as SECTIONs. This fixes issues with finding the
values of "pos in set" and "set size" for descendant owned elements in compound
ARIA widgets. This revision also updates and adds tests for this functionality.

Differential Revision: https://phabricator.services.mozilla.com/D165756
2023-01-10 20:51:50 +00:00
Nathan LaPre f77d2ea214 Bug 1805316: Use generic ARIA accessibles for mtable, mtr with non-table display style, r=Jamie
These MathML table elements may not have a table display style, in which case
they shouldn't be HTML table accessibles. This revision changes the logic of
MathMLMarkupMap such that mtable, mtr elements create generic ARIA accessibles
if the display style for the element is something other than 'table'. This
revision also adds a test to verify that the roles are still reported correctly,
even with this change.

Differential Revision: https://phabricator.services.mozilla.com/D165980
2023-01-09 21:03:46 +00:00
Eitan Isaacson 9bda15c625 Bug 1769824 - Move text range bounds implementation to TextLeafRange. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D166370
2023-01-09 19:56:20 +00:00
Ben Freist 476cccc35c Bug 1808888 - [refactor] Migrate NS_STYLE_LIST_STYLE_POSITION_* defines r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D166140
2023-01-09 07:07:13 +00:00
James Teh 52039f92c2 Bug 1808046: Never try to remove the DocAccessible when an element's slot changes. r=nlapre
When an element's slot changes and the element is unslotted, we remove its Accessible.
If the body is moved inside a shadow host at the same time, we will process the slot removal first because moves are processed async.
Previously, this caused us to try to remove the DocAccessible (since it was still associated with the body), causing nastiness and potentially crashes.
We should never try to remove the DocAccessible, so explicitly prevent this when handling slot changes.
An assertion was also added to make sure we never try to remove the DocAccessible in future.

Differential Revision: https://phabricator.services.mozilla.com/D166134
2023-01-09 02:56:13 +00:00
Emilio Cobos Álvarez d86ebe2a1e Bug 1808624 - Partially revert test_focus_menu.xhtml changes from regressing bug.
No review, trivial test change.

Differential Revision: https://phabricator.services.mozilla.com/D166070
2023-01-05 14:00:50 +00:00
Emilio Cobos Álvarez ec017e8f33 Bug 1805414 - Fix test_focus_general.xhtml locally. r=morgan
This test passes on automation, somehow, probably due to timing.
Locally the click rolls up the popup (so you'd need a second click to
show the other popup).

This happens both with and without the patch, and given I debugged and
it is trivial to fix, well, make sure to hide the previously open menu
before clicking on another...

Differential Revision: https://phabricator.services.mozilla.com/D165983
2023-01-05 01:20:08 +00:00
Morgan Rae Reschenberg 2dcebc6f8b Bug 1807639: Null check `ancestor` before creating a Pivot r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D165923
2023-01-04 21:33:59 +00:00
Emilio Cobos Álvarez 4f1f5e7314 Bug 1805414 - Remove nsMenuFrame and nsMenuParent. r=smaug,Jamie,desktop-theme-reviewers,settings-reviewers,dao
Move most the event handling stuff to the DOM. I've left nsMenuBarFrame
for now, but I will be removing that in the future.

The basic set up is:

  * nsMenuParent becomes XULMenuParentElement (menubar or popup, manages
    the current active menu item)

  * nsMenuFrame -> XULButtonElements that return true for IsMenu().
    Can't use XULMenuElement because of <button type=menu>, which
    behaves like a, well, menu.

This makes the a11y events for menus (DOMMenuItem{Active,Inactive}) make
sense (before that we were firing duplicate Inactive events etc, and the
event order was rather suspicious).

Differential Revision: https://phabricator.services.mozilla.com/D164210
2023-01-04 19:01:13 +00:00
Csoregi Natalia 9807a6e6e8 Backed out changeset f11c529b2407 (bug 1805414) for failures on test_submenuClose.xhtml and nsMenuPopupFrame.cpp. CLOSED TREE 2023-01-04 01:48:30 +02:00
Gijs Kruitbosch 3762db01b9 Bug 1475606 - remove loadOneTab and switch its callers over, r=dao,perftest-reviewers,sparky
Depends on D165774

Differential Revision: https://phabricator.services.mozilla.com/D165775
2023-01-03 22:24:44 +00:00
Emilio Cobos Álvarez 3d82727505 Bug 1805414 - Remove nsMenuFrame and nsMenuParent. r=smaug,Jamie,desktop-theme-reviewers,settings-reviewers,dao
Move most the event handling stuff to the DOM. I've left nsMenuBarFrame
for now, but I will be removing that in the future.

The basic set up is:

  * nsMenuParent becomes XULMenuParentElement (menubar or popup, manages
    the current active menu item)

  * nsMenuFrame -> XULButtonElements that return true for IsMenu().
    Can't use XULMenuElement because of <button type=menu>, which
    behaves like a, well, menu.

This makes the a11y events for menus (DOMMenuItem{Active,Inactive}) make
sense (before that we were firing duplicate Inactive events etc, and the
event order was rather suspicious).

Differential Revision: https://phabricator.services.mozilla.com/D164210
2023-01-03 22:06:01 +00:00
Olli Pettay 5d21de32ac Bug 1807812 - Remove WidgetEventTime::mTime, r=masayuki,geckoview-reviewers,m_kato
HTMLSelectEventListener changes are needed, since currently that code works somewhat by accident given that
mTime often contains totally bogus values, like PR_IntervalNow(). Those changes then reveal issues also in
browser_editAddressDialog.js.

Differential Revision: https://phabricator.services.mozilla.com/D165618
2023-01-02 12:31:40 +00:00
Sylvestre Ledru 1f8d23143a Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D165559
2022-12-28 09:52:44 +00:00
Marco Castelluccio f69e697461 Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165395
2022-12-23 22:45:46 +00:00
Mark Banner 8730eec697 Bug 1806359 - Convert telemetry imports to direct ES imports. r=necko-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,janerik,mconley,sgalich,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165002
2022-12-23 12:37:07 +00:00
Emilio Cobos Álvarez 2c11f3e1cf Bug 1638500 - Wait for actual value change before checking value. r=Jamie
My patch in bug 1805414 makes this fail in a way that's perma, and it
seems it is because we're not waiting for the actual value change to
happen.

Differential Revision: https://phabricator.services.mozilla.com/D165238
2022-12-22 10:10:32 +00:00
James Teh 6fc37030c0 Bug 1806548: When the slot attribute is changed, remove the Accessible if the element is now unslotted. r=nlapre
If the slot attribute is changed to assign the element to a slot which doesn't exist in the shadow DOM, the element is now unslotted and thus shouldn't be rendered.
We have code in PruneOrInsertSubtree to handle changes like this, but that only works if the frame for the shadow host or something inside the shadow DOM gets reconstructed.
In the case of a shadow host with a single child, there might not necessarily be any frame reconstruction.
To handle this, we listen for changes to the slot attribute.
We check if the element is still part of the flat tree (i.e. it is slotted).
If it isn't, we remove its Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D165135
2022-12-22 00:51:27 +00:00
James Teh f133cff3c3 Bug 1806486: If we're forced to create an Accessible for a MathML element which wouldn't normally have one, make it a HyperTextAccessible. r=nlapre
Certain MathML elements such as annotation and annotation-xml don't normally get an Accessible.
However, we force create Accessibles in some cases; e.g. if the element is focusable.
When this happens for these MathML elements (e.g. annotation-xml with a tabindex), we previously created AccessibleWraps which don't support text.
This meant that text formatting information was unavailable and caused assertions when pushing the cache.
To fix this, use HyperTextAccessibleWrap instead.

As a drive-by fix, also use HyperTextAccessibleWrap instead of HyperTextAccessible for content MathML elements.
This was almost certainly a typo when this was implemented.
This wouldn't have been noticeable in tests and some native platforms, but some platforms (e.g. Mac and Windows) do have some overrides in HyperTextAccessibleWrap, so we should use those.

Differential Revision: https://phabricator.services.mozilla.com/D165252
2022-12-21 21:21:11 +00:00
James Teh 433e37a17f Bug 1806026 part 2: Don't include the identity matrix when caching transforms for a11y. r=morgan
See the code comments for details.
This is just a memory optimisation; there is no user visible change.

Differential Revision: https://phabricator.services.mozilla.com/D164996
2022-12-20 03:24:15 +00:00
James Teh 77088bfef9 Bug 1806026 part 1: When applying a transform in RemoteAccessible, remove only the parent relative offset, not the cumulative offset calculated so far. r=morgan
When applying an ancestor transform, ApplyTransform is supplied with the cumulative bounds calculated so far; i.e. from descendants.
When removing the parent relative offset, the code previously set the top left to (0, 0).
This not only removed the parent relative offset, but also the cumulative offset calculated for all descendants!
Instead, we now pass in the cumulative bounds as well as the parent relative bounds.
We only subtract the parent relative bounds.

Differential Revision: https://phabricator.services.mozilla.com/D164995
2022-12-20 03:24:15 +00:00
Stanca Serban b1d0b3a50a Backed out 2 changesets (bug 1806026) for causing mochitests failures in browser_test_simple_transform.js. CLOSED TREE
Backed out changeset e2bbf722e41e (bug 1806026)
Backed out changeset 6eaa7e0e5fe4 (bug 1806026)
2022-12-20 01:07:34 +02:00
Ben Freist ce6cd37bc7 Bug 1802799 - [refactor] Migrate NS_STYLE_TEXT_DECORATION_STYLE_* defines r=emilio,geckoview-reviewers,ohall
Differential Revision: https://phabricator.services.mozilla.com/D163177
2022-12-19 22:47:24 +00:00
James Teh eca010172b Bug 1806026 part 2: Don't include the identity matrix when caching transforms for a11y. r=morgan
See the code comments for details.
This is just a memory optimisation; there is no user visible change.

Differential Revision: https://phabricator.services.mozilla.com/D164996
2022-12-19 22:15:35 +00:00
James Teh 6d4b1bdd63 Bug 1806026 part 1: When applying a transform in RemoteAccessible, remove only the parent relative offset, not the cumulative offset calculated so far. r=morgan
When applying an ancestor transform, ApplyTransform is supplied with the cumulative bounds calculated so far; i.e. from descendants.
When removing the parent relative offset, the code previously set the top left to (0, 0).
This not only removed the parent relative offset, but also the cumulative offset calculated for all descendants!
Instead, we now pass in the cumulative bounds as well as the parent relative bounds.
We only subtract the parent relative bounds.

Differential Revision: https://phabricator.services.mozilla.com/D164995
2022-12-19 22:15:35 +00:00
James Teh 4c3d8e7a36 Bug 1802241: Add a test case for updating cached bounds on an in-process iframe DocAccessible while its OuterDocAccessible is being re-created. r=morgan
Previously, this test case caused an assertion, but that was fixed in bug 1792120.
We also ensure the x and y are the same before an dafter the re-creation.
This verifies that we aren't losing the iframe's border/padding.

Differential Revision: https://phabricator.services.mozilla.com/D164879
2022-12-17 02:09:12 +00:00
James Teh b0e11e12be Bug 1792120: Use the cached offset from GetUsedBorderAndPadding for all OuterDocAccessibles, not just OOP iframes. r=morgan
Aside from making the code consistent for OOP and in-process iframes, this also fixes incorrect bounds in in-process iframe documents when the iframe's padding is changed.
We always pushed a cache update for the iframe when the padding was changed.
However, we previously relied on parent-relative bounds for in-process iframes, which didn't get updated when the iframe's padding changed.

Differential Revision: https://phabricator.services.mozilla.com/D164878
2022-12-17 02:09:12 +00:00
James Teh 20cb2157d5 Bug 1736635: Clean up LocalAccessible::FindNearestAccessibleAncestorFrame. r=morgan
We previously thought that DocAccessible::GetFrame didn't return a frame.
On the contrary, it has returned the PresShell's root frame for a long time now, which is precisely what we want.
This means we can make this method a bit cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D164877
2022-12-17 02:09:11 +00:00
Morgan Rae Reschenberg 8ca309681e Bug 1804186: Use RelationType in mReverseRelations map instead of uint64_t r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D164268
2022-12-16 23:08:43 +00:00
Morgan Rae Reschenberg 160dde8228 Bug 1801234: Queue a relations cache update on dependent accs when DOM ID mutations are observed r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D162895
2022-12-16 23:08:43 +00:00
James Teh 99882c7170 Bug 1805545 part 2: Don't query CSS on image map areas when querying LocalAccessible attributes. r=morgan
This fixes the same bug as part 1, but when the cache is disabled.
It is covered by the same test.

Differential Revision: https://phabricator.services.mozilla.com/D164784
2022-12-15 23:41:18 +00:00
James Teh c5f38f94f1 Bug 1805545 part 1: Don't query the display style on image map areas when pushing the cache. r=morgan
See the code comments for an explanation.
This fixes assertions and crashes when pushing the cache when a page contains a map which is unslotted in a shadow host.

Differential Revision: https://phabricator.services.mozilla.com/D164783
2022-12-15 23:41:18 +00:00
James Teh 7a085dff19 Bug 1805876 part 2: Use GetAccessible instead of GetAccessibleOrContainer when building the viewport cache. r=morgan
Calling GetAccessibleOrContainer meant that if a particular content node didn't have an Accessible but did have a frame, we'd insert its container in its place.
There might have been other descendants of that container that did have Accessibles, though.
In that case, we would have put the container ahead of some of its descendants!
To fix this, use GetAccessible instead.
We'll still fall back to the container if the user hit tests a point in an inaccessible node, since it will appear later in the viewport cache.

Differential Revision: https://phabricator.services.mozilla.com/D164803
2022-12-15 23:35:51 +00:00
James Teh c0b3a8201a Bug 1805876 part 1: Revert the RemoteAccessible hit testing changes in bug 1801756. r=morgan
That patch was always somewhat hacky, but we couldn't figure out the cause of the problem.
Now that I've figured it out, a more correct solution is forthcoming.

Differential Revision: https://phabricator.services.mozilla.com/D164802
2022-12-15 23:35:50 +00:00
Andrew McCreight ce28c41da0 Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
James Teh a970a1087e Bug 1800736: Use HyperTextAccessible for <svg> and <g> elements. r=nlapre
These can contain <foreignobject>, which contains HTML but does not normally create its own Accessible.
This means that these Accessibles could have TextLeafAccessible children.
TextLeafAccessible children must always have a HyperTextAccessible as a parent.
Therefore, we must use HyperTextAccessible for <svg> and <g>.
As well as fixing assertions, this allows text formatting to be queried for <foreignobject> content, which was previously broken.

Differential Revision: https://phabricator.services.mozilla.com/D164636
2022-12-15 02:21:24 +00:00
Morgan Rae Reschenberg 9bb1925772 Bug 1802386: If we can't find a PresContext or the root PresContext, bail out of WillRefresh r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D164270
2022-12-14 18:26:19 +00:00
Norisz Fay 0fa6500691 Backed out 2 changesets (bug 1801234, bug 1804186) for causing assertion failures on DocAccessibleParent.cpp CLOSED TREE
Backed out changeset 949a747693d1 (bug 1804186)
Backed out changeset 51527201739c (bug 1801234)
2022-12-13 23:58:05 +02:00
Morgan Rae Reschenberg a2878c10ac Bug 1804186: Use RelationType in mReverseRelations map instead of uint64_t r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D164268
2022-12-13 20:16:37 +00:00
Morgan Rae Reschenberg 141e01d78f Bug 1801234: Queue a relations cache update on dependent accs when DOM ID mutations are observed r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D162895
2022-12-13 20:16:36 +00:00
lyavor 42556ae145 Bug 1799683 - Add disable next line for all accessible/tests. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D161599
2022-12-12 17:10:02 +00:00
Morgan Rae Reschenberg a0c829b432 Bug 1804991: Issue a warning if we attempt to stringify an empty array, but don't crash r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D164391
2022-12-09 23:56:58 +00:00
James Teh ca834233da Bug 1802040: Track the focused DocAccessibleParent on Android. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D163707
2022-12-07 13:42:30 +00:00
Anna Yeddi 2bc83ec22d Bug 1676068 - Datepicker Pt.3 - Replace Reset button in the DateTimeBox with Calendar one. r=Jamie,fluent-reviewers,mconley,kcochrane
Done:
- Functionality of the button was changed from cleaning the field value to toggling the datepicker dialog.
- Pre-existing issues resolved: Updated datetimebox.js to use `keydown` event instead of the deprecated `keypress` (which does not preventDefault for buttons), added default handling of digits for `keydown`, and added a check to avoid running duplicate cleanup when the picker is closed
- Removed ability to open a date picker from editable elements of the `<input type="date">` field and ensured keyboard and mouse/touch click are working for the Calendar button, while Escape functionality remained
- Updated `onBlur` logic for the button in accordance with its new functionaility
- New Calendar SVG icon was created by Katie Caldwell and optimized by Sam Foster
- Provided HCM support for the Calendar button
- Ensured the Calendar button is not shown on `<input type=time>` to preserve the existent UX
- Added Fluent l10n to the content process and provided `title` to the image button (SVG is marked as `role="none"` to avoid exposure to assistive technology)
- Added functional and markup tests for the Calendar button and its localization, updated Reset button tests to the Calendar one

ToDo (further patch):
1. Pt.4 - Ensure keyboard support when focus moves between processes

ToDo (other dependencies/bugs):
1. Investigations into if we should show a calendar button for read-only fields and if a Reset button would be benefitial to be shown for a `type=time` inputs

Depends on D139981

Differential Revision: https://phabricator.services.mozilla.com/D141175
2022-12-07 00:56:45 +00:00
Drew Willcoxon 43b648c36b Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 18:43:49 -05:00
Noemi Erli 42fd111277 Backed out changeset e0eac08ef8bc (bug 1803873) fo causing failures in browser_search_telemetry_sources_navigation CLOSED TREE 2022-12-07 01:24:44 +02:00
Drew Willcoxon b080ee4b3a Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 22:28:55 +00:00
Nathan LaPre 391c21b2f8 Bug 1802240: Use generic ARIA grid cell accessible for mtd elements without table style, r=Jamie
This revision changes the logic in MathMLMarkupMap such that mtd elements create
generic ARIA grid accessibles if the display style for the element is something
other than 'table'. This revision also adds a test that verifies that the roles
remain as expected, even with this change.

Differential Revision: https://phabricator.services.mozilla.com/D163898
2022-12-06 20:41:44 +00:00
Marian-Vasile Laza ff26a6d976 Backed out 7 changesets (bug 1676068) for causing geckoview junit failures. CLOSED TREE
Backed out changeset d3c9e777a050 (bug 1676068)
Backed out changeset 639c9661c850 (bug 1676068)
Backed out changeset d06b6aa3b9a3 (bug 1676068)
Backed out changeset 50bb7e9c6bcf (bug 1676068)
Backed out changeset 234acd14548e (bug 1676068)
Backed out changeset 04050cfd5e3f (bug 1676068)
Backed out changeset a06081c85646 (bug 1676068)
2022-12-06 07:20:40 +02:00
Anna Yeddi 70b8f223fc Bug 1676068 - Datepicker Pt.3 - Replace Reset button in the DateTimeBox with Calendar one. r=Jamie,fluent-reviewers,mconley,kcochrane
Done:
- Functionality of the button was changed from cleaning the field value to toggling the datepicker dialog.
- Pre-existing issues resolved: Updated datetimebox.js to use `keydown` event instead of the deprecated `keypress` (which does not preventDefault for buttons), added default handling of digits for `keydown`, and added a check to avoid running duplicate cleanup when the picker is closed
- Removed ability to open a date picker from editable elements of the `<input type="date">` field and ensured keyboard and mouse/touch click are working for the Calendar button, while Escape functionality remained
- Updated `onBlur` logic for the button in accordance with its new functionaility
- New Calendar SVG icon was created by Katie Caldwell and optimized by Sam Foster
- Provided HCM support for the Calendar button
- Ensured the Calendar button is not shown on `<input type=time>` to preserve the existent UX
- Added Fluent l10n to the content process and provided `title` to the image button (SVG is marked as `role="none"` to avoid exposure to assistive technology)
- Added functional and markup tests for the Calendar button and its localization, updated Reset button tests to the Calendar one

ToDo (further patch):
1. Pt.4 - Ensure keyboard support when focus moves between processes

ToDo (other dependencies/bugs):
1. Investigations into if we should show a calendar button for read-only fields and if a Reset button would be benefitial to be shown for a `type=time` inputs

Depends on D139981

Differential Revision: https://phabricator.services.mozilla.com/D141175
2022-12-06 03:18:25 +00:00
Morgan Rae Reschenberg 397dcfd11b Bug 1803814: Remove `Maybe` wrapper from RelationData's mReverseType member r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D163858
2022-12-05 23:42:52 +00:00
James Teh 0ed15e0a86 Bug 1802268 part 2: Reinstate partial invalidation of cached HyperText offsets for local HyperTextAccessible. r=eeejay
In bug 1766794, I replaced partial invalidation of cached offsets with full cache invalidation.
I did this to simplify the code, since the offsets cache was being extended to RemoteAccessible.
This is fine for RemoteAccessible because offsets are only needed there when clients query them.
However, for local HyperTextAccessible, offsets are always required to fire text events.
Full cache invalidation there meant that many insertions into a large container was very expensive.

To fix this, reinstate the ability to partially invalidate the offsets cache.
This is largely the code I previously removed from HyperTextAccessible, with some tweaks for readability.

Differential Revision: https://phabricator.services.mozilla.com/D163418
2022-12-05 23:27:24 +00:00
James Teh 2dea45bfcf Bug 1802268 part 1: Add AccAttributes::GetMutableAttribute. r=eeejay,nlapre
We will soon have an offsets array in the parent process cache which is not built in one shot.
Instead, we will gradually cache more offsets as they are requested.
To do this, we need a way to get an array from the cache which can be modified in-place.

Differential Revision: https://phabricator.services.mozilla.com/D163417
2022-12-05 23:27:23 +00:00
James Teh 7cf81f44ff Bug 1793978: Fail gracefully (instead of crashing) when an invalid offset is given to HyperTextAccessibleBase::TextAt/Before/AfterOffset. r=morgan
An invalid aOffset results in an invalid TextLeafPoint, so just return early if that happens.

Differential Revision: https://phabricator.services.mozilla.com/D163807
2022-12-05 23:18:45 +00:00
Butkovits Atila b70ae77aa5 Bug 1778821 - disable browser_text_input.js on Mac for frequent failures. r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D163160
2022-12-04 23:29:50 +00:00
Cristian Tuns b5ecdf11a3 Backed out 4 changesets (bug 1676068) for causing geckoview failures CLOSED TREE
Backed out changeset ee747c27b9bc (bug 1676068)
Backed out changeset 0876924c66e8 (bug 1676068)
Backed out changeset 30a8292a37ae (bug 1676068)
Backed out changeset 19a0b7a0987c (bug 1676068)
2022-12-01 19:44:47 -05:00
Anna Yeddi 3614a03fd1 Bug 1676068 - Datepicker Pt.3 - Replace Reset button in the DateTimeBox with Calendar one. r=Jamie,fluent-reviewers,mconley,kcochrane
Done:
- Functionality of the button was changed from cleaning the field value to toggling the datepicker dialog.
- Pre-existing issues resolved: Updated datetimebox.js to use `keydown` event instead of the deprecated `keypress` (which does not preventDefault for buttons), added default handling of digits for `keydown`, and added a check to avoid running duplicate cleanup when the picker is closed
- Removed ability to open a date picker from editable elements of the `<input type="date">` field and ensured keyboard and mouse/touch click are working for the Calendar button, while Escape functionality remained
- Updated `onBlur` logic for the button in accordance with its new functionaility
- New Calendar SVG icon was created by Katie Caldwell and optimized by Sam Foster
- Provided HCM support for the Calendar button
- Ensured the Calendar button is not shown on `<input type=time>` to preserve the existent UX
- Added Fluent l10n to the content process and provided `title` to the image button (SVG is marked as `role="none"` to avoid exposure to assistive technology)
- Added functional and markup tests for the Calendar button and its localization, updated Reset button tests to the Calendar one

ToDo (further patch):
1. Pt.4 - Ensure keyboard support when focus moves between processes

ToDo (other dependencies/bugs):
1. Investigations into if we should show a calendar button for read-only fields and if a Reset button would be benefitial to be shown for a `type=time` inputs

Depends on D139981

Differential Revision: https://phabricator.services.mozilla.com/D141175
2022-12-01 22:35:07 +00:00
Cristian Tuns 5359f6f6d9 Backed out 4 changesets (bug 1676068) for causing mochitest failures CLOSED TREE
Backed out changeset 3e8b24890eb2 (bug 1676068)
Backed out changeset 7ba99b58ac35 (bug 1676068)
Backed out changeset fc1c62ea6542 (bug 1676068)
Backed out changeset ca2fed771557 (bug 1676068)
2022-12-01 15:48:37 -05:00
Nathan LaPre 96461033cd Bug 1711273: Preserve columnheader, rowheader roles with certain CSS displays set, r=Jamie
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
2022-12-01 20:17:32 +00:00
Anna Yeddi 6c9a5814b5 Bug 1676068 - Datepicker Pt.3 - Replace Reset button in the DateTimeBox with Calendar one. r=Jamie,fluent-reviewers,mconley,kcochrane
Done:
- Functionality of the button was changed from cleaning the field value to toggling the datepicker dialog.
- Pre-existing issues resolved: Updated datetimebox.js to use `keydown` event instead of the deprecated `keypress` (which does not preventDefault for buttons), added default handling of digits for `keydown`, and added a check to avoid running duplicate cleanup when the picker is closed
- Removed ability to open a date picker from editable elements of the `<input type="date">` field and ensured keyboard and mouse/touch click are working for the Calendar button, while Escape functionality remained
- Updated `onBlur` logic for the button in accordance with its new functionaility
- New Calendar SVG icon was created by Katie Caldwell and optimized by Sam Foster
- Provided HCM support for the Calendar button
- Ensured the Calendar button is not shown on `<input type=time>` to preserve the existent UX
- Added Fluent l10n to the content process and provided `title` to the image button (SVG is marked as `role="none"` to avoid exposure to assistive technology)
- Added functional and markup tests for the Calendar button and its localization, updated Reset button tests to the Calendar one

ToDo (further patch):
1. Pt.4 - Ensure keyboard support when focus moves between processes

ToDo (other dependencies/bugs):
1. Investigations into if we should show a calendar button for read-only fields and if a Reset button would be benefitial to be shown for a `type=time` inputs

Depends on D139981

Differential Revision: https://phabricator.services.mozilla.com/D141175
2022-12-01 19:50:03 +00:00
James Teh f142728ad8 Bug 1801756: When hit testing in RemoteAccessibleBase, search for the deepest matching descendant of the first match. r=morgan
See the code comments for explanation.

Differential Revision: https://phabricator.services.mozilla.com/D163082
2022-12-01 04:32:28 +00:00
James Teh c261e718e9 Bug 1803041: Expose valuetext object attribute for cached RemoteAccessible. r=eeejay
This is needed by ATK.

Differential Revision: https://phabricator.services.mozilla.com/D163304
2022-11-30 02:03:04 +00:00
Eitan Isaacson f9fbfefda3 Bug 1801986 - Set pivot root to top remote document. r=Jamie
The pivot should never cross from remote into parent process local
containers. We need to explicitly set the root for the pivot, and
assert for this in the pivot traversal methods.

Differential Revision: https://phabricator.services.mozilla.com/D163285
2022-11-29 20:31:21 +00:00
James Teh 4e85ff0fe9 Bug 1802866: Don't send a11y cache pushes containing no data. r=nlapre
This can happen if we're pushing the tree for only moved (no new) Accessibles, since we don't send cache pushes for those.
It can also happen if an Accessible generates no cache data, which is rare but probably not impossible.
Making IPDL calls with no data is wasteful, so don't do it.

Differential Revision: https://phabricator.services.mozilla.com/D163203
2022-11-29 07:01:25 +00:00
James Teh 5508057e9f Bug 1801879: Don't cross document boundaries in nsAccUtils::GetSelectableContainer. r=eeejay,geckoview-reviewers,owlish
Trying to access a local OuterDocAccessible from the Android UI thread was causing a crash.
We shouldn't be crossing document boundaries anyway.

Differential Revision: https://phabricator.services.mozilla.com/D163067
2022-11-29 05:18:23 +00:00
James Teh 09faad9a85 Bug 1802297: Don't fire show events for the initial a11y tree push. r=eeejay
After bug 1779156, show events were fired from RecvCache, rather than from RecvShowEvent.
This was done to ensure that cache data was available when the event was fired.
However, because RecvCache fired a show event for every initial cache push, this meant that it also fired one for the document itself, plus all the document's initial direct children.
Firing an event for the document caused problems for ATK, since the parent was null for all top level documents.
This also meant we were firing a lot of unnecessary show events, which could be a performance problem for documents with a lot of initial direct children.
To fix this, provide an explicit argument to PDocAccessible::Cache specifying whether to dispatch a show event or not.
This replaces the existing aFinal argument, which was never used.

Differential Revision: https://phabricator.services.mozilla.com/D163192
2022-11-29 05:06:46 +00:00
James Teh 218dae1d78 Bug 1801907: Fail gracefully (don't crash) if a caller passes an invalid end offset to HyperTextAccessibleBase::TextBounds. r=morgan
This was causing crashes with Orca in some cases.

Differential Revision: https://phabricator.services.mozilla.com/D163243
2022-11-28 19:31:27 +00:00
Marco Castelluccio 16a078cc32 Bug 1790816 - Reformat accessible/ with isort. r=linter-reviewers,Standard8 DONTBUILD
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D162662
2022-11-23 12:38:45 +00:00
James Teh fc48558dff Bug 1778433 part 3: Remove defunct *AccessibleWrap types. r=nlapre
Now that they're no longer referenced, we can get rid of them.

Differential Revision: https://phabricator.services.mozilla.com/D162457
2022-11-22 04:55:11 +00:00
James Teh 1fc8f98cd1 Bug 1778433 part 2: Change references to defunct *AccessibleWrap types to use the corresponding *Accessible classes. r=nlapre
These are effectively type aliases on all platforms now and are no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D162456
2022-11-22 04:55:11 +00:00
James Teh c40b2a87c0 Bug 1778433 part 1: Move Windows specific functionality from XULMenuItemAccessibleWrap to MsaaXULMenuitemAccessible. r=nlapre
This never really belonged in XULMenuItemAccessibleWrap::Name, as it's specific to MSAA.
This will allow us to remove this Wrap class.

Differential Revision: https://phabricator.services.mozilla.com/D162455
2022-11-22 04:55:11 +00:00
James Teh fadbd93a95 Bug 1766147: Remove now unused eProxyType, Accessible::IsProxy and LocalAccessible::mBits. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D162448
2022-11-22 04:17:41 +00:00
James Teh da36b6436a Bug 1800755: Don't send selection changes for defunct Accessibles. r=morgan
When a selection event is dropped due to coalescence, we still include the impacted Accessible in the SelectedAccessiblesChanged notification we send to the parent process.
Although we skip events with defunct targets, we weren't skipping defunct items referenced by selection events.
This meant that if an Accessible was selected/unselected but was shut down before we sent SelectedAccessiblesChanged, the notification would include a dead Accessible.
This was causing an assertion in the parent process.
To fix this, we now ignore defunct items in selection events.

Differential Revision: https://phabricator.services.mozilla.com/D162551
2022-11-22 02:24:28 +00:00
James Teh f6e656ccfe Bug 1795203: Remove dead code for listbox owned by a combobox in ARIATransformRole. r=nlapre
Gecko switched to mutating the tree structure for aria-owns many years ago instead of using relations, so this is now dead code.
Note that a test case was added for this aria-owns case in accessible/tests/mochitest/role/test_general.html in bug 1044431.
This still passes with this code removed.

Differential Revision: https://phabricator.services.mozilla.com/D162459
2022-11-22 02:16:29 +00:00
Morgan Rae Reschenberg 2f95a2c265 Bug 1800777: Don't recreate reverse rel maps for accs that have been shutdown r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D162326
2022-11-21 17:54:31 +00:00
Emilio Cobos Álvarez 4f69b540a6 Bug 1801138 - Ensure empty label values don't collapse. r=dao
Add a zwsp character to ensure they're not considered an empty line.

Differential Revision: https://phabricator.services.mozilla.com/D162301
2022-11-19 20:38:55 +00:00
James Teh eb1f9b4447 Bug 1800731: When a shadow root is attached, schedule removal of any unslotted a11y children in the host. r=morgan,emilio
PruneOrInsertSubtree already has code to deal with this.
However, layout previously didn't notify a11y about the change if a shadow root was attached without any content, so PruneOrInsertSubtree was never called.
We now schedule re-evaluation of the a11y tree of the shadow host when DOM notifies layout about the attached shadow root.
This will call PruneOrInsertSubtree during the next refresh tick.

Differential Revision: https://phabricator.services.mozilla.com/D162263
2022-11-19 01:31:57 +00:00
James Teh 3dce464cc5 Bug 1800780: Null check mContent in LocalAccessible::IsAbbreviation. r=nlapre
When we push a cache update for tables, we call IsProbablyLayoutTable.
That in turn checks whether the first grandchild LocalAccessible of each row is an abbreviation.
If there is a malformed table containing an iframe as a child of a row, this grandchild will be an embedded DocAccessible.
Since a DocAccessible has a null mContent prior to DoInitialUpdate, calling IsAbbreviation on this would previously crash because it didn't null check mContent.
The fix is simply to null check mContent.

Differential Revision: https://phabricator.services.mozilla.com/D162360
2022-11-18 22:27:00 +00:00
James Teh 35eb75ce3d Bug 1800181: Atomize font family and language a11y text attributes. r=morgan
This reduces memory used by the cache, since the same font family and language strings often occur many times in the same document (and likely even across documents).

Differential Revision: https://phabricator.services.mozilla.com/D162276
2022-11-18 22:03:56 +00:00
Nathan LaPre af71bdeca8 Bug 1800749: Prevent position:absolute th elements from using HTMLTableHeaderCellAccessible, r=Jamie
Layout doesn't consider these types of th elements to be table cells since there
is no underlying table layout. This patch asks layout whether it considers the
frame's accessible type to be a table cell accessible. If it does, continue to
use the HTMLTableHeaderCellAccessible, but - otherwise - use a generic grid cell
accessible. This revision also adds a test to verify the behavior of th in this
situation. This essentially repeats the logic already in existence for td.

Differential Revision: https://phabricator.services.mozilla.com/D162357
2022-11-18 17:50:44 +00:00
Emilio Cobos Álvarez 486040e135 Bug 1801094 - Clean-up a bit WhereToScroll. r=layout-reviewers,credential-management-reviewers,sgalich,dshin
This doesn't change behavior, but clarifies a bit the naming to match
the scrollIntoView() API. Also makes the name generic (rather than
Top/Left/etc), since for scrollIntoView we want to make the axes be
logical.

That will be done in bug 1789464 (probably via an extra ScrollFlag).

Differential Revision: https://phabricator.services.mozilla.com/D162286
2022-11-18 10:02:23 +00:00
James Teh 86ff3c800c Bug 1796734 part 4: Move calculation of the focused state to Accessible::ApplyImplicitState. r=morgan
The code which calculated the focused state in RemoteAccessibleBase was incorrect.
It used the focused BrowserParent rather than the focused BrowsingContext to determine if the document was focused, which meant it treated a top level document as focused even when an embedded in-process iframe had focus.
FocusManager::FocusedAccessible (and now FocusManager::IsFocused) do the right thing, so we can use IsFocused instead.
LocalAccessible already used IsFocused to calculate the focused state.
Since both local and remote both now do the same thing, we can move this into Accessible::ApplyImplicitState.

Differential Revision: https://phabricator.services.mozilla.com/D161876
2022-11-18 01:37:07 +00:00
James Teh 0885462d9e Bug 1796734 part 3: Unify FocusManager::IsFocused so it can support RemoteAccessible. r=morgan
Previously, IsFocused had a separate implementation instead of just using FocusedAccessible because of cases years ago where it would unintentionally cause us to create a DocAccessible for an initial about:blank document.
As far as I can tell, we no longer prevent creation of DocAccessibles for initial documents because they aren't necessarily temporary documents.
Therefore, we can just compare against FocusedAccessible now.
Since FocusedAccessible is already unified, this makes unifying IsFocused very simple.
This paves the way for unifying correct calculation of the focused state.

This necessitated a change to FocusedLocalAccessible to prevent it from trying to get/create a DocAccessible when the accessibility service is shutting down.
Shutting down the service shuts down all documents, and shutting down a document now calls IsFocused, which causes us to get/create a DocAccessible.
That isn't safe while the service is shutting down and was causing a crash.

Differential Revision: https://phabricator.services.mozilla.com/D161875
2022-11-18 01:37:07 +00:00
James Teh 26de9d77df Bug 1796734 part 2: Don't try to get the focused LocalAccessible from the Android UI thread. r=morgan
IN subsequent patches, IsFocused will be called when querying the state of a RemoteAccessible and IsFocused calls FocusedAccessible.
A RemoteAccessible can be queried from the Android UI thread (which is different to Gecko's main thread), but it's not safe to deal with LocalAccessibles off the main thread.
Therefore, don't try to call FocusedLocalAccessible in this case.

Differential Revision: https://phabricator.services.mozilla.com/D162177
2022-11-18 01:37:06 +00:00
James Teh fdf8f1eb26 Bug 1796734 part 1: Clear FocusManager's active item if an Accessible is still focused while the document is shutting down. r=eeejay
See the code comment for further details.
In subsequent patches, IsFocused is refactored to call FocusedAccessible, which asserts that mActiveItem is not defunct.
Without this active item fix, that change would cause accessible/tests/mochitest/actions/test_keys.xhtml to assert.

Differential Revision: https://phabricator.services.mozilla.com/D161887
2022-11-18 01:37:06 +00:00
Michael Comella 8ecd9795b5 Bug 1800949 - add accessibility Architecture doc with info on trees. r=morgan,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D162228
2022-11-18 00:50:58 +00:00
Nathan LaPre 3ec133c70a Bug 1631693: Expose value on non-editable ARIA comboboxes, r=Jamie
This revision expands the reporting of ARIA combobox values to non-editable
comboboxes with no selected option. In these cases, according to the spec, we
should report a value "represented by its descendant elements [...] determined
using the same method used to compute the name of a button from its descendant
content." In this revision, I interpret that to mean, roughly, nsTextEquivUtils'
GetTextEquivFromSubtree, which is tantamount to the name calculation, except
that it crucially avoids rejecting the combobox for having eNameFromValueRule,
unlike GetNameFromSubtree. This revision updates this logic in LocalAccessible
and RemoteAccessibleBase, and adds tests to verify the above.

Differential Revision: https://phabricator.services.mozilla.com/D162229
2022-11-17 18:40:08 +00:00
Mark Banner 46853be577 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (accesible/). r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161915
2022-11-17 12:00:31 +00:00
James Teh 033b3705fb Bug 1800863: Clear mChildren in DocAccessibleParent::Destroy. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D162255
2022-11-17 01:53:57 +00:00
Noemi Erli a5eaa5751e Backed out 4 changesets (bug 1796734) for causing devtools failures CLOSED TREE
Backed out changeset a61a65628922 (bug 1796734)
Backed out changeset 227725c927de (bug 1796734)
Backed out changeset 0b9e12e2171c (bug 1796734)
Backed out changeset 2ace9061ee13 (bug 1796734)
2022-11-17 03:31:33 +02:00
James Teh 6a849c9b76 Bug 1796734 part 4: Move calculation of the focused state to Accessible::ApplyImplicitState. r=morgan
The code which calculated the focused state in RemoteAccessibleBase was incorrect.
It used the focused BrowserParent rather than the focused BrowsingContext to determine if the document was focused, which meant it treated a top level document as focused even when an embedded in-process iframe had focus.
FocusManager::FocusedAccessible (and now FocusManager::IsFocused) do the right thing, so we can use IsFocused instead.
LocalAccessible already used IsFocused to calculate the focused state.
Since both local and remote both now do the same thing, we can move this into Accessible::ApplyImplicitState.

Differential Revision: https://phabricator.services.mozilla.com/D161876
2022-11-16 23:21:24 +00:00
James Teh a3c43fd056 Bug 1796734 part 3: Unify FocusManager::IsFocused so it can support RemoteAccessible. r=morgan
Previously, IsFocused had a separate implementation instead of just using FocusedAccessible because of cases years ago where it would unintentionally cause us to create a DocAccessible for an initial about:blank document.
As far as I can tell, we no longer prevent creation of DocAccessibles for initial documents because they aren't necessarily temporary documents.
Therefore, we can just compare against FocusedAccessible now.
Since FocusedAccessible is already unified, this makes unifying IsFocused very simple.
This paves the way for unifying correct calculation of the focused state.

Differential Revision: https://phabricator.services.mozilla.com/D161875
2022-11-16 23:21:23 +00:00
James Teh 61e3c5bebe Bug 1796734 part 2: Don't try to get the focused LocalAccessible from the Android UI thread. r=morgan
IN subsequent patches, IsFocused will be called when querying the state of a RemoteAccessible and IsFocused calls FocusedAccessible.
A RemoteAccessible can be queried from the Android UI thread (which is different to Gecko's main thread), but it's not safe to deal with LocalAccessibles off the main thread.
Therefore, don't try to call FocusedLocalAccessible in this case.

Differential Revision: https://phabricator.services.mozilla.com/D162177
2022-11-16 23:21:23 +00:00
James Teh ab6ebb6e12 Bug 1796734 part 1: Clear FocusManager's active item if an Accessible is still focused while the document is shutting down. r=eeejay
See the code comment for further details.
In subsequent patches, IsFocused is refactored to call FocusedAccessible, which asserts that mActiveItem is not defunct.
Without this active item fix, that change would cause accessible/tests/mochitest/actions/test_keys.xhtml to assert.

Differential Revision: https://phabricator.services.mozilla.com/D161887
2022-11-16 23:21:22 +00:00
Michael Comella 8a3e28c236 Bug 1798388 - add DocAccessible::ProcessQueuedCacheUpdates profiler marker. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D162238
2022-11-16 23:19:02 +00:00
Morgan Rae Reschenberg b3214f51b9 Bug 1752054: Map radio and checkbox menu items to MOX classes for radio buttons and checkboxes r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D162170
2022-11-16 18:18:54 +00:00
Emilio Cobos Álvarez 9ae8258a6e Bug 1799460 - a11y fixes for my previous changes. r=Jamie
The button tweak is needed because now if you have:

  <button>
    <label value="foo">
  </button>

There is a text node for the value (generated content), and the <button>
shouldn't steal it.

I was getting crashes without it because XULButtonAccessible isn't
hypertext (so I wonder if the IsText() code-path can even be reached?).

Same issue with XULComboboxAccessible, fixed the same way by preventing
text there (preserving behavior).

Setting crop="center" now reframes, so test_label needs to change.

Differential Revision: https://phabricator.services.mozilla.com/D162011
2022-11-16 16:27:59 +00:00
Paul Bone 949432f9a7 Bug 1800582 - Trace mAccessibles rather than mChildren r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D162080
2022-11-16 09:55:28 +00:00
Paul Bone 712a94ff1f Bug 1800582 - Don't count atoms in the a11y cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D162079
2022-11-16 09:55:27 +00:00
Morgan Rae Reschenberg 46439cea0c Bug 1774330: Only return ancestors from ChildAtPoint r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D160849
2022-11-15 19:30:12 +00:00
James Teh 2802599def Bug 1800048: Don't expose the LINKS_TO relation via ATK and IA2. r=morgan
This relation isn't part of the ATK and IA2 specs.
In ATK and the older way of retrieving relations in IA2, we have to calculate all relations.
Since LINKS_TO can be slow and it isn't supported by ATK and IA2 anyway, let's just not expose it at all for them.

Differential Revision: https://phabricator.services.mozilla.com/D161775
2022-11-15 06:46:24 +00:00
Michael Comella 7cbe6a2464 Bug 1797863 - add class documentation for accessibility tree nodes. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D160583
2022-11-15 02:49:44 +00:00
Iulian Moraru 5563067d62 Backed out 3 changesets (bug 1796734) for causing multiple Accessible related test crashes. CLOSED TREE
Backed out changeset 871e7fe357a6 (bug 1796734)
Backed out changeset 01e00626303a (bug 1796734)
Backed out changeset cfb43833d08b (bug 1796734)
2022-11-15 04:10:02 +02:00
James Teh a1987e0653 Bug 1796734 part 3: Move calculation of the focused state to Accessible::ApplyImplicitState. r=morgan
The code which calculated the focused state in RemoteAccessibleBase was incorrect.
It used the focused BrowserParent rather than the focused BrowsingContext to determine if the document was focused, which meant it treated a top level document as focused even when an embedded in-process iframe had focus.
FocusManager::FocusedAccessible (and now FocusManager::IsFocused) do the right thing, so we can use IsFocused instead.
LocalAccessible already used IsFocused to calculate the focused state.
Since both local and remote both now do the same thing, we can move this into Accessible::ApplyImplicitState.

Differential Revision: https://phabricator.services.mozilla.com/D161876
2022-11-15 01:30:01 +00:00
James Teh 6aab52e83b Bug 1796734 part 2: Unify FocusManager::IsFocused so it can support RemoteAccessible. r=morgan
Previously, IsFocused had a separate implementation instead of just using FocusedAccessible because of cases years ago where it would unintentionally cause us to create a DocAccessible for an initial about:blank document.
As far as I can tell, we no longer prevent creation of DocAccessibles for initial documents because they aren't necessarily temporary documents.
Therefore, we can just compare against FocusedAccessible now.
Since FocusedAccessible is already unified, this makes unifying IsFocused very simple.
This paves the way for unifying correct calculation of the focused state.

Differential Revision: https://phabricator.services.mozilla.com/D161875
2022-11-15 01:30:00 +00:00
James Teh ef805911c0 Bug 1796734 part 1: Clear FocusManager's active item if an Accessible is still focused while the document is shutting down. r=eeejay
See the code comment for further details.
In subsequent patches, IsFocused is refactored to call FocusedAccessible, which asserts that mActiveItem is not defunct.
Without this active item fix, that change would cause accessible/tests/mochitest/actions/test_keys.xhtml to assert.

Differential Revision: https://phabricator.services.mozilla.com/D161887
2022-11-15 01:30:00 +00:00
Eitan Isaacson d2a883bac9 Bug 1800555 - Remove 471493.xhtml crash test. r=Jamie
It already has a mochitest and is probably old enough that we don't need
it. Loading XUL in content with e10s enabled is not something our cache
is prepared for yet.

Differential Revision: https://phabricator.services.mozilla.com/D162057
2022-11-15 01:20:17 +00:00
James Teh 2d2bef0c6a Bug 1789239: Expose the id object attribute for cached RemoteAccessible. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D161874
2022-11-14 23:29:47 +00:00
James Teh f520d4fa05 Bug 1789959: Gracefully handle mCachedFields being null in xpcAccessible::GetCache. r=nlapre
Otherwise, we crash when inspecting RemoteAccessible objects in Dev Tools if the cache is disabled or hasn't been received yet.

Differential Revision: https://phabricator.services.mozilla.com/D161872
2022-11-14 23:29:07 +00:00
James Teh 8fa2bf084a Bug 1789384: Don't ascend past documents in Accessible::GetLevel. r=eeejay
On Android, we access RemoteAccessibles from the UI thread.
It's not safe to access LocalAccessibles on the UI thread.
The a11y code avoids touching LocalAccessibles on the UI thread directly.
However, Accessible::GetLevel was previously walking ancestry, which might hit a LocalAccessible and result in a crash.
To avoid this, don't ascend past a DocAccessible.
Level calculation shouldn't be crossing document boundaries anyway.
Note that we don't have to do this when we simply retrieve the parent (but nothing further) because we only do that for certain roles and the parent of these roles could never be an OuterDoc.

Differential Revision: https://phabricator.services.mozilla.com/D161873
2022-11-14 23:04:44 +00:00
Eitan Isaacson 5781216c9b Bug 1800399 - Disable spell check browser test. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161968
2022-11-14 17:19:23 +00:00
Ting-Yu Lin 5a69e0e771 Bug 1799732 Part 1 - Replace GetChildList(kPrincipalList) with PrincipalChildList(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161862
2022-11-12 04:38:52 +00:00
Noemi Erli 7c40c0e983 Backed out 3 changesets (bug 1799732) for causing build bustages in nsIFrame.cpp CLOSED TREE
Backed out changeset e559f9dbc76f (bug 1799732)
Backed out changeset c40fda7a8b0b (bug 1799732)
Backed out changeset 1f84bfb41ab8 (bug 1799732)
2022-11-12 02:16:45 +02:00
Ting-Yu Lin 15dcf36084 Bug 1799732 Part 1 - Replace GetChildList(kPrincipalList) with PrincipalChildList(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161862
2022-11-11 23:44:16 +00:00
Butkovits Atila ac79dbae6a Backed out 2 changesets (bug 1800048) for causing failures at browser_caching_relations_002.js. CLOSED TREE
Backed out changeset 9d0e9bd86e73 (bug 1800048)
Backed out changeset 59b83f2de870 (bug 1800048)
2022-11-11 16:30:38 +02:00
Butkovits Atila 1f29d57e14 Bug 1800048 - Lint fix. a=fix 2022-11-11 12:56:24 +02:00
James Teh 99e5d6af82 Bug 1800048: Don't expose the LINKS_TO relation via ATK and IA2. r=morgan
This relation isn't part of the ATK and IA2 specs.
In ATK and the older way of retrieving relations in IA2, we have to calculate all relations.
Since LINKS_TO can be slow and it isn't supported by ATK and IA2 anyway, let's just not expose it at all for them.

Differential Revision: https://phabricator.services.mozilla.com/D161775
2022-11-11 10:13:27 +00:00
Marian-Vasile Laza 99789d1ff6 Backed out changeset 09fb44f9d0b4 (bug 1800048) for causing mochitest failures on browser_caching_relations.js. CLOSED TREE 2022-11-11 07:27:50 +02:00
Morgan Rae Reschenberg 1d82cef271 Bug 1800060: Avoid computing LINKS_TO for links with no anchor r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161826
2022-11-11 00:03:29 +00:00
Morgan Rae Reschenberg 19483cce77 Bug 1798950: Only trim titles that are entirely whitespace r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D161746
2022-11-11 00:02:42 +00:00
James Teh be7e6f1f99 Bug 1800048: Don't expose the LINKS_TO relation via ATK and IA2. r=morgan
This relation isn't part of the ATK and IA2 specs.
In ATK and the older way of retrieving relations in IA2, we have to calculate all relations.
Since LINKS_TO can be slow and it isn't supported by ATK and IA2 anyway, let's just not expose it at all for them.

Differential Revision: https://phabricator.services.mozilla.com/D161775
2022-11-10 23:27:07 +00:00
James Teh 9246db7861 Bug 1798614 follow-up: Don't send DeleteEntry on initial cache updates for opacity and table cell headers. r=morgan
The primary intent of the first patch here was to avoid memory wasted by caching default opacity values.
Unfortunately, this was defeated by the fact that we previously sent DeleteEntry for initial cache updates of opacity.
This resulted in DeleteEntry being stored in the parent process cache, since DeleteEntry is only handled specially for cache updates, not initial pushes.
We now only send DeleteEntry for cache updates, which is consistent with what we do for other cache attributes.
While fixing this, I discovered that we made the same mistake for table cell headers, so I fixed that as well.

Differential Revision: https://phabricator.services.mozilla.com/D161760
2022-11-10 23:26:21 +00:00
Marian-Vasile Laza 14b3f8230f Backed out changeset 8003d7c416e1 (bug 1798950) for causing mochitest failures on browser_text_leaf.js. CLOSED TREE 2022-11-10 22:49:02 +02:00
Morgan Rae Reschenberg a068f49437 Bug 1799578: Compute relative offsets for continuations to avoid double counting padding when computing CharBounds r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161736
2022-11-10 19:12:54 +00:00
Morgan Rae Reschenberg 931bfe31d9 Bug 1798950: Only trim titles that are entirely whitespace r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D161746
2022-11-10 19:00:57 +00:00
James Teh 0450470092 Bug 1798614: Assume a default of 1.0 for Accessible::Opacity unless otherwise explicitly specified. r=morgan,eeejay
Previously, it was possible to have no value, but only for Accessibles without frames.
That effectively means display: contents, and since the content is visible (even though the element itself doesn't have a box), exposing it as non-opaque isn't important and arguably doesn't make sense.
This way, we avoid awastefully caching 1.0 for the vast majority of Accessibles.

Differential Revision: https://phabricator.services.mozilla.com/D161005
2022-11-10 04:19:29 +00:00
James Teh 6c51315821 Bug 1765217: Move OPAQUE1 state calculation into Accessible::ApplyImplicitState. r=morgan
This state is derived based on Accessible::Opacity, which is implemented for both local and remote Accessibles.
Thus, we can use common code to calculate this state.
As part of this, OPAQUE1 was added to kRemoteCalculatedStates so that it isn't included in the initial cache push, which also means we don't have to remove it later.

This patch also tweaks the test to flush layout so that the opacity change takes effect immediately in that process.
This is necessary to avoid a (graceful) timeout in untilCacheOk for non-caching tests, since there is no cache update to make untilCacheOk return before the timeout.

Differential Revision: https://phabricator.services.mozilla.com/D161004
2022-11-10 04:19:29 +00:00
James Teh 7cb59989fb Bug 1796733 part 8: Expose the implicit selected state on cached remote ARIA items when appropriate. r=morgan
This unifies and moves the existing logic from LocalAccessible::State to Accessible::ApplyImplicitState so it can be used for both local and remote Accessibles.

Differential Revision: https://phabricator.services.mozilla.com/D160884
2022-11-10 04:19:29 +00:00
James Teh 338a2a3e8d Bug 1796733 part 7: Add Accessible::ApplyImplicitState. r=morgan
This gives us a place to put state calculation code common to both local and remote Accessibles.
It will be used to unify the implicit selected state in the next patch, among other things.

Differential Revision: https://phabricator.services.mozilla.com/D160883
2022-11-10 04:19:28 +00:00
James Teh 526470477a Bug 1796733 part 6: Add Accessible::ARIASelected and support it for cached RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D160882
2022-11-10 04:19:28 +00:00
James Teh 78587c97ba Bug 1796733 part 5: Add an overload of nsAccUtils::NormalizeARIAToken which takes an Element. r=avandolder
The next patch in this stack adds a method to retrieve aria-selected.
The easiest way to do this is using NormalizeARIAToken.
This overload takes an Element and checks both the Element and ElementInternals.

Differential Revision: https://phabricator.services.mozilla.com/D161241
2022-11-10 04:19:27 +00:00
James Teh 89c3a37a29 Bug 1796733 part 4: Unify nsAccUtils::GetSelectableContainer. r=morgan
We need this to unify support for the implicit selected state on ARIA items.

Differential Revision: https://phabricator.services.mozilla.com/D160881
2022-11-10 04:19:27 +00:00
James Teh e5e1d90c3b Bug 1796733 part 3: Unify FocusManager::IsFocusWithin. r=morgan
We need this to unify support for the implicit selected state on ARIA items.

Differential Revision: https://phabricator.services.mozilla.com/D160880
2022-11-10 04:19:27 +00:00
James Teh b1d08576eb Bug 1796733 part 2: Add unified FocusManager::FocusedAccessible. r=morgan
This moves the unified focus logic from DocAccessible::FocusedChild to FocusManager.
This is needed in order to support a unified IsFocusWithin method.

Differential Revision: https://phabricator.services.mozilla.com/D160879
2022-11-10 04:19:26 +00:00
James Teh 77dc8b7905 Bug 1796733 part 1: Rename FocusManager::FocusedAccessible to FocusedLocalAccessible. r=morgan
This is in preparation for a unified FocusedAccessible method which can handle both local and remote.

Differential Revision: https://phabricator.services.mozilla.com/D160878
2022-11-10 04:19:26 +00:00
Emilio Cobos Álvarez ccf616b673 Bug 1799343 - Simplify XUL popup handling. r=TYLin
* Make non-menulist popups just absolute positioned top-layer items.
 * Simplify menulist popups to just be static-positioned items under
   nsMenuFrame.

We need to keep kPopupList only for nsMenuFrame. In the future it can be
removed, see TODO in xul.css

Differential Revision: https://phabricator.services.mozilla.com/D161404
2022-11-09 20:38:04 +00:00
Nathan LaPre ce54599766 Bug 1748585: Remove img elements with alt="" from the a11y tree, r=Jamie
This revision changes the logic for creation and updating of accessibles
corresponding to elements that produce image accessibles, such that alt=""
(without click listeners or any other aria attributes that force an accessible)
will effectively remove that element's accessible from the accessibility tree.
Next, this revision removes the concept of eNoNameOnPurpose from accessible name
handling, since it's now unnecessary now that alt="" means "don't create an
accessible" in most cases. This revision also adds tests to verify the
functionality and updates existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D160706
2022-11-09 20:05:01 +00:00
Csoregi Natalia 9d2ea21e26 Backed out 3 changesets (bug 1799343, bug 1799580) for causing failures on /browser_history_after_appMenu.js. CLOSED TREE
Backed out changeset 63c270ba91ad (bug 1799343)
Backed out changeset 713e6f0fbd20 (bug 1799580)
Backed out changeset 42d1b8742662 (bug 1799343)
2022-11-09 21:26:06 +02:00
Emilio Cobos Álvarez 5c5c337a98 Bug 1799343 - Simplify XUL popup handling. r=TYLin
* Make non-menulist popups just absolute positioned top-layer items.
 * Simplify menulist popups to just be static-positioned items under
   nsMenuFrame.

We need to keep kPopupList only for nsMenuFrame. In the future it can be
removed, see TODO in xul.css

Differential Revision: https://phabricator.services.mozilla.com/D161404
2022-11-09 14:19:22 +00:00
Cristian Tuns 01dcbc81d3 Backed out 2 changesets (bug 1799580, bug 1799343) for causing mochitest failures on win7 CLOSED TREE
Backed out changeset fb0df93a4719 (bug 1799580)
Backed out changeset 493c9ca00c91 (bug 1799343)
2022-11-09 07:15:51 -05:00
Emilio Cobos Álvarez b513d45bea Bug 1799343 - Simplify XUL popup handling. r=TYLin
* Make non-menulist popups just absolute positioned top-layer items.
 * Simplify menulist popups to just be static-positioned items under
   nsMenuFrame.

We need to keep kPopupList only for nsMenuFrame. In the future it can be
removed, see TODO in xul.css

Differential Revision: https://phabricator.services.mozilla.com/D161404
2022-11-09 09:17:21 +00:00
Paul Bone e9369d0301 Bug 1769688 - Add a memory reporter for the a11y cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161242
2022-11-09 06:29:42 +00:00
Morgan Rae Reschenberg 93144325ec Bug 1799204: Update cached layout_guess when relevant HTML attr changes are obseved r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161339
2022-11-08 21:52:48 +00:00
Stanca Serban 7e4d1c009a Backed out changeset 835a66221d99 (bug 1799204) for causing mochitests failures on browser_table.js.CLOSED TREE 2022-11-08 21:27:58 +02:00
Morgan Rae Reschenberg e6edd38fd7 Bug 1799204: Update cached layout_guess when relevant HTML attr changes are obseved r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161339
2022-11-08 17:56:58 +00:00
Sandor Molnar 8e6fe2de11 Backed out 4 changesets (bug 1799343) for causing multiple crashes. CLOSED TREE
Backed out changeset 3150074bccfd (bug 1799343)
Backed out changeset 7f6358a0b692 (bug 1799343)
Backed out changeset 34f040f379b1 (bug 1799343)
Backed out changeset a609c8c27ca8 (bug 1799343)
2022-11-08 05:54:37 +02:00
James Teh ce6661d379 Bug 1794338: Clear the BrowsingContext when shutting down a DocAccessibleParent. r=morgan
It might be possible for a short while to have a DocAccessibleParent which has been shut down but is still managed by its BrowserParent.
In that case, DocAccessibleParent::GetFrom might previously have found the document via its BrowsingContext, thus returning a destroyed document.
This could cause problems when returning the focus if the document itself was the last thing focused.
To fix this, clear the BrowsingContext when shutting down a DocAccessibleParent so that it can't be found this way.
There is one case during actor construction where we call MarkAsShutdown instead of Destroy, and MarkAsShutdown isn't supposed to do any cleanup.
To deal with this, don't set the BrowsingContext until we're sure we're not going to call MarkAsShutdown.

Differential Revision: https://phabricator.services.mozilla.com/D161421
2022-11-08 03:20:16 +00:00
Emilio Cobos Álvarez 5a17c94e25 Bug 1799343 - Remove another test whose expectation doesn't hold.
I'll remove display: -moz-popup in a bit.

MANUAL PUSH: Fixes a11y orange CLOSED TREE
2022-11-08 02:30:21 +01:00
Sandor Molnar 6c10888096 Backed out changeset e6d5f17ee593 (bug 1794338) for causing asssertion/crashes in DocAccessibleParent CLOSED TREE 2022-11-08 02:01:41 +02:00
James Teh 9af5d4ad20 Bug 1794338: Clear the BrowsingContext when shutting down a DocAccessibleParent. r=morgan
It might be possible for a short while to have a DocAccessibleParent which has been shut down but is still managed by its BrowserParent.
In that case, DocAccessibleParent::GetFrom might previously have found the document via its BrowsingContext, thus returning a destroyed document.
This could cause problems when returning the focus if the document itself was the last thing focused.
To fix this, clear the BrowsingContext when shutting down a DocAccessibleParent so that it can't be found this way.
There is one case during actor construction where we call MarkAsShutdown instead of Destroy, and MarkAsShutdown isn't supposed to do any cleanup.
To deal with this, don't set the BrowsingContext until we're sure we're not going to call MarkAsShutdown.
I also added an assertion to DocAccessibleParent::GetAccessible, since we should really never call that on a destroyed document.

Differential Revision: https://phabricator.services.mozilla.com/D161421
2022-11-07 23:07:57 +00:00
Eitan Isaacson ad2c6e2eae Bug 1781332 - Disable iframe accessKey tests. r=Jamie
There is a bug in DOM (bug 1796846) that prematurely registers
access keys before there is a presShell in iframes.

We will get better coverage for our module if we disable the
iframe tests and enable it on mac.

Differential Revision: https://phabricator.services.mozilla.com/D161377
2022-11-07 23:00:42 +00:00
Morgan Rae Reschenberg 714fc71f61 Bug 1799219: Add untilCacheIs checks when verifying input values r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D161345
2022-11-07 22:52:50 +00:00
Marian-Vasile Laza f0f79d68f1 Backed out changeset e521fea384c5 (bug 1748585) for causing accessibility crashes (bug 1799208). 2022-11-05 23:52:36 +02:00
Eitan Isaacson 53efa67e52 Bug 1782140 - Check if current misspelled ranges match before waiting for event. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D161350
2022-11-05 00:01:16 +00:00
Eitan Isaacson 7467e72551 Bug 1775682 - Load content scripts later in browser tests. r=Jamie
The unresolved "Spawn" belongs to the loadContentScripts task. I believe
this is a failure in chrome tests when the test url is loaded with a
`src` attribute change a few lines earlier. The page is replaced and the
JS actor is destroyed with an unresolved promise.

SimpleTest.promiseFocus is supposed to safeguard against that, but it
doesn't seem to be working in this case.

Differential Revision: https://phabricator.services.mozilla.com/D161336
2022-11-04 23:52:26 +00:00
James Teh 145c5e1929 Bug 1798839 part 2: Fix HTML radio group position calculation for cached RemoteAccessible. r=eeejay
For HTML radios, we need to group using the name attribute.
AccGroupInfo doesn't know how to do this, but that's what we were using previously for cached RemoteAccessible.
MEMBER_OF knows how to do this, so we now use that.
In future, we should probably cache this somehow, but we're not doing this for LocalAccessible, so it's not a regression at least.

The tests for this previously worked with the cache enabled, but only due to a happy accident.
The radios were grouped in such a way that the AccGroupInfo code gave the expected result.
The tests have now been updated to exercise the new code (and they fail without the C++ part of this patch if the cache is enabled).

Differential Revision: https://phabricator.services.mozilla.com/D161111
2022-11-04 22:16:30 +00:00
James Teh 7ce5c9a0de Bug 1798839 part 1: Make browser_obj_group.js work on Windows, as well as running iframe, remote iframe and chrome variants. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D161110
2022-11-04 22:16:29 +00:00
Eitan Isaacson 899f8fc3fd Bug 1799001 - Make Ahem font CORS friendly. r=morgan
Use an sjs file to send an `Access-Control-Allow-Origin` header to allow
the font to be loaded from snippets.

Differential Revision: https://phabricator.services.mozilla.com/D161210
2022-11-04 19:27:16 +00:00
Razvan Cojocaru 1629218702 Bug 1060421 - Change the type of [Int]PointTyped::[x|y] back to [Int]CoordTyped. r=botond
[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).

Differential Revision: https://phabricator.services.mozilla.com/D160713
2022-11-04 18:29:35 +00:00
James Teh a84a8b21ce Bug 1798500: Support accessibility.force_disabled=-1 for ATK. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D161099
2022-11-04 02:37:27 +00:00
James Teh e09b8a6240 Bug 1798098: Prevent a11y tree walks by the Suggested Actions feature in Windows 11 22H2. r=nlapre
The patches in bug 1774285 prevent Suggested Actions a11y tree walking in most cases.
However, when a11y is already enabled, we can still get into a tree walk that triggers a hang when using Copy Phone Number on a tel: link.
This is because there is no selected text in this case, so Suggested Actions falls back to walking the tree.

This patch prevents these walks by returning 1 from get_nSelections within a timeout period after setting the clipboard, indicating that there is a selection when there isn't really.
Unfortunately, even though we lie about the selection count, the selection reported by get_selection still isn't valid.
Fixing that for a selection deep in the tree is difficult; we don't have enough information in the parent process to fake the selection properly.
Thus, Suggested Actions might then do a normal tree walk from the document, so we also return a 0 child count within this timeout period.
With the cache disabled, in-process Windows clients access content process Accessibles using COM proxies.
We must therefore hack get_nSelections and get_accChildCount in AccessibleHandler, which wraps these COM proxies for in-process clients.
This means that Firefox needs to be installed in order for this to work, since AccessibleHandler can only be used with an installed copy.
A11y performance without the cache is very poor without AccessibleHandler anyway.
Because AccessibleHandler is an entirely separate dll, we need to duplicate the suppression logic in AccessibleHandlerControl, which can be accessed by both Gecko and AccessibleHandler.

After all these attempts on the document, Suggested Actions falls back to walking from the root.
To prevent that walk, we return 0 for the child count on the root MsaaAccessible within the timeout period.

Differential Revision: https://phabricator.services.mozilla.com/D160746
2022-11-04 02:31:10 +00:00
Nathan LaPre 8c8a637b75 Bug 1748585: Remove img elements with alt="" from the a11y tree, r=Jamie
This revision changes the logic for creation and updating of accessibles
corresponding to img elements such that alt="" (without click listeners or any
other aria attribute that forces an accessible) will effectively remove that
img's accessible from the accessibility tree. Next, this revision removes the
concept of eNoNameOnPurpose from accessible name handling, since it's now
unnecessary now that alt="" means "don't create an accessible" in most cases.
This revision also adds tests to verify the functionality and updates existing tests.

Differential Revision: https://phabricator.services.mozilla.com/D160706
2022-11-03 19:28:49 +00:00
Morgan Rae Reschenberg 9c9939a496 Bug 1798781: Add awaits for select events on mac r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D161085
2022-11-03 17:00:59 +00:00
Eitan Isaacson 680d9510e8 Bug 1791152 - Drop entire accessible ID map in UnregisterAll. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D160835
2022-11-02 20:55:15 +00:00
Morgan Rae Reschenberg e70136af6d Bug 1798550: Use cached name accessor method when computing MEMBER_OF r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D160948
2022-11-02 19:32:58 +00:00
Morgan Rae Reschenberg 62549a5715 Bug 1798560: Links with empty anchors should return an empty relation for LINKS_TO r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D160952
2022-11-02 19:32:38 +00:00
Eitan Isaacson bbb5780267 Bug 1798037 - Notify of bounds change if root doc element is given. r=morgan
DocAccessible::GetAccessible() won't return the document if a root element
like body is passed. We need to check for that in NotifyOfPossibleBoundsChange
and use the document accessible in that case.

We can't modify GetAccessible() because that is not that method is used
extensively and that is not the expected behavior.

Differential Revision: https://phabricator.services.mozilla.com/D160677
2022-11-02 19:08:10 +00:00
Morgan Rae Reschenberg 5318c8b0a3 Bug 1790435: Don't apply rotor post-filter if AXSearchText is empty r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D160836
2022-11-02 17:12:47 +00:00
Sandor Molnar b6c8b21542 Backed out changeset 1b65ae3b0371 (bug 1791152) for causing android gv-junit-fis failures in SessionAccessibility CLOSED TREE 2022-11-02 21:05:46 +02:00
Eitan Isaacson 20d9729e85 Bug 1797393 - P3: Explicitly assign font name to text area in linebreak test. r=Jamie
For some reason the default monospace font in Linux is not actually
monospaced and a linebreak is not guaranteed.

Also disable spellcheck. It causes a reflow after caret move with certain fonts.

Differential Revision: https://phabricator.services.mozilla.com/D160301
2022-11-02 16:28:46 +00:00
Eitan Isaacson d52ec21565 Bug 1797393 - P2: Robustify spelling error text test. r=Jamie
Layout can trigger several text attribute changed events. We need to
wait until we get the correct one before continuing the test.

Differential Revision: https://phabricator.services.mozilla.com/D160300
2022-11-02 16:28:45 +00:00
Eitan Isaacson f4f958a316 Bug 1797393 - P1: Split and rename browser text tests. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D160299
2022-11-02 16:28:45 +00:00
Eitan Isaacson ffbb4d3202 Bug 1791152 - Drop entire accessible ID map in UnregisterAll. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D160835
2022-11-02 16:23:42 +00:00
Michael Comella d5ba5471ee Bug 1798388 - add profiler markers for common accessibility functions. r=eeejay
Here is a sample profile with the new markers: https://share.firefox.dev/3DMY1cs

Differential Revision: https://phabricator.services.mozilla.com/D160847
2022-11-02 16:23:24 +00:00
Michael Comella 10a0137f2e Bug 1798388 - add Accessibility profiler category; convert existing code. r=canaltinova,eeejay
We use profiler categories to separate out the profiler markers for major
components, such as DOM or Layout, to quickly understand what is happening in
each of them: this will also be helpful for accessibility. One might be
concerned that we're adding too many categories but I think it's fine: the
accessibility category shouldn't appear if accessibility services aren't in use.
Furthermore, if accessibility code is running when it's unexpected, having the
accessibility category appear will only highlight that fact.

Differential Revision: https://phabricator.services.mozilla.com/D160846
2022-11-02 16:23:24 +00:00
Adam Vandolder 0be4513261 Bug 1665151 - Part 2: Expose custom element default accessibility attributes. r=edgar,Jamie,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D159237
2022-11-02 14:50:56 +00:00
Anna Yeddi ec1ccb416c Bug 1798438 - Add datetime-local support to list of accessibles. r=Jamie
Adding datetime-local atom to the HTMLMarkupMap to map `<input type=datetime-local>` to `DATE_EDITOR` role and providing test coverage for this new accessible.

Differential Revision: https://phabricator.services.mozilla.com/D160871
2022-11-01 15:34:05 +00:00
Morgan Rae Reschenberg 77efbaba52 Bug 1797222: Make char rects relative to their continuation before caching r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D160401
2022-10-31 20:57:30 +00:00
Morgan Rae Reschenberg b0dedce119 Bug 1787284: [Part 4] Core tests for MEMBER_OF relation r=eeejay
Depends on D159119

Differential Revision: https://phabricator.services.mozilla.com/D159120
2022-10-31 19:49:50 +00:00
Morgan Rae Reschenberg 5ba1794a07 Bug 1787284: [Part 3] Use cached name to compute MEMBER_OF rel for HTML radio buttons r=eeejay
Depends on D159118

Differential Revision: https://phabricator.services.mozilla.com/D159119
2022-10-31 19:49:50 +00:00
Morgan Rae Reschenberg a655200f47 Bug 1797131: Avoid making copies when iterating kRelationTypeAtoms r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D160118
2022-10-31 19:45:30 +00:00
Sandor Molnar 456b5e980c Backed out 3 changesets (bug 1797393) for causing mochitest failures in accessible/tests/browser/e10s/browser_text_caret.js CLOSED TREE
Backed out changeset 92b3f4f74412 (bug 1797393)
Backed out changeset a833abbbc1a7 (bug 1797393)
Backed out changeset 3c0193df13d2 (bug 1797393)
2022-10-28 22:40:53 +03:00
Eitan Isaacson b568ca1245 Bug 1797393 - P3: Explicitly assign font name to text area in linebreak test. r=Jamie
For some reason the default monospace font in Linux is not actually
monospaced and a linebreak is not guaranteed.

Differential Revision: https://phabricator.services.mozilla.com/D160301
2022-10-28 18:30:01 +00:00
Eitan Isaacson 9706b711cc Bug 1797393 - P2: Robustify spelling error text test. r=Jamie
Layout can trigger several text attribute changed events. We need to
wait until we get the correct one before continuing the test.

Differential Revision: https://phabricator.services.mozilla.com/D160300
2022-10-28 18:30:01 +00:00
Eitan Isaacson 4c3297aee9 Bug 1797393 - P1: Split and rename browser text tests. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D160299
2022-10-28 18:30:00 +00:00
Daniel Holbert 9bf9e1618d Bug 1797840: Replace stray tab character with space, in a11y msaa file ISimpleDOMDocument.idl. r=eeejay
DONTBUILD because this is just whitespace cleanup.

Note: mccr8 mentioned in D160577 that this is MSCOM IDL and not XPIDL, for what
it's worth. In any case, there doesn't seem to be any functional significance
to the tab character that I'm removing here, since it's in a declaration
pattern that's repeated in this file, and only this one instance has stray tab
before the closing-paren.

Depends on D160577

Differential Revision: https://phabricator.services.mozilla.com/D160580
2022-10-28 18:08:18 +00:00
James Teh 681e69a5ca Bug 1774285 - Avoid a11y instantiation after clipboard copy. r=nlapre,jamie CLOSED TREE
This prevents a11y from getting instantiated shortly after clipboard paste, in
order to prevent hangs with the Windows 11 suggested actions feature.

When combined with the previous patch, the behavior is the following:

 * For users with a11y already-enabled:

   * No hang (due to clipboard flush).
   * Quick actions menu is positioned at selection offset.

 * For users with a11y disabled (most):

   * No hang (due to no a11y instantiation + clipboard flush).
   * Quick actions menu is positioned at pointer (cursor) offset.

Co-Authored-By: Emilio Cobos Álvarez <emilio@crisal.io>

Differential Revision: https://phabricator.services.mozilla.com/D160652

Depends on D160646
2022-10-28 14:48:25 +00:00
Eitan Isaacson e69880623f Bug 1797858 - Don't leave test without content task promise resolved. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D160575
2022-10-28 01:13:23 +00:00
Morgan Rae Reschenberg 771a9f1a94 Bug 1795221: Implement LINKS_TO relation as a tree traversal r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D159451
2022-10-27 20:32:18 +00:00
Morgan Rae Reschenberg dbeec6c2f2 Bug 1787284: [Part 2] Cache name and create radio name pivot rule r=eeejay
Depends on D158892

Differential Revision: https://phabricator.services.mozilla.com/D159118
2022-10-27 20:32:18 +00:00
Morgan Rae Reschenberg 6e6dc5a06e Bug 1787284: [Part 1] Use tree heirarchy to compute MEMBER_OF in parent process for aria radio buttons r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D158892
2022-10-27 20:32:17 +00:00
Christian Holler 7e34a3062a Bug 1795124 - Add missing target check in DocAccessibleParent. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159326
2022-10-26 08:53:39 +00:00
James Teh 0ab70514cb Bug 1730431: Fix incorrect default min/cur/max/text values for ARIA spinbuttons. r=eeejay
For spinbutton, the spec says there should be "no value" for all of these.
Importantly, this prevents the incorrect value of "50" being reported for ARIA spinbuttons with no value.

Differential Revision: https://phabricator.services.mozilla.com/D159924
2022-10-26 00:38:15 +00:00
Eitan Isaacson 3d10b581aa Bug 1796876 - Allow selected option and list to be null. r=morgan
HTMLComboboxListAccessible::SelectedOption can return null, so we need
to prepare for that. Same with HTMLComboboxListAccessible::List when
the combo box's child is removed.

Differential Revision: https://phabricator.services.mozilla.com/D159961
2022-10-24 16:03:06 +00:00
Eitan Isaacson d152e213a3 Bug 1796710 - Don't include newline when finding line start after table. r=Jamie
This tweak is needed to allow this test to pass with our new caching
text implementation.

Differential Revision: https://phabricator.services.mozilla.com/D159909
2022-10-21 21:43:18 +00:00
Csoregi Natalia 34701eeef7 Backed out 4 changesets (bug 1787284) for causing failures on browser_caching_relations.js. CLOSED TREE
Backed out changeset fe4a5fa0fa27 (bug 1787284)
Backed out changeset 54e0b1365f89 (bug 1787284)
Backed out changeset c6db418af190 (bug 1787284)
Backed out changeset fda6706bb580 (bug 1787284)
2022-10-21 02:43:42 +03:00
Morgan Rae Reschenberg ae86ca7bdd Bug 1787284: [Part 4] Core tests for MEMBER_OF relation r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159120
2022-10-20 21:40:06 +00:00
Morgan Rae Reschenberg af39c3b5c0 Bug 1787284: [Part 3] Use cached name to compute MEMBER_OF rel for HTML radio buttons r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159119
2022-10-20 21:40:06 +00:00
Morgan Rae Reschenberg 91b749da9e Bug 1787284: [Part 2] Cache name and create radio name pivot rule r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159118
2022-10-20 21:40:06 +00:00
Morgan Rae Reschenberg 8b54dbbb47 Bug 1787284: [Part 1] Use tree heirarchy to compute MEMBER_OF in parent process for aria radio buttons r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D158892
2022-10-20 21:40:05 +00:00
Morgan Rae Reschenberg f52164c7b8 Bug 1774708: Queue cache update for viewport cache when transform change detected r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D159529
2022-10-20 20:48:35 +00:00
Morgan Rae Reschenberg 019604b467 Bug 1787274: Manually add combobox lists, options to the viewport cache r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D159768
2022-10-20 16:33:01 +00:00
Emilio Cobos Álvarez f1cb20723d Bug 1796199 - Remove script access to XUL layout attributes. r=Gijs
These don't work on emulated flexbox. We only have a couple of uses.

See D159726 for the diagnostic patch I used to catch these.

Differential Revision: https://phabricator.services.mozilla.com/D159727
2022-10-20 08:36:00 +00:00
James Teh ff93da3728 Bug 1793748: Don't treat a role="row" as a table row if it has an invalid parent. r=morgan
Previously, we were inconsistent in what we treated as a table row in various places.
This caused breakage after bug 1726124, since nsAccUtils::TableFor() started returning a table when an ARIA row had an invalid parent, but Filters::GetRow wouldn't find such a row
This was causing broken expectations (and consequently, an extremely long loop) in TableCellAccessible::PrevColHeader.
To fix this, avoid creating an ARIARowAccessible (and thus ARIAGridCellAccessibles) if the row's parent isn't valid.
This way, there aren't conflicting expectations because the TableCellAccessible code can never run.
Furthermore, clients don't get a broken table cell interface on invalid cells, which was a problem even before bug 1726124.

Differential Revision: https://phabricator.services.mozilla.com/D159679
2022-10-19 21:50:22 +00:00
Butkovits Atila 7f001fb596 Backed out changeset 39f39360ae48 (bug 1796199) for causing failures at test_panel.xhtml. CLOSED TREE 2022-10-20 00:39:56 +03:00
Emilio Cobos Álvarez db485fd57c Bug 1796199 - Remove script access to XUL layout attributes. r=Gijs
These don't work on emulated flexbox. We only have a couple of uses.

See D159726 for the diagnostic patch I used to catch these.

Differential Revision: https://phabricator.services.mozilla.com/D159727
2022-10-19 19:18:04 +00:00
Morgan Rae Reschenberg 98c57d12c0 Bug 1792964: Add hittesting test for tables, table rows, table cells r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159524
2022-10-18 22:30:10 +00:00
Morgan Rae Reschenberg 98bda97716 Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-10-18 22:30:10 +00:00
James Teh 5e043f5fba Bug 1794100: Fix order of arguments for ATK GetPosition. r=eeejay
ATK expects row, col, but RemoteAccessible previously expected col, row.
The ATK code was passing row, col, thus querying the wrong cell.
To make things more confusing, PDocAccessible specified row, col, even though DocAccessibleChild and RemoteAccessible specified col, row.
Fix this by making the order of the arguments consistent with ATK everywhere; i.e. row, col.

Differential Revision: https://phabricator.services.mozilla.com/D159239
2022-10-18 21:59:02 +00:00
James Teh afdcb2542f Bug 1794719: Fix retrieval of AtkObject from cached RemoteAccessible in GetColumn/RowHeaderCellsCB. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159238
2022-10-18 21:58:34 +00:00
James Teh 2770aa9376 Bug 1663796: Make Accessible::AppendTextTo produce text even if an Accessible has no frame. r=eeejay
Otherwise, we fail to fire a text removed event when something becomes display: none.

Differential Revision: https://phabricator.services.mozilla.com/D159362
2022-10-18 21:57:53 +00:00
Cosmin Sabou 02bc919daa Backed out 3 changesets (bug 1787274, bug 1792964, bug 1774708) for causing mochitest failures on browser_test_visibility.js. CLOSED TREE
Backed out changeset f9ec55a441c4 (bug 1774708)
Backed out changeset f942a92c1666 (bug 1792964)
Backed out changeset d60a24f2c8b8 (bug 1787274)
2022-10-18 22:54:12 +03:00
Morgan Rae Reschenberg c9c0c77f86 Bug 1774708: Queue cache update for viewport cache when transform change detected r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D159529
2022-10-18 19:07:44 +00:00
Morgan Rae Reschenberg afa76746a5 Bug 1792964: Add hittesting test for tables, table rows, table cells r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D159524
2022-10-18 19:07:44 +00:00
Morgan Rae Reschenberg 32271e47f7 Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-10-18 19:07:44 +00:00
Nathan LaPre 3fc16a5a71 Bug 1787283: Provide NODE_CHILD_OF, NODE_PARENT_OF relations in remote acc, r=morgan,Jamie
We'd like to provide NODE_CHILD_OF and NODE_PARENT_OF relations in the parent
process, relying on cached information, to avoid sync IPDL messages. This
revision implements most of the use cases for this relation for remote
accessibles, notably setting aside handling of MathML's <mroot> parent/child
relation. ARIA trees, treegrids, lists, and so on are handled in the remote
accessible largely identically to how they were handled in LocalAccessible.
Rather than define a new rule for walking the tree to find children, this
revision unifies the ItemIterator so it works on generic Accessibles, and uses
it in RemoteAccessibleBase the same way it's used in LocalAccessible. The
special case carve-out for MSAA clients now exists as a simpler IsTopLevel
check in DocAccessibleParent.

Differential Revision: https://phabricator.services.mozilla.com/D159452
2022-10-18 16:40:32 +00:00
Mark Banner 2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Eitan Isaacson 3243bf997e Bug 1789474 - Allow detached documents to be overwritten in accessible mapping. r=Jamie,geckoview-reviewers,owlish
Also assure that unregistering an accessible removes the right one and
doesn't confuse the attached document with the detached one.

Add stderr output to Accessible::DebugPrint in Android as well.

Differential Revision: https://phabricator.services.mozilla.com/D157528
2022-10-17 23:10:19 +00:00
Sandor Molnar 6a467e1baf Backed out changeset 431649004dd4 (bug 1789474) for causing android gv-junit-fis-o crashes CLOSED TREE 2022-10-14 07:59:55 +03:00