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

9463 Коммитов

Автор SHA1 Сообщение Дата
James Teh 4f65e90ec4 Bug 1729531: Re-enable accessible/tests/browser/fission/browser_nested_iframe.js on Apple silicon. r=bhearsum
This passes for me on try.
We do have some low frequency intermittent failures for this test, but they apply to all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D126428
2021-09-27 11:40:45 +00:00
Jonathan Kew 98c510163c Bug 1732464 - Reverse the order of calls to FindLineContaining in IsLocalAccAtLineStart, so that we can pass prevLineNum as a starting index to accelerate the second call. r=Jamie
Depends on D126587

Differential Revision: https://phabricator.services.mozilla.com/D126588
2021-09-27 08:35:35 +00:00
Jonathan Kew 1989dbf0ca Bug 1732463 - Make nsIFrame::GetContainingBlockForLine return a pair of `nsIFrame*`s instead of using an outparam for one of them. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D126587
2021-09-25 09:13:02 +00:00
James Teh fd1b75596f Bug 1427811: Add null checks to some a11y document logging functions. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126444
2021-09-24 20:31:00 +00:00
Jonathan Kew fb9588e175 Bug 1732268 - Remove redundant failure-checks from nsLineIterator initialization, as it uses infallible allocation. r=dholbert
This means nsBlockFrame::GetLineIterator is also infallible, so callers that know
they're dealing with an nsBlockFrame (not an arbitrary nsIFrame) don't need to
check for null.

Differential Revision: https://phabricator.services.mozilla.com/D126470
2021-09-24 14:20:05 +00:00
James Teh f08c138efd Bug 1732108: Map ATK_ROLE_CONTENT_DELETION/INSERTION. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126432
2021-09-24 00:05:50 +00:00
Eitan Isaacson 050fed6811 Bug 1731154 - Add move semantics to AccAttributes and use value references to avoid copies. r=morgan
Changed the array type to nsTArray to avoid copies and get compile-time
errors if we ever try to do that. To set an array as a value, it must be
moved.

Differential Revision: https://phabricator.services.mozilla.com/D125899
2021-09-23 20:01:11 +00:00
James Teh ac10d619ce Bug 1729407 part 6: Fix an existing line boundary test. r=eeejay
Previously, the test asserted that the line offsets for an embedded object should be an empty range.
This is actually incorrect, since there is content on the line (an empty text box and a button).
Update this with the correct result, but mark it as an expected failure.
The new implementation fixes this, so once we enable it by default, we can assert success.

Differential Revision: https://phabricator.services.mozilla.com/D125670
2021-09-23 11:38:11 +00:00
James Teh 178fe814d8 Bug 1729407 part 5: Use TextLeafRange for word/line starts in HyperTextAccessible::TextAtOffset if the cache is enabled. r=eeejay
We won't use HyperTextAccessible for building the cache.
However, we have a lot of existing single process mochitests for HyperTextAccessible.
Putting it behind this pref makes it easy for us to run those tests against this new text implementation.
Eventually, we want to use this implementation for both local and remote Accessibles.

Differential Revision: https://phabricator.services.mozilla.com/D124778
2021-09-23 11:38:11 +00:00
James Teh 18dedeaf42 Bug 1729407 part 4: Add TextLeafPoint support for finding character boundaries. r=eeejay
Again, this should be very easy to adapt to RemoteAccessible once we cache text there.

Differential Revision: https://phabricator.services.mozilla.com/D124776
2021-09-23 11:38:10 +00:00
James Teh b52bf17cab Bug 1729407 part 3: Add TextLeafPoint support for finding word boundaries. r=eeejay
This implementation uses WordBreaker and a bunch of code to emulate layout's handling of punctuation, space, words spanning across nodes, words broken due to lines, etc.

While this does mean we're effectively duplicating layout, there are a couple of advantages.
First, PeekOffset has a lot of quirks which have caused us problems in the past and are difficult to debug.
They don't matter so much for other consumers, but a11y is very sensitive to these kinds of bugs.
Having our own logic means we can make changes as needed without potentially affecting other PeekOffset consumers.
Second, while the implementation currently only works on LocalAccessibles (because we don't have text in RemoteAccessible yet), it's been designed so that it should be very easy to adapt for RemoteAccessible.
It already walks the unified Accessible tree, so it just has to be taught how to get text from RemoteAccessible once that's possible.
This means we don't have to cache word boundaries; they can be calculated on demand in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D124775
2021-09-23 11:38:10 +00:00
James Teh 1093cc6340 Bug 1729407 part 2: Add TextLeafPoint support for finding line start boundaries for LocalAccessibles. r=eeejay
This adds TextLeafPoint::FindBoundary, which will be the main entry point for finding single boundaries.
FindBoundary searches individual Accessibles for a boundary, walking the a11y tree and continuing the search if a boundary isn't found.

Support for line start boundaries uses layout to determine line edges, but otherwise traverses the accessibility tree.
This avoids depending on PeekOffset, which has a lot of quirks that cause problems for a11y.
More importantly, it's possible to find line boundaries within a single LocalAccessible using the lower level FindPrev/NextLineStartSameLocalAcc methods.
This will be useful for line boundary caching, since we want to cache this info on individual Accessibles.
In contrast, PeekOffset might walk outside the current Accessible, which makes caching more difficult.

Differential Revision: https://phabricator.services.mozilla.com/D124774
2021-09-23 11:38:09 +00:00
James Teh ca8f43ff48 Bug 1729407 part 1: Add new TextLeafPoint and TextLeafRange classes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D124773
2021-09-23 11:38:09 +00:00
Chris Peterson e8232ec5a5 Bug 1731526 - Fix non-unified build errors in accessible/. r=eeejay
accessible/base/TreeWalker.cpp:151:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
accessible/xpcom/xpcAccessibleMacInterface.mm:177:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]

Differential Revision: https://phabricator.services.mozilla.com/D126173
2021-09-22 01:41:40 +00:00
Marian-Vasile Laza 6ee4314955 Backed out changeset 176469dcdeba (bug 1731154) for causing bc failures on browser_attributed_text.js. 2021-09-21 21:14:29 +03:00
Eitan Isaacson 74d979ca0d Bug 1731154 - Add move semantics to AccAttributes and use value references to avoid copies. r=morgan
Changed the array type to nsTArray to avoid copies and get compile-time
errors if we ever try to do that. To set an array as a value, it must be
moved.

Differential Revision: https://phabricator.services.mozilla.com/D125899
2021-09-21 17:04:04 +00:00
James Teh 3f364558d3 Bug 1731003: RemoteAccessible: Don't try to use the COM proxy at all if the cache is enabled, even if mCachedFields is null. r=eeejay
If the cache is enabled, we don't have COM proxies from the content process.

Differential Revision: https://phabricator.services.mozilla.com/D125786
2021-09-20 23:00:08 +00:00
Morgan Reschenberg b45f079410 Bug 1730949: Send initial cache update for doc accessibles if accessibility.cache.enabled r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D125743
2021-09-17 22:08:17 +00:00
Morgan Reschenberg c7aea51785 Bug 1593273: Default browser.display.use_system_colors to true on windows, false elsewhere r=emilio,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D125268
2021-09-17 16:45:12 +00:00
Olli Pettay 79f14a7580 Bug 1730836, wallpaper the old issue where code expects GetDocShell to return non-null, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D125669
2021-09-16 12:29:59 +00:00
Butkovits Atila 42611d5b3f Backed out changeset f2f9361b8e5e (bug 1593273) for causing failures at test_default_background.xhtml. 2021-09-16 02:46:17 +03:00
Morgan Reschenberg ceca77b740 Bug 1593273: Default browser.display.use_system_colors to true on windows, false elsewhere r=emilio,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D125268
2021-09-15 22:27:27 +00:00
James Teh a1b5690620 Bug 1468128: Use an extra bit for the content process portion of MSAA unique ids. r=aklotz
This allows us to support 255 content processes instead of 127.
It also means we have 1 less bit for the Accessible portion of the id, which means we can support less Accessibles per process.
Hopefully, this shouldn't be a problem, especially with Fission generally meaning less documents per process.

