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

10071 Коммитов

Автор SHA1 Сообщение Дата
James Teh 6b84c4b16a Bug 1793423: Don't assume the document has a cache yet in RemoteAccessibleBase::ChildAtPoint. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D158623
2022-10-05 23:57:11 +00:00
James Teh f66a2a1e61 Bug 1793710: Partially support MSAA role string hack for cached RemoteAccessible to avoid returning failure. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D158618
2022-10-05 23:56:22 +00:00
Emilio Cobos Álvarez d0f5bc50af Bug 1792802 - Fix accessible tests after previous change. r=Jamie
After the previous change, the treecolpicker element only wraps a button
and a menu, which are siblings rather than parent/child. I think that's
probably fine but it changes the shape of the a11y tree.

This patch updates the relevant tests, but let me know if you'd rather
keep the behavior. I could do that by either keeping the treecolpicker
entry listed in XULMap (I think), or via other means.

Suggestions welcome if you think this is not the right fix.

Differential Revision: https://phabricator.services.mozilla.com/D158640
2022-10-05 06:59:14 +00:00
Emilio Cobos Álvarez 69535154e5 Bug 1792802 - Fix tree column picker. r=aminomancer
This element had a really weird dependency on the order of the command
events from the menuitems and the button which broke in bug 1790920.

Instead of keeping this element as a XULButtonElement, have a separate
button and popup. That's simpler and less prone to breakage, and allows
to get rid of special cases in Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D158438
2022-10-05 06:59:13 +00:00
Norisz Fay 167133ff80 Backed out changeset f9249f760526 (bug 1792802) for causing mochitest failures on test_struct_tree.xhtml CLOSED TREE 2022-10-05 05:58:02 +03:00
Emilio Cobos Álvarez 5c4de29d0e Bug 1792802 - Fix tree column picker. r=aminomancer
This element had a really weird dependency on the order of the command
events from the menuitems and the button which broke in bug 1790920.

Instead of keeping this element as a XULButtonElement, have a separate
button and popup. That's simpler and less prone to breakage, and allows
to get rid of special cases in Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D158438
2022-10-05 02:09:03 +00:00
James Teh f8cfb7ca83 Bug 1792092: Fix potentially uninitialized value in Windows RemoteAccessible. r=nlapre
mSafeToRecurse was initialized to true in one constructor, but not the other.
Fix this using default member initialization.

Differential Revision: https://phabricator.services.mozilla.com/D158550
2022-10-04 23:35:48 +00:00
Eitan Isaacson b0e929cfaf Bug 1781193 - Update table layout-guess and mathML innerHTML on reorder. r=Jamie
This helps on several fronts:
1. Avoids a cache push on accessibles that have yet to be sent to
   parent when relying on BindToParent instead.
2. Handles the case of table children removals.
3. Uses the mutation event collation for cache push collation.

No test case for MathML here because it is windows only, but I think
we should add coverage for it too.

Differential Revision: https://phabricator.services.mozilla.com/D158528
2022-10-04 16:46:55 +00:00
James Teh 4e695325c5 Bug 1790317 part 2: Change instances of UniqueID in LocalAccessible code to use ID. r=eeejay
This doesn't update usage elsewhere in the code base, but it should be enough to ensure that this doesn't break anything.
We can gradually update other cases in future.

Differential Revision: https://phabricator.services.mozilla.com/D157082
2022-10-04 06:13:52 +00:00
James Teh cbf1bc1704 Bug 1790317 part 1: Make LocalAccessible::ID return 0 for the document. r=eeejay
For IPC, we use id 0 to refer to the document.
However, LocalAccessible::UniqueID doesn't return 0 for documents.
This meant that when sending IPC messages, we hitherto had to special case the document in each case.

We don't want to mess with LocalAccessible::UniqueID, but since Accessible::ID was only introduced recently, we can set new expectations there.
Thus, this patch changes LocalAccessible::ID to return 0 for documents.
This means that in future, we can just use Accessible::ID when sending IPC messages.
nsAccUtils::GetAccessibleByID has also been updated to handle this.

Differential Revision: https://phabricator.services.mozilla.com/D157081
2022-10-04 06:13:51 +00:00
James Teh f346eae4ee Bug 1788879: Return early from potentially long-running a11y tasks if a content process has been asked to shut down. r=eeejay
If the process is asked to shut down while we're in the middle of handling long-running tasks, we should return early to avoid pointless work and allow the process to shut down sooner.
This patch adds ExpectingShutdown checks near various things which could potentially take a while; e.g. building the local tree, serializing the IPC tree, building the IPC cache, etc.

