From 7cbe6a24647b6f296c026c0cd69767a38989c1aa Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Tue, 15 Nov 2022 02:49:44 +0000 Subject: [PATCH] Bug 1797863 - add class documentation for accessibility tree nodes. r=morgan Differential Revision: https://phabricator.services.mozilla.com/D160583 --- accessible/android/RootAccessibleWrap.h | 4 ++++ accessible/atk/AccessibleWrap.h | 3 +++ accessible/basetypes/Accessible.h | 6 ++++++ accessible/generic/DocAccessible.h | 5 +++++ accessible/generic/LocalAccessible.h | 3 +++ accessible/generic/RootAccessible.h | 7 +++++++ accessible/ipc/RemoteAccessibleBase.h | 4 ++++ accessible/ipc/other/RemoteAccessible.h | 4 ++++ accessible/ipc/win/RemoteAccessible.h | 4 ++++ accessible/mac/AccessibleWrap.h | 4 ++++ accessible/mac/RootAccessibleWrap.h | 4 ++++ accessible/windows/msaa/AccessibleWrap.h | 4 ++++ accessible/windows/msaa/RootAccessibleWrap.h | 4 ++++ 13 files changed, 56 insertions(+) diff --git a/accessible/android/RootAccessibleWrap.h b/accessible/android/RootAccessibleWrap.h index 6f49f1e5f0af..5c5ba95f611b 100644 --- a/accessible/android/RootAccessibleWrap.h +++ b/accessible/android/RootAccessibleWrap.h @@ -14,6 +14,10 @@ class PresShell; namespace a11y { +/** + * Android specific functionality for the node at a root of the accessibility + * tree: see the RootAccessible superclass for further details. + */ class RootAccessibleWrap : public RootAccessible { public: RootAccessibleWrap(dom::Document* aDocument, PresShell* aPresShell); diff --git a/accessible/atk/AccessibleWrap.h b/accessible/atk/AccessibleWrap.h index dba176c11991..1827268c5faa 100644 --- a/accessible/atk/AccessibleWrap.h +++ b/accessible/atk/AccessibleWrap.h @@ -42,6 +42,9 @@ namespace a11y { class MaiHyperlink; /** + * Atk specific functionality for an accessibility tree node that originated in + * mDoc's content process. + * * AccessibleWrap, and its descendents in atk directory provide the * implementation of AtkObject. */ diff --git a/accessible/basetypes/Accessible.h b/accessible/basetypes/Accessible.h index 848ebcff719a..9e6b2083fae7 100644 --- a/accessible/basetypes/Accessible.h +++ b/accessible/basetypes/Accessible.h @@ -130,6 +130,12 @@ class KeyBinding { }; }; +/** + * The base type for an accessibility tree node. Methods and attributes in this + * class are available in both the content process and the parent process. + * Overrides for these methods live primarily in LocalAccessible and + * RemoteAccessibleBase. + */ class Accessible { protected: Accessible(); diff --git a/accessible/generic/DocAccessible.h b/accessible/generic/DocAccessible.h index ca1b86e21995..d986a1edd6ca 100644 --- a/accessible/generic/DocAccessible.h +++ b/accessible/generic/DocAccessible.h @@ -41,6 +41,11 @@ class RelatedAccIterator; template class TNotification; +/** + * An accessibility tree node that originated in a content process and + * represents a document. Tabs, in-process iframes, and out-of-process iframes + * all use this class to represent the doc they contain. + */ class DocAccessible : public HyperTextAccessibleWrap, public nsIDocumentObserver, public nsSupportsWeakReference, diff --git a/accessible/generic/LocalAccessible.h b/accessible/generic/LocalAccessible.h index 48e9a73bdc7a..0c4d17bc2023 100644 --- a/accessible/generic/LocalAccessible.h +++ b/accessible/generic/LocalAccessible.h @@ -81,6 +81,9 @@ typedef nsRefPtrHashtable, LocalAccessible> } \ } +/** + * An accessibility tree node that originated in mDoc's content process. + */ class LocalAccessible : public nsISupports, public Accessible { public: LocalAccessible(nsIContent* aContent, DocAccessible* aDoc); diff --git a/accessible/generic/RootAccessible.h b/accessible/generic/RootAccessible.h index 279bda1a270b..b1e7e42fdb40 100644 --- a/accessible/generic/RootAccessible.h +++ b/accessible/generic/RootAccessible.h @@ -17,6 +17,13 @@ class PresShell; namespace a11y { +/** + * The node at a root of the accessibility tree. This node originated in the + * current process. If this is the parent process, RootAccessible is the + * Accessible for the top-level window. If this is a content process, + * RootAccessible is a top-level content document in this process, which is + * either a tab document or an out-of-process iframe. + */ class RootAccessible : public DocAccessibleWrap, public nsIDOMEventListener { NS_DECL_ISUPPORTS_INHERITED diff --git a/accessible/ipc/RemoteAccessibleBase.h b/accessible/ipc/RemoteAccessibleBase.h index 61e3a90bf9fd..784301d17195 100644 --- a/accessible/ipc/RemoteAccessibleBase.h +++ b/accessible/ipc/RemoteAccessibleBase.h @@ -26,6 +26,10 @@ class DocAccessibleParent; class RemoteAccessible; enum class RelationType; +/** + * The base type for an accessibility tree node that originated in the parent + * process. + */ template class RemoteAccessibleBase : public Accessible, public HyperTextAccessibleBase { public: diff --git a/accessible/ipc/other/RemoteAccessible.h b/accessible/ipc/other/RemoteAccessible.h index afed32df27f2..57ba4db32870 100644 --- a/accessible/ipc/other/RemoteAccessible.h +++ b/accessible/ipc/other/RemoteAccessible.h @@ -19,6 +19,10 @@ namespace mozilla { namespace a11y { +/** + * Functionality common across Linux and macOS for an accessibility tree node + * that originated in the parent process. + */ class RemoteAccessible : public RemoteAccessibleBase { public: RemoteAccessible(uint64_t aID, RemoteAccessible* aParent, diff --git a/accessible/ipc/win/RemoteAccessible.h b/accessible/ipc/win/RemoteAccessible.h index 9aef913d5dcb..d3aace3607e5 100644 --- a/accessible/ipc/win/RemoteAccessible.h +++ b/accessible/ipc/win/RemoteAccessible.h @@ -19,6 +19,10 @@ namespace mozilla { namespace a11y { +/** + * Windows specific functionality for an accessibility tree node that originated + * in the parent process. + */ class RemoteAccessible : public RemoteAccessibleBase { public: RemoteAccessible(uint64_t aID, RemoteAccessible* aParent, diff --git a/accessible/mac/AccessibleWrap.h b/accessible/mac/AccessibleWrap.h index 33e280d35a70..4ece00cbd8ad 100644 --- a/accessible/mac/AccessibleWrap.h +++ b/accessible/mac/AccessibleWrap.h @@ -29,6 +29,10 @@ namespace mozilla { namespace a11y { +/** + * Mac specific functionality for an accessibility tree node that originated in + * mDoc's content process. + */ class AccessibleWrap : public LocalAccessible { public: // construction, destruction AccessibleWrap(nsIContent* aContent, DocAccessible* aDoc); diff --git a/accessible/mac/RootAccessibleWrap.h b/accessible/mac/RootAccessibleWrap.h index 0d165e3236c8..632233cfcf12 100644 --- a/accessible/mac/RootAccessibleWrap.h +++ b/accessible/mac/RootAccessibleWrap.h @@ -18,6 +18,10 @@ class PresShell; namespace a11y { +/** + * Mac specific functionality for the node at a root of the accessibility + * tree: see the RootAccessible superclass for further details. + */ class RootAccessibleWrap : public RootAccessible { public: RootAccessibleWrap(dom::Document* aDocument, PresShell* aPresShell); diff --git a/accessible/windows/msaa/AccessibleWrap.h b/accessible/windows/msaa/AccessibleWrap.h index 9913f807f666..8f9c944c9253 100644 --- a/accessible/windows/msaa/AccessibleWrap.h +++ b/accessible/windows/msaa/AccessibleWrap.h @@ -22,6 +22,10 @@ namespace mozilla { namespace a11y { class DocRemoteAccessibleWrap; +/** + * Windows specific functionality for an accessibility tree node that originated + * in mDoc's content process. + */ class AccessibleWrap : public LocalAccessible { public: // construction, destruction AccessibleWrap(nsIContent* aContent, DocAccessible* aDoc); diff --git a/accessible/windows/msaa/RootAccessibleWrap.h b/accessible/windows/msaa/RootAccessibleWrap.h index b37bc4fd9ba6..20b3e8edfc08 100644 --- a/accessible/windows/msaa/RootAccessibleWrap.h +++ b/accessible/windows/msaa/RootAccessibleWrap.h @@ -14,6 +14,10 @@ class PresShell; namespace a11y { +/** + * Windows specific functionality for the node at a root of the accessibility + * tree: see the RootAccessible superclass for further details. + */ class RootAccessibleWrap : public RootAccessible { public: RootAccessibleWrap(dom::Document* aDocument, PresShell* aPresShell);