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

193 Коммитов

Автор SHA1 Сообщение Дата
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 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
Simon Giesecke 91fdeec18c Bug 1695162 - Migrate from custom hashtable iteration to range-based for in accessible, dom/animation, dom/base, dom/localstorage, gfx/thebes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D106895
2021-03-12 16:14:58 +00:00
Alexandru Michis c691800cb0 Backed out changeset fd03162e726d (bug 1695162) for causing bustages in Document.cpp
CLOSED TREE
2021-03-12 17:10:02 +02:00
Simon Giesecke 2fb6095f16 Bug 1695162 - Migrate from custom hashtable iteration to range-based for in accessible, dom/animation, dom/base, dom/localstorage, gfx/thebes. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D106895
2021-03-12 14:54:08 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Eitan Isaacson bafd5e712b Bug 1694203 - P9: Have RemoteAccessible inherit from Accessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D104915
2021-03-02 16:32:24 +00:00
Eitan Isaacson 457ba6f552 Bug 1694203 - P8: Rename ChildrenCount to ChildCount in RemoteAccessible. r=Jamie
This will allow us to make this an override when inheriting from Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D106005
2021-03-02 16:32:23 +00:00
Simon Giesecke 1a4038f6e7 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in accessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D106093
2021-03-01 09:59:30 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Eitan Isaacson 6e8749d0da Bug 1693597 - P2: Rename ProxyAccessible to RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105671
2021-02-19 23:14:33 +00:00
Eitan Isaacson 6e49732365 Bug 1693597 - P1: Rename Accessible to LocalAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105670
2021-02-19 23:14:32 +00:00
Alexis Beingessner 07f2f659c6 Bug 1686616 - make StringBundle use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105531
2021-02-18 13:26:32 +00:00
Eitan Isaacson ff59e176e4 Bug 1692523 - P2: Prefix remote heirarchy functions with 'Remote'. r=Jamie
Parent -> RemoteParent
ChildAt -> RemoteChildAt
FirstChild -> RemoteFirstChild
LastChild -> RemoteLastChild
NextSibling -> RemoteNextSibling
PrevSibling -> RemotePrevSibling

Differential Revision: https://phabricator.services.mozilla.com/D105035
2021-02-16 20:05:11 +00:00
Eitan Isaacson 8c842a59e3 Bug 1692523 - P1: Prefix local heirarchy functions with 'Local'. r=Jamie
Parent -> LocalParent
GetChildAt -> LocalChildAt
FirstChild -> LocalFirstChild
LastChild -> LocalLastChild
NextSibling -> LocalNextSibling
PrevSibling -> LocalPrevSibling

Differential Revision: https://phabricator.services.mozilla.com/D105034
2021-02-16 20:05:10 +00:00
Emilio Cobos Álvarez 7abb275b8f Bug 1666739 - Fix android build bustage.
MANUAL PUSH: Bustage on a CLOSED TREE.
2020-12-04 02:17:00 +01:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Marco Zehe 1d00f10ad1 Bug 1668546 Part 1 - Rename the Pivot function in Android's AccessibleWrap so it doesn't collide with the name of the Pivot class, r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D92216
2020-10-05 17:45:30 +00:00
Sylvestre Ledru d9cd198ba1 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D92459
2020-10-06 16:12:00 +00:00
Aaron Klotz ee56e6a4b2 Bug 1651705: Part 6 - Update Android a11y to work with `NativeWeakPtr`; r=eeejay
This patch is similar to part 4 but for Android a11y.

Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system. Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.

Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.

Differential Revision: https://phabricator.services.mozilla.com/D87365
2020-09-21 21:48:53 +00:00
Kartikaya Gupta f38b3ecb1b Bug 1665955 - Stop including nsIScrollableFrame.h from Element.h. r=emilio
Changes to nsIScrollableFrame.h cause the world to rebuild which I find annoying.
This removes the inclusion into Element.h which is responsible for the
world-rebuilding and is relatively easy to eliminate. A bunch of usages of
nsIScrollableFrame get moved from .h files into .cpp files and I include the
header into .cpp files as needed.

