Commit Graph

8296 Commits

Author SHA1 Message Date
Eitan Isaacson
96db37abd6 Bug 1625192 - Support select element and its dropdown menu. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D75135
2020-05-15 21:31:08 +00:00
Aaron Klotz
da67dfa6bb Bug 1637452: Part 9 - Fix JNI includes in accessible/android; r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D75372
2020-05-15 17:04:36 +00:00
Emilio Cobos Álvarez
b9c1bf761c Bug 312971 - Unprefix -moz-read-write / -moz-read-only. r=edgar
And remove some duplicated tests from WPT.

Differential Revision: https://phabricator.services.mozilla.com/D75231
2020-05-14 16:46:08 +00:00
James Teh
d09d8b85c6 Bug 1572852: a11y::Logging::LogDocShellTree: Make it clear that this is in-process DocShell tree info. r=yzen
For an OOP iframe, the logged parent will be null and the logged root won't be the real top level document.
This is just the way things are and this might still be useful info sometimes, so we still log it, but make it clear in the log message that it's about the in-process tree.

Differential Revision: https://phabricator.services.mozilla.com/D74587
2020-05-11 14:38:53 +00:00
Marco Zehe
bc8f0b63cb Bug 1635538 - Correct the AXRole for image maps, r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D75030
2020-05-13 20:07:42 +00:00
Marco Zehe
7215ba00a1 Bug 1635527 - Correct AXRole for status bar, r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D75028
2020-05-13 20:06:51 +00:00
James Teh
d24d857a51 Bug 1628582: Set DocAccessibleParent::mDocProxyStream on the child document, not the parent document. r=yzen
DocAccessibleParent::AddChildDoc sends a COM proxy for the embedded document to the embedder process hosting the iframe.
This gets returned as the child of the embedder OuterDocAccessible.
Whenever we send a proxy to a content process, we must hold a PreservedStreamPtr in the parent process.
Previously, we set mDocProxyStream on the parent (embedder) document.
However, if a document had multiple OOP iframes, this meant we  ended up losing the PreservedStreamPtr for all but the last added child OOP document.
We now set mDocProxyStream on the child document instead, since there can only be one embedder OuterDocAccessible per child document.

Differential Revision: https://phabricator.services.mozilla.com/D74584
2020-05-11 14:41:57 +00:00
Eitan Isaacson
c1c0b3551c Bug 1625184 - Map dialogs and alert dialogs correctly in Mac. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D74957
2020-05-13 05:59:23 +00:00
James Teh
535261ca3d Bug 1637474 part 2: Disconnect accSelection IEnumVARIANT and IAccessibleRelation objects when their associated Accessible is shut down. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D75000
2020-05-13 05:55:02 +00:00
James Teh
ca670d92d5 Bug 1637474 part 1: Provide a way to associate COM objects with an AccessibleWrap so they will be disconnected from remote clients when the Accessible shuts down. r=MarcoZ
To improve performance for cross-process COM, we disable COM garbage collection in content processes for calls from our parent process.
However, this means we don't receive Release calls from in-process a11y clients.
For an Accessible, we get around this by explicitly disconnecting remote clients when the Accessible shuts down.
This doesn't cover COM objects which aren't interfaces of an Accessible; i.e. where the object has a different IUnknown to the Accessible.
This patch adds AccessibleWrap::AssociateCOMObjectForDisconnection to allow these objects to be tracked.
Tracked objects are then disconnected when the Accessible shuts down.

Differential Revision: https://phabricator.services.mozilla.com/D74999
2020-05-13 05:52:42 +00:00
Eitan Isaacson
c5398f4399 Bug 1625196 - Support select[multiple] and role=listbox/option. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D72485
2020-05-12 23:28:34 +00:00
Eitan Isaacson
4b897ca7d9 Bug 1625196 - Add attribute setting methods to nsIAccessibleMacInterface. r=morgan
This is needed since selection is done by setting attributes.

Differential Revision: https://phabricator.services.mozilla.com/D72483
2020-05-12 23:28:34 +00:00
Eitan Isaacson
c14ec1babc Bug 1625196 - Prune proxy accessibles with nsAccUtils::MustPrune(). r=morgan
Platform accessibles from proxies were not getting pruned. Also, there is no need
to walk up ancestors to find a pruning container since all pruning containers have direct
leaf children.

