зеркало из https://github.com/mozilla/gecko-dev.git
Bug 672504 - Don't keep pointer to weak presshell in accessible. r=surkov
This commit is contained in:
Родитель
4a0903b352
Коммит
df64428945
|
@ -162,9 +162,9 @@ mai_atk_socket_get_extents(AtkComponent* aComponent,
|
|||
}
|
||||
|
||||
AtkSocketAccessible::AtkSocketAccessible(nsIContent* aContent,
|
||||
nsIWeakReference* aShell,
|
||||
nsDocAccessible* aDoc,
|
||||
const nsCString& aPlugId) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
mAtkObject = mai_atk_socket_new(this);
|
||||
if (!mAtkObject)
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
*/
|
||||
static bool gCanEmbed;
|
||||
|
||||
AtkSocketAccessible(nsIContent* aContent, nsIWeakReference* aShell,
|
||||
AtkSocketAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
|
||||
const nsCString& aPlugId);
|
||||
|
||||
// nsAccessNode
|
||||
|
|
|
@ -55,8 +55,8 @@
|
|||
//-----------------------------------------------------
|
||||
|
||||
nsAccessNodeWrap::
|
||||
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessNode(aContent, aShell)
|
||||
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessNode(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -49,12 +49,11 @@
|
|||
class nsAccessNodeWrap : public nsAccessNode
|
||||
{
|
||||
public: // construction, destruction
|
||||
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
virtual ~nsAccessNodeWrap();
|
||||
|
||||
static void InitAccessibility();
|
||||
static void ShutdownAccessibility();
|
||||
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessNodeWrap();
|
||||
|
||||
static void InitAccessibility();
|
||||
static void ShutdownAccessibility();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -281,8 +281,8 @@ PRInt32 nsAccessibleWrap::mAccWrapDeleted = 0;
|
|||
#endif
|
||||
|
||||
nsAccessibleWrap::
|
||||
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessible(aContent, aShell), mAtkObject(nsnull)
|
||||
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessible(aContent, aDoc), mAtkObject(nsnull)
|
||||
{
|
||||
#ifdef MAI_LOGGING
|
||||
++mAccWrapCreated;
|
||||
|
@ -362,7 +362,7 @@ NS_IMETHODIMP nsAccessibleWrap::GetNativeInterface(void **aOutAccessible)
|
|||
*aOutAccessible = nsnull;
|
||||
|
||||
if (!mAtkObject) {
|
||||
if (!mWeakShell || !nsAccUtils::IsEmbeddedObject(this)) {
|
||||
if (IsDefunct() || !nsAccUtils::IsEmbeddedObject(this)) {
|
||||
// We don't create ATK objects for node which has been shutdown, or
|
||||
// nsIAccessible plain text leaves
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -84,7 +84,7 @@ class MaiHyperlink;
|
|||
class nsAccessibleWrap: public nsAccessible
|
||||
{
|
||||
public:
|
||||
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessibleWrap();
|
||||
void ShutdownAtkObject();
|
||||
|
||||
|
|
|
@ -63,8 +63,11 @@ FocusManager::FocusedAccessible() const
|
|||
return mActiveItem;
|
||||
|
||||
nsINode* focusedNode = FocusedDOMNode();
|
||||
if (focusedNode)
|
||||
return GetAccService()->GetAccessibleOrContainer(focusedNode, nsnull);
|
||||
if (focusedNode) {
|
||||
nsDocAccessible* doc =
|
||||
GetAccService()->GetDocAccessible(focusedNode->OwnerDoc());
|
||||
return doc ? doc->GetAccessibleOrContainer(focusedNode) : nsnull;
|
||||
}
|
||||
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -84,8 +87,10 @@ 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 =
|
||||
GetAccService()->GetDocAccessible(focusedNode->OwnerDoc());
|
||||
return aAccessible ==
|
||||
GetAccService()->GetAccessibleOrContainer(focusedNode, nsnull);
|
||||
(doc ? doc->GetAccessibleOrContainer(focusedNode) : nsnull);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -251,11 +256,11 @@ FocusManager::ProcessDOMFocus(nsINode* aTarget)
|
|||
GetAccService()->GetDocAccessible(aTarget->OwnerDoc());
|
||||
|
||||
nsAccessible* target = document->GetAccessibleOrContainer(aTarget);
|
||||
if (target) {
|
||||
if (target && document) {
|
||||
// Check if still focused. Otherwise we can end up with storing the active
|
||||
// item for control that isn't focused anymore.
|
||||
nsAccessible* DOMFocus =
|
||||
GetAccService()->GetAccessibleOrContainer(FocusedDOMNode(), nsnull);
|
||||
document->GetAccessibleOrContainer(FocusedDOMNode());
|
||||
if (target != DOMFocus)
|
||||
return;
|
||||
|
||||
|
@ -285,7 +290,8 @@ 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.
|
||||
nsAccessible* DOMFocus =
|
||||
GetAccService()->GetAccessibleOrContainer(FocusedDOMNode(), nsnull);
|
||||
GetAccService()->GetAccessibleOrContainer(FocusedDOMNode(),
|
||||
aEvent->GetDocAccessible());
|
||||
if (target != DOMFocus)
|
||||
return;
|
||||
|
||||
|
|
|
@ -671,7 +671,7 @@ NotificationController::CreateTextChangeEventFor(AccMutationEvent* aEvent)
|
|||
{
|
||||
nsAccessible* container =
|
||||
GetAccService()->GetContainerAccessible(aEvent->mNode,
|
||||
aEvent->mAccessible->GetWeakShell());
|
||||
aEvent->GetDocAccessible());
|
||||
if (!container)
|
||||
return;
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ using namespace mozilla::a11y;
|
|||
// Constructor
|
||||
|
||||
nsARIAGridAccessible::
|
||||
nsARIAGridAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsARIAGridAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -932,8 +932,8 @@ nsARIAGridAccessible::GetSelectedColumnsArray(PRUint32 *acolumnCount,
|
|||
// Constructor
|
||||
|
||||
nsARIAGridCellAccessible::
|
||||
nsARIAGridCellAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsARIAGridCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class nsARIAGridAccessible : public nsAccessibleWrap,
|
|||
public nsIAccessibleTable
|
||||
{
|
||||
public:
|
||||
nsARIAGridAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsARIAGridAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -110,7 +110,7 @@ class nsARIAGridCellAccessible : public nsHyperTextAccessibleWrap,
|
|||
public nsIAccessibleTableCell
|
||||
{
|
||||
public:
|
||||
nsARIAGridCellAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsARIAGridCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -425,11 +425,12 @@ nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
|
|||
nsCOMPtr<nsINode> focusNode(do_QueryInterface(focusDOMNode));
|
||||
nsCOMPtr<nsINode> resultNode =
|
||||
nsCoreUtils::GetDOMNodeFromDOMPoint(focusNode, focusOffset);
|
||||
nsCOMPtr<nsIWeakReference> weakShell(nsCoreUtils::GetWeakShellFor(resultNode));
|
||||
|
||||
// Get text accessible containing the result node.
|
||||
nsAccessible* accessible =
|
||||
GetAccService()->GetAccessibleOrContainer(resultNode, weakShell);
|
||||
nsDocAccessible* doc =
|
||||
GetAccService()->GetDocAccessible(resultNode->OwnerDoc());
|
||||
nsAccessible* accessible = doc ?
|
||||
doc->GetAccessibleOrContainer(resultNode) : nsnull;
|
||||
if (!accessible) {
|
||||
NS_NOTREACHED("No nsIAccessibleText for selection change event!");
|
||||
return nsnull;
|
||||
|
@ -525,9 +526,8 @@ nsAccUtils::GetScreenCoordsForWindow(nsAccessNode *aAccessNode)
|
|||
nsIntPoint
|
||||
nsAccUtils::GetScreenCoordsForParent(nsAccessNode *aAccessNode)
|
||||
{
|
||||
nsAccessible *parent =
|
||||
GetAccService()->GetContainerAccessible(aAccessNode->GetNode(),
|
||||
aAccessNode->GetWeakShell());
|
||||
nsDocAccessible* document = aAccessNode->GetDocAccessible();
|
||||
nsAccessible* parent = document->GetContainerAccessible(aAccessNode->GetNode());
|
||||
if (!parent)
|
||||
return nsIntPoint(0, 0);
|
||||
|
||||
|
|
|
@ -156,11 +156,10 @@ public:
|
|||
/**
|
||||
* Return document accessible for the given presshell.
|
||||
*/
|
||||
static nsDocAccessible *GetDocAccessibleFor(nsIWeakReference *aWeakShell)
|
||||
static nsDocAccessible* GetDocAccessibleFor(const nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(aWeakShell));
|
||||
return presShell ?
|
||||
GetAccService()->GetDocAccessible(presShell->GetDocument()) : nsnull;
|
||||
return aPresShell ?
|
||||
GetAccService()->GetDocAccessible(aPresShell->GetDocument()) : nsnull;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -89,8 +89,8 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(nsAccessNode, LastRelease())
|
|||
// nsAccessNode construction/desctruction
|
||||
|
||||
nsAccessNode::
|
||||
nsAccessNode(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
mContent(aContent), mWeakShell(aShell)
|
||||
nsAccessNode(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
mContent(aContent), mDoc(aDoc)
|
||||
{
|
||||
#ifdef DEBUG_A11Y
|
||||
mIsInitialized = false;
|
||||
|
@ -99,15 +99,15 @@ nsAccessNode::
|
|||
|
||||
nsAccessNode::~nsAccessNode()
|
||||
{
|
||||
NS_ASSERTION(!mWeakShell, "LastRelease was never called!?!");
|
||||
NS_ASSERTION(!mDoc, "LastRelease was never called!?!");
|
||||
}
|
||||
|
||||
void nsAccessNode::LastRelease()
|
||||
{
|
||||
// First cleanup if needed...
|
||||
if (mWeakShell) {
|
||||
if (mDoc) {
|
||||
Shutdown();
|
||||
NS_ASSERTION(!mWeakShell, "A Shutdown() impl forgot to call its parent's Shutdown?");
|
||||
NS_ASSERTION(!mDoc, "A Shutdown() impl forgot to call its parent's Shutdown?");
|
||||
}
|
||||
// ... then die.
|
||||
delete this;
|
||||
|
@ -133,7 +133,7 @@ void
|
|||
nsAccessNode::Shutdown()
|
||||
{
|
||||
mContent = nsnull;
|
||||
mWeakShell = nsnull;
|
||||
mDoc = nsnull;
|
||||
}
|
||||
|
||||
nsApplicationAccessible*
|
||||
|
@ -215,31 +215,15 @@ void nsAccessNode::ShutdownXPAccessibility()
|
|||
NotifyA11yInitOrShutdown(false);
|
||||
}
|
||||
|
||||
already_AddRefed<nsIPresShell>
|
||||
nsAccessNode::GetPresShell()
|
||||
{
|
||||
nsIPresShell* presShell = nsnull;
|
||||
if (mWeakShell)
|
||||
CallQueryReferent(mWeakShell.get(), &presShell);
|
||||
|
||||
return presShell;
|
||||
}
|
||||
|
||||
// nsAccessNode protected
|
||||
nsPresContext* nsAccessNode::GetPresContext()
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
|
||||
if (!presShell) {
|
||||
if (IsDefunct())
|
||||
return nsnull;
|
||||
}
|
||||
return presShell->GetPresContext();
|
||||
}
|
||||
|
||||
nsDocAccessible *
|
||||
nsAccessNode::GetDocAccessible() const
|
||||
{
|
||||
return mContent ?
|
||||
GetAccService()->GetDocAccessible(mContent->OwnerDoc()) : nsnull;
|
||||
nsIPresShell* presShell(mDoc->PresShell());
|
||||
|
||||
return presShell ? presShell->GetPresContext() : nsnull;
|
||||
}
|
||||
|
||||
nsRootAccessible*
|
||||
|
@ -281,7 +265,7 @@ nsAccessNode::ScrollTo(PRUint32 aScrollType)
|
|||
if (IsDefunct())
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell(GetPresShell());
|
||||
nsIPresShell* shell = mDoc->PresShell();
|
||||
if (!shell)
|
||||
return;
|
||||
|
||||
|
@ -305,9 +289,7 @@ nsAccessNode::GetCurrentFocus()
|
|||
{
|
||||
// XXX: consider to use nsFocusManager directly, it allows us to avoid
|
||||
// unnecessary query interface calls.
|
||||
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||
NS_ENSURE_TRUE(shell, nsnull);
|
||||
nsIDocument *doc = shell->GetDocument();
|
||||
nsIDocument* doc = GetDocumentNode();
|
||||
NS_ENSURE_TRUE(doc, nsnull);
|
||||
|
||||
nsIDOMWindow* win = doc->GetWindow();
|
||||
|
|
|
@ -71,7 +71,7 @@ class nsAccessNode: public nsISupports
|
|||
{
|
||||
public:
|
||||
|
||||
nsAccessNode(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsAccessNode(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessNode();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
|
@ -88,7 +88,7 @@ public:
|
|||
/**
|
||||
* Return the document accessible for this access node.
|
||||
*/
|
||||
nsDocAccessible *GetDocAccessible() const;
|
||||
nsDocAccessible* GetDocAccessible() const { return mDoc; }
|
||||
|
||||
/**
|
||||
* Return the root document accessible for this accessnode.
|
||||
|
@ -147,16 +147,6 @@ public:
|
|||
return GetNode() && GetNode()->IsNodeOfType(nsINode::eDOCUMENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the corresponding press shell for this accessible.
|
||||
*/
|
||||
already_AddRefed<nsIPresShell> GetPresShell();
|
||||
|
||||
/**
|
||||
* Return presentation shell for the accessible.
|
||||
*/
|
||||
nsIWeakReference* GetWeakShell() const { return mWeakShell; }
|
||||
|
||||
/**
|
||||
* Return the unique identifier of the accessible.
|
||||
*/
|
||||
|
@ -189,7 +179,7 @@ protected:
|
|||
void LastRelease();
|
||||
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
nsCOMPtr<nsIWeakReference> mWeakShell;
|
||||
nsDocAccessible* mDoc;
|
||||
|
||||
/**
|
||||
* Notify global nsIObserver's that a11y is getting init'd or shutdown
|
||||
|
|
|
@ -205,14 +205,15 @@ nsAccessibilityService::GetRootDocumentAccessible(nsIPresShell* aPresShell,
|
|||
}
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
|
||||
already_AddRefed<nsAccessible>
|
||||
nsAccessibilityService::CreateOuterDocAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsOuterDocAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsOuterDocAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -220,9 +221,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTML4ButtonAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTML4ButtonAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTML4ButtonAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -230,9 +232,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLButtonAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLButtonAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLButtonAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -240,9 +243,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLLIAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLLIAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLLIAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -250,9 +254,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHyperTextAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHyperTextAccessibleWrap(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -260,9 +265,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLCheckboxAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLCheckboxAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLCheckboxAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -270,9 +276,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLComboboxAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLComboboxAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLComboboxAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -280,9 +287,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLCanvasAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLCanvasAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLCanvasAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -290,9 +298,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLFileInputAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLFileInputAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLFileInputAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -307,11 +316,13 @@ nsAccessibilityService::CreateHTMLImageAccessible(nsIContent* aContent,
|
|||
mapElm = do_QueryInterface(document->FindImageMap(mapElmName));
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = mapElm ?
|
||||
new nsHTMLImageMapAccessible(aContent, weakShell, mapElm) :
|
||||
new nsHTMLImageAccessibleWrap(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
new nsHTMLImageMapAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell),
|
||||
mapElm) :
|
||||
new nsHTMLImageAccessibleWrap(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -319,9 +330,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLGroupboxAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLGroupboxAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLGroupboxAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -329,9 +341,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLListboxAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLSelectListAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLSelectListAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -339,10 +352,11 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLMediaAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, weakShell,
|
||||
roles::GROUPING);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsEnumRoleAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell),
|
||||
roles::GROUPING);
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -362,7 +376,6 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame* aFrame,
|
|||
if (aFrame->GetRect().IsEmpty())
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
|
||||
// 1) for object elements containing either HTML or TXT documents
|
||||
nsCOMPtr<nsIDOMHTMLObjectElement> obj(do_QueryInterface(aContent));
|
||||
|
@ -383,10 +396,11 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame* aFrame,
|
|||
HWND pluginPort = nsnull;
|
||||
aFrame->GetPluginPort(&pluginPort);
|
||||
|
||||
nsAccessible* accessible = new nsHTMLWin32ObjectOwnerAccessible(aContent,
|
||||
weakShell,
|
||||
pluginPort);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLWin32ObjectOwnerAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell),
|
||||
pluginPort);
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
|
||||
#elif MOZ_ACCESSIBILITY_ATK
|
||||
|
@ -398,9 +412,11 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame* aFrame,
|
|||
NPPVpluginNativeAccessibleAtkPlugId, &plugId);
|
||||
if (NS_SUCCEEDED(rv) && !plugId.IsEmpty()) {
|
||||
AtkSocketAccessible* socketAccessible =
|
||||
new AtkSocketAccessible(aContent, weakShell, plugId);
|
||||
new AtkSocketAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell),
|
||||
plugId);
|
||||
|
||||
NS_IF_ADDREF(socketAccessible);
|
||||
NS_ADDREF(socketAccessible);
|
||||
return socketAccessible;
|
||||
}
|
||||
#endif
|
||||
|
@ -417,9 +433,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLRadioButtonAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLRadioButtonAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -427,9 +444,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLTableAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLTableAccessibleWrap(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLTableAccessibleWrap(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -437,10 +455,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLTableCellAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLTableCellAccessibleWrap(aContent,
|
||||
weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLTableCellAccessibleWrap(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -448,9 +466,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLTextAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLTextAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLTextAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -458,9 +477,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLTextFieldAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLTextFieldAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLTextFieldAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -468,9 +488,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLLabelAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLLabelAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLLabelAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -478,9 +499,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLHRAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLHRAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLHRAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -488,9 +510,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLBRAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLBRAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLBRAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -498,9 +521,10 @@ already_AddRefed<nsAccessible>
|
|||
nsAccessibilityService::CreateHTMLCaptionAccessible(nsIContent* aContent,
|
||||
nsIPresShell* aPresShell)
|
||||
{
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
|
||||
nsAccessible* accessible = new nsHTMLCaptionAccessible(aContent, weakShell);
|
||||
NS_IF_ADDREF(accessible);
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLCaptionAccessible(aContent,
|
||||
nsAccUtils::GetDocAccessibleFor(aPresShell));
|
||||
NS_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
|
@ -907,15 +931,14 @@ nsAccessibilityService::GetAccessible(nsINode* aNode)
|
|||
}
|
||||
|
||||
nsAccessible*
|
||||
nsAccessibilityService::GetAccessibleOrContainer(nsINode* aNode,
|
||||
nsIWeakReference* aWeakShell)
|
||||
nsAccessibilityService::GetAccessibleOrContainer(nsINode* aNode, nsDocAccessible* aDoc)
|
||||
{
|
||||
if (!aNode)
|
||||
return nsnull;
|
||||
|
||||
// XXX: weak shell is ignored until multiple shell documents are supported.
|
||||
nsDocAccessible* document = GetDocAccessible(aNode->OwnerDoc());
|
||||
return document ? document->GetAccessibleOrContainer(aNode) : nsnull;
|
||||
NS_PRECONDITION(aDoc, "Must pass a document accessible.");
|
||||
|
||||
return aDoc ? aDoc->GetAccessibleOrContainer(aNode) : nsnull;
|
||||
}
|
||||
|
||||
static bool HasRelatedContent(nsIContent *aContent)
|
||||
|
@ -1057,7 +1080,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
return nsnull;
|
||||
}
|
||||
|
||||
newAcc = new nsHyperTextAccessibleWrap(content, aWeakShell);
|
||||
newAcc = new nsHyperTextAccessibleWrap(content, docAcc);
|
||||
if (docAcc->BindToDocument(newAcc, nsAccUtils::GetRoleMapEntry(aNode)))
|
||||
return newAcc;
|
||||
return nsnull;
|
||||
|
@ -1151,12 +1174,12 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
|
||||
if (roleMapEntry->role == roles::TABLE ||
|
||||
roleMapEntry->role == roles::TREE_TABLE) {
|
||||
newAcc = new nsARIAGridAccessibleWrap(content, aWeakShell);
|
||||
newAcc = new nsARIAGridAccessibleWrap(content, docAcc);
|
||||
|
||||
} else if (roleMapEntry->role == roles::GRID_CELL ||
|
||||
roleMapEntry->role == roles::ROWHEADER ||
|
||||
roleMapEntry->role == roles::COLUMNHEADER) {
|
||||
newAcc = new nsARIAGridCellAccessibleWrap(content, aWeakShell);
|
||||
newAcc = new nsARIAGridCellAccessibleWrap(content, docAcc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1168,7 +1191,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
// we do not call it if accessibles for table related content are
|
||||
// prevented above.
|
||||
newAcc = CreateHTMLAccessibleByMarkup(weakFrame.GetFrame(), content,
|
||||
aWeakShell);
|
||||
docAcc);
|
||||
|
||||
if (!newAcc) {
|
||||
// Do not create accessible object subtrees for non-rendered table
|
||||
|
@ -1200,24 +1223,24 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
if (!newAcc) {
|
||||
// Elements may implement nsIAccessibleProvider via XBL. This allows them to
|
||||
// say what kind of accessible to create.
|
||||
newAcc = CreateAccessibleByType(content, aWeakShell);
|
||||
newAcc = CreateAccessibleByType(content, docAcc);
|
||||
}
|
||||
|
||||
if (!newAcc) {
|
||||
// Create generic accessibles for SVG and MathML nodes.
|
||||
if (content->IsSVG(nsGkAtoms::svg)) {
|
||||
newAcc = new nsEnumRoleAccessible(content, aWeakShell,
|
||||
newAcc = new nsEnumRoleAccessible(content, docAcc,
|
||||
roles::DIAGRAM);
|
||||
}
|
||||
else if (content->IsMathML(nsGkAtoms::math)) {
|
||||
newAcc = new nsEnumRoleAccessible(content, aWeakShell,
|
||||
newAcc = new nsEnumRoleAccessible(content, docAcc,
|
||||
roles::EQUATION);
|
||||
}
|
||||
}
|
||||
|
||||
if (!newAcc) {
|
||||
newAcc = CreateAccessibleForDeckChild(weakFrame.GetFrame(), content,
|
||||
aWeakShell);
|
||||
docAcc);
|
||||
}
|
||||
|
||||
// If no accessible, see if we need to create a generic accessible because
|
||||
|
@ -1234,11 +1257,11 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
|
|||
// other accessibles can point to it, or so that it can hold a state, etc.
|
||||
if (isHTML) {
|
||||
// Interesting HTML container which may have selectable text and/or embedded objects
|
||||
newAcc = new nsHyperTextAccessibleWrap(content, aWeakShell);
|
||||
newAcc = new nsHyperTextAccessibleWrap(content, docAcc);
|
||||
}
|
||||
else { // XUL, SVG, MathML etc.
|
||||
// Interesting generic non-HTML container
|
||||
newAcc = new nsAccessibleWrap(content, aWeakShell);
|
||||
newAcc = new nsAccessibleWrap(content, docAcc);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1319,7 +1342,7 @@ nsAccessibilityService::HasUniversalAriaProperty(nsIContent *aContent)
|
|||
|
||||
already_AddRefed<nsAccessible>
|
||||
nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
|
||||
nsIWeakReference* aWeakShell)
|
||||
nsDocAccessible* aDoc)
|
||||
{
|
||||
nsCOMPtr<nsIAccessibleProvider> accessibleProvider(do_QueryInterface(aContent));
|
||||
if (!accessibleProvider)
|
||||
|
@ -1331,7 +1354,7 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
|
|||
return nsnull;
|
||||
|
||||
if (type == nsIAccessibleProvider::OuterDoc) {
|
||||
nsAccessible* accessible = new nsOuterDocAccessible(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsOuterDocAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
@ -1345,35 +1368,35 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
|
|||
|
||||
// XUL controls
|
||||
case nsIAccessibleProvider::XULAlert:
|
||||
accessible = new nsXULAlertAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULAlertAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULButton:
|
||||
accessible = new nsXULButtonAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULButtonAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULCheckbox:
|
||||
accessible = new nsXULCheckboxAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULCheckboxAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULColorPicker:
|
||||
accessible = new nsXULColorPickerAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULColorPickerAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULColorPickerTile:
|
||||
accessible = new nsXULColorPickerTileAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULColorPickerTileAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULCombobox:
|
||||
accessible = new nsXULComboboxAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULComboboxAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULDropmarker:
|
||||
accessible = new nsXULDropmarkerAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULDropmarkerAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULGroupbox:
|
||||
accessible = new nsXULGroupboxAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULGroupboxAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULImage:
|
||||
|
@ -1383,40 +1406,40 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
|
|||
nsGkAtoms::tooltiptext))
|
||||
return nsnull;
|
||||
|
||||
accessible = new nsHTMLImageAccessibleWrap(aContent, aWeakShell);
|
||||
accessible = new nsHTMLImageAccessibleWrap(aContent, aDoc);
|
||||
break;
|
||||
|
||||
}
|
||||
case nsIAccessibleProvider::XULLink:
|
||||
accessible = new nsXULLinkAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULLinkAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULListbox:
|
||||
accessible = new nsXULListboxAccessibleWrap(aContent, aWeakShell);
|
||||
accessible = new nsXULListboxAccessibleWrap(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULListCell:
|
||||
accessible = new nsXULListCellAccessibleWrap(aContent, aWeakShell);
|
||||
accessible = new nsXULListCellAccessibleWrap(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULListHead:
|
||||
accessible = new nsXULColumnsAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULColumnsAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULListHeader:
|
||||
accessible = new nsXULColumnItemAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULColumnItemAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULListitem:
|
||||
accessible = new nsXULListitemAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULListitemAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULMenubar:
|
||||
accessible = new nsXULMenubarAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULMenubarAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULMenuitem:
|
||||
accessible = new nsXULMenuitemAccessibleWrap(aContent, aWeakShell);
|
||||
accessible = new nsXULMenuitemAccessibleWrap(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULMenupopup:
|
||||
|
@ -1432,167 +1455,167 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
|
|||
kNameSpaceID_XUL))
|
||||
return nsnull;
|
||||
#endif
|
||||
accessible = new nsXULMenupopupAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULMenupopupAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
}
|
||||
case nsIAccessibleProvider::XULMenuSeparator:
|
||||
accessible = new nsXULMenuSeparatorAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULMenuSeparatorAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULPane:
|
||||
accessible = new nsEnumRoleAccessible(aContent, aWeakShell,
|
||||
accessible = new nsEnumRoleAccessible(aContent, aDoc,
|
||||
roles::PANE);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULProgressMeter:
|
||||
accessible = new XULProgressMeterAccessible(aContent, aWeakShell);
|
||||
accessible = new XULProgressMeterAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULStatusBar:
|
||||
accessible = new nsXULStatusBarAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULStatusBarAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULScale:
|
||||
accessible = new nsXULSliderAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULSliderAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULRadioButton:
|
||||
accessible = new nsXULRadioButtonAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULRadioButtonAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULRadioGroup:
|
||||
accessible = new nsXULRadioGroupAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULRadioGroupAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULTab:
|
||||
accessible = new nsXULTabAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULTabAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULTabs:
|
||||
accessible = new nsXULTabsAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULTabsAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULTabpanels:
|
||||
accessible = new nsXULTabpanelsAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULTabpanelsAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULText:
|
||||
accessible = new nsXULTextAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULTextAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULTextBox:
|
||||
accessible = new nsXULTextFieldAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULTextFieldAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULThumb:
|
||||
accessible = new nsXULThumbAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULThumbAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULTree:
|
||||
return CreateAccessibleForXULTree(aContent, aWeakShell);
|
||||
return CreateAccessibleForXULTree(aContent, aDoc);
|
||||
|
||||
case nsIAccessibleProvider::XULTreeColumns:
|
||||
accessible = new nsXULTreeColumnsAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULTreeColumnsAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULTreeColumnItem:
|
||||
accessible = new nsXULColumnItemAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULColumnItemAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULToolbar:
|
||||
accessible = new nsXULToolbarAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULToolbarAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULToolbarSeparator:
|
||||
accessible = new nsXULToolbarSeparatorAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULToolbarSeparatorAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULTooltip:
|
||||
accessible = new nsXULTooltipAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULTooltipAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XULToolbarButton:
|
||||
accessible = new nsXULToolbarButtonAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXULToolbarButtonAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
#endif // MOZ_XUL
|
||||
|
||||
// XForms elements
|
||||
case nsIAccessibleProvider::XFormsContainer:
|
||||
accessible = new nsXFormsContainerAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsContainerAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsLabel:
|
||||
accessible = new nsXFormsLabelAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsLabelAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsOutput:
|
||||
accessible = new nsXFormsOutputAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsOutputAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsTrigger:
|
||||
accessible = new nsXFormsTriggerAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsTriggerAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsInput:
|
||||
accessible = new nsXFormsInputAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsInputAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsInputBoolean:
|
||||
accessible = new nsXFormsInputBooleanAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsInputBooleanAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsInputDate:
|
||||
accessible = new nsXFormsInputDateAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsInputDateAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsSecret:
|
||||
accessible = new nsXFormsSecretAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsSecretAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsSliderRange:
|
||||
accessible = new nsXFormsRangeAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsRangeAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsSelect:
|
||||
accessible = new nsXFormsSelectAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsSelectAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsChoices:
|
||||
accessible = new nsXFormsChoicesAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsChoicesAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsSelectFull:
|
||||
accessible = new nsXFormsSelectFullAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsSelectFullAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsItemCheckgroup:
|
||||
accessible = new nsXFormsItemCheckgroupAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsItemCheckgroupAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsItemRadiogroup:
|
||||
accessible = new nsXFormsItemRadiogroupAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsItemRadiogroupAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsSelectCombobox:
|
||||
accessible = new nsXFormsSelectComboboxAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsSelectComboboxAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsItemCombobox:
|
||||
accessible = new nsXFormsItemComboboxAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsItemComboboxAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsDropmarkerWidget:
|
||||
accessible = new nsXFormsDropmarkerWidgetAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsDropmarkerWidgetAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsCalendarWidget:
|
||||
accessible = new nsXFormsCalendarWidgetAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsCalendarWidgetAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
case nsIAccessibleProvider::XFormsComboboxPopupWidget:
|
||||
accessible = new nsXFormsComboboxPopupWidgetAccessible(aContent, aWeakShell);
|
||||
accessible = new nsXFormsComboboxPopupWidgetAccessible(aContent, aDoc);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1606,46 +1629,45 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
|
|||
already_AddRefed<nsAccessible>
|
||||
nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
|
||||
nsIContent* aContent,
|
||||
nsIWeakReference* aWeakShell)
|
||||
nsDocAccessible* aDoc)
|
||||
{
|
||||
// This method assumes we're in an HTML namespace.
|
||||
nsIAtom* tag = aContent->Tag();
|
||||
if (tag == nsGkAtoms::figcaption) {
|
||||
nsAccessible* accessible =
|
||||
new nsHTMLFigcaptionAccessible(aContent, aWeakShell);
|
||||
new nsHTMLFigcaptionAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
if (tag == nsGkAtoms::figure) {
|
||||
nsAccessible* accessible = new nsHTMLFigureAccessible(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsHTMLFigureAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
if (tag == nsGkAtoms::legend) {
|
||||
nsAccessible* accessible = new nsHTMLLegendAccessible(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsHTMLLegendAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
if (tag == nsGkAtoms::option) {
|
||||
nsAccessible* accessible = new nsHTMLSelectOptionAccessible(aContent,
|
||||
aWeakShell);
|
||||
nsAccessible* accessible = new nsHTMLSelectOptionAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
if (tag == nsGkAtoms::optgroup) {
|
||||
nsAccessible* accessible = new nsHTMLSelectOptGroupAccessible(aContent,
|
||||
aWeakShell);
|
||||
aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
if (tag == nsGkAtoms::ul || tag == nsGkAtoms::ol ||
|
||||
tag == nsGkAtoms::dl) {
|
||||
nsAccessible* accessible = new nsHTMLListAccessible(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsHTMLListAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
@ -1656,13 +1678,12 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
|
|||
nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(aContent);
|
||||
if (roleMapEntry && roleMapEntry->role != roles::NOTHING &&
|
||||
roleMapEntry->role != roles::LINK) {
|
||||
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent,
|
||||
aWeakShell);
|
||||
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
nsAccessible* accessible = new nsHTMLLinkAccessible(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsHTMLLinkAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
@ -1673,7 +1694,7 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
|
|||
// Normally for li, it is created by the list item frame (in nsBlockFrame)
|
||||
// which knows about the bullet frame; however, in this case the list item
|
||||
// must have been styled using display: foo
|
||||
nsAccessible* accessible = new nsHTMLLIAccessible(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsHTMLLIAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
@ -1690,13 +1711,13 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
|
|||
tag == nsGkAtoms::h5 ||
|
||||
tag == nsGkAtoms::h6 ||
|
||||
tag == nsGkAtoms::q) {
|
||||
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
if (tag == nsGkAtoms::tr) {
|
||||
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aWeakShell,
|
||||
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aDoc,
|
||||
roles::ROW);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
|
@ -1704,20 +1725,20 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
|
|||
|
||||
if (nsCoreUtils::IsHTMLTableHeader(aContent)) {
|
||||
nsAccessible* accessible = new nsHTMLTableHeaderCellAccessibleWrap(aContent,
|
||||
aWeakShell);
|
||||
aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
if (tag == nsGkAtoms::output) {
|
||||
nsAccessible* accessible = new nsHTMLOutputAccessible(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsHTMLOutputAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
if (tag == nsGkAtoms::progress) {
|
||||
nsAccessible* accessible =
|
||||
new HTMLProgressMeterAccessible(aContent, aWeakShell);
|
||||
new HTMLProgressMeterAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
@ -1801,7 +1822,7 @@ NS_GetAccessibilityService(nsIAccessibilityService** aResult)
|
|||
already_AddRefed<nsAccessible>
|
||||
nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
|
||||
nsIContent* aContent,
|
||||
nsIWeakReference* aWeakShell)
|
||||
nsDocAccessible* aDoc)
|
||||
{
|
||||
if (aFrame->GetType() == nsGkAtoms::boxFrame ||
|
||||
aFrame->GetType() == nsGkAtoms::scrollFrame) {
|
||||
|
@ -1814,13 +1835,12 @@ nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
|
|||
#ifdef MOZ_XUL
|
||||
if (parentContent->NodeInfo()->Equals(nsGkAtoms::tabpanels,
|
||||
kNameSpaceID_XUL)) {
|
||||
nsAccessible* accessible = new nsXULTabpanelAccessible(aContent,
|
||||
aWeakShell);
|
||||
nsAccessible* accessible = new nsXULTabpanelAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
#endif
|
||||
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aWeakShell,
|
||||
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aDoc,
|
||||
roles::PROPERTYPAGE);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
|
@ -1833,7 +1853,7 @@ nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
|
|||
#ifdef MOZ_XUL
|
||||
already_AddRefed<nsAccessible>
|
||||
nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
|
||||
nsIWeakReference* aWeakShell)
|
||||
nsDocAccessible* aDoc)
|
||||
{
|
||||
nsCOMPtr<nsITreeBoxObject> treeBoxObj = nsCoreUtils::GetTreeBoxObject(aContent);
|
||||
if (!treeBoxObj)
|
||||
|
@ -1849,13 +1869,13 @@ nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
|
|||
|
||||
// Outline of list accessible.
|
||||
if (count == 1) {
|
||||
nsAccessible* accessible = new nsXULTreeAccessible(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsXULTreeAccessible(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
||||
// Table or tree table accessible.
|
||||
nsAccessible* accessible = new nsXULTreeGridAccessibleWrap(aContent, aWeakShell);
|
||||
nsAccessible* accessible = new nsXULTreeGridAccessibleWrap(aContent, aDoc);
|
||||
NS_IF_ADDREF(accessible);
|
||||
return accessible;
|
||||
}
|
||||
|
|
|
@ -216,18 +216,19 @@ public:
|
|||
/**
|
||||
* Return an accessible for the given DOM node or container accessible if
|
||||
* the node is not accessible.
|
||||
*
|
||||
* @param aNode [in] the given node
|
||||
* @param aDoc [in] the document accessible. Can't be null.
|
||||
*/
|
||||
nsAccessible* GetAccessibleOrContainer(nsINode* aNode,
|
||||
nsIWeakReference* aWeakShell);
|
||||
nsAccessible* GetAccessibleOrContainer(nsINode* aNode, nsDocAccessible* aDoc);
|
||||
|
||||
/**
|
||||
* Return a container accessible for the given DOM node.
|
||||
*/
|
||||
inline nsAccessible* GetContainerAccessible(nsINode* aNode,
|
||||
nsIWeakReference* aWeakShell)
|
||||
nsAccessible* GetContainerAccessible(nsINode* aNode, nsDocAccessible* aDoc)
|
||||
{
|
||||
return aNode ?
|
||||
GetAccessibleOrContainer(aNode->GetNodeParent(), aWeakShell) : nsnull;
|
||||
GetAccessibleOrContainer(aNode->GetNodeParent(), aDoc) : nsnull;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -253,28 +254,28 @@ private:
|
|||
* interface.
|
||||
*/
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateAccessibleByType(nsIContent* aContent, nsIWeakReference* aWeakShell);
|
||||
CreateAccessibleByType(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
/**
|
||||
* Create accessible for HTML node by tag name.
|
||||
*/
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateHTMLAccessibleByMarkup(nsIFrame* aFrame, nsIContent* aContent,
|
||||
nsIWeakReference* aWeakShell);
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
/**
|
||||
* Create accessible if parent is a deck frame.
|
||||
*/
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateAccessibleForDeckChild(nsIFrame* aFrame, nsIContent* aContent,
|
||||
nsIWeakReference* aWeakShell);
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
/**
|
||||
* Create accessible for XUL tree element.
|
||||
*/
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateAccessibleForXULTree(nsIContent* aContent, nsIWeakReference* aWeakShell);
|
||||
CreateAccessibleForXULTree(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -193,8 +193,8 @@ nsresult nsAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
return nsAccessNodeWrap::QueryInterface(aIID, aInstancePtr);
|
||||
}
|
||||
|
||||
nsAccessible::nsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessNodeWrap(aContent, aShell),
|
||||
nsAccessible::nsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessNodeWrap(aContent, aDoc),
|
||||
mParent(nsnull), mIndexInParent(-1), mFlags(eChildrenUninitialized),
|
||||
mIndexOfEmbeddedChild(-1), mRoleMapEntry(nsnull)
|
||||
{
|
||||
|
@ -686,7 +686,7 @@ nsAccessible::VisibilityState()
|
|||
if (!frame)
|
||||
return vstates;
|
||||
|
||||
const nsCOMPtr<nsIPresShell> shell(GetPresShell());
|
||||
nsIPresShell* shell(mDoc->PresShell());
|
||||
if (!shell)
|
||||
return vstates;
|
||||
|
||||
|
@ -853,7 +853,7 @@ nsAccessible::ChildAtPoint(PRInt32 aX, PRInt32 aY,
|
|||
// Get accessible for the node with the point or the first accessible in
|
||||
// the DOM parent chain.
|
||||
nsAccessible* accessible =
|
||||
GetAccService()->GetAccessibleOrContainer(content, mWeakShell);
|
||||
GetAccService()->GetAccessibleOrContainer(content, accDocument);
|
||||
if (!accessible)
|
||||
return fallbackAnswer;
|
||||
|
||||
|
@ -1040,7 +1040,7 @@ nsAccessible::GetBounds(PRInt32* aX, PRInt32* aY,
|
|||
if (IsDefunct())
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
|
||||
nsIPresShell* presShell = mDoc->PresShell();
|
||||
|
||||
// This routine will get the entire rectangle for all the frames in this node.
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1743,7 +1743,7 @@ nsAccessible::GetValue(nsAString& aValue)
|
|||
|
||||
// Check if it's a simple xlink.
|
||||
if (nsCoreUtils::IsXLink(mContent)) {
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||
nsIPresShell* presShell = mDoc->PresShell();
|
||||
if (presShell) {
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
return presShell->GetLinkLocation(DOMNode, aValue);
|
||||
|
@ -2273,7 +2273,7 @@ nsAccessible::DispatchClickEvent(nsIContent *aContent, PRUint32 aActionIndex)
|
|||
if (IsDefunct())
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
|
||||
nsIPresShell* presShell = mDoc->PresShell();
|
||||
|
||||
// Scroll into view.
|
||||
presShell->ScrollContentIntoView(aContent, NS_PRESSHELL_SCROLL_ANYWHERE,
|
||||
|
@ -3079,7 +3079,10 @@ nsAccessible::ContainerWidget() const
|
|||
void
|
||||
nsAccessible::CacheChildren()
|
||||
{
|
||||
nsAccTreeWalker walker(mWeakShell, mContent, GetAllowsAnonChildAccessibles());
|
||||
nsDocAccessible* doc = GetDocAccessible();
|
||||
NS_ENSURE_TRUE(doc,);
|
||||
|
||||
nsAccTreeWalker walker(doc->GetWeakShell(), mContent, GetAllowsAnonChildAccessibles());
|
||||
|
||||
nsAccessible* child = nsnull;
|
||||
while ((child = walker.NextChild()) && AppendChild(child));
|
||||
|
@ -3152,8 +3155,7 @@ nsAccessible::GetSiblingAtOffset(PRInt32 aOffset, nsresult* aError) const
|
|||
nsAccessible *
|
||||
nsAccessible::GetFirstAvailableAccessible(nsINode *aStartNode) const
|
||||
{
|
||||
nsAccessible* accessible =
|
||||
GetAccService()->GetAccessibleInWeakShell(aStartNode, mWeakShell);
|
||||
nsAccessible* accessible = mDoc->GetAccessible(aStartNode);
|
||||
if (accessible)
|
||||
return accessible;
|
||||
|
||||
|
@ -3175,8 +3177,7 @@ nsAccessible::GetFirstAvailableAccessible(nsINode *aStartNode) const
|
|||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsINode> node(do_QueryInterface(currentNode));
|
||||
nsAccessible* accessible =
|
||||
GetAccService()->GetAccessibleInWeakShell(node, mWeakShell);
|
||||
nsAccessible* accessible = mDoc->GetAccessible(node);
|
||||
if (accessible)
|
||||
return accessible;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ class nsAccessible : public nsAccessNodeWrap,
|
|||
public nsIAccessibleValue
|
||||
{
|
||||
public:
|
||||
nsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessible();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -59,8 +59,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsLeafAccessible::
|
||||
nsLeafAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsLeafAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -92,8 +92,8 @@ nsLeafAccessible::CacheChildren()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsLinkableAccessible::
|
||||
nsLinkableAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell),
|
||||
nsLinkableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc),
|
||||
mActionAcc(nsnull),
|
||||
mIsLink(false),
|
||||
mIsOnclick(false)
|
||||
|
@ -253,9 +253,9 @@ nsLinkableAccessible::BindToParent(nsAccessible* aParent,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsEnumRoleAccessible::
|
||||
nsEnumRoleAccessible(nsIContent *aNode, nsIWeakReference *aShell,
|
||||
nsEnumRoleAccessible(nsIContent* aNode, nsDocAccessible* aDoc,
|
||||
roles::Role aRole) :
|
||||
nsAccessibleWrap(aNode, aShell), mRole(aRole)
|
||||
nsAccessibleWrap(aNode, aDoc), mRole(aRole)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ class nsLeafAccessible : public nsAccessibleWrap
|
|||
{
|
||||
public:
|
||||
|
||||
nsLeafAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsLeafAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -82,7 +82,7 @@ class nsLinkableAccessible : public nsAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Jump = 0 };
|
||||
|
||||
nsLinkableAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsLinkableAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
@ -123,7 +123,7 @@ protected:
|
|||
class nsEnumRoleAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsEnumRoleAccessible(nsIContent *aContent, nsIWeakReference *aShell,
|
||||
nsEnumRoleAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
|
||||
mozilla::a11y::role aRole);
|
||||
virtual ~nsEnumRoleAccessible() { }
|
||||
|
||||
|
|
|
@ -102,12 +102,13 @@ static const PRUint32 kRelationAttrsLen = NS_ARRAY_LENGTH(kRelationAttrs);
|
|||
// Constructor/desctructor
|
||||
|
||||
nsDocAccessible::
|
||||
nsDocAccessible(nsIDocument *aDocument, nsIContent *aRootContent,
|
||||
nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aRootContent, aShell),
|
||||
nsDocAccessible(nsIDocument* aDocument, nsIContent* aRootContent,
|
||||
nsIWeakReference* aShell) :
|
||||
nsHyperTextAccessibleWrap(aRootContent, this),
|
||||
mDocument(aDocument), mScrollPositionChangedTicks(0),
|
||||
mLoadState(eTreeConstructionPending), mLoadEventType(0),
|
||||
mVirtualCursor(nsnull)
|
||||
mVirtualCursor(nsnull),
|
||||
mPresShell(nsCOMPtr<nsIPresShell>(do_QueryReferent(aShell)).get())
|
||||
{
|
||||
mFlags |= eDocAccessible;
|
||||
|
||||
|
@ -135,6 +136,7 @@ nsDocAccessible::
|
|||
|
||||
nsDocAccessible::~nsDocAccessible()
|
||||
{
|
||||
NS_ASSERTION(!mPresShell, "LastRelease was never called!?!");
|
||||
}
|
||||
|
||||
|
||||
|
@ -208,7 +210,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDocAccessible)
|
|||
NS_IMPL_ADDREF_INHERITED(nsDocAccessible, nsHyperTextAccessible)
|
||||
NS_IMPL_RELEASE_INHERITED(nsDocAccessible, nsHyperTextAccessible)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIAccessible
|
||||
|
||||
|
@ -622,8 +623,7 @@ nsDocAccessible::Init()
|
|||
NS_LOG_ACCDOCCREATE_FOR("document initialize", mDocument, this)
|
||||
|
||||
// Initialize notification controller.
|
||||
nsCOMPtr<nsIPresShell> shell(GetPresShell());
|
||||
mNotificationController = new NotificationController(this, shell);
|
||||
mNotificationController = new NotificationController(this, mPresShell);
|
||||
if (!mNotificationController)
|
||||
return false;
|
||||
|
||||
|
@ -640,7 +640,7 @@ nsDocAccessible::Init()
|
|||
void
|
||||
nsDocAccessible::Shutdown()
|
||||
{
|
||||
if (!mWeakShell) // already shutdown
|
||||
if (!mPresShell) // already shutdown
|
||||
return;
|
||||
|
||||
NS_LOG_ACCDOCDESTROY_FOR("document shutdown", mDocument, this)
|
||||
|
@ -678,7 +678,7 @@ nsDocAccessible::Shutdown()
|
|||
mVirtualCursor = nsnull;
|
||||
}
|
||||
|
||||
mWeakShell = nsnull; // Avoid reentrancy
|
||||
mPresShell = nsnull; // Avoid reentrancy
|
||||
|
||||
mDependentIDsHash.Clear();
|
||||
mNodeToAccessibleMap.Clear();
|
||||
|
@ -692,11 +692,9 @@ nsDocAccessible::Shutdown()
|
|||
nsIFrame*
|
||||
nsDocAccessible::GetFrame() const
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
|
||||
|
||||
nsIFrame* root = nsnull;
|
||||
if (shell)
|
||||
root = shell->GetRootFrame();
|
||||
if (mPresShell)
|
||||
root = mPresShell->GetRootFrame();
|
||||
|
||||
return root;
|
||||
}
|
||||
|
@ -754,8 +752,7 @@ nsresult nsDocAccessible::AddEventListeners()
|
|||
// 1) Set up scroll position listener
|
||||
// 2) Check for editor and listen for changes to editor
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
|
||||
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
|
||||
NS_ENSURE_TRUE(mPresShell, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsISupports> container = mDocument->GetContainer();
|
||||
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem(do_QueryInterface(container));
|
||||
|
@ -783,7 +780,7 @@ nsresult nsDocAccessible::AddEventListeners()
|
|||
NS_ENSURE_TRUE(rootAccessible, NS_ERROR_FAILURE);
|
||||
nsRefPtr<nsCaretAccessible> caretAccessible = rootAccessible->GetCaretAccessible();
|
||||
if (caretAccessible) {
|
||||
caretAccessible->AddDocSelectionListener(presShell);
|
||||
caretAccessible->AddDocSelectionListener(mPresShell);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -829,11 +826,8 @@ nsresult nsDocAccessible::RemoveEventListeners()
|
|||
nsRootAccessible* rootAccessible = RootAccessible();
|
||||
if (rootAccessible) {
|
||||
nsRefPtr<nsCaretAccessible> caretAccessible = rootAccessible->GetCaretAccessible();
|
||||
if (caretAccessible) {
|
||||
// Don't use GetPresShell() which can call Shutdown() if it sees dead pres shell
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||
caretAccessible->RemoveDocSelectionListener(presShell);
|
||||
}
|
||||
if (caretAccessible)
|
||||
caretAccessible->RemoveDocSelectionListener(mPresShell);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -863,11 +857,10 @@ void nsDocAccessible::ScrollTimerCallback(nsITimer *aTimer, void *aClosure)
|
|||
// nsDocAccessible protected member
|
||||
void nsDocAccessible::AddScrollListener()
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||
if (!presShell)
|
||||
if (!mPresShell)
|
||||
return;
|
||||
|
||||
nsIScrollableFrame* sf = presShell->GetRootScrollFrameAsScrollableExternal();
|
||||
nsIScrollableFrame* sf = mPresShell->GetRootScrollFrameAsScrollableExternal();
|
||||
if (sf) {
|
||||
sf->AddScrollPositionListener(this);
|
||||
NS_LOG_ACCDOCCREATE_TEXT("add scroll listener")
|
||||
|
@ -877,11 +870,10 @@ void nsDocAccessible::AddScrollListener()
|
|||
// nsDocAccessible protected member
|
||||
void nsDocAccessible::RemoveScrollListener()
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||
if (!presShell)
|
||||
if (!mPresShell)
|
||||
return;
|
||||
|
||||
nsIScrollableFrame* sf = presShell->GetRootScrollFrameAsScrollableExternal();
|
||||
nsIScrollableFrame* sf = mPresShell->GetRootScrollFrameAsScrollableExternal();
|
||||
if (sf) {
|
||||
sf->RemoveScrollPositionListener(this);
|
||||
}
|
||||
|
@ -1333,11 +1325,10 @@ nsDocAccessible::HandleAccEvent(AccEvent* aAccEvent)
|
|||
void*
|
||||
nsDocAccessible::GetNativeWindow() const
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
|
||||
if (!shell)
|
||||
if (!mPresShell)
|
||||
return nsnull;
|
||||
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
nsIViewManager* vm = mPresShell->GetViewManager();
|
||||
if (!vm)
|
||||
return nsnull;
|
||||
|
||||
|
@ -1524,7 +1515,7 @@ nsDocAccessible::CacheChildren()
|
|||
{
|
||||
// Search for accessible children starting from the document element since
|
||||
// some web pages tend to insert elements under it rather than document body.
|
||||
nsAccTreeWalker walker(mWeakShell, mDocument->GetRootElement(),
|
||||
nsAccTreeWalker walker(do_GetWeakReference(mPresShell).get(), mDocument->GetRootElement(),
|
||||
GetAllowsAnonChildAccessibles());
|
||||
|
||||
nsAccessible* child = nsnull;
|
||||
|
@ -1880,7 +1871,7 @@ nsDocAccessible::UpdateTree(nsAccessible* aContainer, nsIContent* aChildNode,
|
|||
updateFlags |= UpdateTreeInternal(child, aIsInsert);
|
||||
|
||||
} else {
|
||||
nsAccTreeWalker walker(mWeakShell, aChildNode,
|
||||
nsAccTreeWalker walker(do_GetWeakReference(mPresShell).get(), aChildNode,
|
||||
aContainer->GetAllowsAnonChildAccessibles(), true);
|
||||
|
||||
while ((child = walker.NextChild()))
|
||||
|
|
|
@ -138,6 +138,17 @@ public:
|
|||
|
||||
// nsDocAccessible
|
||||
|
||||
/**
|
||||
* Return presentation shell for this document accessible.
|
||||
*/
|
||||
nsIPresShell* PresShell() const { return mPresShell; }
|
||||
|
||||
/**
|
||||
* Return weak reference to presentation shell for this document accessible.
|
||||
*/
|
||||
nsIWeakReference* GetWeakShell() const
|
||||
{ return do_GetWeakReference(mPresShell).get(); }
|
||||
|
||||
/**
|
||||
* Return true if associated DOM document was loaded and isn't unloading.
|
||||
*/
|
||||
|
@ -170,7 +181,8 @@ public:
|
|||
* Return true if the document has given document state.
|
||||
*/
|
||||
bool HasLoadState(LoadState aState) const
|
||||
{ return (mLoadState & aState) == aState; }
|
||||
{ return (mLoadState & static_cast<PRUint32>(aState)) ==
|
||||
static_cast<PRUint32>(aState); }
|
||||
|
||||
/**
|
||||
* Return a native window handler or pointer depending on platform.
|
||||
|
@ -377,6 +389,8 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
void LastRelease();
|
||||
|
||||
// nsAccessible
|
||||
virtual void CacheChildren();
|
||||
|
||||
|
@ -653,6 +667,10 @@ protected:
|
|||
*/
|
||||
nsRefPtr<NotificationController> mNotificationController;
|
||||
friend class NotificationController;
|
||||
|
||||
private:
|
||||
|
||||
nsIPresShell* mPresShell;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsDocAccessible,
|
||||
|
|
|
@ -201,8 +201,8 @@ ProgressMeterAccessible<Max>::SetCurrentValue(double aValue)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsRadioButtonAccessible::
|
||||
nsRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsFormControlAccessible(aContent, aShell)
|
||||
nsRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsFormControlAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ template<int Max>
|
|||
class ProgressMeterAccessible: public nsFormControlAccessible
|
||||
{
|
||||
public:
|
||||
ProgressMeterAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
|
||||
nsFormControlAccessible(aContent, aShell)
|
||||
ProgressMeterAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsFormControlAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ class nsRadioButtonAccessible : public nsFormControlAccessible
|
|||
{
|
||||
|
||||
public:
|
||||
nsRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
|
|
@ -50,8 +50,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsOuterDocAccessible::
|
||||
nsOuterDocAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsOuterDocAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
class nsOuterDocAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsOuterDocAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsOuterDocAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
|
|
@ -371,24 +371,20 @@ nsRootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
|||
nsAutoString eventType;
|
||||
aDOMEvent->GetType(eventType);
|
||||
|
||||
nsCOMPtr<nsIWeakReference> weakShell =
|
||||
nsCoreUtils::GetWeakShellFor(origTargetNode);
|
||||
if (!weakShell)
|
||||
return;
|
||||
|
||||
if (eventType.EqualsLiteral("popuphiding")) {
|
||||
HandlePopupHidingEvent(origTargetNode);
|
||||
return;
|
||||
}
|
||||
|
||||
nsAccessible* accessible =
|
||||
GetAccService()->GetAccessibleOrContainer(origTargetNode, weakShell);
|
||||
nsDocAccessible* targetDocument = GetAccService()->
|
||||
GetDocAccessible(origTargetNode->OwnerDoc());
|
||||
NS_ASSERTION(targetDocument, "No document while accessible is in document?!");
|
||||
|
||||
nsAccessible* accessible =
|
||||
targetDocument->GetAccessibleOrContainer(origTargetNode);
|
||||
if (!accessible)
|
||||
return;
|
||||
|
||||
nsDocAccessible* targetDocument = accessible->GetDocAccessible();
|
||||
NS_ASSERTION(targetDocument, "No document while accessible is in document?!");
|
||||
|
||||
nsINode* targetNode = accessible->GetNode();
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
|
@ -568,7 +564,7 @@ void
|
|||
nsRootAccessible::Shutdown()
|
||||
{
|
||||
// Called manually or by nsAccessNode::LastRelease()
|
||||
if (!mWeakShell)
|
||||
if (!PresShell())
|
||||
return; // Already shutdown
|
||||
|
||||
nsDocAccessibleWrap::Shutdown();
|
||||
|
|
|
@ -49,8 +49,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsTextAccessible::
|
||||
nsTextAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsLinkableAccessible(aContent, aShell)
|
||||
nsTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsLinkableAccessible(aContent, aDoc)
|
||||
{
|
||||
mFlags |= eTextLeafAccessible;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
class nsTextAccessible : public nsLinkableAccessible
|
||||
{
|
||||
public:
|
||||
nsTextAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
using namespace mozilla::a11y;
|
||||
|
||||
nsHTMLCanvasAccessible::
|
||||
nsHTMLCanvasAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
|
||||
nsHyperTextAccessible(aContent, aShell)
|
||||
nsHTMLCanvasAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
class nsHTMLCanvasAccessible : public nsHyperTextAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLCanvasAccessible(nsIContent* aContent, nsIWeakReference* aShell);
|
||||
nsHTMLCanvasAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsHTMLCanvasAccessible() { }
|
||||
|
||||
// nsAccessible
|
||||
|
|
|
@ -68,8 +68,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLCheckboxAccessible::
|
||||
nsHTMLCheckboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsFormControlAccessible(aContent, aShell)
|
||||
nsHTMLCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsFormControlAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -154,8 +154,8 @@ nsHTMLCheckboxAccessible::IsWidget() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLRadioButtonAccessible::
|
||||
nsHTMLRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsRadioButtonAccessible(aContent, aShell)
|
||||
nsHTMLRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsRadioButtonAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -243,8 +243,8 @@ nsHTMLRadioButtonAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLButtonAccessible::
|
||||
nsHTMLButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -358,8 +358,8 @@ nsHTMLButtonAccessible::IsWidget() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTML4ButtonAccessible::
|
||||
nsHTML4ButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTML4ButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -423,8 +423,8 @@ nsHTML4ButtonAccessible::IsWidget() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLTextFieldAccessible::
|
||||
nsHTMLTextFieldAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -655,8 +655,8 @@ nsHTMLTextFieldAccessible::ContainerWidget() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLFileInputAccessible::
|
||||
nsHTMLFileInputAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLFileInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
mFlags |= eHTMLFileInputAccessible;
|
||||
}
|
||||
|
@ -710,8 +710,8 @@ nsHTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLGroupboxAccessible::
|
||||
nsHTMLGroupboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -770,8 +770,8 @@ nsHTMLGroupboxAccessible::RelationByType(PRUint32 aType)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLLegendAccessible::
|
||||
nsHTMLLegendAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLLegendAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -800,8 +800,8 @@ nsHTMLLegendAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLFigureAccessible::
|
||||
nsHTMLFigureAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLFigureAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -870,8 +870,8 @@ nsHTMLFigureAccessible::Caption() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLFigcaptionAccessible::
|
||||
nsHTMLFigcaptionAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLFigcaptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ class nsHTMLCheckboxAccessible : public nsFormControlAccessible
|
|||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
nsHTMLCheckboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -81,7 +81,7 @@ class nsHTMLRadioButtonAccessible : public nsRadioButtonAccessible
|
|||
{
|
||||
|
||||
public:
|
||||
nsHTMLRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual PRUint64 NativeState();
|
||||
|
@ -100,7 +100,7 @@ class nsHTMLButtonAccessible : public nsHyperTextAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
nsHTMLButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -129,7 +129,7 @@ class nsHTML4ButtonAccessible : public nsHyperTextAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
nsHTML4ButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTML4ButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -156,7 +156,7 @@ class nsHTMLTextFieldAccessible : public nsHyperTextAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
nsHTMLTextFieldAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
@ -190,7 +190,7 @@ public:
|
|||
class nsHTMLFileInputAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLFileInputAccessible(nsIContent* aContent, nsIWeakReference* aShell);
|
||||
nsHTMLFileInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -203,7 +203,7 @@ public:
|
|||
class nsHTMLGroupboxAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLGroupboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual nsresult GetNameInternal(nsAString& aName);
|
||||
|
@ -221,7 +221,7 @@ protected:
|
|||
class nsHTMLLegendAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLLegendAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLLegendAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -234,7 +234,7 @@ public:
|
|||
class nsHTMLFigureAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLFigureAccessible(nsIContent* aContent, nsIWeakReference* aShell);
|
||||
nsHTMLFigureAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual nsresult GetAttributesInternal(nsIPersistentProperties* aAttributes);
|
||||
|
@ -253,7 +253,7 @@ protected:
|
|||
class nsHTMLFigcaptionAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLFigcaptionAccessible(nsIContent* aContent, nsIWeakReference* aShell);
|
||||
nsHTMLFigcaptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
|
|
@ -60,8 +60,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLImageAccessible::
|
||||
nsHTMLImageAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsLinkableAccessible(aContent, aShell)
|
||||
nsHTMLImageAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsLinkableAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class nsHTMLImageAccessible : public nsLinkableAccessible,
|
|||
public nsIAccessibleImage
|
||||
{
|
||||
public:
|
||||
nsHTMLImageAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLImageAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -57,9 +57,9 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLImageMapAccessible::
|
||||
nsHTMLImageMapAccessible(nsIContent *aContent, nsIWeakReference *aShell,
|
||||
nsIDOMHTMLMapElement *aMapElm) :
|
||||
nsHTMLImageAccessibleWrap(aContent, aShell), mMapElement(aMapElm)
|
||||
nsHTMLImageMapAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
|
||||
nsIDOMHTMLMapElement* aMapElm) :
|
||||
nsHTMLImageAccessibleWrap(aContent, aDoc), mMapElement(aMapElm)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ nsHTMLImageMapAccessible::CacheChildren()
|
|||
|
||||
nsCOMPtr<nsIContent> areaContent(do_QueryInterface(areaNode));
|
||||
nsRefPtr<nsAccessible> area =
|
||||
new nsHTMLAreaAccessible(areaContent, mWeakShell);
|
||||
new nsHTMLAreaAccessible(areaContent, mDoc);
|
||||
|
||||
if (!document->BindToDocument(area, nsAccUtils::GetRoleMapEntry(areaContent)) ||
|
||||
!AppendChild(area)) {
|
||||
|
@ -145,8 +145,8 @@ nsHTMLImageMapAccessible::CacheChildren()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLAreaAccessible::
|
||||
nsHTMLAreaAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHTMLLinkAccessible(aContent, aShell)
|
||||
nsHTMLAreaAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHTMLLinkAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
class nsHTMLImageMapAccessible : public nsHTMLImageAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLImageMapAccessible(nsIContent *aContent, nsIWeakReference *aShell,
|
||||
nsIDOMHTMLMapElement *aMapElm);
|
||||
nsHTMLImageMapAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
|
||||
nsIDOMHTMLMapElement* aMapElm);
|
||||
|
||||
// nsISupports and cycle collector
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -83,7 +83,7 @@ class nsHTMLAreaAccessible : public nsHTMLLinkAccessible
|
|||
{
|
||||
public:
|
||||
|
||||
nsHTMLAreaAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLAreaAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "Role.h"
|
||||
#include "States.h"
|
||||
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsEventStates.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
||||
|
@ -53,8 +54,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLLinkAccessible::
|
||||
nsHTMLLinkAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLLinkAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -116,7 +117,7 @@ nsHTMLLinkAccessible::GetValue(nsAString& aValue)
|
|||
if (!aValue.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||
nsIPresShell* presShell(mDoc->PresShell());
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
return presShell->GetLinkLocation(DOMNode, aValue);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
class nsHTMLLinkAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLLinkAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLLinkAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLSelectListAccessible::
|
||||
nsHTMLSelectListAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsHTMLSelectListAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
mFlags |= eListControlAccessible;
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ nsHTMLSelectListAccessible::CacheChildren()
|
|||
void
|
||||
nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||
nsIPresShell* presShell(mDoc->PresShell());
|
||||
for (nsIContent* childContent = aParentContent->GetFirstChild(); childContent;
|
||||
childContent = childContent->GetNextSibling()) {
|
||||
if (!childContent->IsHTML()) {
|
||||
|
@ -193,7 +193,7 @@ nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
|
|||
// Get an accessible for option or optgroup and cache it.
|
||||
nsRefPtr<nsAccessible> accessible =
|
||||
GetAccService()->GetOrCreateAccessible(childContent, presShell,
|
||||
mWeakShell);
|
||||
mDoc->GetWeakShell());
|
||||
if (accessible)
|
||||
AppendChild(accessible);
|
||||
|
||||
|
@ -210,8 +210,8 @@ nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLSelectOptionAccessible::
|
||||
nsHTMLSelectOptionAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLSelectOptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -454,9 +454,9 @@ nsHTMLSelectOptionAccessible::GetSelectState(PRUint64* aState)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLSelectOptGroupAccessible::
|
||||
nsHTMLSelectOptGroupAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell) :
|
||||
nsHTMLSelectOptionAccessible(aContent, aShell)
|
||||
nsHTMLSelectOptGroupAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc) :
|
||||
nsHTMLSelectOptionAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -511,8 +511,8 @@ nsHTMLSelectOptGroupAccessible::CacheChildren()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLComboboxAccessible::
|
||||
nsHTMLComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsHTMLComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
mFlags |= eComboboxAccessible;
|
||||
}
|
||||
|
@ -552,7 +552,7 @@ nsHTMLComboboxAccessible::CacheChildren()
|
|||
|
||||
if (!mListAccessible) {
|
||||
mListAccessible =
|
||||
new nsHTMLComboboxListAccessible(mParent, mContent, mWeakShell);
|
||||
new nsHTMLComboboxListAccessible(mParent, mContent, mDoc);
|
||||
|
||||
// Initialize and put into cache.
|
||||
if (!GetDocAccessible()->BindToDocument(mListAccessible, nsnull))
|
||||
|
@ -733,9 +733,9 @@ nsHTMLComboboxAccessible::SelectedOption() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLComboboxListAccessible::
|
||||
nsHTMLComboboxListAccessible(nsIAccessible *aParent, nsIContent *aContent,
|
||||
nsIWeakReference *aShell) :
|
||||
nsHTMLSelectListAccessible(aContent, aShell)
|
||||
nsHTMLComboboxListAccessible(nsIAccessible* aParent, nsIContent* aContent,
|
||||
nsDocAccessible* aDoc) :
|
||||
nsHTMLSelectListAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class nsHTMLSelectListAccessible : public nsAccessibleWrap
|
|||
{
|
||||
public:
|
||||
|
||||
nsHTMLSelectListAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLSelectListAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsHTMLSelectListAccessible() {}
|
||||
|
||||
// nsAccessible
|
||||
|
@ -108,7 +108,7 @@ class nsHTMLSelectOptionAccessible : public nsHyperTextAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Select = 0 };
|
||||
|
||||
nsHTMLSelectOptionAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLSelectOptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsHTMLSelectOptionAccessible() {}
|
||||
|
||||
// nsIAccessible
|
||||
|
@ -152,7 +152,7 @@ class nsHTMLSelectOptGroupAccessible : public nsHTMLSelectOptionAccessible
|
|||
{
|
||||
public:
|
||||
|
||||
nsHTMLSelectOptGroupAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLSelectOptGroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsHTMLSelectOptGroupAccessible() {}
|
||||
|
||||
// nsIAccessible
|
||||
|
@ -185,7 +185,7 @@ class nsHTMLComboboxAccessible : public nsAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
nsHTMLComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsHTMLComboboxAccessible() {}
|
||||
|
||||
// nsIAccessible
|
||||
|
@ -234,9 +234,9 @@ class nsHTMLComboboxListAccessible : public nsHTMLSelectListAccessible
|
|||
{
|
||||
public:
|
||||
|
||||
nsHTMLComboboxListAccessible(nsIAccessible *aParent,
|
||||
nsIContent *aContent,
|
||||
nsIWeakReference* aShell);
|
||||
nsHTMLComboboxListAccessible(nsIAccessible* aParent,
|
||||
nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
virtual ~nsHTMLComboboxListAccessible() {}
|
||||
|
||||
// nsAccessNode
|
||||
|
|
|
@ -76,8 +76,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLTableCellAccessible::
|
||||
nsHTMLTableCellAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLTableCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -348,8 +348,7 @@ nsHTMLTableCellAccessible::GetHeaderCells(PRInt32 aRowOrColumnHeaderCell,
|
|||
desiredRole = roles::COLUMNHEADER;
|
||||
|
||||
do {
|
||||
nsAccessible* headerCell =
|
||||
GetAccService()->GetAccessibleInWeakShell(headerCellElm, mWeakShell);
|
||||
nsAccessible* headerCell = mDoc->GetAccessible(headerCellElm);
|
||||
|
||||
if (headerCell && headerCell->Role() == desiredRole)
|
||||
headerCells->AppendElement(static_cast<nsIAccessible*>(headerCell),
|
||||
|
@ -376,9 +375,9 @@ nsHTMLTableCellAccessible::GetHeaderCells(PRInt32 aRowOrColumnHeaderCell,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLTableHeaderCellAccessible::
|
||||
nsHTMLTableHeaderCellAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell) :
|
||||
nsHTMLTableCellAccessible(aContent, aShell)
|
||||
nsHTMLTableHeaderCellAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc) :
|
||||
nsHTMLTableCellAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -436,8 +435,8 @@ nsHTMLTableHeaderCellAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLTableAccessible::
|
||||
nsHTMLTableAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsHTMLTableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -458,7 +457,7 @@ nsHTMLTableAccessible::CacheChildren()
|
|||
// caption only, because nsAccessibilityService ensures we don't create
|
||||
// accessibles for the other captions, since only the first is actually
|
||||
// visible.
|
||||
nsAccTreeWalker walker(mWeakShell, mContent, GetAllowsAnonChildAccessibles());
|
||||
nsAccTreeWalker walker(mDoc->GetWeakShell(), mContent, GetAllowsAnonChildAccessibles());
|
||||
|
||||
nsAccessible* child = nsnull;
|
||||
while ((child = walker.NextChild())) {
|
||||
|
@ -718,8 +717,7 @@ nsHTMLTableAccessible::GetSelectedCells(nsIArray **aCells)
|
|||
if (NS_SUCCEEDED(rv) && startRowIndex == rowIndex &&
|
||||
startColIndex == columnIndex && isSelected) {
|
||||
nsCOMPtr<nsIContent> cellContent(do_QueryInterface(cellElement));
|
||||
nsAccessible *cell =
|
||||
GetAccService()->GetAccessibleInWeakShell(cellContent, mWeakShell);
|
||||
nsAccessible *cell = mDoc->GetAccessible(cellContent);
|
||||
selCells->AppendElement(static_cast<nsIAccessible*>(cell), false);
|
||||
}
|
||||
}
|
||||
|
@ -892,8 +890,7 @@ nsHTMLTableAccessible::GetCellAt(PRInt32 aRow, PRInt32 aColumn,
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIContent> cellContent(do_QueryInterface(cellElement));
|
||||
nsAccessible *cell =
|
||||
GetAccService()->GetAccessibleInWeakShell(cellContent, mWeakShell);
|
||||
nsAccessible* cell = mDoc->GetAccessible(cellContent);
|
||||
|
||||
if (!cell) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
@ -1194,7 +1191,7 @@ nsHTMLTableAccessible::AddRowOrColumnToSelection(PRInt32 aIndex,
|
|||
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
|
||||
nsIPresShell* presShell(mDoc->PresShell());
|
||||
nsRefPtr<nsFrameSelection> tableSelection =
|
||||
const_cast<nsFrameSelection*>(presShell->ConstFrameSelection());
|
||||
|
||||
|
@ -1226,7 +1223,7 @@ nsHTMLTableAccessible::RemoveRowsOrColumnsFromSelection(PRInt32 aIndex,
|
|||
nsITableLayout *tableLayout = GetTableLayout();
|
||||
NS_ENSURE_STATE(tableLayout);
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
|
||||
nsIPresShell* presShell(mDoc->PresShell());
|
||||
nsRefPtr<nsFrameSelection> tableSelection =
|
||||
const_cast<nsFrameSelection*>(presShell->ConstFrameSelection());
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class nsHTMLTableCellAccessible : public nsHyperTextAccessibleWrap,
|
|||
public nsIAccessibleTableCell
|
||||
{
|
||||
public:
|
||||
nsHTMLTableCellAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLTableCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -95,8 +95,8 @@ protected:
|
|||
class nsHTMLTableHeaderCellAccessible : public nsHTMLTableCellAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLTableHeaderCellAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsHTMLTableHeaderCellAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -124,7 +124,7 @@ class nsHTMLTableAccessible : public nsAccessibleWrap,
|
|||
public nsIAccessibleTable
|
||||
{
|
||||
public:
|
||||
nsHTMLTableAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLTableAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLETABLE
|
||||
|
@ -211,8 +211,9 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsHTMLTableAccessible,
|
|||
class nsHTMLCaptionAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLCaptionAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell) { }
|
||||
nsHTMLCaptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc) { }
|
||||
virtual ~nsHTMLCaptionAccessible() { }
|
||||
|
||||
// nsIAccessible
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLTextAccessible::
|
||||
nsHTMLTextAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -122,8 +122,8 @@ nsHTMLTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLHRAccessible::
|
||||
nsHTMLHRAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsLeafAccessible(aContent, aShell)
|
||||
nsHTMLHRAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsLeafAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -139,8 +139,8 @@ nsHTMLHRAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLBRAccessible::
|
||||
nsHTMLBRAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsLeafAccessible(aContent, aShell)
|
||||
nsHTMLBRAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsLeafAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -168,8 +168,8 @@ nsHTMLBRAccessible::GetNameInternal(nsAString& aName)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLLabelAccessible::
|
||||
nsHTMLLabelAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -192,8 +192,8 @@ nsHTMLLabelAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLOutputAccessible::
|
||||
nsHTMLOutputAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -233,14 +233,14 @@ nsHTMLOutputAccessible::GetAttributesInternal(nsIPersistentProperties* aAttribut
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLLIAccessible::
|
||||
nsHTMLLIAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell), mBullet(nsnull)
|
||||
nsHTMLLIAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc), mBullet(nsnull)
|
||||
{
|
||||
mFlags |= eHTMLListItemAccessible;
|
||||
|
||||
nsBlockFrame* blockFrame = do_QueryFrame(GetFrame());
|
||||
if (blockFrame && blockFrame->HasBullet()) {
|
||||
mBullet = new nsHTMLListBulletAccessible(mContent, mWeakShell);
|
||||
mBullet = new nsHTMLListBulletAccessible(mContent, mDoc);
|
||||
if (!GetDocAccessible()->BindToDocument(mBullet, nsnull))
|
||||
mBullet = nsnull;
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ nsHTMLLIAccessible::UpdateBullet(bool aHasBullet)
|
|||
|
||||
nsDocAccessible* document = GetDocAccessible();
|
||||
if (aHasBullet) {
|
||||
mBullet = new nsHTMLListBulletAccessible(mContent, mWeakShell);
|
||||
mBullet = new nsHTMLListBulletAccessible(mContent, mDoc);
|
||||
if (document->BindToDocument(mBullet, nsnull)) {
|
||||
InsertChildAt(0, mBullet);
|
||||
}
|
||||
|
@ -328,8 +328,8 @@ nsHTMLLIAccessible::CacheChildren()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLListBulletAccessible::
|
||||
nsHTMLListBulletAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
|
||||
nsLeafAccessible(aContent, aShell)
|
||||
nsHTMLListBulletAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsLeafAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -400,8 +400,8 @@ nsHTMLListBulletAccessible::AppendTextTo(nsAString& aText, PRUint32 aStartOffset
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLListAccessible::
|
||||
nsHTMLListAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsHTMLListAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
class nsHTMLTextAccessible : public nsTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLTextAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
class nsHTMLHRAccessible : public nsLeafAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLHRAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLHRAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -82,7 +82,7 @@ public:
|
|||
class nsHTMLBRAccessible : public nsLeafAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLBRAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLBRAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual nsresult GetNameInternal(nsAString& aName);
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
class nsHTMLLabelAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLLabelAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
@ -111,7 +111,7 @@ public:
|
|||
class nsHTMLOutputAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLOutputAccessible(nsIContent* aContent, nsIWeakReference* aShell);
|
||||
nsHTMLOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
@ -127,7 +127,7 @@ public:
|
|||
class nsHTMLListBulletAccessible : public nsLeafAccessible
|
||||
{
|
||||
public:
|
||||
nsHTMLListBulletAccessible(nsIContent* aContent, nsIWeakReference* aShell);
|
||||
nsHTMLListBulletAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetName(nsAString& aName);
|
||||
|
@ -148,7 +148,7 @@ public:
|
|||
class nsHTMLListAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLListAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHTMLListAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -164,7 +164,7 @@ public:
|
|||
class nsHTMLLIAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsHTMLLIAccessible(nsIContent* aContent, nsIWeakReference* aShell);
|
||||
nsHTMLLIAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsTextAttrs.h"
|
||||
#include "Role.h"
|
||||
#include "States.h"
|
||||
|
@ -71,8 +72,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHyperTextAccessible::
|
||||
nsHyperTextAccessible(nsIContent *aNode, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aNode, aShell)
|
||||
nsHyperTextAccessible(nsIContent* aNode, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aNode, aDoc)
|
||||
{
|
||||
mFlags |= eHyperTextAccessible;
|
||||
}
|
||||
|
@ -209,7 +210,8 @@ nsIntRect nsHyperTextAccessible::GetBoundsForString(nsIFrame *aFrame, PRUint32 a
|
|||
&startContentOffsetInFrame, &frame);
|
||||
NS_ENSURE_SUCCESS(rv, screenRect);
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||
NS_ENSURE_TRUE(mDoc, screenRect);
|
||||
nsIPresShell* shell = mDoc->PresShell();
|
||||
NS_ENSURE_TRUE(shell, screenRect);
|
||||
|
||||
nsPresContext *context = shell->GetPresContext();
|
||||
|
@ -882,7 +884,10 @@ nsresult nsHyperTextAccessible::GetTextHelper(EGetTextType aType, nsAccessibleTe
|
|||
NS_ENSURE_ARG_POINTER(aEndOffset);
|
||||
*aStartOffset = *aEndOffset = 0;
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
|
||||
if (!mDoc)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsIPresShell* presShell = mDoc->PresShell();
|
||||
if (!presShell) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -1293,7 +1298,10 @@ nsHyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY,
|
|||
PRUint32 aCoordType, PRInt32 *aOffset)
|
||||
{
|
||||
*aOffset = -1;
|
||||
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||
if (!mDoc)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsIPresShell* shell = mDoc->PresShell();
|
||||
if (!shell) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -1543,14 +1551,12 @@ nsHyperTextAccessible::GetAssociatedEditor(nsIEditor **aEditor)
|
|||
if (!editingSession)
|
||||
return NS_OK; // No editing session interface
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIDocument> doc = shell->GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
||||
NS_ENSURE_TRUE(mDoc, NS_ERROR_FAILURE);
|
||||
nsIDocument* docNode = mDoc->GetDocumentNode();
|
||||
NS_ENSURE_TRUE(docNode, NS_ERROR_FAILURE);
|
||||
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
return editingSession->GetEditorForWindow(doc->GetWindow(), aEditor);
|
||||
return editingSession->GetEditorForWindow(docNode->GetWindow(), aEditor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1588,11 +1594,10 @@ nsHyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos)
|
|||
// Now that selection is done, move the focus to the selection.
|
||||
nsFocusManager* DOMFocusManager = nsFocusManager::GetFocusManager();
|
||||
if (DOMFocusManager) {
|
||||
nsCOMPtr<nsIPresShell> shell = GetPresShell();
|
||||
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsIDocument> doc = shell->GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsPIDOMWindow> window = doc->GetWindow();
|
||||
NS_ENSURE_TRUE(mDoc, NS_ERROR_FAILURE);
|
||||
nsIDocument* docNode = mDoc->GetDocumentNode();
|
||||
NS_ENSURE_TRUE(docNode, NS_ERROR_FAILURE);
|
||||
nsCOMPtr<nsPIDOMWindow> window = docNode->GetWindow();
|
||||
nsCOMPtr<nsIDOMElement> result;
|
||||
DOMFocusManager->MoveFocus(window, nsnull, nsIFocusManager::MOVEFOCUS_CARET,
|
||||
nsIFocusManager::FLAG_BYMOVEFOCUS, getter_AddRefs(result));
|
||||
|
|
|
@ -76,7 +76,9 @@ class nsHyperTextAccessible : public nsAccessibleWrap,
|
|||
public nsIAccessibleEditableText
|
||||
{
|
||||
public:
|
||||
nsHyperTextAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsHyperTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsHyperTextAccessible() { }
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_NSIACCESSIBLETEXT
|
||||
NS_DECL_NSIACCESSIBLEHYPERTEXT
|
||||
|
|
|
@ -47,12 +47,12 @@
|
|||
|
||||
class nsAccessNodeWrap : public nsAccessNode
|
||||
{
|
||||
public: // construction, destruction
|
||||
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
virtual ~nsAccessNodeWrap();
|
||||
public:
|
||||
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessNodeWrap();
|
||||
|
||||
static void InitAccessibility();
|
||||
static void ShutdownAccessibility();
|
||||
static void InitAccessibility();
|
||||
static void ShutdownAccessibility();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
//-----------------------------------------------------
|
||||
|
||||
nsAccessNodeWrap::
|
||||
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessNode(aContent, aShell)
|
||||
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessNode(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
class nsAccessibleWrap : public nsAccessible
|
||||
{
|
||||
public: // construction, destruction
|
||||
nsAccessibleWrap(nsIContent* aContent, nsIWeakReference* aShell);
|
||||
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessibleWrap();
|
||||
|
||||
/**
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
using namespace mozilla::a11y;
|
||||
|
||||
nsAccessibleWrap::
|
||||
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessible(aContent, aShell), mNativeObject(nil),
|
||||
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessible(aContent, aDoc), mNativeObject(nil),
|
||||
mNativeInited(false)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -53,8 +53,8 @@ class nsARIAGridAccessibleWrap : public nsARIAGridAccessible,
|
|||
public CAccessibleTable
|
||||
{
|
||||
public:
|
||||
nsARIAGridAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsARIAGridAccessible(aContent, aShell) {}
|
||||
nsARIAGridAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsARIAGridAccessible(aContent, aDoc) {}
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
@ -71,8 +71,8 @@ class nsARIAGridCellAccessibleWrap : public nsARIAGridCellAccessible,
|
|||
public CAccessibleTableCell
|
||||
{
|
||||
public:
|
||||
nsARIAGridCellAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsARIAGridCellAccessible(aContent, aShell) {}
|
||||
nsARIAGridCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsARIAGridCellAccessible(aContent, aDoc) {}
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
|
|
@ -70,8 +70,8 @@ AccTextChangeEvent* nsAccessNodeWrap::gTextEvent = nsnull;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsAccessNodeWrap::
|
||||
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessNode(aContent, aShell)
|
||||
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessNode(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -412,8 +412,7 @@ nsAccessNodeWrap::MakeAccessNode(nsINode *aNode)
|
|||
nsAccessNodeWrap *newNode = NULL;
|
||||
|
||||
ISimpleDOMNode *iNode = NULL;
|
||||
nsAccessible *acc =
|
||||
GetAccService()->GetAccessibleInWeakShell(aNode, mWeakShell);
|
||||
nsAccessible* acc = mDoc->GetAccessible(aNode);
|
||||
if (acc) {
|
||||
IAccessible *msaaAccessible = nsnull;
|
||||
acc->GetNativeInterface((void**)&msaaAccessible); // addrefs
|
||||
|
@ -427,7 +426,7 @@ nsAccessNodeWrap::MakeAccessNode(nsINode *aNode)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
newNode = new nsAccessNodeWrap(content, mWeakShell);
|
||||
newNode = new nsAccessNodeWrap(content, mDoc);
|
||||
if (!newNode)
|
||||
return NULL;
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ class nsAccessNodeWrap : public nsAccessNode,
|
|||
STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, void** ppv);
|
||||
|
||||
public: // construction, destruction
|
||||
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessNodeWrap();
|
||||
|
||||
// IUnknown
|
||||
|
|
|
@ -97,8 +97,8 @@ ITypeInfo* nsAccessibleWrap::gTypeInfo = NULL;
|
|||
// construction
|
||||
//-----------------------------------------------------
|
||||
nsAccessibleWrap::
|
||||
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessible(aContent, aShell), mEnumVARIANTPosition(0)
|
||||
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessible(aContent, aDoc), mEnumVARIANTPosition(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1516,7 +1516,7 @@ nsAccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
|
|||
return NS_OK;
|
||||
|
||||
// Means we're not active.
|
||||
NS_ENSURE_TRUE(mWeakShell, NS_ERROR_FAILURE);
|
||||
NS_ENSURE_TRUE(!IsDefunct(), NS_ERROR_FAILURE);
|
||||
|
||||
nsAccessible *accessible = aEvent->GetAccessible();
|
||||
if (!accessible)
|
||||
|
@ -1587,6 +1587,10 @@ HWND
|
|||
nsAccessibleWrap::GetHWNDFor(nsAccessible *aAccessible)
|
||||
{
|
||||
if (aAccessible) {
|
||||
nsDocAccessible* document = aAccessible->GetDocAccessible();
|
||||
if(!document)
|
||||
return nsnull;
|
||||
|
||||
// Popup lives in own windows, use its HWND until the popup window is
|
||||
// hidden to make old JAWS versions work with collapsed comboboxes (see
|
||||
// discussion in bug 379678).
|
||||
|
@ -1597,7 +1601,7 @@ nsAccessibleWrap::GetHWNDFor(nsAccessible *aAccessible)
|
|||
bool isVisible = false;
|
||||
widget->IsVisible(isVisible);
|
||||
if (isVisible) {
|
||||
nsCOMPtr<nsIPresShell> shell(aAccessible->GetPresShell());
|
||||
nsCOMPtr<nsIPresShell> shell(document->PresShell());
|
||||
nsIViewManager* vm = shell->GetViewManager();
|
||||
if (vm) {
|
||||
nsCOMPtr<nsIWidget> rootWidget;
|
||||
|
@ -1612,9 +1616,7 @@ nsAccessibleWrap::GetHWNDFor(nsAccessible *aAccessible)
|
|||
}
|
||||
}
|
||||
|
||||
nsDocAccessible* document = aAccessible->GetDocAccessible();
|
||||
if (document)
|
||||
return static_cast<HWND>(document->GetNativeWindow());
|
||||
return static_cast<HWND>(document->GetNativeWindow());
|
||||
}
|
||||
return nsnull;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ class nsAccessibleWrap : public nsAccessible,
|
|||
public IEnumVARIANT
|
||||
{
|
||||
public: // construction, destruction
|
||||
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessibleWrap();
|
||||
|
||||
// nsISupports
|
||||
|
|
|
@ -48,8 +48,8 @@ class nsHTMLImageAccessibleWrap : public nsHTMLImageAccessible,
|
|||
public CAccessibleImage
|
||||
{
|
||||
public:
|
||||
nsHTMLImageAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHTMLImageAccessible(aContent, aShell) {}
|
||||
nsHTMLImageAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHTMLImageAccessible(aContent, aDoc) {}
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
|
|
@ -54,8 +54,8 @@ class nsHTMLTableAccessibleWrap : public nsHTMLTableAccessible,
|
|||
public CAccessibleTable
|
||||
{
|
||||
public:
|
||||
nsHTMLTableAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHTMLTableAccessible(aContent, aShell) {}
|
||||
nsHTMLTableAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHTMLTableAccessible(aContent, aDoc) {}
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
@ -73,8 +73,8 @@ class nsHTMLTableCellAccessibleWrap : public nsHTMLTableCellAccessible,
|
|||
public CAccessibleTableCell
|
||||
{
|
||||
public:
|
||||
nsHTMLTableCellAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHTMLTableCellAccessible(aContent, aShell) {}
|
||||
nsHTMLTableCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHTMLTableCellAccessible(aContent, aDoc) {}
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
@ -92,9 +92,9 @@ class nsHTMLTableHeaderCellAccessibleWrap : public nsHTMLTableHeaderCellAccessib
|
|||
public CAccessibleTableCell
|
||||
{
|
||||
public:
|
||||
nsHTMLTableHeaderCellAccessibleWrap(nsIContent *aContent,
|
||||
nsIWeakReference *aShell) :
|
||||
nsHTMLTableHeaderCellAccessible(aContent, aShell) {}
|
||||
nsHTMLTableHeaderCellAccessibleWrap(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc) :
|
||||
nsHTMLTableHeaderCellAccessible(aContent, aDoc) {}
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
|
|
@ -48,9 +48,9 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsHTMLWin32ObjectOwnerAccessible::
|
||||
nsHTMLWin32ObjectOwnerAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell, void *aHwnd) :
|
||||
nsAccessibleWrap(aContent, aShell), mHwnd(aHwnd)
|
||||
nsHTMLWin32ObjectOwnerAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc, void* aHwnd) :
|
||||
nsAccessibleWrap(aContent, aDoc), mHwnd(aHwnd)
|
||||
{
|
||||
// Our only child is a nsHTMLWin32ObjectAccessible object.
|
||||
mNativeAccessible = new nsHTMLWin32ObjectAccessible(mHwnd);
|
||||
|
|
|
@ -53,8 +53,8 @@ public:
|
|||
// because the native plugin accessible doesn't know where it exists in the
|
||||
// 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,
|
||||
nsIWeakReference *aShell, void *aHwnd);
|
||||
nsHTMLWin32ObjectOwnerAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc, void* aHwnd);
|
||||
virtual ~nsHTMLWin32ObjectOwnerAccessible() {}
|
||||
|
||||
// nsAccessNode
|
||||
|
|
|
@ -51,8 +51,8 @@ class nsHyperTextAccessibleWrap : public nsHyperTextAccessible,
|
|||
public CAccessibleEditableText
|
||||
{
|
||||
public:
|
||||
nsHyperTextAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessible(aContent, aShell) {}
|
||||
nsHyperTextAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessible(aContent, aDoc) {}
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
|
|
@ -56,8 +56,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsTextAccessibleWrap::
|
||||
nsTextAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsTextAccessible(aContent, aShell)
|
||||
nsTextAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsTextAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class nsTextAccessibleWrap : public nsTextAccessible,
|
|||
public ISimpleDOMText
|
||||
{
|
||||
public:
|
||||
nsTextAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsTextAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsTextAccessibleWrap() {}
|
||||
|
||||
// IUnknown methods - see iunknown.h for documentation
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULListboxAccessibleWrap::
|
||||
nsXULListboxAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXULListboxAccessible(aContent, aShell)
|
||||
nsXULListboxAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXULListboxAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,8 @@ IMPL_IUNKNOWN_QUERY_TAIL
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULListCellAccessibleWrap::
|
||||
nsXULListCellAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXULListCellAccessible(aContent, aShell)
|
||||
nsXULListCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXULListCellAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class nsXULListboxAccessibleWrap : public nsXULListboxAccessible,
|
|||
public CAccessibleTable
|
||||
{
|
||||
public:
|
||||
nsXULListboxAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULListboxAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
@ -69,7 +69,7 @@ class nsXULListCellAccessibleWrap : public nsXULListCellAccessible,
|
|||
public CAccessibleTableCell
|
||||
{
|
||||
public:
|
||||
nsXULListCellAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULListCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULMenuitemAccessibleWrap::
|
||||
nsXULMenuitemAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXULMenuitemAccessible(aContent, aShell)
|
||||
nsXULMenuitemAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXULMenuitemAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
class nsXULMenuitemAccessibleWrap : public nsXULMenuitemAccessible
|
||||
{
|
||||
public:
|
||||
nsXULMenuitemAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULMenuitemAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsXULMenuitemAccessibleWrap() {}
|
||||
|
||||
// nsIAccessible
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTreeGridAccessibleWrap::
|
||||
nsXULTreeGridAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXULTreeGridAccessible(aContent, aShell)
|
||||
nsXULTreeGridAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXULTreeGridAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -62,13 +62,13 @@ IMPL_IUNKNOWN_INHERITED1(nsXULTreeGridAccessibleWrap,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTreeGridCellAccessibleWrap::
|
||||
nsXULTreeGridCellAccessibleWrap(nsIContent *aContent,
|
||||
nsIWeakReference *aShell,
|
||||
nsXULTreeGridRowAccessible *aRowAcc,
|
||||
nsITreeBoxObject *aTree,
|
||||
nsITreeView *aTreeView,
|
||||
nsXULTreeGridCellAccessibleWrap(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc,
|
||||
nsXULTreeGridRowAccessible* aRowAcc,
|
||||
nsITreeBoxObject* aTree,
|
||||
nsITreeView* aTreeView,
|
||||
PRInt32 aRow, nsITreeColumn* aColumn) :
|
||||
nsXULTreeGridCellAccessible(aContent, aShell, aRowAcc, aTree, aTreeView,
|
||||
nsXULTreeGridCellAccessible(aContent, aDoc, aRowAcc, aTree, aTreeView,
|
||||
aRow, aColumn)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class nsXULTreeGridAccessibleWrap : public nsXULTreeGridAccessible,
|
|||
public CAccessibleTable
|
||||
{
|
||||
public:
|
||||
nsXULTreeGridAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULTreeGridAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN_INHERITED
|
||||
|
@ -70,11 +70,11 @@ class nsXULTreeGridCellAccessibleWrap : public nsXULTreeGridCellAccessible,
|
|||
public CAccessibleTableCell
|
||||
{
|
||||
public:
|
||||
nsXULTreeGridCellAccessibleWrap(nsIContent *aContent,
|
||||
nsIWeakReference *aShell,
|
||||
nsXULTreeGridRowAccessible *aRowAcc,
|
||||
nsITreeBoxObject *aTree,
|
||||
nsITreeView *aTreeView,
|
||||
nsXULTreeGridCellAccessibleWrap(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc,
|
||||
nsXULTreeGridRowAccessible* aRowAcc,
|
||||
nsITreeBoxObject* aTree,
|
||||
nsITreeView* aTreeView,
|
||||
PRInt32 aRow, nsITreeColumn* aColumn);
|
||||
|
||||
// IUnknown
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
//-----------------------------------------------------
|
||||
|
||||
nsAccessNodeWrap::
|
||||
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference* aShell) :
|
||||
nsAccessNode(aContent, aShell)
|
||||
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessNode(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
class nsAccessNodeWrap : public nsAccessNode
|
||||
{
|
||||
public: // construction, destruction
|
||||
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference* aShell);
|
||||
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessNodeWrap();
|
||||
|
||||
static void InitAccessibility();
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
// construction
|
||||
//-----------------------------------------------------
|
||||
nsAccessibleWrap::
|
||||
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessible(aContent, aShell)
|
||||
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
class nsAccessibleWrap : public nsAccessible
|
||||
{
|
||||
public: // construction, destruction
|
||||
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsAccessibleWrap();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsTextEquivUtils.h"
|
||||
#include "Role.h"
|
||||
#include "States.h"
|
||||
|
@ -77,8 +78,8 @@ nsXFormsAccessibleBase::nsXFormsAccessibleBase()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsAccessible::
|
||||
nsXFormsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsXFormsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -123,7 +124,7 @@ nsXFormsAccessible::CacheSelectChildren(nsIDOMNode *aContainerNode)
|
|||
if (!children)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
|
||||
nsIPresShell* presShell(mDoc->PresShell());
|
||||
|
||||
PRUint32 length = 0;
|
||||
children->GetLength(&length);
|
||||
|
@ -136,7 +137,7 @@ nsXFormsAccessible::CacheSelectChildren(nsIDOMNode *aContainerNode)
|
|||
|
||||
nsCOMPtr<nsIContent> child(do_QueryInterface(DOMChild));
|
||||
nsAccessible* accessible =
|
||||
GetAccService()->GetOrCreateAccessible(child, presShell, mWeakShell);
|
||||
GetAccService()->GetOrCreateAccessible(child, presShell, mDoc->GetWeakShell());
|
||||
if (!accessible)
|
||||
continue;
|
||||
|
||||
|
@ -224,8 +225,8 @@ nsXFormsAccessible::GetAllowsAnonChildAccessibles()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsContainerAccessible::
|
||||
nsXFormsContainerAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsContainerAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -247,8 +248,8 @@ nsXFormsContainerAccessible::GetAllowsAnonChildAccessibles()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsEditableAccessible::
|
||||
nsXFormsEditableAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsEditableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -297,8 +298,8 @@ nsXFormsEditableAccessible::GetAssociatedEditor(nsIEditor **aEditor)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsSelectableAccessible::
|
||||
nsXFormsSelectableAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsEditableAccessible(aContent, aShell), mIsSelect1Element(nsnull)
|
||||
nsXFormsSelectableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsEditableAccessible(aContent, aDoc), mIsSelect1Element(nsnull)
|
||||
{
|
||||
mIsSelect1Element =
|
||||
mContent->NodeInfo()->Equals(nsGkAtoms::select1);
|
||||
|
@ -325,12 +326,11 @@ nsXFormsSelectableAccessible::SelectedItems()
|
|||
nsCOMPtr<nsIDOMNode> itemDOMNode;
|
||||
rv = sXFormsService->GetSelectedItemForSelect1(DOMNode,
|
||||
getter_AddRefs(itemDOMNode));
|
||||
if (NS_FAILED(rv) || !itemDOMNode)
|
||||
if (NS_FAILED(rv) || !itemDOMNode || !mDoc)
|
||||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemDOMNode));
|
||||
nsIAccessible* item = GetAccService()->GetAccessibleInWeakShell(itemNode,
|
||||
mWeakShell);
|
||||
nsIAccessible* item = mDoc->GetAccessible(itemNode);
|
||||
if (item)
|
||||
selectedItems->AppendElement(item, false);
|
||||
|
||||
|
@ -342,11 +342,12 @@ nsXFormsSelectableAccessible::SelectedItems()
|
|||
nsCOMPtr<nsIDOMNodeList> itemNodeList;
|
||||
rv = sXFormsService->GetSelectedItemsForSelect(DOMNode,
|
||||
getter_AddRefs(itemNodeList));
|
||||
if (NS_FAILED(rv) || !itemNodeList)
|
||||
if (NS_FAILED(rv) || !itemNodeList || !mDoc)
|
||||
return nsnull;
|
||||
|
||||
PRUint32 length = 0;
|
||||
itemNodeList->GetLength(&length);
|
||||
|
||||
for (PRUint32 index = 0; index < length; index++) {
|
||||
nsCOMPtr<nsIDOMNode> itemDOMNode;
|
||||
itemNodeList->Item(index, getter_AddRefs(itemDOMNode));
|
||||
|
@ -354,8 +355,7 @@ nsXFormsSelectableAccessible::SelectedItems()
|
|||
return nsnull;
|
||||
|
||||
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemDOMNode));
|
||||
nsIAccessible* item = GetAccService()->GetAccessibleInWeakShell(itemNode,
|
||||
mWeakShell);
|
||||
nsIAccessible* item = mDoc->GetAccessible(itemNode);
|
||||
if (item)
|
||||
selectedItems->AppendElement(item, false);
|
||||
}
|
||||
|
@ -430,6 +430,9 @@ nsXFormsSelectableAccessible::RemoveItemFromSelection(PRUint32 aIndex)
|
|||
nsAccessible*
|
||||
nsXFormsSelectableAccessible::GetSelectedItem(PRUint32 aIndex)
|
||||
{
|
||||
if (!mDoc)
|
||||
return nsnull;
|
||||
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
|
||||
if (mIsSelect1Element) {
|
||||
|
@ -441,7 +444,7 @@ nsXFormsSelectableAccessible::GetSelectedItem(PRUint32 aIndex)
|
|||
getter_AddRefs(itemDOMNode));
|
||||
if (NS_SUCCEEDED(rv) && itemDOMNode) {
|
||||
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemDOMNode));
|
||||
return GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell);
|
||||
return mDoc->GetAccessible(itemNode);
|
||||
}
|
||||
return nsnull;
|
||||
}
|
||||
|
@ -456,7 +459,7 @@ nsXFormsSelectableAccessible::GetSelectedItem(PRUint32 aIndex)
|
|||
itemNodeList->Item(aIndex, getter_AddRefs(itemDOMNode));
|
||||
|
||||
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemDOMNode));
|
||||
return GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell);
|
||||
return mDoc->GetAccessible(itemNode);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -534,9 +537,9 @@ nsXFormsSelectableAccessible::GetItemByIndex(PRUint32* aIndex,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsSelectableItemAccessible::
|
||||
nsXFormsSelectableItemAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsSelectableItemAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class nsXFormsAccessible : public nsHyperTextAccessibleWrap,
|
|||
public nsXFormsAccessibleBase
|
||||
{
|
||||
public:
|
||||
nsXFormsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
|
||||
|
@ -124,7 +124,7 @@ protected:
|
|||
class nsXFormsContainerAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsContainerAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsContainerAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -142,7 +142,7 @@ public:
|
|||
class nsXFormsEditableAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsEditableAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsEditableAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessibleEditableText
|
||||
NS_IMETHOD GetAssociatedEditor(nsIEditor **aEditor);
|
||||
|
@ -159,7 +159,7 @@ public:
|
|||
class nsXFormsSelectableAccessible : public nsXFormsEditableAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsSelectableAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsSelectableAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// SelectAccessible
|
||||
virtual bool IsSelect();
|
||||
|
@ -186,8 +186,8 @@ protected:
|
|||
class nsXFormsSelectableItemAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsSelectableItemAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsXFormsSelectableItemAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
NS_IMETHOD GetValue(nsAString& aValue);
|
||||
NS_IMETHOD DoAction(PRUint8 aIndex);
|
||||
|
|
|
@ -49,8 +49,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsLabelAccessible::
|
||||
nsXFormsLabelAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -81,8 +81,8 @@ nsXFormsLabelAccessible::Description(nsString& aDescription)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsOutputAccessible::
|
||||
nsXFormsOutputAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -98,8 +98,8 @@ nsXFormsOutputAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsTriggerAccessible::
|
||||
nsXFormsTriggerAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsTriggerAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -148,8 +148,8 @@ nsXFormsTriggerAccessible::DoAction(PRUint8 aIndex)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsInputAccessible::
|
||||
nsXFormsInputAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsEditableAccessible(aContent, aShell)
|
||||
nsXFormsInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsEditableAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -193,8 +193,8 @@ nsXFormsInputAccessible::DoAction(PRUint8 aIndex)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsInputBooleanAccessible::
|
||||
nsXFormsInputBooleanAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsInputBooleanAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -261,8 +261,8 @@ nsXFormsInputBooleanAccessible::DoAction(PRUint8 aIndex)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsInputDateAccessible::
|
||||
nsXFormsInputDateAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsContainerAccessible(aContent, aShell)
|
||||
nsXFormsInputDateAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsContainerAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -278,8 +278,8 @@ nsXFormsInputDateAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsSecretAccessible::
|
||||
nsXFormsSecretAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsInputAccessible(aContent, aShell)
|
||||
nsXFormsSecretAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsInputAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -307,8 +307,8 @@ nsXFormsSecretAccessible::GetValue(nsAString& aValue)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsRangeAccessible::
|
||||
nsXFormsRangeAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsRangeAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -400,8 +400,8 @@ nsXFormsRangeAccessible::GetCurrentValue(double *aCurrentValue)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsSelectAccessible::
|
||||
nsXFormsSelectAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsContainerAccessible(aContent, aShell)
|
||||
nsXFormsSelectAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsContainerAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -427,8 +427,8 @@ nsXFormsSelectAccessible::NativeState()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsChoicesAccessible::
|
||||
nsXFormsChoicesAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsChoicesAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -457,8 +457,8 @@ nsXFormsChoicesAccessible::CacheChildren()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsSelectFullAccessible::
|
||||
nsXFormsSelectFullAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsSelectableAccessible(aContent, aShell)
|
||||
nsXFormsSelectFullAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsSelectableAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -480,8 +480,8 @@ nsXFormsSelectFullAccessible::CacheChildren()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsItemCheckgroupAccessible::
|
||||
nsXFormsItemCheckgroupAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsSelectableItemAccessible(aContent, aShell)
|
||||
nsXFormsItemCheckgroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsSelectableItemAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -522,8 +522,8 @@ nsXFormsItemCheckgroupAccessible::GetActionName(PRUint8 aIndex, nsAString& aName
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsItemRadiogroupAccessible::
|
||||
nsXFormsItemRadiogroupAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsSelectableItemAccessible(aContent, aShell)
|
||||
nsXFormsItemRadiogroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsSelectableItemAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -560,8 +560,8 @@ nsXFormsItemRadiogroupAccessible::GetActionName(PRUint8 aIndex, nsAString& aName
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsSelectComboboxAccessible::
|
||||
nsXFormsSelectComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsSelectableAccessible(aContent, aShell)
|
||||
nsXFormsSelectComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsSelectableAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -601,8 +601,8 @@ nsXFormsSelectComboboxAccessible::GetAllowsAnonChildAccessibles()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsItemComboboxAccessible::
|
||||
nsXFormsItemComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXFormsSelectableItemAccessible(aContent, aShell)
|
||||
nsXFormsItemComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXFormsSelectableItemAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
class nsXFormsLabelAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsLabelAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual void Description(nsString& aDescription);
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
class nsXFormsOutputAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsOutputAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
class nsXFormsTriggerAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsTriggerAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsTriggerAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetValue(nsAString& aValue);
|
||||
|
@ -98,7 +98,7 @@ public:
|
|||
class nsXFormsInputAccessible : public nsXFormsEditableAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsInputAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
@ -120,7 +120,7 @@ public:
|
|||
class nsXFormsInputBooleanAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsInputBooleanAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsInputBooleanAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -141,7 +141,7 @@ public:
|
|||
class nsXFormsInputDateAccessible : public nsXFormsContainerAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsInputDateAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsInputDateAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -154,7 +154,7 @@ public:
|
|||
class nsXFormsSecretAccessible : public nsXFormsInputAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsSecretAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsSecretAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetValue(nsAString& aValue);
|
||||
|
@ -172,7 +172,7 @@ public:
|
|||
class nsXFormsRangeAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsRangeAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsRangeAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessibleValue
|
||||
NS_IMETHOD GetMaximumValue(double *aMaximumValue);
|
||||
|
@ -194,7 +194,7 @@ public:
|
|||
class nsXFormsSelectAccessible : public nsXFormsContainerAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsSelectAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsSelectAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual PRUint64 NativeState();
|
||||
|
@ -208,7 +208,7 @@ public:
|
|||
class nsXFormsChoicesAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsChoicesAccessible(nsIContent* aContent, nsIWeakReference *aShell);
|
||||
nsXFormsChoicesAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetValue(nsAString& aValue);
|
||||
|
@ -230,7 +230,7 @@ protected:
|
|||
class nsXFormsSelectFullAccessible : public nsXFormsSelectableAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsSelectFullAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXFormsSelectFullAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -250,8 +250,8 @@ protected:
|
|||
class nsXFormsItemCheckgroupAccessible : public nsXFormsSelectableItemAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsItemCheckgroupAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsXFormsItemCheckgroupAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -271,8 +271,8 @@ public:
|
|||
class nsXFormsItemRadiogroupAccessible : public nsXFormsSelectableItemAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsItemRadiogroupAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsXFormsItemRadiogroupAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -291,8 +291,8 @@ public:
|
|||
class nsXFormsSelectComboboxAccessible : public nsXFormsSelectableAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsSelectComboboxAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsXFormsSelectComboboxAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -310,8 +310,8 @@ public:
|
|||
class nsXFormsItemComboboxAccessible : public nsXFormsSelectableItemAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsItemComboboxAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsXFormsItemComboboxAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
|
|
@ -48,9 +48,9 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsDropmarkerWidgetAccessible::
|
||||
nsXFormsDropmarkerWidgetAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell) :
|
||||
nsLeafAccessible(aContent, aShell)
|
||||
nsXFormsDropmarkerWidgetAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc) :
|
||||
nsLeafAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -113,8 +113,8 @@ nsXFormsDropmarkerWidgetAccessible::DoAction(PRUint8 aIndex)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsCalendarWidgetAccessible::
|
||||
nsXFormsCalendarWidgetAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXFormsCalendarWidgetAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -130,9 +130,9 @@ nsXFormsCalendarWidgetAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXFormsComboboxPopupWidgetAccessible::
|
||||
nsXFormsComboboxPopupWidgetAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell) :
|
||||
nsXFormsAccessible(aContent, aShell)
|
||||
nsXFormsComboboxPopupWidgetAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc) :
|
||||
nsXFormsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ class nsXFormsDropmarkerWidgetAccessible : public nsLeafAccessible,
|
|||
public nsXFormsAccessibleBase
|
||||
{
|
||||
public:
|
||||
nsXFormsDropmarkerWidgetAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsXFormsDropmarkerWidgetAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -73,8 +73,8 @@ public:
|
|||
class nsXFormsCalendarWidgetAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXFormsCalendarWidgetAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsXFormsCalendarWidgetAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -88,8 +88,8 @@ public:
|
|||
class nsXFormsComboboxPopupWidgetAccessible : public nsXFormsAccessible
|
||||
{
|
||||
public:
|
||||
nsXFormsComboboxPopupWidgetAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsXFormsComboboxPopupWidgetAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetValue(nsAString& aValue);
|
||||
|
|
|
@ -61,8 +61,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
XULSelectControlAccessible::
|
||||
XULSelectControlAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
XULSelectControlAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
mSelectControl = do_QueryInterface(aContent);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ XULSelectControlAccessible::SelectedItems()
|
|||
{
|
||||
nsCOMPtr<nsIMutableArray> selectedItems =
|
||||
do_CreateInstance(NS_ARRAY_CONTRACTID);
|
||||
if (!selectedItems)
|
||||
if (!selectedItems || !mDoc)
|
||||
return nsnull;
|
||||
|
||||
// For XUL multi-select control
|
||||
|
@ -105,8 +105,7 @@ XULSelectControlAccessible::SelectedItems()
|
|||
nsCOMPtr<nsIDOMXULSelectControlItemElement> itemElm;
|
||||
xulMultiSelect->GetSelectedItem(index, getter_AddRefs(itemElm));
|
||||
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemElm));
|
||||
nsAccessible* item =
|
||||
GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell);
|
||||
nsAccessible* item = mDoc->GetAccessible(itemNode);
|
||||
if (item)
|
||||
selectedItems->AppendElement(static_cast<nsIAccessible*>(item),
|
||||
false);
|
||||
|
@ -116,13 +115,12 @@ XULSelectControlAccessible::SelectedItems()
|
|||
mSelectControl->GetSelectedItem(getter_AddRefs(itemElm));
|
||||
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemElm));
|
||||
if(itemNode) {
|
||||
nsAccessible* item =
|
||||
GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell);
|
||||
nsAccessible* item = mDoc->GetAccessible(itemNode);
|
||||
if (item)
|
||||
selectedItems->AppendElement(static_cast<nsIAccessible*>(item),
|
||||
false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsIMutableArray* items = nsnull;
|
||||
selectedItems.forget(&items);
|
||||
|
@ -142,8 +140,7 @@ XULSelectControlAccessible::GetSelectedItem(PRUint32 aIndex)
|
|||
mSelectControl->GetSelectedItem(getter_AddRefs(itemElm));
|
||||
|
||||
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemElm));
|
||||
return itemNode ?
|
||||
GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell) : nsnull;
|
||||
return itemNode && mDoc ? mDoc->GetAccessible(itemNode) : nsnull;
|
||||
}
|
||||
|
||||
PRUint32
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
class XULSelectControlAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
XULSelectControlAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
XULSelectControlAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~XULSelectControlAccessible() {}
|
||||
|
||||
// nsAccessNode
|
||||
|
|
|
@ -47,8 +47,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULAlertAccessible::
|
||||
nsXULAlertAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULAlertAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
class nsXULAlertAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULAlertAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULAlertAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
|
|
@ -55,8 +55,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULColorPickerTileAccessible::
|
||||
nsXULColorPickerTileAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULColorPickerTileAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -117,8 +117,8 @@ nsXULColorPickerTileAccessible::ContainerWidget() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULColorPickerAccessible::
|
||||
nsXULColorPickerAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXULColorPickerTileAccessible(aContent, aShell)
|
||||
nsXULColorPickerAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXULColorPickerTileAccessible(aContent, aDoc)
|
||||
{
|
||||
mFlags |= eMenuButtonAccessible;
|
||||
}
|
||||
|
@ -177,7 +177,9 @@ nsXULColorPickerAccessible::AreItemsOperable() const
|
|||
void
|
||||
nsXULColorPickerAccessible::CacheChildren()
|
||||
{
|
||||
nsAccTreeWalker walker(mWeakShell, mContent, true);
|
||||
NS_ENSURE_TRUE(mDoc,);
|
||||
|
||||
nsAccTreeWalker walker(mDoc->GetWeakShell(), mContent, true);
|
||||
|
||||
nsAccessible* child = nsnull;
|
||||
while ((child = walker.NextChild())) {
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
class nsXULColorPickerTileAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULColorPickerTileAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsXULColorPickerTileAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetValue(nsAString& _retval);
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
class nsXULColorPickerAccessible : public nsXULColorPickerTileAccessible
|
||||
{
|
||||
public:
|
||||
nsXULColorPickerAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULColorPickerAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "nsXULComboboxAccessible.h"
|
||||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "Role.h"
|
||||
#include "States.h"
|
||||
|
@ -56,8 +57,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULComboboxAccessible::
|
||||
nsXULComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
|
||||
nsGkAtoms::autocomplete, eIgnoreCase))
|
||||
|
@ -131,9 +132,8 @@ nsXULComboboxAccessible::Description(nsString& aDescription)
|
|||
menuListElm->GetSelectedItem(getter_AddRefs(focusedOptionItem));
|
||||
nsCOMPtr<nsIContent> focusedOptionContent =
|
||||
do_QueryInterface(focusedOptionItem);
|
||||
if (focusedOptionContent) {
|
||||
nsAccessible* focusedOptionAcc = GetAccService()->
|
||||
GetAccessibleInWeakShell(focusedOptionContent, mWeakShell);
|
||||
if (focusedOptionContent && mDoc) {
|
||||
nsAccessible* focusedOptionAcc = mDoc->GetAccessible(focusedOptionContent);
|
||||
if (focusedOptionAcc)
|
||||
focusedOptionAcc->Description(aDescription);
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ class nsXULComboboxAccessible : public nsAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
nsXULComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetValue(nsAString& aValue);
|
||||
|
|
|
@ -71,8 +71,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULButtonAccessible::
|
||||
nsXULButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
if (ContainsMenu())
|
||||
mFlags |= eMenuButtonAccessible;
|
||||
|
@ -226,13 +226,14 @@ nsXULButtonAccessible::CacheChildren()
|
|||
mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
|
||||
nsGkAtoms::menuButton, eCaseMatters);
|
||||
|
||||
NS_ENSURE_TRUE(mDoc,);
|
||||
if (!isMenu && !isMenuButton)
|
||||
return;
|
||||
|
||||
nsAccessible* menupopup = nsnull;
|
||||
nsAccessible* button = nsnull;
|
||||
|
||||
nsAccTreeWalker walker(mWeakShell, mContent, true);
|
||||
nsAccTreeWalker walker(mDoc->GetWeakShell(), mContent, true);
|
||||
|
||||
nsAccessible* child = nsnull;
|
||||
while ((child = walker.NextChild())) {
|
||||
|
@ -281,8 +282,8 @@ nsXULButtonAccessible::ContainsMenu()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULDropmarkerAccessible::
|
||||
nsXULDropmarkerAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsFormControlAccessible(aContent, aShell)
|
||||
nsXULDropmarkerAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsFormControlAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -362,8 +363,8 @@ nsXULDropmarkerAccessible::NativeState()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULCheckboxAccessible::
|
||||
nsXULCheckboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsFormControlAccessible(aContent, aShell)
|
||||
nsXULCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsFormControlAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -442,8 +443,8 @@ nsXULCheckboxAccessible::NativeState()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULGroupboxAccessible::
|
||||
nsXULGroupboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -499,8 +500,8 @@ nsXULGroupboxAccessible::RelationByType(PRUint32 aType)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULRadioButtonAccessible::
|
||||
nsXULRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsRadioButtonAccessible(aContent, aShell)
|
||||
nsXULRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsRadioButtonAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -558,8 +559,8 @@ nsXULRadioButtonAccessible::ContainerWidget() const
|
|||
*/
|
||||
|
||||
nsXULRadioGroupAccessible::
|
||||
nsXULRadioGroupAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
XULSelectControlAccessible(aContent, aShell)
|
||||
nsXULRadioGroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
XULSelectControlAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -605,8 +606,8 @@ nsXULRadioGroupAccessible::AreItemsOperable() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULStatusBarAccessible::
|
||||
nsXULStatusBarAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULStatusBarAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -622,8 +623,8 @@ nsXULStatusBarAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULToolbarButtonAccessible::
|
||||
nsXULToolbarButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXULButtonAccessible(aContent, aShell)
|
||||
nsXULToolbarButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXULButtonAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -673,8 +674,8 @@ nsXULToolbarButtonAccessible::IsSeparator(nsAccessible *aAccessible)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULToolbarAccessible::
|
||||
nsXULToolbarAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULToolbarAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -702,9 +703,9 @@ nsXULToolbarAccessible::GetNameInternal(nsAString& aName)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULToolbarSeparatorAccessible::
|
||||
nsXULToolbarSeparatorAccessible(nsIContent *aContent,
|
||||
nsIWeakReference *aShell) :
|
||||
nsLeafAccessible(aContent, aShell)
|
||||
nsXULToolbarSeparatorAccessible(nsIContent* aContent,
|
||||
nsDocAccessible* aDoc) :
|
||||
nsLeafAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -725,8 +726,8 @@ nsXULToolbarSeparatorAccessible::NativeState()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTextFieldAccessible::
|
||||
nsXULTextFieldAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsXULTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -776,7 +777,7 @@ nsXULTextFieldAccessible::NativeState()
|
|||
// Create a temporary accessible from the HTML text field to get
|
||||
// the accessible state from. Doesn't add to cache into document cache.
|
||||
nsRefPtr<nsHTMLTextFieldAccessible> tempAccessible =
|
||||
new nsHTMLTextFieldAccessible(inputField, mWeakShell);
|
||||
new nsHTMLTextFieldAccessible(inputField, mDoc);
|
||||
if (!tempAccessible)
|
||||
return state;
|
||||
|
||||
|
@ -865,13 +866,14 @@ NS_IMETHODIMP nsXULTextFieldAccessible::GetAssociatedEditor(nsIEditor **aEditor)
|
|||
void
|
||||
nsXULTextFieldAccessible::CacheChildren()
|
||||
{
|
||||
NS_ENSURE_TRUE(mDoc,);
|
||||
// Create child accessibles for native anonymous content of underlying HTML
|
||||
// input element.
|
||||
nsCOMPtr<nsIContent> inputContent(GetInputField());
|
||||
if (!inputContent)
|
||||
return;
|
||||
|
||||
nsAccTreeWalker walker(mWeakShell, inputContent, false);
|
||||
nsAccTreeWalker walker(mDoc->GetWeakShell(), inputContent, false);
|
||||
|
||||
nsAccessible* child = nsnull;
|
||||
while ((child = walker.NextChild()) && AppendChild(child));
|
||||
|
|
|
@ -61,7 +61,7 @@ class nsXULButtonAccessible : public nsAccessibleWrap
|
|||
{
|
||||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
nsXULButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -100,7 +100,7 @@ class nsXULCheckboxAccessible : public nsFormControlAccessible
|
|||
{
|
||||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
nsXULCheckboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -121,7 +121,7 @@ class nsXULDropmarkerAccessible : public nsFormControlAccessible
|
|||
{
|
||||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
nsXULDropmarkerAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULDropmarkerAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -144,7 +144,7 @@ private:
|
|||
class nsXULGroupboxAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULGroupboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -159,7 +159,7 @@ class nsXULRadioButtonAccessible : public nsRadioButtonAccessible
|
|||
{
|
||||
|
||||
public:
|
||||
nsXULRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual void GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
||||
|
@ -176,7 +176,7 @@ public:
|
|||
class nsXULRadioGroupAccessible : public XULSelectControlAccessible
|
||||
{
|
||||
public:
|
||||
nsXULRadioGroupAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULRadioGroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -194,7 +194,7 @@ public:
|
|||
class nsXULStatusBarAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULStatusBarAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULStatusBarAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -206,7 +206,7 @@ public:
|
|||
class nsXULToolbarButtonAccessible : public nsXULButtonAccessible
|
||||
{
|
||||
public:
|
||||
nsXULToolbarButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULToolbarButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual void GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
||||
|
@ -222,7 +222,7 @@ public:
|
|||
class nsXULToolbarAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULToolbarAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULToolbarAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -236,7 +236,7 @@ class nsXULToolbarSeparatorAccessible : public nsLeafAccessible
|
|||
{
|
||||
public:
|
||||
nsXULToolbarSeparatorAccessible(nsIContent* aContent,
|
||||
nsIWeakReference *aShell);
|
||||
nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -251,7 +251,7 @@ class nsXULTextFieldAccessible : public nsHyperTextAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
nsXULTextFieldAccessible(nsIContent* aContent, nsIWeakReference *aShell);
|
||||
nsXULTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
#include "nsAccessibilityService.h"
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsDocAccessible.h"
|
||||
#include "Role.h"
|
||||
#include "States.h"
|
||||
|
||||
|
@ -61,8 +62,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULColumnsAccessible::
|
||||
nsXULColumnsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULColumnsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -84,8 +85,8 @@ nsXULColumnsAccessible::NativeState()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULColumnItemAccessible::
|
||||
nsXULColumnItemAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsLeafAccessible(aContent, aShell)
|
||||
nsXULColumnItemAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsLeafAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -132,8 +133,8 @@ nsXULColumnItemAccessible::DoAction(PRUint8 aIndex)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULListboxAccessible::
|
||||
nsXULListboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
XULSelectControlAccessible(aContent, aShell)
|
||||
nsXULListboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
XULSelectControlAccessible(aContent, aDoc)
|
||||
{
|
||||
nsIContent* parentContent = mContent->GetParent();
|
||||
if (parentContent) {
|
||||
|
@ -316,9 +317,8 @@ nsXULListboxAccessible::GetCellAt(PRInt32 aRow, PRInt32 aColumn,
|
|||
NS_ENSURE_TRUE(item, NS_ERROR_INVALID_ARG);
|
||||
|
||||
nsCOMPtr<nsIContent> itemContent(do_QueryInterface(item));
|
||||
|
||||
nsAccessible *row =
|
||||
GetAccService()->GetAccessibleInWeakShell(itemContent, mWeakShell);
|
||||
NS_ENSURE_TRUE(mDoc, NS_ERROR_FAILURE);
|
||||
nsAccessible *row = mDoc->GetAccessible(itemContent);
|
||||
NS_ENSURE_STATE(row);
|
||||
|
||||
nsresult rv = row->GetChildAt(aColumn, aAccessibleCell);
|
||||
|
@ -601,13 +601,13 @@ nsXULListboxAccessible::GetSelectedCells(nsIArray **aCells)
|
|||
rv = selectedItems->GetLength(&selectedItemsCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
NS_ENSURE_TRUE(mDoc, NS_ERROR_FAILURE);
|
||||
PRUint32 index = 0;
|
||||
for (; index < selectedItemsCount; index++) {
|
||||
nsCOMPtr<nsIDOMNode> itemNode;
|
||||
selectedItems->Item(index, getter_AddRefs(itemNode));
|
||||
nsCOMPtr<nsIContent> itemContent(do_QueryInterface(itemNode));
|
||||
nsAccessible *item =
|
||||
GetAccService()->GetAccessibleInWeakShell(itemContent, mWeakShell);
|
||||
nsAccessible *item = mDoc->GetAccessible(itemContent);
|
||||
|
||||
if (item) {
|
||||
PRInt32 cellCount = item->GetChildCount();
|
||||
|
@ -900,8 +900,8 @@ nsXULListboxAccessible::ContainerWidget() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULListitemAccessible::
|
||||
nsXULListitemAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXULMenuitemAccessible(aContent, aShell)
|
||||
nsXULListitemAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXULMenuitemAccessible(aContent, aDoc)
|
||||
{
|
||||
mIsCheckbox = mContent->AttrValueIs(kNameSpaceID_None,
|
||||
nsGkAtoms::type,
|
||||
|
@ -929,7 +929,7 @@ nsXULListitemAccessible::GetListAccessible()
|
|||
if (!listContent)
|
||||
return nsnull;
|
||||
|
||||
return GetAccService()->GetAccessibleInWeakShell(listContent, mWeakShell);
|
||||
return mDoc->GetAccessible(listContent);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1053,8 +1053,8 @@ nsXULListitemAccessible::ContainerWidget() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULListCellAccessible::
|
||||
nsXULListCellAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsXULListCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ class nsIWeakReference;
|
|||
class nsXULColumnsAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULColumnsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULColumnsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
class nsXULColumnItemAccessible : public nsLeafAccessible
|
||||
{
|
||||
public:
|
||||
nsXULColumnItemAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULColumnItemAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -93,7 +93,7 @@ class nsXULListboxAccessible : public XULSelectControlAccessible,
|
|||
public nsIAccessibleTable
|
||||
{
|
||||
public:
|
||||
nsXULListboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULListboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsXULListboxAccessible() {}
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -127,7 +127,7 @@ public:
|
|||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
nsXULListitemAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULListitemAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
virtual ~nsXULListitemAccessible() {}
|
||||
|
||||
// nsIAccessible
|
||||
|
@ -163,7 +163,7 @@ class nsXULListCellAccessible : public nsHyperTextAccessibleWrap,
|
|||
public nsIAccessibleTableCell
|
||||
{
|
||||
public:
|
||||
nsXULListCellAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULListCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
|
@ -71,8 +71,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULMenuitemAccessible::
|
||||
nsXULMenuitemAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULMenuitemAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -408,8 +408,8 @@ nsXULMenuitemAccessible::ContainerWidget() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULMenuSeparatorAccessible::
|
||||
nsXULMenuSeparatorAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXULMenuitemAccessible(aContent, aShell)
|
||||
nsXULMenuSeparatorAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXULMenuitemAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -454,8 +454,8 @@ nsXULMenuSeparatorAccessible::ActionCount()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULMenupopupAccessible::
|
||||
nsXULMenupopupAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
XULSelectControlAccessible(aContent, aShell)
|
||||
nsXULMenupopupAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
XULSelectControlAccessible(aContent, aDoc)
|
||||
{
|
||||
nsMenuPopupFrame* menuPopupFrame = do_QueryFrame(GetFrame());
|
||||
if (menuPopupFrame && menuPopupFrame->IsMenu())
|
||||
|
@ -594,8 +594,8 @@ nsXULMenupopupAccessible::ContainerWidget() const
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULMenubarAccessible::
|
||||
nsXULMenubarAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULMenubarAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ class nsXULMenuitemAccessible : public nsAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Click = 0 };
|
||||
|
||||
nsXULMenuitemAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULMenuitemAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD DoAction(PRUint8 index);
|
||||
|
@ -85,7 +85,7 @@ public:
|
|||
class nsXULMenuSeparatorAccessible : public nsXULMenuitemAccessible
|
||||
{
|
||||
public:
|
||||
nsXULMenuSeparatorAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULMenuSeparatorAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD DoAction(PRUint8 index);
|
||||
|
@ -107,7 +107,7 @@ public:
|
|||
class nsXULMenupopupAccessible : public XULSelectControlAccessible
|
||||
{
|
||||
public:
|
||||
nsXULMenupopupAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULMenupopupAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual nsresult GetNameInternal(nsAString& aName);
|
||||
|
@ -128,7 +128,7 @@ public:
|
|||
class nsXULMenubarAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULMenubarAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULMenubarAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual nsresult GetNameInternal(nsAString& aName);
|
||||
|
|
|
@ -53,8 +53,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULSliderAccessible::
|
||||
nsXULSliderAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULSliderAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -289,8 +289,8 @@ nsXULSliderAccessible::SetSliderAttr(nsIAtom *aName, double aValue)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULThumbAccessible::
|
||||
nsXULThumbAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULThumbAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
class nsXULSliderAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULSliderAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULSliderAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
@ -90,7 +90,7 @@ private:
|
|||
class nsXULThumbAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULThumbAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULThumbAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
|
|
@ -59,8 +59,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTabAccessible::
|
||||
nsXULTabAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULTabAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -178,8 +178,8 @@ nsXULTabAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTabsAccessible::
|
||||
nsXULTabsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
XULSelectControlAccessible(aContent, aShell)
|
||||
nsXULTabsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
XULSelectControlAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -214,8 +214,8 @@ nsXULTabsAccessible::GetNameInternal(nsAString& aName)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTabpanelsAccessible::
|
||||
nsXULTabpanelsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULTabpanelsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -231,8 +231,8 @@ nsXULTabpanelsAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTabpanelAccessible::
|
||||
nsXULTabpanelAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULTabpanelAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class nsXULTabAccessible : public nsAccessibleWrap
|
|||
public:
|
||||
enum { eAction_Switch = 0 };
|
||||
|
||||
nsXULTabAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULTabAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
class nsXULTabsAccessible : public XULSelectControlAccessible
|
||||
{
|
||||
public:
|
||||
nsXULTabsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULTabsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetValue(nsAString& _retval);
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
class nsXULTabpanelsAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULTabpanelsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULTabpanelsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -116,7 +116,7 @@ public:
|
|||
class nsXULTabpanelAccessible : public nsAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULTabpanelAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULTabpanelAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
|
|
@ -61,8 +61,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTextAccessible::
|
||||
nsXULTextAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsXULTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -112,8 +112,8 @@ nsXULTextAccessible::RelationByType(PRUint32 aType)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTooltipAccessible::
|
||||
nsXULTooltipAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsLeafAccessible(aContent, aShell)
|
||||
nsXULTooltipAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsLeafAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -139,8 +139,8 @@ nsXULTooltipAccessible::NativeRole()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULLinkAccessible::
|
||||
nsXULLinkAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsHyperTextAccessibleWrap(aContent, aShell)
|
||||
nsXULLinkAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsHyperTextAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
class nsXULTextAccessible : public nsHyperTextAccessibleWrap
|
||||
{
|
||||
public:
|
||||
nsXULTextAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual nsresult GetNameInternal(nsAString& aName);
|
||||
|
@ -65,7 +65,7 @@ class nsXULTooltipAccessible : public nsLeafAccessible
|
|||
{
|
||||
|
||||
public:
|
||||
nsXULTooltipAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULTooltipAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
// nsAccessible
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -76,7 +76,7 @@ class nsXULLinkAccessible : public nsHyperTextAccessibleWrap
|
|||
{
|
||||
|
||||
public:
|
||||
nsXULLinkAccessible(nsIContent *aContent, nsIWeakReference *aShell);
|
||||
nsXULLinkAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
|
|
|
@ -65,8 +65,8 @@ using namespace mozilla::a11y;
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTreeAccessible::
|
||||
nsXULTreeAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsAccessibleWrap(aContent, aShell)
|
||||
nsXULTreeAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsAccessibleWrap(aContent, aDoc)
|
||||
{
|
||||
mTree = nsCoreUtils::GetTreeBoxObject(aContent);
|
||||
if (mTree)
|
||||
|
@ -685,7 +685,7 @@ already_AddRefed<nsAccessible>
|
|||
nsXULTreeAccessible::CreateTreeItemAccessible(PRInt32 aRow)
|
||||
{
|
||||
nsRefPtr<nsAccessible> accessible =
|
||||
new nsXULTreeItemAccessible(mContent, mWeakShell, this, mTree, mTreeView,
|
||||
new nsXULTreeItemAccessible(mContent, mDoc, this, mTree, mTreeView,
|
||||
aRow);
|
||||
|
||||
return accessible.forget();
|
||||
|
@ -696,10 +696,10 @@ nsXULTreeAccessible::CreateTreeItemAccessible(PRInt32 aRow)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTreeItemAccessibleBase::
|
||||
nsXULTreeItemAccessibleBase(nsIContent *aContent, nsIWeakReference *aShell,
|
||||
nsAccessible *aParent, nsITreeBoxObject *aTree,
|
||||
nsITreeView *aTreeView, PRInt32 aRow) :
|
||||
nsAccessibleWrap(aContent, aShell),
|
||||
nsXULTreeItemAccessibleBase(nsIContent* aContent, nsDocAccessible* aDoc,
|
||||
nsAccessible* aParent, nsITreeBoxObject* aTree,
|
||||
nsITreeView* aTreeView, PRInt32 aRow) :
|
||||
nsAccessibleWrap(aContent, aDoc),
|
||||
mTree(aTree), mTreeView(aTreeView), mRow(aRow)
|
||||
{
|
||||
mParent = aParent;
|
||||
|
@ -1113,10 +1113,10 @@ nsXULTreeItemAccessibleBase::GetCellName(nsITreeColumn* aColumn,
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTreeItemAccessible::
|
||||
nsXULTreeItemAccessible(nsIContent *aContent, nsIWeakReference *aShell,
|
||||
nsAccessible *aParent, nsITreeBoxObject *aTree,
|
||||
nsITreeView *aTreeView, PRInt32 aRow) :
|
||||
nsXULTreeItemAccessibleBase(aContent, aShell, aParent, aTree, aTreeView, aRow)
|
||||
nsXULTreeItemAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
|
||||
nsAccessible* aParent, nsITreeBoxObject* aTree,
|
||||
nsITreeView* aTreeView, PRInt32 aRow) :
|
||||
nsXULTreeItemAccessibleBase(aContent, aDoc, aParent, aTree, aTreeView, aRow)
|
||||
{
|
||||
mColumn = nsCoreUtils::GetFirstSensibleColumn(mTree);
|
||||
}
|
||||
|
@ -1231,8 +1231,8 @@ nsXULTreeItemAccessible::CacheChildren()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsXULTreeColumnsAccessible::
|
||||
nsXULTreeColumnsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
|
||||
nsXULColumnsAccessible(aContent, aShell)
|
||||
nsXULTreeColumnsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
|
||||
nsXULColumnsAccessible(aContent, aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче