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

9110 Коммитов

Автор SHA1 Сообщение Дата
Joel Maher 2e841d22cb Bug 1704640 - Move mochitest browser-chrome / media from osx 10.14 to osx 10.15. r=ahal,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D115951
2021-05-27 16:06:03 +00:00
James Teh 6b416cec94 Bug 1712182: Test aria-owning an ancestor which isn't created yet with an iframe in the subtree. r=eeejay
The actual fix for this is in bug 1387308.
However, triggering this bug with an iframe in a remote document caused a crash in the parent process because the parent process was never sent the OuterDoc.
Given the added complexity here, I thought it worth having a separate test.

Differential Revision: https://phabricator.services.mozilla.com/D115812
2021-05-27 00:49:23 +00:00
James Teh e1f5c9ff7c Bug 1387308: When aria-owning a node which doesn't have an accessible yet, check that the owned child isn't an ancestor of the owner via relocation. r=eeejay
Previously, we only checked whether the owner was a DOM descendant of the owned child.
However, the owner could be in a different DOM subtree, but an a11y descendant due to aria-owns relocation.
Now, we walk the a11y ancestors, doing the DOM descendant check again whenever the DOM lineage changes due to relocation.

Differential Revision: https://phabricator.services.mozilla.com/D115811
2021-05-27 00:49:23 +00:00
Morgan Reschenberg 5e6ca85357 Bug 1710751: Create LINKS_TO relation to track anchors and their corresponding elements r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D115841
2021-05-26 21:31:42 +00:00
James Teh 8363da33a8 Bug 1712210: Remove a pending child doc addition (if any) when the embedder accessible for an OOP iframe changes. r=eeejay
Previously, if an OuterDoc was never sent to the parent process and its id was reused later, we ended up adding the document to that accessible, which usually wasn't even an OuterDoc.
Alongside the actual fix, add some assertions to make breakage in this area easier to debug in future.

Differential Revision: https://phabricator.services.mozilla.com/D115777
2021-05-25 23:17:09 +00:00
Noemi Erli 6401ad3ad0 Backed out changeset f8b8dd8a7814 (bug 1710751) for causing windows build bustages CLOSED TREE 2021-05-26 02:23:23 +03:00
Morgan Reschenberg bef9fad1db Bug 1710751: Create LINKS_TO relation to track anchors and their corresponding elements r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D115841
2021-05-25 23:06:42 +00:00
Morgan Reschenberg 7bc169515a Bug 1710748: Return button menus when form controls are queried from rotor r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D115429
2021-05-24 17:02:46 +00:00
Morgan Reschenberg 288a4006cf Bug 1710742: Modify VO checkbox search key to work with quick nav r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D115430
2021-05-24 17:02:31 +00:00
James Teh ed1d421ba9 Bug 1710975: Fix child/sibling functions regarding top level remote documents. r=eeejay
1. OuterDocAccessible::ChildCount was previously Windows only. Implement it for all platforms.
2. OuterDocAccessible::ChildAt included  code for Windows which isn't necessary because it calls AccessibleWrap::LocalChildAt, not OuterDocAccessible::LocalChildAt (where the Windows specific RemoteAccessibleWrap stuff is implemented).
3. LocalAccessible::ChildAtPoint previously expected LocalChildAt() to succeed if ChildCount > 1. As per 1), this is no longer true for OuterDocAccessibles containing a remote document. Adjust accordingly.
4. IndexInParent on a top level remote document was previously returning -1. Implement DocAccessibleParent::IndexInParent to fix this.
5. Doing 4) means that RemoteNext/PrevSibling broke for top level documents because they use IndexInParent, but there is no remote parent. Add a specific early return for documents there.

Differential Revision: https://phabricator.services.mozilla.com/D115045
2021-05-21 06:18:19 +00:00
James Teh a8a9eee88d Bug 1700708: Don't insert the browser for unselected browser tabs when calling getRelatedElement. r=Gijs,dao
Otherwise, callers might end up unintentionally binding the browser for lazy background tabs.
This was happening when a11y queried the LABEL_FOR relation while building the a11y tree, causing all lazy tabs to be loaded.
All callers of this method only need it to insert a browser when the tab is selected anyway.

