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

337 Коммитов

Автор SHA1 Сообщение Дата
Eitan Isaacson a8c6dc0db1 Bug 1816573 - Use flags in TextLeafPoint::FindBoundary instead of boolean arguments. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D169740
2023-02-21 16:37:23 +00:00
Eitan Isaacson d5e8f25121 Bug 1815774 - Introduce TextLeafPoint XPCOM bindings and tests. r=Jamie
This uses a bitfield for flags in FindBoundary, the idea is that it
will give some regression coverage if/when we move the native API
to do the same.

Differential Revision: https://phabricator.services.mozilla.com/D169246
2023-02-13 17:56:12 +00:00
Eitan Isaacson eb7fe304b8 Bug 1811092 - P2: Add async text selection removal message. r=Jamie
Depends on D167201

Differential Revision: https://phabricator.services.mozilla.com/D167202
2023-01-27 20:15:12 +00:00
Eitan Isaacson dbdb811bfa Bug 1811092 - P1: Add new async add/set text selection message. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D167201
2023-01-27 20:15:11 +00:00
James Teh 29c03d7779 Bug 1757127 part 2: Use the unified Language method for ATK, IA2 and XPCOM. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D166858
2023-01-17 20:35:22 +00:00
Marco Castelluccio f69e697461 Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165395
2022-12-23 22:45:46 +00:00
Marco Castelluccio 16a078cc32 Bug 1790816 - Reformat accessible/ with isort. r=linter-reviewers,Standard8 DONTBUILD
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D162662
2022-11-23 12:38:45 +00:00
James Teh f520d4fa05 Bug 1789959: Gracefully handle mCachedFields being null in xpcAccessible::GetCache. r=nlapre
Otherwise, we crash when inspecting RemoteAccessible objects in Dev Tools if the cache is disabled or hasn't been received yet.

Differential Revision: https://phabricator.services.mozilla.com/D161872
2022-11-14 23:29:07 +00:00
Morgan Rae Reschenberg 5e8dfcb2e3 Bug 1234121: Unify FocusedChild() in Accessible base class r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D154949
2022-08-19 02:42:30 +00:00
James Teh fff810fb26 Bug 1784841: Use unified OffsetAtPoint in platform specific code. r=morgan
Most importantly, this means OffsetAtPoint is now supported for cached RemoteAccessible on Windows.
I also included a drive-by fix to make ATK use the unified CharacterCount method instead of the old unnecessary conditional local/remote paths.

Differential Revision: https://phabricator.services.mozilla.com/D154628
2022-08-17 04:59:12 +00:00
James Teh 502efae488 Bug 1781536 part 3: Move RelationByType to base Accessible. r=morgan
This required changing the RemoteAccessible implementations to return Relation instead of an array of RemoteAccessible.
Platform implementations have been updated to use the unified method where appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D152959
2022-08-03 23:58:51 +00:00
James Teh 8c97854cbe Bug 1781536 part 1: Support base Accessible in Relation. r=morgan
Previously, Relation::Next returned a LocalAccessible.
Now, it returns an Accessible so that it can support RemoteAccessible as well.
Relation::LocalNext has been added as a convenience to return a LocalAccessible when the caller is certain that only LocalAccessible is relevant.
Callers have either been updated to use LocalNext or to handle an Accessible returned from Next.
ia2AccessibleRelation now holds an array of MsaaAccessible, as we need to hold references and we can't hold references to RemoteAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D152957
2022-08-03 23:58:50 +00:00
James Teh ef6f7fb547 Bug 1757126 part 4: Support AccessKey on cached RemoteAccessible. r=morgan
1. Move AccessKey to base Accessible.
2. Retrieve AccessKey from the cache for RemoteAccessible.
3. Update XPCOM and platform specific code accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D151202
2022-07-14 05:48:16 +00:00
James Teh 52a9b98ce9 Bug 1757126 part 1: Remove RemoteAccessible::KeyboardShortcut. r=morgan,ipc-reviewers,nika
KeyboardShortcut is only supported for XUL menu items.
XUL menu items can never be remote, so there's no point in querying this via IPDL.

