It seems the window location isn't the issue here at all.
Rather, we never get the expected a11y events.
So, let's try to find out what events we *do* get.
Differential Revision: https://phabricator.services.mozilla.com/D81478
Previously, this returned a value if the ARIA value rule was not eNoValue, which covered eHasValueMinMaxIfFocusable.
However, eHasValueMinMaxIfFocusable needs the focusable state to be checked.
Rather than checking the value rule directly, just use HasNumericValue(), which already knows how to handle this.
Differential Revision: https://phabricator.services.mozilla.com/D81483
This includes 3 changes:
1. Add a lazy ranges getter to AccTextSelChangeEvent.
2. Create an XPCOM interface for testing purposes.
3. Add IPDL bindings for passing ranges in e10s.
Differential Revision: https://phabricator.services.mozilla.com/D80556
This is the actual fix.
Previously, we opened a download prompt, but we didn't close it.
This download prompt could sometimes get focus and prevent subsequent tests from getting focus.
Explicitly closing it should prevent this from happening.
Differential Revision: https://phabricator.services.mozilla.com/D80590
It's just too difficult/confusing to mix a11y and non-a11y async stuff using eventQueue.
This patch should be functionally equivalent; it doesn't fix the bug.
Differential Revision: https://phabricator.services.mozilla.com/D80589
Labels are often used as primary click targets for related inputs. If
they are styled to certain bounds, but contain overflowing text for a11y
with a color of "transparent", the synthesized click will happen outside
the bounds of the label.
If we skip text leafs with "color: transparent", we will skip labels
altogether. Instead, lets land on labels when traversing, and ignore
its subtree.
Differential Revision: https://phabricator.services.mozilla.com/D77898
Labels are often used as primary click targets for related inputs. If
they are styled to certain bounds, but contain overflowing text for a11y
with a color of "transparent", the synthesized click will happen outside
the bounds of the label.
If we skip text leafs with "color: transparent", we will skip labels
altogether. Instead, lets land on labels when traversing, and ignore
its subtree.
Differential Revision: https://phabricator.services.mozilla.com/D77898
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).
Differential Revision: https://phabricator.services.mozilla.com/D79928
Using overlay scrollbars will avoid the need to account for the trimmed
space that is introduced after an overflowing zoom caused by scrollbars.
Differential Revision: https://phabricator.services.mozilla.com/D80102
This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).
Differential Revision: https://phabricator.services.mozilla.com/D79928
We're converting to nscoord in some places unnecessarily, reducing the
precision of the computed value we return.
This makes some tests unnecessarily fail if we change the base of
nscoord.
Differential Revision: https://phabricator.services.mozilla.com/D79996
The cache should already be empty by this point unless there's a bug, but we should still clean up regardless.
Also, the hashtable itself was previously never cleaned up even if it was empty.
Differential Revision: https://phabricator.services.mozilla.com/D79781
We can receive IPC events after a DocAccessibleParent is shut down if the BrowserParent is in the process of being destroyed (probably the tab closed) but there are still events in the IPC queue.
Most Recv*Event methods in BrowserParent check mShutdown, but a few don't.
For the events that don't, if the event is for a document, we'll successfully fire the platform event, and then successfully get and cache an xpcAccessibleDocument.
However, that xpcAccessibleDocument will never be removed from the cache because it's already shut down, so NotifyOfRemoteDocShutdown (which would normally remove it from the XPC cache) won't get called.
This results in a leaked object.
Thus, it's important that all Recv*Event methods drop the event if mShutdown is true.
This patch adds that check to the methods which didn't have it already.
Differential Revision: https://phabricator.services.mozilla.com/D79780
We really want to know about this because the document will never be removed from the cache, since NotifyOfRemoteDocShutdown (which would normally remove it from the XPC cache) won't get called.
Differential Revision: https://phabricator.services.mozilla.com/D79779
We're converting to nscoord in some places unnecessarily, reducing the
precision of the computed value we return.
This makes some tests unnecessarily fail if we change the base of
nscoord.
Differential Revision: https://phabricator.services.mozilla.com/D79996
This patch exposes the dialog element as a HyperTextAccessible with role DIALOG and enables the test after flipping the pref temporarily. Once the pref is on by default, the if block should be removed and the test run always.
Differential Revision: https://phabricator.services.mozilla.com/D79798
Otherwise, if we're replacing a previous top level doc, we might refer to the old top level doc during initialization.
Differential Revision: https://phabricator.services.mozilla.com/D79398
When window emulation is enabled, the emulated window is set on the top level DocAccessibleChild.
However, it isn't set on child documents (in-process iframes).
Therefore, when querying the window handle, we need to check for an emulated window handle on the top level document and return that if present.
This fixes the window handle returned by IAccessible2::get_windowHandle.
Note that the window handle used when firing events was already correct, as that is determined in the parent process.
In the parent process, the emulated window was already being propagated down to child DocAccessibleParents by BrowserParent::RecvPDocAccessibleConstructor.
Differential Revision: https://phabricator.services.mozilla.com/D79035
This usage of nsIDocShellTreeItem is safe, but nsIDocShellTreeItem is going away and it's trivial to convert this to use BrowsingContext.
As a bonus, the code is also shorter and more readable.
Differential Revision: https://phabricator.services.mozilla.com/D79022
This also adds some assertions where these are used in the Windows code, as it would be bad if that code ran in an OOP iframe document.
Differential Revision: https://phabricator.services.mozilla.com/D79021