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

1153 Коммитов

Автор SHA1 Сообщение Дата
James Teh c0e93222ee Bug 1735464: PrevWordBreakClassWalker::IsStartOfGroup: Don't advance mOffset if PrevChar fails. r=eeejay
IsStartOfGroup wants to peek at the previous character.
It calls PrevChar, but it doesn't check for failure.
It then unconditionally increments mOffset to "undo" PrevChar.
If PrevChar failed, that means we're now 1 character after where we started.
This wasn't causing any test failures and I can't think of a test case that shows breakage here.
Nevertheless, it definitely doesn't make sense and could cause difficult-to-diagnose bugs.

This in turn exposed a bug in PrevChar whereby it didn't handle being called again after it had already failed.
That also had to be fixed here.

Differential Revision: https://phabricator.services.mozilla.com/D128332
2021-10-26 22:25:29 +00:00
Ting-Yu Lin c2f6ef7a09 Bug 1736938 Part 3 - Make all WordBreaker's methods static, and adapt the callers. r=jfkthame
The motivation is the same as the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D129109
2021-10-25 19:00:22 +00:00
Ting-Yu Lin 11ec3b3de9 Bug 1737332 - Remove unused WordBreaker argument for IsAcceptableWordStart(). r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D129108
2021-10-22 18:41:45 +00:00
Eitan Isaacson 254970745b Bug 1733248 - Fire state change events for autocomplete changes. r=morgan
Trickier than just listening for attributes on inputs since a form
can toggle autocomplete too.

Also fixed To32States to work on the 32nd bit.

Differential Revision: https://phabricator.services.mozilla.com/D128913
2021-10-21 22:47:43 +00:00
James Teh a145479a09 Bug 1734582: Don't assert for a null frame in TextLeafPoint::FindPrev/NextLineStartSameLocalAcc. r=morgan
This can happen for display: contents.
In that case, there are no lines in the Accessible anyway, so returning an invalid TextLeafPoint (as we already did) is the correct thing to do.

Differential Revision: https://phabricator.services.mozilla.com/D128319
2021-10-14 01:53:47 +00:00
James Teh 2a1be4ad84 Bug 1734322 follow-up: Use different value for Text and DOMNodeID CacheDomains. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128331
2021-10-14 01:52:46 +00:00
Eitan Isaacson bc023a74f1 Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-12 15:46:38 +00:00
Narcis Beleuzu 908970e8a5 Backed out 3 changesets (bug 1733238) for Bp-hybrid bustages on ImageAccessible . CLOSED TREE
Backed out changeset af8436178a49 (bug 1733238)
Backed out changeset 910aebecda65 (bug 1733238)
Backed out changeset c5d218eb6acb (bug 1733238)
2021-10-12 00:53:23 +03:00
Eitan Isaacson 4bd2d11bcb Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-11 19:43:19 +00:00
Morgan Reschenberg 2ea20c4c52 Bug 1734541: Verify IPC doc exists before sending resolution update r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127860
2021-10-11 15:11:17 +00:00
Cristian Tuns a373e25460 Backed out 3 changesets (bug 1733238) for causing hybrid build bustages. CLOSED TREE
Backed out changeset 7753b03a092a (bug 1733238)
Backed out changeset 352c6a7ae5cd (bug 1733238)
Backed out changeset 9c132ebfabb2 (bug 1733238)
2021-10-08 19:17:37 -04:00
Eitan Isaacson 306495fc6c Bug 1733238 - P2: Make ImageAccessible an imgINotificationObserver. r=Jamie
Use imgINotificationObserver to get notified of size availability.
Layout uses an observer to wait for this too. Our observer is notified
after layout so we should have bounds by then.

We need to store the request status because we get a lot of "replayed"
status changes that would cause chatty and wrong state change events
when the accessible is first created and bound to parent.

We can use that status for both INVISIBLE and ANIMATED states in
NativeState.

Differential Revision: https://phabricator.services.mozilla.com/D127719
2021-10-08 20:20:58 +00:00
James Teh 1834390663 Bug 1734322: Cash DOM node id in the parent process a11y cache. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127757
2021-10-08 01:57:46 +00:00
James Teh 174f5c0b71 Bug 1730093 part 4: Support RemoteAccessible in TextLeafPoint. r=eeejay
This uses the unified AppendTextTo and TextLength, as well as adding support for cached line start boundaries.