Differential Revision: https://phabricator.services.mozilla.com/D151199
2022-07-14 05:48:15 +00:00
Norisz Fay d152ee99bf Backed out 4 changesets (bug 1757126) for causing build bustages on xpcAccessible.cpp CLOSED TREE
Backed out changeset e57b1129fd48 (bug 1757126)
Backed out changeset 6ee5d245c2fc (bug 1757126)
Backed out changeset b0809e6a3de3 (bug 1757126)
Backed out changeset 4d10b2dfdc99 (bug 1757126)
2022-07-14 04:18:36 +03:00
James Teh e83581aacd Bug 1757126 part 4: Support AccessKey on cached RemoteAccessible. r=morgan
1. Move AccessKey to base Accessible.
2. Retrieve AccessKey from the cache for RemoteAccessible.
3. Update XPCOM and platform specific code accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D151202
2022-07-14 00:49:47 +00:00
James Teh 01bc6196d8 Bug 1757126 part 1: Remove RemoteAccessible::KeyboardShortcut. r=morgan,ipc-reviewers,nika
KeyboardShortcut is only supported for XUL menu items.
XUL menu items can never be remote, so there's no point in querying this via IPDL.

Differential Revision: https://phabricator.services.mozilla.com/D151199
2022-07-14 00:49:45 +00:00
Nika Layzell 7ced96212e Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana
We'll probably want to do something more accurate in the future with a
custom clang static analysis pass which validates that XPIDL interfaces
have the expected vtable and struct layout, however doing so would be
more involved than the string matching done in this patch.

In addition to checking for extra virtual methods, we'll likely also
want to check for data members on interfaces, and reject them unless the
class is marked as `[builtinclass]` in addition to some other attribute
which we'll need to add to prevent them from being implemented in Rust
(as c++ data members will not be reflected by the rust macro).

There were 2 instances of a comment which contained the word 'virtual'
within a CDATA block. These comments were moved out of the CDATA block
to avoid triggering the error.

Differential Revision: https://phabricator.services.mozilla.com/D151068
2022-07-06 14:53:06 +00:00
James Teh 977aa35653 Bug 1774393: Support BoundsInCSSPixels for cached RemoteAccessible. r=morgan
Our hit testing tests need this.
This adds a base Accessible::BoundsInCSSPixels implementation which relies on BoundsInAppUnits.
BoundsInAppUnits was also moved to Accessible, but it is implemented differently for local and remote, so the base method is abstract.
I also did a drive-by removal of a pointless conditional in xpcAccessible::GetBounds.

Differential Revision: https://phabricator.services.mozilla.com/D149374
2022-06-16 01:03:26 +00:00
James Teh 52b0b92e8d Bug 1766546: Implement SetCaretOffset for cached Windows RemoteAccessible. r=morgan
We implement setting of the caret using HyperText rather than TextLeafPoint because caret stuff, including events, still uses HyperText internally for now.

This moves the async IPDL method already used on non-Windows into the base classes so Windows can use it.
We keep the COM implementation for Windows RemoteAccessible without the cache.
SetCaretOffset was moved into HyperTextAccessibleBase and platform methods were updated accordingly.
Finally, I did some drive-by cleanup (no user impact) and changed GetCaretOffset in ATK and XPCOM to use HyperTextAccessibleBase.
GetCaretOffset was moved to the base some time ago, but ATK and XPCOM weren't updated at the time.

Differential Revision: https://phabricator.services.mozilla.com/D147852
2022-06-01 19:34:09 +00:00
James Teh 196146ecb6 Bug 1756728 part 2: Support retrieving the URL for cached remote documents. r=morgan
The BrowsingContext already has this information, so we use that instead of redundantly caching it in RemoteAccessible.
This implementation works even when the a11y cache is disabled, so stop using the sync IPDL URL method.
We can't entirely unify the URL method because we don't have a base class for local/remote documents.
However, a method was added in nsAccUtils to unify this as much as possible.

