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

61 Коммитов

Автор SHA1 Сообщение Дата
James Teh 6309a094fe Bug 1742915 part 1: Move Attributes to base Accessible. r=morgan
The RemoteAccessibleBase implementation is a stub for now, but will be expanded in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D132652
2021-12-07 03:37:03 +00:00
Alexandru Michis 77f2a1c3aa Backed out 2 changesets (bug 1742915) for causing android bustages.
CLOSED TREE

Backed out changeset 587bbb6b9224 (bug 1742915)
Backed out changeset 1beb5cf0cceb (bug 1742915)
2021-12-07 03:08:45 +02:00
James Teh 25f7ff3485 Bug 1742915 part 1: Move Attributes to base Accessible. r=morgan
The RemoteAccessibleBase implementation is a stub for now, but will be expanded in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D132652
2021-12-07 00:01:30 +00:00
James Teh aaae0cfc51 Bug 1742917 part 4: Move LinkIndexAtOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D132201
2021-12-02 06:55:29 +00:00
James Teh d3e92fc1a1 Bug 1742917 part 3: Move LinkIndexOf to HyperTextAccessibleBase. r=eeejay
I removed the sync IPDL implementation of LinkIndexOf because we can calculate this in the parent process even with the cache disabled.

Differential Revision: https://phabricator.services.mozilla.com/D132200
2021-12-02 06:55:28 +00:00
James Teh c840074d40 Bug 1742917 part 2: Move IndexOfEmbeddedChild to base Accessible. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D132199
2021-12-02 06:55:28 +00:00
James Teh 5a9991c9d0 Bug 1742917 part 1: Move StartOffset to base Accessible. r=eeejay
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/D132198
2021-12-02 06:55:27 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
James Teh 4904fa05f2 Bug 1741792 part 2: Use the cached caret. r=eeejay
This includes support in both TextLeafPoint and HyperTextAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D132098
2021-12-01 04:48:34 +00:00
James Teh 42e16c9c21 Bug 1730862 part 3: Support the caret at the end of a line in HyperTextAccessibleBase. r=eeejay
This uses the caret support in TextLeafPoint.

Differential Revision: https://phabricator.services.mozilla.com/D132096
2021-11-30 02:07:37 +00:00
James Teh ab3b1b2ccc Bug 1730862 part 1: Make HyperTextAccessibleBase::TransformOffset easier to use. r=eeejay
1. When calculating a start offset, we usually want 0 if the offset can't be transformed, thus clipping to the start of this Accessible.
    Previously, CharacterCount was always returned even when calculating a start offset.
    Now, we return 0 for a start offset, CharacterCount for an end offset.
2. Sometimes, this fallback value is insufficient and we need to know explicitly whether it failed.
    As well as the offset, we now return a boolean indicating this.
    This will be used in a subsequent patch.
3. Even though TransformOffset only deals with positive numbers, callers usually deal with signed numbers.
    Therefore, we now use int32_t insteaed of uint32_t to avoid a lot of casting.

Differential Revision: https://phabricator.services.mozilla.com/D132094
2021-11-30 02:07:36 +00:00
Andi-Bogdan Postelnicu c8e0f87391 Bug 1519636 - First reformat with clang-format 13.0.0. r=firefox-build-system-reviewers,sylvestre,mhentges
Updated with clang-format version 13.0.0 (taskcluster-OgjH5lasS5K_fvefdRcJVg)

Depends on D131114

Differential Revision: https://phabricator.services.mozilla.com/D129119
2021-11-16 08:07:30 +00:00
James Teh eb568eccaf Bug 1735969: Unify Accessible::TakeFocus, thus allowing it to be used for RemoteAccessibles when the cache is enabled on Windows. r=morgan
1. Add TakeFocus in Windows PDocAccessible.
2. Move RecvTakeFocus into DocAccessibleChildBase so it is used for all platforms.
3. Move TakeFocus into the Accessible base class.
4. Move the IPDL version of TakeFocus into RemoteAccessibleBase so it is used for all plaforms.
5. Make the Windows RemoteAccessible::TakeFocus use the base (IPDL) implementation if the cache is enabled or COM otherwise.
6. Use Accessible::TakeFocus for ATK, Mac, Windows and XPCOM.

Differential Revision: https://phabricator.services.mozilla.com/D130327
2021-11-05 00:52:15 +00:00
James Teh 461332528f Bug 1738032 part 3: Move LocalAccessible::State to Accessible. r=eeejay
This patch includes XPCOM support.
Unfortunately, LocalAccessible::State isn't const, so the base method can't be const for now either.

Differential Revision: https://phabricator.services.mozilla.com/D129640
2021-11-02 23:56:35 +00:00
James Teh 1563d99b94 Bug 1730096 part 8: Move DefaultTextAttributes to HyperTextAccessibleBase and implement it for RemoteAccessible. r=eeejay
This patch includes ATK and XPCOM support.

Differential Revision: https://phabricator.services.mozilla.com/D129474
2021-11-01 23:27:39 +00:00
James Teh f24390b6a8 Bug 1730096 part 3: Add HyperTextAccessibleBase::TextAttributes. r=eeejay
This uses TextLeafPoint.
This patch includes support for ATK, IA2 and XPCOM.
As with TextAtOffset, HyperTextAccessible calls the base implementation if the cache is enabled, but otherwise uses the old implementation for now.

Differential Revision: https://phabricator.services.mozilla.com/D129469
2021-11-01 23:27:37 +00:00
James Teh 8b6bb7ad30 Bug 1735722 part 2: Add HyperTextAccessibleBase::LinkAt. r=morgan
This uses the unified Accessible::EmbeddedChildAt from the previous patch.
HyperTextAccessible::LinkAt still exists, since there are still some callers that depend on it returning a LocalAccessible.
xpcAccessibleHyperText has also been updated to call this, which means tests will work on Windows when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D128551
2021-10-19 03:57:18 +00:00
James Teh 1dc833a28d Bug 1735722 part 1: Move EmbeddedChildAt into base Accessible. r=morgan
This required renaming LocalAccessible::GetEmbeddedChildAt to EmbeddedChildAt.
LocalAccessible::EmbeddedChildAt uses a covariant return type to return a LocalAccessible* while still overriding the base method (which returns Accessible*).
Unfortunately, this can't be done for RemoteAccessible, since the Derived type isn't complete in time due to the templating.
There was only one caller of RemoteAccessible::EmbeddedChildAt, so I just changed it to call AsRemote.
Eventually, even that caller will use the unified tree anyway.

Differential Revision: https://phabricator.services.mozilla.com/D128550
2021-10-19 03:57:18 +00:00
James Teh 18cac61d01 Bug 1733514 part 1: Make HyperTextAccessibleBase::CharacterCount virtual and override it in RemoteAccessible. r=eeejay
When the cache is disabled, we need a different implementation of RemoteAccessible::CharacterCount for non-Windows.
This already existed, but it hid the base implementation rather than overriding it.
On Windows, we don't support this for RemoteAccessible at all unless the cache is enabled, so there's no change there.

Differential Revision: https://phabricator.services.mozilla.com/D128031
2021-10-12 23:43:07 +00:00
James Teh 2534f21673 Bug 1730088 part 11: Move IsValidOffset/Range to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127216
2021-10-07 04:22:47 +00:00
James Teh 8c9bfeac73 Bug 1730088 part 10: Move TextAtOffset's TextLeafPoint implementation to HyperTextAccessibleBase. r=eeejay
The TextLeafPoint implementation works for both local and remote.
HyperTextAccessible calls the base implementation for supported boundaries when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D127215
2021-10-07 04:22:47 +00:00
James Teh 550d7598c3 Bug 1730088 part 9: Add HyperTextAccessibleBase::TransformOffset. r=eeejay
This is pretty similar to HyperTextAccessible::TransformOffset.
However, the local implementation has to compensate for list bullet errors propagating from FindOffset/PeekOffset, which isn't relevant for TextLeafPoint.
Therefore, we leave the HyperTextAccessible implementation alone so it will still be used by HyperTextAccessible code (FindOffset, etc.).

Differential Revision: https://phabricator.services.mozilla.com/D127214
2021-10-07 04:22:46 +00:00
James Teh ddbabe9849 Bug 1730088 part 8: Move ToTextLeafPoint to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127213
2021-10-07 04:22:46 +00:00
James Teh eb660a098e Bug 1730088 part 7: Move CharAt to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127212
2021-10-07 04:22:46 +00:00
James Teh 2dbf269a3f Bug 1730088 part 6: Move TextSubstring to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127211
2021-10-07 04:22:45 +00:00
James Teh 3c9b8a17dd Bug 1730088 part 5: Move ConvertMagicOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127210
2021-10-07 04:22:45 +00:00
James Teh 90725f7aed 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-07 04:22:45 +00:00
James Teh adae2323e9 Bug 1730088 part 3: Move CharacterCount to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127208
2021-10-07 04:22:44 +00:00
James Teh 68d5471fbc 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-07 04:22:44 +00:00
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 65616347a8 Bug 1730088 part 11: Move IsValidOffset/Range to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127216
2021-10-06 10:13:12 +00:00
James Teh 75adfa3d1a Bug 1730088 part 10: Move TextAtOffset's TextLeafPoint implementation to HyperTextAccessibleBase. r=eeejay
The TextLeafPoint implementation works for both local and remote.
HyperTextAccessible calls the base implementation for supported boundaries when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D127215
2021-10-06 10:13:11 +00:00
James Teh 5ea7d17606 Bug 1730088 part 9: Add HyperTextAccessibleBase::TransformOffset. r=eeejay
This is pretty similar to HyperTextAccessible::TransformOffset.
However, the local implementation has to compensate for list bullet errors propagating from FindOffset/PeekOffset, which isn't relevant for TextLeafPoint.
Therefore, we leave the HyperTextAccessible implementation alone so it will still be used by HyperTextAccessible code (FindOffset, etc.).

Differential Revision: https://phabricator.services.mozilla.com/D127214
2021-10-06 10:13:11 +00:00
James Teh 6d4a7b6804 Bug 1730088 part 8: Move ToTextLeafPoint to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127213
2021-10-06 10:13:11 +00:00
James Teh 0300ea1e93 Bug 1730088 part 7: Move CharAt to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127212
2021-10-06 10:13:10 +00: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 c766150f7a Bug 1730088 part 5: Move ConvertMagicOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127210
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 39aa66590c Bug 1730088 part 3: Move CharacterCount to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127208
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 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
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 130f52e318 Bug 1611062 - Remove unused eAutoComplete. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127148
2021-10-04 16:30:45 +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 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 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