Differential Revision: https://phabricator.services.mozilla.com/D104344
2021-09-15 02:21:11 +00:00
Morgan Reschenberg eae2965c1b Bug 1730545: Add CopyableTArray<int32_t> to AccAttributes variant r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123398
2021-09-13 23:02:47 +00:00
Olli Pettay a6ae4c4cf1 Bug 1730541, remove nsCoreUtils::IsContentDocument, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D125462
2021-09-13 21:01:23 +00:00
Niklas Baumgardner 42f48852ca Bug 1534799 - Convert &searchTextBox.clear.label; to fluent. r=emalysz,fluent-reviewers,flod,dao,morgan
Differential Revision: https://phabricator.services.mozilla.com/D123640
2021-09-10 14:52:55 +00:00
Marian-Vasile Laza 9ae7ce258e Backed out changeset a6d7f0da2513 (bug 1729061) for causing bustages on DocAccessibleChildBase.cpp. CLOSED TREE 2021-09-10 03:47:09 +03:00
Eitan Isaacson 9cd3deba73 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-09 22:25:58 +00:00
Csoregi Natalia 7b751b9325 Backed out changeset f42e32addd89 (bug 1534799) for causing failures on test_txtctrl.xhtml. CLOSED TREE 2021-09-08 18:48:58 +03:00
Niklas Baumgardner 4b352f588f Bug 1534799 - Convert &searchTextBox.clear.label; to fluent. r=emalysz,fluent-reviewers,flod,dao,morgan
Differential Revision: https://phabricator.services.mozilla.com/D123640
2021-09-08 14:56:59 +00:00
Eitan Isaacson a6a943d0ea Bug 1729058 - Enable cache initialization in update pushes. r=morgan
There can be a scenario where an initial cache is pushed to an accessible via an update and not an "initial" push that a doc load or a subtree show would give.

For example, an accessible might not have a name, description, or numeric value (that is all we currently cache), but then get a name later in its lifetime. If that is the case the accessible will get a cache AccAttributes with a DeleteEntry value for "description" since its description is still empty. That entry should not be stored in the cache.

Differential Revision: https://phabricator.services.mozilla.com/D124484
2021-09-03 18:56:24 +00:00
Eitan Isaacson babc6af3e3 Bug 1728940 - Reverse reverted null check in ATK value functions. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D124480
2021-09-03 18:02:37 +00:00
Eitan Isaacson cf78c1b158 Bug 1728442 - P5: Use unified description method in xpcom and platforms. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124237
2021-09-02 18:06:53 +00:00
Eitan Isaacson 513a9ecbf8 Bug 1728442 - P4: Use cached description in parent. r=Jamie
Also unify local/remote Description with an abstract definition in
Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D124236
2021-09-02 18:06:52 +00:00
Eitan Isaacson e233a15fc7 Bug 1728442 - P3: Push description to cache. r=Jamie
Rely on name/description changes.

Differential Revision: https://phabricator.services.mozilla.com/D124235
2021-09-02 18:06:52 +00:00
Eitan Isaacson 338d221423 Bug 1728442 - P2: Make LocalAccessible:Description const. r=Jamie
This makes it consistent with the remote Description method and will
allow us to merge them in Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D124234
2021-09-02 18:06:51 +00:00
Eitan Isaacson 73f172d0c6 Bug 1728442 - P1: Make browser description test rely on name/desc change events. r=Jamie
By using a real image, and not a broken one, we avoid the recreation
that happens when the image gains and loses an alt. We can then rely on
name/description changes.

This is a more accurate test that doesn't rely on tree mutations.

Differential Revision: https://phabricator.services.mozilla.com/D124233
2021-09-02 18:06:51 +00:00
Eitan Isaacson 675b299c9e Bug 1728624 - Null-check internal object in ATK value functions. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D124366
2021-09-02 16:50:41 +00:00
Eitan Isaacson 20b6875ab9 Bug 1728437 - Keep cache sparse and only store populated fields. r=Jamie
When constructing the initial cache, don't push empty or default fields.
Also, have a way to remove fields from an established cache if it
becomes empty/default.

Differential Revision: https://phabricator.services.mozilla.com/D124127
2021-09-01 22:20:09 +00:00
Eitan Isaacson 6c538e2f0e Bug 1728403 - Introduce CacheUpdateType as argument for Cache IPDL message. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D124117
2021-09-01 20:32:17 +00:00
Morgan Reschenberg 1e1c536fcd Bug 1728383: Fix test logging for getBounds r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D124096
2021-08-31 18:41:01 +00:00
Edgar Chen 262f7ec893 Bug 1728081 - Part 4: Make HTMLFormElement::GetDefaultSubmitElement return nsGenericHTMLFormElement; r=smaug
so that the callers don't need to queryInterface it back to nsIContent.

Differential Revision: https://phabricator.services.mozilla.com/D123952
2021-08-30 18:44:51 +00:00
Edgar Chen bae585f79e Bug 1728081 - Part 3: Merge nsIForm into HTMLFormElement; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D123951
2021-08-30 18:44:51 +00:00
Eitan Isaacson 251ad4f476 Bug 1727643 - P4: Make use of new common methods in platforms and XPCOM. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123698
2021-08-26 19:40:06 +00:00
Eitan Isaacson 2c5a1217db Bug 1727643 - P3: Make numeric value methods abstract in Accessible and wire it thru. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123697
2021-08-26 19:40:05 +00:00
Eitan Isaacson 17e9670742 Bug 1727643 - P2: Send numeric value fields to cache. r=morgan
Also added double to AccAttributes.

Differential Revision: https://phabricator.services.mozilla.com/D123696
2021-08-26 19:40:05 +00:00
Eitan Isaacson 3c7fe28200 Bug 1727643 - P1: Add cache convinience methods in LocalAccessible. r=morgan
Also introduce "cache domains" to have a shorthand for which things in
the cache needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D123695
2021-08-26 19:40:04 +00:00
Eitan Isaacson a926de70ee Bug 1727640 - Push name change cache updates on windows. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123688
2021-08-26 18:45:58 +00:00
Eitan Isaacson cc7e9cf3e8 Bug 1727616 - Add meter ARIA role. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D123674
2021-08-26 16:17:21 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Andi-Bogdan Postelnicu 093ebdff41 Bug 1725145 - reference implementation of doc accessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123527
2021-08-25 10:46:16 +00:00
Andi-Bogdan Postelnicu 54a355c786 Bug 1725145 - add static prefs include to accessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123455
2021-08-25 10:46:16 +00:00
Eitan Isaacson 5cbfe86b54 Bug 1727373 - Add state change info in event logging. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123529
2021-08-24 23:49:59 +00:00
Eitan Isaacson a972d7f962 Bug 1726845 - P2: Cache EXPANDABLE state in mozAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123264
2021-08-24 22:22:26 +00:00
Eitan Isaacson f840fc077c Bug 1726845 - P1: Remove special summary MOX class and update test. r=morgan
The summary class just had a moxExpanded which we already have in mozAccessible.
I think the former was added before the latter was generalized for aria-expanded usage.

