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

10316 Коммитов

Автор SHA1 Сообщение Дата
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