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

9495 Коммитов

Автор SHA1 Сообщение Дата
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