Differential Revision: https://phabricator.services.mozilla.com/D72482
2020-05-12 18:39:06 +00:00
Eitan Isaacson
f395ad8878 Bug 1635517 - Ignore all invisible XUL elements. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D74433
2020-05-12 17:26:34 +00:00
Eitan Isaacson
ac48c6ea9a Bug 1635517 - Filter ignored mac accessible objects from platform tree. r=morgan
Also, allow parent accessibles to ignore certain children.

Differential Revision: https://phabricator.services.mozilla.com/D74432
2020-05-12 19:06:02 +00:00
Eitan Isaacson
567a8af15c Bug 1635517 - Update deprecated accessibilityIsIgnored to isAccessibilityElement. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D74431
2020-05-12 17:39:18 +00:00
Marco Zehe
6c331c5c53 Bug 1635483 - Avoid unnecessary IPC calls when calculating subroles for landmarks, r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D74008
2020-05-11 17:51:12 +00:00
Eitan Isaacson
11ab196725 Bug 1634619 - Back out focusable state changes on overflow events. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D74487
2020-05-11 00:21:21 +00:00
James Teh
09a25365d2 Bug 1572860: Remove the ability for an outer document to override live region markup in an inner iframe document. r=MarcoZ
This is something that was implemented a long time ago, but it isn't covered in any spec, other browsers don't implement it and I don't know of any usage in the wild.
This doesn't work with OOP iframes, since what we're doing here requires the documents to be in the same process.
Given it isn't used or specified, the simplest solution is to just remove the behaviour altogether.

Differential Revision: https://phabricator.services.mozilla.com/D74628
2020-05-11 11:13:43 +00:00
James Teh
9f69f88101 Bug 1628415 part 3: Remove XULListboxAccessible::Value. r=MarcoZ
This depends on richlistitem's nsIDOMXULSelectControlItemElement::label implementation, which does the wrong thing in several cases.
We could make this use a11y name computation, but I can't find any other list box implementation that exposes accessible value on the list box itself, so I don't see any reason to keep this.

Differential Revision: https://phabricator.services.mozilla.com/D74372
2020-05-08 04:28:11 +00:00
James Teh
b02d77311a Bug 1628415 part 2: Correct comments regarding XUL control Accessible name computation. r=MarcoZ
This is not strictly related to this bug, but I'm touching the surrounding code and I've been confused by this on several occasions.
The previous comments suggested that NameFromAssociatedXULLabel (which uses XULLabelIterator) looks at child labels.
This is incorrect: XULLabelIterator only looks at <label control="id">.
The inclusion of child labels in the name comes from GetNameFromSubtree, which is called elsewhere.

Differential Revision: https://phabricator.services.mozilla.com/D74371
2020-05-08 04:27:00 +00:00
James Teh
ba3de78b7e Bug 1628415 part 1: Remove use of nsIDOMXULSelectControlItemElement::label in Accessible. r=MarcoZ
This was only used for richlistitems, but the richlistitem implementation of this property did the wrong thing in several cases.
The a11y engine's label computation code generally does a better job.
Where the label does need to be overridden in specific cases, we should use ARIA instead.

Differential Revision: https://phabricator.services.mozilla.com/D74370
2020-05-08 04:24:42 +00:00
Morgan Reschenberg
22bf5cdb58 Bug 1624954: Add support for AXPopupValue, modify AXHasPopup to boolean. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D73912
2020-05-07 18:07:34 +00:00
Ricky Stewart
1395fb03f0 Bug 1634737 - GeneratedFile() template should yell at you if you try to set py2=True r=glandium
As of bug 1621451 this argument was ignored, but it just silently runs your code with `python3` if you pass it anyway. Ensure this doesn't happen any more, and protect against any other unexpected arguments as well.

