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

9886 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez adc65b1456 Bug 1773070 - Rename/remove some eventState/s variables. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148558
2022-06-07 23:09:54 +00:00
Emilio Cobos Álvarez 12bd84f0c5 Bug 1773070 - While at it rename ContentStateChanged to ElementStateChanged, and make it take elements. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148553
2022-06-07 23:09:54 +00:00
Emilio Cobos Álvarez 255763ef57 Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
Add a dom/base/rust crate called just "dom" where we can share these.

Most of the changes are automatic:

  s/mozilla::EventStates/mozilla::dom::ElementState/
  s/EventStates/ElementState/
  s/NS_EVENT_STATE_/ElementState::/
  s/NS_DOCUMENT_STATE_/DocumentState::/

And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.

Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Eitan Isaacson 1032053809 Bug 1772026 - Wait for initialized PresShell (unless about:blank) before doc DoInitialUpdate. r=Jamie
This prevents a case where a blank page that never has an
initialized PresShell keeps the refresh observer.

Differential Revision: https://phabricator.services.mozilla.com/D148146
2022-06-07 18:08:26 +00:00
Sylvestre Ledru 42f6811d95 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,media-playback-reviewers,necko-reviewers,padenot,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D148375
2022-06-07 12:32:55 +00:00
James Teh 0c1571c44a Bug 1771934: Acquire the Android a11y lock in some additional places. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D147854
2022-06-07 06:14:45 +00:00
James Teh 6e2fd8c6e0 Bug 1771931 part 4: Clarify some code regarding CachedTableAccessible creation and cleanup. r=morgan
First, move the cached table cleanup code out of LocalAccessible::UnbindFromParent and into Shutdown.
This makes no practical difference - it gets called either way when the document shuts down - but it's a bit clearer what's happening this way.

Second, add an assertion to CachedTableAccessible::GetFrom to ensure it is only ever given a table.
I don't think it would ever be given anything else, but this makes that clearer.

Differential Revision: https://phabricator.services.mozilla.com/D148089
2022-06-04 02:22:47 +00:00
James Teh 9135f9822a Bug 1771931 part 3: Pre-allocate row/col arrays in CachedTableAccessible. r=morgan
Rather than allocating elements one by one, bulk allocate as many as we know for sure we'll need.

Differential Revision: https://phabricator.services.mozilla.com/D148088
2022-06-04 02:22:47 +00:00
James Teh 89f61f81ed Bug 1771931 part 2: Gracefully handle row/colspan 0 for CachedTableAccessible. r=morgan
We're seeing crashes in the wild where we're trying to allocate a very large number of array elements.
This suggests that the column index is underflowing.
The only way I can think of that this could happen is if colspan is 0 on the first cell, in which case we'd do 0 + 0 - 1 and underflow.
That shouldn't be possible - layout shouldn't ever give us a row/colspanof 0 - but perhaps it's happening anyway.
If this happens, we'll now gracefully treat it as a span of 1.
I also added an assertion in case this helps us to track this down properly in future.

Differential Revision: https://phabricator.services.mozilla.com/D148087
2022-06-04 02:22:46 +00:00
James Teh d95ab86a63 Bug 1771931 part 1: Clean up CachedTableAccessibles when a DocAccessibleParent is destroyed. r=morgan
When a DocAccessibleParent is destroyed, we don't call Shutdown on its RemoteAccessibles to avoid pointless cleanup overhead.
Previously, this meant we weren't cleaning up associated CachedTableAccessibles.
We now explicitly clean these up in DocAccessibleParent::Destroy.

Differential Revision: https://phabricator.services.mozilla.com/D148086
2022-06-04 02:22:46 +00:00
James Teh 9d9377be5e Bug 1699339: Fire name/description change event when text in a hidden aria-labelledby/describedby subtree changes. r=eeejay,morgan
We already handled this for visible aria-labelledby/describedby subtrees based on a11y events.
However, when a subtree is hidden (whether via CSS or aria-hidden), it is completely removed from the a11y tree, so we can't use a11y events.
Instead, when a node is added to the DOM, we walk its ancestors looking for an aria-labelledby/describedby target.
We stop if the node or an ancestor has an Accessible, since that means it will be handled elsewhere.
This also limits the number of ancestors we walk for each inserted node, thus decreasing the performance impact of this change.
This doesn't catch all possible mutations in a hidden subtree (e.g. removals or direct text node changes), but this at least fixes a case in Gmail.
Given performance risks, I think it makes sense to address specific cases as they arise.

Differential Revision: https://phabricator.services.mozilla.com/D147559
2022-06-04 02:20:54 +00:00
Jonathan Kew f117f58e47 Bug 1771609 - patch 3 - Remove nsAutoLineIterator, as it no longer serves any useful purpose since the iterator is owned by the target frame. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D147579
2022-06-03 22:05:36 +00:00
Eitan Isaacson 9a0fb5f823 Bug 1772032 - Use DOM document node for getting SessionAcc instance. r=Jamie
Remove assert for doc to be last accessible to be removed because
in a doc shutdown scenario it will be the first to be removed.

Differential Revision: https://phabricator.services.mozilla.com/D148045
2022-06-02 22:10:04 +00:00
Norisz Fay 6cb54103b1 Backed out changeset 516dad1c0595 (bug 1772032) for causing geckoview-junit failures CLOSED TREE 2022-06-02 22:43:15 +03:00
Eitan Isaacson c6fb2fffb7 Bug 1772032 - Use DOM document node for getting SessionAcc instance. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D148045
2022-06-02 19:01:14 +00:00
James Teh 52b0b92e8d Bug 1766546: Implement SetCaretOffset for cached Windows RemoteAccessible. r=morgan
We implement setting of the caret using HyperText rather than TextLeafPoint because caret stuff, including events, still uses HyperText internally for now.