Differential Revision: https://phabricator.services.mozilla.com/D147717
2022-06-01 00:34:17 +00:00
Morgan Reschenberg 4e6096c73d Bug 1735101: Cache char, line coordinate info to support computing TextBounds and CharBounds in the parent process r=Jamie
Depends on D144767

Differential Revision: https://phabricator.services.mozilla.com/D143527
2022-05-09 20:30:27 +00:00
Morgan Reschenberg 32487fa3e7 Bug 1763214: Convert ImagePosition, ImageSize to use cached bounds r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D142996
2022-04-28 17:03:49 +00:00
James Teh fef89de8c9 Bug 1743966: Move ScrollTo into Accessible and support it for Windows RemoteAccessibles. r=morgan
Aside from adding ScrollTo to the Windows PDocAccessible IPDL, This mostly just moves methods into base classes and adapts platform code to use the unified Accessible::ScrollTo.

Differential Revision: https://phabricator.services.mozilla.com/D143655
2022-04-18 21:55:39 +00:00
James Teh fa5d442869 Bug 1760939 part 2: Move LinkCount to HyperTextAccessibleBase. r=eeejay
This updates the XPCOM, ATK and Windows implementations too.

Differential Revision: https://phabricator.services.mozilla.com/D142028
2022-04-11 23:20:14 +00:00
James Teh c3bb22d493 Bug 1735970 part 13: Support TableAccessibleBase and TableCellAccessibleBase in XPCOM. r=morgan
This doesn't work for non-cached RemoteAccessibles, but this wasn't previously implemented anyway.
With this patch (and all earlier patches in the stack) applied, all the tests in accessible/tests/mochitest pass with the cache enabled, thus testing CachedTableAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D141216
2022-04-01 09:50:00 +00:00
James Teh 6021c4755d Bug 1735970 part 3: Add TableAccessibleBase and TableCellAccessibleBase. r=morgan
These are needed to support RemoteAccessible tables.
Stuff specific to LocalAccessible is still in TableAccessible and TableCellAccessible, which now inherit from the new Base classes.

Covariant return types have been used to minimise changes in LocalAccessible callers.

Differential Revision: https://phabricator.services.mozilla.com/D141205
2022-04-01 09:49:57 +00:00
criss 34d3fb88a2 Backed out 18 changesets (bug 1735970) for causing hazard bustages.CLOSED TREE
Backed out changeset e7af2be486ce (bug 1735970)
Backed out changeset 73c93a18f65b (bug 1735970)
Backed out changeset 7e48716784d2 (bug 1735970)
Backed out changeset 30f61cdfd3c0 (bug 1735970)
Backed out changeset 3e4697e57570 (bug 1735970)
Backed out changeset 16ac3bec2412 (bug 1735970)
Backed out changeset 945ef21895ec (bug 1735970)
Backed out changeset 5dbfbf341ff8 (bug 1735970)
Backed out changeset d498d61c8f5a (bug 1735970)
Backed out changeset 50a2ee53b763 (bug 1735970)
Backed out changeset 9e2e11ea1a3d (bug 1735970)
Backed out changeset cf84daf9e40f (bug 1735970)
Backed out changeset 003bbf7f5f24 (bug 1735970)
Backed out changeset 00f1fbedc774 (bug 1735970)
Backed out changeset b17a1182539b (bug 1735970)
Backed out changeset 6d0f4821ddcf (bug 1735970)
Backed out changeset d82660fb5408 (bug 1735970)
Backed out changeset e506a5b04bf4 (bug 1735970)
2022-03-23 10:27:08 +02:00
James Teh b049082275 Bug 1735970 part 13: Support TableAccessibleBase and TableCellAccessibleBase in XPCOM. r=morgan
This doesn't work for non-cached RemoteAccessibles, but this wasn't previously implemented anyway.
With this patch (and all earlier patches in the stack) applied, all the tests in accessible/tests/mochitest pass with the cache enabled, thus testing CachedTableAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D141216
2022-03-23 04:00:30 +00:00
James Teh 843eb0aed7 Bug 1735970 part 3: Add TableAccessibleBase and TableCellAccessibleBase. r=morgan
These are needed to support RemoteAccessible tables.
Stuff specific to LocalAccessible is still in TableAccessible and TableCellAccessible, which now inherit from the new Base classes.

