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

269 Коммитов

Автор SHA1 Сообщение Дата
Eitan Isaacson ba3c5e3b7b Bug 1849398 - Gecko initiated a11y focus should not scroll. r=Jamie
If we send an Android ACCESSIBILITY_FOCUSED event because of a content
update (ie. scrolling to anchor or DOM selection changes) we should not
scroll the accessible into view. We should assume the content is being
brought into view by itself.

Testing: We already have tests to show that we scroll an accessible into
view when navigating content, testing for the inverse (that the scroll
is done by other means and NOT a11y) is very hard.

Differential Revision: https://phabricator.services.mozilla.com/D199433
2024-01-24 04:49:03 +00:00
Eitan Isaacson 45e41353ee Bug 1868092 - Don't call DoPivot on a null leaf in caret move. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D195599
2023-12-06 22:06:07 +00:00
James Teh f36ae8432b Bug 1862802 part 5: Remove virtual cursor change event. r=eeejay
Depends on D192645

Differential Revision: https://phabricator.services.mozilla.com/D192646
2023-11-29 03:53:20 +00:00
James Teh 603681f423 Bug 1862802 part 4: Remove SessionAccessibility call to AccessibleWrap::PivotTo. r=eeejay
This now just calls DoPivot and SendAccessibilityFocusEvent directly.

Depends on D192644

Differential Revision: https://phabricator.services.mozilla.com/D192645
2023-11-29 03:53:20 +00:00
James Teh 4edd64405a Bug 1862802 part 3: Directly handle scrolling start events on Android instead of converting them to virtual cursor change events. r=eeejay
Depends on D192643

Differential Revision: https://phabricator.services.mozilla.com/D192644
2023-11-29 03:53:19 +00:00
James Teh c1a190ef64 Bug 1862802 part 2: Support find in page on Android using only caret events instead of converting them to virtual cursor change events. r=eeejay
Depends on D192642

Differential Revision: https://phabricator.services.mozilla.com/D192643
2023-11-29 03:53:19 +00:00
James Teh 447aa32c0e Bug 1862802 part 1: Provide an argument to PlatformCaretMoveEvent specifying whether the event was caused by user input. r=eeejay
This is needed in order to support find in page on Android using remote caret events instead of virtual cursor change events.

Depends on D192641

Differential Revision: https://phabricator.services.mozilla.com/D192642
2023-11-29 03:53:19 +00:00
Butkovits Atila 1cb12b49dd Backed out 5 changesets (bug 1862802) for causing multiple failures. CLOSED TREE
Backed out changeset 786805a2cdcc (bug 1862802)
Backed out changeset effe12f2120a (bug 1862802)
Backed out changeset 7488e7ba80c5 (bug 1862802)
Backed out changeset 3d0747ce0174 (bug 1862802)
Backed out changeset d1558d374cef (bug 1862802)
2023-11-29 03:10:17 +02:00
James Teh 44caba5c0c Bug 1862802 part 5: Remove virtual cursor change event. r=eeejay
Depends on D192645

Differential Revision: https://phabricator.services.mozilla.com/D192646
2023-11-28 22:03:21 +00:00
James Teh 0bafc2f978 Bug 1862802 part 4: Remove SessionAccessibility call to AccessibleWrap::PivotTo. r=eeejay
This now just calls DoPivot and SendAccessibilityFocusEvent directly.

Depends on D192644

Differential Revision: https://phabricator.services.mozilla.com/D192645
2023-11-28 22:03:20 +00:00
James Teh 3f0c5fad25 Bug 1862802 part 3: Directly handle scrolling start events on Android instead of converting them to virtual cursor change events. r=eeejay
Depends on D192643

Differential Revision: https://phabricator.services.mozilla.com/D192644
2023-11-28 22:03:20 +00:00
James Teh ea3ee1204a Bug 1862802 part 2: Support find in page on Android using only caret events instead of converting them to virtual cursor change events. r=eeejay
Depends on D192642