This moves the async IPDL method already used on non-Windows into the base classes so Windows can use it.
We keep the COM implementation for Windows RemoteAccessible without the cache.
SetCaretOffset was moved into HyperTextAccessibleBase and platform methods were updated accordingly.
Finally, I did some drive-by cleanup (no user impact) and changed GetCaretOffset in ATK and XPCOM to use HyperTextAccessibleBase.
GetCaretOffset was moved to the base some time ago, but ATK and XPCOM weren't updated at the time.

Differential Revision: https://phabricator.services.mozilla.com/D147852
2022-06-01 19:34:09 +00:00
James Teh 5f868bebc7 Bug 1771736 part 2: Only push a cache update for text if the text actually changes. r=morgan
Layout sends a11y text update notifications during reflow even if the text hasn't changed.
TextUpdater already detects this case, so just move our cache update calls to TextUpdater.

Differential Revision: https://phabricator.services.mozilla.com/D147656
2022-06-01 00:35:26 +00:00
James Teh 1fcd045e66 Bug 1771736 part 1: Update cached spelling errors when a spelling error is removed. r=morgan,smaug
I originally thought we didn't need to be explicitly notified about removals because a correction always triggers a text change and we push a cache update for spelling errors whenever the text changes.
However, it seems that even when a correction is made and the text changes, the spell check ranges aren't yet up to date.
Previously, we were pushing a cache update whenever text was reflowed, which was taking care of this.
Soon, we don't want to push text cache updates if the text doesn't actually change.
We remove the reliance on these redundant text updates by having an explicit notification for spell check removals.

Differential Revision: https://phabricator.services.mozilla.com/D147655
2022-06-01 00:35:26 +00:00
James Teh 8cda799e04 Bug 1756728 part 3: Remove now unused PDocAccessible::URL. r=morgan,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D147718
2022-06-01 00:34:18 +00:00
James Teh 196146ecb6 Bug 1756728 part 2: Support retrieving the URL for cached remote documents. r=morgan
The BrowsingContext already has this information, so we use that instead of redundantly caching it in RemoteAccessible.
This implementation works even when the a11y cache is disabled, so stop using the sync IPDL URL method.
We can't entirely unify the URL method because we don't have a base class for local/remote documents.
However, a method was added in nsAccUtils to unify this as much as possible.

Differential Revision: https://phabricator.services.mozilla.com/D147717
2022-06-01 00:34:17 +00:00
James Teh 4d3f66b120 Bug 1756728 part 1: Make it possible to retrieve a BrowsingContext from a DocAccessibleParent. r=morgan
Previously, even for remote in-process iframes, it was only possible to retrieve the top level BrowsingContext for the remote process by getting the managing BrowserParent.
This makes it possible to get the correct BrowsingContext even for in-process iframes.

Differential Revision: https://phabricator.services.mozilla.com/D147716
2022-06-01 00:34:17 +00:00
Eitan Isaacson 766f8978fc Bug 1772019 - Wait for PresShell to be initialized before doing WillRefresh tick. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D147812
2022-05-31 22:56:32 +00:00
Eitan Isaacson efc6b17146 Bug 1771271 - Check for mCachedFields for all remote accessibles in BoundsWithOffset. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D147791
2022-05-31 19:24:27 +00:00
serge-sans-paille d815003637 Bug 1771369 - Cleanup accessible/atk includes r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D147445
2022-05-31 10:06:54 +00:00
Emilio Cobos Álvarez 9c190fff4b Bug 1771564 - Constify ComputedStyle usage in nsComputedDOMStyle. r=dholbert
None of the consumer need to mutate styles, and this saves some ugly
const_casting on the next patch.

Doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D147555
2022-05-28 01:04:24 +00:00
James Teh 0dd4ed02ef Bug 1737919 part 5: Add tests for cached spelling errors. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D147245
2022-05-27 10:56:41 +00:00
James Teh 7564ed957c Bug 1737919 part 4: Update cached spelling errors when a spelling error is added without the text changing. r=morgan,smaug
We already have an nsISelectionListener, but that only tells us that a change happened somewhere in the selection, not which range changed.
We don't want to push a cache update for all ranges when only one changed.
Therefore, this patch adds an accessibility notification in mozInlineSpellChecker::AddRange.
We don't need this for removed ranges because the text will change for any spelling error corrections and text updates trigger spelling error cache updates.

Differential Revision: https://phabricator.services.mozilla.com/D147244
2022-05-27 10:56:41 +00:00
James Teh 3daa72eb49 Bug 1737919 part 3: Support spelling errors for cached RemoteAccessibles. r=morgan
Even though spelling errors can cross Accessibles and are represented in the DOM as ranges, we cache them for each text leaf.
This is necessary so that we correctly update the offsets when text is inserted or removed from a leaf.
We cache them as an array of offsets, including both the start and end offset for each range.
We use -1 as the start offset to indicate when a spelling error starts in a previous Accessible.
When a spelling error starts in an Accessible but ends in a subsequent one, we simply don't include an end offset in the array.
This structure means we can easily query spelling error points or ranges with a binary search.

Differential Revision: https://phabricator.services.mozilla.com/D147243
2022-05-27 10:56:41 +00:00
James Teh e02ce0a43e Bug 1737919 part 2: Support spelling errors in TextLeafPoint for LocalAccessibles. r=morgan
The implementation searches for spelling errors in each leaf, as this is how we will need to do it for RemoteAccessibles.