Covariant return types have been used to minimise changes in LocalAccessible callers.

Differential Revision: https://phabricator.services.mozilla.com/D141205
2022-03-23 04:00:26 +00:00
Morgan Reschenberg ca2f84aa05 Bug 1757661: Make cached fields accessible in tests directly r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D139979
2022-03-14 19:52:50 +00:00
Iulian Moraru e8a5d3a8b3 Backed out 2 changesets (bug 1757661, bug 1756229) for causing build bustages on LocalAccessible.cpp. CLOSED TREE
Backed out changeset ba6ef5bc928e (bug 1757661)
Backed out changeset a6ea1aa0492a (bug 1756229)
2022-03-12 12:17:19 +02:00
Morgan Reschenberg c5a24dd555 Bug 1757661: Make cached fields accessible in tests directly r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D139979
2022-03-12 00:02:34 +00:00
Butkovits Atila bfa9c70d05 Backed out 2 changesets (bug 1756229, bug 1757661) for causing leaks. CLOSED TREE
Backed out changeset 20b9c772f7b5 (bug 1757661)
Backed out changeset 1dfe3b2c9405 (bug 1756229)
2022-03-09 01:12:55 +02:00
Morgan Reschenberg 9358cee431 Bug 1757661: Make cached fields accessible in tests directly r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D139979
2022-03-08 20:16:09 +00:00
James Teh 35ebd00b30 Bug 1741793 part 5: Update XPCOM, Windows and ATK to support cached text selection querying. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D139344
2022-02-26 23:01:56 +00:00
James Teh d637417f70 Bug 1741793 part 2: Update TextPoint/Range to use base Accessible. r=eeejay
Even though we'd ideally be using TextLeafRange for new things, TextRange is still needed by our selection events (which still use HyperText offsets) and IA2/ATK clients which depend on HyperText offsets.
Thus, we need TextRange to support RemoteAccessible.

Although the start and end containers are HyperTextAccessibles, I chose to store Accessible rather than HyperTextAccessibleBase because HyperTextAccessibleBase doesn't inherit from Accessible and having an Accessible is easier.

XPCOM needs to hold a reference to any state objects.
Because we can't hold a reference to an Accessible (due to RemoteAccessible), xpcAccessibleTextRange holds references to xpcAccessibleHyperText instead.

Differential Revision: https://phabricator.services.mozilla.com/D139341
2022-02-26 23:01:54 +00:00
James Teh 24238f9512 Bug 1741793 part 1: Remove TextRange stuff that was never implemented. r=eeejay
This class needs to be updated to support base Accessible and it doesn't make sense to port methods that can never be used.
Also, any new functionality (e.g. needed for the UIA text pattern) should now be implemented using TextLeafPoint/Range, not TextRange.

Differential Revision: https://phabricator.services.mozilla.com/D139340
2022-02-26 23:01:54 +00:00
Eitan Isaacson 6159254eee Bug 1746833 - P2: Move Value() to Accessible and calculate or use cached value remotely. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D138948
2022-02-18 18:20:59 +00:00
Eitan Isaacson b2f056737e Bug 1755383 - P1: Move SelectAccessible methods to Accessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D138728
2022-02-16 18:42:53 +00:00
James Teh f5a04369df Bug 1754360: Move EndOffset to base Accessible. r=eeejay
Similar to StartOffset:

