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

9713 Коммитов

Автор SHA1 Сообщение Дата
Eitan Isaacson 935107258c Bug 1737944 - P5: Unify GetLevelInternal and GetDefaultLevel as Accessible::GetLevel. r=Jamie
The nsAccUtils method was a "fast" one for calculating set sizes and
conceptual parents. Unified it with
LocalAccessible::GetLevelInternal in Accessible::GetLevel with an
argument.

I also fixed select->optgroup->option group attributes.

Differential Revision: https://phabricator.services.mozilla.com/D134208
2022-01-04 21:01:36 +00:00
Eitan Isaacson 4d4ae8fb45 Bug 1737944 - P4: Cache aria group attributes and introduce Accessible getter. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134207
2022-01-04 21:01:35 +00:00
Eitan Isaacson 8d517827ab Bug 1737944 - P3: Introduce Accessible::TagName getter for retrieving HTML tags. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134206
2022-01-04 21:01:35 +00:00
Eitan Isaacson 2aaeabdb69 Bug 1737944 - P2: Allow AccAttributes to store a UniquePtr of AccGroupInfo. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134205
2022-01-04 21:01:34 +00:00
Eitan Isaacson 5379b3edcf Bug 1737944 - P1: Port HTML group position test to browser. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134204
2022-01-04 21:01:34 +00:00
Eitan Isaacson 7eb72ab403 Bug 1747749 - Introduce inner reorder event. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134813
2022-01-04 17:41:41 +00:00
Emilio Cobos Álvarez fac07284a9 Bug 1745869 - Grant 1s of activity to hidden OOPIF iframes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D134804
2022-01-02 12:39:38 +00:00
Mike Hommey 1acc37c7a6 Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-30 20:56:43 +00:00
Iulian Moraru b469802d84 Backed out changeset 7f9b4b6191ad (bug 1747756) for causing multiple failures. CLOSED TREE 2021-12-30 01:59:26 +02:00
Mike Hommey cb50a5444f Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-29 22:18:52 +00:00
Eitan Isaacson b11dca3e81 Bug 1744315 - P3: Do explore by touch via DOM event. r=Jamie,botond
Differential Revision: https://phabricator.services.mozilla.com/D132842
2021-12-28 20:41:23 +00:00
Eitan Isaacson 70cf770e32 Bug 1744315 - P2: Don't traverse into remote accessibles in explore by touch. r=Jamie
Our default traversal rule will eventually work with remote trees, but
explore by touch will be local-only until we do hittesting in the parent
process. This change prevents the parent process from drilling down past
outer docs into frames.

