Commit Graph

9521 Commits

Author SHA1 Message Date
Eitan Isaacson
f4fa8d02b2 Bug 1747164 - Make HTMLDateTimeAccessible inherit from HyperTextAccessibleWrap. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D134757
2022-01-05 22:30:52 +00:00
Eitan Isaacson
654a0be767 Bug 1737944 - P12: Add better todo support to attribute tests, and todo failing cache tests. r=Jamie
Changed how our attributes tests work a bit to be single "is" test
instead of comparing each attribute separately. This allows passing a
todo option without it failing on attributes that are identical.

Differential Revision: https://phabricator.services.mozilla.com/D134974
2022-01-04 21:01:39 +00:00
Eitan Isaacson
965646877d Bug 1737944 - P11: When cache is enabled, calculate group info remotely and add it to attributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134214
2022-01-04 21:01:38 +00:00
Eitan Isaacson
7a6180f627 Bug 1737944 - P10: Store AccGroupInfo in remote accessible cache. r=Jamie
Now that an AccGroupInfo can be constructed with an Accessible, we can
support its getter in remote accessibles.

Differential Revision: https://phabricator.services.mozilla.com/D134213
2022-01-04 21:01:38 +00:00
Eitan Isaacson
f8f5a14d7a Bug 1737944 - P9: Make AccGroupInfo use Accessible. r=Jamie
Now that GroupPosition and GetGroupInfo are in Accessible, we can make
AccGroupInfo use the Accessible base class.

With one exception: Tables are still local only. That should be
addressed in bug 1735970.

Differential Revision: https://phabricator.services.mozilla.com/D134212
2022-01-04 21:01:38 +00:00
Eitan Isaacson
b7dd36fd8a Bug 1737944 - P8: Move GetGroupPosition to Accessible. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D134211
2022-01-04 21:01:37 +00:00
Eitan Isaacson
af27cd475b Bug 1737944 - P7: Move and rename GetPositionAndSizeInternal to Accessible. r=Jamie
Now that the AccGroupInfo getter is in Accessible, the position and size
getter could go there too.

Differential Revision: https://phabricator.services.mozilla.com/D134210
2022-01-04 21:01:37 +00:00
Eitan Isaacson
d06ad7cd3c Bug 1737944 - P6: Put AccGroupInfo getter/creator in Accessible. r=Jamie
Changed the methods a bit, instead of a HasDirty boolean method, I went
with a getter and a get-and-creator. This will lend better to remote
accessibles where we won't have a dirty flag.

Differential Revision: https://phabricator.services.mozilla.com/D134209
2022-01-04 21:01:36 +00:00
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