1. There was a Windows non-cached RemoteAccessible implementation, but it was never actually called, so I removed it.
2. The sync IPDL RemoteAccessible implementation previously provided a boolean indicating success.
    I removed this because the LocalAccessible implementation doesn't have this and it doesn't seem like remote is special in this respect.

Differential Revision: https://phabricator.services.mozilla.com/D138243
2022-02-11 02:37:13 +00:00
James Teh 9f17a2e0b4 Bug 1730086 part 3: Rename RemoteAccessible::GetTextBefore/AfterOffset to TextBefore/AfterOffset, have it override HyperTextAccessibleBase and use the base methods in ATK/XPCOM. r=morgan
This also unifies the code path for TextAtOffset in ATK, rather than having different local and remote code paths.
This isn't strictly related to this patch series, but this change was missed before, so I took the opportunity to deal with it here.

Differential Revision: https://phabricator.services.mozilla.com/D137504
2022-02-04 02:10:28 +00:00
Eitan Isaacson 81a8e4ea77 Bug 1749828 - Use Accessible::GroupPosition in xpcom, windows and mac. r=Jamie CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D135748
2022-01-31 23:10:52 +00:00
Eitan Isaacson b494f3eab9 Bug 1743967 - Support async DoAction. r=Jamie
Now that we cache ActionCount, we can check for the absence of actions
and return false, or send an async message and return true.

Differential Revision: https://phabricator.services.mozilla.com/D135909
2022-01-31 23:10:52 +00:00
Eitan Isaacson ac8433cd7e Bug 1748749 - P4: Support cached actions. r=Jamie
Move ActionCount/ActionNameAt/ActionDescriptionAt to Accessible,
use cached values in RemoteAccessible, and tweak platforms.

Also introduce browser test.

Differential Revision: https://phabricator.services.mozilla.com/D135908
2022-01-31 23:10:52 +00:00
Cosmin Sabou ef48e09b4e Backed out 6 changesets (bug 1743967, bug 1748749, bug 1749828) for causing bc failures on browser_PBMCookieBehavior.js.
Backed out changeset afda8c72ba29 (bug 1749828)
Backed out changeset 8b5356f3d50d (bug 1743967)
Backed out changeset 04f178d71ae6 (bug 1748749)
Backed out changeset cd2e76de3d18 (bug 1748749)
Backed out changeset 4190c5e44b32 (bug 1748749)
Backed out changeset 8e23acc969d2 (bug 1748749)
2022-02-01 03:05:11 +02:00
Eitan Isaacson 2c3b678a19 Bug 1749828 - Use Accessible::GroupPosition in xpcom, windows and mac. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D135748
2022-01-31 23:10:52 +00:00
Eitan Isaacson 6f159bbb67 Bug 1743967 - Support async DoAction. r=Jamie
Now that we cache ActionCount, we can check for the absence of actions
and return false, or send an async message and return true.

Differential Revision: https://phabricator.services.mozilla.com/D135909
2022-01-31 23:10:52 +00:00
Eitan Isaacson 12d336ff2f Bug 1748749 - P4: Support cached actions. r=Jamie
Move ActionCount/ActionNameAt/ActionDescriptionAt to Accessible,
use cached values in RemoteAccessible, and tweak platforms.

Also introduce browser test.

Differential Revision: https://phabricator.services.mozilla.com/D135908
2022-01-31 23:10:52 +00:00
Butkovits Atila c6b99e8ff7 Backed out 5 changesets (bug 1743967, bug 1748749) for causing failures at browser_caching_actions.js. CLOSED TREE
Backed out changeset 6f15d287ecd8 (bug 1743967)
Backed out changeset fce9d3a2500d (bug 1748749)
Backed out changeset 9d405f9475b3 (bug 1748749)
Backed out changeset 9dccfcc00718 (bug 1748749)
Backed out changeset f1be79d75c5d (bug 1748749)
2022-01-28 07:07:56 +02:00