Differential Revision: https://phabricator.services.mozilla.com/D90735
2020-09-18 18:32:13 +00:00
Butkovits Atila 925221149f Backed out 7 changesets (bug 1651705) as requested by Aklotz. CLOSED TREE
Backed out changeset 60730e8394ae (bug 1651705)
Backed out changeset c441ae751191 (bug 1651705)
Backed out changeset c289f06ceba2 (bug 1651705)
Backed out changeset d4491ef94b3e (bug 1651705)
Backed out changeset 1cca90ffab83 (bug 1651705)
Backed out changeset 9b1ce53e6472 (bug 1651705)
Backed out changeset a31251ba4566 (bug 1651705)
2020-09-01 20:39:15 +03:00
Aaron Klotz 6a34c1e45b Bug 1651705: Part 6 - Update Android a11y to work with `NativeWeakPtr`; r=eeejay
This patch is similar to part 4 but for Android a11y.

Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system. Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.

Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.

Differential Revision: https://phabricator.services.mozilla.com/D87365
2020-09-01 14:34:37 +00:00
Narcis Beleuzu 3361c24c23 Backed out 7 changesets (bug 1651705) for mochitest failures on test_resizers_resizing_elements.html . CLOSED TREE
Backed out changeset 7fd32a3fb6e7 (bug 1651705)
Backed out changeset de4edbcb15c1 (bug 1651705)
Backed out changeset 531e71369f68 (bug 1651705)
Backed out changeset 84590e96de88 (bug 1651705)
Backed out changeset 7d9d2d44b2ee (bug 1651705)
Backed out changeset 9ffca762753c (bug 1651705)
Backed out changeset 2d79f4348b36 (bug 1651705)
2020-08-28 23:06:39 +03:00
Aaron Klotz 78b90eb9b7 Bug 1651705: Part 6 - Update Android a11y to work with `NativeWeakPtr`; r=eeejay
This patch is similar to part 4 but for Android a11y.

Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system. Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.

Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.

Differential Revision: https://phabricator.services.mozilla.com/D87365
2020-08-27 20:14:50 +00:00
Morgan Reschenberg 95e4d6df8e Bug 1652809: Convert Pivot framework to use AccessibleOrProxy objects r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D83671
2020-07-28 22:35:24 +00:00
Eitan Isaacson 9abbad9091 Bug 1649217 - Part 2: Send isSelectionCollapsed for caret move in IPC. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D81912
2020-07-02 18:08:52 +00:00
James Teh b9c87a600d Bug 1649253: Correctly assign an Android a11y id to OOP iframe documents. r=eeejay
The DocProxyAccessibleWrap for an OOP iframe document is always created before we know its parent.
Previously, this resulted in the document getting an id of -1, which is only valid for the root document.
It also broke subsequent assumptions once the parent was set later.

Because we don't have the parent in this case, we can't add the document's id to its parent's hash table.
To deal with this, we no longer add any document to its parent's hash table.
Instead, when finding an accessible by id, we just check the id of each child document before checking that child document's hash table.

Differential Revision: https://phabricator.services.mozilla.com/D81959
2020-07-02 17:20:38 +00:00
Eitan Isaacson 080acfd067 Bug 1635722 - Check node ipc docs before sending pivot boundaries. r=Jamie
The IPC docs of the first/last nodes are not guaranteed to exist. This
could happen early on when the child docs are still hanging and have not
yet been processed in the NotificationController.

Differential Revision: https://phabricator.services.mozilla.com/D81883
2020-07-01 23:09:51 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Eitan Isaacson 3267d4f31f Bug 1639048 - Don't traverse into labels. r=Jamie
Labels are often used as primary click targets for related inputs. If
they are styled to certain bounds, but contain overflowing text for a11y
with a color of "transparent", the synthesized click will happen outside
the bounds of the label.