Differential Revision: https://phabricator.services.mozilla.com/D114566
2021-05-21 05:17:56 +00:00
Csoregi Natalia f352760325 Backed out changeset 59a17ca79018 (bug 1710975) for assertion failures on RemoteAccessibleBase.h. CLOSED TREE 2021-05-21 07:00:08 +03:00
James Teh 9e2f11c4ef Bug 1710975: Fix child/sibling functions regarding top level remote documents. r=eeejay
1. OuterDocAccessible::ChildCount was previously Windows only. Implement it for all platforms.
2. OuterDocAccessible::ChildAt included  code for Windows which isn't necessary because it calls AccessibleWrap::LocalChildAt, not OuterDocAccessible::LocalChildAt (where the Windows specific RemoteAccessibleWrap stuff is implemented).
3. LocalAccessible::ChildAtPoint previously expected LocalChildAt() to succeed if ChildCount > 1. As per 1), this is no longer true for OuterDocAccessibles containing a remote document. Adjust accordingly.
4. IndexInParent on a top level remote document was previously returning -1. Implement DocAccessibleParent::IndexInParent to fix this.
5. Doing 3) means that RemoteNext/PrevSibling crash for top level documents because they use IndexInParent, but there is no remote parent. Add assertions to ensure these are never called for documents.
6. Implement DocAccessibleParent::Next/PrevSibling so that RemoteNext/PrevSibling isn't used there (as per 4).

Differential Revision: https://phabricator.services.mozilla.com/D115045
2021-05-21 00:29:10 +00:00
James Teh eebee7c675 Bug 1636476: Enable a11y logging for accessible/tests/browser/events. r=morgan
I can't reproduce this on try, so I'm landing this so I can get (hopefully) useful info next time it fails.

Differential Revision: https://phabricator.services.mozilla.com/D115455
2021-05-19 17:49:51 +00:00
Mike Hommey 5964d4408f Bug 1711811 - Remove code that dereferences an uninitialized pointer in xpcAccessibleHyperText::Get*TextAttributes. r=Jamie
Likely, the code is never used.

Differential Revision: https://phabricator.services.mozilla.com/D115444
2021-05-19 08:01:47 +00:00
James Teh 1601c5d67a Bug 1679753: Add diagnostic assert to DocAccessibleParent::AddChildDoc when binding to a nonexistent proxy. r=eeejay
Returning an IPC failure causes a crash in the content process on Nightly.
However, the crash doesn't have a useful stack.
A diagnostic assert will cause a full browser crash instead of a tab crash, which isn't ideal.
On the other hand, it will hopefully allow us to get much more useful info about the crash.

Differential Revision: https://phabricator.services.mozilla.com/D115054
2021-05-18 00:12:42 +00:00
Eitan Isaacson 564dc6d059 Bug 1710867 - P2: Don't leak MOXSearchInfo. r=morgan
Also need to have MOXSearchInfo have an owning reference of mSearchKeys.

Depends on D115273

Differential Revision: https://phabricator.services.mozilla.com/D115274
2021-05-17 22:35:39 +00:00
Eitan Isaacson 9293cb7fee Bug 1710867 - P1: Add returned containers to autorelease pool. r=morgan
When we return a container, like an NSArray of MOXAccessible children the container needs
to be added to the autorelease pool so that it is released and so are its members.

Differential Revision: https://phabricator.services.mozilla.com/D115273
2021-05-17 22:35:39 +00:00
James Teh 691fb1b366 Bug 1710983: Remove disabling of -Woverloaded-virtual from Windows AccessibleWrap.h. r=morgan
We previously disabled this to squelch warnings caused by inheriting both XPCOM and MSCOM interfaces.
After bug 1694865, we no longer do that, so disabling this warning is no longer necessary.

This raised an instance of -Woverloaded-virtual in ia2AccessibleImage caused by inheritance of IAccessibleAction, which has a method with the same name but different arguments.
A `using` declaration was added to squelch this warning.

Differential Revision: https://phabricator.services.mozilla.com/D115043
2021-05-16 23:22:33 +00:00
Eitan Isaacson c4d0e38f83 Bug 1706910 - Don't expose MOXAccessible with represented view to AppKit. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D114797
2021-05-13 15:59:18 +00:00
James Teh 5dda669781 Bug 1705542: Don't assume an OuterDoc RemoteAccessible has a child document. r=eeejay
An OuterDoc RemoteAccessible can have no child document for a short time if the embedded doc is changed.
As part of this, get rid of the mOuterDoc variable, since it is now redundant and somewhat misleading.
Instead, use IsOuterDoc(), since RemoteAccessible now has acc types.