Differential Revision: https://phabricator.services.mozilla.com/D156809
2022-10-04 02:25:10 +00:00
Emilio Cobos Álvarez 4e978b56b5 Bug 1689816 - Implement <tabpanels> and <deck> without XUL layout. r=Gijs,Jamie,morgan,preferences-reviewers,mconley,TYLin
Gijs for front-end bits, layout for the new CSS properties and the
removal of nsDeckFrame / nsStackLayout, Jamie and Morgan for the a11y
changes.

As discussed in the bug, the main tricky part here is handling a11y
correctly. For <deck>, that's trivial (just use `visibility: hidden` to
hide the panels visually, while removing the unselected panels from the
a11y tree).

For <tabpanels> however we need to do something special. We do want to
hide stuff visually, but we want to preserve the contents in the a11y
tree.

For that, the easiest fix is introducing a new privileged CSS property
(-moz-subtree-hidden-only-visually), which takes care of not painting
the frame, but marks stuff offscreen in the accessibility tree. This is
not intended to be a property used widely.

Other than that, the changes are relatively straight-forward, though
some of the accessible/mac changes I could get a sanity-check on.

Differential Revision: https://phabricator.services.mozilla.com/D157875
2022-09-27 04:18:16 +00:00
Marian-Vasile Laza f54a464c90 Backed out changeset 2f74f8f2ed19 (bug 1689816) for causing reftest failures on skip-ink-multiline-position.html. 2022-09-26 23:24:03 +03:00
Emilio Cobos Álvarez f875681246 Bug 1689816 - Implement <tabpanels> and <deck> without XUL layout. r=Gijs,Jamie,morgan,preferences-reviewers,mconley,TYLin
Gijs for front-end bits, layout for the new CSS properties and the
removal of nsDeckFrame / nsStackLayout, Jamie and Morgan for the a11y
changes.

As discussed in the bug, the main tricky part here is handling a11y
correctly. For <deck>, that's trivial (just use `visibility: hidden` to
hide the panels visually, while removing the unselected panels from the
a11y tree).

For <tabpanels> however we need to do something special. We do want to
hide stuff visually, but we want to preserve the contents in the a11y
tree.

For that, the easiest fix is introducing a new privileged CSS property
(-moz-subtree-hidden-only-visually), which takes care of not painting
the frame, but marks stuff offscreen in the accessibility tree. This is
not intended to be a property used widely.

Other than that, the changes are relatively straight-forward, though
some of the accessible/mac changes I could get a sanity-check on.

Differential Revision: https://phabricator.services.mozilla.com/D157875
2022-09-26 17:40:30 +00:00
Nathan LaPre f9c5af7bc8 Bug 1732179: Account for cross-process offset properly in bounds calculation, r=morgan
This revision slightly reworks the way that we calculate accessible bounds in
RemoteAccessibleBase::BoundsWithOffset. Rather than looking "below" the current
accessible for a doc accessible to determine whether we should apply a cached
cross-process offset, we instead look "above" the current accessible, to its
parent, to check for a cross-process offset to apply. Then, in ApplyTransform,
we ensure that we maintain that cross-process offset.

Differential Revision: https://phabricator.services.mozilla.com/D157240
2022-09-23 21:31:28 +00:00
Emilio Cobos Álvarez d76233d103 Bug 1789168 - Allow emulated -moz-box (which creates flexbox containers) to be used as a tab panel. r=eeejay
I don't understand why we don't allow any box through, but for now this
is a safer change to restore the previous behavior when emulated flex
box is used.

Differential Revision: https://phabricator.services.mozilla.com/D158002
2022-09-23 16:16:14 +00:00
Eitan Isaacson 371a745997 Bug 1792068 - Promisify events/test_scroll.xhtml. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D157949
2022-09-22 19:41:59 +00:00
Masayuki Nakano a353ab7e90 Bug 1789967 - part 3: Make `HTMLEditor::CollapseSelectionToEndOfLastLeafNodeOfDocument` and `HTMLEditor::InitEditorContentAndSelection` do nothing if the document is partially editable r=m_kato
They and their callees work with the result of `GetRoot()` which is the document
element or the body element.  If the body is not editable, `Selection` should
not be updated in non-editable region nor `<br>` elements should not be
inserted in both non-focused editable elements and non-editable elements.
Therefore, they should run only when the document element or the `<body>`
element is editable.

To keep testing crashtests as reported, this patch makes tests which have
`contenteditable` except `<html>` and `<body>` initialize `Selection` as
what we've done.  And clean up the tests for helping to port them to WPT
in the future (bug 1725850).

