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

8277 Коммитов

Автор SHA1 Сообщение Дата
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
Morgan Reschenberg 0f8bea4c9f Bug 1625266: Add stepper subclass, support value changes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D70772
2020-04-28 17:20:16 +00:00
Csoregi Natalia b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo 2cb46cfa4b 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-04-28 01:44:43 +00:00
Botond Ballo b11a399d42 Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-04-28 02:25:51 +00:00
Eitan Isaacson 57097f3b0c Bug 1632958 - Add await for addVisits async function call. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D72492
2020-04-25 05:21:41 +00:00
James Teh 28686996c0 Bug 1627084 part 4: Tidy up functions which clean up IA2 payload data. r=MarcoZ
1. CleanupStaticIA2Data just called ReleaseStaticIA2DataInterfaces and zeroed memory.
  We don't need it to zero memory, since we're going to delete the data anyway.
  So, just call ReleaseStaticIA2DataInterfaces directly and get rid of CleanupStaticIA2Data.
2. CleanupDynamicIA2Data had a aZeroMemory argument, but no caller ever set it to true.
  Therefore, get rid of the argument.

Differential Revision: https://phabricator.services.mozilla.com/D70297
2020-04-09 05:00:54 +00:00
James Teh fc518436e7 Bug 1627084 part 3: Build handler payloads in HandlerProvider::ToWrappedObject. r=aklotz,MarcoZ
This avoids separate cross-thread calls when marshaling each object returned from an IGeckoBackChannel bulk fetch method.

Differential Revision: https://phabricator.services.mozilla.com/D69485
2020-04-24 20:31:22 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Simon Giesecke 9cc891f41f Bug 1628715 - Part 5: Add MOZ_NONNULL_RETURN to infallible nsTArray::InsertElementsAt. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D70403
2020-04-24 13:26:13 +00:00
Eitan Isaacson 5e43ff1e1e Bug 1625864 - Expose unlinked a tags as AXGroup. r=morgan
This is the recommended role in the HTML Accessibility API Mappings draft[1].

Although Chrome and Safari just expose unlinked a tags as AXStaticText.
They also don't update the accessble if it gets an href. So while we
are doing this a bit differently, I think it is probably better. And VO is happy.

1. https://www.w3.org/TR/html-aam-1.0/#html-element-role-mappings

Differential Revision: https://phabricator.services.mozilla.com/D71260
2020-04-24 14:36:36 +00:00
Eitan Isaacson 7f71e4a0c7 Bug 1625864 - Rename mac link test. r=morgan
I want to generalize it for other link stuff. Need a separate commit or
it is not recognized as a move, and won't retain history. For some reason.

Differential Revision: https://phabricator.services.mozilla.com/D71259
2020-04-24 14:36:36 +00:00
Eitan Isaacson 9db905efb4 Bug 1625864 - Fire state change event on LINKED change. r=Jamie,morgan
Also stop recreating any accessible that has href modified.

Differential Revision: https://phabricator.services.mozilla.com/D71258
2020-04-24 14:34:09 +00:00
Eitan Isaacson b9c73277af Bug 1625864 - Promisify state change events test. r=Jamie
We will probably be adding a lot to this. So let's make it nice to use.

Differential Revision: https://phabricator.services.mozilla.com/D71257
2020-04-24 14:33:15 +00:00
James Teh 122d48f2b2 Bug 1632706: When updating AccGroupInfo, If a sibling has cached group info, assume it's visible. r=MarcoZ
This avoids unnecessary calls to States().

Differential Revision: https://phabricator.services.mozilla.com/D72265
2020-04-24 02:42:46 +00:00
Jean-Yves Avenard 6392e85f33 Bug 1607984 - P15. Wait for the load to start before setting the event handler. r=Jamie
addA11yLoadEvent gets the contentWindow and wait for the document from that window to fire the load event.

Enabling the DocumentChannel for parent process load (or here in non-e10s mode) we have one extra event loop before the load starts.
So the window passed to addAllyLoadEvent would have been of the about:blank page.

The current code was based on an observable behaviour which was that the load was occuring synchronously.

DocumentChannel broke that assumption.

Differential Revision: https://phabricator.services.mozilla.com/D70799
2020-04-24 01:46:10 +00:00
Marco Zehe f6858d521e Bug 1631406 - Expose the correct sub role for HTML HR elements, r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D71548
2020-04-23 15:30:35 +00:00
Emilio Cobos Álvarez d36c96ab4c Bug 1612068 - Move zoom from the content viewer to the browsing context. r=nika
We need it to live in BrowsingContext instead of WindowContext, because
we need to preserve the zoom level across same-origin navigation.

It'd be nice if it only lived in the top BC, but that's not possible at
the moment because a lot of tests rely on zooming only iframes. Some of
them can be adjusted for scaling the top instead, but not sure it's
worth it's worth fixing them and moving the zoom to be top-only, as it'd
be a bunch of effort, and the complexity and overhead of propagating the
zoom is not so big.

The print-preview-specific code in nsContentViewer is from before we did
the document cloning setup, and it seems useless. I've tested print
preview scaling before and after my patch and both behave the same.

The rest is just various test changes to use the SpecialPowers APIs or
BrowsingContext as needed instead of directly poking at the content
viewer.

I named the pres context hook RecomputeBrowsingContextDependentData, as
more stuff should move there like overrideDPPX and other media emulation
shenanigans.

I also have some ideas to simplify or even remove ZoomChild and such,
but that's followup work.

Differential Revision: https://phabricator.services.mozilla.com/D71969
2020-04-22 19:32:52 +00:00
James Teh 99f2b37464 Bug 1632467: Clear eGroupInfoDirty flag when creating AccGroupInfo. r=MarcoZ
When the tree is mutated, we set eGroupInfoDirty regardless of whether there is GroupInfo.
Previously, we cleared eGroupInfoDirty when updating GroupInfo, but not when creating it.
This meant that the flag was often still set, causing the cache to not be used a lot of the time.

Differential Revision: https://phabricator.services.mozilla.com/D72139
2020-04-23 13:21:32 +00:00
Csoregi Natalia 448f2f3c76 Backed out 16 changesets (bug 1607984) for leaks on browser_ext_webRequest.js. CLOSED TREE
Backed out changeset 6c6ffa908c06 (bug 1607984)
Backed out changeset e973911e67e6 (bug 1607984)
Backed out changeset 28af6418ac16 (bug 1607984)
Backed out changeset 9a15a605f91a (bug 1607984)
Backed out changeset 52566b3564ba (bug 1607984)
Backed out changeset 142148a95181 (bug 1607984)
Backed out changeset 108e2cb6b2a9 (bug 1607984)
Backed out changeset 77fda525ee12 (bug 1607984)
Backed out changeset 980067f3ac1d (bug 1607984)
Backed out changeset 12b82a39c910 (bug 1607984)
Backed out changeset 7657023a763b (bug 1607984)
Backed out changeset 1ab8758802a6 (bug 1607984)
Backed out changeset 35f22d0817e1 (bug 1607984)
Backed out changeset b8c6277207d8 (bug 1607984)
Backed out changeset 244d3cb006be (bug 1607984)
Backed out changeset 9fc1a237829c (bug 1607984)
2020-04-23 11:49:51 +03:00