Differential Revision: https://phabricator.services.mozilla.com/D132841
2021-12-28 20:41:22 +00:00
Mike Hommey fce6eb7d83 Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-23 20:29:07 +00:00
Cristian Tuns e1e31e01f2 Backed out 2 changesets (bug 1747165) for causing nightly blockers(bustages) a=backout
Backed out changeset 4b1ab0915c94 (bug 1747165)
Backed out changeset 96043d814772 (bug 1747165)
2021-12-23 08:00:54 -05:00
Mike Hommey b55194a16f Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-22 23:56:24 +00:00
James Teh f32815354c Bug 1739050: If an Accessible is moved, reuse the RemoteAccessible and don't push the cache for it. r=eeejay
A move is sent to the parent process as a hide and then a show, even if the LocalAccessible wasn't recreated.
Previously, this meant that a new RemoteAccessible was created and the original RemoteAccessible was destroyed.
This was particularly problematic if the Accessible had focus and the client cached focus.
In that case, the client cache contained a dead Accessible, and since no focus event was fired (because it's the same Accessible in the content process), focus in the client was broken.
This also meant that there was a full cache push for a moved Accessible, which was wasteful.

To fix this:

1. Keep track of LocalAccessibles inserted during a tick.
2. Keep track of LocalAccessibles moved during a tick, including descendants. If a LocalAccessible was inserted during the same tick (1), don't track it as a move.
3. Before processing mutation events, tell the parent process about which Accessibles are about to be moved (2).
4. When sending a subtree to the parent process, don't send cache info for an Accessible which is being moved (2).
5. When the parent process receives a hide event, if there is an Accessible that is about to be moved (3), don't shut it down; allow it to be reused.
6. When the parent process receives a show event, if there is an Accessible that has an existing RemoteAccessible (5), reuse it.

Differential Revision: https://phabricator.services.mozilla.com/D132328
2021-12-22 01:33:52 +00:00
James Teh 40ee301bcd Bug 1746827: Null check mCachedFields in RemoteAccessibleBase::Min/Cur/MaxValue/Step. r=eeejay
It's rare that mCachedFields is null now, but it seems it can still happen.

Differential Revision: https://phabricator.services.mozilla.com/D134268
2021-12-20 22:52:45 +00:00
Morgan Reschenberg 422693242c Bug 1723766: Process internal table groups in moxRows r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D133676
2021-12-16 23:06:16 +00:00
James Teh 16c3343e30 Bug 1735955: Always push bounds for an initial cache push, irrespective of LocalAccessible::mBounds. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D133594
2021-12-14 04:58:57 +00:00
Masayuki Nakano 8cddf2911a Bug 1741148 - part 4: Add `nsINode::ComputeIndexInParentNode()` and `nsINode::ComputeIndexInParentContent()` r=smaug
Some callers of `nsINode::ComputeIndexOf()` do not use its parent node except
calling it.  These tiny methods make such callers simpler.

Differential Revision: https://phabricator.services.mozilla.com/D131337
2021-12-09 12:03:00 +00:00
Masayuki Nakano 3816ca9546 Bug 1741148 - part 3: Make users of `nsINode::ComputeIndexOf_Deprecated()` use `nsINode::ComputeIndexOf()` if the result is not set to `int32_t` nor return as `int32_t` r=smaug
This patch fixes only the cases if the result of `ComputeIndexOf_Deprecated()`
is used as unsigned integer with implicit or explicit cast.

Differential Revision: https://phabricator.services.mozilla.com/D131336
2021-12-09 11:55:36 +00:00
Masayuki Nakano f2baf0d9ab Bug 1741148 - part 1: Rename `nsINode::ComputeIndexOf` to `ComputeIndexOf_Deprecated` r=smaug
It's hard to fix some callers.  Therefore, in this bug, we should fix only
simple cases.  Therefore, we should rename existing API first.

Differential Revision: https://phabricator.services.mozilla.com/D131334
2021-12-09 08:32:30 +00:00
Masayuki Nakano 67dfbee062 Bug 1740853 - part 2: Make `HyperTextAccessible::GetSpellTextAttr` take `uint32_t` for offset in a text node r=Jamie
It takes text node's offset that is never larger than `INT32_T` because
`nsTextFragment` limits max text length of a text node is
`<= NS_MAX_TEXT_FRAGMENT_LENGTH`, that means equals or less than `0x1FFFFFFF`.
So that it must be safe to convert the offset to `uint32_t` from `int32_t`.

Differential Revision: https://phabricator.services.mozilla.com/D131111
2021-12-09 08:01:31 +00:00
Masayuki Nakano c19aa5aaa5 Bug 1740853 - part 1: Make `nsContentUtils::ComparePoints` take `uint32_t` for offset in DOM nodes r=smaug
They are defined as "unsigned long" by the standards.  So we should use
`uint32_t` rather than `int32_t` with the methods.  However, layout code
uses `int32_t` a lot for representing the offset.  Therefore, this patch
adds `*_FixOffset1` etc for the cases which cannot fix easily in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D131110
2021-12-09 07:51:45 +00:00
Masayuki Nakano 82e2013683 Bug 1735446 - part 4: Make `Selection::GetRangeAt()` take `uint32_t` instead of `int32_t` r=smaug
It's an internal API corresponding to `Selection.getRangeAt` DOM API.
I think that it should use `uint32_t` rather than `size_t` because of the
consistency with the DOM API and `Selection::RangeCount()`.

This patch fixes all callers of `GetRangeAt()`, and rewrites it with ranged-
loops unless original ones do not refer `RangeCount()` every time and may run
script in the loop.

Differential Revision: https://phabricator.services.mozilla.com/D128848
2021-12-09 07:35:09 +00:00
Mike Hommey 8e411675ac Bug 1744877 - Remove --disable-xul. r=Gijs
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.

Differential Revision: https://phabricator.services.mozilla.com/D133161
2021-12-08 21:37:11 +00:00
James Teh e649b5b5cd Bug 1742915 part 2: Cache the tag attribute. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D132653
2021-12-07 03:37:03 +00:00
James Teh 6309a094fe Bug 1742915 part 1: Move Attributes to base Accessible. r=morgan
The RemoteAccessibleBase implementation is a stub for now, but will be expanded in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D132652
2021-12-07 03:37:03 +00:00
Alexandru Michis 77f2a1c3aa Backed out 2 changesets (bug 1742915) for causing android bustages.
CLOSED TREE

Backed out changeset 587bbb6b9224 (bug 1742915)
Backed out changeset 1beb5cf0cceb (bug 1742915)
2021-12-07 03:08:45 +02:00
James Teh 09a73de6f5 Bug 1742915 part 2: Cache the tag attribute. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D132653
2021-12-07 00:01:31 +00:00
James Teh 25f7ff3485 Bug 1742915 part 1: Move Attributes to base Accessible. r=morgan
The RemoteAccessibleBase implementation is a stub for now, but will be expanded in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D132652
2021-12-07 00:01:30 +00:00
Joel Maher 63bf096aef Bug 1743907 - Remove webrender annotation from manifestparser manifests. r=ahal,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D132682
2021-12-03 16:04:29 +00:00
James Teh aaae0cfc51 Bug 1742917 part 4: Move LinkIndexAtOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D132201
2021-12-02 06:55:29 +00:00
James Teh d3e92fc1a1 Bug 1742917 part 3: Move LinkIndexOf to HyperTextAccessibleBase. r=eeejay
I removed the sync IPDL implementation of LinkIndexOf because we can calculate this in the parent process even with the cache disabled.

Differential Revision: https://phabricator.services.mozilla.com/D132200
2021-12-02 06:55:28 +00:00
James Teh c840074d40 Bug 1742917 part 2: Move IndexOfEmbeddedChild to base Accessible. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D132199
2021-12-02 06:55:28 +00:00
James Teh 5a9991c9d0 Bug 1742917 part 1: Move StartOffset to base Accessible. r=eeejay
1. There was a Windows non-cached RemoteAccessible implementation, but it was never actually called, so I removed it.
2. The sync IPDL RemoteAccessible implementation previously provided a boolean indicating success.
    I removed this because the LocalAccessible implementation doesn't have this and it doesn't seem like remote is special in this respect.

Differential Revision: https://phabricator.services.mozilla.com/D132198
2021-12-02 06:55:27 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
James Teh 4904fa05f2 Bug 1741792 part 2: Use the cached caret. r=eeejay
This includes support in both TextLeafPoint and HyperTextAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D132098
2021-12-01 04:48:34 +00:00
James Teh 934c9cb61c Bug 1741792 part 1: Cache the caret in the parent process using caret events. r=eeejay
As well as the caret offset, we also need to cache whether the caret is at the end of a line.
Therefore, this information has been added to caret events.

Differential Revision: https://phabricator.services.mozilla.com/D132097
2021-12-01 04:48:33 +00:00
James Teh 42e16c9c21 Bug 1730862 part 3: Support the caret at the end of a line in HyperTextAccessibleBase. r=eeejay
This uses the caret support in TextLeafPoint.

Differential Revision: https://phabricator.services.mozilla.com/D132096
2021-11-30 02:07:37 +00:00
James Teh d2ad6859eb Bug 1730862 part 2: Support retrieval of the caret using TextLeafPoint. r=eeejay
The caret can be at the end of a wrapped line, but this does not have its own offset.
In this case, the way we handle the caret depends on what is being queried.
For character, we want to return no character at the position of the caret.
For word and line, we want to return the word/line before the caret.

To facilitate this conditional treatment, we use a special TextLeafPoint which represents the caret.
This is then actualized to a real point depending on the method called.

Differential Revision: https://phabricator.services.mozilla.com/D132095
2021-11-30 02:07:37 +00:00
James Teh ab3b1b2ccc Bug 1730862 part 1: Make HyperTextAccessibleBase::TransformOffset easier to use. r=eeejay
1. When calculating a start offset, we usually want 0 if the offset can't be transformed, thus clipping to the start of this Accessible.
    Previously, CharacterCount was always returned even when calculating a start offset.
    Now, we return 0 for a start offset, CharacterCount for an end offset.
2. Sometimes, this fallback value is insufficient and we need to know explicitly whether it failed.
    As well as the offset, we now return a boolean indicating this.
    This will be used in a subsequent patch.
3. Even though TransformOffset only deals with positive numbers, callers usually deal with signed numbers.
    Therefore, we now use int32_t insteaed of uint32_t to avoid a lot of casting.

Differential Revision: https://phabricator.services.mozilla.com/D132094
2021-11-30 02:07:36 +00:00
James Teh 50af5360c1 Bug 1743064: When the cache is enabled, release MSAA ids after a short delay. r=morgan
This is necessary to fix problems with Gmail and NVDA caused by reusing ids too quickly.

Differential Revision: https://phabricator.services.mozilla.com/D132316
2021-11-30 01:48:19 +00:00
James Teh f9fa2783ad Bug 1742902: Return the MsaaAccessible when using window emulation with the cache enabled. r=morgan
Previously, we tried to get a COM proxy even when the cache was enabled, which just crashed.
As part of this, use a RefPtr instead of manually managing references.

Differential Revision: https://phabricator.services.mozilla.com/D132104
2021-11-29 18:24:30 +00:00
James Teh e02052c2cc Bug 1742595: Don't throw an assertion when calling ImageAccessible::NativeState on a XUL image. r=eeejay
XUL images use nsImageBoxFrame, not nsImageFrame.
AccessibleType() returns eNoType on nsImageBoxFrame.
Changing this to return eImageType seems a bit risky and adding a new type just for an assertion seems pointless.
Therefore, we just check the frame type.

Differential Revision: https://phabricator.services.mozilla.com/D132051
2021-11-29 18:23:48 +00:00
Tooru Fujisawa d35e49b80a Bug 1617545 - Part 2: Make datalist item not removable in autocomplete drop down menu. r=MattN
Add nsIAutoCompleteResult.isRemovableAt method, to indicate whether the value
is removable, and do nothing for Shift+Delete on the item when the value is
not removable.

Depends on D131740

Differential Revision: https://phabricator.services.mozilla.com/D131741
2021-11-28 16:19:56 +00:00
James Teh 39db459749 Bug 1739372: Improve handling of reentry in MsaaAccessible::GetRemoteIAccessibleFor. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D131468
2021-11-23 21:51:32 +00:00
James Teh 159159dc66 Bug 1742003: Handle mContent being null when caching DOM node id. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D131732
2021-11-22 05:39:39 +00:00
Andi-Bogdan Postelnicu c8e0f87391 Bug 1519636 - First reformat with clang-format 13.0.0. r=firefox-build-system-reviewers,sylvestre,mhentges
Updated with clang-format version 13.0.0 (taskcluster-OgjH5lasS5K_fvefdRcJVg)

Depends on D131114

Differential Revision: https://phabricator.services.mozilla.com/D129119
2021-11-16 08:07:30 +00:00
Eitan Isaacson 4df46094a0 Bug 1741014 - Null check container widget in option state change handler. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D131146
2021-11-15 19:27:28 +00:00
Eitan Isaacson 37107fdf4c Bug 1733263 - P5: Rely on DOMMenuItem events for ACTIVE state changes in select elements. r=Jamie
1. Use dom events in RootAccessible to fire ACTIVE state changes.
2. Add DOMMenuItemInactive events to nsListControlFrame and fire it on
   the previously active option.
3. Don't fire those DOM events on collapsed combo boxes.
4. Add ACTIVE state change events for collapsed combo box options.

Differential Revision: https://phabricator.services.mozilla.com/D130298
2021-11-11 17:05:58 +00:00
Eitan Isaacson bdc3cd4279 Bug 1733263 - P4: Promisify the select focus change test. r=Jamie
This will make it easier to work with in a later change.

Differential Revision: https://phabricator.services.mozilla.com/D130297
2021-11-11 17:05:58 +00:00
Eitan Isaacson 9116ad2a43 Bug 1733263 - P3: Fire ACTIVE state change when aria-activedescendant changes. r=Jamie
Have ARIAActiveDescendantIDMaybeMoved call ARIAActiveDescendantChanged regardless of
widget focus state. The latter already checks if the widget is focused. This gives us
a chance to fire and ACTIVE state change regardless of focus state.

If an id or aria-activedescendant attribute is about to change, fire an
ACTIVE state change on the previously active accessible.

Differential Revision: https://phabricator.services.mozilla.com/D130296
2021-11-11 17:05:58 +00:00
Eitan Isaacson 48ccdd1553 Bug 1733263 - P2: Flush events and notifications when waiting for unexpected events. r=Jamie
By allowing async DOM events to be dispatched, and advancing the refresh
driver we can force some calls to NotificationController::WillRefresh
and flush out any pending notifications or events.

This lets us more reliably catch unexpected events without the need for
a sentinel event at the end.

Differential Revision: https://phabricator.services.mozilla.com/D130295
2021-11-11 17:05:57 +00:00
Eitan Isaacson ad6731236c Bug 1733263 - P1: Refactor state change event promises. r=Jamie
We do this in a bunch of places, so I moved it into promisified-events.

Differential Revision: https://phabricator.services.mozilla.com/D130294
2021-11-11 17:05:57 +00:00
Butkovits Atila b1ead9992f Backed out 5 changesets (bug 1733263) for causing leakes. CLOSED TREE
Backed out changeset 06263018f1f7 (bug 1733263)
Backed out changeset c8f226476a30 (bug 1733263)
Backed out changeset 2b1755721a8e (bug 1733263)
Backed out changeset 0b3d68cb6e68 (bug 1733263)
Backed out changeset 439e821c9640 (bug 1733263)
2021-11-10 02:22:56 +02:00
Eitan Isaacson 379e516511 Bug 1733263 - P5: Rely on DOMMenuItem events for ACTIVE state changes in select elements. r=Jamie
1. Use dom events in RootAccessible to fire ACTIVE state changes.
2. Add DOMMenuItemInactive events to nsListControlFrame and fire it on
   the previously active option.
3. Don't fire those DOM events on collapsed combo boxes.
4. Add ACTIVE state change events for collapsed combo box options.

Differential Revision: https://phabricator.services.mozilla.com/D130298
2021-11-09 23:17:17 +00:00
Eitan Isaacson c96fcc25b5 Bug 1733263 - P4: Promisify the select focus change test. r=Jamie
This will make it easier to work with in a later change.

Differential Revision: https://phabricator.services.mozilla.com/D130297
2021-11-09 23:17:17 +00:00
Eitan Isaacson c24895a970 Bug 1733263 - P3: Fire ACTIVE state change when aria-activedescendant changes. r=Jamie
Have ARIAActiveDescendantIDMaybeMoved call ARIAActiveDescendantChanged regardless of
widget focus state. The latter already checks if the widget is focused. This gives us
a chance to fire and ACTIVE state change regardless of focus state.

If an id or aria-activedescendant attribute is about to change, fire an
ACTIVE state change on the previously active accessible.

Differential Revision: https://phabricator.services.mozilla.com/D130296
2021-11-09 23:17:17 +00:00
Eitan Isaacson cece555e00 Bug 1733263 - P2: Flush events and notifications when waiting for unexpected events. r=Jamie
By allowing async DOM events to be dispatched, and advancing the refresh
driver we can force some calls to NotificationController::WillRefresh
and flush out any pending notifications or events.

This lets us more reliably catch unexpected events without the need for
a sentinel event at the end.

Differential Revision: https://phabricator.services.mozilla.com/D130295
2021-11-09 23:17:16 +00:00
Eitan Isaacson 594d200c93 Bug 1733263 - P1: Refactor state change event promises. r=Jamie
We do this in a bunch of places, so I moved it into promisified-events.

Differential Revision: https://phabricator.services.mozilla.com/D130294
2021-11-09 23:17:16 +00:00
Nils 3c79233da8 Bug 1740294: Fix typo "then then" -> "then" r=mhentges
Instances of the typo that have been imported from other repositories have been left unchanged.

Differential Revision: https://phabricator.services.mozilla.com/D130561
2021-11-09 17:36:40 +00:00
Ting-Yu Lin f32eaad379 Bug 1722484 Part 2 - Replace LineBreaker::Next() and WordBreaker::Next() with the new iterators. r=m_kato
With the rewrite, we reduce the dependency of lwbrk LineBreaker::Next(),
WordBreaker::Next(), and their `int32_t` sentinel values
NS_LINEBREAKER_NEED_MORE_TEXT and NS_WORDBREAKER_NEED_MORE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D130392
2021-11-09 01:14:15 +00:00
Gerald Squelart 5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Iulian Moraru 36283a9a3b Backed out 2 changesets (bug 1722484) for causing multiple build bustages. CLOSED TREE
Backed out changeset bef547b588ff (bug 1722484)
Backed out changeset e676fa1a0cb7 (bug 1722484)
2021-11-09 01:42:20 +02:00
Ting-Yu Lin 7310c93473 Bug 1722484 Part 2 - Replace LineBreaker::Next() and WordBreaker::Next() with the new iterators. r=m_kato
With the rewrite, we reduce the dependency of lwbrk LineBreaker::Next(),
WordBreaker::Next(), and their `int32_t` sentinel values
NS_LINEBREAKER_NEED_MORE_TEXT and NS_WORDBREAKER_NEED_MORE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D130392
2021-11-08 22:24:19 +00:00
Cristian Tuns 1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
James Teh 5d76f559b9 Bug 1736742 part 3: When running in an MSIX container, register AccessibleHandler in HKCU at startup if it isn't already registered. r=nalexander,jmathies
Differential Revision: https://phabricator.services.mozilla.com/D129951
2021-11-05 06:25:45 +00:00
Gerald Squelart 7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
James Teh eb568eccaf Bug 1735969: Unify Accessible::TakeFocus, thus allowing it to be used for RemoteAccessibles when the cache is enabled on Windows. r=morgan
1. Add TakeFocus in Windows PDocAccessible.
2. Move RecvTakeFocus into DocAccessibleChildBase so it is used for all platforms.
3. Move TakeFocus into the Accessible base class.
4. Move the IPDL version of TakeFocus into RemoteAccessibleBase so it is used for all plaforms.
5. Make the Windows RemoteAccessible::TakeFocus use the base (IPDL) implementation if the cache is enabled or COM otherwise.
6. Use Accessible::TakeFocus for ATK, Mac, Windows and XPCOM.

Differential Revision: https://phabricator.services.mozilla.com/D130327
2021-11-05 00:52:15 +00:00
ssummar c7c477296e Bug 1738840 - Replaces mozilla::Tuple with std::tuple in accessible/ r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130152
2021-11-04 13:39:19 +00:00
Magnus Melin 28f70eb371 Bug 1738565 - fix Crash in [@ -[MOXWebAreaAccessible handleAccessibleEvent:]]. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D129979
2021-11-03 08:44:02 +00:00
James Teh ca81384a66 Bug 1738051: Use a11y focus events to support the focused state when the cache is enabled. r=eeejay
This will also serve as the groundwork for unifying FocusedChild, but that isn't implemented here.

Differential Revision: https://phabricator.services.mozilla.com/D129669
2021-11-02 23:56:37 +00:00
James Teh eca2f19b0d Bug 1738032 part 6: browser_caching_states.js: Ignore state changes for states we aren't interested in. r=eeejay
For example, when disabling an HTML input, we get an event for SUPPORTS_AUTOCOMPLETION among others.
If we continue with the test after that state change and there hasn't been an ENABLED/UNAVAILABLE state change, the cache won't be up to date.
Unfortunately, we can't use untilCacheOk here because we don't do a cache push for state changes.

Differential Revision: https://phabricator.services.mozilla.com/D129643
2021-11-02 23:56:36 +00:00
James Teh 6deb1a13cb Bug 1738032 part 5: Use the unified Accessible::State on Windows to support cached RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D129642
2021-11-02 23:56:36 +00:00
James Teh f20971182b Bug 1738032 part 4: Use the cache for RemoteAccessible state. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129641
2021-11-02 23:56:36 +00:00
James Teh 461332528f Bug 1738032 part 3: Move LocalAccessible::State to Accessible. r=eeejay
This patch includes XPCOM support.
Unfortunately, LocalAccessible::State isn't const, so the base method can't be const for now either.

Differential Revision: https://phabricator.services.mozilla.com/D129640
2021-11-02 23:56:35 +00:00
James Teh 1d1d118200 Bug 1738032 part 2: Push a11y state in the initial cache push. r=eeejay
Rather than cache updates thereafter, state will be kept up to date using state change events.

Differential Revision: https://phabricator.services.mozilla.com/D129639
2021-11-02 23:56:35 +00:00
James Teh 9123e3a0ce Bug 1738032 part 1: Support uint64_t as a value type for AccAttributes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129638
2021-11-02 23:56:34 +00:00
James Teh 9e4079f57f Bug 1738070: Don't fire state change a11y events for NS_EVENT_STATE_DEFAULT changes on things other than buttons. r=morgan
We only expose this state on HTMLButtonAccessible, but we sometimes get these notifications for other controls; e.g. checkbox inputs.
We shouldn't fire a state change event for a state we never expose.

Differential Revision: https://phabricator.services.mozilla.com/D129673
2021-11-02 23:51:12 +00:00
Masayuki Nakano 4341d6fb0c Bug 1455514 - part 1: Add accessors and static helper methods to retrieve `nsINode` or its concrete classes from `EventTarget` r=smaug
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event.  Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.

If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls.  I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.

Differential Revision: https://phabricator.services.mozilla.com/D129781
2021-11-02 13:03:43 +00:00
Emilio Cobos Álvarez f3f1e06187 Bug 1738586 - Fix a11y test_general on dark mode. r=Jamie
Since this is a chrome page we start honoring dark mode colors by
default, and after bug 1525107 that affects default background and text
colors, which these tests were hardcoding to black/white.

Differential Revision: https://phabricator.services.mozilla.com/D129983
2021-11-02 10:36:17 +00:00
James Teh 570683a696 Bug 1730096 part 9: Add tests for cached text attributes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129475
2021-11-01 23:27:40 +00:00
James Teh 1563d99b94 Bug 1730096 part 8: Move DefaultTextAttributes to HyperTextAccessibleBase and implement it for RemoteAccessible. r=eeejay
This patch includes ATK and XPCOM support.

Differential Revision: https://phabricator.services.mozilla.com/D129474
2021-11-01 23:27:39 +00:00
James Teh 6bd5ccff7d Bug 1730096 part 7: Support cached remote text attributes in TextLeafPoint. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129473
2021-11-01 23:27:39 +00:00
James Teh 7f79cc0400 Bug 1730096 part 6: Add AccAttributes::CopyTo to copy an AccAttributes. r=eeejay
This is necessary for two reasons:

1. Leaf text attributes and default text attributes are cached separately, since the caller can choose whether to include defaults or not. This means merging them together.
2. Methods for retrieving attributes currently return a non-const AccAttributes. We might be able to change this in future for some of them, but I didn't want to deal with that in this work.

Differential Revision: https://phabricator.services.mozilla.com/D129472
2021-11-01 23:27:39 +00:00
James Teh e2a75ff2ce Bug 1730096 part 5: Push text attributes to the cache. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D129471
2021-11-01 23:27:38 +00:00
James Teh 5cb3312f64 Bug 1730096 part 4: Support AccAttributes as a value inside an AccAttributes. r=eeejay
This will be used to include text attributes as part of the cache for an Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D129470
2021-11-01 23:27:38 +00:00
James Teh f24390b6a8 Bug 1730096 part 3: Add HyperTextAccessibleBase::TextAttributes. r=eeejay
This uses TextLeafPoint.
This patch includes support for ATK, IA2 and XPCOM.
As with TextAtOffset, HyperTextAccessible calls the base implementation if the cache is enabled, but otherwise uses the old implementation for now.

Differential Revision: https://phabricator.services.mozilla.com/D129469
2021-11-01 23:27:37 +00:00
James Teh 754058c557 Bug 1730096 part 2: Implement support for text attributes in TextLeafPoint. r=eeejay
This supports both fetching text attributes and finding the start of attribute runs, but only for LocalAccessible.
Support for RemoteAccessible will be added in a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D129468
2021-11-01 23:27:37 +00:00
James Teh 39c9ee45b8 Bug 1730096 part 1: Add AccAttributes::Equal to compare attributes in two instances. r=eeejay
This will be used later to check whether text attributes are different between two Accessibles.
I added this as a method instead of operator== because callers always hold a pointer to AccAttributes, and *a1 == *a2 is weird and will probably lead to mistakes.
This required adding operator== for our value structs.

Differential Revision: https://phabricator.services.mozilla.com/D129467
2021-11-01 23:27:37 +00:00
Emilio Cobos Álvarez 43632d10fb Bug 1738084 - Make popups on Linux have shadows. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D129699
2021-10-28 00:51:58 +00:00
Markus Stange b0068bfe22 Bug 1737869 - Fix build with the macOS 12 SDK, by using AXTextMarker(Range)Ref instead of id and by ifdefing the declarations that are now public in the new SDK. r=eeejay
I think this patch is functionally neutral.
I'm not completely sure about the best way to do these casts - the __bridge may not be
necessary since we don't use ARC yet. But it's probably fine to add it anyway.
Also, returning autoreleased CFTypeRef objects seems a bit weird, but it's what we've
already been doing and it's probably fine.
And some of these nils should maybe be nullptrs, but the compiler doesn't seem to care.

Differential Revision: https://phabricator.services.mozilla.com/D129559
2021-10-27 20:38:07 +00:00
James Teh 20bdf607b8 Bug 1735706: Check the cache pref instead of mCachedFields in non-Windows RemoteAccessible methods. r=eeejay
mCachedFields might be null because all fields are default; i.e. mCachedFields being null doesn't mean the cache is invalid/disabled.
We should check the pref instead when determining whether to call base class methods to query the cache.

Differential Revision: https://phabricator.services.mozilla.com/D128445
2021-10-26 22:26:45 +00:00
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
James Teh ce7bb0bc8c Bug 1734583: When retrieving text stuff from the cache, null check mCachedFields and also verify the cache. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128334
2021-10-26 22:24:17 +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
Eitan Isaacson 9ea8dc7379 Bug 1736115 - Remove HTMLTextFieldAccessible::BindingOrWidgetParent. r=Jamie
Also fix search-textbox's use of aria-autocomplete and a test.

Differential Revision: https://phabricator.services.mozilla.com/D128655
2021-10-21 22:47:43 +00:00
Morgan Reschenberg 02b4894dca Bug 1733440: Adjust RemoteAccessibleBase::Bounds for root relative coordinates r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127848
2021-10-20 14:49:14 +00:00
James Teh 72a9e32e30 Bug 1735952 part 2: Support IAccessible::accLocation for RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128561
2021-10-19 03:58:57 +00:00
James Teh a2353ff109 Bug 1735952 part 1: Support QueryInterface to IAccessibleValue for RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128560
2021-10-19 03:58:56 +00:00
James Teh f0399f75aa Bug 1735953: Temporary a11y state hacks to get NVDA to render virtual buffers for cached documents. r=morgan
1. Don't return an error from IAccessible2::states. Otherwise, NVDA assumes the Accessible is defunct.
2. Return STATE_SYSTEM_READONLY for all documents in IAccessible::get_accState. Otherwise, NVDA doesn't treat the document as browseable.

Differential Revision: https://phabricator.services.mozilla.com/D128556
2021-10-19 03:58:14 +00:00
James Teh 68274e64bd Bug 1735722 part 6: Support QueryInterface to IAccessibleHypertext and IAccessibleHypertext::get_hyperlink for RemoteAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128555
2021-10-19 03:57:20 +00:00
James Teh a149fee47a Bug 1735722 part 5: Rename ia2AccessibleHypertext::TextAcc to LocalTextAcc. r=morgan
This makes way for a new unified TextAcc method in a subsequent patch.

Strictly speaking, doing it like this isn't correct because methods will return CO_E_OBJNOTCONNECTED for a RemoteAccessible instead of E_NOTIMPL.
I fixed this for IAccessibleText, but I realised fixing this for all interfaces is going to involve a lot of churn which we're going to end up removing anyway once we unify everything.
Clients don't really care about the error code, so I think this situation is acceptable while this is still in early development.

Differential Revision: https://phabricator.services.mozilla.com/D128554
2021-10-19 03:57:19 +00:00
James Teh b65ffbc6d2 Bug 1735722 part 4: Support QueryInterface to IAccessibleHyperlink for RemoteAccessible. r=morgan
We don't support any of the methods in this interface for RemoteAccessible yet.
However, IAccessibleHypertext::get_hyperlink returns an IAccessibleHyperlink, so we must support QI to it.

Differential Revision: https://phabricator.services.mozilla.com/D128553
2021-10-19 03:57:19 +00:00
James Teh 99831a6ce1 Bug 1735722 part 3: Add test for HyperTextAccessibleBase::LinkAt. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D128552
2021-10-19 03:57:19 +00:00
James Teh 8b6bb7ad30 Bug 1735722 part 2: Add HyperTextAccessibleBase::LinkAt. r=morgan
This uses the unified Accessible::EmbeddedChildAt from the previous patch.
HyperTextAccessible::LinkAt still exists, since there are still some callers that depend on it returning a LocalAccessible.
xpcAccessibleHyperText has also been updated to call this, which means tests will work on Windows when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D128551
2021-10-19 03:57:18 +00:00
James Teh 1dc833a28d Bug 1735722 part 1: Move EmbeddedChildAt into base Accessible. r=morgan
This required renaming LocalAccessible::GetEmbeddedChildAt to EmbeddedChildAt.
LocalAccessible::EmbeddedChildAt uses a covariant return type to return a LocalAccessible* while still overriding the base method (which returns Accessible*).
Unfortunately, this can't be done for RemoteAccessible, since the Derived type isn't complete in time due to the templating.
There was only one caller of RemoteAccessible::EmbeddedChildAt, so I just changed it to call AsRemote.
Eventually, even that caller will use the unified tree anyway.

Differential Revision: https://phabricator.services.mozilla.com/D128550
2021-10-19 03:57:18 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Andreea Pavel cac8dbda22 Bug 1734271 - Disable browser_test_zoom.js for webrender builds and reverted previous change r=aryx DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D128692
2021-10-17 16:50:13 +00:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Morgan Reschenberg a3da1e4b03 Bug 1735868: Map roles::switch to mozCheckboxAccessible r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128639
2021-10-15 21:48:29 +00:00
Morgan Reschenberg c703ea6425 Bug 1734271: Disable browser_test_zoom.js for webrender builds r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D128500
2021-10-15 16:08:13 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +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
James Teh 90ef3d34d8 Bug 1733514 part 5: Add initial tests for a11y text caching. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128035
2021-10-12 23:43:09 +00:00
James Teh ec36f1e8b3 Bug 1733514 part 4: Add xpcAccessibleHyperText::Intl and use it for methods which are supported by HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128034
2021-10-12 23:43:08 +00:00
James Teh 76d1361d9b Bug 1733514 part 3: Rename xpcAccessibleHyperText::Intl to IntlLocal. r=eeejay
This is to make way for a new Intl which returns HyperTextAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D128033
2021-10-12 23:43:08 +00:00
James Teh 9c2435ba49 Bug 1733514 part 2: Rename RemoteAccessible::GetTextAtOffset to TextAtOffset and have it override HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D128032
2021-10-12 23:43:07 +00:00
James Teh 18cac61d01 Bug 1733514 part 1: Make HyperTextAccessibleBase::CharacterCount virtual and override it in RemoteAccessible. r=eeejay
When the cache is disabled, we need a different implementation of RemoteAccessible::CharacterCount for non-Windows.
This already existed, but it hid the base implementation rather than overriding it.
On Windows, we don't support this for RemoteAccessible at all unless the cache is enabled, so there's no change there.

Differential Revision: https://phabricator.services.mozilla.com/D128031
2021-10-12 23:43:07 +00:00
James Teh 8fefbe08c1 Bug 1734540: Use document.body.innerHTML instead of document.write in chrome-document-builder.html. r=eeejay
This is a follow-up to my original patch.
It turns out that there is an assertion preventing use of document.write in privileged contexts which my original patch triggered.
Instead, set document.body.innerHTML.

Differential Revision: https://phabricator.services.mozilla.com/D128159
2021-10-12 23:43:06 +00:00
Eitan Isaacson d1e01ab3a8 Bug 1733243 - P3: Fire state change events for select[multiple]. r=morgan
If a select's size is greater than 1 it won't be recreated when multiple
is added or removed. State change events should be fired in that case.

Differential Revision: https://phabricator.services.mozilla.com/D128277
2021-10-12 22:13:34 +00:00
Eitan Isaacson 035a73c527 Bug 1733243 - P2: Recreate accessible when select size or multiple changes. r=morgan
If a <select> element with a default size or size of 1 gets the
`multiple` attribute it will change from a combobox button to an
embedded listbox. Similarly, if a select's size is set to something
larger than 1 it will convert from a combobox button to a listbox.

We should recreate the select's subtree because the
implementing classes are different for those two cases.

Differential Revision: https://phabricator.services.mozilla.com/D128276
2021-10-12 22:13:34 +00:00
Eitan Isaacson f9f789b389 Bug 1733243 - P1: Don't recreate aria-multiselectable changes, fire state change instead. r=morgan
We were force recreating accessibles when their aria-multiselectable
attribute changed. This was perhaps done in the past because of
percieved limitations in COM, or the implementing class was different.

This isn't the case anymore. We should instead fire state change events
when aria-multiselectable changes.

Differential Revision: https://phabricator.services.mozilla.com/D128275
2021-10-12 22:13:34 +00:00
Eitan Isaacson b822a27de3 Bug 1734695 - Add untilCacheIs and untilCacheOk for testing cache states. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127882
2021-10-12 15:51:15 +00:00
Eitan Isaacson 6f380d42dd Bug 1733238 - P3: Add ANIMATED state change notification to ImageAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127720
2021-10-12 15:46:39 +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
Eitan Isaacson 25d16b6a5d Bug 1733238 - P1: Add test for late-loading image and INVISIBLE change. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127718
2021-10-12 15:46:38 +00:00
Mike Hommey afec0c79c1 Bug 1735259 - Add missing include in MsaaAccessible.cpp. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D128158
2021-10-12 04:55:52 +00:00
Masayuki Nakano 25a3c48305 Bug 1732845 - Add `nsINode::IsInDesignMode()` to check whether the node is directly in design mode r=smaug
There are a lot of check of `Document`'s editable state **with** comments. This
means that it's unclear for developers that only `Document` node is editable in
design mode.

Additionally, there are some points which use composed document rather than
uncomposed document even though the raw API uses uncomposed document. Comparing
with the other browsers, checking uncomposed document is compatible behavior,
i.e., nodes in shadow trees are not editable unless `contenteditable`.

Therefore, `nsINode` should have a method to check whether it's in design mode
or not.

Note that it may be called with a node in UA widget.  Therefore, this patch
adds new checks if it's in UA widget subtree or native anonymous subtree,
checking whether it's in design mode with its host.

Differential Revision: https://phabricator.services.mozilla.com/D126764
2021-10-12 03:14:43 +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 61d62bdfb5 Bug 1733238 - P3: Add ANIMATED state change notification to ImageAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127720
2021-10-11 19:43:19 +00: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
Eitan Isaacson c347c225c3 Bug 1733238 - P1: Add test for late-loading image and INVISIBLE change. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127718
2021-10-11 19:43:18 +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 b9bdd79ca9 Bug 1733238 - P3: Add ANIMATED state change notification to ImageAccessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127720
2021-10-08 20:20:58 +00: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
Eitan Isaacson 4df7a921a8 Bug 1733238 - P1: Add test for late-loading image and INVISIBLE change. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127718
2021-10-08 20:20:57 +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 cccfd3eb4e Bug 1734517: static_cast from DocAccessible* to DocAccessibleWrap* instead of reinterpret_cast. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127762
2021-10-08 00:52:39 +00:00
James Teh 490b5ed046 Bug 1734540: For a11y browser tests, allow snippets when passing chrome: true to load as a chrome document in the parent process. r=eeejay
Normally, we use data: URLs to load snippets as tab documents.
However, there is no way we can make this load in the parent process.
Using a chrome:// URL will allow us to load a file in the parent process.
For OOP iframes, we use document-builder.sjs to yield a document with supplied markup, but sjs doesn't work for chrome:// (since sjs is handled by our test web server).
Instead, for chrome://, we use an HTML file with an embedded script which replaces the content of the document with the supplied markup.

Differential Revision: https://phabricator.services.mozilla.com/D127769
2021-10-08 00:27:09 +00:00
James Teh 769356106e Bug 1733513: Implement IAccessibleText nCharacters, text, textAtOffset and caretOffset for RemoteAccessible. r=morgan
1. Use ia2AccessibleHypertext for RemoteAccessibles that support hypertext.
2. Allow querying to the IAccessibleText interface for RemoteAccessibles. IAccessibleHypertext, etc. are not yet supported at all, so don't allow querying to those.
3. Use HyperTextAccessibleBase for methods it supports. For other IAccessibleText methods, return E_NOTIMPL if dealing with a RemoteAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D127217
2021-10-07 11:14:32 +00:00
James Teh 2534f21673 Bug 1730088 part 11: Move IsValidOffset/Range to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127216
2021-10-07 04:22:47 +00:00
James Teh 8c9bfeac73 Bug 1730088 part 10: Move TextAtOffset's TextLeafPoint implementation to HyperTextAccessibleBase. r=eeejay
The TextLeafPoint implementation works for both local and remote.
HyperTextAccessible calls the base implementation for supported boundaries when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D127215
2021-10-07 04:22:47 +00:00
James Teh 550d7598c3 Bug 1730088 part 9: Add HyperTextAccessibleBase::TransformOffset. r=eeejay
This is pretty similar to HyperTextAccessible::TransformOffset.
However, the local implementation has to compensate for list bullet errors propagating from FindOffset/PeekOffset, which isn't relevant for TextLeafPoint.
Therefore, we leave the HyperTextAccessible implementation alone so it will still be used by HyperTextAccessible code (FindOffset, etc.).

Differential Revision: https://phabricator.services.mozilla.com/D127214
2021-10-07 04:22:46 +00:00
James Teh ddbabe9849 Bug 1730088 part 8: Move ToTextLeafPoint to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127213
2021-10-07 04:22:46 +00:00
James Teh eb660a098e Bug 1730088 part 7: Move CharAt to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127212
2021-10-07 04:22:46 +00:00
James Teh 2dbf269a3f Bug 1730088 part 6: Move TextSubstring to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127211
2021-10-07 04:22:45 +00:00
James Teh 3c9b8a17dd Bug 1730088 part 5: Move ConvertMagicOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127210
2021-10-07 04:22:45 +00:00
James Teh 90725f7aed Bug 1730088 part 4: Move CaretOffset to HyperTextAccessibleBase. r=eeejay
The implementation for RemoteAccessibleBase is just a stub; we don't cache the caret yet.
However, this needs to be in HyperTextAccessibleBase because it is used by ConvertMagicOffset, which will be moved in an upcoming patch.

Differential Revision: https://phabricator.services.mozilla.com/D127209
2021-10-07 04:22:45 +00:00
James Teh adae2323e9 Bug 1730088 part 3: Move CharacterCount to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127208
2021-10-07 04:22:44 +00:00
James Teh 68d5471fbc Bug 1730088 part 2: HyperTextAccessibleBase: Add methods for child index/text offset conversion. r=eeejay
Although HyperTextAccessibleBase implements these, we leave the HyperTextAccessible implementations (overriding the base) because they do caching.
Depending on performance, we may eventually want to move the caching into the base implementation.
I decided not to do this initially because it will use extra memory in the parent process and it may be a premature optimisation.

Differential Revision: https://phabricator.services.mozilla.com/D127207
2021-10-07 04:22:44 +00:00
James Teh f46a0aaf44 Bug 1730088 part 1: Add hyperTextAccessibleBase class. r=eeejay
This will contain methods that can be used for both local and remote Accessibles.
It is inherited into both HyperTextAccessible (local) and RemoteAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D127206
2021-10-07 04:22:43 +00:00
Cristian Tuns 9ff6a2ca7d Backed out 11 changesets (bug 1730088) for causing build bustages on DocAccessibleWrap.cpp. CLOSED TREE
Backed out changeset f2ccbd5e0640 (bug 1730088)
Backed out changeset 4138ff98e3c6 (bug 1730088)
Backed out changeset 18f24e8c925c (bug 1730088)
Backed out changeset 0f6d7bf87aeb (bug 1730088)
Backed out changeset b91cb9d7de75 (bug 1730088)
Backed out changeset 3d5b2d949109 (bug 1730088)
Backed out changeset 1910e46ed82c (bug 1730088)
Backed out changeset be69e17a817a (bug 1730088)
Backed out changeset b96051622689 (bug 1730088)
Backed out changeset 89f855907787 (bug 1730088)
Backed out changeset 52c6c1d60659 (bug 1730088)
2021-10-06 08:33:43 -04:00
James Teh 65616347a8 Bug 1730088 part 11: Move IsValidOffset/Range to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127216
2021-10-06 10:13:12 +00:00
James Teh 75adfa3d1a Bug 1730088 part 10: Move TextAtOffset's TextLeafPoint implementation to HyperTextAccessibleBase. r=eeejay
The TextLeafPoint implementation works for both local and remote.
HyperTextAccessible calls the base implementation for supported boundaries when the cache is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D127215
2021-10-06 10:13:11 +00:00
James Teh 5ea7d17606 Bug 1730088 part 9: Add HyperTextAccessibleBase::TransformOffset. r=eeejay
This is pretty similar to HyperTextAccessible::TransformOffset.
However, the local implementation has to compensate for list bullet errors propagating from FindOffset/PeekOffset, which isn't relevant for TextLeafPoint.
Therefore, we leave the HyperTextAccessible implementation alone so it will still be used by HyperTextAccessible code (FindOffset, etc.).

Differential Revision: https://phabricator.services.mozilla.com/D127214
2021-10-06 10:13:11 +00:00
James Teh 6d4a7b6804 Bug 1730088 part 8: Move ToTextLeafPoint to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127213
2021-10-06 10:13:11 +00:00
James Teh 0300ea1e93 Bug 1730088 part 7: Move CharAt to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127212
2021-10-06 10:13:10 +00:00
James Teh b1c9ba78d4 Bug 1730088 part 6: Move TextSubstring to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127211
2021-10-06 10:13:10 +00:00
James Teh c766150f7a Bug 1730088 part 5: Move ConvertMagicOffset to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127210
2021-10-06 10:13:10 +00:00
James Teh 80e6298b78 Bug 1730088 part 4: Move CaretOffset to HyperTextAccessibleBase. r=eeejay
The implementation for RemoteAccessibleBase is just a stub; we don't cache the caret yet.
However, this needs to be in HyperTextAccessibleBase because it is used by ConvertMagicOffset, which will be moved in an upcoming patch.

Differential Revision: https://phabricator.services.mozilla.com/D127209
2021-10-06 10:13:09 +00:00
James Teh 39aa66590c Bug 1730088 part 3: Move CharacterCount to HyperTextAccessibleBase. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127208
2021-10-06 10:13:09 +00:00
James Teh 7511a00c4f Bug 1730088 part 2: HyperTextAccessibleBase: Add methods for child index/text offset conversion. r=eeejay
Although HyperTextAccessibleBase implements these, we leave the HyperTextAccessible implementations (overriding the base) because they do caching.
Depending on performance, we may eventually want to move the caching into the base implementation.
I decided not to do this initially because it will use extra memory in the parent process and it may be a premature optimisation.

Differential Revision: https://phabricator.services.mozilla.com/D127207
2021-10-06 10:13:08 +00:00
James Teh 0b986179c4 Bug 1730088 part 1: Add hyperTextAccessibleBase class. r=eeejay
This will contain methods that can be used for both local and remote Accessibles.
It is inherited into both HyperTextAccessible (local) and RemoteAccessibleBase.

Differential Revision: https://phabricator.services.mozilla.com/D127206
2021-10-06 10:13:08 +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 3b8873fe57 Bug 1730093 part 2: Move AppendTextTo to Accessible and implement it for RemoteAccessible. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D127203
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 16a6a4e7b0 Bug 1732154: Add ParentRelativeBounds method for HTMLImageMapAccessible r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126386
2021-10-05 20:44:46 +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
Gijs Kruitbosch cd8c2be09f Bug 1724319 - fix accessibility test relying on the download modal opening to work with download improvements pref flipped, r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127487
2021-10-05 09:04:26 +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 2162cc6e2d Bug 1732154: Add ParentRelativeBounds method for HTMLImageMapAccessible r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126386
2021-10-04 19:46:55 +00: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 41ca3eadd8 Bug 1733223 - Fire READONLY state change when input gets readonly attribute. r=morgan
This patch also adds tests for other READONLY/EDITABLE state changes
that already work.

Differential Revision: https://phabricator.services.mozilla.com/D127165
2021-10-04 16:47:34 +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 9fed8c38f9 Bug 1733228 - Fire DEFAULT state change when control loses or gains default state. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D127177
2021-10-04 15:56:38 +00:00
Daniel Holbert ed93bd5007 Bug 1733465 part 2: Modernize nsViewManager::GetRootWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel
This patch shouldn't change behavior at all.

This patch replaces a manual NS_ADDREF call with typesafe code that manages the
reference count for us.  This reduces repeated boilerplate code, in the
implementation as well as the callsites.

Differential Revision: https://phabricator.services.mozilla.com/D127179
2021-10-01 20:38:09 +00:00
Sandor Molnar 325902a5b7 Backed out 5 changesets (bug 1733465) for causing android build bustages in android/SessionAccessibility.cpp. CLOSED TREE
Backed out changeset 4c5b28b66740 (bug 1733465)
Backed out changeset 3db0452b185c (bug 1733465)
Backed out changeset d7460c9c6acb (bug 1733465)
Backed out changeset 3cee3f595e45 (bug 1733465)
Backed out changeset 267d5fc92f12 (bug 1733465)
2021-10-01 19:13:59 +03:00
Daniel Holbert 54c1df0de9 Bug 1733465 part 3: Make nsPresContext::GetRootWidget() return an already_AddRefed pointer instead of a raw pointer. r=tnikkel
Also, make the same change to nsPresContext::GetTextInputHandlingWidget and
TextComposition::GetWidget, which are essentially aliases/wrappers for this
function.

This patch shouldn't change behavior at all, aside from:
* optimizing away some redundant reference counting and widget-lookups
* delaying some nsIWidget::Release() calls, which will now happen after we're
  actually done using the object, instead of happening when the getter
  completes. (It's unlikely this impacts behavior, because there are other
  objects that are keeping the nsIWidget instance alive.)

Motivation / "wins" from this patch:
* nsPresContext::GetRootWidget already works with a refcounted pointer
  internally. Before this patch, it drops the reference before returning the
  pointer.  This is a bit suspect and would cause security issues, in the
  unlikely event that this were the last strong reference to the object.  It
  can just as easily/efficiently transfer the strong reference to the caller,
  and let the caller determine when to release it.
* Many of the callers were already storing the return value in nsCOMPtr, which
  meant that they were incurring an additional AddRef/Release when
  populating/destructing that smart pointer. Now they can just take ownership
  of the already_AddRefed return value and avoid redundnat refcount-churn.
* For the callers that weren't storing the return value in nsCOMPtr, some of
  them were calling this getter twice in a row (once to test for truthiness and
  once to use the known-truthy value).  This was wasteful, both from the
  repeated lookup-work (since the function isn't a trivial getter), and from
  repeated refcount-churn.  This patch collapses these repeat-calls to a single
  call, avoiding those inefficiencies.

Differential Revision: https://phabricator.services.mozilla.com/D127180
2021-10-01 14:37:06 +00:00
Daniel Holbert 5b203843bc Bug 1733465 part 2: Modernize nsViewManager::GetWidget() to use already_AddRefed return value, instead of requiring getter_AddRefs at callsite. r=tnikkel
This patch shouldn't change behavior at all.

This patch replaces a manual NS_ADDREF call with typesafe code that manages the
reference count for us.  This reduces repeated boilerplate code, in the
implementation as well as the callsites.

Differential Revision: https://phabricator.services.mozilla.com/D127179
2021-10-01 14:37:05 +00:00
Eitan Isaacson 7c2a7c9949 Bug 1733437 - Don't use non-existant bullet images in xul test. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D127146
2021-09-30 22:25:41 +00:00
James Teh 0240b39c82 Bug 1732592: Create in-tree accessibility documentation and add Document Accessibility Lifecycle as our first page. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126855
2021-09-30 21:52:54 +00:00
Eitan Isaacson da1f9f11d1 Bug 1733457 - Remove unused LocalAccessible::MaybeFireFocusableStateChange. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D127156
2021-09-30 20:00:06 +00:00
James Teh e85d14a8ef Bug 1730175: Set aria-valuetext to "" on numeric datetime fields when the input is cleared. r=emilio,eeejay
Before this patch, we didn't set aria-valuetext when the value was initially empty, nor did we clear it after a value was set and subsequently cleared.
This resulted in incorrect numeric values being reported to users.
Now, we set aria-valuetext to "" in either of these cases.

Differential Revision: https://phabricator.services.mozilla.com/D125366
2021-09-29 06:30:06 +00:00
Sandor Molnar 9b742bfa2d Backed out changeset c8bcdcdc5fd7 (bug 1730175) for causing mochitest failures in test_datetime. CLOSED TREE 2021-09-29 06:37:56 +03:00
James Teh e414139808 Bug 1730175: Set aria-valuetext to "" on numeric datetime fields when the input is cleared. r=emilio,eeejay
Before this patch, we didn't set aria-valuetext when the value was initially empty, nor did we clear it after a value was set and subsequently cleared.
This resulted in incorrect numeric values being reported to users.
Now, we set aria-valuetext to "" in either of these cases.

Differential Revision: https://phabricator.services.mozilla.com/D125366
2021-09-29 02:48:15 +00:00
Eitan Isaacson de9be32795 Bug 1732944 - Return early if recieving cache on a shutdown document. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D126839
2021-09-28 22:02:47 +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
James Teh 4305e646e2 Bug 1638880: Fire EVENT_DOCUMENT_LOAD_COMPLETE when PresShell is created after DOM loading completes. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D126622
2021-09-27 15:26:03 +00:00
James Teh 4f65e90ec4 Bug 1729531: Re-enable accessible/tests/browser/fission/browser_nested_iframe.js on Apple silicon. r=bhearsum
This passes for me on try.
We do have some low frequency intermittent failures for this test, but they apply to all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D126428
2021-09-27 11:40:45 +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 ac10d619ce Bug 1729407 part 6: Fix an existing line boundary test. r=eeejay
Previously, the test asserted that the line offsets for an embedded object should be an empty range.
This is actually incorrect, since there is content on the line (an empty text box and a button).
Update this with the correct result, but mark it as an expected failure.
The new implementation fixes this, so once we enable it by default, we can assert success.

Differential Revision: https://phabricator.services.mozilla.com/D125670
2021-09-23 11:38:11 +00:00
James Teh 178fe814d8 Bug 1729407 part 5: Use TextLeafRange for word/line starts in HyperTextAccessible::TextAtOffset if the cache is enabled. r=eeejay
We won't use HyperTextAccessible for building the cache.
However, we have a lot of existing single process mochitests for HyperTextAccessible.
Putting it behind this pref makes it easy for us to run those tests against this new text implementation.
Eventually, we want to use this implementation for both local and remote Accessibles.

Differential Revision: https://phabricator.services.mozilla.com/D124778
2021-09-23 11:38: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
James Teh 3f364558d3 Bug 1731003: RemoteAccessible: Don't try to use the COM proxy at all if the cache is enabled, even if mCachedFields is null. r=eeejay
If the cache is enabled, we don't have COM proxies from the content process.

Differential Revision: https://phabricator.services.mozilla.com/D125786
2021-09-20 23:00:08 +00:00
Morgan Reschenberg b45f079410 Bug 1730949: Send initial cache update for doc accessibles if accessibility.cache.enabled r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D125743
2021-09-17 22:08:17 +00:00
Morgan Reschenberg c7aea51785 Bug 1593273: Default browser.display.use_system_colors to true on windows, false elsewhere r=emilio,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D125268
2021-09-17 16:45:12 +00:00
Olli Pettay 79f14a7580 Bug 1730836, wallpaper the old issue where code expects GetDocShell to return non-null, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D125669
2021-09-16 12:29:59 +00:00
Butkovits Atila 42611d5b3f Backed out changeset f2f9361b8e5e (bug 1593273) for causing failures at test_default_background.xhtml. 2021-09-16 02:46:17 +03:00
Morgan Reschenberg ceca77b740 Bug 1593273: Default browser.display.use_system_colors to true on windows, false elsewhere r=emilio,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D125268
2021-09-15 22:27:27 +00:00
James Teh a1b5690620 Bug 1468128: Use an extra bit for the content process portion of MSAA unique ids. r=aklotz
This allows us to support 255 content processes instead of 127.
It also means we have 1 less bit for the Accessible portion of the id, which means we can support less Accessibles per process.
Hopefully, this shouldn't be a problem, especially with Fission generally meaning less documents per process.

Differential Revision: https://phabricator.services.mozilla.com/D104344
2021-09-15 02:21:11 +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
Niklas Baumgardner 42f48852ca Bug 1534799 - Convert &searchTextBox.clear.label; to fluent. r=emalysz,fluent-reviewers,flod,dao,morgan
Differential Revision: https://phabricator.services.mozilla.com/D123640
2021-09-10 14:52:55 +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
Csoregi Natalia 7b751b9325 Backed out changeset f42e32addd89 (bug 1534799) for causing failures on test_txtctrl.xhtml. CLOSED TREE 2021-09-08 18:48:58 +03:00
Niklas Baumgardner 4b352f588f Bug 1534799 - Convert &searchTextBox.clear.label; to fluent. r=emalysz,fluent-reviewers,flod,dao,morgan
Differential Revision: https://phabricator.services.mozilla.com/D123640
2021-09-08 14:56:59 +00:00
Eitan Isaacson a6a943d0ea Bug 1729058 - Enable cache initialization in update pushes. r=morgan
There can be a scenario where an initial cache is pushed to an accessible via an update and not an "initial" push that a doc load or a subtree show would give.

For example, an accessible might not have a name, description, or numeric value (that is all we currently cache), but then get a name later in its lifetime. If that is the case the accessible will get a cache AccAttributes with a DeleteEntry value for "description" since its description is still empty. That entry should not be stored in the cache.

Differential Revision: https://phabricator.services.mozilla.com/D124484
2021-09-03 18:56:24 +00:00
Eitan Isaacson babc6af3e3 Bug 1728940 - Reverse reverted null check in ATK value functions. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D124480
2021-09-03 18:02:37 +00:00
Eitan Isaacson cf78c1b158 Bug 1728442 - P5: Use unified description method in xpcom and platforms. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124237
2021-09-02 18:06:53 +00:00
Eitan Isaacson 513a9ecbf8 Bug 1728442 - P4: Use cached description in parent. r=Jamie
Also unify local/remote Description with an abstract definition in
Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D124236
2021-09-02 18:06:52 +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 338d221423 Bug 1728442 - P2: Make LocalAccessible:Description const. r=Jamie
This makes it consistent with the remote Description method and will
allow us to merge them in Accessible.

Differential Revision: https://phabricator.services.mozilla.com/D124234
2021-09-02 18:06:51 +00:00
Eitan Isaacson 73f172d0c6 Bug 1728442 - P1: Make browser description test rely on name/desc change events. r=Jamie
By using a real image, and not a broken one, we avoid the recreation
that happens when the image gains and loses an alt. We can then rely on
name/description changes.

This is a more accurate test that doesn't rely on tree mutations.

Differential Revision: https://phabricator.services.mozilla.com/D124233
2021-09-02 18:06:51 +00:00
Eitan Isaacson 675b299c9e Bug 1728624 - Null-check internal object in ATK value functions. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D124366
2021-09-02 16:50:41 +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
Morgan Reschenberg 1e1c536fcd Bug 1728383: Fix test logging for getBounds r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D124096
2021-08-31 18:41:01 +00:00
Edgar Chen 262f7ec893 Bug 1728081 - Part 4: Make HTMLFormElement::GetDefaultSubmitElement return nsGenericHTMLFormElement; r=smaug
so that the callers don't need to queryInterface it back to nsIContent.

Differential Revision: https://phabricator.services.mozilla.com/D123952
2021-08-30 18:44:51 +00:00
Edgar Chen bae585f79e Bug 1728081 - Part 3: Merge nsIForm into HTMLFormElement; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D123951
2021-08-30 18:44:51 +00:00
Eitan Isaacson 251ad4f476 Bug 1727643 - P4: Make use of new common methods in platforms and XPCOM. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123698
2021-08-26 19:40:06 +00:00
Eitan Isaacson 2c5a1217db Bug 1727643 - P3: Make numeric value methods abstract in Accessible and wire it thru. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123697
2021-08-26 19:40:05 +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 a926de70ee Bug 1727640 - Push name change cache updates on windows. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D123688
2021-08-26 18:45:58 +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
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00