Bug 814569 - get rid nsAccessNode, r=tbsaunde

This commit is contained in:
Alexander Surkov 2013-10-28 23:30:55 -04:00
parent b30f71f6b2
commit e5981d5541
38 changed files with 186 additions and 412 deletions

View File

@ -84,7 +84,7 @@ cpp_quote("//")
cpp_quote("//")
cpp_quote("// get_localInterface(/* [out] */ void **localInterface);")
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
cpp_quote("// Only available in Gecko's process - casts to an XPCOM nsAccessNode object pointer")
cpp_quote("// Only available in Gecko's process")
cpp_quote("//")
cpp_quote("//")
cpp_quote("// get_language(/* [out] */ BSTR *htmlText);")

View File

@ -52,7 +52,6 @@ public:
virtual ~AccessibleWrap();
void ShutdownAtkObject();
// nsAccessNode
virtual void Shutdown();
// return the atk object for this AccessibleWrap

View File

@ -45,7 +45,6 @@ public:
AtkSocketAccessible(nsIContent* aContent, DocAccessible* aDoc,
const nsCString& aPlugId);
// nsAccessNode
virtual void Shutdown();
// nsIAccessible

View File

@ -10,8 +10,7 @@ MODULE = 'accessibility'
EXPORTS += [
'AccEvent.h',
'nsAccessibilityService.h',
'nsAccessNode.h',
'nsAccessibilityService.h'
]
EXPORTS.mozilla.a11y += [
@ -45,7 +44,6 @@ SOURCES += [
'NotificationController.cpp',
'nsAccessibilityService.cpp',
'nsAccessiblePivot.cpp',
'nsAccessNode.cpp',
'nsAccUtils.cpp',
'nsCoreUtils.cpp',
'nsEventShell.cpp',

View File

@ -1,117 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsAccessNode.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "RootAccessible.h"
#include "nsIDocShell.h"
using namespace mozilla::a11y;
/* For documentation of the accessibility architecture,
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
*/
/*
* Class nsAccessNode
*/
////////////////////////////////////////////////////////////////////////////////
// AccessNode. nsISupports
NS_IMPL_CYCLE_COLLECTION_1(nsAccessNode, mContent)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsAccessNode)
NS_INTERFACE_MAP_ENTRY(nsAccessNode)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsAccessNode)
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(nsAccessNode, LastRelease())
////////////////////////////////////////////////////////////////////////////////
// nsAccessNode construction/desctruction
nsAccessNode::
nsAccessNode(nsIContent* aContent, DocAccessible* aDoc) :
mContent(aContent), mDoc(aDoc)
{
}
nsAccessNode::~nsAccessNode()
{
NS_ASSERTION(!mDoc, "LastRelease was never called!?!");
}
void nsAccessNode::LastRelease()
{
// First cleanup if needed...
if (mDoc) {
Shutdown();
NS_ASSERTION(!mDoc, "A Shutdown() impl forgot to call its parent's Shutdown?");
}
// ... then die.
delete this;
}
////////////////////////////////////////////////////////////////////////////////
// nsAccessNode public
void
nsAccessNode::Shutdown()
{
mContent = nullptr;
mDoc = nullptr;
}
RootAccessible*
nsAccessNode::RootAccessible() const
{
nsCOMPtr<nsIDocShell> docShell = nsCoreUtils::GetDocShellFor(GetNode());
NS_ASSERTION(docShell, "No docshell for mContent");
if (!docShell) {
return nullptr;
}
nsCOMPtr<nsIDocShellTreeItem> root;
docShell->GetRootTreeItem(getter_AddRefs(root));
NS_ASSERTION(root, "No root content tree item");
if (!root) {
return nullptr;
}
DocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
return docAcc ? docAcc->AsRoot() : nullptr;
}
nsIFrame*
nsAccessNode::GetFrame() const
{
return mContent ? mContent->GetPrimaryFrame() : nullptr;
}
nsINode*
nsAccessNode::GetNode() const
{
return mContent;
}
void
nsAccessNode::Language(nsAString& aLanguage)
{
aLanguage.Truncate();
if (!mDoc)
return;
nsCoreUtils::GetLanguageFor(mContent, nullptr, aLanguage);
if (aLanguage.IsEmpty()) { // Nothing found, so use document's language
mDoc->DocumentNode()->GetHeaderData(nsGkAtoms::headerContentLanguage,
aLanguage);
}
}