If we skip text leafs with "color: transparent", we will skip labels
altogether. Instead, lets land on labels when traversing, and ignore
its subtree.

Differential Revision: https://phabricator.services.mozilla.com/D77898
2020-06-22 22:03:58 +00:00
Narcis Beleuzu aaf25b6782 Backed out changeset b408bd393d95 (bug 1639048) for gv-junit failures on test.AccessibilityTest.testCheckbox . CLOSED TREE 2020-06-22 23:41:28 +03:00
Eitan Isaacson 06217d0c54 Bug 1639048 - Don't traverse into labels. r=Jamie
Labels are often used as primary click targets for related inputs. If
they are styled to certain bounds, but contain overflowing text for a11y
with a color of "transparent", the synthesized click will happen outside
the bounds of the label.

If we skip text leafs with "color: transparent", we will skip labels
altogether. Instead, lets land on labels when traversing, and ignore
its subtree.

Differential Revision: https://phabricator.services.mozilla.com/D77898
2020-06-22 18:16:30 +00:00
Morgan Reschenberg 3083026d43 Bug 1641932: Add Mac subroles to role map. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D77500
2020-06-05 03:45:44 +00:00
Aaron Klotz da67dfa6bb Bug 1637452: Part 9 - Fix JNI includes in accessible/android; r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D75372
2020-05-15 17:04:36 +00:00
Botond Ballo 5cffd06241 Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-05-05 15:24:12 +00:00
Csoregi Natalia b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo 2cb46cfa4b Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-04-28 01:44:43 +00:00
Eitan Isaacson a0e9e925ab Bug 1629771 - When collapsed caret moves in focusable element, don't pivot to it. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D71109

--HG--
extra : moz-landing-system : lando
2020-04-15 22:16:34 +00:00
Eitan Isaacson d09e5861c1 Bug 1628922 - Support landmark navigation in GeckoView. r=Jamie
Added a traversal rule and piped through xml-roles as role descriptions.

Differential Revision: https://phabricator.services.mozilla.com/D70950

--HG--
extra : moz-landing-system : lando
2020-04-15 22:12:37 +00:00
Eitan Isaacson bc77e9f52d Bug 1616468 - Indicate required field in hint string. r=Jamie
Android does not currently have anything similar to a 'required' state
to indicate that a field or input is required before submission. In this
patch we append a localized "required" string onto the node's hint.

The hint typically has the description of the node. If the node is an
entry the hint will have its label followed by the description.

Differential Revision: https://phabricator.services.mozilla.com/D65215

--HG--
extra : moz-landing-system : lando
2020-03-04 00:00:44 +00:00
Eitan Isaacson 8e38a4587c Bug 1616466 - Support expand/collapse android accessibility actions. r=Jamie,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D63290

--HG--
extra : moz-landing-system : lando
2020-02-25 22:37:00 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Eitan Isaacson 1e2369f4ca Bug 1615562 - Don't move accessible focus if caret is collapsed or not on focusable. r=Jamie
If a keyboard-focused accessible is removed, the caret jumps to its
nearest ancestor. To avoid arbitrary accessibility focus moves, ignore
caret events that have no selection and are not focusable items.

Differential Revision: https://phabricator.services.mozilla.com/D63541

--HG--
extra : moz-landing-system : lando
2020-02-20 21:49:20 +00:00
Eitan Isaacson 5f6ff669bf Bug 1616146 - Cache accessibility focus boundaries in java. r=Jamie
This allows `performAction` to immediately return false if a boundary is
reached and allow TalkBack to navigate past the web view.

Change viewport cache listener to reorder since it should catch all tree
mutations in the document.

Differential Revision: https://phabricator.services.mozilla.com/D63117

