We need it to live in BrowsingContext instead of WindowContext, because
we need to preserve the zoom level across same-origin navigation.
It'd be nice if it only lived in the top BC, but that's not possible at
the moment because a lot of tests rely on zooming only iframes. Some of
them can be adjusted for scaling the top instead, but not sure it's
worth it's worth fixing them and moving the zoom to be top-only, as it'd
be a bunch of effort, and the complexity and overhead of propagating the
zoom is not so big.
The print-preview-specific code in nsContentViewer is from before we did
the document cloning setup, and it seems useless. I've tested print
preview scaling before and after my patch and both behave the same.
The rest is just various test changes to use the SpecialPowers APIs or
BrowsingContext as needed instead of directly poking at the content
viewer.
I named the pres context hook RecomputeBrowsingContextDependentData, as
more stuff should move there like overrideDPPX and other media emulation
shenanigans.
I also have some ideas to simplify or even remove ZoomChild and such,
but that's followup work.
Differential Revision: https://phabricator.services.mozilla.com/D71969
When the tree is mutated, we set eGroupInfoDirty regardless of whether there is GroupInfo.
Previously, we cleared eGroupInfoDirty when updating GroupInfo, but not when creating it.
This meant that the flag was often still set, causing the cache to not be used a lot of the time.
Differential Revision: https://phabricator.services.mozilla.com/D72139
addA11yLoadEvent gets the contentWindow and wait for the document from that window to fire the load event.
Enabling the DocumentChannel for parent process load (or here in non-e10s mode) we have one extra event loop before the load starts.
So the window passed to addAllyLoadEvent would have been of the about:blank page.
The current code was based on an observable behaviour which was that the load was occuring synchronously.
DocumentChannel broke that assumption.
Differential Revision: https://phabricator.services.mozilla.com/D70799
In order for a form control to be labelled by an ancestor HTML label, its Accessible must return true for isWidget().
Also, HTML AAM says the text-input-type attribute should be exposed.
Differential Revision: https://phabricator.services.mozilla.com/D72080
We already skipped descendants for eNameFromSubtreeIfReqRule when the element wasn't labelled by something else; i.e. when calling GetNameFromSubtree.
However, when such an element is labelled/described by an ancestor, we compute the text equiv for the label using AppendTextEquivFromContent.
Previously, when descending from the ancestor down into the element itself, we would descend into its subtree despite eNameFromSubtreeIfReqRule.
This meant that groupings labelled/described by ancestor would include the content of the grouping itself in its label/description.
This was causing problems for time inputs (once those can accept an ancestor label in the next patch).
Differential Revision: https://phabricator.services.mozilla.com/D72079
addA11yLoadEvent gets the contentWindow and wait for the document from that window to fire the load event.
Enabling the DocumentChannel for parent process load (or here in non-e10s mode) we have one extra event loop before the load starts.
So the window passed to addAllyLoadEvent would have been of the about:blank page.
The current code was based on an observable behaviour which was that the load was occuring synchronously.
DocumentChannel broke that assumption.
Differential Revision: https://phabricator.services.mozilla.com/D70799
I want to generalize it for other link stuff. Need a separate commit or
it is not recognized as a move, and won't retain history. For some reason.
Differential Revision: https://phabricator.services.mozilla.com/D71259
When an element with overflow:auto becomes scrollable, either by a style change or growing children, it should become focusable and fire a state change. Same in the inverse.
Differential Revision: https://phabricator.services.mozilla.com/D70561
--HG--
extra : moz-landing-system : lando
Changes to attributes such as disabled, contenteditable, and tabindex should cause FOCUSABLE
state changes to be fired when indeed the accessible gains or loses focusability.
Differential Revision: https://phabricator.services.mozilla.com/D70560
--HG--
extra : moz-landing-system : lando
addA11yLoadEvent gets the contentWindow and wait for the document from that window to fire the load event.
Enabling the DocumentChannel for parent process load (or here in non-e10s mode) we have one extra event loop before the load starts.
So the window passed to addA11yLoadEvent would have been of the about:blank page.
The current code was based on an observable behaviour which was that the load was occuring synchronously.
DocumentChannel broke that assumption.
Differential Revision: https://phabricator.services.mozilla.com/D70799
--HG--
extra : moz-landing-system : lando
This code has pretty much always been broken, we've started to flush
more because we fixed a bug that was not looking at XUL trees inside
shadow DOM in bug 1625991.
We cannot flush layout from a11y tree construction.
Differential Revision: https://phabricator.services.mozilla.com/D70917
--HG--
extra : moz-landing-system : lando
I really don't understand why this is what VoiceOver needs, but it seems to do the trick.
Differential Revision: https://phabricator.services.mozilla.com/D70776
--HG--
extra : moz-landing-system : lando
We need to do this because we can't rely on the main children cache invalidation.
Also, I don't think this really worked before with cell additions to a row, since only
the row's children would be invalidated, and the table's children would remain untouched.
Differential Revision: https://phabricator.services.mozilla.com/D69879
--HG--
extra : moz-landing-system : lando
The latter seems more accurate to what that method does, since we don't necessarily
forward that event to the OS, but might instead use it to update cached properties.
Differential Revision: https://phabricator.services.mozilla.com/D69878
--HG--
extra : moz-landing-system : lando
For OOP iframe documents, we can't support NODE_CHILD_OF in the usual way, since the iframe resides in a different process.
Previously, we incorrectly returned the application accessible.
This was breaking focus ancestry walking for JAWS.
Instead, don't expose NODE_CHILD_OF at all in this case.
This is fine because the client will then request the parent instead, which will be correctly handled by platform/AccessibleOrProxy code.
Differential Revision: https://phabricator.services.mozilla.com/D70163
--HG--
extra : moz-landing-system : lando
For OOP iframes, the top level document lives in a different process.
Previously, we incorrectly returned the top level document in the same process.
This was causing JAWS to incorrectly identify OOP iframe documents as separate tab documents.
To fix this, we must send the real top level document down from the parent process and return that when requested in the content process.
Differential Revision: https://phabricator.services.mozilla.com/D70162
--HG--
extra : moz-landing-system : lando
D67954 starts using shadow DOM for menulist and slots the menulist children. This causes GetFlattenedTreeParent to return the slot instead of the parent menulist. This patch fixes it.
Differential Revision: https://phabricator.services.mozilla.com/D70234
--HG--
extra : moz-landing-system : lando
Not sure how this could happen, but perhaps the tab is already focused so waiting
for a focus change event causes a timeout.
Differential Revision: https://phabricator.services.mozilla.com/D70059
--HG--
extra : moz-landing-system : lando
Having this kind of method will let us know what the states of interest are.
If all the states are cached we can return them without inquiring the full state.
Differential Revision: https://phabricator.services.mozilla.com/D69130
--HG--
extra : moz-landing-system : lando
In this patch set I'll introduce state caching, so I thought it's a good idea
to first add a bunch of tests to features that will be touched.
Differential Revision: https://phabricator.services.mozilla.com/D69129
--HG--
extra : moz-landing-system : lando
When checking if a parent of a table row counts for a table, take into account that a table might be an ARIAGridAccessible, which remains a generic hyperText, but is still a valid table. Tables with display: block; are such candidates.
Differential Revision: https://phabricator.services.mozilla.com/D68955
--HG--
extra : moz-landing-system : lando
This wasn't useful cross-platform.
ATK was the only consumer of this and it now uses ProxyAccessible::ChildAtPoint.
This also means the related aNeedsScreenCoords functionality in PDocAccessible::AccessibleAtPoint is no longer needed and has thus been removed.
Finally, this renames PDocAccessible::AccessibleAtPoint to PDocAccessible::ChildAtPoint for consistency with Accessible::ChildAtPoint now that the functionality is mirrored.
Differential Revision: https://phabricator.services.mozilla.com/D67987
--HG--
extra : moz-landing-system : lando
This changes the ATK code to use AccessibleOrProxy::ChildAtPoint, since that already handles walking into OuterDocAccessibles appropriately.
Previously, atk_component_ref_accessible_at_point didn't work at all on OuterDocAccessibles.
Also, for ProxyAccessibles, we no longer adjust the coordinates for ATK_XY_WINDOW in the content process, as this depends on stuff that doesn't exist cross-platform and thus can't be used with AccessibleOrProxy.
Instead, we now handle this in the parent process before making the IPC call.
Differential Revision: https://phabricator.services.mozilla.com/D67986
--HG--
extra : moz-landing-system : lando
This makes it possible to get the `representedView` even after the accessible goes away on shutdown.
Differential Revision: https://phabricator.services.mozilla.com/D68489
--HG--
extra : moz-landing-system : lando
Dev Tools A11y Panel interacts with accessibles in the process in which they reside.
It does not (and cannot) deal with ProxyAccessibles.
However, GetDeepestChildAtPoint now walks into the ProxyAccessible tree if appropriate, which is what we want for tests and what normally makes sense.
This patch introduces GetDeepestChildAtPointInProcess, which Dev Tools will use instead.
Differential Revision: https://phabricator.services.mozilla.com/D68302
--HG--
extra : moz-landing-system : lando
This was an oversight in the HTMLGroupBoxAccessible implementation of NativeName, others trim their whitespaces by default.
Differential Revision: https://phabricator.services.mozilla.com/D68198
--HG--
extra : moz-landing-system : lando
This rejiggers a bit the way selection focus is handled so that focusing a
disabled form control with the mouse handles selection properly, and hides the
document selection and so on.
This matches the behavior of other browsers as far as I can tell.
Given now readonly and disabled editors behave the same, we can simplify a bit
the surrounding editor code.
Differential Revision: https://phabricator.services.mozilla.com/D66464
--HG--
extra : moz-landing-system : lando
Previously, we fired these for Accessibles, but this was never implemented for ProxyAccessibles (remote content documents).
Differential Revision: https://phabricator.services.mozilla.com/D67271
--HG--
extra : moz-landing-system : lando
This rejiggers a bit the way selection focus is handled so that focusing a
disabled form control with the mouse handles selection properly, and hides the
document selection and so on.
This matches the behavior of other browsers as far as I can tell.
Given now readonly and disabled editors behave the same, we can simplify a bit
the surrounding editor code.
Differential Revision: https://phabricator.services.mozilla.com/D66464
--HG--
extra : moz-landing-system : lando