Differential Revision: https://phabricator.services.mozilla.com/D157408
2022-09-22 06:27:37 +00:00
Joel Maher 4c4438b4f7 Bug 1536208 - removing old aarch64 manifest annotations. r=aryx,application-update-reviewers,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D157677
2022-09-21 15:35:02 +00:00
Frederic Wang 62d1893ea4 Bug 1791245 - More cleanup for the <mfenced> element. r=emilio
The <mfenced> element [1] is not part of MathML Core [2] or MathML AAM
[3] and was removed in bug 1603773. It should be treated as
an unknown MathML element, that is like an `<mrow>`.

This commit performs some follow-up code cleanup:

* Remove a11y mapping, instead map it like an mrow.

* Remove obsolete deprecation message.

* Don't include mfenced in the sanitizer's default element allow list.
  The spec [4] does not mention an explicit list.

* Preference mathml.mfenced_element.disabled was removed, so no need
  to force it when running tests.

* Tweak some code comments.

[1] https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mfenced
[2] https://w3c.github.io/mathml-core/#mathml-elements-and-attributes
[3] https://w3c.github.io/mathml-aam/
[4] https://wicg.github.io/sanitizer-api

Differential Revision: https://phabricator.services.mozilla.com/D157580
2022-09-20 03:53:50 +00:00
Ryan VanderMeulen defeab2235 Backed out changeset 6376af715fb9 (bug 1787274) for Fenix UI test failures. 2022-09-15 13:10:33 -04:00
Morgan Rae Reschenberg 5afbf8d60d Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-09-14 22:02:06 +00:00
Butkovits Atila 4fc48f6705 Backed out changeset 7d2bb2e5fb73 (bug 1787274) for causing geckoview failures. 2022-09-14 22:09:11 +03:00
Morgan Rae Reschenberg f7de79f06d Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-09-14 17:47:43 +00:00
Morgan Rae Reschenberg d143da6750 Bug 1788547: Null check table acc exists before firing styling changed event, add assert for debugging r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156987
2022-09-13 19:57:53 +00:00
Nathan LaPre b5c69b9980 Bug 1788143 - Rely on selection state to determine combo box value, r=Jamie
Previously, we were not firing active state change events for the options in
<select> elements when the drop-down was expanded. This leads to possibly-stale
cached 'active' state in the parent process, which can cause Firefox to report
incorrect combo box values based on stale state. Rather than fire more 'active'
state change events to fix the problem, this revision addresses the problem by
not firing 'active' state change events for combo boxes at all, and instead
relying on the selection state when determining the combo box value in the
parent process. This revision also adds a test to verify that the behavior is
as expected.

Differential Revision: https://phabricator.services.mozilla.com/D156627
2022-09-13 16:18:52 +00:00
James Teh 640af21671 Bug 1789750: Don't try to get a COM proxy in Windows RemoteAccessible when the cache is disabled. r=nlapre
For methods supported by the cache, we already delegate to RemoteAccessibleBase where the caching implementation lives.
However, there are still some less used methods which aren't supported by the cache yet.
These methods are never called by the code which Windows a11y clients interact with (MsaaAccessible and friends).
However, they can be called from XPCOM; e.g. when using the Browser Console.
For now, just early return in these cases so we don't crash.
Eventually, we'll need to unify these methods and support them with the cache enabled.

Differential Revision: https://phabricator.services.mozilla.com/D156771
2022-09-09 01:44:52 +00:00
James Teh fbc63fb814 Bug 1789790: When a row is added to a table, push a cache update for the table's layout guess. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D156810
2022-09-08 23:47:37 +00:00
James Teh ea7dd2e2cd Bug 1789396: Null check acc before calling AsLocal() in RemoteAccessibleBase::BoundsWithOffset. r=morgan
We expect acc to be a local OuterDocAccessible.
However, the OuterDocAccessible might die before the top level DocAccessibleParent, in which case acc will be null.
In this case, the DocAccessibleParent is about to die anyway, so it doesn't matter that the bounds we return are slightly wrong (since they can't take the OuterDoc into account).

Differential Revision: https://phabricator.services.mozilla.com/D156773
2022-09-08 23:47:01 +00:00
Daniel Holbert 61d63a37b0 Bug 1789903: Remove unused member-var AccMutationEvent::mNode. r=morgan
This variable was supposed to be removed long ago in bug 813019, but the
declaration was left behind by accident, it seems.