Differential Revision: https://phabricator.services.mozilla.com/D147242
2022-05-27 10:56:40 +00:00
James Teh efe397519e Bug 1737919 part 1: TextLeafPoint::FindTextAttrsStart: Don't allow the caller to supply origin attributes. r=morgan
This was done for LocalAccessibles to avoid the need to fetch attributes twice when we're simultaneously fetching boundaries and returning the attributes to a client.
However, GetTextAttributes will soon handle spelling errors, so it will no longer return the same data as GetTextAttributesLocalAcc (which doesn't handle spelling errors).
This breaks the equality checks in FindTextAttrsStart.
Aside from this, this argument was somewhat confusing.

For now, just remove aOriginAttrs, which means there will be some redundant calls to GetTextAttributesLocalAcc.
Parent process documents shouldn't be that large anyway.
If this ends up being a real problem, we can either revert to the local HyperTextAccessible implementation of text attributes or implement a smarter temporary cache.

Differential Revision: https://phabricator.services.mozilla.com/D147241
2022-05-27 10:56:40 +00:00
James Teh 732a2400fe Bug 1771259: Fix crash when calling TextLeafPoint::CharBounds on the insertion point at the end of a text box. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D147397
2022-05-27 03:00:34 +00:00
James Teh 447e69d94a Bug 1769166: Update the cache when text bounds change. r=morgan
We detect this in the same way that we detect whether we need to push line starts; i.e. a text update or a bounds change.
Since this is tied to the Text and Bounds domains, I removed the separate TextBounds domain.

Differential Revision: https://phabricator.services.mozilla.com/D147396
2022-05-27 03:00:34 +00:00
James Teh 0ea37698e8 Bug 1771060: Make use of the line cursor in IsLocalAccAtLineStart to improve performance. r=jfkthame
For block frames, nsLineIterator doesn't use the line cursor, so switch to nsBlockInFlowLineIterator.
We don't actually care about the line number here anyway.

Differential Revision: https://phabricator.services.mozilla.com/D147237
2022-05-27 01:22:07 +00:00
James Teh a5eb156496 Bug 1770162: Fix MsaaIdGenerator timer assertion during shutdown. r=morgan
There can be LocalAccessibles which don't die until the final cycle collection during XPCOM shutdown.
MsaaIdGenerator::ReleaseID (called during deletion of a LocalAccessible) uses a timer when the cache is enabled, but timers can't be used after XPCOM shutdown.
This was causing an assertion.
In addition, because MsaaIdGenerator is a static instance, the timer could be deleted after XPCOM shutdown, causing a warning.
To fix this:

1. If accessibility is shut down, just release ids immediately.
2. Clean up any remaining ids and the timer on XPCOM shutdown.

A better solution would be to create and terminate MsaaIdGenerator during a11y startup and shutdown, but this is a bit tricky while we still have the non-cache code paths.
Once we don't need the non-cache code, MsaaIdGenerator will become a lot simpler, so this refactor will be easier then.

Differential Revision: https://phabricator.services.mozilla.com/D146866
2022-05-23 22:05:52 +00:00
Morgan Rae Reschenberg c3d3119342 Bug 1768054: Traverse embedded chars when computing text bounds. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D145908
2022-05-23 21:43:12 +00:00
Florian Quèze cd5e71dee5 Bug 1745024 - avoid keeping an 'Accessibility notifications' refresh observer for initial about:blank documents, r=Jamie.
Differential Revision: https://phabricator.services.mozilla.com/D143747
2022-05-21 00:23:09 +00:00
Eitan Isaacson c42dbc8b0f Bug 1769640 - P1: Cache content AUPDP in DocAccessibleParents. r=morgan,emilio
This change allows us to remove the `FullZoom` multiplier and fixes text
bounds caclulations in a zoomed page.

Testing: The current browser scroll/bounds tests pass (with the
exception of fission iframes which were already broken).

Differential Revision: https://phabricator.services.mozilla.com/D146507
2022-05-20 16:39:50 +00:00
Mark Banner 7c198e01fd Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-18 08:13:19 +00:00
Andrew McCreight c8c5c819df Bug 1514936, part 1 - Remove the outer argument to nsIFactory::createInstance. r=xpcom-reviewers,preferences-reviewers,nika,Gijs
This patch won't actually build, because a few bits of code are used
for both nsIFactory::createInstance and static components, and static
components are not fixed until the next patch.

The first place is nsLoadGroupConstructor, which uses an nsIFactory
macro to create a static component constructor. (This could be worked
around by expanding the macro to the state before this patch.)

The other issue is that nsAppShellConstructor is used in an nsIFactory
on OSX, but as a static component on all other platforms. This could
be worked around by wrapping nsAppShellConstructor in an adaptor that
passes in the extra null argument to nsAppShellConstructor.

Differential Revision: https://phabricator.services.mozilla.com/D146456
2022-05-17 20:24:19 +00:00
Sebastian Hengst c552340e0c Backed out 5 changesets (bug 1769569) for causing devtools' browser/browser_page_redirection.js to fail. CLOSED TREE
Backed out changeset 66a42eb3a366 (bug 1769569)
Backed out changeset d3cc9629cd9a (bug 1769569)
Backed out changeset edcd3dade079 (bug 1769569)
Backed out changeset 29d8dd058b7a (bug 1769569)
Backed out changeset 1aed34fdf2d3 (bug 1769569)
2022-05-17 19:49:17 +02:00
Mark Banner 5865f044db Bug 1769569 - Fix remaining ESLint no-undef and no-unused-vars issues in sjs files. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D146452
2022-05-17 16:50:33 +00:00
James Teh 592446771c Bug 1768219: Don't walk ancestors on all Accessibles to find an action when serialising the IPC tree. r=eeejay
This was causing a performance regression.
We now only do this for text leaf and image Accessibles, which gets us back to where we were before bug 1395181.
This means we can't support "click ancestor" on ATK.
There weren't requests for this on ATK anyway.
In future, we can probably support this using the information in the cache.

Differential Revision: https://phabricator.services.mozilla.com/D146528
2022-05-17 06:31:45 +00:00
Nika Layzell 2b307c5cea Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-13 14:16:09 +00:00
Eitan Isaacson dbd21dbf8b Bug 1768927 - Preload localized role strings and heading levels at init. r=Jamie
We can't use the StringBundle object off the main thread. We need to
pre-load all the strings we may use. This is a small set of roles. We
also need formatted heading levels, so we preload heading level 1 to 6.

Differential Revision: https://phabricator.services.mozilla.com/D146112
2022-05-13 05:00:55 +00:00
Eitan Isaacson 85225ac3d9 Bug 1768972 - Introduce FireEvent to avoid android monitor lock reentry. r=Jamie
We rely on Recv events to be called from child processes and not from
other Recv events. If this happens we risk reentry in regards to the
android monitor lock. So this patch introduces FireEvent for internal
use where secondary events need to be fired like a reorder when a new
sub-document is added.

Differential Revision: https://phabricator.services.mozilla.com/D146134
2022-05-12 22:41:44 +00:00
Eitan Isaacson 4bec8d9205 Bug 1768913 - Don't send window content changed event when loaded about:blank. r=morgan
Testing note - this enables junit tests to start and pass more reliably
when caching is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D146106
2022-05-11 22:09:12 +00:00
Morgan Reschenberg 5e491aa675 Bug 1763212: Add tests for vertical text caching r=Jamie
Depends on D143527

Differential Revision: https://phabricator.services.mozilla.com/D144893
2022-05-11 20:47:36 +00:00
Noemi Erli 45276205df Backed out 22 changesets (bug 1696894, bug 1759569, bug 1754031, bug 1759563, bug 1759572, bug 1754004) for causing leack failures CLOSED TREE
Backed out changeset 673ecd5337e1 (bug 1754004)
Backed out changeset ecbf5f3c51de (bug 1754004)
Backed out changeset fc6c39f56d21 (bug 1754004)
Backed out changeset 5b3d58fbaf9d (bug 1696894)
Backed out changeset 2e56c89cf55d (bug 1754004)
Backed out changeset b7723490f025 (bug 1754004)
Backed out changeset 1dfbf61ff5dd (bug 1754004)
Backed out changeset e73abb071bb3 (bug 1754004)
Backed out changeset f9abe4fbf501 (bug 1754004)
Backed out changeset ee7aeb631cd9 (bug 1754004)
Backed out changeset d66aacfcf983 (bug 1754004)
Backed out changeset 5c2872ad6912 (bug 1754004)
Backed out changeset e1ae48f30d2c (bug 1754004)
Backed out changeset 849b63707d7f (bug 1754004)
Backed out changeset 36563e3b1e04 (bug 1754004)
Backed out changeset ccb4be659107 (bug 1754004)
Backed out changeset 659581d4159b (bug 1754004)
Backed out changeset 611ea76d7a9c (bug 1754004)
Backed out changeset 9b24b561698c (bug 1759572)
Backed out changeset f820e0f209ff (bug 1759563)
Backed out changeset 8d82066fa181 (bug 1759569)
Backed out changeset a2835afab1ad (bug 1754031)
2022-05-11 06:16:25 +03:00
Eitan Isaacson 7e7246091a Bug 1768726 - Make RemoteAccessibleBase::BoundsWithOffset thread safe for Android. r=morgan
In Android we need to keep the remote accessible methods thread safe. That means no direct references to local accessibles, or anything DOM or layout.

We have the advantage of always being remote except for a 0 offset browser element, and no support for full page zoom.

Also removed the visual/layout viewport offset in the bounds method since
the top level doc will always have its visual and layout viewport match.

Differential Revision: https://phabricator.services.mozilla.com/D146006
2022-05-10 22:57:32 +00:00
James Teh 780d656a9c Bug 1768391: Invalidate the remote HyperText offsets cache when we mutate the tree. r=eeejay
Previously, we invalidated this cache when the reorder event arrived.
Because the mutation and the reorder event happen in separate IPDL calls, it's possible for a client call to arrive between them.
If that client call queried HyperText offsets, this could result in returning incorrect information to the client or even a parent process crash.
Now, we invalidate the cache during the mutation, so there's no possibility of an intervening client call.
It made sense to put this invalidation call in RemoteAccessibleBase, so I also moved the call to invalidate for text leaf updates into RemoteAccessibleBase so that they're both in the same class.

Differential Revision: https://phabricator.services.mozilla.com/D145845
2022-05-10 22:56:57 +00:00
Nika Layzell 728ba534f6 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-10 22:27:42 +00:00
James Teh 3a25e381f9 Bug 1766270: Null check IPCDoc() in Android DocAccessibleWrap::CacheViewportCallback. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D145847
2022-05-10 22:19:53 +00:00
James Teh be0257f0e6 Bug 1767887: Fix TextLeafPoint paragraph boundary search for the second leaf Accessible and beyond after a block. r=morgan
The code checks whether the origin is inside the block, since if not, the block ends before the origin.
However, it previously didn't handle the case where there was a leaf outside the block between the block and the origin.
An additional check has now been added to handle this case.
This required the code to be restructured somewhat, which hopefully also makes it easier to read/debug.

Differential Revision: https://phabricator.services.mozilla.com/D145867
2022-05-09 23:41:02 +00:00
Morgan Reschenberg 4e6096c73d Bug 1735101: Cache char, line coordinate info to support computing TextBounds and CharBounds in the parent process r=Jamie
Depends on D144767

Differential Revision: https://phabricator.services.mozilla.com/D143527
2022-05-09 20:30:27 +00:00
James Teh 7d2201e688 Bug 1192108: Fire focus events after mutation events but before any other events. r=eeejay
It's critical that we fire mutation events first because our RemoteAccessible tree is created thus and we can't fire events on RemoteAccessibles we haven't created yet.
Beyond that, though, focus events are of primary importance.
See the comments in EventQueue::ProcessEventQueue for the reasons.

Differential Revision: https://phabricator.services.mozilla.com/D145319
2022-05-06 23:59:43 +00:00
Cristian Tuns 3a72bf74a9 Backed out changeset a83bfbf2de62 (bug 1735101) for causing mochitest failures on browser_caching_text_bounds.js CLOSED TREE 2022-05-06 17:35:52 -04:00
Morgan Reschenberg f40daec464 Bug 1735101: Cache char, line coordinate info to support computing TextBounds and CharBounds in the parent process r=Jamie
Depends on D144767

Differential Revision: https://phabricator.services.mozilla.com/D143527
2022-05-06 20:10:59 +00:00
Noemi Erli 39469989c9 Backed out 22 changesets (bug 1759572, bug 1759563, bug 1754004, bug 1754031, bug 1759569, bug 1696894) for causing multiple failures CLOSED TREE
Backed out changeset d69647a725a1 (bug 1754004)
Backed out changeset 09fc506865d7 (bug 1754004)
Backed out changeset 648e3dd4b62f (bug 1754004)
Backed out changeset 3465158ee230 (bug 1696894)
Backed out changeset b08475bbfbd9 (bug 1754004)
Backed out changeset dfabce587a56 (bug 1754004)
Backed out changeset cebe8d5dda34 (bug 1754004)
Backed out changeset 55b4b0c9a504 (bug 1754004)
Backed out changeset e8649de9dd22 (bug 1754004)
Backed out changeset 0f480fc861c0 (bug 1754004)
Backed out changeset e515b7edd1c8 (bug 1754004)
Backed out changeset fe90db9158ac (bug 1754004)
Backed out changeset c6388d682d48 (bug 1754004)
Backed out changeset 2374420d9fed (bug 1754004)
Backed out changeset 44dfd76472aa (bug 1754004)
Backed out changeset 000fb99de0cf (bug 1754004)
Backed out changeset 0ca1856b5fc9 (bug 1754004)
Backed out changeset 10c3683b998b (bug 1754004)
Backed out changeset 4abc98ed6b99 (bug 1759572)
Backed out changeset cdd271a5af42 (bug 1759563)
Backed out changeset fadb6cc0d81c (bug 1759569)
Backed out changeset 44be9709a93e (bug 1754031)
2022-05-06 04:28:47 +03:00
Nika Layzell 0308ac11a4 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-05 23:34:21 +00:00
James Teh 65c8359c0d Bug 1766794: Lazily cache HyperText offsets for RemoteAccessibles. r=eeejay
We already had a similar cache in local HyperTextAccessible.
This improves performance significantly when walking the text attributes of a container with a large number of text leaf children, such as is encountered when using view source.
This patch unifies that cache across local and remote.
For simplicity, the cache invalidation strategy is more naive/aggressive.

Differential Revision: https://phabricator.services.mozilla.com/D145079
2022-05-05 11:14:12 +00:00
Sebastian Hengst 400d67b480 Merge autoland to mozilla-central. a=merge 2022-05-05 11:38:28 +02:00
Sebastian Hengst 7ddbeea9d6 Backed out 17 changesets (bug 1696894, bug 1754004) for causing crashes e.g. bug 1767808, and hanging Gmail (bug 1767918). a=backout DONTBUILD
Backed out changeset 63f17a06eba9 (bug 1754004)
Backed out changeset 017e1552d549 (bug 1754004)
Backed out changeset 010dfd821cf3 (bug 1696894)
Backed out changeset 96a39c2ba7a3 (bug 1754004)
Backed out changeset a147df47a0e3 (bug 1754004)
Backed out changeset 9018dd592230 (bug 1754004)
Backed out changeset 234ff9e092c2 (bug 1754004)
Backed out changeset c4f1e86992b6 (bug 1754004)
Backed out changeset 51bd50b57dd5 (bug 1754004)
Backed out changeset d95e7ad0eafa (bug 1754004)
Backed out changeset 35a69828091c (bug 1754004)
Backed out changeset 6802a4326963 (bug 1754004)
Backed out changeset e40e810e18fc (bug 1754004)
Backed out changeset 82b38c12b298 (bug 1754004)
Backed out changeset 0a6cf0817bf5 (bug 1754004)
Backed out changeset 6d8e51b3e8d7 (bug 1754004)
Backed out changeset 2059c2d0d880 (bug 1754004)
2022-05-05 11:27:42 +02:00
Butkovits Atila 7854b3ad09 Backed out changeset a81a40b250b4 (bug 1766794) for causing marionette failures. CLOSED TREE 2022-05-05 08:42:09 +03:00
James Teh 3754f65b27 Bug 1766794: Lazily cache HyperText offsets for RemoteAccessibles. r=eeejay
We already had a similar cache in local HyperTextAccessible.
This improves performance significantly when walking the text attributes of a container with a large number of text leaf children, such as is encountered when using view source.
This patch unifies that cache across local and remote.
For simplicity, the cache invalidation strategy is more naive/aggressive.

Differential Revision: https://phabricator.services.mozilla.com/D145079
2022-05-05 04:31:12 +00:00
Narcis Beleuzu d4b6401f96 Backed out changeset 337ded6c2bfd (bug 1192108) for geckoview failures on testMoveCaretAccessibilityFocus . CLOSED TREE 2022-05-05 04:17:34 +03:00
James Teh b129b887c5 Bug 1192108: Fire focus events after mutation events but before any other events. r=eeejay
It's critical that we fire mutation events first because our RemoteAccessible tree is created thus and we can't fire events on RemoteAccessibles we haven't created yet.
Beyond that, though, focus events are of primary importance.
See the comments in EventQueue::ProcessEventQueue for the reasons.

Differential Revision: https://phabricator.services.mozilla.com/D145319
2022-05-04 20:35:14 +00:00
Eitan Isaacson 83568bcd62 Bug 1765433 - P3: Get bundle and do pivot in UI thread for remote accessibles. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D144896
2022-05-04 18:00:47 +00:00
Eitan Isaacson 239896a063 Bug 1765433 - P2: Add AccessibilityNodeInfo population methods. r=Jamie
We cannot use GeckoBundle anymore because it cannot be constructed in
the UI thread. Instead, have a set of populate methods that take
arguments and set the correct fields in the AccessibilityNodeInfo, or
its optional info objects.

These fields can be called both in the Gecko and UI thread.

Differential Revision: https://phabricator.services.mozilla.com/D144895
2022-05-04 18:00:47 +00:00
James Teh 4e792c6a29 Bug 1766954: TextLeafRange: Don't call nsIFrame::RenderedText for pre-formatted text. r=eeejay
For pre-formatted text, the content text and rendered text are the same.
Therefore, there's no point calling nsIFrame::RenderedText, which is quite slow for nodes containing a large chunk of text.
This improves performance significantly when caching line start offsets for large plain text files such as logs.

Differential Revision: https://phabricator.services.mozilla.com/D145080
2022-05-04 04:18:11 +00:00
Nika Layzell 310e31989e Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-03 23:30:32 +00:00
Mike Hommey 08edf30a1b Bug 1766561 - Add missing l modifier for long formatting. r=Jamie,media-playback-reviewers,gfx-reviewers,nika,necko-reviewers,mhowell,rkraesig,gerald,application-update-reviewers,bytesized,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144917
2022-05-03 20:49:08 +00:00
Mike Hommey f047620639 Bug 1766561 - Use proper formatting directives for LPARAM and WPARAM. r=Jamie,rkraesig
Unfortunately, while with MSVC one would use the `I` modifier to format
LPARAM/LONG_PTR, it doesn't work with clang-cl on 32-bits, because
LONG_PTR there is long, but `I` expects an int.

Differential Revision: https://phabricator.services.mozilla.com/D144916
2022-05-03 20:49:08 +00:00
Butkovits Atila d0dadcb6f5 Backed out 19 changesets (bug 1759569, bug 1754004, bug 1759563, bug 1754031, bug 1696894, bug 1759572) for causing wpt failures. CLOSED TREE
Backed out changeset 110a8dce4b5d (bug 1696894)
Backed out changeset a62dab05c6cd (bug 1754004)
Backed out changeset 7cf122f6e19f (bug 1754004)
Backed out changeset 2aa9a0a9adbc (bug 1754004)
Backed out changeset cde16b2cdbfb (bug 1754004)
Backed out changeset 452fe0a15c99 (bug 1754004)
Backed out changeset eace8d4756ef (bug 1754004)
Backed out changeset 5e1fad91e935 (bug 1754004)
Backed out changeset eb6de0b1ab8e (bug 1754004)
Backed out changeset 1ac1908ed3d0 (bug 1754004)
Backed out changeset 473cad5b22ab (bug 1754004)
Backed out changeset 1923922be138 (bug 1754004)
Backed out changeset c7966d91f89e (bug 1754004)
Backed out changeset df5ce1f6712c (bug 1754004)
Backed out changeset a3f3f9761ada (bug 1754004)
Backed out changeset c8ec86e0a33b (bug 1759572)
Backed out changeset 6c102f8e3d4a (bug 1759563)
Backed out changeset bd3a2fcf4f0c (bug 1759569)
Backed out changeset 2541d8face65 (bug 1754031)
2022-05-03 06:00:22 +03:00
Butkovits Atila c1773abb87 Backed out changeset 4e3e696ff054 (bug 1766954) for causing bustages at nsStyleStruct.h. CLOSED TREE 2022-05-03 03:43:58 +03:00
Butkovits Atila c08407380b Backed out changeset e12dbde5824b (bug 1766794) for causing build bustages. CLOSED TREE 2022-05-03 01:57:32 +03:00
James Teh 4828f4d449 Bug 1766954: TextLeafRange: Don't call nsIFrame::RenderedText for pre-formatted text. r=eeejay
For pre-formatted text, the content text and rendered text are the same.
Therefore, there's no point calling nsIFrame::RenderedText, which is quite slow for nodes containing a large chunk of text.
This improves performance significantly when caching line start offsets for large plain text files such as logs.

Differential Revision: https://phabricator.services.mozilla.com/D145080
2022-05-02 22:40:43 +00:00
James Teh 5c02aef5a0 Bug 1766794: Lazily cache HyperText offsets for RemoteAccessibles.
We already have a similar cache in local HyperTextAccessible.
Unfortunately, we can't use common code here because we don't want to waste memory having a member variable on all RemoteAccessibles, but local HyperTextAccessibles don't have mCachedFields.
This improves performance significantly when walking the text attributes of a container with a large number of text leaf children, such as is encountered when using view source.

Differential Revision: https://phabricator.services.mozilla.com/D145079
2022-05-02 22:40:43 +00:00
James Teh 9c548e5244 Bug 1767169: When processing queued cache updates, ensure Accessibles haven't been detached from the document. r=eeejay
In bug 1739560, I moved the processing of queued cache updates before the firing of mutation events.
That means that Accessibles removed from the tree might not be shut down (and thus defunct) yet, since we have this limbo "not in document" state.
Therefore, as well as skipping defunct Accessibles, we must also skip Accessibles that are no longer in the document.

Differential Revision: https://phabricator.services.mozilla.com/D145176
2022-05-02 22:38:07 +00:00
James Teh 71595ec7c0 Bug 1767173: When retrieving the cached name, set name string to void when it is empty but not explicitly set empty using alt="". r=eeejay
This distinction between void and empty exists in LocalAccessible, so we should be consistent in RemoteAccessible.
This fixes exposure of explicit-name when the name is empty.
To facilitate this, we no longer assume the name flag is not in the cache just because the name string isn't in the cache, since it could be eNoNameOnPurpose.

Differential Revision: https://phabricator.services.mozilla.com/D145179
2022-05-02 22:37:24 +00:00
Nika Layzell 7cb1970841 Bug 1754004 - Part 2: Remove the PFileDescriptorSet interface, r=asuth,necko-reviewers,kershaw
This interface should no longer be required due to the changes in part 1
limiting the complexity of IPCStream instances and limiting the number of file
descriptors which a single stream can attach to a message.

Removing this interface is necessary to serialize nsIInputStream instances over
arbitrary toplevel protocols and non-protocol IPC in the future.

Differential Revision: https://phabricator.services.mozilla.com/D141039
2022-05-02 20:44:22 +00:00
Butkovits Atila 99ebfd6f14 Merge mozilla-central to autoland. CLOSED TREE 2022-04-29 12:59:59 +03:00
Butkovits Atila 6d3bc9da27 Merge autoland to mozilla-central. a=merge 2022-04-29 12:46:43 +03:00
Mike Hommey e55237be4d Bug 1766377 - Fix sign-compare warnings related to Windows constants. r=rkraesig,gfx-reviewers,sotaro
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/components/maintenanceservice/tests/gtest/ServiceStartInteractiveOnly.cpp(51,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
  ASSERT_EQ(GetLastError(), ERROR_ACCESS_DENIED);
  ^
obj-build/dist/include/gtest/gtest.h(1871,31): note: expanded from macro 'ASSERT_EQ'
                              ^
obj-build/dist/include/gtest/gtest.h(1855,54): note: expanded from macro 'GTEST_ASSERT_EQ'
  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/library/gtest/TestUCRTDepends.cpp(52,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
    EXPECT_EQ(GetLastError(), ERROR_FILE_NOT_FOUND);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
ipc/chromium/src/base/thread_local_win.cc(18,14): error: comparison of integers of different signs: 'base::ThreadLocalPlatform::SlotType' (aka 'int') and 'DWORD' (aka 'unsigned long') [-Werror,-Wsign-compare]
  CHECK(slot != TLS_OUT_OF_INDEXES);
        ~~~~ ^  ~~~~~~~~~~~~~~~~~~

ipc/glue/WindowsMessageLoop.cpp(381,44): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
        if (objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT) {
                                     ~~~~~ ^  ~~~~~~~~~~~~~~~~
ipc/glue/WindowsMessageLoop.cpp(381,19): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
        if (objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT) {
            ~~~~~ ^  ~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
xpcom/tests/windows/TestPoisonIOInterposer.cpp(108,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
    EXPECT_EQ(::GetLastError(), ERROR_IO_PENDING);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
gfx/thebes/gfxGDIFont.cpp(454,13): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Werror,-Wsign-compare]
    if (ret == E_PENDING) {
        ~~~ ^  ~~~~~~~~~
accessible/windows/msaa/Compatibility.cpp(120,21): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Werror,-Wsign-compare]
  if (exceptionCode == RPC_E_CANTCALLOUT_ININPUTSYNCCALL && NS_IsMainThread()) {
      ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/WinIMEHandler.cpp(166,35): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
      static_cast<DWORD>(aLParam) == OBJID_CARET) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
widget/windows/nsWindow.cpp(541,37): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
        static_cast<DWORD>(aLParam) != OBJID_CLIENT ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144692
2022-04-29 09:14:11 +00:00
Norisz Fay 6e06e2da92 Backed out 4 changesets (bug 1766377) for causing mochitest failures on HyperTextAccessible.cpp CLOSED TREE
Backed out changeset 6335511477a4 (bug 1766377)
Backed out changeset e8108d6fab9f (bug 1766377)
Backed out changeset 80d16d55c490 (bug 1766377)
Backed out changeset 1a6583d6e52e (bug 1766377)
2022-04-29 07:35:11 +03:00
James Teh acf1d4f77c Bug 1739560: Update line starts in the cache when they change. r=morgan
If text or bounds change, it's very likely that line starts have changed too, so we push an update for them.
However, if a non-rectangular text span changes its line wrapping without changing its text, the bounds might not change.
In that case, we still get a bounds cache update request; we just determine not to push bounds.
This happens a lot, though.
To limit this, we compare against the cached first line start in LocalAccessible and push an update only if it's different.

If text and bounds both change, we don't want to push two separate cache updates.
We use queued cache updates to prevent this.
This necessitated moving where we send queued cache updates so that we do it before firing mutation events, since clients might need the text to be up to date when handling those events.

Differential Revision: https://phabricator.services.mozilla.com/D144949
2022-04-29 00:44:11 +00:00
Mike Hommey 4f1f2540f6 Bug 1766377 - Fix sign-compare warnings related to IDL constants. r=anti-tracking-reviewers,necko-reviewers,kershaw,timhuang
dom/network/TCPSocket.cpp(973,38): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsISocketTransport::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsISocketTransport.h:102:3)' [-Werror,-Wsign-compare]
  if (static_cast<uint32_t>(aStatus) !=
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
dom/security/ReferrerInfo.cpp(216,26): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsIWebProgressListener::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsIWebProgressListener.h:41:3)' [-Werror,-Wsign-compare]
          rejectedReason !=
          ~~~~~~~~~~~~~~ ^
toolkit/components/antitracking/StorageAccess.cpp(175,23): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsIWebProgressListener::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsIWebProgressListener.h:41:3)' [-Werror,-Wsign-compare]
  if (aRejectedReason ==
      ~~~~~~~~~~~~~~~ ^
toolkit/components/antitracking/StorageAccess.cpp(415,26): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsIWebProgressListener::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsIWebProgressListener.h:41:3)' [-Werror,-Wsign-compare]
         aRejectedReason ==
         ~~~~~~~~~~~~~~~ ^
toolkit/components/antitracking/StorageAccess.cpp(428,26): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'nsIWebProgressListener::(unnamed enum at obj-aarch64-pc-mingw32/dist/include/nsIWebProgressListener.h:41:3)' [-Werror,-Wsign-compare]
  return aRejectedReason ==
         ~~~~~~~~~~~~~~~ ^

Differential Revision: https://phabricator.services.mozilla.com/D144693
2022-04-29 00:43:31 +00:00
Mike Hommey c7ad9c4633 Bug 1766377 - Fix sign-compare warnings related to Windows constants. r=rkraesig,gfx-reviewers,sotaro
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/components/maintenanceservice/tests/gtest/ServiceStartInteractiveOnly.cpp(51,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
  ASSERT_EQ(GetLastError(), ERROR_ACCESS_DENIED);
  ^
obj-build/dist/include/gtest/gtest.h(1871,31): note: expanded from macro 'ASSERT_EQ'
                              ^
obj-build/dist/include/gtest/gtest.h(1855,54): note: expanded from macro 'GTEST_ASSERT_EQ'
  ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/library/gtest/TestUCRTDepends.cpp(52,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
    EXPECT_EQ(GetLastError(), ERROR_FILE_NOT_FOUND);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
ipc/chromium/src/base/thread_local_win.cc(18,14): error: comparison of integers of different signs: 'base::ThreadLocalPlatform::SlotType' (aka 'int') and 'DWORD' (aka 'unsigned long') [-Werror,-Wsign-compare]
  CHECK(slot != TLS_OUT_OF_INDEXES);
        ~~~~ ^  ~~~~~~~~~~~~~~~~~~

ipc/glue/WindowsMessageLoop.cpp(381,44): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
        if (objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT) {
                                     ~~~~~ ^  ~~~~~~~~~~~~~~~~
ipc/glue/WindowsMessageLoop.cpp(381,19): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
        if (objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT) {
            ~~~~~ ^  ~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned long' and 'const long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
xpcom/tests/windows/TestPoisonIOInterposer.cpp(108,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, long, nullptr>' requested here
    EXPECT_EQ(::GetLastError(), ERROR_IO_PENDING);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
gfx/thebes/gfxGDIFont.cpp(454,13): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Werror,-Wsign-compare]
    if (ret == E_PENDING) {
        ~~~ ^  ~~~~~~~~~
accessible/windows/msaa/Compatibility.cpp(120,21): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'HRESULT' (aka 'long') [-Werror,-Wsign-compare]
  if (exceptionCode == RPC_E_CANTCALLOUT_ININPUTSYNCCALL && NS_IsMainThread()) {
      ~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/WinIMEHandler.cpp(166,35): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
      static_cast<DWORD>(aLParam) == OBJID_CARET) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
widget/windows/nsWindow.cpp(541,37): error: comparison of integers of different signs: 'DWORD' (aka 'unsigned long') and 'LONG' (aka 'long') [-Werror,-Wsign-compare]
        static_cast<DWORD>(aLParam) != OBJID_CLIENT ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144692
2022-04-29 00:43:31 +00:00
Morgan Reschenberg 32487fa3e7 Bug 1763214: Convert ImagePosition, ImageSize to use cached bounds r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D142996
2022-04-28 17:03:49 +00:00
Morgan Reschenberg 278582922a Bug 1763191: Add suppport for cached remote accessibles in coordinate conversion functions r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D142970
2022-04-28 16:58:19 +00:00
James Teh 16c792ed33 Bug 1766560: Don't ignore the first line start of a RemoteAccessible when retrieving the next line. r=morgan
The code previously returned failure for array index 0, but it did this for both movement directions.
It should only do this for eDirPrevious, since we decrement index in that case.

Differential Revision: https://phabricator.services.mozilla.com/D144785
2022-04-28 10:42:11 +00:00
Butkovits Atila 19ed218d60 Backed out changeset a901a6c26367 (bug 1766560) for causing failures at browser_caching_text. CLOSED TREE 2022-04-28 05:47:17 +03:00
James Teh 60745bde34 Bug 1748393: Fire a name change event when a document's title changes. r=morgan
This causes the cache to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D144770
2022-04-28 02:12:29 +00:00
James Teh ff8c09efee Bug 1766560: Don't ignore the first line start of a RemoteAccessible when retrieving the next line. r=morgan
The code previously returned failure for array index 0, but it did this for both movement directions.
It should only do this for eDirPrevious, since we decrement index in that case.

Differential Revision: https://phabricator.services.mozilla.com/D144785
2022-04-28 02:11:53 +00:00
James Teh 6743bc23ee Bug 1766206: TextLeafPoint: When determining whether an Accessible is at the start of a line, compare with the last continuation of the previous leaf. r=morgan
Previously, we were always comparing with the primary frame of the previous leaf.
If the previous leaf crossed lines, this meant we incorrectly reported that the following leaf started a new line even if it didn't, since the primary frame of the previous leaf was always on a different line.
Now, we use the last continuation (line) of the previous leaf.
This way, if the next leaf continues the final line of the previous leaf, they will have the same line number and so we won't incorrectly report that the next leaf starts a new line.

Differential Revision: https://phabricator.services.mozilla.com/D144781
2022-04-28 02:09:16 +00:00
Eitan Isaacson 9995cf770e Bug 1765430 - P4: Remove RemoteAccessibleWrap. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D144483
2022-04-27 22:44:46 +00:00
Eitan Isaacson c9311969b2 Bug 1765430 - P3: Refactor Android Pivot methods. r=Jamie
This creates a clearer distinction between local pivots and remote
pivots. The former happens in the parent process and the latter happens
in the remote content process.

Differential Revision: https://phabricator.services.mozilla.com/D144482
2022-04-27 22:44:45 +00:00
Eitan Isaacson f45be3470b Bug 1765430 - P2: Manage Android accessible/id mappings in SessionAccessibility. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D144481
2022-04-27 22:44:45 +00:00
Eitan Isaacson 15f4639e31 Bug 1765430 - P1: Move ToBundle to SessionAccessibility. r=Jamie
Since remote accessibles won't share AccessibleWrap as a base class
anymore this can't be an instance method. Move it to
SessionAccessibility, the sole consumer.

Note: ToBundle will hopefully get removed entirely once CTW is fully adopted.

Differential Revision: https://phabricator.services.mozilla.com/D144480
2022-04-27 22:44:45 +00:00
Butkovits Atila 20e2d30582 Backed out 4 changesets (bug 1765430) for causing android bustage. CLOSED TREE
Backed out changeset 72e27e3813d3 (bug 1765430)
Backed out changeset 47bbf5bd9315 (bug 1765430)
Backed out changeset e8161b463a3b (bug 1765430)
Backed out changeset 30c05f76d21e (bug 1765430)
2022-04-28 01:15:37 +03:00
Eitan Isaacson 3ee5a34515 Bug 1765430 - P4: Remove RemoteAccessibleWrap. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D144483
2022-04-27 21:01:36 +00:00