Commit Graph

94 Commits

Author SHA1 Message Date
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