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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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