Bug 758870 - de-ns-ify nsDocAccessible, r=surkov, f=tbsaunde

--HG--
rename : accessible/src/atk/nsDocAccessibleWrap.cpp => accessible/src/atk/DocAccessibleWrap.cpp
rename : accessible/src/atk/nsDocAccessibleWrap.h => accessible/src/atk/DocAccessibleWrap.h
rename : accessible/src/base/nsDocAccessible.cpp => accessible/src/generic/DocAccessible.cpp
rename : accessible/src/base/nsDocAccessible.h => accessible/src/generic/DocAccessible.h
rename : accessible/src/mac/nsDocAccessibleWrap.h => accessible/src/mac/DocAccessibleWrap.h
rename : accessible/src/mac/nsDocAccessibleWrap.mm => accessible/src/mac/DocAccessibleWrap.mm
rename : accessible/src/msaa/nsDocAccessibleWrap.cpp => accessible/src/msaa/DocAccessibleWrap.cpp
rename : accessible/src/msaa/nsDocAccessibleWrap.h => accessible/src/msaa/DocAccessibleWrap.h
rename : accessible/src/other/nsDocAccessibleWrap.h => accessible/src/other/DocAccessibleWrap.h
This commit is contained in:
Mark Capella 2012-05-27 05:01:40 -04:00
parent adc7741a4c
commit 4197b59355
146 changed files with 732 additions and 704 deletions

View File

@ -113,7 +113,7 @@ mai_atk_component_iface_init(AtkComponentIface* aIface)
}
AtkSocketAccessible::AtkSocketAccessible(nsIContent* aContent,
nsDocAccessible* aDoc,
DocAccessible* aDoc,
const nsCString& aPlugId) :
nsAccessibleWrap(aContent, aDoc)
{

View File

@ -39,7 +39,7 @@ public:
*/
static bool gCanEmbed;
AtkSocketAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
AtkSocketAccessible(nsIContent* aContent, DocAccessible* aDoc,
const nsCString& aPlugId);
// nsAccessNode

View File

@ -5,20 +5,20 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsMai.h"
#include "nsDocAccessibleWrap.h"
#include "DocAccessibleWrap.h"
////////////////////////////////////////////////////////////////////////////////
// nsDocAccessibleWrap
// DocAccessibleWrap
////////////////////////////////////////////////////////////////////////////////
nsDocAccessibleWrap::
nsDocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
nsDocAccessible(aDocument, aRootContent, aPresShell), mActivated(false)
DocAccessibleWrap::
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
DocAccessible(aDocument, aRootContent, aPresShell), mActivated(false)
{
}
nsDocAccessibleWrap::~nsDocAccessibleWrap()
DocAccessibleWrap::~DocAccessibleWrap()
{
}

View File

@ -8,17 +8,17 @@
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
*/
#ifndef _nsDocAccessibleWrap_H_
#define _nsDocAccessibleWrap_H_
#ifndef mozilla_a11y_DocAccessibleWrap_h__
#define mozilla_a11y_DocAccessibleWrap_h__
#include "nsDocAccessible.h"
#include "DocAccessible.h"
class nsDocAccessibleWrap: public nsDocAccessible
class DocAccessibleWrap : public DocAccessible
{
public:
nsDocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell);
virtual ~nsDocAccessibleWrap();
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell);
virtual ~DocAccessibleWrap();
bool mActivated;
};

View File

@ -17,9 +17,9 @@ LIBXUL_LIBRARY = 1
CPPSRCS = \
AtkSocketAccessible.cpp \
DocAccessibleWrap.cpp \
nsAccessNodeWrap.cpp \
nsAccessibleWrap.cpp \
nsDocAccessibleWrap.cpp \
ApplicationAccessibleWrap.cpp \
nsMaiInterfaceComponent.cpp \
nsMaiInterfaceAction.cpp \

View File

@ -20,7 +20,7 @@
//-----------------------------------------------------
nsAccessNodeWrap::
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessNodeWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessNode(aContent, aDoc)
{
}

View File