Differential Revision: https://phabricator.services.mozilla.com/D123516
2021-08-24 22:22:25 +00:00
James Teh 6e56411410 Bug 1727227: Add a static assert to ensure that the size of the AccAttributes value variant isn't unintentionally changed. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123415
2021-08-24 21:44:43 +00:00
Morgan Reschenberg c55f522302 Bug 1726695: Add support for RemoteAccessible's in MsaaAccessible::get_accName r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D123258
2021-08-23 15:39:50 +00:00
Michelle Goossens c7d34da2f9 Bug 1723574 - Enable mochitest-browser-chrome tests that no longer fail r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D123247
2021-08-23 12:45:31 +00:00
Andi-Bogdan Postelnicu 75ed803f7c Bug 1725145 - fixes for linking in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122344
2021-08-22 10:21:56 +00:00
Andi-Bogdan Postelnicu 250fa0d795 Bug 1725145 - header files fixes in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122343
2021-08-22 10:21:55 +00:00
Michelle Goossens d192833f8d Bug 1723574 - Migrate Windows 10 mochitest-browser-chrome suite from AWS to Azure r=jmaher,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D122511
2021-08-20 20:55:02 +00:00
Morgan Reschenberg 94466e43ee Bug 1726644: Add waitForStateChange function to head.js export statement r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123162
2021-08-19 21:36:41 +00:00
Morgan Reschenberg 224e6f9293 Bug 1720334: Represent checked/unchecked state with AXValue for treeitems r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D121215
2021-08-19 20:50:55 +00:00
Eitan Isaacson ace5987168 Bug 1726452 - Make Name an abstract Accessible method. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123018
2021-08-19 19:57:19 +00:00
Morgan Reschenberg 8a48fda373 Bug 1726606: Default browser.display.document_color_use to 1 on MacOS r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D123142
2021-08-19 17:44:44 +00:00
Gijs Kruitbosch d90c0bb57f Bug 1724718 - skip some XUL-y tests on android, r=emilio,agi
Depends on D122663

Differential Revision: https://phabricator.services.mozilla.com/D122664
2021-08-19 12:13:01 +00:00
Edgar Chen 3d5334b444 Bug 1726393 - Part 2: Rename nsIFormControl::GetFormElement to GetForm; r=smaug
Depends on D122995

Differential Revision: https://phabricator.services.mozilla.com/D122996
2021-08-19 09:20:24 +00:00
James Teh 1454a64119 Bug 1725916: Ensure an Accessible is created if aria-description is set. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D122850
2021-08-18 23:37:31 +00:00
Ryan VanderMeulen 8a7ca74965 Bug 1726391 - Only try to build DocAccessibleTypes.ipdlh if accessibility is enabled. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D122974
2021-08-18 16:17:48 +00:00
Eitan Isaacson 5090a9049a Bug 1700264 - Cache names. r=Jamie
Eventually we will want to add the Name method as an abstract method in
Accessible and implemented it platform-independent in
RemoteAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D121925
2021-08-17 18:17:39 +00:00
Eitan Isaacson b3e528f978 Bug 1700263 - Implement async Cache protocol method. r=Jamie
This is a good place to formalize the following naming convention:
 * A "field" is and direct accessible getter method (name,
   role, value, min, max, etc.)
 * An "attribute" is a member of the "attributes" field.

With that said, I think AccAttributes should probably be named
AccProperties or something of the sort. Might leave that for another
time.

Differential Revision: https://phabricator.services.mozilla.com/D121924
2021-08-17 18:17:38 +00:00
Eitan Isaacson dfc900e0e4 Bug 1700263 - Split serialize function into a flatten, and then serialize. r=Jamie
This will allow us to use the list of accessibles to be serialized later
for pushing a cache. The single array also gives us an opportunity to
paginate the cache, if needed.

Differential Revision: https://phabricator.services.mozilla.com/D121923
2021-08-17 18:17:38 +00:00
James Teh 299944292f Bug 1725894: Support IEnumVARIANT for RemoteAccessible when the cache is enabled. r=morgan
As part of this, I changed RemoteAccessible::RemoteChildAt (and thus RemoteAccessible::ChildAt) so it doesn't crash when passed an invalid child index.
Our EnumVariant implementation relied on this with LocalChildAt.
I think it makes sense for LocalChildAt, RemoteChildAt and ChildAt to be consistent in this regard.

Differential Revision: https://phabricator.services.mozilla.com/D122681
2021-08-17 11:17:50 +00:00
James Teh 6b226a31b2 Bug 1725449: Don't support IEnumVARIANT for local OuterDocAccessibles with remote children when the cache isn't enabled. r=morgan
Prior to this patch, we reported that we supported IEnumVARIANT, but it wouldn't return any children, causing the oleacc AccessibleChildren function to report no children to clients.
This is tricky to support due to the special COM proxy stuff we have to do for remote children without the cache.
There's no benefit to IEnumVARIANT with only one child anyway, so it's easiest to just say we don't support it.
The oleacc AccessibleChildren function will detect this and fall back to IAccessible::get_accChild instead.

I also took the opportunity to fix a slightly related outdated comment I spotted while figuring out the fix here.

Differential Revision: https://phabricator.services.mozilla.com/D122674
2021-08-17 00:43:06 +00:00
Eitan Isaacson d3e048885d Bug 1723563 - Get activated state from widget instead of storing it. r=Jamie
Firefox shows a blank window and then swaps it for the real thing for
percieved startup performance. This causes us to throw away the
activated state stored on the initial root widget. Instead of storing
the state, we should retrieve it from widget.

Differential Revision: https://phabricator.services.mozilla.com/D122168
2021-08-12 21:12:32 +00:00
Butkovits Atila 69c0a6cb2c Backed out changeset b70a28c9a533 (bug 1723563) for causing failures on browser_accessibility_indicator.js. CLOSED TREE 2021-08-10 22:25:00 +03:00
Eitan Isaacson afdc2b3bcc Bug 1723563 - Get activated state from widget instead of storing it. r=Jamie
Firefox shows a blank window and then swaps it for the real thing for
percieved startup performance. This causes us to throw away the
activated state stored on the initial root widget. Instead of storing
the state, we should retrieve it from widget.

Differential Revision: https://phabricator.services.mozilla.com/D122168
2021-08-10 16:24:40 +00:00
Emilio Cobos Álvarez 2d0a072174 Bug 1723921 - Cleanup nsComputedDOMStyle and related APIs. r=layout-reviewers,jfkthame
This will make implementing the new behavior behind a pref
really straight-forward, and is generally nicer.

Depends on D121858

Differential Revision: https://phabricator.services.mozilla.com/D121705
2021-08-07 09:47:15 +00:00
Eitan Isaacson 3036704f67 Bug 1724173 - Check range is valid before selecting in mozTextAccessible. r=morgan
We do this in MOXTextMarkerDelegate already.