Differential Revision: https://phabricator.services.mozilla.com/D127205
2021-10-06 04:53:54 +00:00
James Teh 1ae2aea0d0 Bug 1730093 part 3: Support RemoteAccessible in nsAccUtils::TextLength. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127204
2021-10-06 04:53:53 +00:00
James Teh 832dddd128 Bug 1730093 part 1: Push text and line start offsets to the cache. r=eeejay
As part of this, we no longer cache the name for text accessibles, as that would be redundant.
Instead, we return the cached text in RemoteAccessible::Name.

Differential Revision: https://phabricator.services.mozilla.com/D127202
2021-10-06 04:53:52 +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 1de5b0abcd Bug 1731374 - Add string storage to AccAttributes with move semantics. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D126012
2021-09-28 22:01:35 +00:00
Eitan Isaacson d4a231a724 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-28 21:55:41 +00:00
criss dfdc70739c Backed out changeset 4d44c5b706db (bug 1729061) for causing bustages in DocAccessibleChildBase.cpp. CLOSED TREE 2021-09-28 00:45:56 +03:00
Eitan Isaacson a5dc06abb2 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-27 18:46:20 +00:00
Jonathan Kew 98c510163c Bug 1732464 - Reverse the order of calls to FindLineContaining in IsLocalAccAtLineStart, so that we can pass prevLineNum as a starting index to accelerate the second call. r=Jamie
Depends on D126587

Differential Revision: https://phabricator.services.mozilla.com/D126588
2021-09-27 08:35:35 +00:00
Jonathan Kew 1989dbf0ca Bug 1732463 - Make nsIFrame::GetContainingBlockForLine return a pair of `nsIFrame*`s instead of using an outparam for one of them. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D126587
2021-09-25 09:13:02 +00:00
James Teh fd1b75596f Bug 1427811: Add null checks to some a11y document logging functions. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126444
2021-09-24 20:31:00 +00:00
Jonathan Kew fb9588e175 Bug 1732268 - Remove redundant failure-checks from nsLineIterator initialization, as it uses infallible allocation. r=dholbert
This means nsBlockFrame::GetLineIterator is also infallible, so callers that know
they're dealing with an nsBlockFrame (not an arbitrary nsIFrame) don't need to
check for null.

Differential Revision: https://phabricator.services.mozilla.com/D126470
2021-09-24 14:20:05 +00:00
James Teh f08c138efd Bug 1732108: Map ATK_ROLE_CONTENT_DELETION/INSERTION. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126432
2021-09-24 00:05:50 +00:00
Eitan Isaacson 050fed6811 Bug 1731154 - Add move semantics to AccAttributes and use value references to avoid copies. r=morgan
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
2021-09-23 20:01:11 +00:00
James Teh 18dedeaf42 Bug 1729407 part 4: Add TextLeafPoint support for finding character boundaries. r=eeejay
Again, this should be very easy to adapt to RemoteAccessible once we cache text there.

Differential Revision: https://phabricator.services.mozilla.com/D124776
2021-09-23 11:38:10 +00:00
James Teh b52bf17cab Bug 1729407 part 3: Add TextLeafPoint support for finding word boundaries. r=eeejay
This implementation uses WordBreaker and a bunch of code to emulate layout's handling of punctuation, space, words spanning across nodes, words broken due to lines, etc.

