Changed the array type to nsTArray to avoid copies and get compile-time
errors if we ever try to do that. To set an array as a value, it must be
moved.
Differential Revision: https://phabricator.services.mozilla.com/D125899
XUL documents have a bunch of non-hypetext accessibles in their heirarchy. So you can't assume that a hyperlink's parent is a hypertext. To get around that, when we construct ranges for elements they should be internal ranges when possible.
Differential Revision: https://phabricator.services.mozilla.com/D98394
This allows `contenteditable` textboxes to work correctly with flattened text values.
The attribute setters, aside from AXValue, don't work in Chrome or Safari with aria textboxes,
so those are not a high priority. These include:
- AXSelectedText
- AXSelectedTextRange
- AXVisibleCharacterRange
In addition, AXVisibleCharacterRange's getter doesn't function as expected in Chrome or Safari either, so I didn't touch it.
Differential Revision: https://phabricator.services.mozilla.com/D97629
It seems like the GeckoTextMarker::Range can sometimes return invalid ranges.
We need to check if they are valid or not before marshalling them.
Differential Revision: https://phabricator.services.mozilla.com/D95230
There are at least 8 different methods for getting a range from an offset:
1. left word
2. right word
3. line
4. left line
5. right line
6. sentence
7. paragraph
8. range with same style.
Having a single wrapper and IPDL method for all of those with an enum would remove
a lot of redundancies.
Differential Revision: https://phabricator.services.mozilla.com/D90936
This patch adds several new parameters:
* AXLeftWordTextMarkerRangeForTextMarker
* AXRightWordTextMarkerRangeForTextMarker
* AXStartTextMarkerForTextMarkerRange
* AXEndTextMarkerForTextMarkerRange
* AXNextTextMarkerForTextMarker
* AXPreviousTextMarkerForTextMarker
Our word boundaries API is pretty buggy. Instead of trying to
resolve or triage each issue I found, I added todo tests
for them.
Differential Revision: https://phabricator.services.mozilla.com/D83680
These classes do a few things:
1. They implement and abstract common text operations, for example:
(a) comparing two markers to know which one precedes the other.
(b) text retrieval for ranges
(c) geometric bounds for ranges
(d) etc.
2. They can be converted to and from AXTextMarker(Range)s. Since the AXTextMarker
should not contain a raw pointer since there is a potential for use-after-free,
we need to lookup the referenced accessible in its document to know that it still exists.
Note: mozTextAccessible got pushed to another unified source file, so we need to
declare some stuff for it. Ideally we would be detecting these kinds of things sooner.
Differential Revision: https://phabricator.services.mozilla.com/D81760