Differential Revision: https://phabricator.services.mozilla.com/D122010
2021-08-06 21:31:22 +00:00
Ben Hearsum aecb82dbfc Bug 1714200: skip failing mochitest-browser-chrome tests on M1 machines r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D121221
2021-08-06 19:16:54 +00:00
Sebastian Streich 0818b99745 Bug 1721146 - Fix Missing ReferrerInfo on Blocked Downloads r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D121608
2021-08-06 12:22:59 +00:00
Eitan Isaacson 7255c6bf8e Bug 1723614 - P2: Robustify name change events and use events in name tests. r=Jamie
Changed the browser and mochitest name tests to rely exclusively on name change
events. To make this happen, I fixed all the cases where we were
event-deficient in the code:

* Examine target in PushNameOrDescriptionChange if it has eNameFromSubtreeRule.
  Fixes cases where a text change event happens with the subtree name root as target.
* Change in aria-labelledby should always result in a name change event because
  that attribute has highest prescedence.
* Add eHasNameDependent/eHasDescriptionDependent context flags when dependee accessible
  is added after dependent accessible to tree.
* Handle value attribute change in HTML buttons and determine if they should trigger a
  name changed event.
* Use accessible tree instead of content tree when calculating HTMLSelectOptionAccessible
  name, this keeps the PushNameOrDescriptionChange sees in name flags consistent with
  the actual tree.
* Handle label attribute change in select options and determine if they should trigger
  a name changed event.
* Determine if s summary attribute change on a table triggers a name change event.
* If a title attribute is changed, reliably fire a name change event if
  it is used in name calculation.

Differential Revision: https://phabricator.services.mozilla.com/D121580
2021-08-05 23:04:17 +00:00
Eitan Isaacson caafeaea2a Bug 1723614 - P1: Override DOMAttributeChanged where it makes sense. r=Jamie
Added a MIXED state change event when progress goes from determinate to
undeterminate.

Differential Revision: https://phabricator.services.mozilla.com/D121579
2021-08-05 23:04:17 +00:00
Emilio Cobos Álvarez 0c427cb231 Bug 1714290 - Don't flush in XULTreeGridAccessible. r=Jamie
If comment 5 is right, I don't think that this should be needed.

Differential Revision: https://phabricator.services.mozilla.com/D121711
2021-08-05 10:52:52 +00:00
Eitan Isaacson da0fa820e2 Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-08-04 21:31:19 +00:00
Eitan Isaacson 1924362000 Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Depends on D120900

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-08-04 21:31:19 +00:00
Eitan Isaacson 0867ef1f8f Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
2021-08-04 21:31:18 +00:00
Alexandru Michis 661015792f Backed out changeset 1c892391a0e1 (bug 1721146) for causing dt failures in browser_console_clear_cache.js
CLOSED TREE
2021-08-04 17:09:12 +03:00
Sebastian Streich 68c14d7f64 Bug 1721146 - Fix Missing ReferrerInfo on Blocked Downloads r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D121608
2021-08-04 12:41:16 +00:00
Marian-Vasile Laza 237ee94bb0 Backed out 3 changesets (bug 1722396) for causing gv-junit test failures. CLOSED TREE
Backed out changeset 086278457495 (bug 1722396)
Backed out changeset ea0639278659 (bug 1722396)
Backed out changeset 9c723d30ef5f (bug 1722396)
2021-08-04 07:29:15 +03:00
Eitan Isaacson 0e6ae6e8d0 Bug 1720185 - If a child is a member of name calc subtree, fire event on container when it changes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D119663
2021-08-03 20:31:52 +00:00
Eitan Isaacson f188c700db Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-08-03 20:23:20 +00:00
Eitan Isaacson d715681b78 Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Depends on D120900

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-08-03 20:23:19 +00:00
Eitan Isaacson 3e83dc6403 Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
2021-08-03 20:23:19 +00:00
Iulian Moraru a38ff322aa Backed out changeset 6bcd0226a473 (bug 1721146) for causing xpcshell failures on test_DownloadLegacy.js. CLOSED TREE 2021-08-03 17:54:05 +03:00
Sebastian Streich fd0013fc0c Bug 1721146 - Fix Missing ReferrerInfo on Blocked Downloads r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D121608
2021-08-03 13:51:02 +00:00
Dorel Luca 41530b2055 Backed out 3 changesets (bug 1722396) for Linting failure in accessible/tests/browser/mac/browser_aria_expanded.js. CLOSED TREE
Backed out changeset 86fc719a7a94 (bug 1722396)
Backed out changeset 02dea4423d5d (bug 1722396)
Backed out changeset 22f85fd34b27 (bug 1722396)
2021-08-03 02:48:13 +03:00
Eitan Isaacson b1dff1168e Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-08-02 22:51:50 +00:00
Eitan Isaacson 7f9ccc4dce Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Depends on D120900

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-08-02 22:51:49 +00:00
Eitan Isaacson 175bbedef8 Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
2021-08-02 22:51:49 +00:00
Narcis Beleuzu acb7240df4 Backed out changeset 3564b76b9334 (bug 1720334) for bc failure on browser_outline.js . CLOSED TREE 2021-08-02 23:22:00 +03:00
Morgan Reschenberg f57cc30276 Bug 1720334: Represent checked/unchecked state with AXValue for treeitems r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D121215
2021-08-02 19:41:21 +00:00
James Teh f2a0bfe104 Bug 1722621: Fix detection of autocomplete popups in XULListboxAccessible after recent DOM changes. r=morgan
Previously, we used GetFlattenedTreeParent from the list box to find the autocomplete popup.
After bug 1708735, this now returns a slot instead of the panel.
We now use GetParentElement instead, which works as expected and is consistent with other code in this class anyway.

I also added a new test so this doesn't regress yet again.
We already have test_focus_autocomplete.xhtml which is supposed to test this, but that test is broken, was thus disabled and is complicated enough that I don't think we're going to fix it any time soon, if ever.

The new test was triggering an assertion on Windows when trying to handle a caret event, so HyperTextAccessible::GetCaretRect had to be tweaked slightly to fix this.

Differential Revision: https://phabricator.services.mozilla.com/D121163
2021-07-30 18:03:04 +00:00
Mike Hommey 03223f9ea4 Bug 1722653 - Remove MOZ_CAIRO_CFLAGS. r=firefox-build-system-reviewers,jgilbert,andi
Differential Revision: https://phabricator.services.mozilla.com/D121066
2021-07-29 23:38:31 +00:00
Noemi Erli d68b5533d1 Backed out 4 changesets (bug 1722396) for causing multiple failures CLOSED TREE
Backed out changeset 3fcd2aa75f63 (bug 1722396)
Backed out changeset 52cc9f22fbd8 (bug 1722396)
Backed out changeset 20b2120a002a (bug 1722396)
Backed out changeset e2cf9edf5d73 (bug 1722396)
2021-07-30 01:39:18 +03:00
Csoregi Natalia 23c2e310ac Bug 1722396 - Fix eslint. r=lint-fix CLOSED TREE 2021-07-30 01:03:47 +03:00
Eitan Isaacson f2ee930b01 Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-07-29 20:22:27 +00:00
Eitan Isaacson db6ef08baf Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Depends on D120900

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-07-29 20:22:27 +00:00
Eitan Isaacson 4e671c8353 Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
2021-07-29 20:22:27 +00:00
James Teh 500cfa49c4 Bug 1721666: Clear the embedder accessible on PBrowserBridge if that accessible is destroyed. r=eeejay
If an iframe is hidden, its OuterDocAccessible will be destroyed, but the PBrowserBridge still exists.
Since the OuterDocAccessible was destroyed, its id can be reused.
Therefore, if a new embedder accessible hasn't already been set, clear the embedder accessible on PBrowserBridge.
This ensures that the wrong accessible can't accidentally be used when an OOP iframe document is added while the iframe is hidden.