@ -16,7 +16,7 @@
class nsAccessNodeWrap : public nsAccessNode
{
public: // construction, destruction
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessNodeWrap(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsAccessNodeWrap();
static void InitAccessibility();

View File

@ -237,7 +237,7 @@ PRInt32 nsAccessibleWrap::mAccWrapDeleted = 0;
#endif
nsAccessibleWrap::
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessible(aContent, aDoc), mAtkObject(nsnull)
{
#ifdef MAI_LOGGING

View File

@ -50,7 +50,7 @@ class MaiHyperlink;
class nsAccessibleWrap: public nsAccessible
{
public:
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsAccessibleWrap();
void ShutdownAtkObject();

View File

@ -7,7 +7,7 @@
#include "InterfaceInitFuncs.h"
#include "nsAccessibleWrap.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsMai.h"
static const char* const kDocTypeName = "W3C-doctype";
@ -73,7 +73,7 @@ getDocumentAttributesCB(AtkDocument *aDocument)
// according to atkobject.h, AtkAttributeSet is a GSList
GSList* attributes = nsnull;
nsDocAccessible* document = accWrap->AsDoc();
DocAccessible* document = accWrap->AsDoc();
nsAutoString aURL;
nsresult rv = document->GetURL(aURL);
if (NS_SUCCEEDED(rv))
@ -100,7 +100,7 @@ getDocumentAttributeValueCB(AtkDocument *aDocument,
if (!accWrap || !accWrap->IsDoc())
return nsnull;
nsDocAccessible* document = accWrap->AsDoc();
DocAccessible* document = accWrap->AsDoc();
nsresult rv;
nsAutoString attrValue;
if (!strcasecmp(aAttrName, kDocTypeName))

View File

@ -8,7 +8,7 @@
#include "ApplicationAccessibleWrap.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsIAccessibleText.h"
#include "nsAccEvent.h"
#include "States.h"
@ -64,7 +64,7 @@ AccEvent::GetNode()
return mNode;
}
nsDocAccessible*
DocAccessible*
AccEvent::GetDocAccessible()
{
if (mAccessible)
@ -109,7 +109,7 @@ nsAccessible*
AccEvent::GetAccessibleForNode() const
{
if (mNode) {
nsDocAccessible* document =
DocAccessible* document =
GetAccService()->GetDocAccessible(mNode->OwnerDoc());
if (document)
return document->GetAccessible(mNode);
@ -211,7 +211,7 @@ AccStateChangeEvent::CreateXPCOMObject()
////////////////////////////////////////////////////////////////////////////////
// Note: we pass in eAllowDupes to the base class because we don't support text
// events coalescence. We fire delayed text change events in nsDocAccessible but
// events coalescence. We fire delayed text change events in DocAccessible but
// we continue to base the event off the accessible object rather than just the
// node. This means we won't try to create an accessible based on the node when
// we are ready to fire the event and so we will no longer assert at that point

View File

@ -11,7 +11,7 @@
#include "nsAccessible.h"
class nsAccEvent;
class nsDocAccessible;
class DocAccessible;
// Constants used to point whether the event is from user input.
enum EIsFromUserInput
@ -74,7 +74,7 @@ public:
bool IsFromUserInput() const { return mIsFromUserInput; }
nsAccessible *GetAccessible();
nsDocAccessible* GetDocAccessible();
DocAccessible* GetDocAccessible();
nsINode* GetNode();
/**

View File

@ -74,7 +74,7 @@ AccIterator::IteratorState::IteratorState(nsAccessible *aParent,
////////////////////////////////////////////////////////////////////////////////
RelatedAccIterator::
RelatedAccIterator(nsDocAccessible* aDocument, nsIContent* aDependentContent,
RelatedAccIterator(DocAccessible* aDocument, nsIContent* aDependentContent,
nsIAtom* aRelAttr) :
mDocument(aDocument), mRelAttr(aRelAttr), mProviders(nsnull),
mBindingParent(nsnull), mIndex(0)
@ -95,7 +95,7 @@ RelatedAccIterator::Next()
return nsnull;
while (mIndex < mProviders->Length()) {
nsDocAccessible::AttrRelProvider* provider = (*mProviders)[mIndex++];
DocAccessible::AttrRelProvider* provider = (*mProviders)[mIndex++];
// Return related accessible for the given attribute and if the provider
// content is in the same binding in the case of XBL usage.
@ -126,7 +126,7 @@ RelatedAccIterator::Next()
////////////////////////////////////////////////////////////////////////////////
HTMLLabelIterator::
HTMLLabelIterator(nsDocAccessible* aDocument, const nsAccessible* aAccessible,
HTMLLabelIterator(DocAccessible* aDocument, const nsAccessible* aAccessible,
LabelFilter aFilter) :
mRelIter(aDocument, aAccessible->GetContent(), nsGkAtoms::_for),
mAcc(aAccessible), mLabelFilter(aFilter)
@ -177,7 +177,7 @@ HTMLLabelIterator::Next()
////////////////////////////////////////////////////////////////////////////////
HTMLOutputIterator::
HTMLOutputIterator(nsDocAccessible* aDocument, nsIContent* aElement) :
HTMLOutputIterator(DocAccessible* aDocument, nsIContent* aElement) :
mRelIter(aDocument, aElement, nsGkAtoms::_for)
{
}
@ -200,7 +200,7 @@ HTMLOutputIterator::Next()
////////////////////////////////////////////////////////////////////////////////
XULLabelIterator::
XULLabelIterator(nsDocAccessible* aDocument, nsIContent* aElement) :
XULLabelIterator(DocAccessible* aDocument, nsIContent* aElement) :
mRelIter(aDocument, aElement, nsGkAtoms::control)
{
}
@ -223,7 +223,7 @@ XULLabelIterator::Next()
////////////////////////////////////////////////////////////////////////////////
XULDescriptionIterator::
XULDescriptionIterator(nsDocAccessible* aDocument, nsIContent* aElement) :
XULDescriptionIterator(DocAccessible* aDocument, nsIContent* aElement) :
mRelIter(aDocument, aElement, nsGkAtoms::control)
{
}
@ -245,7 +245,7 @@ XULDescriptionIterator::Next()
////////////////////////////////////////////////////////////////////////////////
IDRefsIterator::
IDRefsIterator(nsDocAccessible* aDoc, nsIContent* aContent,
IDRefsIterator(DocAccessible* aDoc, nsIContent* aContent,
nsIAtom* aIDRefsAttr) :
mContent(aContent), mDoc(aDoc), mCurrIdx(0)
{

View File

@ -10,7 +10,7 @@
#include "nsAccessibilityService.h"
#include "filters.h"
#include "nscore.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsIDOMDocumentXBL.h"
@ -98,7 +98,7 @@ public:
* @param aRelAttr [in] relation attribute that relations are
* pointed by
*/
RelatedAccIterator(nsDocAccessible* aDocument, nsIContent* aDependentContent,
RelatedAccIterator(DocAccessible* aDocument, nsIContent* aDependentContent,
nsIAtom* aRelAttr);
virtual ~RelatedAccIterator() { }
@ -113,9 +113,9 @@ private:
RelatedAccIterator(const RelatedAccIterator&);
RelatedAccIterator& operator = (const RelatedAccIterator&);
nsDocAccessible* mDocument;
DocAccessible* mDocument;
nsIAtom* mRelAttr;
nsDocAccessible::AttrRelProviderArray* mProviders;
DocAccessible::AttrRelProviderArray* mProviders;
nsIContent* mBindingParent;
PRUint32 mIndex;
};
@ -132,7 +132,7 @@ public:
eSkipAncestorLabel
};
HTMLLabelIterator(nsDocAccessible* aDocument, const nsAccessible* aAccessible,
HTMLLabelIterator(DocAccessible* aDocument, const nsAccessible* aAccessible,
LabelFilter aFilter = eAllLabels);
virtual ~HTMLLabelIterator() { }
@ -161,7 +161,7 @@ private:
class HTMLOutputIterator : public AccIterable
{
public:
HTMLOutputIterator(nsDocAccessible* aDocument, nsIContent* aElement);
HTMLOutputIterator(DocAccessible* aDocument, nsIContent* aElement);
virtual ~HTMLOutputIterator() { }
/**
@ -184,7 +184,7 @@ private:
class XULLabelIterator : public AccIterable
{
public:
XULLabelIterator(nsDocAccessible* aDocument, nsIContent* aElement);
XULLabelIterator(DocAccessible* aDocument, nsIContent* aElement);
virtual ~XULLabelIterator() { }
/**
@ -207,7 +207,7 @@ private:
class XULDescriptionIterator : public AccIterable
{
public:
XULDescriptionIterator(nsDocAccessible* aDocument, nsIContent* aElement);
XULDescriptionIterator(DocAccessible* aDocument, nsIContent* aElement);
virtual ~XULDescriptionIterator() { }
/**
@ -231,7 +231,7 @@ private:
class IDRefsIterator : public AccIterable
{
public:
IDRefsIterator(nsDocAccessible* aDoc, nsIContent* aContent,
IDRefsIterator(DocAccessible* aDoc, nsIContent* aContent,
nsIAtom* aIDRefsAttr);
virtual ~IDRefsIterator() { }
@ -260,7 +260,7 @@ private:
nsString mIDs;
nsIContent* mContent;
nsDocAccessible* mDoc;
DocAccessible* mDoc;
nsAString::index_type mCurrIdx;
};

View File

@ -32,7 +32,7 @@ FocusManager::FocusedAccessible() const
nsINode* focusedNode = FocusedDOMNode();
if (focusedNode) {
nsDocAccessible* doc =
DocAccessible* doc =
GetAccService()->GetDocAccessible(focusedNode->OwnerDoc());
return doc ? doc->GetAccessibleOrContainer(focusedNode) : nsnull;
}
@ -55,7 +55,7 @@ FocusManager::IsFocused(const nsAccessible* aAccessible) const
// FocusedAccessible() method call. Make sure this issue is fixed in
// bug 638465.
if (focusedNode->OwnerDoc() == aAccessible->GetNode()->OwnerDoc()) {
nsDocAccessible* doc =
DocAccessible* doc =
GetAccService()->GetDocAccessible(focusedNode->OwnerDoc());
return aAccessible ==
(doc ? doc->GetAccessibleOrContainer(focusedNode) : nsnull);
@ -119,7 +119,7 @@ FocusManager::NotifyOfDOMFocus(nsISupports* aTarget)
nsCOMPtr<nsINode> targetNode(do_QueryInterface(aTarget));
if (targetNode) {
nsDocAccessible* document =
DocAccessible* document =
GetAccService()->GetDocAccessible(targetNode->OwnerDoc());
if (document) {
// Set selection listener for focused element.
@ -148,7 +148,7 @@ FocusManager::NotifyOfDOMBlur(nsISupports* aTarget)
nsCOMPtr<nsINode> targetNode(do_QueryInterface(aTarget));
if (targetNode && targetNode->OwnerDoc() == FocusedDOMDocument()) {
nsIDocument* DOMDoc = targetNode->OwnerDoc();
nsDocAccessible* document =
DocAccessible* document =
GetAccService()->GetDocAccessible(DOMDoc);
if (document) {
document->HandleNotification<FocusManager, nsINode>
@ -190,7 +190,7 @@ FocusManager::ForceFocusEvent()
{
nsINode* focusedNode = FocusedDOMNode();
if (focusedNode) {
nsDocAccessible* document =
DocAccessible* document =
GetAccService()->GetDocAccessible(focusedNode->OwnerDoc());
if (document) {
document->HandleNotification<FocusManager, nsINode>
@ -200,7 +200,7 @@ FocusManager::ForceFocusEvent()
}
void
FocusManager::DispatchFocusEvent(nsDocAccessible* aDocument,
FocusManager::DispatchFocusEvent(DocAccessible* aDocument,
nsAccessible* aTarget)
{
NS_PRECONDITION(aDocument, "No document for focused accessible!");
@ -220,7 +220,7 @@ FocusManager::ProcessDOMFocus(nsINode* aTarget)
A11YDEBUG_FOCUS_NOTIFICATION_DOMTARGET("Process DOM focus",
"Notification target", aTarget)
nsDocAccessible* document =
DocAccessible* document =
GetAccService()->GetDocAccessible(aTarget->OwnerDoc());
nsAccessible* target = document->GetAccessibleOrContainer(aTarget);
@ -258,7 +258,7 @@ FocusManager::ProcessFocusEvent(AccEvent* aEvent)
// Check if still focused. Otherwise we can end up with storing the active
// item for control that isn't focused anymore.
nsDocAccessible* document = aEvent->GetDocAccessible();
DocAccessible* document = aEvent->GetDocAccessible();
nsAccessible* DOMFocus = document->GetAccessibleOrContainer(FocusedDOMNode());
if (target != DOMFocus)
@ -316,7 +316,7 @@ FocusManager::ProcessFocusEvent(AccEvent* aEvent)
// Fire scrolling_start event when the document receives the focus if it has
// an anchor jump. If an accessible within the document receive the focus
// then null out the anchor jump because it no longer applies.
nsDocAccessible* targetDocument = target->Document();
DocAccessible* targetDocument = target->Document();
nsAccessible* anchorJump = targetDocument->AnchorJump();
if (anchorJump) {
if (target == targetDocument) {

View File

@ -10,7 +10,7 @@
class AccEvent;
class nsAccessible;
class nsDocAccessible;
class DocAccessible;
namespace mozilla {
namespace a11y {
@ -90,7 +90,7 @@ public:
/**
* Dispatch delayed focus event for the given target.
*/
void DispatchFocusEvent(nsDocAccessible* aDocument, nsAccessible* aTarget);
void DispatchFocusEvent(DocAccessible* aDocument, nsAccessible* aTarget);
/**
* Process DOM focus notification.

View File

@ -9,7 +9,7 @@
#include "AccEvent.h"
#include "nsAccessibilityService.h"
#include "nsCoreUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsDocShellLoadTypes.h"
#include "nsIChannel.h"
@ -179,7 +179,7 @@ LogDocParent(nsIDocument* aDocumentNode)
}
static void
LogDocInfo(nsIDocument* aDocumentNode, nsDocAccessible* aDocument)
LogDocInfo(nsIDocument* aDocumentNode, DocAccessible* aDocument)
{
printf(" {\n");
@ -350,7 +350,7 @@ logging::DocLoad(const char* aMsg, nsIWebProgress* aWebProgress,
return;
nsCOMPtr<nsIDocument> documentNode(do_QueryInterface(DOMDocument));
nsDocAccessible* document =
DocAccessible* document =
GetAccService()->GetDocAccessibleFromCache(documentNode);
LogDocInfo(documentNode, document);
@ -375,7 +375,7 @@ logging::DocLoad(const char* aMsg, nsIDocument* aDocumentNode)
{
printf("\nA11Y DOCLOAD: %s\n", aMsg);
nsDocAccessible* document =
DocAccessible* document =
GetAccService()->GetDocAccessibleFromCache(aDocumentNode);
LogDocInfo(aDocumentNode, document);
}
@ -400,7 +400,7 @@ logging::DocLoadEventHandled(AccEvent* aEvent)
nsINode* node = aEvent->GetNode();
if (node->IsNodeOfType(nsINode::eDOCUMENT)) {
nsIDocument* documentNode = static_cast<nsIDocument*>(node);
nsDocAccessible* document = aEvent->GetDocAccessible();
DocAccessible* document = aEvent->GetDocAccessible();
LogDocInfo(documentNode, document);
}
@ -410,9 +410,9 @@ logging::DocLoadEventHandled(AccEvent* aEvent)
void
logging::DocCreate(const char* aMsg, nsIDocument* aDocumentNode,
nsDocAccessible* aDocument)
DocAccessible* aDocument)
{
nsDocAccessible* document = aDocument ?
DocAccessible* document = aDocument ?
aDocument : GetAccService()->GetDocAccessibleFromCache(aDocumentNode);
printf("\nA11Y DOCCREATE: %s\n", aMsg);
@ -421,9 +421,9 @@ logging::DocCreate(const char* aMsg, nsIDocument* aDocumentNode,
void
logging::DocDestroy(const char* aMsg, nsIDocument* aDocumentNode,
nsDocAccessible* aDocument)
DocAccessible* aDocument)
{
nsDocAccessible* document = aDocument ?
DocAccessible* document = aDocument ?
aDocument : GetAccService()->GetDocAccessibleFromCache(aDocumentNode);
printf("\nA11Y DOCDESTROY: %s\n", aMsg);
@ -435,7 +435,7 @@ logging::Address(const char* aDescr, nsAccessible* aAcc)
{
nsINode* node = aAcc->GetNode();
nsIDocument* docNode = aAcc->GetDocumentNode();
nsDocAccessible* doc = GetAccService()->GetDocAccessibleFromCache(docNode);
DocAccessible* doc = GetAccService()->GetDocAccessibleFromCache(docNode);
printf(" %s accessible: %p, node: %p\n", aDescr,
static_cast<void*>(aAcc), static_cast<void*>(node));
printf(" docacc for %s accessible: %p, node: %p\n", aDescr,

View File

@ -12,7 +12,7 @@
class AccEvent;
class nsAccessible;
class nsDocAccessible;
class DocAccessible;
class nsIDocument;
class nsIRequest;
class nsIWebProgress;
@ -54,13 +54,13 @@ void DocLoadEventHandled(AccEvent* aEvent);
* Log the document was created.
*/
void DocCreate(const char* aMsg, nsIDocument* aDocumentNode,
nsDocAccessible* aDocument = nsnull);
DocAccessible* aDocument = nsnull);
/**
* Log the document was destroyed.
*/
void DocDestroy(const char* aMsg, nsIDocument* aDocumentNode,
nsDocAccessible* aDocument = nsnull);
DocAccessible* aDocument = nsnull);
/**
* Log the message, a piece of text on own line, no offset.

View File

@ -26,7 +26,6 @@ CPPSRCS = \
nsAccDocManager.cpp \
nsAccessNode.cpp \
nsARIAMap.cpp \
nsDocAccessible.cpp \
nsCoreUtils.cpp \
nsAccUtils.cpp \
nsAccessibilityService.cpp \

View File

@ -9,7 +9,7 @@
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsCoreUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsEventShell.h"
#include "FocusManager.h"
#include "Role.h"
@ -28,7 +28,7 @@ const unsigned int kSelChangeCountToPack = 5;
// NotificationCollector
////////////////////////////////////////////////////////////////////////////////
NotificationController::NotificationController(nsDocAccessible* aDocument,
NotificationController::NotificationController(DocAccessible* aDocument,
nsIPresShell* aPresShell) :
mObservingState(eNotObservingRefresh), mDocument(aDocument),
mPresShell(aPresShell)
@ -63,7 +63,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_BEGIN(NotificationController)
NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mDocument");
cb.NoteXPCOMChild(static_cast<nsIAccessible*>(tmp->mDocument.get()));
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSTARRAY_MEMBER(mHangingChildDocuments,
nsDocAccessible)
DocAccessible)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSTARRAY_MEMBER(mContentInsertions,
ContentInsertion)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSTARRAY_MEMBER(mEvents, AccEvent)
@ -120,7 +120,7 @@ NotificationController::QueueEvent(AccEvent* aEvent)
}
void
NotificationController::ScheduleChildDocBinding(nsDocAccessible* aDocument)
NotificationController::ScheduleChildDocBinding(DocAccessible* aDocument)
{
// Schedule child document binding to the tree.
mHangingChildDocuments.AppendElement(aDocument);
@ -161,7 +161,7 @@ NotificationController::IsUpdatePending()
mObservingState == eRefreshProcessingForUpdate ||
mContentInsertions.Length() != 0 || mNotifications.Length() != 0 ||
mTextHash.Count() != 0 ||
!mDocument->HasLoadState(nsDocAccessible::eTreeConstructed);
!mDocument->HasLoadState(DocAccessible::eTreeConstructed);
}
////////////////////////////////////////////////////////////////////////////////
@ -182,7 +182,7 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
mObservingState = eRefreshProcessingForUpdate;
// Initial accessible tree construction.
if (!mDocument->HasLoadState(nsDocAccessible::eTreeConstructed)) {
if (!mDocument->HasLoadState(DocAccessible::eTreeConstructed)) {
// If document is not bound to parent at this point then the document is not
// ready yet (process notifications later).
if (!mDocument->IsBoundToParent()) {
@ -228,7 +228,7 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
// Bind hanging child documents.
PRUint32 hangingDocCnt = mHangingChildDocuments.Length();
for (PRUint32 idx = 0; idx < hangingDocCnt; idx++) {
nsDocAccessible* childDoc = mHangingChildDocuments[idx];
DocAccessible* childDoc = mHangingChildDocuments[idx];
if (childDoc->IsDefunct())
continue;
@ -251,13 +251,13 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
// If the document is ready and all its subdocuments are completely loaded
// then process the document load.
if (mDocument->HasLoadState(nsDocAccessible::eReady) &&
!mDocument->HasLoadState(nsDocAccessible::eCompletelyLoaded) &&
if (mDocument->HasLoadState(DocAccessible::eReady) &&
!mDocument->HasLoadState(DocAccessible::eCompletelyLoaded) &&
hangingDocCnt == 0) {
PRUint32 childDocCnt = mDocument->ChildDocumentCount(), childDocIdx = 0;
for (; childDocIdx < childDocCnt; childDocIdx++) {
nsDocAccessible* childDoc = mDocument->GetChildDocumentAt(childDocIdx);
if (!childDoc->HasLoadState(nsDocAccessible::eCompletelyLoaded))
DocAccessible* childDoc = mDocument->GetChildDocumentAt(childDocIdx);
if (!childDoc->HasLoadState(DocAccessible::eCompletelyLoaded))
break;
}
@ -323,7 +323,7 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
if (mContentInsertions.Length() == 0 && mNotifications.Length() == 0 &&
mEvents.Length() == 0 && mTextHash.Count() == 0 &&
mHangingChildDocuments.Length() == 0 &&
mDocument->HasLoadState(nsDocAccessible::eCompletelyLoaded) &&
mDocument->HasLoadState(DocAccessible::eCompletelyLoaded) &&
mPresShell->RemoveRefreshObserver(this, Flush_Display)) {
mObservingState = eNotObservingRefresh;
}
@ -641,7 +641,7 @@ NotificationController::CoalesceTextChangeEventsFor(AccShowEvent* aTailEvent,
void
NotificationController::CreateTextChangeEventFor(AccMutationEvent* aEvent)
{
nsDocAccessible* document = aEvent->GetDocAccessible();
DocAccessible* document = aEvent->GetDocAccessible();
nsAccessible* container = document->GetContainerAccessible(aEvent->mNode);
if (!container)
return;
@ -680,7 +680,7 @@ PLDHashOperator
NotificationController::TextEnumerator(nsCOMPtrHashKey<nsIContent>* aEntry,
void* aUserArg)
{
nsDocAccessible* document = static_cast<nsDocAccessible*>(aUserArg);
DocAccessible* document = static_cast<DocAccessible*>(aUserArg);
nsIContent* textNode = aEntry->GetKey();
nsAccessible* textAcc = document->GetAccessible(textNode);
@ -789,7 +789,7 @@ NotificationController::TextEnumerator(nsCOMPtrHashKey<nsIContent>* aEntry,
// NotificationController: content inserted notification
NotificationController::ContentInsertion::
ContentInsertion(nsDocAccessible* aDocument, nsAccessible* aContainer) :
ContentInsertion(DocAccessible* aDocument, nsAccessible* aContainer) :
mDocument(aDocument), mContainer(aContainer)
{
}

View File

@ -11,7 +11,7 @@
#include "nsRefreshDriver.h"
class nsAccessible;
class nsDocAccessible;
class DocAccessible;
class nsIContent;
// Uncomment to log notifications processing.
@ -87,7 +87,7 @@ private:
class NotificationController : public nsARefreshObserver
{
public:
NotificationController(nsDocAccessible* aDocument, nsIPresShell* aPresShell);
NotificationController(DocAccessible* aDocument, nsIPresShell* aPresShell);
virtual ~NotificationController();
NS_IMETHOD_(nsrefcnt) AddRef(void);
@ -108,7 +108,7 @@ public:
/**
* Schedule binding the child document to the tree of this document.
*/
void ScheduleChildDocBinding(nsDocAccessible* aDocument);
void ScheduleChildDocBinding(DocAccessible* aDocument);
/**
* Schedule the accessible tree update because of rendered text changes.
@ -254,7 +254,7 @@ private:
/**
* The document accessible reference owning this queue.
*/
nsRefPtr<nsDocAccessible> mDocument;
nsRefPtr<DocAccessible> mDocument;
/**
* The presshell of the document accessible.
@ -264,7 +264,7 @@ private:
/**
* Child documents that needs to be bound to the tree.
*/
nsTArray<nsRefPtr<nsDocAccessible> > mHangingChildDocuments;
nsTArray<nsRefPtr<DocAccessible> > mHangingChildDocuments;
/**
* Storage for content inserted notification information.
@ -272,7 +272,7 @@ private:
class ContentInsertion
{
public:
ContentInsertion(nsDocAccessible* aDocument, nsAccessible* aContainer);
ContentInsertion(DocAccessible* aDocument, nsAccessible* aContainer);
virtual ~ContentInsertion() { mDocument = nsnull; }
NS_INLINE_DECL_REFCOUNTING(ContentInsertion)
@ -289,7 +289,7 @@ private:
// The document used to process content insertion, matched to document of
// the notification controller that this notification belongs to, therefore
// it's ok to keep it as weak ref.
nsDocAccessible* mDocument;
DocAccessible* mDocument;
// The container accessible that content insertion occurs within.
nsRefPtr<nsAccessible> mContainer;

View File

@ -41,7 +41,7 @@ public:
mFirstIter(nsnull), mLastIter(nsnull)
{ AppendTarget(aAcc); }
Relation(nsDocAccessible* aDocument, nsIContent* aContent) :
Relation(DocAccessible* aDocument, nsIContent* aContent) :
mFirstIter(nsnull), mLastIter(nsnull)
{ AppendTarget(aDocument, aContent); }
@ -87,7 +87,7 @@ public:
* Append the one accessible for this content node to the set of related
* accessibles.
*/
void AppendTarget(nsDocAccessible* aDocument, nsIContent* aContent)
void AppendTarget(DocAccessible* aDocument, nsIContent* aContent)
{
if (aContent)
AppendTarget(aDocument->GetAccessible(aContent));

View File

@ -6,13 +6,13 @@
#include "TextUpdater.h"
#include "Accessible-inl.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "TextLeafAccessible.h"
using namespace mozilla::a11y;
void
TextUpdater::Run(nsDocAccessible* aDocument, TextLeafAccessible* aTextLeaf,
TextUpdater::Run(DocAccessible* aDocument, TextLeafAccessible* aTextLeaf,
const nsAString& aNewText)
{
NS_ASSERTION(aTextLeaf, "No text leaf accessible?");

View File

@ -19,12 +19,12 @@ public:
/**
* Start text of the text leaf update.
*/
static void Run(nsDocAccessible* aDocument,
static void Run(DocAccessible* aDocument,
mozilla::a11y::TextLeafAccessible* aTextLeaf,
const nsAString& aNewText);
private:
TextUpdater(nsDocAccessible* aDocument,
TextUpdater(DocAccessible* aDocument,
mozilla::a11y::TextLeafAccessible* aTextLeaf) :
mDocument(aDocument), mTextLeaf(aTextLeaf), mHyperText(nsnull),
mTextOffset(-1) { }
@ -83,7 +83,7 @@ private:
const static PRUint32 kMaxStrLen = 1 << 6;
private:
nsDocAccessible* mDocument;
DocAccessible* mDocument;
mozilla::a11y::TextLeafAccessible* mTextLeaf;
nsHyperTextAccessible* mHyperText;
PRInt32 mTextOffset;

View File

@ -37,7 +37,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
// nsAccDocManager public
nsDocAccessible*
DocAccessible*
nsAccDocManager::GetDocAccessible(nsIDocument *aDocument)
{
if (!aDocument)
@ -46,7 +46,7 @@ nsAccDocManager::GetDocAccessible(nsIDocument *aDocument)
// Ensure CacheChildren is called before we query cache.
nsAccessNode::GetApplicationAccessible()->EnsureChildren();
nsDocAccessible* docAcc = mDocAccessibleCache.GetWeak(aDocument);
DocAccessible* docAcc = mDocAccessibleCache.GetWeak(aDocument);
if (docAcc)
return docAcc;
@ -178,7 +178,7 @@ nsAccDocManager::OnStateChange(nsIWebProgress *aWebProgress,
logging::DocLoad("start document loading", aWebProgress, aRequest, aStateFlags);
#endif
nsDocAccessible* docAcc = mDocAccessibleCache.GetWeak(document);
DocAccessible* docAcc = mDocAccessibleCache.GetWeak(document);
if (!docAcc)
return NS_OK;
@ -277,7 +277,7 @@ nsAccDocManager::HandleEvent(nsIDOMEvent *aEvent)
// We're allowed to not remove listeners when accessible document is
// shutdown since we don't keep strong reference on chrome event target and
// listeners are removed automatically when chrome event target goes away.
nsDocAccessible* docAccessible = mDocAccessibleCache.GetWeak(document);
DocAccessible* docAccessible = mDocAccessibleCache.GetWeak(document);
if (docAccessible)
docAccessible->Shutdown();
@ -309,7 +309,7 @@ nsAccDocManager::HandleDOMDocumentLoad(nsIDocument *aDocument,
{
// Document accessible can be created before we were notified the DOM document
// was loaded completely. However if it's not created yet then create it.
nsDocAccessible* docAcc = mDocAccessibleCache.GetWeak(aDocument);
DocAccessible* docAcc = mDocAccessibleCache.GetWeak(aDocument);
if (!docAcc) {
docAcc = CreateDocOrRootAccessible(aDocument);
if (!docAcc)
@ -344,7 +344,7 @@ nsAccDocManager::AddListeners(nsIDocument *aDocument,
}
}
nsDocAccessible*
DocAccessible*
nsAccDocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
{
// Ignore temporary, hiding, resource documents and documents without
@ -366,7 +366,7 @@ nsAccDocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
bool isRootDoc = nsCoreUtils::IsRootDocument(aDocument);
nsDocAccessible* parentDocAcc = nsnull;
DocAccessible* parentDocAcc = nsnull;
if (!isRootDoc) {
// XXXaaronl: ideally we would traverse the presshell chain. Since there's
// no easy way to do that, we cheat and use the document hierarchy.
@ -379,9 +379,9 @@ nsAccDocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
// We only create root accessibles for the true root, otherwise create a
// doc accessible.
nsRefPtr<nsDocAccessible> docAcc = isRootDoc ?
nsRefPtr<DocAccessible> docAcc = isRootDoc ?
new RootAccessibleWrap(aDocument, rootElm, presShell) :
new nsDocAccessibleWrap(aDocument, rootElm, presShell);
new DocAccessibleWrap(aDocument, rootElm, presShell);
// Cache the document accessible into document cache.
mDocAccessibleCache.Put(aDocument, docAcc);
@ -430,12 +430,12 @@ nsAccDocManager::CreateDocOrRootAccessible(nsIDocument* aDocument)
PLDHashOperator
nsAccDocManager::GetFirstEntryInDocCache(const nsIDocument* aKey,
nsDocAccessible* aDocAccessible,
DocAccessible* aDocAccessible,
void* aUserArg)
{
NS_ASSERTION(aDocAccessible,
"No doc accessible for the object in doc accessible cache!");
*reinterpret_cast<nsDocAccessible**>(aUserArg) = aDocAccessible;
*reinterpret_cast<DocAccessible**>(aUserArg) = aDocAccessible;
return PL_DHASH_STOP;
}
@ -443,7 +443,7 @@ nsAccDocManager::GetFirstEntryInDocCache(const nsIDocument* aKey,
void
nsAccDocManager::ClearDocCache()
{
nsDocAccessible* docAcc = nsnull;
DocAccessible* docAcc = nsnull;
while (mDocAccessibleCache.EnumerateRead(GetFirstEntryInDocCache, static_cast<void*>(&docAcc))) {
if (docAcc)
docAcc->Shutdown();
@ -452,7 +452,7 @@ nsAccDocManager::ClearDocCache()
PLDHashOperator
nsAccDocManager::SearchAccessibleInDocCache(const nsIDocument* aKey,
nsDocAccessible* aDocAccessible,
DocAccessible* aDocAccessible,
void* aUserArg)
{
NS_ASSERTION(aDocAccessible,
@ -472,7 +472,7 @@ nsAccDocManager::SearchAccessibleInDocCache(const nsIDocument* aKey,
#ifdef DEBUG
PLDHashOperator
nsAccDocManager::SearchIfDocIsRefreshing(const nsIDocument* aKey,
nsDocAccessible* aDocAccessible,
DocAccessible* aDocAccessible,
void* aUserArg)
{
NS_ASSERTION(aDocAccessible,

View File

@ -14,7 +14,7 @@
#include "nsIPresShell.h"
class nsAccessible;
class nsDocAccessible;
class DocAccessible;
/**
* Manage the document accessible life cycle.
@ -33,12 +33,12 @@ public:
/**
* Return document accessible for the given DOM node.
*/
nsDocAccessible *GetDocAccessible(nsIDocument *aDocument);
DocAccessible* GetDocAccessible(nsIDocument* aDocument);
/**
* Return document accessible for the given presshell.
*/
nsDocAccessible* GetDocAccessible(const nsIPresShell* aPresShell)
DocAccessible* GetDocAccessible(const nsIPresShell* aPresShell)
{
return aPresShell ? GetDocAccessible(aPresShell->GetDocument()) : nsnull;
}
@ -52,7 +52,7 @@ public:
/**
* Return document accessible from the cache. Convenient method for testing.
*/
inline nsDocAccessible* GetDocAccessibleFromCache(nsIDocument* aDocument) const
inline DocAccessible* GetDocAccessibleFromCache(nsIDocument* aDocument) const
{
return mDocAccessibleCache.GetWeak(aDocument);
}
@ -95,7 +95,7 @@ private:
* @param aLoadEventType [in] specifies the event type to fire load event,
* if 0 then no event is fired
*/
void HandleDOMDocumentLoad(nsIDocument *aDocument,
void HandleDOMDocumentLoad(nsIDocument* aDocument,
PRUint32 aLoadEventType);
/**
@ -106,17 +106,17 @@ private:
/**
* Create document or root accessible.
*/
nsDocAccessible *CreateDocOrRootAccessible(nsIDocument *aDocument);
DocAccessible* CreateDocOrRootAccessible(nsIDocument* aDocument);
typedef nsRefPtrHashtable<nsPtrHashKey<const nsIDocument>, nsDocAccessible>
nsDocAccessibleHashtable;
typedef nsRefPtrHashtable<nsPtrHashKey<const nsIDocument>, DocAccessible>
DocAccessibleHashtable;
/**
* Get first entry of the document accessible from cache.
*/
static PLDHashOperator
GetFirstEntryInDocCache(const nsIDocument* aKey,
nsDocAccessible* aDocAccessible,
DocAccessible* aDocAccessible,
void* aUserArg);
/**
@ -132,16 +132,16 @@ private:
static PLDHashOperator
SearchAccessibleInDocCache(const nsIDocument* aKey,
nsDocAccessible* aDocAccessible,
DocAccessible* aDocAccessible,
void* aUserArg);
#ifdef DEBUG
static PLDHashOperator
SearchIfDocIsRefreshing(const nsIDocument* aKey,
nsDocAccessible* aDocAccessible, void* aUserArg);
DocAccessible* aDocAccessible, void* aUserArg);
#endif
nsDocAccessibleHashtable mDocAccessibleCache;
DocAccessibleHashtable mDocAccessibleCache;
};
#endif // nsAccDocManager_h_

View File

@ -7,7 +7,7 @@
#include "nsAccessible.h"
#include "nsAccessibilityService.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsINodeList.h"
@ -31,7 +31,7 @@ struct WalkState
////////////////////////////////////////////////////////////////////////////////
nsAccTreeWalker::
nsAccTreeWalker(nsDocAccessible* aDoc, nsIContent* aContent,
nsAccTreeWalker(DocAccessible* aDoc, nsIContent* aContent,
bool aWalkAnonContent, bool aWalkCache) :
mDoc(aDoc), mWalkCache(aWalkCache), mState(nsnull)
{

View File

@ -10,7 +10,7 @@
#include "nsIContent.h"
class nsAccessible;
class nsDocAccessible;
class DocAccessible;
struct WalkState;
/**
@ -19,7 +19,7 @@ struct WalkState;
class nsAccTreeWalker
{
public:
nsAccTreeWalker(nsDocAccessible* aDoc, nsIContent* aNode,
nsAccTreeWalker(DocAccessible* aDoc, nsIContent* aNode,
bool aWalkAnonymousContent, bool aWalkCache = false);
virtual ~nsAccTreeWalker();
@ -59,7 +59,7 @@ private:
*/
void PopState();
nsDocAccessible* mDoc;
DocAccessible* mDoc;
PRInt32 mChildFilter;
bool mWalkCache;
WalkState* mState;

View File

@ -9,7 +9,7 @@
#include "nsAccessibilityService.h"
#include "nsARIAMap.h"
#include "nsCoreUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsHyperTextAccessible.h"
#include "nsIAccessibleTypes.h"
#include "Role.h"
@ -273,7 +273,7 @@ nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
nsCoreUtils::GetDOMNodeFromDOMPoint(focusNode, focusOffset);
// Get text accessible containing the result node.
nsDocAccessible* doc =
DocAccessible* doc =
GetAccService()->GetDocAccessible(resultNode->OwnerDoc());
nsAccessible* accessible = doc ?
doc->GetAccessibleOrContainer(resultNode) : nsnull;
@ -372,7 +372,7 @@ nsAccUtils::GetScreenCoordsForWindow(nsAccessNode *aAccessNode)
nsIntPoint
nsAccUtils::GetScreenCoordsForParent(nsAccessNode *aAccessNode)
{
nsDocAccessible* document = aAccessNode->Document();
DocAccessible* document = aAccessNode->Document();
nsAccessible* parent = document->GetContainerAccessible(aAccessNode->GetNode());
if (!parent)
return nsIntPoint(0, 0);

View File

@ -25,7 +25,7 @@ class nsAccessNode;
class nsAccessible;
class nsHyperTextAccessible;
class nsHTMLTableAccessible;
class nsDocAccessible;
class DocAccessible;
struct nsRoleMapEntry;
#ifdef MOZ_XUL
class nsXULTreeAccessible;
@ -107,7 +107,7 @@ public:
/**
* Return document accessible for the given DOM node.
*/
static nsDocAccessible *GetDocAccessibleFor(nsINode *aNode)
static DocAccessible* GetDocAccessibleFor(nsINode* aNode)
{
nsIPresShell *presShell = nsCoreUtils::GetPresShellFor(aNode);
return GetAccService()->GetDocAccessible(presShell);
@ -116,7 +116,7 @@ public:
/**
* Return document accessible for the given docshell.
*/
static nsDocAccessible *GetDocAccessibleFor(nsIDocShellTreeItem *aContainer)
static DocAccessible* GetDocAccessibleFor(nsIDocShellTreeItem* aContainer)
{
nsCOMPtr<nsIDocShell> docShell(do_QueryInterface(aContainer));
nsCOMPtr<nsIPresShell> presShell;

View File

@ -50,7 +50,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(nsAccessNode, LastRelease())
// nsAccessNode construction/desctruction
nsAccessNode::
nsAccessNode(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessNode(nsIContent* aContent, DocAccessible* aDoc) :
mContent(aContent), mDoc(aDoc)
{
}
@ -144,7 +144,7 @@ nsAccessNode::RootAccessible() const
return nsnull;
}
nsDocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
DocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
return docAcc ? docAcc->AsRoot() : nsnull;
}

View File

@ -21,7 +21,7 @@
#include "nsWeakReference.h"
class nsAccessNode;
class nsDocAccessible;
class DocAccessible;
class nsIAccessibleDocument;
namespace mozilla {
@ -40,7 +40,7 @@ class nsAccessNode: public nsISupports
{
public:
nsAccessNode(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessNode(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsAccessNode();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@ -56,7 +56,7 @@ public:
/**
* Return the document accessible for this access node.
*/
nsDocAccessible* Document() const { return mDoc; }
DocAccessible* Document() const { return mDoc; }
/**
* Return the root document accessible for this accessnode.
@ -125,7 +125,7 @@ protected:
void LastRelease();
nsCOMPtr<nsIContent> mContent;
nsDocAccessible* mDoc;
DocAccessible* mDoc;
private:
nsAccessNode() MOZ_DELETE;

View File

@ -128,7 +128,7 @@ nsAccessibilityService::NotifyOfAnchorJumpTo(nsIContent* aTargetNode)
{
nsIDocument* documentNode = aTargetNode->GetCurrentDoc();
if (documentNode) {
nsDocAccessible* document = GetDocAccessible(documentNode);
DocAccessible* document = GetDocAccessible(documentNode);
if (document)
document->SetAnchorJump(aTargetNode);
}
@ -499,7 +499,7 @@ nsAccessibilityService::ContentRangeInserted(nsIPresShell* aPresShell,
NS_ConvertUTF16toUTF8(ctag).get(), cid.get(), aEndChild);
#endif
nsDocAccessible* docAccessible = GetDocAccessible(aPresShell);
DocAccessible* docAccessible = GetDocAccessible(aPresShell);
if (docAccessible)
docAccessible->ContentInserted(aContainer, aStartChild, aEndChild);
}
@ -533,7 +533,7 @@ nsAccessibilityService::ContentRemoved(nsIPresShell* aPresShell,
NS_ConvertUTF16toUTF8(ctag).get(), cid.get());
#endif
nsDocAccessible* docAccessible = GetDocAccessible(aPresShell);
DocAccessible* docAccessible = GetDocAccessible(aPresShell);
if (docAccessible)
docAccessible->ContentRemoved(aContainer, aChild);
}
@ -542,7 +542,7 @@ void
nsAccessibilityService::UpdateText(nsIPresShell* aPresShell,
nsIContent* aContent)
{
nsDocAccessible* document = GetDocAccessible(aPresShell);
DocAccessible* document = GetDocAccessible(aPresShell);
if (document)
document->UpdateText(aContent);
}
@ -552,7 +552,7 @@ nsAccessibilityService::TreeViewChanged(nsIPresShell* aPresShell,
nsIContent* aContent,
nsITreeView* aView)
{
nsDocAccessible* document = GetDocAccessible(aPresShell);
DocAccessible* document = GetDocAccessible(aPresShell);
if (document) {
nsAccessible* accessible = document->GetAccessible(aContent);
if (accessible) {
@ -568,7 +568,7 @@ nsAccessibilityService::UpdateListBullet(nsIPresShell* aPresShell,
nsIContent* aHTMLListItemContent,
bool aHasBullet)
{
nsDocAccessible* document = GetDocAccessible(aPresShell);
DocAccessible* document = GetDocAccessible(aPresShell);
if (document) {
nsAccessible* accessible = document->GetAccessible(aHTMLListItemContent);
if (accessible) {
@ -583,7 +583,7 @@ void
nsAccessibilityService::UpdateImageMap(nsImageFrame* aImageFrame)
{
nsIPresShell* presShell = aImageFrame->PresContext()->PresShell();
nsDocAccessible* document = GetDocAccessible(presShell);
DocAccessible* document = GetDocAccessible(presShell);
if (document) {
nsAccessible* accessible =
document->GetAccessible(aImageFrame->GetContent());
@ -621,7 +621,7 @@ nsAccessibilityService::PresShellDestroyed(nsIPresShell *aPresShell)
logging::DocDestroy("presshell destroyed", doc);
#endif
nsDocAccessible* docAccessible = GetDocAccessibleFromCache(doc);
DocAccessible* docAccessible = GetDocAccessibleFromCache(doc);
if (docAccessible)
docAccessible->Shutdown();
}
@ -631,7 +631,7 @@ nsAccessibilityService::PresShellActivated(nsIPresShell* aPresShell)
{
nsIDocument* DOMDoc = aPresShell->GetDocument();
if (DOMDoc) {
nsDocAccessible* document = GetDocAccessibleFromCache(DOMDoc);
DocAccessible* document = GetDocAccessibleFromCache(DOMDoc);
if (document) {
RootAccessible* rootDocument = document->RootAccessible();
NS_ASSERTION(rootDocument, "Entirely broken tree: no root document!");
@ -645,7 +645,7 @@ void
nsAccessibilityService::RecreateAccessible(nsIPresShell* aPresShell,
nsIContent* aContent)
{
nsDocAccessible* document = GetDocAccessible(aPresShell);
DocAccessible* document = GetDocAccessible(aPresShell);
if (document)
document->RecreateAccessible(aContent);
}
@ -910,7 +910,7 @@ nsAccessibilityService::GetAccessible(nsINode* aNode, nsIPresShell* aPresShell)
NS_PRECONDITION(aNode, "Getting an accessible for null node! Crash.");
// XXX handle the presshell
nsDocAccessible* document = GetDocAccessible(aNode->OwnerDoc());
DocAccessible* document = GetDocAccessible(aNode->OwnerDoc());
return document ? document->GetAccessible(aNode) : nsnull;
}
@ -929,7 +929,7 @@ static bool HasRelatedContent(nsIContent *aContent)
nsAccessible*
nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
nsDocAccessible* aDoc,
DocAccessible* aDoc,
bool* aIsSubtreeHidden)
{
if (!aDoc || !aNode || gIsShutdown)
@ -1004,7 +1004,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
"Image map manages the area accessible creation!");
#endif
nsDocAccessible* docAcc =
DocAccessible* docAcc =
GetAccService()->GetDocAccessible(aNode->OwnerDoc());
if (!docAcc) {
NS_NOTREACHED("Node has no host document accessible!");
@ -1323,7 +1323,7 @@ nsAccessibilityService::HasUniversalAriaProperty(nsIContent *aContent)
already_AddRefed<nsAccessible>
nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
nsDocAccessible* aDoc)
DocAccessible* aDoc)
{
nsCOMPtr<nsIAccessibleProvider> accessibleProvider(do_QueryInterface(aContent));
if (!accessibleProvider)
@ -1610,7 +1610,7 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
nsIContent* aContent,
nsDocAccessible* aDoc)
DocAccessible* aDoc)
{
// This method assumes we're in an HTML namespace.
nsIAtom* tag = aContent->Tag();
@ -1795,7 +1795,7 @@ NS_GetAccessibilityService(nsIAccessibilityService** aResult)
already_AddRefed<nsAccessible>
nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
nsIContent* aContent,
nsDocAccessible* aDoc)
DocAccessible* aDoc)
{
if (aFrame->GetType() == nsGkAtoms::boxFrame ||
aFrame->GetType() == nsGkAtoms::scrollFrame) {
@ -1826,7 +1826,7 @@ nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
#ifdef MOZ_XUL
already_AddRefed<nsAccessible>
nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
nsDocAccessible* aDoc)
DocAccessible* aDoc)
{
nsCOMPtr<nsITreeBoxObject> treeBoxObj = nsCoreUtils::GetTreeBoxObject(aContent);
if (!treeBoxObj)

View File

@ -172,7 +172,7 @@ public:
* @param aIsSubtreeHidden [out, optional] indicates whether the node's
* frame and its subtree is hidden
*/
nsAccessible* GetOrCreateAccessible(nsINode* aNode, nsDocAccessible* aDoc,
nsAccessible* GetOrCreateAccessible(nsINode* aNode, DocAccessible* aDoc,
bool* aIsSubtreeHidden = nsnull);
/**
@ -204,28 +204,28 @@ private:
* interface.
*/
already_AddRefed<nsAccessible>
CreateAccessibleByType(nsIContent* aContent, nsDocAccessible* aDoc);
CreateAccessibleByType(nsIContent* aContent, DocAccessible* aDoc);
/**
* Create accessible for HTML node by tag name.
*/
already_AddRefed<nsAccessible>
CreateHTMLAccessibleByMarkup(nsIFrame* aFrame, nsIContent* aContent,
nsDocAccessible* aDoc);
DocAccessible* aDoc);
/**
* Create accessible if parent is a deck frame.
*/
already_AddRefed<nsAccessible>
CreateAccessibleForDeckChild(nsIFrame* aFrame, nsIContent* aContent,
nsDocAccessible* aDoc);
DocAccessible* aDoc);
#ifdef MOZ_XUL
/**
* Create accessible for XUL tree element.
*/
already_AddRefed<nsAccessible>
CreateAccessibleForXULTree(nsIContent* aContent, nsDocAccessible* aDoc);
CreateAccessibleForXULTree(nsIContent* aContent, DocAccessible* aDoc);
#endif
/**

View File

@ -160,7 +160,7 @@ nsresult nsAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
return nsAccessNodeWrap::QueryInterface(aIID, aInstancePtr);
}
nsAccessible::nsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessible::nsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessNodeWrap(aContent, aDoc),
mParent(nsnull), mIndexInParent(-1), mFlags(eChildrenUninitialized),
mIndexOfEmbeddedChild(-1), mRoleMapEntry(nsnull)
@ -653,7 +653,7 @@ nsAccessible::NativeState()
{
PRUint64 state = 0;
nsDocAccessible* document = Document();
DocAccessible* document = Document();
if (!document || !document->IsInDocument(this))
state |= states::STALE;
@ -763,7 +763,7 @@ nsAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
// therefore accessible for containing block may be different from accessible
// for DOM parent but GetFrameForPoint() should be called for containing block
// to get an out of flow element.
nsDocAccessible* accDocument = Document();
DocAccessible* accDocument = Document();
NS_ENSURE_TRUE(accDocument, nsnull);
nsIFrame *frame = accDocument->GetFrame();
@ -784,7 +784,7 @@ nsAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
// Get accessible for the node with the point or the first accessible in
// the DOM parent chain.
nsDocAccessible* contentDocAcc = GetAccService()->
DocAccessible* contentDocAcc = GetAccService()->
GetDocAccessible(content->OwnerDoc());
// contentDocAcc in some circumstances can be NULL. See bug 729861
@ -2954,7 +2954,7 @@ nsAccessible::CurrentItem()
nsIDocument* DOMDoc = mContent->OwnerDoc();
dom::Element* activeDescendantElm = DOMDoc->GetElementById(id);
if (activeDescendantElm) {
nsDocAccessible* document = Document();
DocAccessible* document = Document();
if (document)
return document->GetAccessible(activeDescendantElm);
}
@ -3000,7 +3000,7 @@ nsAccessible::ContainerWidget() const
void
nsAccessible::CacheChildren()
{
nsDocAccessible* doc = Document();
DocAccessible* doc = Document();
NS_ENSURE_TRUE(doc,);
nsAccTreeWalker walker(doc, mContent, CanHaveAnonChildren());

View File

@ -95,7 +95,7 @@ class nsAccessible : public nsAccessNodeWrap,
public nsIAccessibleValue
{
public:
nsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsAccessible();
NS_DECL_ISUPPORTS_INHERITED
@ -452,7 +452,7 @@ public:
inline bool IsCombobox() const { return mFlags & eComboboxAccessible; }
inline bool IsDoc() const { return mFlags & eDocAccessible; }
nsDocAccessible* AsDoc();
DocAccessible* AsDoc();
inline bool IsHyperText() const { return mFlags & eHyperTextAccessible; }
nsHyperTextAccessible* AsHyperText();

View File

@ -9,7 +9,7 @@
#include "Accessible-inl.h"
#include "nsAccUtils.h"
#include "nsHyperTextAccessible.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "States.h"
#include "nsArrayUtils.h"

View File

@ -26,7 +26,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsLeafAccessible::
nsLeafAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsLeafAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
{
}
@ -59,7 +59,7 @@ nsLeafAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsLinkableAccessible::
nsLinkableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsLinkableAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc),
mActionAcc(nsnull),
mIsLink(false),
@ -226,7 +226,7 @@ nsLinkableAccessible::UnbindFromParent()
////////////////////////////////////////////////////////////////////////////////
nsEnumRoleAccessible::
nsEnumRoleAccessible(nsIContent* aNode, nsDocAccessible* aDoc,
nsEnumRoleAccessible(nsIContent* aNode, DocAccessible* aDoc,
roles::Role aRole) :
nsAccessibleWrap(aNode, aDoc), mRole(aRole)
{

View File

@ -23,7 +23,7 @@ class nsLeafAccessible : public nsAccessibleWrap
{
public:
nsLeafAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsLeafAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -49,7 +49,7 @@ class nsLinkableAccessible : public nsAccessibleWrap
public:
enum { eAction_Jump = 0 };
nsLinkableAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsLinkableAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
@ -91,7 +91,7 @@ protected:
class nsEnumRoleAccessible : public nsAccessibleWrap
{
public:
nsEnumRoleAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
nsEnumRoleAccessible(nsIContent* aContent, DocAccessible* aDoc,
mozilla::a11y::role aRole);
virtual ~nsEnumRoleAccessible() { }

View File

@ -39,7 +39,7 @@ nsCaretAccessible::~nsCaretAccessible()
void nsCaretAccessible::Shutdown()
{
// The caret accessible isn't shut down until the RootAccessible owning it is shut down
// Each nsDocAccessible, including the RootAccessible, is responsible for clearing the
// Each DocAccessible, including the RootAccessible, is responsible for clearing the
// doc selection listeners they registered in this nsCaretAccessible
ClearControlSelectionListener(); // Clear the selection listener for the currently focused control
@ -178,7 +178,7 @@ nsCaretAccessible::NotifySelectionChanged(nsIDOMDocument* aDOMDocument,
NS_ENSURE_STATE(mRootAccessible);
nsCOMPtr<nsIDocument> documentNode(do_QueryInterface(aDOMDocument));
nsDocAccessible* document = GetAccService()->GetDocAccessible(documentNode);
DocAccessible* document = GetAccService()->GetDocAccessible(documentNode);
#ifdef DEBUG_NOTIFICATIONS
nsCOMPtr<nsISelectionPrivate> privSel(do_QueryInterface(aSelection));

View File

@ -28,7 +28,7 @@
* The caret accessible is owned by the RootAccessible for the top level window that it's in.
* The RootAccessible needs to tell the nsCaretAccessible about focus changes via
* setControlSelectionListener().
* Each nsDocAccessible needs to tell the nsCaretAccessible owned by the root to
* Each DocAccessible needs to tell the nsCaretAccessible owned by the root to
* listen for selection events via addDocSelectionListener() and then needs to remove the
* selection listener when the doc goes away via removeDocSelectionListener().
*/

View File

@ -6,7 +6,6 @@
#include "nsEventShell.h"
#include "nsAccUtils.h"
//#include "nsDocAccessible.h"
////////////////////////////////////////////////////////////////////////////////
// nsEventShell

View File

@ -26,7 +26,7 @@ using namespace mozilla::a11y;
// Constructor
ARIAGridAccessible::
ARIAGridAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
ARIAGridAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc), xpcAccessibleTable(this)
{
}
@ -821,7 +821,7 @@ ARIAGridAccessible::GetSelectedColumnsArray(PRUint32* aColumnCount,
// Constructor
ARIAGridCellAccessible::
ARIAGridCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
ARIAGridCellAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}

View File

@ -24,7 +24,7 @@ class ARIAGridAccessible : public nsAccessibleWrap,
public TableAccessible
{
public:
ARIAGridAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
ARIAGridAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -97,7 +97,7 @@ class ARIAGridCellAccessible : public nsHyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:
ARIAGridCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
ARIAGridCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED

View File

@ -74,8 +74,8 @@ static const PRUint32 kRelationAttrsLen = NS_ARRAY_LENGTH(kRelationAttrs);
////////////////////////////////////////////////////////////////////////////////
// Constructor/desctructor
nsDocAccessible::
nsDocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
DocAccessible::
DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
nsHyperTextAccessibleWrap(aRootContent, this),
mDocument(aDocument), mScrollPositionChangedTicks(0),
@ -107,7 +107,7 @@ nsDocAccessible::
nsCoreUtils::IsTabDocument(mDocument));
}
nsDocAccessible::~nsDocAccessible()
DocAccessible::~DocAccessible()
{
NS_ASSERTION(!mPresShell, "LastRelease was never called!?!");
}
@ -116,9 +116,9 @@ nsDocAccessible::~nsDocAccessible()
////////////////////////////////////////////////////////////////////////////////
// nsISupports
NS_IMPL_CYCLE_COLLECTION_CLASS(nsDocAccessible)
NS_IMPL_CYCLE_COLLECTION_CLASS(DocAccessible)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsDocAccessible, nsAccessible)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(DocAccessible, nsAccessible)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mDocument)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_MEMBER(mNotificationController,
NotificationController)
@ -137,7 +137,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsDocAccessible, nsAccessible)
CycleCollectorTraverseCache(tmp->mAccessibleCache, &cb);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsDocAccessible, nsAccessible)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(DocAccessible, nsAccessible)
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mDocument)
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mNotificationController)
NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mVirtualCursor)
@ -147,7 +147,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsDocAccessible, nsAccessible)
ClearCache(tmp->mAccessibleCache);
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDocAccessible)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DocAccessible)
NS_INTERFACE_MAP_ENTRY(nsIAccessibleDocument)
NS_INTERFACE_MAP_ENTRY(nsIDocumentObserver)
NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
@ -164,7 +164,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDocAccessible)
// HTML document accessible must inherit from nsHyperTextAccessible to get
// support text interfaces. XUL document accessible doesn't need this.
// However at some point we may push <body> to implement the interfaces and
// return nsDocAccessible to inherit from nsAccessibleWrap.
// return DocAccessible to inherit from nsAccessibleWrap.
status = IsHyperText() ?
nsHyperTextAccessible::QueryInterface(aIID,
@ -179,14 +179,14 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDocAccessible)
return status;
}
NS_IMPL_ADDREF_INHERITED(nsDocAccessible, nsHyperTextAccessible)
NS_IMPL_RELEASE_INHERITED(nsDocAccessible, nsHyperTextAccessible)
NS_IMPL_ADDREF_INHERITED(DocAccessible, nsHyperTextAccessible)
NS_IMPL_RELEASE_INHERITED(DocAccessible, nsHyperTextAccessible)
////////////////////////////////////////////////////////////////////////////////
// nsIAccessible
ENameValueFlag
nsDocAccessible::Name(nsString& aName)
DocAccessible::Name(nsString& aName)
{
aName.Truncate();
@ -209,7 +209,7 @@ nsDocAccessible::Name(nsString& aName)
// nsAccessible public method
role
nsDocAccessible::NativeRole()
DocAccessible::NativeRole()
{
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =
nsCoreUtils::GetDocShellTreeItemFor(mDocument);
@ -242,7 +242,7 @@ nsDocAccessible::NativeRole()
// nsAccessible public method
void
nsDocAccessible::SetRoleMapEntry(nsRoleMapEntry* aRoleMapEntry)
DocAccessible::SetRoleMapEntry(nsRoleMapEntry* aRoleMapEntry)
{
NS_ASSERTION(mDocument, "No document during initialization!");
if (!mDocument)
@ -264,7 +264,7 @@ nsDocAccessible::SetRoleMapEntry(nsRoleMapEntry* aRoleMapEntry)
}
void
nsDocAccessible::Description(nsString& aDescription)
DocAccessible::Description(nsString& aDescription)
{
if (mParent)
mParent->Description(aDescription);
@ -277,7 +277,7 @@ nsDocAccessible::Description(nsString& aDescription)
// nsAccessible public method
PRUint64
nsDocAccessible::NativeState()
DocAccessible::NativeState()
{
// The root content of the document might be removed so that mContent is
// out of date.
@ -313,7 +313,7 @@ nsDocAccessible::NativeState()
// nsAccessible public method
void
nsDocAccessible::ApplyARIAState(PRUint64* aState) const
DocAccessible::ApplyARIAState(PRUint64* aState) const
{
// Combine with states from outer doc
//
@ -326,7 +326,7 @@ nsDocAccessible::ApplyARIAState(PRUint64* aState) const
}
NS_IMETHODIMP
nsDocAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
DocAccessible::GetAttributes(nsIPersistentProperties** aAttributes)
{
nsAccessible::GetAttributes(aAttributes);
if (mParent) {
@ -336,14 +336,15 @@ nsDocAccessible::GetAttributes(nsIPersistentProperties **aAttributes)
}
nsAccessible*
nsDocAccessible::FocusedChild()
DocAccessible::FocusedChild()
{
// Return an accessible for the current global focus, which does not have to
// be contained within the current document.
return FocusMgr()->FocusedAccessible();
}
NS_IMETHODIMP nsDocAccessible::TakeFocus()
NS_IMETHODIMP
DocAccessible::TakeFocus()
{
if (IsDefunct())
return NS_ERROR_FAILURE;
@ -362,7 +363,8 @@ NS_IMETHODIMP nsDocAccessible::TakeFocus()
////////////////////////////////////////////////////////////////////////////////
// nsIAccessibleDocument
NS_IMETHODIMP nsDocAccessible::GetURL(nsAString& aURL)
NS_IMETHODIMP
DocAccessible::GetURL(nsAString& aURL)
{
if (IsDefunct())
return NS_ERROR_FAILURE;
@ -381,7 +383,7 @@ NS_IMETHODIMP nsDocAccessible::GetURL(nsAString& aURL)
}
NS_IMETHODIMP
nsDocAccessible::GetTitle(nsAString& aTitle)
DocAccessible::GetTitle(nsAString& aTitle)
{
nsCOMPtr<nsIDOMDocument> domDocument = do_QueryInterface(mDocument);
if (!domDocument) {
@ -391,7 +393,7 @@ nsDocAccessible::GetTitle(nsAString& aTitle)
}
NS_IMETHODIMP
nsDocAccessible::GetMimeType(nsAString& aMimeType)
DocAccessible::GetMimeType(nsAString& aMimeType)
{
nsCOMPtr<nsIDOMDocument> domDocument = do_QueryInterface(mDocument);
if (!domDocument) {
@ -400,7 +402,8 @@ nsDocAccessible::GetMimeType(nsAString& aMimeType)
return domDocument->GetContentType(aMimeType);
}
NS_IMETHODIMP nsDocAccessible::GetDocType(nsAString& aDocType)
NS_IMETHODIMP
DocAccessible::GetDocType(nsAString& aDocType)
{
nsCOMPtr<nsIDOMDocument> domDoc(do_QueryInterface(mDocument));
nsCOMPtr<nsIDOMDocumentType> docType;
@ -419,7 +422,8 @@ NS_IMETHODIMP nsDocAccessible::GetDocType(nsAString& aDocType)
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAString& aNameSpaceURI)
NS_IMETHODIMP
DocAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAString& aNameSpaceURI)
{
if (mDocument) {
nsCOMPtr<nsINameSpaceManager> nameSpaceManager =
@ -430,14 +434,16 @@ NS_IMETHODIMP nsDocAccessible::GetNameSpaceURIForID(PRInt16 aNameSpaceID, nsAStr
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP nsDocAccessible::GetWindowHandle(void **aWindow)
NS_IMETHODIMP
DocAccessible::GetWindowHandle(void** aWindow)
{
NS_ENSURE_ARG_POINTER(aWindow);
*aWindow = GetNativeWindow();
return NS_OK;
}
NS_IMETHODIMP nsDocAccessible::GetWindow(nsIDOMWindow **aDOMWin)
NS_IMETHODIMP
DocAccessible::GetWindow(nsIDOMWindow** aDOMWin)
{
*aDOMWin = nsnull;
if (!mDocument) {
@ -454,7 +460,7 @@ NS_IMETHODIMP nsDocAccessible::GetWindow(nsIDOMWindow **aDOMWin)
}
NS_IMETHODIMP
nsDocAccessible::GetDOMDocument(nsIDOMDocument **aDOMDocument)
DocAccessible::GetDOMDocument(nsIDOMDocument** aDOMDocument)
{
NS_ENSURE_ARG_POINTER(aDOMDocument);
*aDOMDocument = nsnull;
@ -466,7 +472,7 @@ nsDocAccessible::GetDOMDocument(nsIDOMDocument **aDOMDocument)
}
NS_IMETHODIMP
nsDocAccessible::GetParentDocument(nsIAccessibleDocument** aDocument)
DocAccessible::GetParentDocument(nsIAccessibleDocument** aDocument)
{
NS_ENSURE_ARG_POINTER(aDocument);
*aDocument = nsnull;
@ -478,7 +484,7 @@ nsDocAccessible::GetParentDocument(nsIAccessibleDocument** aDocument)
}
NS_IMETHODIMP
nsDocAccessible::GetChildDocumentCount(PRUint32* aCount)
DocAccessible::GetChildDocumentCount(PRUint32* aCount)
{
NS_ENSURE_ARG_POINTER(aCount);
*aCount = 0;
@ -490,8 +496,8 @@ nsDocAccessible::GetChildDocumentCount(PRUint32* aCount)
}
NS_IMETHODIMP
nsDocAccessible::GetChildDocumentAt(PRUint32 aIndex,
nsIAccessibleDocument** aDocument)
DocAccessible::GetChildDocumentAt(PRUint32 aIndex,
nsIAccessibleDocument** aDocument)
{
NS_ENSURE_ARG_POINTER(aDocument);
*aDocument = nsnull;
@ -505,7 +511,7 @@ nsDocAccessible::GetChildDocumentAt(PRUint32 aIndex,
// nsIAccessibleVirtualCursor method
NS_IMETHODIMP
nsDocAccessible::GetVirtualCursor(nsIAccessiblePivot** aVirtualCursor)
DocAccessible::GetVirtualCursor(nsIAccessiblePivot** aVirtualCursor)
{
NS_ENSURE_ARG_POINTER(aVirtualCursor);
*aVirtualCursor = nsnull;
@ -526,7 +532,7 @@ nsDocAccessible::GetVirtualCursor(nsIAccessiblePivot** aVirtualCursor)
// nsHyperTextAccessible method
already_AddRefed<nsIEditor>
nsDocAccessible::GetEditor() const
DocAccessible::GetEditor() const
{
// Check if document is editable (designMode="on" case). Otherwise check if
// the html:body (for HTML document case) or document element is editable.
@ -552,9 +558,9 @@ nsDocAccessible::GetEditor() const
return nsnull;
}
// nsDocAccessible public method
// DocAccessible public method
nsAccessible*
nsDocAccessible::GetAccessible(nsINode* aNode) const
DocAccessible::GetAccessible(nsINode* aNode) const
{
nsAccessible* accessible = mNodeToAccessibleMap.Get(aNode);
@ -564,7 +570,7 @@ nsDocAccessible::GetAccessible(nsINode* aNode) const
if (GetNode() != aNode)
return nsnull;
accessible = const_cast<nsDocAccessible*>(this);
accessible = const_cast<DocAccessible*>(this);
}
#ifdef DEBUG
@ -584,7 +590,7 @@ nsDocAccessible::GetAccessible(nsINode* aNode) const
// nsAccessNode
bool
nsDocAccessible::Init()
DocAccessible::Init()
{
#ifdef DEBUG
if (logging::IsEnabled(logging::eDocCreate))
@ -607,7 +613,7 @@ nsDocAccessible::Init()
}
void
nsDocAccessible::Shutdown()
DocAccessible::Shutdown()
{
if (!mPresShell) // already shutdown
return;
@ -630,7 +636,7 @@ nsDocAccessible::Shutdown()
mDocument = nsnull;
if (mParent) {
nsDocAccessible* parentDocument = mParent->Document();
DocAccessible* parentDocument = mParent->Document();
if (parentDocument)
parentDocument->RemoveChildDocument(this);
@ -662,7 +668,7 @@ nsDocAccessible::Shutdown()
}
nsIFrame*
nsDocAccessible::GetFrame() const
DocAccessible::GetFrame() const
{
nsIFrame* root = nsnull;
if (mPresShell)
@ -671,8 +677,9 @@ nsDocAccessible::GetFrame() const
return root;
}
// nsDocAccessible protected member
void nsDocAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aRelativeFrame)
// DocAccessible protected member
void
DocAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aRelativeFrame)
{
*aRelativeFrame = GetFrame();
@ -712,8 +719,9 @@ void nsDocAccessible::GetBoundsRect(nsRect& aBounds, nsIFrame** aRelativeFrame)
}
}
// nsDocAccessible protected member
nsresult nsDocAccessible::AddEventListeners()
// DocAccessible protected member
nsresult
DocAccessible::AddEventListeners()
{
// 1) Set up scroll position listener
// 2) Check for editor and listen for changes to editor
@ -755,8 +763,9 @@ nsresult nsDocAccessible::AddEventListeners()
return NS_OK;
}
// nsDocAccessible protected member
nsresult nsDocAccessible::RemoveEventListeners()
// DocAccessible protected member
nsresult
DocAccessible::RemoveEventListeners()
{
// Remove listeners associated with content documents
// Remove scroll position listener
@ -799,9 +808,10 @@ nsresult nsDocAccessible::RemoveEventListeners()
return NS_OK;
}
void nsDocAccessible::ScrollTimerCallback(nsITimer *aTimer, void *aClosure)
void
DocAccessible::ScrollTimerCallback(nsITimer* aTimer, void* aClosure)
{
nsDocAccessible *docAcc = reinterpret_cast<nsDocAccessible*>(aClosure);
DocAccessible* docAcc = reinterpret_cast<DocAccessible*>(aClosure);
if (docAcc && docAcc->mScrollPositionChangedTicks &&
++docAcc->mScrollPositionChangedTicks > 2) {
@ -820,8 +830,9 @@ void nsDocAccessible::ScrollTimerCallback(nsITimer *aTimer, void *aClosure)
}
}
// nsDocAccessible protected member
void nsDocAccessible::AddScrollListener()
// DocAccessible protected member
void
DocAccessible::AddScrollListener()
{
if (!mPresShell)
return;
@ -836,8 +847,9 @@ void nsDocAccessible::AddScrollListener()
}
}
// nsDocAccessible protected member
void nsDocAccessible::RemoveScrollListener()
// DocAccessible protected member
void
DocAccessible::RemoveScrollListener()
{
if (!mPresShell)
return;
@ -851,7 +863,8 @@ void nsDocAccessible::RemoveScrollListener()
////////////////////////////////////////////////////////////////////////////////
// nsIScrollPositionListener
void nsDocAccessible::ScrollPositionDidChange(nscoord aX, nscoord aY)
void
DocAccessible::ScrollPositionDidChange(nscoord aX, nscoord aY)
{
// Start new timer, if the timer cycles at least 1 full cycle without more scroll position changes,
// then the ::Notify() method will fire the accessibility event for scroll position changes
@ -874,8 +887,9 @@ void nsDocAccessible::ScrollPositionDidChange(nscoord aX, nscoord aY)
////////////////////////////////////////////////////////////////////////////////
// nsIObserver
NS_IMETHODIMP nsDocAccessible::Observe(nsISupports *aSubject, const char *aTopic,
const PRUnichar *aData)
NS_IMETHODIMP
DocAccessible::Observe(nsISupports* aSubject, const char* aTopic,
const PRUnichar* aData)
{
if (!nsCRT::strcmp(aTopic,"obs_documentCreated")) {
// State editable will now be set, readonly is now clear
@ -894,9 +908,9 @@ NS_IMETHODIMP nsDocAccessible::Observe(nsISupports *aSubject, const char *aTopic
// nsIAccessiblePivotObserver
NS_IMETHODIMP
nsDocAccessible::OnPivotChanged(nsIAccessiblePivot* aPivot,
nsIAccessible* aOldAccessible,
PRInt32 aOldStart, PRInt32 aOldEnd)
DocAccessible::OnPivotChanged(nsIAccessiblePivot* aPivot,
nsIAccessible* aOldAccessible,
PRInt32 aOldStart, PRInt32 aOldEnd)
{
nsRefPtr<AccEvent> event = new AccVCChangeEvent(this, aOldAccessible,
aOldStart, aOldEnd);
@ -908,15 +922,15 @@ nsDocAccessible::OnPivotChanged(nsIAccessiblePivot* aPivot,
////////////////////////////////////////////////////////////////////////////////
// nsIDocumentObserver
NS_IMPL_NSIDOCUMENTOBSERVER_CORE_STUB(nsDocAccessible)
NS_IMPL_NSIDOCUMENTOBSERVER_LOAD_STUB(nsDocAccessible)
NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(nsDocAccessible)
NS_IMPL_NSIDOCUMENTOBSERVER_CORE_STUB(DocAccessible)
NS_IMPL_NSIDOCUMENTOBSERVER_LOAD_STUB(DocAccessible)
NS_IMPL_NSIDOCUMENTOBSERVER_STYLE_STUB(DocAccessible)
void
nsDocAccessible::AttributeWillChange(nsIDocument *aDocument,
dom::Element* aElement,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute, PRInt32 aModType)
DocAccessible::AttributeWillChange(nsIDocument* aDocument,
dom::Element* aElement,
PRInt32 aNameSpaceID,
nsIAtom* aAttribute, PRInt32 aModType)
{
nsAccessible* accessible = GetAccessible(aElement);
if (!accessible) {
@ -949,10 +963,10 @@ nsDocAccessible::AttributeWillChange(nsIDocument *aDocument,
}
void
nsDocAccessible::AttributeChanged(nsIDocument *aDocument,
dom::Element* aElement,
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType)
DocAccessible::AttributeChanged(nsIDocument* aDocument,
dom::Element* aElement,
PRInt32 aNameSpaceID, nsIAtom* aAttribute,
PRInt32 aModType)
{
NS_ASSERTION(!IsDefunct(),
"Attribute changed called on defunct document accessible!");
@ -990,9 +1004,9 @@ nsDocAccessible::AttributeChanged(nsIDocument *aDocument,
}
}
// nsDocAccessible protected member
// DocAccessible protected member
void
nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute)
DocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute)
{
// Fire accessible event after short timer, because we need to wait for
// DOM attribute & resulting layout to actually change. Otherwise,
@ -1054,7 +1068,7 @@ nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID
if (aAttribute == nsGkAtoms::aria_busy) {
bool isOn = aContent->AttrValueIs(aNameSpaceID, aAttribute,
nsGkAtoms::_true, eCaseMatters);
nsGkAtoms::_true, eCaseMatters);
nsRefPtr<AccEvent> event = new AccStateChangeEvent(aContent, states::BUSY, isOn);
FireDelayedAccessibleEvent(event);
return;
@ -1090,9 +1104,9 @@ nsDocAccessible::AttributeChangedImpl(nsIContent* aContent, PRInt32 aNameSpaceID
}
}
// nsDocAccessible protected member
// DocAccessible protected member
void
nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
DocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
{
// Note: For universal/global ARIA states and properties we don't care if
// there is an ARIA role present or not.
@ -1115,8 +1129,8 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
// to the element with the id that activedescendant points to. Make sure
// the tree up to date before processing.
if (aAttribute == nsGkAtoms::aria_activedescendant) {
mNotificationController->HandleNotification<nsDocAccessible, nsIContent>
(this, &nsDocAccessible::ARIAActiveDescendantChanged, aContent);
mNotificationController->HandleNotification<DocAccessible, nsIContent>
(this, &DocAccessible::ARIAActiveDescendantChanged, aContent);
return;
}
@ -1187,7 +1201,7 @@ nsDocAccessible::ARIAAttributeChanged(nsIContent* aContent, nsIAtom* aAttribute)
}
void
nsDocAccessible::ARIAActiveDescendantChanged(nsIContent* aElm)
DocAccessible::ARIAActiveDescendantChanged(nsIContent* aElm)
{
if (FocusMgr()->HasDOMFocus(aElm)) {
nsAutoString id;
@ -1206,16 +1220,18 @@ nsDocAccessible::ARIAActiveDescendantChanged(nsIContent* aElm)
}
}
void nsDocAccessible::ContentAppended(nsIDocument *aDocument,
nsIContent* aContainer,
nsIContent* aFirstNewContent,
PRInt32 /* unused */)
void
DocAccessible::ContentAppended(nsIDocument* aDocument,
nsIContent* aContainer,
nsIContent* aFirstNewContent,
PRInt32 /* unused */)
{
}
void nsDocAccessible::ContentStateChanged(nsIDocument* aDocument,
nsIContent* aContent,
nsEventStates aStateMask)
void
DocAccessible::ContentStateChanged(nsIDocument* aDocument,
nsIContent* aContent,
nsEventStates aStateMask)
{
if (aStateMask.HasState(NS_EVENT_STATE_CHECKED)) {
nsAccessible* item = GetAccessible(aContent);
@ -1239,38 +1255,41 @@ void nsDocAccessible::ContentStateChanged(nsIDocument* aDocument,
}
}
void nsDocAccessible::DocumentStatesChanged(nsIDocument* aDocument,
nsEventStates aStateMask)
{
}
void nsDocAccessible::CharacterDataWillChange(nsIDocument *aDocument,
nsIContent* aContent,
CharacterDataChangeInfo* aInfo)
{
}
void nsDocAccessible::CharacterDataChanged(nsIDocument *aDocument,
nsIContent* aContent,
CharacterDataChangeInfo* aInfo)
void
DocAccessible::DocumentStatesChanged(nsIDocument* aDocument,
nsEventStates aStateMask)
{
}
void
nsDocAccessible::ContentInserted(nsIDocument *aDocument, nsIContent* aContainer,
nsIContent* aChild, PRInt32 /* unused */)
DocAccessible::CharacterDataWillChange(nsIDocument* aDocument,
nsIContent* aContent,
CharacterDataChangeInfo* aInfo)
{
}
void
nsDocAccessible::ContentRemoved(nsIDocument *aDocument, nsIContent* aContainer,
nsIContent* aChild, PRInt32 /* unused */,
nsIContent* aPreviousSibling)
DocAccessible::CharacterDataChanged(nsIDocument* aDocument,
nsIContent* aContent,
CharacterDataChangeInfo* aInfo)
{
}
void
nsDocAccessible::ParentChainChanged(nsIContent *aContent)
DocAccessible::ContentInserted(nsIDocument* aDocument, nsIContent* aContainer,
nsIContent* aChild, PRInt32 /* unused */)
{
}
void
DocAccessible::ContentRemoved(nsIDocument* aDocument, nsIContent* aContainer,
nsIContent* aChild, PRInt32 /* unused */,
nsIContent* aPreviousSibling)
{
}
void
DocAccessible::ParentChainChanged(nsIContent* aContent)
{
}
@ -1280,7 +1299,7 @@ nsDocAccessible::ParentChainChanged(nsIContent *aContent)
#ifdef DEBUG
nsresult
nsDocAccessible::HandleAccEvent(AccEvent* aEvent)
DocAccessible::HandleAccEvent(AccEvent* aEvent)
{
if (logging::IsEnabled(logging::eDocLoad))
logging::DocLoadEventHandled(aEvent);
@ -1293,7 +1312,7 @@ nsDocAccessible::HandleAccEvent(AccEvent* aEvent)
// Public members
void*
nsDocAccessible::GetNativeWindow() const
DocAccessible::GetNativeWindow() const
{
if (!mPresShell)
return nsnull;
@ -1311,7 +1330,7 @@ nsDocAccessible::GetNativeWindow() const
}
nsAccessible*
nsDocAccessible::GetAccessibleByUniqueIDInSubtree(void* aUniqueID)
DocAccessible::GetAccessibleByUniqueIDInSubtree(void* aUniqueID)
{
nsAccessible* child = GetAccessibleByUniqueID(aUniqueID);
if (child)
@ -1319,7 +1338,7 @@ nsDocAccessible::GetAccessibleByUniqueIDInSubtree(void* aUniqueID)
PRUint32 childDocCount = mChildDocuments.Length();
for (PRUint32 childDocIdx= 0; childDocIdx < childDocCount; childDocIdx++) {
nsDocAccessible* childDocument = mChildDocuments.ElementAt(childDocIdx);
DocAccessible* childDocument = mChildDocuments.ElementAt(childDocIdx);
child = childDocument->GetAccessibleByUniqueIDInSubtree(aUniqueID);
if (child)
return child;
@ -1329,7 +1348,7 @@ nsDocAccessible::GetAccessibleByUniqueIDInSubtree(void* aUniqueID)
}
nsAccessible*
nsDocAccessible::GetAccessibleOrContainer(nsINode* aNode)
DocAccessible::GetAccessibleOrContainer(nsINode* aNode)
{
if (!aNode || !aNode->IsInDoc())
return nsnull;
@ -1343,8 +1362,8 @@ nsDocAccessible::GetAccessibleOrContainer(nsINode* aNode)
}
bool
nsDocAccessible::BindToDocument(nsAccessible* aAccessible,
nsRoleMapEntry* aRoleMapEntry)
DocAccessible::BindToDocument(nsAccessible* aAccessible,
nsRoleMapEntry* aRoleMapEntry)
{
if (!aAccessible)
return false;
@ -1372,7 +1391,7 @@ nsDocAccessible::BindToDocument(nsAccessible* aAccessible,
}
void
nsDocAccessible::UnbindFromDocument(nsAccessible* aAccessible)
DocAccessible::UnbindFromDocument(nsAccessible* aAccessible)
{
NS_ASSERTION(mAccessibleCache.GetWeak(aAccessible->UniqueID()),
"Unbinding the unbound accessible!");
@ -1398,9 +1417,9 @@ nsDocAccessible::UnbindFromDocument(nsAccessible* aAccessible)
}
void
nsDocAccessible::ContentInserted(nsIContent* aContainerNode,
nsIContent* aStartChildNode,
nsIContent* aEndChildNode)
DocAccessible::ContentInserted(nsIContent* aContainerNode,
nsIContent* aStartChildNode,
nsIContent* aEndChildNode)
{
// Ignore content insertions until we constructed accessible tree. Otherwise
// schedule tree update on content insertion after layout.
@ -1417,8 +1436,8 @@ nsDocAccessible::ContentInserted(nsIContent* aContainerNode,
}
void
nsDocAccessible::ContentRemoved(nsIContent* aContainerNode,
nsIContent* aChildNode)
DocAccessible::ContentRemoved(nsIContent* aContainerNode,
nsIContent* aChildNode)
{
// Update the whole tree of this document accessible when the container is
// null (document element is removed).
@ -1429,7 +1448,7 @@ nsDocAccessible::ContentRemoved(nsIContent* aContainerNode,
}
void
nsDocAccessible::RecreateAccessible(nsIContent* aContent)
DocAccessible::RecreateAccessible(nsIContent* aContent)
{
// XXX: we shouldn't recreate whole accessible subtree, instead we should
// subclass hide and show events to handle them separately and implement their
@ -1441,7 +1460,7 @@ nsDocAccessible::RecreateAccessible(nsIContent* aContent)
}
void
nsDocAccessible::ProcessInvalidationList()
DocAccessible::ProcessInvalidationList()
{
// Invalidate children of container accessible for each element in
// invalidation list. Allow invalidation list insertions while container
@ -1469,7 +1488,7 @@ nsDocAccessible::ProcessInvalidationList()
// nsAccessible protected
void
nsDocAccessible::CacheChildren()
DocAccessible::CacheChildren()
{
// Search for accessible children starting from the document element since
// some web pages tend to insert elements under it rather than document body.
@ -1484,7 +1503,7 @@ nsDocAccessible::CacheChildren()
// Protected members
void
nsDocAccessible::NotifyOfLoading(bool aIsReloading)
DocAccessible::NotifyOfLoading(bool aIsReloading)
{
// Mark the document accessible as loading, if it stays alive then we'll mark
// it as loaded when we receive proper notification.
@ -1510,7 +1529,7 @@ nsDocAccessible::NotifyOfLoading(bool aIsReloading)
}
void
nsDocAccessible::DoInitialUpdate()
DocAccessible::DoInitialUpdate()
{
mLoadState |= eTreeConstructed;
@ -1537,7 +1556,7 @@ nsDocAccessible::DoInitialUpdate()
}
void
nsDocAccessible::ProcessLoad()
DocAccessible::ProcessLoad()
{
mLoadState |= eCompletelyLoaded;
@ -1565,8 +1584,8 @@ nsDocAccessible::ProcessLoad()
}
void
nsDocAccessible::AddDependentIDsFor(nsAccessible* aRelProvider,
nsIAtom* aRelAttr)
DocAccessible::AddDependentIDsFor(nsAccessible* aRelProvider,
nsIAtom* aRelAttr)
{
for (PRUint32 idx = 0; idx < kRelationAttrsLen; idx++) {
nsIAtom* relAttr = *kRelationAttrs[idx];
@ -1626,8 +1645,8 @@ nsDocAccessible::AddDependentIDsFor(nsAccessible* aRelProvider,
}
void
nsDocAccessible::RemoveDependentIDsFor(nsAccessible* aRelProvider,
nsIAtom* aRelAttr)
DocAccessible::RemoveDependentIDsFor(nsAccessible* aRelProvider,
nsIAtom* aRelAttr)
{
for (PRUint32 idx = 0; idx < kRelationAttrsLen; idx++) {
nsIAtom* relAttr = *kRelationAttrs[idx];
@ -1663,8 +1682,8 @@ nsDocAccessible::RemoveDependentIDsFor(nsAccessible* aRelProvider,
}
bool
nsDocAccessible::UpdateAccessibleOnAttrChange(dom::Element* aElement,
nsIAtom* aAttribute)
DocAccessible::UpdateAccessibleOnAttrChange(dom::Element* aElement,
nsIAtom* aAttribute)
{
if (aAttribute == nsGkAtoms::role) {
// It is common for js libraries to set the role on the body element after
@ -1707,11 +1726,11 @@ nsDocAccessible::UpdateAccessibleOnAttrChange(dom::Element* aElement,
return false;
}
// nsDocAccessible public member
// DocAccessible public member
nsresult
nsDocAccessible::FireDelayedAccessibleEvent(PRUint32 aEventType, nsINode *aNode,
AccEvent::EEventRule aAllowDupes,
EIsFromUserInput aIsFromUserInput)
DocAccessible::FireDelayedAccessibleEvent(PRUint32 aEventType, nsINode* aNode,
AccEvent::EEventRule aAllowDupes,
EIsFromUserInput aIsFromUserInput)
{
nsRefPtr<AccEvent> event =
new AccEvent(aEventType, aNode, aIsFromUserInput, aAllowDupes);
@ -1720,9 +1739,9 @@ nsDocAccessible::FireDelayedAccessibleEvent(PRUint32 aEventType, nsINode *aNode,
return FireDelayedAccessibleEvent(event);
}
// nsDocAccessible public member
// DocAccessible public member
nsresult
nsDocAccessible::FireDelayedAccessibleEvent(AccEvent* aEvent)
DocAccessible::FireDelayedAccessibleEvent(AccEvent* aEvent)
{
NS_ENSURE_ARG(aEvent);
@ -1738,7 +1757,7 @@ nsDocAccessible::FireDelayedAccessibleEvent(AccEvent* aEvent)
}
void
nsDocAccessible::ProcessPendingEvent(AccEvent* aEvent)
DocAccessible::ProcessPendingEvent(AccEvent* aEvent)
{
PRUint32 eventType = aEvent->GetEventType();
if (eventType == nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED) {
@ -1768,8 +1787,8 @@ nsDocAccessible::ProcessPendingEvent(AccEvent* aEvent)
}
void
nsDocAccessible::ProcessContentInserted(nsAccessible* aContainer,
const nsTArray<nsCOMPtr<nsIContent> >* aInsertedContent)
DocAccessible::ProcessContentInserted(nsAccessible* aContainer,
const nsTArray<nsCOMPtr<nsIContent> >* aInsertedContent)
{
// Process the notification if the container accessible is still in tree.
if (!HasAccessible(aContainer->GetNode()))
@ -1810,8 +1829,8 @@ nsDocAccessible::ProcessContentInserted(nsAccessible* aContainer,
}
void
nsDocAccessible::UpdateTree(nsAccessible* aContainer, nsIContent* aChildNode,
bool aIsInsert)
DocAccessible::UpdateTree(nsAccessible* aContainer, nsIContent* aChildNode,
bool aIsInsert)
{
PRUint32 updateFlags = eNoAccessible;
@ -1865,7 +1884,7 @@ nsDocAccessible::UpdateTree(nsAccessible* aContainer, nsIContent* aChildNode,
}
PRUint32
nsDocAccessible::UpdateTreeInternal(nsAccessible* aChild, bool aIsInsert)
DocAccessible::UpdateTreeInternal(nsAccessible* aChild, bool aIsInsert)
{
PRUint32 updateFlags = eAccessible;
@ -1943,7 +1962,7 @@ nsDocAccessible::UpdateTreeInternal(nsAccessible* aChild, bool aIsInsert)
}
void
nsDocAccessible::CacheChildrenInSubtree(nsAccessible* aRoot)
DocAccessible::CacheChildrenInSubtree(nsAccessible* aRoot)
{
aRoot->EnsureChildren();
@ -1961,7 +1980,7 @@ nsDocAccessible::CacheChildrenInSubtree(nsAccessible* aRoot)
}
void
nsDocAccessible::UncacheChildrenInSubtree(nsAccessible* aRoot)
DocAccessible::UncacheChildrenInSubtree(nsAccessible* aRoot)
{
if (aRoot->IsElement())
RemoveDependentIDsFor(aRoot);
@ -1976,7 +1995,7 @@ nsDocAccessible::UncacheChildrenInSubtree(nsAccessible* aRoot)
}
void
nsDocAccessible::ShutdownChildrenInSubtree(nsAccessible* aAccessible)
DocAccessible::ShutdownChildrenInSubtree(nsAccessible* aAccessible)
{
// Traverse through children and shutdown them before this accessible. When
// child gets shutdown then it removes itself from children array of its
@ -1997,7 +2016,7 @@ nsDocAccessible::ShutdownChildrenInSubtree(nsAccessible* aAccessible)
}
bool
nsDocAccessible::IsLoadEventTarget() const
DocAccessible::IsLoadEventTarget() const
{
nsCOMPtr<nsISupports> container = mDocument->GetContainer();
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem =

View File

@ -3,8 +3,8 @@
* 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/. */
#ifndef _nsDocAccessible_H_
#define _nsDocAccessible_H_
#ifndef mozilla_a11y_DocAccessible_h__
#define mozilla_a11y_DocAccessible_h__
#include "nsIAccessibleCursorable.h"
#include "nsIAccessibleDocument.h"
@ -31,17 +31,17 @@ class nsAccessiblePivot;
const PRUint32 kDefaultCacheSize = 256;
class nsDocAccessible : public nsHyperTextAccessibleWrap,
public nsIAccessibleDocument,
public nsIDocumentObserver,
public nsIObserver,
public nsIScrollPositionListener,
public nsSupportsWeakReference,
public nsIAccessibleCursorable,
public nsIAccessiblePivotObserver
class DocAccessible : public nsHyperTextAccessibleWrap,
public nsIAccessibleDocument,
public nsIDocumentObserver,
public nsIObserver,
public nsIScrollPositionListener,
public nsSupportsWeakReference,
public nsIAccessibleCursorable,
public nsIAccessiblePivotObserver
{
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDocAccessible, nsAccessible)
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DocAccessible, nsAccessible)
NS_DECL_NSIACCESSIBLEDOCUMENT
@ -54,12 +54,12 @@ class nsDocAccessible : public nsHyperTextAccessibleWrap,
public:
using nsAccessible::GetParent;
nsDocAccessible(nsIDocument *aDocument, nsIContent *aRootContent,
nsIPresShell* aPresShell);
virtual ~nsDocAccessible();
DocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell);
virtual ~DocAccessible();
// nsIAccessible
NS_IMETHOD GetAttributes(nsIPersistentProperties **aAttributes);
NS_IMETHOD GetAttributes(nsIPersistentProperties** aAttributes);
NS_IMETHOD TakeFocus(void);
// nsIScrollPositionListener
@ -95,7 +95,7 @@ public:
// nsHyperTextAccessible
virtual already_AddRefed<nsIEditor> GetEditor() const;
// nsDocAccessible
// DocAccessible
/**
* Return presentation shell for this document accessible.
@ -150,7 +150,7 @@ public:
/**
* Return the parent document.
*/
nsDocAccessible* ParentDocument() const
DocAccessible* ParentDocument() const
{ return mParent ? mParent->Document() : nsnull; }
/**
@ -162,7 +162,7 @@ public:
/**
* Return the child document at the given index.
*/
nsDocAccessible* GetChildDocumentAt(PRUint32 aIndex) const
DocAccessible* GetChildDocumentAt(PRUint32 aIndex) const
{ return mChildDocuments.SafeElementAt(aIndex, nsnull); }
/**
@ -210,7 +210,7 @@ public:
/**
* Bind the child document to the tree.
*/
inline void BindChildDocument(nsDocAccessible* aDocument)
inline void BindChildDocument(DocAccessible* aDocument)
{
mNotificationController->ScheduleChildDocBinding(aDocument);
}
@ -352,9 +352,9 @@ protected:
// nsAccessible
virtual void CacheChildren();
// nsDocAccessible
virtual nsresult AddEventListeners();
virtual nsresult RemoveEventListeners();
// DocAccessible
virtual nsresult AddEventListeners();
virtual nsresult RemoveEventListeners();
/**
* Marks this document as loaded or loading.
@ -388,7 +388,7 @@ protected:
* Append the given document accessible to this document's child document
* accessibles.
*/
bool AppendChildDocument(nsDocAccessible* aChildDocument)
bool AppendChildDocument(DocAccessible* aChildDocument)
{
return mChildDocuments.AppendElement(aChildDocument);
}
@ -397,7 +397,7 @@ protected:
* Remove the given document accessible from this document's child document
* accessibles.
*/
void RemoveChildDocument(nsDocAccessible* aChildDocument)
void RemoveChildDocument(DocAccessible* aChildDocument)
{
mChildDocuments.RemoveElement(aChildDocument);
}
@ -573,7 +573,7 @@ protected:
*/
nsIAtom* mARIAAttrOldValue;
nsTArray<nsRefPtr<nsDocAccessible> > mChildDocuments;
nsTArray<nsRefPtr<DocAccessible> > mChildDocuments;
/**
* Whether we support nsIAccessibleCursorable, used when querying the interface.
@ -630,11 +630,11 @@ private:
nsIPresShell* mPresShell;
};
inline nsDocAccessible*
inline DocAccessible*
nsAccessible::AsDoc()
{
return mFlags & eDocAccessible ?
static_cast<nsDocAccessible*>(this) : nsnull;
static_cast<DocAccessible*>(this) : nsnull;
}
#endif

View File

@ -180,7 +180,7 @@ ProgressMeterAccessible<Max>::SetCurrentValue(double aValue)
////////////////////////////////////////////////////////////////////////////////
RadioButtonAccessible::
RadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
RadioButtonAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
{
}

View File

@ -18,7 +18,7 @@ template<int Max>
class ProgressMeterAccessible : public nsLeafAccessible
{
public:
ProgressMeterAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
ProgressMeterAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
{
}
@ -42,7 +42,7 @@ class RadioButtonAccessible : public nsLeafAccessible
{
public:
RadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
RadioButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);

View File

@ -17,6 +17,7 @@ LIBXUL_LIBRARY = 1
CPPSRCS = \
ApplicationAccessible.cpp \
ARIAGridAccessible.cpp \
DocAccessible.cpp \
FormControlAccessible.cpp \
OuterDocAccessible.cpp \
RootAccessible.cpp \

View File

@ -6,7 +6,7 @@
#include "OuterDocAccessible.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "Role.h"
#include "States.h"
@ -22,7 +22,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
OuterDocAccessible::
OuterDocAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
OuterDocAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
{
}

View File

@ -15,7 +15,7 @@ namespace a11y {
* Used for <browser>, <frame>, <iframe>, <page> or editor> elements.
*
* In these variable names, "outer" relates to the OuterDocAccessible as
* opposed to the nsDocAccessibleWrap which is "inner". The outer node is
* opposed to the DocAccessibleWrap which is "inner". The outer node is
* a something like tags listed above, whereas the inner node corresponds to
* the inner document root.
*/
@ -23,7 +23,7 @@ namespace a11y {
class OuterDocAccessible : public nsAccessibleWrap
{
public:
OuterDocAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
OuterDocAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~OuterDocAccessible();
NS_DECL_ISUPPORTS_INHERITED

View File

@ -61,7 +61,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
// nsISupports
NS_IMPL_ISUPPORTS_INHERITED1(RootAccessible, nsDocAccessible, nsIAccessibleDocument)
NS_IMPL_ISUPPORTS_INHERITED1(RootAccessible, DocAccessible, nsIAccessibleDocument)
////////////////////////////////////////////////////////////////////////////////
// Constructor/destructor
@ -69,7 +69,7 @@ NS_IMPL_ISUPPORTS_INHERITED1(RootAccessible, nsDocAccessible, nsIAccessibleDocum
RootAccessible::
RootAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
nsDocAccessibleWrap(aDocument, aRootContent, aPresShell)
DocAccessibleWrap(aDocument, aRootContent, aPresShell)
{
mFlags |= eRootAccessible;
}
@ -107,7 +107,7 @@ RootAccessible::NativeRole()
rootElm->Tag() == nsGkAtoms::wizard))
return roles::DIALOG;
return nsDocAccessibleWrap::NativeRole();
return DocAccessibleWrap::NativeRole();
}
// RootAccessible protected member
@ -137,7 +137,7 @@ RootAccessible::GetChromeFlags()
PRUint64
RootAccessible::NativeState()
{
PRUint64 state = nsDocAccessibleWrap::NativeState();
PRUint64 state = DocAccessibleWrap::NativeState();
if (state & states::DEFUNCT)
return state;
@ -213,7 +213,7 @@ RootAccessible::AddEventListeners()
mCaretAccessible = new nsCaretAccessible(this);
}
return nsDocAccessible::AddEventListeners();
return DocAccessible::AddEventListeners();
}
nsresult
@ -231,7 +231,7 @@ RootAccessible::RemoveEventListeners()
// Do this before removing clearing caret accessible, so that it can use
// shutdown the caret accessible's selection listener
nsDocAccessible::RemoveEventListeners();
DocAccessible::RemoveEventListeners();
if (mCaretAccessible) {
mCaretAccessible->Shutdown();
@ -251,7 +251,7 @@ RootAccessible::GetCaretAccessible()
}
void
RootAccessible::DocumentActivated(nsDocAccessible* aDocument)
RootAccessible::DocumentActivated(DocAccessible* aDocument)
{
}
@ -268,7 +268,7 @@ RootAccessible::HandleEvent(nsIDOMEvent* aDOMEvent)
if (!origTargetNode)
return NS_OK;
nsDocAccessible* document =
DocAccessible* document =
GetAccService()->GetDocAccessible(origTargetNode->OwnerDoc());
if (document) {
@ -320,7 +320,7 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
return;
}
nsDocAccessible* targetDocument = GetAccService()->
DocAccessible* targetDocument = GetAccService()->
GetDocAccessible(origTargetNode->OwnerDoc());
NS_ASSERTION(targetDocument, "No document while accessible is in document?!");
@ -501,7 +501,7 @@ RootAccessible::Shutdown()
if (!PresShell())
return; // Already shutdown
nsDocAccessibleWrap::Shutdown();
DocAccessibleWrap::Shutdown();
}
// nsIAccessible method
@ -509,7 +509,7 @@ Relation
RootAccessible::RelationByType(PRUint32 aType)
{
if (!mDocument || aType != nsIAccessibleRelation::RELATION_EMBEDS)
return nsDocAccessibleWrap::RelationByType(aType);
return DocAccessibleWrap::RelationByType(aType);
nsIDOMWindow* rootWindow = mDocument->GetWindow();
if (rootWindow) {
@ -521,7 +521,7 @@ RootAccessible::RelationByType(PRUint32 aType)
nsCOMPtr<nsIDocument> contentDocumentNode =
do_QueryInterface(contentDOMDocument);
if (contentDocumentNode) {
nsDocAccessible* contentDocument =
DocAccessible* contentDocument =
GetAccService()->GetDocAccessible(contentDocumentNode);
if (contentDocument)
return Relation(contentDocument);
@ -579,7 +579,7 @@ RootAccessible::HandlePopupHidingEvent(nsINode* aPopupNode)
// Get popup accessible. There are cases when popup element isn't accessible
// but an underlying widget is and behaves like popup, an example is
// autocomplete popups.
nsDocAccessible* document = nsAccUtils::GetDocAccessibleFor(aPopupNode);
DocAccessible* document = nsAccUtils::GetDocAccessibleFor(aPopupNode);
if (!document)
return;

View File

@ -7,7 +7,7 @@
#define mozilla_a11y_RootAccessible_h__
#include "nsCaretAccessible.h"
#include "nsDocAccessibleWrap.h"
#include "DocAccessibleWrap.h"
#include "nsHashtable.h"
@ -21,7 +21,7 @@ class Relation;
namespace mozilla {
namespace a11y {
class RootAccessible : public nsDocAccessibleWrap,
class RootAccessible : public DocAccessibleWrap,
public nsIDOMEventListener
{
NS_DECL_ISUPPORTS_INHERITED
@ -49,7 +49,7 @@ public:
/**
* Notify that the sub document presshell was activated.
*/
virtual void DocumentActivated(nsDocAccessible* aDocument);
virtual void DocumentActivated(DocAccessible* aDocument);
protected:

View File

@ -6,7 +6,7 @@
#include "TextLeafAccessible.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "Role.h"
using namespace mozilla::a11y;
@ -16,7 +16,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
TextLeafAccessible::
TextLeafAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
TextLeafAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsLinkableAccessible(aContent, aDoc)
{
mFlags |= eTextLeafAccessible;

View File

@ -17,7 +17,7 @@ namespace a11y {
class TextLeafAccessible : public nsLinkableAccessible
{
public:
TextLeafAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
TextLeafAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~TextLeafAccessible();
// nsAccessible

View File

@ -40,7 +40,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
HTMLCheckboxAccessible::
HTMLCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLCheckboxAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
{
}
@ -127,7 +127,7 @@ HTMLCheckboxAccessible::IsWidget() const
////////////////////////////////////////////////////////////////////////////////
HTMLRadioButtonAccessible::
HTMLRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLRadioButtonAccessible(nsIContent* aContent, DocAccessible* aDoc) :
RadioButtonAccessible(aContent, aDoc)
{
}
@ -216,7 +216,7 @@ HTMLRadioButtonAccessible::GetPositionAndSizeInternal(PRInt32* aPosInSet,
////////////////////////////////////////////////////////////////////////////////
HTMLButtonAccessible::
HTMLButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLButtonAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -332,7 +332,7 @@ HTMLButtonAccessible::IsWidget() const
////////////////////////////////////////////////////////////////////////////////
HTMLTextFieldAccessible::
HTMLTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -569,7 +569,7 @@ HTMLTextFieldAccessible::ContainerWidget() const
////////////////////////////////////////////////////////////////////////////////
HTMLFileInputAccessible::
HTMLFileInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
mFlags |= eHTMLFileInputAccessible;
@ -624,7 +624,7 @@ HTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent)
////////////////////////////////////////////////////////////////////////////////
HTMLGroupboxAccessible::
HTMLGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -684,7 +684,7 @@ HTMLGroupboxAccessible::RelationByType(PRUint32 aType)
////////////////////////////////////////////////////////////////////////////////
HTMLLegendAccessible::
HTMLLegendAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLLegendAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -714,7 +714,7 @@ HTMLLegendAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
HTMLFigureAccessible::
HTMLFigureAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLFigureAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -784,7 +784,7 @@ HTMLFigureAccessible::Caption() const
////////////////////////////////////////////////////////////////////////////////
HTMLFigcaptionAccessible::
HTMLFigcaptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}

View File

@ -26,7 +26,7 @@ class HTMLCheckboxAccessible : public nsLeafAccessible
public:
enum { eAction_Click = 0 };
HTMLCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLCheckboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -51,7 +51,7 @@ class HTMLRadioButtonAccessible : public RadioButtonAccessible
{
public:
HTMLRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLRadioButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessible
virtual PRUint64 NativeState();
@ -70,7 +70,7 @@ class HTMLButtonAccessible : public nsHyperTextAccessibleWrap
public:
enum { eAction_Click = 0 };
HTMLButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLButtonAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -99,7 +99,7 @@ class HTMLTextFieldAccessible : public nsHyperTextAccessibleWrap
public:
enum { eAction_Click = 0 };
HTMLTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLTextFieldAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
@ -133,7 +133,7 @@ public:
class HTMLFileInputAccessible : public nsHyperTextAccessibleWrap
{
public:
HTMLFileInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLFileInputAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -146,7 +146,7 @@ public:
class HTMLGroupboxAccessible : public nsHyperTextAccessibleWrap
{
public:
HTMLGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLGroupboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessible
virtual nsresult GetNameInternal(nsAString& aName);
@ -164,7 +164,7 @@ protected:
class HTMLLegendAccessible : public nsHyperTextAccessibleWrap
{
public:
HTMLLegendAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLLegendAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -177,7 +177,7 @@ public:
class HTMLFigureAccessible : public nsHyperTextAccessibleWrap
{
public:
HTMLFigureAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLFigureAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessible
virtual nsresult GetAttributesInternal(nsIPersistentProperties* aAttributes);
@ -196,7 +196,7 @@ protected:
class HTMLFigcaptionAccessible : public nsHyperTextAccessibleWrap
{
public:
HTMLFigcaptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLFigcaptionAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessible
virtual mozilla::a11y::role NativeRole();

View File

@ -6,7 +6,7 @@
#include "HTMLListAccessible.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "Role.h"
#include "States.h"
@ -43,7 +43,7 @@ HTMLListAccessible::NativeState()
////////////////////////////////////////////////////////////////////////////////
HTMLLIAccessible::
HTMLLIAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc), mBullet(nsnull)
{
mFlags |= eHTMLListItemAccessible;
@ -109,7 +109,7 @@ HTMLLIAccessible::UpdateBullet(bool aHasBullet)
return;
}
nsDocAccessible* document = Document();
DocAccessible* document = Document();
if (aHasBullet) {
mBullet = new HTMLListBulletAccessible(mContent, mDoc);
if (document->BindToDocument(mBullet, nsnull)) {

View File

@ -21,7 +21,7 @@ class HTMLListBulletAccessible;
class HTMLListAccessible : public nsHyperTextAccessibleWrap
{
public:
HTMLListAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLListAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc) { }
virtual ~HTMLListAccessible() { }
@ -40,7 +40,7 @@ public:
class HTMLLIAccessible : public nsHyperTextAccessibleWrap
{
public:
HTMLLIAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
HTMLLIAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~HTMLLIAccessible() { }
// nsISupports
@ -75,7 +75,7 @@ private:
class HTMLListBulletAccessible : public nsLeafAccessible
{
public:
HTMLListBulletAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
HTMLListBulletAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc) { }
virtual ~HTMLListBulletAccessible() { }

View File

@ -10,7 +10,7 @@
using namespace mozilla::a11y;
nsHTMLCanvasAccessible::
nsHTMLCanvasAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessible(aContent, aDoc)
{
}

View File

@ -14,7 +14,7 @@
class nsHTMLCanvasAccessible : public nsHyperTextAccessible
{
public:
nsHTMLCanvasAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLCanvasAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHTMLCanvasAccessible() { }
// nsAccessible

View File

@ -29,7 +29,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLImageAccessible::
nsHTMLImageAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLImageAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsLinkableAccessible(aContent, aDoc)
{
mFlags |= eImageAccessible;
@ -208,7 +208,7 @@ nsHTMLImageAccessible::GetLongDescURI() const
}
}
nsDocAccessible* document = Document();
DocAccessible* document = Document();
if (document) {
IDRefsIterator iter(document, mContent, nsGkAtoms::aria_describedby);
while (nsIContent* target = iter.NextElem()) {

View File

@ -20,7 +20,7 @@ class nsHTMLImageAccessible : public nsLinkableAccessible,
public nsIAccessibleImage
{
public:
nsHTMLImageAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLImageAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED

View File

@ -7,7 +7,7 @@
#include "nsAccUtils.h"
#include "nsARIAMap.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "Role.h"
#include "nsIDOMHTMLCollection.h"
@ -25,7 +25,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLImageMapAccessible::
nsHTMLImageMapAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLImageMapAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHTMLImageAccessibleWrap(aContent, aDoc)
{
mFlags |= eImageMapAccessible;
@ -149,7 +149,7 @@ nsHTMLImageMapAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsHTMLAreaAccessible::
nsHTMLAreaAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLAreaAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHTMLLinkAccessible(aContent, aDoc)
{
}

View File

@ -17,7 +17,7 @@
class nsHTMLImageMapAccessible : public nsHTMLImageAccessibleWrap
{
public:
nsHTMLImageMapAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLImageMapAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHTMLImageMapAccessible() { }
// nsISupports and cycle collector
@ -60,7 +60,7 @@ class nsHTMLAreaAccessible : public nsHTMLLinkAccessible
{
public:
nsHTMLAreaAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLAreaAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessNode
virtual bool IsPrimaryForNode() const;

View File

@ -6,7 +6,7 @@
#include "nsHTMLLinkAccessible.h"
#include "nsCoreUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "Role.h"
#include "States.h"
@ -21,7 +21,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLLinkAccessible::
nsHTMLLinkAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}

View File

@ -11,7 +11,7 @@
class nsHTMLLinkAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLLinkAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED

View File

@ -8,7 +8,7 @@
#include "Accessible-inl.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsEventShell.h"
#include "nsIAccessibleEvent.h"
#include "nsTextEquivUtils.h"
@ -33,7 +33,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLSelectListAccessible::
nsHTMLSelectListAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLSelectListAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
{
mFlags |= eListControlAccessible;
@ -109,7 +109,7 @@ nsHTMLSelectListAccessible::CurrentItem()
if (listControlFrame) {
nsCOMPtr<nsIContent> activeOptionNode = listControlFrame->GetCurrentOption();
if (activeOptionNode) {
nsDocAccessible* document = Document();
DocAccessible* document = Document();
if (document)
return document->GetAccessible(activeOptionNode);
}
@ -173,7 +173,7 @@ nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
////////////////////////////////////////////////////////////////////////////////
nsHTMLSelectOptionAccessible::
nsHTMLSelectOptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLSelectOptionAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -364,7 +364,7 @@ nsHTMLSelectOptionAccessible::ContainerWidget() const
nsHTMLSelectOptGroupAccessible::
nsHTMLSelectOptGroupAccessible(nsIContent* aContent,
nsDocAccessible* aDoc) :
DocAccessible* aDoc) :
nsHTMLSelectOptionAccessible(aContent, aDoc)
{
}
@ -420,7 +420,7 @@ nsHTMLSelectOptGroupAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsHTMLComboboxAccessible::
nsHTMLComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
{
mFlags |= eComboboxAccessible;
@ -626,7 +626,7 @@ nsHTMLComboboxAccessible::SelectedOption() const
if (listControlFrame) {
nsCOMPtr<nsIContent> activeOptionNode = listControlFrame->GetCurrentOption();
if (activeOptionNode) {
nsDocAccessible* document = Document();
DocAccessible* document = Document();
if (document)
return document->GetAccessible(activeOptionNode);
}
@ -642,7 +642,7 @@ nsHTMLComboboxAccessible::SelectedOption() const
nsHTMLComboboxListAccessible::
nsHTMLComboboxListAccessible(nsIAccessible* aParent, nsIContent* aContent,
nsDocAccessible* aDoc) :
DocAccessible* aDoc) :
nsHTMLSelectListAccessible(aContent, aDoc)
{
}

View File

@ -34,7 +34,7 @@ class nsHTMLSelectListAccessible : public nsAccessibleWrap
{
public:
nsHTMLSelectListAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLSelectListAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHTMLSelectListAccessible() {}
// nsAccessible
@ -74,7 +74,7 @@ class nsHTMLSelectOptionAccessible : public nsHyperTextAccessibleWrap
public:
enum { eAction_Select = 0 };
nsHTMLSelectOptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLSelectOptionAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHTMLSelectOptionAccessible() {}
// nsIAccessible
@ -132,7 +132,7 @@ class nsHTMLSelectOptGroupAccessible : public nsHTMLSelectOptionAccessible
{
public:
nsHTMLSelectOptGroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLSelectOptGroupAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHTMLSelectOptGroupAccessible() {}
// nsIAccessible
@ -165,7 +165,7 @@ class nsHTMLComboboxAccessible : public nsAccessibleWrap
public:
enum { eAction_Click = 0 };
nsHTMLComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLComboboxAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHTMLComboboxAccessible() {}
// nsIAccessible
@ -216,7 +216,7 @@ public:
nsHTMLComboboxListAccessible(nsIAccessible* aParent,
nsIContent* aContent,
nsDocAccessible* aDoc);
DocAccessible* aDoc);
virtual ~nsHTMLComboboxListAccessible() {}
// nsAccessNode

View File

@ -9,7 +9,7 @@
#include "nsAccessibilityService.h"
#include "nsAccTreeWalker.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsTextEquivUtils.h"
#include "Relation.h"
#include "Role.h"
@ -43,7 +43,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLTableCellAccessible::
nsHTMLTableCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLTableCellAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -343,7 +343,7 @@ nsHTMLTableCellAccessible::GetHeaderCells(PRInt32 aRowOrColumnHeaderCell,
nsHTMLTableHeaderCellAccessible::
nsHTMLTableHeaderCellAccessible(nsIContent* aContent,
nsDocAccessible* aDoc) :
DocAccessible* aDoc) :
nsHTMLTableCellAccessible(aContent, aDoc)
{
}
@ -402,7 +402,7 @@ nsHTMLTableHeaderCellAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsHTMLTableAccessible::
nsHTMLTableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLTableAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc), xpcAccessibleTable(this)
{
}
@ -1323,7 +1323,7 @@ nsHTMLTableAccessible::IsProbablyLayoutTable()
#define RETURN_LAYOUT_ANSWER(isLayout, heuristic) { return isLayout; }
#endif
nsDocAccessible* docAccessible = Document();
DocAccessible* docAccessible = Document();
if (docAccessible) {
PRUint64 docState = docAccessible->State();
if (docState & states::EDITABLE) { // Need to see all elements while document is being edited

View File

@ -21,7 +21,7 @@ class nsHTMLTableCellAccessible : public nsHyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:
nsHTMLTableCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLTableCellAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -65,7 +65,7 @@ class nsHTMLTableHeaderCellAccessible : public nsHTMLTableCellAccessible
{
public:
nsHTMLTableHeaderCellAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
DocAccessible* aDoc);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -87,7 +87,7 @@ class nsHTMLTableAccessible : public nsAccessibleWrap,
public mozilla::a11y::TableAccessible
{
public:
nsHTMLTableAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLTableAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
@ -179,7 +179,7 @@ protected:
class nsHTMLCaptionAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLCaptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLCaptionAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc) { }
virtual ~nsHTMLCaptionAccessible() { }

View File

@ -5,7 +5,7 @@
#include "nsHTMLTextAccessible.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsAccUtils.h"
#include "nsIAccessibleRelation.h"
#include "nsTextEquivUtils.h"
@ -20,7 +20,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLHRAccessible::
nsHTMLHRAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLHRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
{
}
@ -37,7 +37,7 @@ nsHTMLHRAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsHTMLBRAccessible::
nsHTMLBRAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLBRAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
{
}
@ -66,7 +66,7 @@ nsHTMLBRAccessible::GetNameInternal(nsAString& aName)
////////////////////////////////////////////////////////////////////////////////
nsHTMLLabelAccessible::
nsHTMLLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}
@ -90,7 +90,7 @@ nsHTMLLabelAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsHTMLOutputAccessible::
nsHTMLOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
{
}

View File

@ -15,7 +15,7 @@
class nsHTMLHRAccessible : public nsLeafAccessible
{
public:
nsHTMLHRAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLHRAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -27,7 +27,7 @@ public:
class nsHTMLBRAccessible : public nsLeafAccessible
{
public:
nsHTMLBRAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLBRAccessible(nsIContent* aContent, DocAccessible* aDoc);
// nsAccessible
virtual nsresult GetNameInternal(nsAString& aName);
@ -41,7 +41,7 @@ public:
class nsHTMLLabelAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLLabelAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED
@ -56,7 +56,7 @@ public:
class nsHTMLOutputAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLOutputAccessible(nsIContent* aContent, DocAccessible* aDoc);
NS_DECL_ISUPPORTS_INHERITED

View File

@ -8,7 +8,7 @@
#include "Accessible-inl.h"
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "Role.h"
#include "States.h"
#include "TextAttrs.h"
@ -41,7 +41,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHyperTextAccessible::
nsHyperTextAccessible(nsIContent* aNode, nsDocAccessible* aDoc) :
nsHyperTextAccessible(nsIContent* aNode, DocAccessible* aDoc) :
nsAccessibleWrap(aNode, aDoc)
{
mFlags |= eHyperTextAccessible;

View File

@ -41,7 +41,7 @@ class nsHyperTextAccessible : public nsAccessibleWrap,
public nsIAccessibleEditableText
{
public:
nsHyperTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHyperTextAccessible(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsHyperTextAccessible() { }
NS_DECL_ISUPPORTS_INHERITED

View File

@ -3,17 +3,17 @@
* 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/. */
#ifndef _nsDocAccessibleWrap_H_
#define _nsDocAccessibleWrap_H_
#ifndef mozilla_a11y_DocAccessibleWrap_h__
#define mozilla_a11y_DocAccessibleWrap_h__
#include "nsDocAccessible.h"
#include "DocAccessible.h"
class nsDocAccessibleWrap: public nsDocAccessible
class DocAccessibleWrap : public DocAccessible
{
public:
nsDocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell);
virtual ~nsDocAccessibleWrap();
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell);
virtual ~DocAccessibleWrap();
};

View File

@ -3,18 +3,18 @@
* 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 "nsDocAccessibleWrap.h"
#include "DocAccessibleWrap.h"
#import "mozAccessible.h"
nsDocAccessibleWrap::
nsDocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
nsDocAccessible(aDocument, aRootContent, aPresShell)
DocAccessibleWrap::
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
DocAccessible(aDocument, aRootContent, aPresShell)
{
}
nsDocAccessibleWrap::~nsDocAccessibleWrap()
DocAccessibleWrap::~DocAccessibleWrap()
{
}

View File

@ -17,8 +17,9 @@ LIBXUL_LIBRARY = 1
CMMSRCS = nsAccessNodeWrap.mm \
nsDocAccessibleWrap.mm \
CMMSRCS = \
DocAccessibleWrap.mm \
nsAccessNodeWrap.mm \
nsAccessibleWrap.mm \
mozAccessible.mm \
mozDocAccessible.mm \

View File

@ -599,7 +599,7 @@ GetNativeFromGeckoAccessible(nsIAccessible *anAccessible)
// Get a pointer to the native window (NSWindow) we reside in.
NSWindow *nativeWindow = nil;
nsDocAccessible* docAcc = accWrap->Document();
DocAccessible* docAcc = accWrap->Document();
if (docAcc)
nativeWindow = static_cast<NSWindow*>(docAcc->GetNativeWindow());

View File

@ -15,7 +15,7 @@
class nsAccessNodeWrap : public nsAccessNode
{
public:
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessNodeWrap(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsAccessNodeWrap();
static void InitAccessibility();

View File

@ -19,7 +19,7 @@
//-----------------------------------------------------
nsAccessNodeWrap::
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessNodeWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessNode(aContent, aDoc)
{
}

View File

@ -29,7 +29,7 @@
class nsAccessibleWrap : public nsAccessible
{
public: // construction, destruction
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsAccessibleWrap();
/**

View File

@ -3,7 +3,7 @@
* 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 "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsObjCExceptions.h"
#include "Accessible-inl.h"
@ -17,7 +17,7 @@
using namespace mozilla::a11y;
nsAccessibleWrap::
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessible(aContent, aDoc), mNativeObject(nil),
mNativeInited(false)
{

View File

@ -23,7 +23,7 @@ class ARIAGridAccessibleWrap : public ARIAGridAccessible,
public CAccessibleTable
{
public:
ARIAGridAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
ARIAGridAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
ARIAGridAccessible(aContent, aDoc) {}
// IUnknown
@ -41,7 +41,7 @@ class ARIAGridCellAccessibleWrap : public ARIAGridCellAccessible,
public CAccessibleTableCell
{
public:
ARIAGridCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
ARIAGridCellAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
ARIAGridCellAccessible(aContent, aDoc) {}
// IUnknown

View File

@ -6,7 +6,7 @@
#include "mozilla/dom/TabChild.h"
#include "Compatibility.h"
#include "nsDocAccessibleWrap.h"
#include "DocAccessibleWrap.h"
#include "ISimpleDOMDocument_i.c"
#include "nsIAccessibilityService.h"
#include "nsWinUtils.h"
@ -32,35 +32,37 @@ using namespace mozilla::a11y;
*/
////////////////////////////////////////////////////////////////////////////////
// nsDocAccessibleWrap
// DocAccessibleWrap
////////////////////////////////////////////////////////////////////////////////
nsDocAccessibleWrap::
nsDocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
nsDocAccessible(aDocument, aRootContent, aPresShell), mHWND(NULL)
DocAccessibleWrap::
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell) :
DocAccessible(aDocument, aRootContent, aPresShell), mHWND(NULL)
{
}
nsDocAccessibleWrap::~nsDocAccessibleWrap()
DocAccessibleWrap::~DocAccessibleWrap()
{
}
//-----------------------------------------------------
// IUnknown interface methods - see iunknown.h for documentation
//-----------------------------------------------------
STDMETHODIMP_(ULONG) nsDocAccessibleWrap::AddRef()
STDMETHODIMP_(ULONG)
DocAccessibleWrap::AddRef()
{
return nsAccessNode::AddRef();
}
STDMETHODIMP_(ULONG) nsDocAccessibleWrap::Release()
STDMETHODIMP_(ULONG) DocAccessibleWrap::Release()
{
return nsAccessNode::Release();
}
// Microsoft COM QueryInterface
STDMETHODIMP nsDocAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
STDMETHODIMP
DocAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
{
*ppv = NULL;
@ -73,7 +75,8 @@ STDMETHODIMP nsDocAccessibleWrap::QueryInterface(REFIID iid, void** ppv)
return S_OK;
}
STDMETHODIMP nsDocAccessibleWrap::get_URL(/* [out] */ BSTR __RPC_FAR *aURL)
STDMETHODIMP
DocAccessibleWrap::get_URL(/* [out] */ BSTR __RPC_FAR *aURL)
{
__try {
*aURL = NULL;
@ -93,7 +96,8 @@ __try {
return E_FAIL;
}
STDMETHODIMP nsDocAccessibleWrap::get_title( /* [out] */ BSTR __RPC_FAR *aTitle)
STDMETHODIMP
DocAccessibleWrap::get_title( /* [out] */ BSTR __RPC_FAR *aTitle)
{
__try {
*aTitle = NULL;
@ -110,7 +114,8 @@ __try {
return E_FAIL;
}
STDMETHODIMP nsDocAccessibleWrap::get_mimeType(/* [out] */ BSTR __RPC_FAR *aMimeType)
STDMETHODIMP
DocAccessibleWrap::get_mimeType(/* [out] */ BSTR __RPC_FAR *aMimeType)
{
__try {
*aMimeType = NULL;
@ -130,7 +135,8 @@ __try {
return E_FAIL;
}
STDMETHODIMP nsDocAccessibleWrap::get_docType(/* [out] */ BSTR __RPC_FAR *aDocType)
STDMETHODIMP
DocAccessibleWrap::get_docType(/* [out] */ BSTR __RPC_FAR *aDocType)
{
__try {
*aDocType = NULL;
@ -150,7 +156,8 @@ __try {
return E_FAIL;
}
STDMETHODIMP nsDocAccessibleWrap::get_nameSpaceURIForID(/* [in] */ short aNameSpaceID,
STDMETHODIMP
DocAccessibleWrap::get_nameSpaceURIForID(/* [in] */ short aNameSpaceID,
/* [out] */ BSTR __RPC_FAR *aNameSpaceURI)
{
__try {
@ -177,7 +184,7 @@ __try {
}
STDMETHODIMP
nsDocAccessibleWrap::put_alternateViewMediaTypes( /* [in] */ BSTR __RPC_FAR *aCommaSeparatedMediaTypes)
DocAccessibleWrap::put_alternateViewMediaTypes( /* [in] */ BSTR __RPC_FAR *aCommaSeparatedMediaTypes)
{
__try {
*aCommaSeparatedMediaTypes = NULL;
@ -186,7 +193,8 @@ __try {
return E_NOTIMPL;
}
STDMETHODIMP nsDocAccessibleWrap::get_accValue(
STDMETHODIMP
DocAccessibleWrap::get_accValue(
/* [optional][in] */ VARIANT varChild,
/* [retval][out] */ BSTR __RPC_FAR *pszValue)
{
@ -209,7 +217,7 @@ STDMETHODIMP nsDocAccessibleWrap::get_accValue(
// nsAccessNode
void
nsDocAccessibleWrap::Shutdown()
DocAccessibleWrap::Shutdown()
{
// Do window emulation specific shutdown if emulation was started.
if (nsWinUtils::IsWindowEmulationStarted()) {
@ -222,25 +230,25 @@ nsDocAccessibleWrap::Shutdown()
mHWND = nsnull;
}
nsDocAccessible::Shutdown();
DocAccessible::Shutdown();
}
////////////////////////////////////////////////////////////////////////////////
// nsDocAccessible public
// DocAccessible public
void*
nsDocAccessibleWrap::GetNativeWindow() const
DocAccessibleWrap::GetNativeWindow() const
{
return mHWND ? mHWND : nsDocAccessible::GetNativeWindow();
return mHWND ? mHWND : DocAccessible::GetNativeWindow();
}
////////////////////////////////////////////////////////////////////////////////
// nsDocAccessible protected
// DocAccessible protected
void
nsDocAccessibleWrap::DoInitialUpdate()
DocAccessibleWrap::DoInitialUpdate()
{
nsDocAccessible::DoInitialUpdate();
DocAccessible::DoInitialUpdate();
if (nsWinUtils::IsWindowEmulationStarted()) {
// Create window for tab document.
@ -278,7 +286,7 @@ nsDocAccessibleWrap::DoInitialUpdate()
sHWNDCache.Put(mHWND, this);
} else {
nsDocAccessible* parentDocument = ParentDocument();
DocAccessible* parentDocument = ParentDocument();
if (parentDocument)
mHWND = parentDocument->GetNativeWindow();
}

View File

@ -7,22 +7,22 @@
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
*/
#ifndef _nsDocAccessibleWrap_H_
#define _nsDocAccessibleWrap_H_
#ifndef mozilla_a11y_DocAccessibleWrap_h__
#define mozilla_a11y_DocAccessibleWrap_h__
#include "ISimpleDOMDocument.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "nsIDocShellTreeItem.h"
class nsDocAccessibleWrap: public nsDocAccessible,
public ISimpleDOMDocument
class DocAccessibleWrap : public DocAccessible,
public ISimpleDOMDocument
{
public:
nsDocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell);
virtual ~nsDocAccessibleWrap();
DocAccessibleWrap(nsIDocument* aDocument, nsIContent* aRootContent,
nsIPresShell* aPresShell);
virtual ~DocAccessibleWrap();
// IUnknown
STDMETHODIMP_(ULONG) AddRef();
@ -59,11 +59,11 @@ public:
// nsAccessNode
virtual void Shutdown();
// nsDocAccessible
// DocAccessible
virtual void* GetNativeWindow() const;
protected:
// nsDocAccessible
// DocAccessible
virtual void DoInitialUpdate();
protected:

View File

@ -18,9 +18,9 @@ LIBXUL_LIBRARY = 1
CPPSRCS = \
ApplicationAccessibleWrap.cpp \
ARIAGridAccessibleWrap.cpp \
DocAccessibleWrap.cpp \
nsAccessNodeWrap.cpp \
nsAccessibleWrap.cpp \
nsDocAccessibleWrap.cpp \
nsHTMLWin32ObjectAccessible.cpp \
nsXULMenuAccessibleWrap.cpp \
nsXULListboxAccessibleWrap.cpp \

View File

@ -31,13 +31,13 @@ RootAccessibleWrap::~RootAccessibleWrap()
// RootAccessible
void
RootAccessibleWrap::DocumentActivated(nsDocAccessible* aDocument)
RootAccessibleWrap::DocumentActivated(DocAccessible* aDocument)
{
if (Compatibility::IsDolphin() &&
nsCoreUtils::IsTabDocument(aDocument->GetDocumentNode())) {
PRUint32 count = mChildDocuments.Length();
for (PRUint32 idx = 0; idx < count; idx++) {
nsDocAccessible* childDoc = mChildDocuments[idx];
DocAccessible* childDoc = mChildDocuments[idx];
HWND childDocHWND = static_cast<HWND>(childDoc->GetNativeWindow());
if (childDoc != aDocument)
nsWinUtils::HideNativeWindow(childDocHWND);

View File

@ -19,7 +19,7 @@ public:
virtual ~RootAccessibleWrap();
// RootAccessible
virtual void DocumentActivated(nsDocAccessible* aDocument);
virtual void DocumentActivated(DocAccessible* aDocument);
};
} // namespace a11y

View File

@ -7,7 +7,7 @@
#include "ISimpleDOMText_i.c"
#include "nsCoreUtils.h"
#include "nsDocAccessible.h"
#include "DocAccessible.h"
#include "Statistics.h"
#include "nsIFrame.h"
#include "nsFontMetrics.h"
@ -23,7 +23,7 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
TextLeafAccessibleWrap::
TextLeafAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
TextLeafAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
TextLeafAccessible(aContent, aDoc)
{
}
@ -101,7 +101,7 @@ __try {
return rv;
}
nsDocAccessible* docAccessible = Document();
DocAccessible* docAccessible = Document();
NS_ASSERTION(docAccessible,
"There must always be a doc accessible, but there isn't. Crash!");

View File

@ -20,7 +20,7 @@ class TextLeafAccessibleWrap : public TextLeafAccessible,
public ISimpleDOMText
{
public:
TextLeafAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
TextLeafAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc);
virtual ~TextLeafAccessibleWrap() {}
// IUnknown methods - see iunknown.h for documentation

View File

@ -37,7 +37,7 @@ AccTextChangeEvent* nsAccessNodeWrap::gTextEvent = nsnull;
////////////////////////////////////////////////////////////////////////////////
nsAccessNodeWrap::
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessNodeWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessNode(aContent, aDoc)
{
}
@ -129,7 +129,7 @@ nsAccessNodeWrap::QueryService(REFGUID guidService, REFIID iid, void** ppv)
return E_NOINTERFACE;
// Make sure this is a document.
nsDocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
DocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
if (!docAcc)
return E_UNEXPECTED;
@ -608,7 +608,7 @@ GetHRESULT(nsresult aResult)
}
}
nsRefPtrHashtable<nsPtrHashKey<void>, nsDocAccessible> nsAccessNodeWrap::sHWNDCache;
nsRefPtrHashtable<nsPtrHashKey<void>, DocAccessible> nsAccessNodeWrap::sHWNDCache;
LRESULT CALLBACK
nsAccessNodeWrap::WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
@ -621,7 +621,7 @@ nsAccessNodeWrap::WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_GETOBJECT:
{
if (lParam == OBJID_CLIENT) {
nsDocAccessible* document = sHWNDCache.GetWeak(static_cast<void*>(hWnd));
DocAccessible* document = sHWNDCache.GetWeak(static_cast<void*>(hWnd));
if (document) {
IAccessible* msaaAccessible = NULL;
document->GetNativeInterface((void**)&msaaAccessible); // does an addref

View File

@ -50,7 +50,7 @@ class nsAccessNodeWrap : public nsAccessNode,
STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, void** ppv);
public: // construction, destruction
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessNodeWrap(nsIContent* aContent, DocAccessible* aDoc);
virtual ~nsAccessNodeWrap();
// IUnknown
@ -119,7 +119,7 @@ public: // construction, destruction
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT Msg,
WPARAM WParam, LPARAM lParam);
static nsRefPtrHashtable<nsPtrHashKey<void>, nsDocAccessible> sHWNDCache;
static nsRefPtrHashtable<nsPtrHashKey<void>, DocAccessible> sHWNDCache;
protected:

View File

@ -129,7 +129,7 @@ __try {
if (IsDefunct())
return CO_E_OBJNOTCONNECTED;
nsDocAccessible* doc = AsDoc();
DocAccessible* doc = AsDoc();
if (doc) {
// Return window system accessible object for root document and tab document
// accessibles.
@ -1569,7 +1569,7 @@ HWND
nsAccessibleWrap::GetHWNDFor(nsAccessible *aAccessible)
{
if (aAccessible) {
nsDocAccessible* document = aAccessible->Document();
DocAccessible* document = aAccessible->Document();
if(!document)
return nsnull;
@ -1706,7 +1706,7 @@ nsAccessibleWrap::GetXPAccessibleFor(const VARIANT& aVarChild)
// ARIA document.
if (ARIARole() == roles::DOCUMENT) {
nsDocAccessible* document = Document();
DocAccessible* document = Document();
nsAccessible* child =
document->GetAccessibleByUniqueIDInSubtree(uniqueID);

View File

@ -70,7 +70,7 @@ class nsAccessibleWrap : public nsAccessible,
public IAccessible2
{
public: // construction, destruction
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsAccessible(aContent, aDoc) { }
virtual ~nsAccessibleWrap() { }

View File

@ -15,7 +15,7 @@ class nsHTMLImageAccessibleWrap : public nsHTMLImageAccessible,
public ia2AccessibleImage
{
public:
nsHTMLImageAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLImageAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsHTMLImageAccessible(aContent, aDoc) {}
// IUnknown

View File

@ -21,7 +21,7 @@ class nsHTMLTableAccessibleWrap : public nsHTMLTableAccessible,
public CAccessibleTable
{
public:
nsHTMLTableAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLTableAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsHTMLTableAccessible(aContent, aDoc) {}
// IUnknown
@ -40,7 +40,7 @@ class nsHTMLTableCellAccessibleWrap : public nsHTMLTableCellAccessible,
public CAccessibleTableCell
{
public:
nsHTMLTableCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLTableCellAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsHTMLTableCellAccessible(aContent, aDoc) {}
// IUnknown
@ -60,7 +60,7 @@ class nsHTMLTableHeaderCellAccessibleWrap : public nsHTMLTableHeaderCellAccessib
{
public:
nsHTMLTableHeaderCellAccessibleWrap(nsIContent* aContent,
nsDocAccessible* aDoc) :
DocAccessible* aDoc) :
nsHTMLTableHeaderCellAccessible(aContent, aDoc) {}
// IUnknown

View File

@ -16,7 +16,7 @@ using namespace mozilla::a11y;
nsHTMLWin32ObjectOwnerAccessible::
nsHTMLWin32ObjectOwnerAccessible(nsIContent* aContent,
nsDocAccessible* aDoc, void* aHwnd) :
DocAccessible* aDoc, void* aHwnd) :
nsAccessibleWrap(aContent, aDoc), mHwnd(aHwnd)
{
// Our only child is a nsHTMLWin32ObjectAccessible object.

View File

@ -20,7 +20,7 @@ public:
// Mozilla tree, and returns null for previous and next sibling. This would
// have the effect of cutting off all content after the plugin.
nsHTMLWin32ObjectOwnerAccessible(nsIContent* aContent,
nsDocAccessible* aDoc, void* aHwnd);
DocAccessible* aDoc, void* aHwnd);
virtual ~nsHTMLWin32ObjectOwnerAccessible() {}
// nsAccessNode

View File

@ -18,7 +18,7 @@ class nsHyperTextAccessibleWrap : public nsHyperTextAccessible,
public CAccessibleEditableText
{
public:
nsHyperTextAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
nsHyperTextAccessible(aContent, aDoc) {}
// IUnknown

Some files were not shown because too many files have changed in this diff Show More