View File

@ -1,94 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* For documentation of the accessibility architecture,
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
*/
#ifndef _nsAccessNode_H_
#define _nsAccessNode_H_
#include "nsINode.h"
class nsIContent;
class nsIFrame;
namespace mozilla {
namespace a11y {
class DocAccessible;
class RootAccessible;
class nsAccessNode : public nsISupports
{
public:
nsAccessNode(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsAccessNode();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(nsAccessNode)
/**
* Return the document accessible for this access node.
*/
DocAccessible* Document() const { return mDoc; }
/**
* Return the root document accessible for this accessnode.
*/
a11y::RootAccessible* RootAccessible() const;
/**
* Shutdown the access node object.
*/
virtual void Shutdown();
/**
* Return frame for the given access node object.
*/
virtual nsIFrame* GetFrame() const;
/**
* Return DOM node associated with the accessible.
*/
virtual nsINode* GetNode() const;
nsIContent* GetContent() const { return mContent; }
/**
* Return node type information of DOM node associated with the accessible.
*/
bool IsContent() const
{
return GetNode() && GetNode()->IsNodeOfType(nsINode::eCONTENT);
}
/**
* Return the unique identifier of the accessible.
*/
void* UniqueID() { return static_cast<void*>(this); }
/**
* Interface methods on nsIAccessible shared with ISimpleDOM.
*/
void Language(nsAString& aLocale);
protected:
void LastRelease();
nsCOMPtr<nsIContent> mContent;
DocAccessible* mDoc;
private:
nsAccessNode() MOZ_DELETE;
nsAccessNode(const nsAccessNode&) MOZ_DELETE;
nsAccessNode& operator =(const nsAccessNode&) MOZ_DELETE;
};
} // namespace a11y
} // namespace mozilla
#endif

View File

@ -40,7 +40,7 @@ NS_IMPL_ISUPPORTS_INHERITED1(ARIAGridAccessible,
nsIAccessibleTable)
////////////////////////////////////////////////////////////////////////////////
//nsAccessNode
// Accessible
void
ARIAGridAccessible::Shutdown()

View File

@ -36,8 +36,6 @@ public:
// Accessible
virtual TableAccessible* AsTable() { return this; }
// nsAccessNode
virtual void Shutdown();
// TableAccessible

View File

@ -88,69 +88,27 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
// Accessible. nsISupports
// Accessible: nsISupports and cycle collection
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(Accessible, nsAccessNode,
mParent, mChildren)
NS_IMPL_CYCLE_COLLECTION_3(Accessible,
mContent, mParent, mChildren)
NS_IMPL_ADDREF_INHERITED(Accessible, nsAccessNode)
NS_IMPL_RELEASE_INHERITED(Accessible, nsAccessNode)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Accessible)
NS_INTERFACE_MAP_ENTRY(nsIAccessible)
if (aIID.Equals(NS_GET_IID(Accessible)))
foundInterface = static_cast<nsIAccessible*>(this);
else
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleSelectable, IsSelect())
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleValue, HasNumericValue())
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleHyperLink, IsLink())
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAccessible)
NS_INTERFACE_MAP_END
nsresult
Accessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
// Custom-built QueryInterface() knows when we support nsIAccessibleSelectable
// based on role attribute and aria-multiselectable
*aInstancePtr = nullptr;
if (aIID.Equals(NS_GET_IID(nsXPCOMCycleCollectionParticipant))) {
*aInstancePtr = NS_CYCLE_COLLECTION_PARTICIPANT(Accessible);
return NS_OK;
}
if (aIID.Equals(NS_GET_IID(nsIAccessible))) {
*aInstancePtr = static_cast<nsIAccessible*>(this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(NS_GET_IID(Accessible))) {
*aInstancePtr = static_cast<Accessible*>(this);
NS_ADDREF_THIS();
return NS_OK;
}
if (aIID.Equals(NS_GET_IID(nsIAccessibleSelectable))) {
if (IsSelect()) {
*aInstancePtr = static_cast<nsIAccessibleSelectable*>(this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_ERROR_NO_INTERFACE;
}
if (aIID.Equals(NS_GET_IID(nsIAccessibleValue))) {
if (HasNumericValue()) {
*aInstancePtr = static_cast<nsIAccessibleValue*>(this);
NS_ADDREF_THIS();
return NS_OK;
}
}
if (aIID.Equals(NS_GET_IID(nsIAccessibleHyperLink))) {
if (IsLink()) {
*aInstancePtr = static_cast<nsIAccessibleHyperLink*>(this);
NS_ADDREF_THIS();
return NS_OK;
}
return NS_ERROR_NO_INTERFACE;
}
return nsAccessNode::QueryInterface(aIID, aInstancePtr);
}
NS_IMPL_CYCLE_COLLECTING_ADDREF(Accessible)
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(Accessible, LastRelease())
Accessible::Accessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessNode(aContent, aDoc),
mContent(aContent), mDoc(aDoc),
mParent(nullptr), mIndexInParent(-1), mChildrenFlags(eChildrenUninitialized),
mStateFlags(0), mType(0), mGenericTypes(0), mIndexOfEmbeddedChild(-1),
mRoleMapEntry(nullptr)
@ -175,11 +133,9 @@ Accessible::Accessible(nsIContent* aContent, DocAccessible* aDoc) :
#endif
}
//-----------------------------------------------------
// destruction
//-----------------------------------------------------
Accessible::~Accessible()
{
NS_ASSERTION(!mDoc, "LastRelease was never called!?!");
}
NS_IMETHODIMP
@ -2624,9 +2580,6 @@ Accessible::AppendTextTo(nsAString& aText, uint32_t aStartOffset,
}
}
////////////////////////////////////////////////////////////////////////////////
// nsAccessNode public methods
void
Accessible::Shutdown()
{
@ -2638,7 +2591,8 @@ Accessible::Shutdown()
if (mParent)
mParent->RemoveChild(this);
nsAccessNode::Shutdown();
mContent = nullptr;
mDoc = nullptr;
}
// Accessible protected
@ -2716,6 +2670,53 @@ Accessible::UnbindFromParent()
////////////////////////////////////////////////////////////////////////////////
// Accessible public methods
RootAccessible*
Accessible::RootAccessible() const
{
nsCOMPtr<nsIDocShell> docShell = nsCoreUtils::GetDocShellFor(GetNode());
NS_ASSERTION(docShell, "No docshell for mContent");
if (!docShell) {
return nullptr;
}
nsCOMPtr<nsIDocShellTreeItem> root;
docShell->GetRootTreeItem(getter_AddRefs(root));
NS_ASSERTION(root, "No root content tree item");
if (!root) {
return nullptr;
}
DocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
return docAcc ? docAcc->AsRoot() : nullptr;
}
nsIFrame*
Accessible::GetFrame() const
{
return mContent ? mContent->GetPrimaryFrame() : nullptr;
}
nsINode*
Accessible::GetNode() const
{
return mContent;
}
void
Accessible::Language(nsAString& aLanguage)
{
aLanguage.Truncate();
if (!mDoc)
return;
nsCoreUtils::GetLanguageFor(mContent, nullptr, aLanguage);
if (aLanguage.IsEmpty()) { // Nothing found, so use document's language
mDoc->DocumentNode()->GetHeaderData(nsGkAtoms::headerContentLanguage,
aLanguage);
}
}
void
Accessible::InvalidateChildren()
{
@ -3127,6 +3128,19 @@ Accessible::ContainerWidget() const
////////////////////////////////////////////////////////////////////////////////
// Accessible protected methods
void
Accessible::LastRelease()
{
// First cleanup if needed...
if (mDoc) {
Shutdown();
NS_ASSERTION(!mDoc,
"A Shutdown() impl forgot to call its parent's Shutdown?");
}
// ... then die.
delete this;
}
void
Accessible::CacheChildren()
{

View File

@ -10,7 +10,6 @@
#include "mozilla/a11y/RelationType.h"
#include "mozilla/a11y/Role.h"
#include "mozilla/a11y/States.h"
#include "nsAccessNode.h"
#include "nsIAccessible.h"
#include "nsIAccessibleHyperLink.h"
@ -36,6 +35,7 @@ namespace a11y {
class Accessible;
class AccEvent;
class AccGroupInfo;
class DocAccessible;
class EmbeddedObjCollector;
class HTMLImageMapAccessible;
class HTMLLIAccessible;
@ -43,6 +43,7 @@ class HyperTextAccessible;
class ImageAccessible;
class KeyBinding;
class Relation;
class RootAccessible;
class TableAccessible;
class TableCellAccessible;
class TextLeafAccessible;
@ -101,8 +102,7 @@ typedef nsRefPtrHashtable<nsPtrHashKey<const void>, Accessible>
{ 0xbd, 0x50, 0x42, 0x6b, 0xd1, 0xd6, 0xe1, 0xad } \
}
class Accessible : public nsAccessNode,
public nsIAccessible,
class Accessible : public nsIAccessible,
public nsIAccessibleHyperLink,
public nsIAccessibleSelectable,
public nsIAccessibleValue
@ -111,8 +111,8 @@ public:
Accessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~Accessible();
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(Accessible, nsAccessNode)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(Accessible, nsIAccessible)
NS_DECL_NSIACCESSIBLE
NS_DECL_NSIACCESSIBLEHYPERLINK
@ -120,14 +120,51 @@ public:
NS_DECL_NSIACCESSIBLEVALUE
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLE_IMPL_IID)
//////////////////////////////////////////////////////////////////////////////
// nsAccessNode
virtual void Shutdown();
//////////////////////////////////////////////////////////////////////////////
// Public methods
/**
* Return the document accessible for this accessible.
*/
DocAccessible* Document() const { return mDoc; }
/**
* Return the root document accessible for this accessible.
*/
a11y::RootAccessible* RootAccessible() const;
/**
* Return frame for this accessible.
*/
virtual nsIFrame* GetFrame() const;
/**
* Return DOM node associated with the accessible.
*/
virtual nsINode* GetNode() const;
inline already_AddRefed<nsIDOMNode> DOMNode() const
{
nsCOMPtr<nsIDOMNode> DOMNode = do_QueryInterface(GetNode());
return DOMNode.forget();
}
nsIContent* GetContent() const { return mContent; }
/**
* Return node type information of DOM node associated with the accessible.
*/
bool IsContent() const
{ return GetNode() && GetNode()->IsNodeOfType(nsINode::eCONTENT); }
/**
* Return the unique identifier of the accessible.
*/
void* UniqueID() { return static_cast<void*>(this); }
/**
* Return language associated with the accessible.
*/
void Language(nsAString& aLocale);
/**
* Get the description of this accessible.
*/
@ -146,15 +183,6 @@ public:
*/
virtual ENameValueFlag Name(nsString& aName);
/**
* Return DOM node associated with this accessible.
*/
inline already_AddRefed<nsIDOMNode> DOMNode() const
{
nsCOMPtr<nsIDOMNode> DOMNode = do_QueryInterface(GetNode());
return DOMNode.forget();
}
/**
* Maps ARIA state attributes to state of accessible. Note the given state
* argument should hold states for accessible before you pass it into this
@ -300,6 +328,11 @@ public:
//////////////////////////////////////////////////////////////////////////////
// Initializing methods
/**
* Shutdown this accessible object.
*/
virtual void Shutdown();
/**
* Set the ARIA role map entry for a new accessible.
*/
@ -384,7 +417,6 @@ public:
return childCount != 0 ? GetChildAt(childCount - 1) : nullptr;
}
/**
* Return embedded accessible children count.
*/
@ -756,6 +788,11 @@ protected:
//////////////////////////////////////////////////////////////////////////////
// Initializing, cache and tree traverse methods
/**
* Destroy the object.
*/
void LastRelease();
/**
* Cache accessible children.
*/
@ -900,6 +937,9 @@ protected:
AccGroupInfo* GetGroupInfo();
// Data Members
nsCOMPtr<nsIContent> mContent;
DocAccessible* mDoc;
nsRefPtr<Accessible> mParent;
nsTArray<nsRefPtr<Accessible> > mChildren;
int32_t mIndexInParent;
@ -932,6 +972,12 @@ protected:
* Non-null indicates author-supplied role; possibly state & value as well
*/
nsRoleMapEntry* mRoleMapEntry;
private:
Accessible() MOZ_DELETE;
Accessible(const Accessible&) MOZ_DELETE;
Accessible& operator =(const Accessible&) MOZ_DELETE;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Accessible,