--HG--
extra : moz-landing-system : lando
2020-02-18 21:09:06 +00:00
Eitan Isaacson 697e001179 Bug 1604103 - Instead of pruning links and headings use contentDescription. r=Jamie
Chrome prunes the subtrees of links and headings (with single text leaf
children) and we mimic this in Gecko. The problem is that sometimes a
heading can be a child of a link, and it would be impossible to reach
when navigating by headings.

The main reason we mimiced chrome is because we would getthe name of the
node and its subtree uttered, so you would hear the name of the node
twice. By using contentDescription we can suppress the subtree from
TalkBack's utterance and preserve the node's children for heading
navigation.

Differential Revision: https://phabricator.services.mozilla.com/D61766

--HG--
extra : moz-landing-system : lando
2020-02-06 04:11:47 +00:00
James Teh 29e4eb9ab1 Bug 1604101: Fix Android a11y text navigation between nodes. r=MarcoZ
Talkback users expect that when you navigate past the end of the text in a node, Talkback will move into the next node and navigate there.
However, even though text navigation is async (client performs an action on the focused accessible and then waits for a text traversal event), firing a traversal event with a different accessible from the focused accessible is not supported by Talkback.
Firing a11y focus on the new node (as we did previously) doesn't fix this, but instead causes the entire node to be reported, among other weird behaviour.

1. Don't fire a11y focus for text traversal.
    Aside from Talkback reporting the entire node, this was also confusing Talkback, causing it to try to navigate several times into the new node.
2. When navigating text, cache whether we're at either edge.
    We do this because we need to be able to synchronously query whether we're at the edge, but we do navigation async.
    Special handling is needed for words at the end because words don't include trailing space.
3. When performing a text navigation action, check if we're already at the edge using the cache described above.
    If we are, synchronously return false, as Talkback expects.
    Talkback will then move to the next/previous node itself and navigate the text there.

Differential Revision: https://phabricator.services.mozilla.com/D57926

--HG--
extra : moz-landing-system : lando
2019-12-20 12:02:17 +00:00
James Teh 437c05d961 Bug 1601537: Fix text navigation in text leaf Accessibles on Android. ?MarcoZ r=MarcoZ
For paragraphs, divs, spans, etc., a11y focus on Android goes to text leaf Accessibles, rather than to the HyperTextAccessible container.
This does make sense, as these containers frequently embed other content, so the text needs to be reachable as a separate item.
However, previously, performing text navigation on these text leaf Accessibles returned the HyperTextAccessible parent.
This isn't supported by Talkback, and even if it were, it causes other problems; e.g. a11y focus being lost if the user was focused on a child other than the first child of such a container.
Therefore, if text navigation was performed on a text leaf Accessible, we now return a result within the text leaf Accessible if possible, rather than the HyperTextAccessible.

1. Make AccessibleWrap::GetTextContents support text leaf Accessibles (for both local and remote proxied Accessibles).
    This is used when providing text for text traversal events.

2. When navigating text on Android, we use Pivot::Next/PrevText.
    However, this will always return a HyperTextAccessible, even when starting on a text leaf.
    Therefore, if the result from Pivot::Next/prevText resides entirely within the same text leaf, translate the offsets from the HyperTextAccessible so they're relative to the text leaf and return the text leaf.

3. Pivot::Next/PrevText already supported starting from a text leaf Accessible.
    However, they ignored the offsets, which meant that navigating from a text leaf would always navigate to the start/end of the text leaf.
    Now, if a text leaf is passed to Pivot::Next/PrevText, the offsets (if specified) are translated to the HyperTextAccessible parent first.

4. Adjust the existing character/word/line tests so they ensure that navigation returns the node that has a11y focus; i.e. the text leaf.

Differential Revision: https://phabricator.services.mozilla.com/D57269