Differential Revision: https://phabricator.services.mozilla.com/D114431
2021-05-11 23:17:08 +00:00
Eitan Isaacson f28492c2cc Bug 1706814 - Allow adding relation providers before dependend content created. r=Jamie
I entirely removed the acceptable child check because that is done later
when the aria-owns is processed.

Differential Revision: https://phabricator.services.mozilla.com/D114779
2021-05-11 21:42:23 +00:00
James Teh fd632817d3 Bug 1709987: Call MsaaShutdown() when shutting down the ApplicationAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D114567
2021-05-11 00:35:17 +00:00
Morgan Reschenberg 7c9fb4df94 Bug 1710493: Implement AXFrame for VoiceOver r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D113585
2021-05-10 21:32:19 +00:00
Morgan Reschenberg 80ccd5b8b1 Bug 1708522: Remove MOZ_CRASHREPORTER from windows, log AccClient on mac. r=Jamie
This commit adds crash logging for AccessibilityClient on MacOS and
enables that logging on windows by removing the defunct MOZ_CRASHREPORTER
defines. On MacOS, we also introduce logging for SwitchControl and
unknown clients.

Differential Revision: https://phabricator.services.mozilla.com/D114167
2021-05-10 20:22:32 +00:00
Noemi Erli a2bfb965fd Backed out changeset 362b8272eab4 (bug 1708522) for causing build bustage in Platform.mm CLOSED TREE 2021-05-10 22:55:44 +03:00
Morgan Reschenberg de405c1e9c Bug 1708522: Remove MOZ_CRASHREPORTER from windows, log AccClient on mac. r=Jamie
This commit adds crash logging for AccessibilityClient on MacOS and
enables that logging on windows by removing the defunct MOZ_CRASHREPORTER
defines. On MacOS, we also introduce logging for SwitchControl and
unknown clients.

Differential Revision: https://phabricator.services.mozilla.com/D114167
2021-05-10 19:07:10 +00:00
Morgan Reschenberg dc1c218431 Bug 1703620: Disable browser_test_panel.js on windows 10 builds running webrender r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D114385
2021-05-07 06:18:28 +00:00
James Teh 20ee50033c Bug 1709594: Make ia2AccessibleTableCell inherit from ia2AccessibleHypertext. r=morgan
Without this, table cells weren't getting the IAccessibleText, etc. interfaces.
This was my intention in bug 1694865 part 25, but apparently that's not what I actually did.

Differential Revision: https://phabricator.services.mozilla.com/D114426
2021-05-07 02:11:28 +00:00
Morgan Reschenberg 36e9e6e30a Bug 1694569: Introduce tree size logging under A11YLOG r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D114168
2021-05-05 20:56:06 +00:00
Iulian Moraru 1e02685f75 Backed out 2 changesets (bug 1706910) for accessibility crashes. CLOSED TREE
Backed out changeset e0769fe4d6fd (bug 1706910)
Backed out changeset 67c05979577e (bug 1706910)
2021-05-05 18:50:58 +03:00
James Teh 1c2bc0ce07 Bug 1709250: Null check LocalAcc() in GeckoCustom. r=morgan
We didn't do defunct checks previously, but it seems the methods we were calling were safe on defunct accessibles.
Now that retrieving the accessible returns null once it's shut down, we need to explicitly null check it.

Differential Revision: https://phabricator.services.mozilla.com/D114197
2021-05-04 21:59:03 +00:00
Eitan Isaacson 6f52e37071 Bug 1513447 - Use generated marker elements for list bullet accessibles. r=Jamie
In 1513447 there is a demonstrated instance in which the generated
marker is replaced with another one and throws the list item bullet
state into an unknown state. To remedy this we need to observe when such
elements are removed and added.

Instead of that, I opted to finally make the bullet accessible a real
content-backed accessible. This should help with other issues that pop
up when the list item overrides children management and keeps an
artificial accessible as its first child.