View File

@ -265,7 +265,7 @@ ApplicationAccessible::GetPlatformVersion(nsAString& aVersion)
}
////////////////////////////////////////////////////////////////////////////////
// nsAccessNode public methods
// Accessible public methods
void
ApplicationAccessible::Shutdown()
@ -273,10 +273,6 @@ ApplicationAccessible::Shutdown()
mAppInfo = nullptr;
}
////////////////////////////////////////////////////////////////////////////////
// Accessible public methods
void
ApplicationAccessible::ApplyARIAState(uint64_t* aState) const
{

View File

@ -57,10 +57,8 @@ public:
// nsIAccessibleApplication
NS_DECL_NSIACCESSIBLEAPPLICATION
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
virtual GroupPos GroupPosition();
virtual ENameValueFlag Name(nsString& aName);

View File

@ -155,7 +155,7 @@ LinkableAccessible::AccessKey() const
}
////////////////////////////////////////////////////////////////////////////////
// LinkableAccessible. nsAccessNode
// LinkableAccessible. Accessible
void
LinkableAccessible::Shutdown()

View File

@ -64,10 +64,8 @@ public:
NS_IMETHOD DoAction(uint8_t index);
NS_IMETHOD TakeFocus();
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual void Value(nsString& aValue);
virtual uint64_t NativeLinkState() const;