Differential Revision: https://phabricator.services.mozilla.com/D192643
2023-11-28 22:03:19 +00:00
James Teh cfdccbd78f Bug 1862802 part 1: Provide an argument to PlatformCaretMoveEvent specifying whether the event was caused by user input. r=eeejay
This is needed in order to support find in page on Android using remote caret events instead of virtual cursor change events.

Depends on D192641

Differential Revision: https://phabricator.services.mozilla.com/D192642
2023-11-28 22:03:19 +00:00
James Teh 0b2de0e6be Bug 1822004: On Android, use RemoteAccessible (CtW) hit testing instead of a DOM event. r=eeejay
This unifies hit testing across all platforms.
It also removes one of the few remaining uses of virtual cursor change events.

Differential Revision: https://phabricator.services.mozilla.com/D192641
2023-11-28 07:37:30 +00:00
James Teh 23fd30a006 Bug 1845883: Remove HyperTextAccessibleWrap. r=nlapre
This is now just an alias for HyperTextAccessible on all platforms.
This was done with the following bash script:

```
cd accessible
find -name HyperTextAccessibleWrap.h -delete
sed -i 's/#include "HyperTextAccessibleWrap.h"/#include "HyperTextAccessible.h"/;/"HyperTextAccessibleWrap.h",/d;s/HyperTextAccessibleWrap/HyperTextAccessible/g' `git grep -l HyperTextAccessibleWrap`
```

Differential Revision: https://phabricator.services.mozilla.com/D184796
2023-08-02 01:42:17 +00:00
James Teh c68c3ca8b3 Bug 1844238 part 1: Change includes of Role.h to mozilla/a11y/Role.h. r=eeejay
Role.h will soon be generated, but it is generated within the obj dir, so local includes won't work.
Our C++ style guide says we should prefer exported includes wherever possible anyway.

This was done with this shell command inside the accessible/ directory:

```
sed -i 's,#include "Role.h",#include "mozilla/a11y/Role.h",' `git grep -l '#include "Role.h"'`
```

Differential Revision: https://phabricator.services.mozilla.com/D183940
2023-07-26 02:19:41 +00:00
James Teh 7c63b7fc05 Bug 1694573 part 5: Make LocalAccessible call Platform*Event. Remove most of the platform HandleAccEvent overrides. r=eeejay
Mac and Android still override HandleAccEvent for platform specific behaviour other than firing the event.
The Android behaviour can be unified properly in future work.

ATK is the platform layer with the most churn because there were inconsistencies in the way local and remote events were handled.
I'm reasonably sure these were unintentional inconsistencies, so I've done my best to unify them.

Differential Revision: https://phabricator.services.mozilla.com/D183704
2023-07-19 02:56:54 +00:00
James Teh 4d2410a13e Bug 1694573 part 2: Make Platform*Event functions take Accessible instead of RemoteAccessible. r=eeejay
Some of these methods don't yet handle LocalAccessible properly, but that will be fixed in subsequent patches.

Differential Revision: https://phabricator.services.mozilla.com/D183701
2023-07-19 02:56:53 +00:00
James Teh 7e43083f11 Bug 1694573 part 1: Rename Proxy*Event to Platform*Event. r=eeejay
This was done with the following command in the accessible/ directory:

```
sed -i 's/\bProxy\(.*\)Event\b/Platform\1Event/' `git grep -l 'Proxy.*Event'`
```

Differential Revision: https://phabricator.services.mozilla.com/D183700
2023-07-19 02:56:53 +00:00
James Teh 0cc53ffbc5 Bug 1843825 part 1: Remove unused Gecko a11y roles. r=eeejay
Some of these roles were duplicates, while others were just never used.
This removes the following roles:

- TITLEBAR
- GRIP
- SOUND
- CURSOR
- CARET
- WINDOW
- CHART
- BORDER
- COLUMN
- HELPBALLOON
- CHARACTER
- INDICATOR
- DROPLIST
- DIAL
- HOTKEYFIELD
- EQUATION
- BUTTONDROPDOWNGRID
- CLOCK
- SPLITBUTTON
- IPADDRESS
- ACCEL_LABEL
- ARROW
- COLOR_CHOOSER
- DESKTOP_ICON
- DESKTOP_FRAME
- DIRECTORY_PANE
- FILE_CHOOSER
- FONT_CHOOSER
- GLASS_PANE
- HTML_CONTAINER
- ICON
- LAYERED_PANE
- OPTION_PANE
- POPUP_MENU
- ROOT_PANE
- SCROLL_PANE
- SPLIT_PANE
- TABLE_COLUMN_HEADER
- TABLE_ROW_HEADER
- TEAR_OFF_MENU_ITEM
- TERMINAL
- VIEWPORT
- HEADER
- FOOTER
- RULER
- AUTOCOMPLETE
- EDITBAR
- PAGE
- REDUNDANT_OBJECT
- IME
- CALENDAR
- EMBEDDED_OBJECT

Differential Revision: https://phabricator.services.mozilla.com/D183716
2023-07-19 02:51:29 +00:00
James Teh 6c99023552 Bug 1840295: Remove Windows specific ifdefs for PDocAccessible:: FocusEvent and CaretMoveEvent. r=eeejay
On Windows, focus and caret move events include the caret rectangle.
This isn't used on other platforms.
To simplify the cross-platform interface (including Platform.h), remove the ifdefs from there.
However, we use ifdefs to avoid calculating the rectangle on non-Windows platforms, instead just sending an empty rectangle.

Differential Revision: https://phabricator.services.mozilla.com/D182138
2023-07-05 04:15:27 +00:00
Eitan Isaacson 6998527d19 Bug 1754905 - Match Pivot API in nsIAccessiblePivot. r=Jamie
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
   with something that is much more similar to the native Pivot
   interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
   xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.

Differential Revision: https://phabricator.services.mozilla.com/D181813
2023-06-28 21:45:16 +00:00
Iulian Moraru 98478e7490 Backed out changeset f3095da827d9 (bug 1754905) for causing build bustages on DocAccessibleWrap. CLOSED TREE 2023-06-28 03:03:37 +03:00
Eitan Isaacson 556fa1bfbb Bug 1754905 - Match Pivot API in nsIAccessiblePivot. r=Jamie
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
   with something that is much more similar to the native Pivot
   interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
   xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.

Differential Revision: https://phabricator.services.mozilla.com/D181813
2023-06-27 16:59:54 +00:00
Butkovits Atila 9ac839ebe2 Backed out changeset 4d92a76cedd0 (bug 1754905) for causing bustages at LocalAccessible. CLOSED TREE 2023-06-27 03:46:47 +03:00
Eitan Isaacson 87391fa922 Bug 1754905 - Match Pivot API in nsIAccessiblePivot. r=Jamie
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
   with something that is much more similar to the native Pivot
   interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
   xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.

Differential Revision: https://phabricator.services.mozilla.com/D181813
2023-06-27 00:05:16 +00:00
James Teh 65baf08086 Bug 1831035 part 7: Remove (now empty) platform specific RemoteAccessible classes and rename RemoteAccessibleBase to RemoteAccessible. r=eeejay
This involved moving ApplyCache from the .h into the .cpp because now that the class is no longer a template, forward declaration of DocAccessibleParent is not sufficient.

Differential Revision: https://phabricator.services.mozilla.com/D181852
2023-06-26 21:20:13 +00:00
Stanca Serban f0967c3305 Backed out changeset 8be4693aecbb (bug 1754905) for causing bustages in xpcAccessiblePivot.h. CLOSED TREE 2023-06-24 03:22:31 +03:00
Eitan Isaacson f872bcc7cc Bug 1754905 - Match Pivot API in nsIAccessiblePivot. r=Jamie
This patch does several things:
1. Remove virtual cursor doc accessible member.
2. Remove state-keeping nsAccessiblePivot implementation and replace it
   with something that is much more similar to the native Pivot
   interface.
