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