View File

@ -552,7 +552,7 @@ DocAccessible::GetAccessible(nsINode* aNode) const
}
////////////////////////////////////////////////////////////////////////////////
// nsAccessNode
// Accessible
void
DocAccessible::Init()

View File

@ -71,14 +71,13 @@ public:
// nsIDocumentObserver
NS_DECL_NSIDOCUMENTOBSERVER
// nsAccessNode
// Accessible
virtual void Init();
virtual void Shutdown();
virtual nsIFrame* GetFrame() const;
virtual nsINode* GetNode() const { return mDocumentNode; }
nsIDocument* DocumentNode() const { return mDocumentNode; }
// Accessible
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName);
virtual void Description(nsString& aDescription);
virtual Accessible* FocusedChild();
@ -222,7 +221,7 @@ public:
/**
* Return the cached accessible by the given unique ID within this document.
*
* @note the unique ID matches with the uniqueID() of nsAccessNode
* @note the unique ID matches with the uniqueID() of Accessible
*
* @param aUniqueID [in] the unique ID used to cache the node.
*/

View File

@ -102,7 +102,7 @@ OuterDocAccessible::DoAction(uint8_t aIndex)
}
////////////////////////////////////////////////////////////////////////////////
// nsAccessNode public
// Accessible public
void
OuterDocAccessible::Shutdown()
@ -133,9 +133,6 @@ OuterDocAccessible::Shutdown()
AccessibleWrap::Shutdown();
}
////////////////////////////////////////////////////////////////////////////////
// Accessible public
void
OuterDocAccessible::InvalidateChildren()
{

View File

@ -33,10 +33,8 @@ public:
NS_IMETHOD GetActionDescription(uint8_t aIndex, nsAString& aDescription);
NS_IMETHOD DoAction(uint8_t aIndex);
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual mozilla::a11y::role NativeRole();
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
EWhichChildAtPoint aWhichChild);