Differential Revision: https://phabricator.services.mozilla.com/D121015
2021-07-28 23:42:12 +00:00
Dorel Luca 481b88403e Backed out 3 changesets (bug 1722396) for Devtools failures in devtools/server/tests/browser/browser_accessibility_node_events.js. CLOSED TREE
Backed out changeset cda26075ae09 (bug 1722396)
Backed out changeset d953dc56b027 (bug 1722396)
Backed out changeset a1cbf6bbf0c3 (bug 1722396)
2021-07-29 01:47:13 +03:00
Eitan Isaacson 5318f826b9 Bug 1722396 - P3: Compare old state bits with new ones to determine state change events. r=morgan
Needed to tweak tests a bit because the code is now more descerning
wheter to fire an event or not. Will do so only if the state actually
changes.

Depends on D120901

Differential Revision: https://phabricator.services.mozilla.com/D120902
2021-07-28 22:04:19 +00:00
Eitan Isaacson fdf6272022 Bug 1722396 - P2: Move AttributeChangedImpl into LocalAccessible::DOMAttributeChanged. r=morgan
Also folded ARIAAttributeChanged into DOMAttributeChanged temporarily.
Will streamline that further in the next patch where state changes are
done a bit better.

Differential Revision: https://phabricator.services.mozilla.com/D120901
2021-07-28 22:04:18 +00:00
Eitan Isaacson 61f3152be8 Bug 1722396 - P1: Remove DocAccessible::mARIAAttrOldValue. r=morgan
The AttributeChanged callback includes the old value, so there isn't a
reason to store this from AttributeWillChange.

Differential Revision: https://phabricator.services.mozilla.com/D120900
2021-07-28 22:04:18 +00:00
Christoph Kerschbaumer 4a6250387f Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 19:16:16 +00:00
Sandor Molnar 68cdec0548 Backed out changeset 7eb8945dd8e3 (bug 1719272) for causing bustages in gecko decision task. CLOSED TREE 2021-07-28 19:47:06 +03:00
Christoph Kerschbaumer bb716f0701 Bug 1719272: Annotate failing browser/ tests to potentially enable https-first mode in Nightly r=webcompat-reviewers,denschub,webdriver-reviewers,preferences-reviewers,Gijs,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D119177
2021-07-28 16:08:07 +00:00
Morgan Reschenberg 180c20349b Bug 1721390: Add moxExpanded to mozAccessible r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D121003
2021-07-27 22:47:36 +00:00
Eitan Isaacson d0303f3525 Bug 1722394 - Slim AccAttributes::AttrValueType by removing nsString. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D120897
2021-07-26 21:38:48 +00:00
Iulian Moraru a4ec557be4 Bug 1652192 - disable browser_test_visibility.js on windows_10_64_qr for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D120786
2021-07-26 19:04:50 +00:00
Rob Lemley a82a4bf011 Bug 1670147 - Set values for AccessibleHandler.dll CLSID/IIDs at configure time. r=Jamie,firefox-build-system-reviewers,glandium
Allow for downstream projects such as Thunderbird to set different GUIDs for
AccessibleHandler to avoid clashes when both applications are installed.
The GUIDs themselves can be defined in confvars.sh or in branding/configure.sh
depending on the specific needs of the application. Fallback GUIDs are in
old-configure.

Differential Revision: https://phabricator.services.mozilla.com/D118124
2021-07-26 13:43:36 +00:00
Morgan Reschenberg a58920e618 Bug 1694571: Replace AccessibleOrProxy's with Accessible's r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D117927
2021-07-22 17:58:49 +00:00
Kashav Madan 5781dca888 Bug 1720688 - Support extended attribute syntax in protocol declarations, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119975
2021-07-22 02:24:43 +00:00
Butkovits Atila d44caab816 Bug 1484212 - disable browser_test_focus_dialog.js on Win_64_qr_opt for frequent failures. r=intermittent-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D120205
2021-07-21 22:55:38 +00:00
James Teh ca92a8ae5a Bug 1715230 part 6: Remove IsProxy() checks throughout the Windows a11y code. r=morgan
Now that ProxyWrappers (RemoteAccessibleWrap and friends) are gone, IsProxy() can never be true, so checking it is pointless.

Differential Revision: https://phabricator.services.mozilla.com/D117536
2021-07-19 03:44:11 +00:00
James Teh 5aa62c8d87 Bug 1715230 part 5: Remove Windows ProxyWrappers! r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D117529
2021-07-19 03:44:11 +00:00
James Teh dca5bf0440 Bug 1715230 part 4: Stop using RemoteAccessibleWrap! r=morgan
Previously, when the cache was disabled, we had a RemoteAccessibleWrap for every RemoteAccessible.
This is no longer necessary and now only serves as an extra level of indirection and memory waste.
We still keep the stub MsaaAccessible to hold the id sent up from content.

Differential Revision: https://phabricator.services.mozilla.com/D117528
2021-07-19 03:44:10 +00:00
James Teh 00a413fd6b Bug 1715230 part 3: Change AccessibleWrap::DispatchTextChangeToHandler to a static method accepting an Accessible*. r=morgan
In a subsequent patch, we want to call it with a RemoteAccessible instead of a RemoteAccessibleWrap.
As an instance method of AccessibleWrap, this wouldn't be possible because AccessibleWrap is a subclass of LocalAccessible.
Strictly speaking, there's no good reason for this to be part of AccessibleWrap at all any more, but I'm not dealing with that here.

Differential Revision: https://phabricator.services.mozilla.com/D117527
2021-07-19 03:44:10 +00:00
James Teh e8bf6a16fd Bug 1715230 part 2: Stop using RemoteIframeDocRemoteAccessibleWrap. r=morgan
This was previously used to wrap the COM proxy for the document child of an OOP iframe in a content process.
It was returned by OuterDocAccessible::LocalChildAt*.
Instead, BrowserBridgeChild now directly holds the COM proxy and MsaaAccessible traversal methods have specific code paths to return that as appropriate.

Since we no longer need the Windows OuterDocAccessible traversal overrides for OOP iframes nor remote top level documents, they have been removed entirely.

Differential Revision: https://phabricator.services.mozilla.com/D117526
2021-07-19 03:44:10 +00:00
James Teh 24d163d44a Bug 1715230 part 1: Make IAccessible::accHitTest use the unified Accessible hierarchy. r=morgan
It still can't handle being called on a RemoteAccessible because Bounds isn't unified yet.
However, this allows it to be called on a local OuterDoc (a XUL browser element) and return a remote document child.
Previously, this was handled by the RemoteAccessibleWrap returned from OuterDocAccessible::LocalChildAt, but that will go away in a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D117525
2021-07-19 03:44:09 +00:00
Florian Quèze ca7bbcc752 Bug 1720374 - Remove MOZ_GECKO_PROFILER ifdefs that are not useful, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119810
2021-07-15 22:04:23 +00:00
Morgan Reschenberg 5c59e82313 Bug 1716828: Notify VoiceOver of announcements from a11yUtils with AXAnnouncementRequested r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D119300
2021-07-15 19:12:09 +00:00
Morgan Reschenberg 5dd0009d35 Bug 1719736: Have mozAccessible protocol inherit from NSObject r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D119445
2021-07-15 19:12:09 +00:00
Eitan Isaacson def0145b01 Bug 1717575 - Check given attributes for null before iterating. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D119789
2021-07-15 18:24:01 +00:00
Morgan Reschenberg bd696c135b Bug 1720696: Only fetch mMsaa from non-null AccessibleWraps r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D120001
2021-07-15 18:23:03 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Harry Twyford 93961ec313 Bug 1717509 - Part 1 - Hook up UrlbarProviderPlaces and fix various lint issues. r=adw,preferences-reviewers
UnifiedComplete must stick around to serve as an mozIPlacesAutoComplete implementation for XUL consumers like search.js and privacy.js.