Differential Revision: https://phabricator.services.mozilla.com/D73485
2020-05-05 15:53:37 +00:00
Ricky Stewart
933b3522b8 Bug 1633156 - Don't emit cached table files from ply r=glandium
`ply`, [by design](https://github.com/dabeaz/ply/issues/79), does not produce reproducible table files; hence bug 1633156. (Note that this was *always* true, but only became a problem once we switched to Python 3, which has more unpredictable dict iteration order than Python 2.7, at least prior to [3.7](https://docs.python.org/3/whatsnew/3.7.html#summary-release-highlights).)

In any other circumstance I would consider submitting a patch to `ply` to fix this, but as of the [in-progress version 4.0 of the library](https://github.com/dabeaz/ply/blob/master/CHANGES), it doesn't even emit this cached data any more, and indeed the [latest version of the code](1fac9fed64/ply) doesn't even call `open()` at all except to do logging or to read the text data to be parsed from `stdin`. So if we were going to pin our future on `ply` and upgrade to later versions of the library in the future, we would have to live in a world where `ply` doesn't generate cached table files for us anyway.

Emitting the cached table files so later build steps can consume them is an "optimization", but it's not clear exactly how much actual value that optimization provides overall. Quoth the `CHANGES` file from that repository:

```
PLY no longer writes cached table files.  Honestly, the use of
the cached files made more sense when I was developing PLY on
my 200Mhz PC in 2001. It's not as much as an issue now. For small
to medium sized grammars, PLY should be almost instantaneous.
```

In practice, I have found this to be true; namely, `./mach build pre-export export` takes just about as long on my machine after this patch as it did before, and in a try push I performed, there's no noticeable performance regression from applying this patch. In local testing I also found that generating the LALR tables in calls to `yacc()` takes about 0.01s on my machine generally, and we generate these tables a couple dozen times total over the course of the `export` tier now. This isn't *nothing*, but in my opinion it's also not nearly long enough where it would be a concern given how long `export` already takes.

That `CHANGES` file also stresses that if caching this data is important, we have the option of doing so via `pickle`. If and when we decide that re-enabling this optimization is valuable for us, we should take control of this process and perform the generation in such a way that we can guarantee reproducibility.

Differential Revision: https://phabricator.services.mozilla.com/D73484
2020-05-07 00:39:28 +00:00
James Teh
21678aeb07 Bug 1636002: Don't use the parent IAccessible from DocAccessibleChild unless it is a top level document. r=MarcoZ
In-process iframes get a DocAccessibleChild, even though they're not top level in their process.
However, the parent IAccessible on DocAccessibleChild (sent from the parent process) is only relevant for the top level.
Previously, we used the parent IAccessible on the DocAccessibleChild for *all* documents, resulting in accParent returning null for in-process iframe documents.
Instead, we need to use the base implementation in this case.

Differential Revision: https://phabricator.services.mozilla.com/D74180
2020-05-07 04:53:39 +00:00
Botond Ballo
5cffd06241 Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-05-05 15:24:12 +00:00
Botond Ballo
7cf10dca6d Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-05-05 19:23:35 +00:00
Marco Zehe
0eedff8d8e Bug 1635184 - Add actual support for input type='search' in MacOS, r=eeejay
The code in mozAccessible SubRole was actually never executed for inputs, so the SearchField sub role was never set. Moved the implementation to mozTextAccessible. Also reenabled the tests from bug 1634373, which now pass.

Depends on D73308

Differential Revision: https://phabricator.services.mozilla.com/D73735
2020-05-05 17:45:52 +00:00
Marco Zehe
69ff16e0cd Bug 1634373 - Add tests for Mac role and subrole attributes, r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D73308
2020-05-04 18:39:12 +00:00
James Teh
e6468d4b89 Bug 1635309: Clear conceptual parent when updating AccGroupInfo. r=MarcoZ
When an Accessible is removed, the AccGroupInfo for its siblings is marked dirty.
However, when AccGroupInfo::Update is called, it previously didn't clear mParent, which is used for the NODE_CHILD_OF relation.
This meant that if the conceptual group parent was removed and there was subsequently no conceptual parent, NODE_CHILD_OF would return an incorrect (potentially dead) Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D73776
2020-05-05 05:36:31 +00:00
Mirko Brodesser
81a6751c80 Bug 1634663: part 1) Declare Selection::GetRangeAt's callers const around dom/ code. r=masayuki
Only where possible, of course.

Differential Revision: https://phabricator.services.mozilla.com/D73444
2020-05-02 23:43:02 +00:00
Jonathan Watt
2d1fc3c186 Bug 1634217. Make accessible/ buildable outside of unified-build environment. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D73176
2020-05-01 04:28:35 +00:00
Morgan Reschenberg
1c82fd0b4b Bug 1624954: query attribute string for aria-haspopup instead of relying on flag alone. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D70264
2020-04-30 21:38:45 +00:00
Morgan Reschenberg
b499462d93 Bug 1624954: Send state-change event when aria-haspopup value is changed to allow for caching. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D71221
2020-04-30 21:38:33 +00:00
Mike Hommey
71ccad7a1b Bug 1634187 - Turn xpcom/idl-parser/xpidl into a proper python 3-ready module. r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D73151
2020-04-30 21:49:10 +00:00
Csoregi Natalia
5ca61e2a3c Backed out 2 changesets (bug 1624954) for eslint failure on browser_aria_haspopup.js. CLOSED TREE
Backed out changeset 2a3f592412a2 (bug 1624954)
Backed out changeset 74085e028726 (bug 1624954)
2020-04-30 23:37:28 +03:00
Morgan Reschenberg
5636f6c7df Bug 1624954: query attribute string for aria-haspopup instead of relying on flag alone. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D70264
2020-04-30 20:12:45 +00:00
Morgan Reschenberg
13bb4618ce Bug 1624954: Send state-change event when aria-haspopup value is changed to allow for caching. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D71221
2020-04-30 20:12:29 +00:00
Simon Giesecke
9ad17cfd3d Bug 1626570 - Improve handling of copying arrays in accessible/. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D72318
2020-04-30 09:36:14 +00:00
Daniel Varga
a184202d1f Backed out changeset 5c3005879c35 (bug 1634187) for causing build bustages at builds/worker/checkouts/gecko/xpcom/idl-parser/xpidl/runtests.py
CLOSED TREE
2020-04-30 02:58:00 +03:00
Mike Hommey
697361fcd0 Bug 1634187 - Turn xpcom/idl-parser/xpidl into a proper python 3-ready module. r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D73151
2020-04-29 23:05:29 +00:00
Brendan Dahl
6a11b1827e Bug 1629770 - Create popupgroup for any main process system privileged documents. r=emilio,Jamie
Fixes tooltips/menus in responsive design mode. A few accesibility tests
had to be adjusted since tooltips are now automatically created
for them.

Differential Revision: https://phabricator.services.mozilla.com/D72400
2020-04-29 21:52:51 +00:00
Morgan Reschenberg
707b0c1a92 Bug 1624936: Add required state caching, attribute handling for mozCheckboxAccessibles. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D70231
2020-04-28 18:19:39 +00:00
Morgan Reschenberg
5bf3cbceb9 Bug 1624936: Fire state change event when required state changes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D71413
2020-04-28 18:19:17 +00:00
Eitan Isaacson
d7324d465e Bug 1625870 - Support figure and figcaption is OSX. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D72509
2020-04-28 19:45:51 +00:00
Brindusan Cristian
ae12f8e207 Backed out changeset b9710246d416 (bug 1625870) for mochitest failures at test_figure.html. CLOSED TREE 2020-04-28 21:54:31 +03:00
Eitan Isaacson
87fa7c9271 Bug 1627899 - Remove keyboard synthesis test cases from browser_app.js. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D72508
2020-04-27 18:24:27 +00:00
Eitan Isaacson
b62ce6a55b Bug 1625870 - Support figure and figcaption is OSX. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D72509
2020-04-28 18:04:00 +00:00
Eitan Isaacson
54fb8b0bfc Bug 1625489 - role::STATICTEXT should return value and not label or title. r=morgan
I also simplified mozTextLeafAccessible by redirecting value to title. And removing some dead methods. It previously was calling Text() on the text accessible, but this is not necessary since Name() returns
the same value.

Differential Revision: https://phabricator.services.mozilla.com/D72584
2020-04-27 18:19:50 +00:00