Differential Revision: https://phabricator.services.mozilla.com/D110719
2021-05-04 19:07:59 +00:00
James Teh c2a4380cef Bug 1706851: Remove Windows HyperTextProxyFor() function. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D113063
2021-05-03 23:32:24 +00:00
Morgan Reschenberg a0703b0672 Bug 1706910: Introduce testing for AXFrame, accessibilityFrame r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D113185
2021-05-03 23:21:32 +00:00
Morgan Reschenberg ab5a074a02 Bug 1706910: Implement AXFrame, accessibilityFrame for VoiceOver r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D113585
2021-05-03 23:21:31 +00:00
James Teh c33d1b0837 Bug 1694865 part 25: Remove inheritance of Msaa*Accessible/ia2*Accessible into *AccessibleWrap! r=morgan
1. ia2AccessibleApplication is instantiated for ApplicationAccessible, so it now inherits from MsaaAccessible.
2. ia2AccessibleHypertext is instantiated for HyperTextAccessible, so it now inherits from MsaaAccessible.
3. ia2AccessibleImage is instantiated for ImageAccessible, so it inherits from MsaaAccessible.
4. ia2AccessibleTable is instantiated for TableAccessible, so it inherits from ia2AccessibleHypertext (since most TableAccessible implementations implement HyperTextAccessible).
5. ia2AccessibleTableCell is instantiated for TableCellAccessible, so it inherits from ia2AccessibleHypertext (since most TableCellAccessible implementations implement HyperTextAccessible).
6. All of the above override QueryInterface as appropriate, replacing the QueryInterface implementations from all *AccessibleWrap classes.
7. The ARIAGridAccessibleWrap, HTMLTableAccessibleWrap, ImageAccessibleWrap, XULListboxAccessibleWrap and XULTreeGridAccessibleWrap classes previously served only to host ia2AccessibleImage, ia2AccessibleTable, etc. Since these ia2 classes are now instantiated via MsaaAccessible, these Wrap classes have been removed and replaced with aliases.
8. The QueryInterface handling for ISimpleDOMText has been moved into MsaaAccessible. Since this was the only purpose of TextLeafAccessibleWrap, this too has been removed and replaced with an alias.
9. AccessibleWrap now holds a strong reference to MsaaAccessible and MsaaAccessible holds a weak reference to AccessibleWrap.
10. An MsaaAccessible (or derived class) is instantiated by MsaaAccessible::Create.
11. MsaaAccessible now implements its own COM reference counting using DECL_IUNKNOWN, since it does not need nsISupports (XPCOM).

Differential Revision: https://phabricator.services.mozilla.com/D112956
2021-05-03 11:31:04 +00:00
James Teh 1d4975717e Bug 1694865 part 24: Change uiaRawElmProvider to not rely on AccessibleWrap inheritance. r=morgan
It now uses GetNativeInterface when returning IAccessibles to clients.

Differential Revision: https://phabricator.services.mozilla.com/D112955
2021-05-01 22:29:27 +00:00
James Teh 4c07d821c8 Bug 1694865 part 23: Support inheritance/overriding of reference counting in IUnknownImpl. r=morgan
Until now, our a11y COM implementation has relied on AddRef and Release from nsISupports, but this soon won't be possible.
Instead, MsaaAccessible will implement its own reference counting using DECL_IUNKNOWN.

DECL_IUNKNOWN previously declared AddRef and Release as final.
This doesn't work for MsaaAccessible because there is an aggregatable subclass (MsaaRootAccessible) and because some subclasses will inherit additional interfaces (ia2AccessibleApplication, etc.).

When subclasses inherit additional interfaces, they inherit an additional IUnknown, so the compiler doesn't know which AddRef/Release to call.
To support this, IMPL_IUNKNOWN_REFCOUNTING_INHERITED HAS BEEN ADDED to specify which base class implements reference counting.

Differential Revision: https://phabricator.services.mozilla.com/D112954
2021-05-01 22:29:27 +00:00
James Teh 812dc1cf7c Bug 1694865 part 22: Change LazyInstantiator to aggregate MsaaRootAccessible instead of RootAccessibleWrap. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D112953
2021-05-01 22:29:26 +00:00
James Teh 0613e5347a Bug 1694865 part 21: Move QueryInterface implementation from AccessibleWrap to MsaaAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D112951
2021-05-01 22:29:26 +00:00
James Teh b7d47b6dde Bug 1694865 part 20: Change ServiceProvider to not rely on AccessibleWrap inheritance. r=morgan
It now aggregates MsaaAccessible and uses GetNativeInterface when returning accessibles to clients.

Differential Revision: https://phabricator.services.mozilla.com/D112950
2021-05-01 22:29:25 +00:00
James Teh 463cee1200 Bug 1694865 part 19: Make EnumVariant, GeckoCustom and sdn*Accessible classes aggregate MsaaAccessible/MsaaDocAccessible instead of AccessibleWrap/DocAccessibleWrap. r=morgan
These objects need to aggregate the primary COM object (MsaaAccessible).
Once the IUnknown implementation moves out of AccessibleWrap, it won't be possible to aggregate *AccessibleWrap any more.