Differential Revision: https://phabricator.services.mozilla.com/D119306
2021-07-09 23:52:37 +00:00
Butkovits Atila 65d5ae500e Bug 1714067 - disable browser_test_selection_urlbar.js on Win_opt for frequent failures. r=intermittent-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D118893
2021-07-09 14:42:12 +00:00
Eitan Isaacson 6c4ded1bb1 Bug 1638500 - Consume initial menu item focus event. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D119320
2021-07-08 16:33:00 +00:00
Paul Bone ff55286ec5 Bug 1717775 - Check for null before dereferencing child r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D118580
2021-07-07 23:41:08 +00:00
Doug Thayer b5f7314e3e Bug 1714212 - Ensure COM initialized prior to showing skeleton UI r=Jamie,aklotz,tkikuchi
This implements Jamie's suggested fixes for a screenreader issue when the
skeleton UI is enabled. Most of the work here is just pulling out pieces from the
files we needed to include in mozglue so that any references to, say, nsString
or other pieces from libxul either no longer exist or are only included when
building libxul. In a few cases this meant creating whole files to house single
functions, which isn't so pretty, but it was the best I could come up with to
get the job done.

Differential Revision: https://phabricator.services.mozilla.com/D117663
2021-07-07 22:37:14 +00:00
Narcis Beleuzu 1ff027d763 Backed out changeset acf2d74efbbc (bug 1714212) for SM bustages on NativeNt.h 2021-07-07 23:13:42 +03:00
Doug Thayer dc9c284076 Bug 1714212 - Ensure COM initialized prior to showing skeleton UI r=Jamie,aklotz,tkikuchi
This implements Jamie's suggested fixes for a screenreader issue when the
skeleton UI is enabled. Most of the work here is just pulling out pieces from the
files we needed to include in mozglue so that any references to, say, nsString
or other pieces from libxul either no longer exist or are only included when
building libxul. In a few cases this meant creating whole files to house single
functions, which isn't so pretty, but it was the best I could come up with to
get the job done.

Differential Revision: https://phabricator.services.mozilla.com/D117663
2021-07-07 18:17:36 +00:00
Morgan Reschenberg f04377754d Bug 1719366: Only perform selection on valid start and end markers r=eeejay DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D119234
2021-07-07 15:48:56 +00:00
Butkovits Atila 20567015a7 Bug 1638500 - disable browser_popupbutton.js on Mac_WR_opt for frequent failures. r=intermittent-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D118892
2021-07-06 17:33:41 +00:00
Hiroyuki Ikezoe 66148df97a Bug 1717726 - Remove browser_deck_has_out_of_process_iframe.js. r=tnikkel
We are going to disallow having any remote <browser>s or <iframe>s inside
nsDeckFrame, so this test is no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D119066
2021-07-06 07:38:06 +00:00
Dorel Luca bc6f2486e2 Backed out changeset 11d1710e481f (bug 1714212) for Browser-chrome failures in toolkit/xre/test/browser_checkdllblockliststate.js. CLOSED TREE 2021-06-26 09:45:29 +03:00
Doug Thayer c3702a9447 Bug 1714212 - Ensure COM initialized prior to showing skeleton UI r=Jamie,aklotz,tkikuchi
This implements Jamie's suggested fixes for a screenreader issue when the
skeleton UI is enabled. Most of the work here is just pulling out pieces from the
files we needed to include in mozglue so that any references to, say, nsString
or other pieces from libxul either no longer exist or are only included when
building libxul. In a few cases this meant creating whole files to house single
functions, which isn't so pretty, but it was the best I could come up with to
get the job done.

Differential Revision: https://phabricator.services.mozilla.com/D117663
2021-06-26 04:10:50 +00:00
James Teh 165b6e2e26 Bug 1598750: Make browser_nested_iframe.js wait for doc load complete if the nested iframe doc accessible isn't present yet. r=morgan
For OOP iframes, a doc load complete event on the embedder document doesn't necessarily mean the iframe document has finished loading yet.
We already checked for the busy state on the nested iframe doc and waited for a doc load complete event in that case.
However, depending on timing, it might be possible there is no document at all (even a busy one), so we should wait for doc load complete in that case too.
This is a speculative fix; I wasn't able to reproduce this myself.

Differential Revision: https://phabricator.services.mozilla.com/D118123
2021-06-22 23:11:25 +00:00
James Teh f846c3e1d7 Bug 1716549: Make MsaaAccessible::QueryInterface return interfaces that are always available even if the underlying Accessible is dead. r=morgan
Returning E_NOINTERFACE for IUnknown at least is probably bad form.
Also, mscom::Interceptor seems to expect IDispatch to always be available and asserts if it isn't.
We're seeing some weird COM crashes in the wild, and while I don't know if this will fix them, correctness seems like a good place to start.

Differential Revision: https://phabricator.services.mozilla.com/D117967
2021-06-22 15:52:26 +00:00
Kagami Sascha Rosylight 8bbe7f3f11 Bug 1713334 - Part 1: Keep a text node inside text controls even if empty r=masayuki,Jamie
Doing so prevents confusion when detecting selection change.

Differential Revision: https://phabricator.services.mozilla.com/D116303
2021-06-18 00:36:53 +00:00
Ryan VanderMeulen a337a14382 Backed out 5 changesets (bug 1713334) for causing bug 1716714.
Backed out changeset bd1c37ce2c61 (bug 1713334)
Backed out changeset 876ed18c5126 (bug 1713334)
Backed out changeset 5a4f4514d99a (bug 1713334)
Backed out changeset 7d7feef654c7 (bug 1713334)
Backed out changeset 61e15374e617 (bug 1713334)
2021-06-17 10:57:32 -04:00
Eitan Isaacson 848bbe1cb6 Bug 1691813 - Use TreeWalker to find accessible descendants. r=Jamie
This speeds up reflows on pages like view source that have a single
giant container. But this maybe slows down other cases? I'm not 100%
sure.

Differential Revision: https://phabricator.services.mozilla.com/D117948
2021-06-16 18:05:13 +00:00
Butkovits Atila 8378288f6c Backed out changeset af44502e176a (bug 1691813) for causing build bustages on DocAccessible.cpp. CLOSED TREE 2021-06-16 20:43:03 +03:00
Eitan Isaacson ac98d85fc6 Bug 1691813 - Use TreeWalker to find accessible descendants. r=Jamie
This speeds up reflows on pages like view source that have a single
giant container. But this maybe slows down other cases? I'm not 100%
sure.