--HG--
extra : moz-landing-system : lando
2019-12-16 06:25:54 +00:00
Kannan Vijayan c949a6dbf7 Bug 1572831 - Fix usage of nsIDocShellTreeItem in DocAccessibleWrap::DocAccessibleWrap. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D56002

--HG--
extra : moz-landing-system : lando
2019-12-10 15:23:10 +00:00
Emilio Cobos Álvarez 3c12d374bc Bug 1600362 - Cleanup IntersectionObserver. r=smaug
Initially this was going to be a simple cleanup: Remove some useless namespaces
here and there and so on, remove `using` statements from the header and so on.

But unfortunately, DOMIntersectionObserver.h (which is included in Element.h,
unnecessarily) ended up exposing `Element` unnamespaced to a lot of code, so I
had to fix that.

Differential Revision: https://phabricator.services.mozilla.com/D55316

--HG--
extra : moz-landing-system : lando
2019-11-29 20:39:36 +00:00
James Teh 5cef911f1e Bug 1572595: Make ARIA 1.0 combo boxes reachable with Talkback. r=MarcoZ
ARIA role="combobox" gets a Gecko role of EDITCOMBOBOX.
However, there are two kinds of ARIA comboboxes:

1. ARIA 1.0 comboboxes are contentEditable. Text is entered into the combobox itself.
2. ARIA 1.1 comboboxes are not contentEditable. Instead, they have a textbox child into which text is entered.

