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

740 Коммитов

Автор SHA1 Сообщение Дата
James Teh f46a0aaf44 Bug 1730088 part 1: Add hyperTextAccessibleBase class. r=eeejay
This will contain methods that can be used for both local and remote Accessibles.
It is inherited into both HyperTextAccessible (local) and RemoteAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D127206
2021-10-07 04:22:43 +00:00
Cristian Tuns 9ff6a2ca7d Backed out 11 changesets (bug 1730088) for causing build bustages on DocAccessibleWrap.cpp. CLOSED TREE
Backed out changeset f2ccbd5e0640 (bug 1730088)
Backed out changeset 4138ff98e3c6 (bug 1730088)
Backed out changeset 18f24e8c925c (bug 1730088)
Backed out changeset 0f6d7bf87aeb (bug 1730088)
Backed out changeset b91cb9d7de75 (bug 1730088)
Backed out changeset 3d5b2d949109 (bug 1730088)
Backed out changeset 1910e46ed82c (bug 1730088)
Backed out changeset be69e17a817a (bug 1730088)
Backed out changeset b96051622689 (bug 1730088)
Backed out changeset 89f855907787 (bug 1730088)
Backed out changeset 52c6c1d60659 (bug 1730088)
2021-10-06 08:33:43 -04:00
James Teh b1c9ba78d4 Bug 1730088 part 6: Move TextSubstring to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127211
2021-10-06 10:13:10 +00:00
James Teh 80e6298b78 Bug 1730088 part 4: Move CaretOffset to HyperTextAccessibleBase. r=eeejay
The implementation for RemoteAccessibleBase is just a stub; we don't cache the caret yet.
However, this needs to be in HyperTextAccessibleBase because it is used by ConvertMagicOffset, which will be moved in an upcoming patch.

Differential Revision: https://phabricator.services.mozilla.com/D127209
2021-10-06 10:13:09 +00:00
James Teh 7511a00c4f Bug 1730088 part 2: HyperTextAccessibleBase: Add methods for child index/text offset conversion. r=eeejay
Although HyperTextAccessibleBase implements these, we leave the HyperTextAccessible implementations (overriding the base) because they do caching.
Depending on performance, we may eventually want to move the caching into the base implementation.
I decided not to do this initially because it will use extra memory in the parent process and it may be a premature optimisation.

Differential Revision: https://phabricator.services.mozilla.com/D127207
2021-10-06 10:13:08 +00:00
James Teh 0b986179c4 Bug 1730088 part 1: Add hyperTextAccessibleBase class. r=eeejay
This will contain methods that can be used for both local and remote Accessibles.
It is inherited into both HyperTextAccessible (local) and RemoteAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D127206
2021-10-06 10:13:08 +00:00
James Teh 174f5c0b71 Bug 1730093 part 4: Support RemoteAccessible in TextLeafPoint. r=eeejay
This uses the unified AppendTextTo and TextLength, as well as adding support for cached line start boundaries.

Differential Revision: https://phabricator.services.mozilla.com/D127205
2021-10-06 04:53:54 +00:00
James Teh 1ae2aea0d0 Bug 1730093 part 3: Support RemoteAccessible in nsAccUtils::TextLength. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127204
2021-10-06 04:53:53 +00:00
James Teh 3b8873fe57 Bug 1730093 part 2: Move AppendTextTo to Accessible and implement it for RemoteAccessible. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127203
2021-10-06 04:53:53 +00:00
James Teh 832dddd128 Bug 1730093 part 1: Push text and line start offsets to the cache. r=eeejay
As part of this, we no longer cache the name for text accessibles, as that would be redundant.
Instead, we return the cached text in RemoteAccessible::Name.

Differential Revision: https://phabricator.services.mozilla.com/D127202
2021-10-06 04:53:52 +00:00
Morgan Reschenberg 8ec999d32d Bug 1726227: Cache parent-relative accessible bounds, resolution in parent process r=Jamie,eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123399
2021-10-05 20:44:46 +00:00
Butkovits Atila 0db4640a28 Backed out 2 changesets (bug 1732154, bug 1726227) for causing build bustages complaining about RemoteAccessible. CLOSED TREE
Backed out changeset 4fd72f9ca327 (bug 1732154)
Backed out changeset 6591f14bbc71 (bug 1726227)
2021-10-05 00:19:09 +03:00
Morgan Reschenberg c2cac47ff1 Bug 1726227: Cache parent-relative accessible bounds, resolution in parent process r=Jamie,eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123399
2021-10-04 19:46:54 +00:00
Eitan Isaacson de9be32795 Bug 1732944 - Return early if recieving cache on a shutdown document. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D126839
2021-09-28 22:02:47 +00:00
Eitan Isaacson 1de5b0abcd Bug 1731374 - Add string storage to AccAttributes with move semantics. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D126012
2021-09-28 22:01:35 +00:00
Eitan Isaacson d4a231a724 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-28 21:55:41 +00:00
criss dfdc70739c Backed out changeset 4d44c5b706db (bug 1729061) for causing bustages in DocAccessibleChildBase.cpp. CLOSED TREE 2021-09-28 00:45:56 +03:00
Eitan Isaacson a5dc06abb2 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-27 18:46:20 +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
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
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
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
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 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 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
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 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
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 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
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 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
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
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
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
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
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 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