While this does mean we're effectively duplicating layout, there are a couple of advantages.
First, PeekOffset has a lot of quirks which have caused us problems in the past and are difficult to debug.
They don't matter so much for other consumers, but a11y is very sensitive to these kinds of bugs.
Having our own logic means we can make changes as needed without potentially affecting other PeekOffset consumers.
Second, while the implementation currently only works on LocalAccessibles (because we don't have text in RemoteAccessible yet), it's been designed so that it should be very easy to adapt for RemoteAccessible.
It already walks the unified Accessible tree, so it just has to be taught how to get text from RemoteAccessible once that's possible.
This means we don't have to cache word boundaries; they can be calculated on demand in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D124775
2021-09-23 11:38:10 +00:00
James Teh 1093cc6340 Bug 1729407 part 2: Add TextLeafPoint support for finding line start boundaries for LocalAccessibles. r=eeejay
This adds TextLeafPoint::FindBoundary, which will be the main entry point for finding single boundaries.
FindBoundary searches individual Accessibles for a boundary, walking the a11y tree and continuing the search if a boundary isn't found.

Support for line start boundaries uses layout to determine line edges, but otherwise traverses the accessibility tree.
This avoids depending on PeekOffset, which has a lot of quirks that cause problems for a11y.
More importantly, it's possible to find line boundaries within a single LocalAccessible using the lower level FindPrev/NextLineStartSameLocalAcc methods.
This will be useful for line boundary caching, since we want to cache this info on individual Accessibles.
In contrast, PeekOffset might walk outside the current Accessible, which makes caching more difficult.

Differential Revision: https://phabricator.services.mozilla.com/D124774
2021-09-23 11:38:09 +00:00
James Teh ca8f43ff48 Bug 1729407 part 1: Add new TextLeafPoint and TextLeafRange classes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D124773
2021-09-23 11:38:09 +00:00
Chris Peterson e8232ec5a5 Bug 1731526 - Fix non-unified build errors in accessible/. r=eeejay
accessible/base/TreeWalker.cpp:151:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
accessible/xpcom/xpcAccessibleMacInterface.mm:177:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]

Differential Revision: https://phabricator.services.mozilla.com/D126173
2021-09-22 01:41:40 +00:00
Marian-Vasile Laza 6ee4314955 Backed out changeset 176469dcdeba (bug 1731154) for causing bc failures on browser_attributed_text.js. 2021-09-21 21:14:29 +03:00
Eitan Isaacson 74d979ca0d Bug 1731154 - Add move semantics to AccAttributes and use value references to avoid copies. r=morgan
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
2021-09-21 17:04:04 +00:00
Morgan Reschenberg eae2965c1b Bug 1730545: Add CopyableTArray<int32_t> to AccAttributes variant r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123398
2021-09-13 23:02:47 +00:00
Olli Pettay a6ae4c4cf1 Bug 1730541, remove nsCoreUtils::IsContentDocument, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D125462
2021-09-13 21:01:23 +00:00
Marian-Vasile Laza 9ae7ce258e Backed out changeset a6d7f0da2513 (bug 1729061) for causing bustages on DocAccessibleChildBase.cpp. CLOSED TREE 2021-09-10 03:47:09 +03:00
Eitan Isaacson 9cd3deba73 Bug 1729061 - Introduce cache verification logging. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124486
2021-09-09 22:25:58 +00:00
Eitan Isaacson e233a15fc7 Bug 1728442 - P3: Push description to cache. r=Jamie
Rely on name/description changes.

Differential Revision: https://phabricator.services.mozilla.com/D124235
2021-09-02 18:06:52 +00:00
Eitan Isaacson 20b6875ab9 Bug 1728437 - Keep cache sparse and only store populated fields. r=Jamie
When constructing the initial cache, don't push empty or default fields.
Also, have a way to remove fields from an established cache if it
becomes empty/default.

Differential Revision: https://phabricator.services.mozilla.com/D124127
2021-09-01 22:20:09 +00:00
Eitan Isaacson 6c538e2f0e Bug 1728403 - Introduce CacheUpdateType as argument for Cache IPDL message. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D124117
2021-09-01 20:32:17 +00:00
Eitan Isaacson 17e9670742 Bug 1727643 - P2: Send numeric value fields to cache. r=morgan
Also added double to AccAttributes.

Differential Revision: https://phabricator.services.mozilla.com/D123696
2021-08-26 19:40:05 +00:00
Eitan Isaacson 3c7fe28200 Bug 1727643 - P1: Add cache convinience methods in LocalAccessible. r=morgan
Also introduce "cache domains" to have a shorthand for which things in
the cache needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D123695
2021-08-26 19:40:04 +00:00
Eitan Isaacson cc7e9cf3e8 Bug 1727616 - Add meter ARIA role. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D123674
2021-08-26 16:17:21 +00:00
Eitan Isaacson 5cbfe86b54 Bug 1727373 - Add state change info in event logging. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123529
2021-08-24 23:49:59 +00:00
James Teh 6e56411410 Bug 1727227: Add a static assert to ensure that the size of the AccAttributes value variant isn't unintentionally changed. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D123415
2021-08-24 21:44:43 +00:00
Andi-Bogdan Postelnicu 75ed803f7c Bug 1725145 - fixes for linking in the hybrid build env. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D122344
2021-08-22 10:21:56 +00:00