Differential Revision: https://phabricator.services.mozilla.com/D117948
2021-06-16 16:42:47 +00:00
James Teh 1f9a808684 Bug 1713680: Correctly handle the case where the BrowserBridgeParent for an OOP iframe changes while addition of its DocAccessibleParent is still pending. r=eeejay
An OuterDocAccessible can be recreated, causing the embedder accessible for a BrowserBridgeParent (OOP iframe) to change.
However, changing the src of an iframe can also cause a new BrowserBridgeParent to be created.
Previously, if addition of the child document was still pending when this occurred (because the OuterDocAccessible hadn't been sent to the parent yet), this pending addition could remain, causing problems if the id was reused later.

To fix this (and to hopefully make this more robust given the continued problems we're seeing in the wild with this area of the code), I've completely refactored the way we handle these pending child doc additions.
Rather than tracking the pending additions by their accessible id and child doc, we track them by their BrowserBridgeParent.
This way, we're closest to a single source of truth.
We also remove a pending addition when an associated BrowserBridgeParent is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D117889
2021-06-16 11:50:09 +00:00
Marian-Vasile Laza 5e955a47c4 Backed out changeset 238ccbc3793f (bug 1713680) for causing bustages on BrowserBridgeParent.cpp
CLOSED TREE
2021-06-16 09:58:21 +03:00
James Teh e0cd1fdf22 Bug 1713680: Correctly handle the case where the BrowserBridgeParent for an OOP iframe changes while addition of its DocAccessibleParent is still pending. r=eeejay
An OuterDocAccessible can be recreated, causing the embedder accessible for a BrowserBridgeParent (OOP iframe) to change.
However, changing the src of an iframe can also cause a new BrowserBridgeParent to be created.
Previously, if addition of the child document was still pending when this occurred (because the OuterDocAccessible hadn't been sent to the parent yet), this pending addition could remain, causing problems if the id was reused later.

To fix this (and to hopefully make this more robust given the continued problems we're seeing in the wild with this area of the code), I've completely refactored the way we handle these pending child doc additions.
Rather than tracking the pending additions by their accessible id and child doc, we track them by their BrowserBridgeParent.
This way, we're closest to a single source of truth.
We also remove a pending addition when an associated BrowserBridgeParent is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D117889
2021-06-16 00:14:52 +00:00
Kagami Sascha Rosylight 52d022e717 Bug 1713334 - Part 1: Keep a text node inside text controls even if empty r=masayuki,Jamie
Doing so prevents confusion when detecting selection change.

Differential Revision: https://phabricator.services.mozilla.com/D116303
2021-06-14 19:56:22 +00:00
Csoregi Natalia 85bb87115a Backed out 5 changesets (bug 1713334) for failures on test_texteditor_keyevent_handling.html. CLOSED TREE
Backed out changeset ab7b2061f5e8 (bug 1713334)
Backed out changeset f4032094748d (bug 1713334)
Backed out changeset 858410646bf7 (bug 1713334)
Backed out changeset 875b520387b8 (bug 1713334)
Backed out changeset 78b0cdebc890 (bug 1713334)
2021-06-14 20:58:37 +03:00
Kagami Sascha Rosylight b327288d9d Bug 1713334 - Part 1: Keep a text node inside text controls even if empty r=masayuki,Jamie
Doing so prevents confusion when detecting selection change.

Differential Revision: https://phabricator.services.mozilla.com/D116303
2021-06-14 13:08:32 +00:00
Mats Palmgren a8cb28ae2c Bug 1542807 part 7 - Update a11y tests. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D114129
2021-06-14 01:22:07 +00:00
Mats Palmgren a901b05850 Bug 1542807 part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers. r=emilio
The change from 0x25FE to 0x25AA for list-style-type:square
was approved here:
https://github.com/w3c/csswg-drafts/issues/6200#issuecomment-828616747

Differential Revision: https://phabricator.services.mozilla.com/D111691
2021-06-14 01:22:04 +00:00
Kagami Sascha Rosylight 55dbc99e55 Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 23:54:06 +00:00
Ed Lee 9930a18c9b Bug 1633883 - TelemetryTestUtils.assertScalar assumes Number (so behaves odd for boolean, strings) r=chutten
Split assertScalar to assertScalarUnset to allow the former to plain check the value including strings, false and 0.

Differential Revision: https://phabricator.services.mozilla.com/D117457
2021-06-11 21:06:26 +00:00
Butkovits Atila ed3da455ae Backed out 7 changesets (bug 1542807) for causing failures at inert-retargeting-iframe.tentative.html. CLOSED TREE
Backed out changeset e9ef32fa2f2e (bug 1542807)
Backed out changeset 8fa0cb199975 (bug 1542807)
Backed out changeset 38daf64afe59 (bug 1542807)
Backed out changeset e3aee052c495 (bug 1542807)
Backed out changeset a71056d4c7cc (bug 1542807)
Backed out changeset cf91e7d0a37f (bug 1542807)
Backed out changeset eee949e5fd67 (bug 1542807)
2021-06-12 01:38:25 +03:00
Butkovits Atila 53cb932555 Backed out changeset aa6c7477c4d2 (bug 1713491) for causing build bustages on nsIFrame.cpp. CLOSED TREE 2021-06-12 00:12:06 +03:00
Kagami Sascha Rosylight 9d0b659349 Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 18:53:28 +00:00
Mats Palmgren 084b2c17dd Bug 1542807 part 7 - Update a11y tests. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D114129
2021-06-11 18:10:40 +00:00
Mats Palmgren 906fd4d388 Bug 1542807 part 1 - Create generated content and use normal box construction for list-style-type/list-style-image ::markers. r=emilio
The change from 0x25FE to 0x25AA for list-style-type:square
was approved here:
https://github.com/w3c/csswg-drafts/issues/6200#issuecomment-828616747

Differential Revision: https://phabricator.services.mozilla.com/D111691
2021-06-11 18:10:38 +00:00
Dorel Luca e1f4d9bb38 Backed out changeset 17e7b969b830 (bug 1713491) for Linux build bustage in gecko/dom/events/ContentEventHandler.cpp. CLOSED TREE 2021-06-11 17:52:10 +03:00
Kagami Sascha Rosylight 74760a9a0e Bug 1713491 - Return std::pair from nsIFrame::GetOffsets r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D117520
2021-06-11 11:37:11 +00:00
Eitan Isaacson 6ac35e15fc Bug 1714390 - P7: Add custom de/serializer for AccAttributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116788
2021-06-10 23:07:07 +00:00
Eitan Isaacson 349592fb91 Bug 1714390 - P6: Make more attribute keys static atoms. r=Jamie
Keys should be static atoms whenever possible.

Differential Revision: https://phabricator.services.mozilla.com/D116787
2021-06-10 23:07:07 +00:00
Eitan Isaacson 4fc2c36ea8 Bug 1714390 - P5: Use static aria_* atoms for aria attributes. r=Jamie
ATK, Windows and XPCOM expect aria attribute keys to be stripped of
their aria- prefix. We should still store the item using the aria_ atom
and then strip the prefix when converting the key to a string.

Differential Revision: https://phabricator.services.mozilla.com/D116786
2021-06-10 23:07:07 +00:00
Eitan Isaacson 474a197205 Bug 1714390 - P4: Set non-string values in AccAttributes when possible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116785
2021-06-10 23:07:06 +00:00
Eitan Isaacson 1554b802ca Bug 1714390 - P3: Add variant values to AccAttributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116784
2021-06-10 23:07:06 +00:00
Eitan Isaacson 62d0cdcad4 Bug 1714390 - P2: Use AccAttributes for accessible and text attributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116783
2021-06-10 23:07:05 +00:00
Eitan Isaacson 8ede9994e3 Bug 1714390 - P1: Introduce AccAttributes with string values. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116782
2021-06-10 23:07:05 +00:00
Masayuki Nakano 4bc0632c23 Bug 1713758 - Make everyone outside editor module use `EditorBase` instead of `TextEditor` if the instance can be an `HTMLEditor` instance r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D117119
2021-06-09 23:51:37 +00:00
Eitan Isaacson 9869f145e1 Bug 1715151 - Check if we have a frame for HTMLLIAccessible when getting bounds. r=morgan
I'm not sure in what markup/style scenario a list item accessible
wouldn't have a frame, but would have a bullet. Apparently that can
happen in the wild. Added an assertion, hopefully we can trip it on
something reproducable in the future.

Differential Revision: https://phabricator.services.mozilla.com/D117347
2021-06-09 19:33:26 +00:00
James Teh befbbf38e9 Bug 1713551: When the cache is enabled, use all bits of the MSAA id for the object unique id. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116434
2021-06-09 01:40:32 +00:00
James Teh 59941c480f Bug 1713272 part 3: Fail gracefully for IAccessible2 methods which don't support RemoteAccessible yet instead of crashing. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116330
2021-06-09 01:13:47 +00:00
James Teh 1196c8b377 Bug 1713272 part 2: Support IAccessible2 role, uniqueID, windowHandle and indexInParent for RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116329
2021-06-09 01:13:47 +00:00
James Teh 8d165ebec5 Bug 1713272 part 1: Support QueryService/Interface to IAccessible2 for RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116328
2021-06-09 01:13:46 +00:00
Eitan Isaacson ebd42829f3 Bug 1709976 - Remove selection listeners from shutting down PresShell. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D115839
2021-06-08 22:21:05 +00:00
James Teh 2aca9d3532 Bug 1695116 part 11: When the cache is enabled, don't generate an MSAA id for each content process. r=morgan
This isn't used and thus isn't necessary.
Also, we can currently only support 127 content processes because of this id allocation, so avoiding this removes that restriction.

Differential Revision: https://phabricator.services.mozilla.com/D116206
2021-06-08 07:20:53 +00:00
James Teh 552af4f9de Bug 1695116 part 10: When the cache is enabled, don't send COM proxies and MSAA ids from the content process. r=morgan
Sending these doesn't really do any harm, as we already disregard them in the parent process.
However, it's certainly unnecessary and wasteful.

Differential Revision: https://phabricator.services.mozilla.com/D116204
2021-06-08 07:20:53 +00:00
James Teh f3997d5080 Bug 1695116 part 9: Fail gracefully for MSAA methods which don't support RemoteAccessible yet instead of crashing. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116199
2021-06-08 07:20:52 +00:00
James Teh 6a5d7b980e Bug 1695116 part 8: Support MSAA accRole for RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116198
2021-06-08 07:20:52 +00:00
James Teh 5ce0efd820 Bug 1695116 part 7: Support MSAA accParent, accChildCount and accNavigate for RemoteAccessibles. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116197
2021-06-08 07:20:51 +00:00
James Teh cca7d4ef02 Bug 1695116 part 6: Support retrieval of remote MsaaAccessibles via MSAA child id. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D116196
2021-06-08 07:20:51 +00:00
James Teh f53c791606 Bug 1695116 part 5: Initial support for RemoteAccessibles in QueryInterface. r=morgan
For now, a lot of interfaces are disabled, since they don't support RemoteAccessibles at all.

Differential Revision: https://phabricator.services.mozilla.com/D116195
2021-06-08 07:20:51 +00:00
James Teh 9cd14edcc6 Bug 1695116 part 4: Support events for RemoteAccessibles with the cache enabled. r=morgan
1. GetHWNDFor and FireWinEvent now take an Accessible and support RemoteAccessible.
2. The Proxy*Event methods pass a RemoteAccessible instead of a RemoteAccessibleWrap, since RemoteAccessibleWraps aren't used with the cache enabled. FireWinEvent retrieves the RemoteAccessibleWrap if the cache is disabled.

Differential Revision: https://phabricator.services.mozilla.com/D116194
2021-06-08 07:20:50 +00:00
James Teh 02d4927b94 Bug 1695116 part 3: Id management for remote MsaaAccessibles with the cache enabled. r=morgan
1. Make MsaaDocAccessible id maps contain Accessibles instead of AccessibleWraps. This allows us to put RemoteAccessibles in the id map.
2. Make MsaaAccessible::MsaaShutdown and GetChildIDFor handle RemoteAccessibles. GetChildIDFor lazily generates an id, Just as it does for LocalAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D116193
2021-06-08 07:20:50 +00:00
James Teh 57f2c79bdb Bug 1695116 part 2: Support RemoteAccessible in various utility functions. r=morgan
1. Add support for RemoteAccessible in MsaaAccessible::GetFrom.
2. Add an overload of MsaaDocAccessible::GetFrom which accepts a (remote) DocAccessibleParent.
3. Add MsaaDocAccessible::GetFromOwned to return the containing document's MsaaDocAccessible for a given Accessible.
4. MsaaAccessible::LocalAcc now returns null for a RemoteAccessible, rather than just assuming the accessible is local.
5. MsaaAccessible::NativeAccessible now supports retrieving a native client pointer for LocalAccessibles, RemoteAccessibles and RemoteAccessibleWraps.

Differential Revision: https://phabricator.services.mozilla.com/D116192
2021-06-08 07:20:49 +00:00
James Teh cca8d5e473 Bug 1695116 part 1: When the cache is enabled, use a real MsaaAccessible for RemoteAccessibles. r=morgan
With the cache disabled (which was previously always the case), we create a RemoteAccessibleWrap for each RemoteAccessible, stored as the RemoteAccessible's "Wrapper".
This in turn creates an MsaaAccessible.
However, both of these are little more than stubs: the MsaaAccessible itself is never returned to clients and most of the methods would crash if called.
They exist only to store the MSAA id received from the content process and to return the COM proxy from the content process to clients.

With the cache enabled, we now create a real MsaaAccessible for each RemoteAccessible, stored as the RemoteAccessible's "Wrapper".
This MsaaAccessible is directly returned to clients.
Soon, it will generate its own id in the parent process and will delegate to the underlying RemoteAccessible to serve queries from clients.

As part of this:

1. We stop managing COM proxies in the parent process when the cache is enabled, since we don't need those and can't store them anyway.
2. We stop setting the id on the MsaaAccessible when the cache is enabled, since it will soon generate its own id like local MsaaAccessibles do.
3. OuterDocAccessible::ChildCount had to be tweaked so it doesn't try to return a RemoteAccessibleWrap when the cache is enabled. (It previously called RemoteChildDocAccessible, which fetches a RemoteAccessibleWrap.)

Differential Revision: https://phabricator.services.mozilla.com/D116191
2021-06-08 07:20:49 +00:00
Morgan Reschenberg 1acb4f3f8c Bug 1713015: Default browser.display.document_color_use to 0 on MacOS r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D116046
2021-06-03 20:31:22 +00:00
Andrew Halberstadt b395296f0c Bug 1713885 - Remove skip-if annotation in accessible/tests/browser/bounds/browser_test_zoom.js, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D116760
2021-06-03 19:29:10 +00:00
James Teh 1c29b2b8ad Bug 1713383: Block rtop_bg.exe (ByteFence Anti-Malware) from instantiating a11y. r=eeejay
This is a security product and has no good reason to instantiate a11y.
We've also seen it show up in obscure crash reports.

Differential Revision: https://phabricator.services.mozilla.com/D116536
2021-06-02 23:33:11 +00:00