3. Move nsIAccessiblePivot implementation to xpcom and rename it
   xpcAccessiblePivot.
4. Delete mochitests and introduce browser tests.
5. Make new xpcom implementation work on remote accessibles as well.

Differential Revision: https://phabricator.services.mozilla.com/D181813
2023-06-23 23:22:34 +00:00
Eitan Isaacson 4dce76304c Bug 1839515 - Remove pivot text navigation API. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D181576
2023-06-21 21:15:47 +00:00
Norisz Fay f8505d5db9 Backed out changeset 8178c74a4c65 (bug 1839515) for causing mochitest failures on browser_events_vcchange.js 2023-06-21 22:21:29 +03:00
Eitan Isaacson da7273bd10 Bug 1839515 - Remove pivot text navigation API. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D181576
2023-06-21 17:55:06 +00:00
Eitan Isaacson 446672d058 Bug 1839516 - Remove FORWARD_ACTION_TO_ACCESSIBLE in Android. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D181575
2023-06-21 16:22:51 +00:00
Eitan Isaacson b3cea24dfd Bug 1834874 - P2: Remove DocAccessiblePlatformExt. r=Jamie,ipc-reviewers,mccr8
Since we removed the last dependency on this subprotocol, we can now
remove it.

Differential Revision: https://phabricator.services.mozilla.com/D181321
2023-06-20 18:15:43 +00:00
Eitan Isaacson 85a5ad4790 Bug 1834874 - P1: Make text navigation work in UI thread with cached TextLeafPoint API. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D181320
2023-06-20 18:15:42 +00:00
Eitan Isaacson 0b3727802d Bug 1819160 - Map Android ids to doc/accessible id pairs. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D179737
2023-06-13 18:33:35 +00:00
Eitan Isaacson 893830a805 Bug 1835162 - Use new async clipboard IPC methods in Android. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D179159
2023-06-07 06:49:56 +00:00
James Teh f79fdd39f3 Bug 1833313: Remove all remaining a11y cache checks and non-caching code except for Mac specific bits. r=morgan,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D178146
2023-05-28 23:42:12 +00:00
Sandor Molnar 329d21371b Backed out changeset dbb7e27f8464 (bug 1833313) for causing android gv-junit crashes. CLOSED TREE 2023-05-24 14:08:03 +03:00
James Teh fbf1ab52f8 Bug 1833313: Remove all remaining a11y cache checks and non-caching code except for Mac specific bits. r=morgan,geckoview-reviewers,calu
Differential Revision: https://phabricator.services.mozilla.com/D178146
2023-05-24 10:10:46 +00:00
James Teh 5183cb7125 Bug 1821955 part 5: Change all CtW pref checks to use a11y::IsCacheActive. r=eeejay,taskgraph-reviewers,bhearsum
This was done using the following script:

```
matchingFiles=`git grep -l accessibility_cache_enabled`
sed -i 's/StaticPrefs::accessibility_cache_enabled_AtStartup/a11y::IsCacheActive/' $matchingFiles
for f in $matchingFiles; do
  usesA11yPref=
  grep -q StaticPrefs::accessibility_ $f && usesA11yPref=1
  hasA11yInclude=
  grep -q 'nsAccessibilityService.h' $f && hasA11yInclude=1
  if [ -z $usesA11yPref ] && [ -z $hasA11yInclude ]; then
    sed -i 's,mozilla/StaticPrefs_accessibility.h,nsAccessibilityService.h,' $f
  elif [ -z $usesA11yPref ] && [ $hasA11yInclude ]; then
    sed -i '/"mozilla.StaticPrefs_accessibility.h"/d' $f
  elif [ $usesA11yPref ] && [ -z $hasA11yInclude ]; then
    sed -i '/"mozilla.StaticPrefs_accessibility.h"/a#include "nsAccessibilityService.h"' $f
  fi
done
```