View File

@ -467,12 +467,12 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
////////////////////////////////////////////////////////////////////////////////
// nsAccessNode
// Accessible
void
RootAccessible::Shutdown()
{
// Called manually or by nsAccessNode::LastRelease()
// Called manually or by Accessible::LastRelease()
if (!PresShell())
return; // Already shutdown

View File

@ -29,10 +29,8 @@ public:
// nsIDOMEventListener
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName);
virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
virtual mozilla::a11y::role NativeRole();

View File

@ -147,7 +147,7 @@ HTMLListBulletAccessible::
}
////////////////////////////////////////////////////////////////////////////////
// HTMLListBulletAccessible: nsAccessNode
// HTMLListBulletAccessible: Accessible
nsIFrame*
HTMLListBulletAccessible::GetFrame() const
@ -156,9 +156,6 @@ HTMLListBulletAccessible::GetFrame() const
return blockFrame ? blockFrame->GetBullet() : nullptr;
}
////////////////////////////////////////////////////////////////////////////////
// HTMLListBulletAccessible: Accessible
ENameValueFlag
HTMLListBulletAccessible::Name(nsString &aName)
{

View File

@ -46,14 +46,12 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsAccessNode
virtual void Shutdown();
// nsIAccessible
NS_IMETHOD GetBounds(int32_t* aX, int32_t* aY,
int32_t* aWidth, int32_t* aHeight);
// Accessible
virtual void Shutdown();
virtual a11y::role NativeRole();
virtual uint64_t NativeState();
@ -78,10 +76,8 @@ public:
HTMLListBulletAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~HTMLListBulletAccessible() { }
// nsAccessNode
virtual nsIFrame* GetFrame() const;
// Accessible
virtual nsIFrame* GetFrame() const;
virtual ENameValueFlag Name(nsString& aName);
virtual a11y::role NativeRole();
virtual uint64_t NativeState();

View File

@ -595,7 +595,7 @@ HTMLComboboxListAccessible::
}
////////////////////////////////////////////////////////////////////////////////
// HTMLComboboxAccessible: nsAccessNode
// HTMLComboboxAccessible: Accessible
nsIFrame*
HTMLComboboxListAccessible::GetFrame() const
@ -612,9 +612,6 @@ HTMLComboboxListAccessible::GetFrame() const
return nullptr;
}
////////////////////////////////////////////////////////////////////////////////
// HTMLComboboxAccessible: Accessible
role
HTMLComboboxListAccessible::NativeRole()
{

View File

@ -175,10 +175,8 @@ public:
NS_IMETHOD DoAction(uint8_t index);
NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName);
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual void Description(nsString& aDescription);
virtual void Value(nsString& aValue);
virtual a11y::role NativeRole();
@ -221,10 +219,8 @@ public:
DocAccessible* aDoc);
virtual ~HTMLComboboxListAccessible() {}
// nsAccessNode
virtual nsIFrame* GetFrame() const;
// Accessible
virtual nsIFrame* GetFrame() const;
virtual a11y::role NativeRole();
virtual uint64_t NativeState();
virtual void GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame);