On Android, traversal skipped EDITCOMBOBOX Accessibles altogether.
This meant that while 1.1 comboboxes were accessible (because we'd walk inside and land on the textbox), 1.0 comboboxes were not.

We still don't want to land on 1.1 comboboxes because the container isn't useful to the user.
Therefore, only stop on EDITCOMBOBOX Accessibles which are editable.

Differential Revision: https://phabricator.services.mozilla.com/D55224

--HG--
extra : moz-landing-system : lando
2019-11-29 10:11:28 +00:00
James Teh 4cfde48bec Bug 1566878: Android a11y: Don't expose <a> elements with no href or onclick as links. r=MarcoZ
Gecko's link role is used even for <a> elements without href or onclick.
Actionable links are indicated using the linked state.
However, Android doesn't have a concept equivalent to the linked state.
Thus, on Android, we must not expose an element as a link at all if it does not have the linked state.

Differential Revision: https://phabricator.services.mozilla.com/D55207

--HG--
extra : moz-landing-system : lando
2019-11-29 05:47:12 +00:00
Andrew Creskey b491100580 Bug 1593104 - Fixes to issues encountered when building on Android with optimization r=Jamie
We noticed a handful of linker errors when building with other build optimization flags  -Os, -O2, and -O3 instead the default, -Oz.
(see Bug 1591725).
This change is intended to be 0-impact on functionality -- simply resolving the linker errors.

Differential Revision: https://phabricator.services.mozilla.com/D51312

--HG--
extra : moz-landing-system : lando
2019-11-05 13:05:06 +00:00
James Teh 18ef8b89a3 Bug 1590929: a11y::TraversalRule::Match: Don't assume that all Accessibles have a frame. r=MarcoZ
I don't have a test case for this crash, but the stack suggests the frame is null.
This can certainly happen for display: contents.

Differential Revision: https://phabricator.services.mozilla.com/D51560

--HG--
extra : moz-landing-system : lando
2019-11-04 07:04:40 +00:00
Eitan Isaacson cff449b020 Bug 1564549 - Implement clipboard actions natively. r=geckoview-reviewers,yzen,snorp
Differential Revision: https://phabricator.services.mozilla.com/D45602

--HG--
extra : moz-landing-system : lando
2019-09-23 23:42:38 +00:00
Eitan Isaacson 967793da25 Bug 1564549 - Implement set selection natively. r=geckoview-reviewers,yzen,snorp
Differential Revision: https://phabricator.services.mozilla.com/D45601

--HG--
extra : moz-landing-system : lando
2019-09-23 23:42:40 +00:00
Eitan Isaacson 1bce54c7cc Bug 1564549 - Implement text navigation natively. r=geckoview-reviewers,Jamie,snorp
Differential Revision: https://phabricator.services.mozilla.com/D45600

--HG--
extra : moz-landing-system : lando
2019-09-23 23:42:47 +00:00
Eitan Isaacson 0f147877cd Bug 1564549 - Implement move and explore by touch natively. r=geckoview-reviewers,yzen,snorp
Differential Revision: https://phabricator.services.mozilla.com/D45599

--HG--
extra : moz-landing-system : lando
2019-09-23 23:42:49 +00:00
Eitan Isaacson c484dec9b9 Bug 1564549 - Introduce native traveral rule. r=yzen
The rule takes a granularity constant as an argument in the constructor.

Differential Revision: https://phabricator.services.mozilla.com/D45598

--HG--
extra : moz-landing-system : lando
2019-09-23 23:42:51 +00:00
Eitan Isaacson f636c8855c Bug 1564549 - Add action forwarding macro. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D45597

--HG--
extra : moz-landing-system : lando
2019-09-23 23:42:53 +00:00
Noemi Erli ecdbbb2a1f Backed out 8 changesets (bug 1564549) for causing failures in browser_all_files_referenced.js CLOSED TREE
Backed out changeset a6b83802832c (bug 1564549)
Backed out changeset 7f38c6ddd009 (bug 1564549)
Backed out changeset 15a754fb192e (bug 1564549)
Backed out changeset 34441585469f (bug 1564549)
Backed out changeset aada27f6ad6e (bug 1564549)
Backed out changeset 103dbf465704 (bug 1564549)
Backed out changeset c38e72058869 (bug 1564549)
Backed out changeset aca91e9add16 (bug 1564549)
2019-09-24 02:38:39 +03:00
Eitan Isaacson 11dd6681cd Bug 1564549 - Implement clipboard actions natively. r=geckoview-reviewers,yzen,snorp
Differential Revision: https://phabricator.services.mozilla.com/D45602

--HG--
extra : moz-landing-system : lando
2019-09-23 21:07:08 +00:00
Eitan Isaacson ef8c8bacd2 Bug 1564549 - Implement set selection natively. r=geckoview-reviewers,yzen,snorp
Differential Revision: https://phabricator.services.mozilla.com/D45601

--HG--
extra : moz-landing-system : lando
2019-09-23 21:07:02 +00:00
Eitan Isaacson ac01020042 Bug 1564549 - Implement text navigation natively. r=geckoview-reviewers,Jamie,snorp
Differential Revision: https://phabricator.services.mozilla.com/D45600

--HG--
extra : moz-landing-system : lando
2019-09-23 21:06:58 +00:00
Eitan Isaacson 85d6a5f093 Bug 1564549 - Implement move and explore by touch natively. r=geckoview-reviewers,yzen,snorp
Differential Revision: https://phabricator.services.mozilla.com/D45599

--HG--
extra : moz-landing-system : lando
2019-09-23 21:06:51 +00:00
Eitan Isaacson 37c232bfbf Bug 1564549 - Introduce native traveral rule. r=yzen
The rule takes a granularity constant as an argument in the constructor.

Differential Revision: https://phabricator.services.mozilla.com/D45598

--HG--
extra : moz-landing-system : lando
2019-09-23 21:06:49 +00:00
Eitan Isaacson 874de5845e Bug 1564549 - Add action forwarding macro. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D45597

--HG--
extra : moz-landing-system : lando
2019-09-23 21:06:40 +00:00
Eitan Isaacson 1a3b5051f6 Bug 1576549 - Use bounds in bundle argument instead of getter method. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D44041

--HG--
extra : moz-landing-system : lando
2019-08-30 01:29:31 +00:00
Eitan Isaacson 3194a92923 Bug 1572256 - Clear virtual cursor position when focus clear action is invoked. r=geckoview-reviewers,Jamie,snorp
Differential Revision: https://phabricator.services.mozilla.com/D41114

--HG--
extra : moz-landing-system : lando
2019-08-09 00:07:21 +00:00
Kannan Vijayan 3fb6190ec6 Bug 1559414 - Rename unaudited pre-fission methods with SameProcess for future audit burndown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D39378

--HG--
extra : moz-landing-system : lando
2019-07-26 16:48:31 +00:00
Boris Zbarsky 9de72a3ac6 Bug 1557793 part 2. Stop using [array] in nsIStringBundle. r=Pike
Differential Revision: https://phabricator.services.mozilla.com/D34196

--HG--
extra : moz-landing-system : lando
2019-06-11 15:51:51 +00:00
J.C. Jones cad430cae6 Bug 1391438 - Move GECKOBUNDLE macros into their own header r=snorp
The GECKOBUNDLE macros are useful to more than just a11y code, so let's move them into the jni package so that all jni consumers may drink of their sweet nectar.

Differential Revision: https://phabricator.services.mozilla.com/D30585

--HG--
extra : moz-landing-system : lando
2019-05-10 17:59:46 +00:00
Ryan Hunt 0eeced87be Bug 1534395 - Rename TabParent to BrowserParent. r=nika
This commit renames TabParent to BrowserParent.

Differential Revision: https://phabricator.services.mozilla.com/D28133

--HG--
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
rename : dom/ipc/TabParent.h => dom/ipc/BrowserParent.h
extra : rebase_source : d2706b9f42177d8de16068b7b1d088a44b8720a4
extra : histedit_source : a617ddac45c58050ef799116a67d2d983f2a8f6d%2C1d1dabd8761a32d548a6fbf1027be960698f6a5e
2019-04-09 16:38:15 -05:00
Eitan Isaacson 59ea5c03e6 Bug 1544541 - Check that accessible in batch exists in SessionAccessibility. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D27569

--HG--
extra : moz-landing-system : lando
2019-04-16 02:38:17 +00:00
Masayuki Nakano d8d0bcab65 Bug 1543013 - part 2: Make accessible use mozilla::PresShell directly rather than via nsIPresShell r=Jamie
This patch makes accessible module use `mozilla::PresShell` directly rather
than via `nsIPresShell`.  Additionally, renames `DocAccessible::PresShell()`
to `DocAccessible::PresShellPtr()` for avoiding conflict with using
`PresShell` in it and its sub classes.

Differential Revision: https://phabricator.services.mozilla.com/D26663

--HG--
extra : moz-landing-system : lando
2019-04-13 12:13:15 +00:00
Masayuki Nakano 09fd54444c Bug 1543013 - part 1: Mark some methods of nsCoreUtils as MOZ_CAN_RUN_SCRIPT r=Jamie
This patch marks some methods of nsCoreUtils which are found at writing the
following patches, as `MOZ_CAN_RUN_SCRIPT`.

Due to bug 1543294, some of them are marked as `MOZ_CAN_RUN_SCRIPT_BOUNDARY`
because `MOZ_CAN_RUN_SCRIPT` requires to change base class, but that's
other licenses header or used in our code too many places.

Differential Revision: https://phabricator.services.mozilla.com/D26926

--HG--
extra : moz-landing-system : lando
2019-04-13 12:13:13 +00:00
Eitan Isaacson c35dbb6950 Bug 1479042 - Handle text insertion and name change events as live regions and announce. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D21612

--HG--
extra : moz-landing-system : lando
2019-03-15 23:10:42 +00:00
Eitan Isaacson 6d8e53ccd1 Bug 1479042 - Add Android announcement event plumbing. r=yzen
Depends on D21610

Differential Revision: https://phabricator.services.mozilla.com/D21611

--HG--
extra : moz-landing-system : lando
2019-03-05 19:36:05 +00:00
Eitan Isaacson 50711a42d5 Bug 1531579 - Refresh viewport cache on tree mutations and fire android event. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D21610

--HG--
extra : moz-landing-system : lando
2019-03-12 21:58:37 +00:00
Dorel Luca df51e27b6a Backed out changeset 583048926c12 (bug 1531579) for Geckoview failure. CLOSED TREE 2019-03-12 01:38:46 +02:00
Eitan Isaacson adcc1ec434 Bug 1531579 - Refresh viewport cache on tree mutations and fire android event. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D21610

--HG--
extra : moz-landing-system : lando
2019-03-05 19:28:41 +00:00
Eitan Isaacson bf64f6d78e Bug 1525470 - Include description in accessible hints. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D19870

--HG--
extra : moz-landing-system : lando
2019-02-21 17:45:17 +00:00
Dorel Luca 0c4863aaf0 Backed out changeset ac4f1b5527fd (bug 1525470) for failures in geckoview in org.mozilla.geckoview.test.AccessibilityTest.testCheckbox. CLOSED TREE 2019-02-20 02:53:14 +02:00
Eitan Isaacson 2ba937125b Bug 1525470 - Include description in accessible hints. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D19870

--HG--
extra : moz-landing-system : lando
2019-02-19 18:56:30 +00:00
Eitan Isaacson e63779903d Bug 1520611 - Prune children in Android. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D16743

--HG--
extra : moz-landing-system : lando
2019-01-24 00:23:45 +00:00
Dorel Luca 207c24c7d2 Backed out 3 changesets (bug 1520611) for Android gv-junit failures in org.mozilla.geckoview.test.AccessibilityTest.testTree
Backed out changeset 0a48519a9ad1 (bug 1520611)
Backed out changeset 1fea939a7e7c (bug 1520611)
Backed out changeset c9e244ccc88d (bug 1520611)

--HG--
extra : rebase_source : 448bfe14fbb8741251064da295e036a93a376145
2019-01-23 12:09:29 +02:00
Eitan Isaacson 8bcf525c5a Bug 1520611 - Prune children in Android. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D16743

--HG--
extra : moz-landing-system : lando
2019-01-22 19:49:05 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Eitan Isaacson ce8d13e455 Bug 1518247 - Pass name in viewport cache. r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D15857

--HG--
extra : moz-landing-system : lando
2019-01-14 20:04:58 +00:00
Eitan Isaacson e708455671 Bug 1518805 - Don't update bounds on gone or defunct accessibles. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D16064

--HG--
extra : moz-landing-system : lando
2019-01-10 06:59:16 +00:00
Eitan Isaacson dfa5c93420 Bug 1518253 - Add accessibles to focus path hash table in non-e10s. r=MarcoZ
Differential Revision: https://phabricator.services.mozilla.com/D15858

--HG--
extra : moz-landing-system : lando
2019-01-08 06:08:43 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Emilio Cobos Álvarez 99521806a2 Bug 1513749 - Modernize a bit nsLayoutUtils::GetFrameForPoint / GetFrameForArea. r=mats
Also add an IsElement check in GetElementFromPoint in the APZ code since I think
the element cast is unsound in presence of Shadow DOM.

Differential Revision: https://phabricator.services.mozilla.com/D14355

--HG--
extra : moz-landing-system : lando
2018-12-21 11:22:07 +00:00
Sylvestre Ledru ad75e912fb Bug 1512961 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D14060

--HG--
extra : moz-landing-system : lando
2018-12-10 19:23:16 +00:00
Eitan Isaacson 9045d6bab7 Bug 1511398 - Check if the retrieved accessible child is actually valid when filling the bundle's data, r=yzen
Differential Revision: https://phabricator.services.mozilla.com/D13611

--HG--
extra : moz-landing-system : lando
2018-12-06 15:43:23 +00:00