Differential Revision: https://phabricator.services.mozilla.com/D177722
2023-05-19 02:56:48 +00:00
Eitan Isaacson c3a3a950f0 Bug 1829056 - P2: Include fromIndex in TYPE_VIEW_TEXT_CHANGED events. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D177809
2023-05-17 00:19:17 +00:00
Eitan Isaacson 67474ddb00 Bug 1829056 - P1: Include text in TYPE_VIEW_TEXT_SELECTION_CHANGED events. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D177808
2023-05-17 00:19:17 +00:00
Eitan Isaacson e6869d9efd Bug 1832647 - Remove cache enabled check in Android. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D177807
2023-05-13 00:11:51 +00:00
Makoto Kato b67709d926 Bug 1827386 - Part 1. NativeWeakPtr::Detach returns MozPromise to detect whether dispoer is finished. r=geckoview-reviewers,owlish
Actually, `NativeWeakPtr::Detach` may not release JNI ojbect immediately because
it depends on JNI object's `OnWeakNonIntrusiveDetach`i implementation.
`SessionAccessibility`'s `OnWeakNonIntrusiveDetach` implementation uses the
runnable to run on Android UI thread then disposer runs on main thread, so
if Detach is finished, JNI object isn't detached yet.

If calling `NativeWeakPtrHolder::Attach` immediately with same/recycled Java
object after `NettiveWeakPtr::Detach`, it is possible to run disposer for JNI
object by `OnWeakNonIntrusiveDetach` after Attach is finished. So it may
release newer attached object unfortunately.

So I would like to add a way to waiting for detach JNI object using
`MozPromise`.

Also, `MozPromise.h` includes `Natives.h` header (for `GeckoResult` support).
So I cannot modify inline method to use `MozPromise` due to recursive. So I
split implementation with `NativesInlines.h` as workaround.

Differential Revision: https://phabricator.services.mozilla.com/D175335
2023-05-09 05:13:32 +00:00
James Teh d143f977de Bug 1824935 part 1: Add ARIA roles to RoleMap. r=eeejay
This will soon be used to return standardized ARIA role names from a new function.

Differential Revision: https://phabricator.services.mozilla.com/D175581
2023-04-25 07:06:34 +00:00
Stanca Serban 041c4044bd Backed out 8 changesets (bug 1828816, bug 1822112, bug 1572512, bug 1824935) for causing multiple failures. CLOSED TREE
Backed out changeset 8886f7011919 (bug 1822112)
Backed out changeset df566bce405d (bug 1828816)
Backed out changeset 5857e8ef63e1 (bug 1828816)
Backed out changeset 50324d39e9c1 (bug 1822112)
Backed out changeset 7f6bee1959fb (bug 1572512)
Backed out changeset 4effd0bdc4db (bug 1824935)
Backed out changeset a8faf17fcce8 (bug 1824935)
Backed out changeset 0370b0032eb6 (bug 1824935)
2023-04-25 07:45:58 +03:00
James Teh 8a993e334d Bug 1824935 part 1: Add ARIA roles to RoleMap. r=eeejay
This will soon be used to return standardized ARIA role names from a new function.

Differential Revision: https://phabricator.services.mozilla.com/D175581
2023-04-24 23:35:50 +00:00
Eitan Isaacson c275c3a7d9 Bug 1825891 - P2: Remove Android's non-CTW implementation. r=Jamie,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D174516
2023-04-13 17:58:57 +00:00
Andi-Bogdan Postelnicu 10f49d4180 Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot
Differential Revision: https://phabricator.services.mozilla.com/D173035
2023-03-22 11:35:33 +00:00