View File

@ -365,7 +365,7 @@ NS_IMPL_ISUPPORTS_INHERITED1(HTMLTableAccessible, Accessible,
nsIAccessibleTable)
////////////////////////////////////////////////////////////////////////////////
//nsAccessNode
// HTMLTableAccessible: Accessible
void
HTMLTableAccessible::Shutdown()
@ -374,10 +374,6 @@ HTMLTableAccessible::Shutdown()
AccessibleWrap::Shutdown();
}
////////////////////////////////////////////////////////////////////////////////
// HTMLTableAccessible: Accessible implementation
void
HTMLTableAccessible::CacheChildren()
{

View File

@ -163,10 +163,8 @@ public:
virtual bool IsProbablyLayoutTable();
virtual Accessible* AsAccessible() { return this; }
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual TableAccessible* AsTable() { return this; }
virtual void Description(nsString& aDescription);
virtual a11y::role NativeRole();

View File

@ -77,7 +77,7 @@ DocAccessibleWrap::get_accValue(VARIANT aVarChild, BSTR __RPC_FAR* aValue)
}
////////////////////////////////////////////////////////////////////////////////
// nsAccessNode
// Accessible
void
DocAccessibleWrap::Shutdown()

View File

@ -28,7 +28,7 @@ public:
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ BSTR __RPC_FAR *pszValue);
// nsAccessNode
// Accessible
virtual void Shutdown();
// DocAccessible

View File

@ -25,7 +25,7 @@ HTMLWin32ObjectOwnerAccessible::
}
////////////////////////////////////////////////////////////////////////////////
// HTMLWin32ObjectOwnerAccessible: nsAccessNode implementation
// HTMLWin32ObjectOwnerAccessible: Accessible implementation
void
HTMLWin32ObjectOwnerAccessible::Shutdown()
@ -34,9 +34,6 @@ HTMLWin32ObjectOwnerAccessible::Shutdown()
mNativeAccessible = nullptr;
}
////////////////////////////////////////////////////////////////////////////////
// HTMLWin32ObjectOwnerAccessible: Accessible implementation
role
HTMLWin32ObjectOwnerAccessible::NativeRole()
{

View File

@ -26,10 +26,8 @@ public:
DocAccessible* aDoc, void* aHwnd);
virtual ~HTMLWin32ObjectOwnerAccessible() {}
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual mozilla::a11y::role NativeRole();
virtual bool NativelyUnavailable() const;

View File

@ -133,7 +133,7 @@ XULListboxAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
}
////////////////////////////////////////////////////////////////////////////////
//nsAccessNode
// Accessible
void
XULListboxAccessible::Shutdown()

View File

@ -92,10 +92,8 @@ public:
virtual void UnselectRow(uint32_t aRowIdx);
virtual Accessible* AsAccessible() { return this; }
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual void Value(nsString& aValue);
virtual TableAccessible* AsTable() { return this; }
virtual a11y::role NativeRole();

View File