Differential Revision: https://phabricator.services.mozilla.com/D112949
2021-05-01 22:29:25 +00:00
James Teh 7afd94a329 Bug 1694865 part 18: Prepare ia2AccessibleEditableText/Hypertext/Image/Text to not rely on AccessibleWrap inheritance. r=morgan
Rather than static_casting `this`, there is now an ImageAcc/TextAcc() method which in turn calls MsaaAccessible::LocalAcc().
Since MsaaAccessible::LocalAcc() returns null if defunct, defunct checks have been adjusted accordingly.
For LocalAccessibles other than `this`, rather than direct static_casting, MsaaAccessible::GetFrom is used.
ia2AccessibleText was calling AccessibleWrap::ConvertToIA2Attributes, but this is actually declared in ia2Accessible, so we just add the necessary include and change the call.
Finally, calls to HyperTextProxyFor() in ia2AccessibleEditableText/Hypertext/Text assertions were replaced with calls to LocalAccessible::IsProxy(), since HyperTextProxyFor statically asserts the inheritance we're removing and isn't otherwise useful.

Differential Revision: https://phabricator.services.mozilla.com/D112942
2021-05-01 02:51:24 +00:00
James Teh 98c0f0589f Bug 1694865 part 17: Add various functions to get an MsaaAccessible/MsaaDocAccessible and use them where appropriate. r=morgan
In this patch, these new functions just static_cast, but they'll soon be returning a different object.

Differential Revision: https://phabricator.services.mozilla.com/D112952
2021-05-01 02:51:23 +00:00
James Teh 19e006d017 Bug 1694865 part 16: Transitional implementation of IUnknown in MsaaAccessible/MsaaDocAccessible which delegates to AccessibleWrap. r=morgan
This is necessary to enable COM objects which aggregate AccessibleWrap/DocAccessibleWrap to aggregate MsaaAccessible/MsaaDocAccessible instead.
Ultimately, the IUnknown implementation will be moved out of AccessibleWrap altogether and into MsaaAccessible, but we can't do that yet.
Even though MsaaDocAccessible indirectly inherits from MsaaAccessible, we have to override QueryInterface due to the naming conflict with nsISupports.

Differential Revision: https://phabricator.services.mozilla.com/D112948
2021-05-01 02:51:23 +00:00
James Teh efaf13c0ed Bug 1694865 part 15: Move XULMenuitemAccessibleWrap's MSAA overrides to a new MsaaXULMenuitemAccessible class. r=morgan
For now, XULMenuitemAccessibleWrap inherits from MsaaXULMenuitemAccessible and MsaaXULMenuitemAccessible inherits from XULMenuitemAccessible.
Accessible calls are made via MsaaAccessible::LocalAcc().
Since MsaaAccessible::LocalAcc() returns null if defunct, defunct checks have been adjusted accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D112947
2021-05-01 02:51:23 +00:00
James Teh eebe3a1f74 Bug 1694865 part 14: Move RootAccessibleWrap's MSAA overrides and other COM stuff to a new MsaaRootAccessible class. r=morgan
For now, RootAccessibleWrap inherits from MsaaRootAccessible and MsaaRootAccessible inherits from RootAccessible.
RootAccessible calls are made via a RootAcc() method which in turn calls MsaaAccessible::LocalAcc().
Since MsaaAccessible::LocalAcc() returns null if defunct, defunct checks have been adjusted accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D112946
2021-05-01 02:51:22 +00:00
James Teh 29737325ac Bug 1694865 part 13: Move DocAccessibleWrap's MSAA overrides to a new MsaaDocAccessible class. r=morgan
For now, DocAccessibleWrap inherits from MsaaDocAccessible and MsaaDocAccessible inherits from DocAccessible.
DocAccessible calls are made via a DocAcc() method which in turn calls MsaaAccessible::LocalAcc().
Since MsaaAccessible::LocalAcc() returns null if defunct, defunct checks have been adjusted accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D112945
2021-05-01 02:51:22 +00:00
James Teh fcf129c168 Bug 1694865 part 12: Move COM IAccessibleApplication implementation to new ia2AccessibleApplication class. r=morgan
For now, ApplicationAccessibleWrap inherits from the new class.
ApplicationAccessible calls are made via an AppAcc() method which in turn calls MsaaAccessible::LocalAcc().
Since MsaaAccessible::LocalAcc() returns null if defunct, defunct checks have been adjusted accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D112944
2021-04-30 12:21:42 +00:00