Differential Revision: https://phabricator.services.mozilla.com/D156879
2022-09-08 19:04:10 +00:00
criss be23bbe9af Merge mozilla-central to autoland on a CLOSED TREE 2022-09-08 00:23:23 +03:00
Ryan VanderMeulen d7d5c89ee7 Backed out changeset e8354032aaf6 (bug 1787274) for being the likely cause of Fenix & Focus UI test bustage. 2022-09-07 13:41:40 -04:00
Olli Pettay 93acdfad59 Bug 1777574, automate CC zone handling, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00
Morgan Rae Reschenberg c2cd0ee189 Bug 1787274: Use mCachedFields viewport cache for determining offscreen state r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155903
2022-09-06 21:00:29 +00:00
Morgan Rae Reschenberg ec1c2a165e Bug 1787282: [Part 2] Cache LINKS_TO relation information r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156138
2022-09-06 19:27:17 +00:00
Morgan Rae Reschenberg c8469d0ad8 Bug 1787282: [Part 1] Modify relations caching infrastructure for rels with no implicit partner r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156126
2022-09-06 19:27:16 +00:00
James Teh 41073adfb6 Bug 1787692: Partially support ISimpleDOMNode::nodeInfo for cached RemoteAccessibles. r=morgan
JAWS won't expose MathML without this.
We can't fully support it; we don't cache info about namespaces, for example.
However, this implementation is enough to get MathML working with JAWS.

Differential Revision: https://phabricator.services.mozilla.com/D156150
2022-09-05 04:30:44 +00:00
Morgan Rae Reschenberg 956c373882 Bug 1788597: Null check acc before creating cache update r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D156230
2022-09-02 16:53:47 +00:00
Eitan Isaacson 3774262195 Bug 1788132 - Introduce TextLeafPoint::IsParagraphStart. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156025
2022-08-31 20:52:46 +00:00
Eitan Isaacson 96c72183cc Bug 1788116 - Introduce TextLeafRange iterator. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D156003
2022-08-31 20:34:18 +00:00
Nathan LaPre 982410361d Bug 1732280 - Implement mappings for sub, sup elements and subscript, superscript roles, r=Jamie
This commit adds mappings for HTML sub and sup elements, as well as ARIA
role mappings for subscript, superscript roles, with the goal of properly
exposing this information to the accessibility tree. This commit also updates
text attribute code to account for the attributes implied by those roles.
Finally, this commit updates tests to verify that the role and attribute
information is working properly.

Differential Revision: https://phabricator.services.mozilla.com/D155523
2022-08-31 16:48:56 +00:00
Morgan Rae Reschenberg 45fe2a97f1 Bug 1786086: [Part 3] Queue table cache update on table acc in PruneOrInsertSubtree r=Jamie
Depends on D155132

Differential Revision: https://phabricator.services.mozilla.com/D155133
2022-08-30 23:12:20 +00:00
Morgan Rae Reschenberg 70e8d2d0be Bug 1786086: [Part 2] Queue table cache update when TableLayoutGuessMaybeChanged is called r=Jamie
Depends on D155131

Differential Revision: https://phabricator.services.mozilla.com/D155132
2022-08-30 23:12:20 +00:00
Morgan Rae Reschenberg b30a39e89d Bug 1786086: [Part 1] Add test to verify changing border style changes layout status r=Jamie
Depends on D154011

Differential Revision: https://phabricator.services.mozilla.com/D155131
2022-08-30 23:12:19 +00:00
Morgan Rae Reschenberg 6d134e1ab6 Bug 1726124: [Part 2] Only fire TABLE_STYLING_CHANGED events on tables, not table parts r=Jamie
Depends on D155276

Differential Revision: https://phabricator.services.mozilla.com/D154011
2022-08-30 23:12:19 +00:00
Morgan Rae Reschenberg c6c9f2d743 Bug 1726124: [Part 1] Generalise nsAccUtils::TableFor for table parts r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155276
2022-08-30 23:12:18 +00:00
Eitan Isaacson ebe08f86d0 Bug 1786519 - Null check BrowserParent's element and its owner doc. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D155729
2022-08-30 23:04:14 +00:00
James Teh 0787850ef9 Bug 1759971: Support MathML on a cached RemoteAccessible for Windows a11y clients. r=morgan
Windows a11y clients retrieve MathML markup using ISimpleDOMNode::innerHTML.
We cache innerHTML to support this, but only on math elements and only on Windows.
sdnAccessible had to be modified to support RemoteAccessible and to use the cache for this method.

Differential Revision: https://phabricator.services.mozilla.com/D155806
2022-08-30 02:29:17 +00:00
James Teh 551e1f9ba8 Bug 1787686: Expose the URL of a link as its value, as well as the value of text/image leaf descendants. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D155810
2022-08-30 02:26:02 +00:00
Cosmin Sabou 3840d81095 Backed out 5 changesets (bug 1726124, bug 1786086) for failures on browser_table.js. CLOSED TREE
Backed out changeset 169c9576cb7b (bug 1786086)
Backed out changeset 76dd155c66b8 (bug 1786086)
Backed out changeset 25a5c81eded3 (bug 1786086)
Backed out changeset 1c5f2f67382b (bug 1726124)
Backed out changeset 8c82b5407ff3 (bug 1726124)
2022-08-29 21:22:27 +03:00