@ -36,7 +36,7 @@ XULSelectControlAccessible::
}
////////////////////////////////////////////////////////////////////////////////
// XULSelectControlAccessible: nsAccessNode
// XULSelectControlAccessible: Accessible
void
XULSelectControlAccessible::Shutdown()

View File

@ -22,7 +22,7 @@ public:
XULSelectControlAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~XULSelectControlAccessible() {}
// nsAccessNode
// Accessible
virtual void Shutdown();
// SelectAccessible

View File

@ -134,7 +134,7 @@ XULTreeAccessible::Value(nsString& aValue)
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeAccessible: nsAccessNode implementation
// XULTreeAccessible: Accessible implementation
void
XULTreeAccessible::Shutdown()
@ -151,9 +151,6 @@ XULTreeAccessible::Shutdown()
AccessibleWrap::Shutdown();
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeAccessible: Accessible implementation (put methods here)
role
XULTreeAccessible::NativeRole()
{
@ -889,7 +886,7 @@ XULTreeItemAccessibleBase::DoAction(uint8_t aIndex)
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeItemAccessibleBase: nsAccessNode implementation
// XULTreeItemAccessibleBase: Accessible implementation
void
XULTreeItemAccessibleBase::Shutdown()
@ -901,10 +898,6 @@ XULTreeItemAccessibleBase::Shutdown()
AccessibleWrap::Shutdown();
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeItemAccessibleBase: Accessible public methods
// nsIAccessible::groupPosition
GroupPos
XULTreeItemAccessibleBase::GroupPosition()
{
@ -1134,7 +1127,7 @@ XULTreeItemAccessible::Name(nsString& aName)
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeItemAccessible: nsAccessNode implementation
// XULTreeItemAccessible: Accessible implementation
void
XULTreeItemAccessible::Shutdown()
@ -1143,9 +1136,6 @@ XULTreeItemAccessible::Shutdown()
XULTreeItemAccessibleBase::Shutdown();
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeItemAccessible: Accessible implementation
role
XULTreeItemAccessible::NativeRole()
{

View File

@ -38,10 +38,8 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeAccessible, Accessible)
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual void Value(nsString& aValue);
virtual a11y::role NativeRole();
virtual uint64_t NativeState();
@ -155,10 +153,8 @@ public:
NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName);
NS_IMETHOD DoAction(uint8_t aIndex);
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual GroupPos GroupPosition();
virtual uint64_t NativeState();
virtual uint64_t NativeInteractiveState() const;
@ -236,10 +232,8 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeItemAccessible,
XULTreeItemAccessibleBase)
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual ENameValueFlag Name(nsString& aName);
virtual a11y::role NativeRole();

View File

@ -220,7 +220,7 @@ XULTreeGridAccessible::UnselectRow(uint32_t aRowIdx)
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeGridAccessible: nsAccessNode implementation
// XULTreeGridAccessible: Accessible implementation
void
XULTreeGridAccessible::Shutdown()
@ -229,9 +229,6 @@ XULTreeGridAccessible::Shutdown()
XULTreeAccessible::Shutdown();
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeGridAccessible: Accessible implementation
role
XULTreeGridAccessible::NativeRole()
{
@ -291,7 +288,7 @@ NS_IMPL_RELEASE_INHERITED(XULTreeGridRowAccessible,
XULTreeItemAccessibleBase)
////////////////////////////////////////////////////////////////////////////////
// XULTreeGridRowAccessible: nsAccessNode implementation
// XULTreeGridRowAccessible: Accessible implementation
void
XULTreeGridRowAccessible::Shutdown()
@ -300,9 +297,6 @@ XULTreeGridRowAccessible::Shutdown()
XULTreeItemAccessibleBase::Shutdown();
}
////////////////////////////////////////////////////////////////////////////////
// XULTreeGridRowAccessible: Accessible implementation
role
XULTreeGridRowAccessible::NativeRole()
{

View File

@ -54,10 +54,8 @@ public:
virtual void UnselectRow(uint32_t aRowIdx);
virtual Accessible* AsAccessible() { return this; }
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual TableAccessible* AsTable() { return this; }
virtual a11y::role NativeRole();
@ -86,10 +84,8 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeGridRowAccessible,
XULTreeItemAccessibleBase)
// nsAccessNode
virtual void Shutdown();
// Accessible
virtual void Shutdown();
virtual a11y::role NativeRole();
virtual ENameValueFlag Name(nsString& aName);
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,