Backout 38607065cf3f (bug 672504) for M-oth orange

This commit is contained in:
Ed Morley 2012-01-31 21:14:30 +00:00
Родитель bcc9969b0b
Коммит 0734980b7e
102 изменённых файлов: 797 добавлений и 805 удалений

Просмотреть файл

@ -162,9 +162,9 @@ mai_atk_socket_get_extents(AtkComponent* aComponent,
}
AtkSocketAccessible::AtkSocketAccessible(nsIContent* aContent,
nsDocAccessible* aDoc,
nsIWeakReference* aShell,
const nsCString& aPlugId) :
nsAccessibleWrap(aContent, aDoc)
nsAccessibleWrap(aContent, aShell)
{
mAtkObject = mai_atk_socket_new(this);
if (!mAtkObject)

Просмотреть файл

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

Просмотреть файл

@ -55,8 +55,8 @@
//-----------------------------------------------------
nsAccessNodeWrap::
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessNode(aContent, aDoc)
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessNode(aContent, aShell)
{
}

Просмотреть файл

@ -49,11 +49,12 @@
class nsAccessNodeWrap : public nsAccessNode
{
public: // construction, destruction
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
virtual ~nsAccessNodeWrap();
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsAccessNodeWrap();
static void InitAccessibility();
static void ShutdownAccessibility();
static void InitAccessibility();
static void ShutdownAccessibility();
};
#endif

Просмотреть файл

@ -281,8 +281,8 @@ PRInt32 nsAccessibleWrap::mAccWrapDeleted = 0;
#endif
nsAccessibleWrap::
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessible(aContent, aDoc), mAtkObject(nsnull)
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessible(aContent, aShell), mAtkObject(nsnull)
{
#ifdef MAI_LOGGING
++mAccWrapCreated;
@ -362,7 +362,7 @@ NS_IMETHODIMP nsAccessibleWrap::GetNativeInterface(void **aOutAccessible)
*aOutAccessible = nsnull;
if (!mAtkObject) {
if (IsDefunct() || !nsAccUtils::IsEmbeddedObject(this)) {
if (!mWeakShell || !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, nsDocAccessible* aDoc);
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsAccessibleWrap();
void ShutdownAtkObject();

Просмотреть файл

@ -671,7 +671,7 @@ NotificationController::CreateTextChangeEventFor(AccMutationEvent* aEvent)
{
nsAccessible* container =
GetAccService()->GetContainerAccessible(aEvent->mNode,
aEvent->GetDocAccessible()->PresShell());
aEvent->mAccessible->GetWeakShell());
if (!container)
return;

Просмотреть файл

@ -57,8 +57,8 @@ using namespace mozilla::a11y;
// Constructor
nsARIAGridAccessible::
nsARIAGridAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsARIAGridAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -932,8 +932,8 @@ nsARIAGridAccessible::GetSelectedColumnsArray(PRUint32 *acolumnCount,
// Constructor
nsARIAGridCellAccessible::
nsARIAGridCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsARIAGridCellAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -50,7 +50,7 @@ class nsARIAGridAccessible : public nsAccessibleWrap,
public nsIAccessibleTable
{
public:
nsARIAGridAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsARIAGridAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -110,7 +110,7 @@ class nsARIAGridCellAccessible : public nsHyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:
nsARIAGridCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsARIAGridCellAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED

Просмотреть файл

@ -425,11 +425,11 @@ nsAccUtils::GetTextAccessibleFromSelection(nsISelection* aSelection)
nsCOMPtr<nsINode> focusNode(do_QueryInterface(focusDOMNode));
nsCOMPtr<nsINode> resultNode =
nsCoreUtils::GetDOMNodeFromDOMPoint(focusNode, focusOffset);
nsIPresShell* presShell(nsCoreUtils::GetPresShellFor(resultNode));
nsCOMPtr<nsIWeakReference> weakShell(nsCoreUtils::GetWeakShellFor(resultNode));
// Get text accessible containing the result node.
nsAccessible* accessible =
GetAccService()->GetAccessibleOrContainer(resultNode, presShell);
GetAccService()->GetAccessibleOrContainer(resultNode, weakShell);
if (!accessible) {
NS_NOTREACHED("No nsIAccessibleText for selection change event!");
return nsnull;
@ -525,8 +525,9 @@ nsAccUtils::GetScreenCoordsForWindow(nsAccessNode *aAccessNode)
nsIntPoint
nsAccUtils::GetScreenCoordsForParent(nsAccessNode *aAccessNode)
{
nsDocAccessible* document = aAccessNode->GetDocAccessible();
nsAccessible* parent = document->GetContainerAccessible(aAccessNode->GetNode());
nsAccessible *parent =
GetAccService()->GetContainerAccessible(aAccessNode->GetNode(),
aAccessNode->GetWeakShell());
if (!parent)
return nsIntPoint(0, 0);

Просмотреть файл

@ -157,10 +157,11 @@ public:
/**
* Return document accessible for the given presshell.
*/
static nsDocAccessible* GetDocAccessibleFor(const nsIPresShell* aPresShell)
static nsDocAccessible *GetDocAccessibleFor(nsIWeakReference *aWeakShell)
{
return aPresShell ?
GetAccService()->GetDocAccessible(aPresShell->GetDocument()) : nsnull;
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(aWeakShell));
return presShell ?
GetAccService()->GetDocAccessible(presShell->GetDocument()) : nsnull;
}
/**

Просмотреть файл

@ -101,8 +101,8 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(nsAccessNode, LastRelease())
// nsAccessNode construction/desctruction
nsAccessNode::
nsAccessNode(nsIContent* aContent, nsDocAccessible* aDoc) :
mContent(aContent), mDoc(aDoc)
nsAccessNode(nsIContent *aContent, nsIWeakReference *aShell) :
mContent(aContent), mWeakShell(aShell)
{
#ifdef DEBUG_A11Y
mIsInitialized = false;
@ -111,15 +111,15 @@ nsAccessNode::
nsAccessNode::~nsAccessNode()
{
NS_ASSERTION(!mDoc, "LastRelease was never called!?!");
NS_ASSERTION(!mWeakShell, "LastRelease was never called!?!");
}
void nsAccessNode::LastRelease()
{
// First cleanup if needed...
if (mDoc) {
if (mWeakShell) {
Shutdown();
NS_ASSERTION(!mDoc, "A Shutdown() impl forgot to call its parent's Shutdown?");
NS_ASSERTION(!mWeakShell, "A Shutdown() impl forgot to call its parent's Shutdown?");
}
// ... then die.
delete this;
@ -145,7 +145,7 @@ void
nsAccessNode::Shutdown()
{
mContent = nsnull;
mDoc = nsnull;
mWeakShell = nsnull;
}
nsApplicationAccessible*
@ -227,15 +227,31 @@ 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()
{
if (IsDefunct())
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
if (!presShell) {
return nsnull;
}
return presShell->GetPresContext();
}
nsIPresShell* presShell(mDoc->PresShell());
return presShell ? presShell->GetPresContext() : nsnull;
nsDocAccessible *
nsAccessNode::GetDocAccessible() const
{
return mContent ?
GetAccService()->GetDocAccessible(mContent->OwnerDoc()) : nsnull;
}
nsRootAccessible*
@ -322,13 +338,13 @@ nsAccessNode::ScrollTo(PRUint32 aScrollType)
if (IsDefunct())
return NS_ERROR_FAILURE;
nsIPresShell* shell = mDoc->PresShell();
nsCOMPtr<nsIPresShell> shell(GetPresShell());
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
nsIFrame *frame = GetFrame();
NS_ENSURE_TRUE(frame, NS_ERROR_FAILURE);
nsIContent* content = frame->GetContent();
nsCOMPtr<nsIContent> content = frame->GetContent();
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
PRInt16 vPercent, hPercent;
@ -399,7 +415,9 @@ nsAccessNode::GetCurrentFocus()
{
// XXX: consider to use nsFocusManager directly, it allows us to avoid
// unnecessary query interface calls.
nsIDocument* doc = GetDocumentNode();
nsCOMPtr<nsIPresShell> shell = GetPresShell();
NS_ENSURE_TRUE(shell, nsnull);
nsIDocument *doc = shell->GetDocument();
NS_ENSURE_TRUE(doc, nsnull);
nsIDOMWindow* win = doc->GetWindow();

Просмотреть файл

@ -80,7 +80,7 @@ class nsAccessNode: public nsIAccessNode
{
public:
nsAccessNode(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessNode(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsAccessNode();
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@ -100,7 +100,7 @@ public:
/**
* Return the document accessible for this access node.
*/
nsDocAccessible* GetDocAccessible() const { return mDoc; }
nsDocAccessible *GetDocAccessible() const;
/**
* Return the root document accessible for this accessnode.
@ -171,6 +171,16 @@ 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.
*/
@ -191,7 +201,7 @@ protected:
void LastRelease();
nsCOMPtr<nsIContent> mContent;
nsDocAccessible* mDoc;
nsCOMPtr<nsIWeakReference> mWeakShell;
/**
* Notify global nsIObserver's that a11y is getting init'd or shutdown

Просмотреть файл

@ -204,15 +204,14 @@ nsAccessibilityService::GetRootDocumentAccessible(nsIPresShell* aPresShell,
}
return nsnull;
}
already_AddRefed<nsAccessible>
nsAccessibilityService::CreateOuterDocAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsOuterDocAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsOuterDocAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -220,10 +219,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTML4ButtonAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTML4ButtonAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTML4ButtonAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -231,10 +229,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLButtonAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLButtonAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLButtonAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -242,10 +239,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLLIAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLLIAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLLIAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -253,10 +249,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHyperTextAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHyperTextAccessibleWrap(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -264,10 +259,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLCheckboxAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLCheckboxAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLCheckboxAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -275,10 +269,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLComboboxAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLComboboxAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLComboboxAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -286,10 +279,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLCanvasAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLCanvasAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLCanvasAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -297,10 +289,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLFileInputAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLFileInputAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLFileInputAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -315,13 +306,11 @@ nsAccessibilityService::CreateHTMLImageAccessible(nsIContent* aContent,
mapElm = do_QueryInterface(document->FindImageMap(mapElmName));
}
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = mapElm ?
new nsHTMLImageMapAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell),
mapElm) :
new nsHTMLImageAccessibleWrap(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
new nsHTMLImageMapAccessible(aContent, weakShell, mapElm) :
new nsHTMLImageAccessibleWrap(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -329,10 +318,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLGroupboxAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLGroupboxAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLGroupboxAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -340,10 +328,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLListboxAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLSelectListAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLSelectListAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -351,11 +338,10 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLMediaAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsEnumRoleAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell),
roles::GROUPING);
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, weakShell,
roles::GROUPING);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -375,6 +361,7 @@ 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));
@ -395,11 +382,10 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame* aFrame,
HWND pluginPort = nsnull;
aFrame->GetPluginPort(&pluginPort);
nsAccessible* accessible =
new nsHTMLWin32ObjectOwnerAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell),
pluginPort);
NS_ADDREF(accessible);
nsAccessible* accessible = new nsHTMLWin32ObjectOwnerAccessible(aContent,
weakShell,
pluginPort);
NS_IF_ADDREF(accessible);
return accessible;
#elif MOZ_ACCESSIBILITY_ATK
@ -411,11 +397,9 @@ nsAccessibilityService::CreateHTMLObjectFrameAccessible(nsObjectFrame* aFrame,
NPPVpluginNativeAccessibleAtkPlugId, &plugId);
if (NS_SUCCEEDED(rv) && !plugId.IsEmpty()) {
AtkSocketAccessible* socketAccessible =
new AtkSocketAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell),
plugId);
new AtkSocketAccessible(aContent, weakShell, plugId);
NS_ADDREF(socketAccessible);
NS_IF_ADDREF(socketAccessible);
return socketAccessible;
}
#endif
@ -432,10 +416,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLRadioButtonAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLRadioButtonAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLRadioButtonAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -443,10 +426,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLTableAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLTableAccessibleWrap(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLTableAccessibleWrap(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -454,10 +436,10 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLTableCellAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLTableCellAccessibleWrap(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLTableCellAccessibleWrap(aContent,
weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -465,10 +447,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLTextAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLTextAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLTextAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -476,10 +457,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLTextFieldAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLTextFieldAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLTextFieldAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -487,10 +467,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLLabelAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLLabelAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLLabelAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -498,10 +477,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLHRAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLHRAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLHRAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -509,10 +487,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLBRAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLBRAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLBRAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -520,10 +497,9 @@ already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLCaptionAccessible(nsIContent* aContent,
nsIPresShell* aPresShell)
{
nsAccessible* accessible =
new nsHTMLCaptionAccessible(aContent,
nsAccUtils::GetDocAccessibleFor(aPresShell));
NS_ADDREF(accessible);
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(aPresShell));
nsAccessible* accessible = new nsHTMLCaptionAccessible(aContent, weakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -913,12 +889,14 @@ nsAccessibilityService::GetAccessible(nsINode* aNode)
}
nsAccessible*
nsAccessibilityService::GetAccessibleOrContainer(nsINode* aNode, nsIPresShell* aPresShell)
nsAccessibilityService::GetAccessibleOrContainer(nsINode* aNode,
nsIWeakReference* aWeakShell)
{
if (!aNode)
return nsnull;
nsDocAccessible* document = nsAccUtils::GetDocAccessibleFor(aPresShell);
// XXX: weak shell is ignored until multiple shell documents are supported.
nsDocAccessible* document = GetDocAccessible(aNode->OwnerDoc());
return document ? document->GetAccessibleOrContainer(aNode) : nsnull;
}
@ -1061,7 +1039,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
return nsnull;
}
newAcc = new nsHyperTextAccessibleWrap(content, docAcc);
newAcc = new nsHyperTextAccessibleWrap(content, aWeakShell);
if (docAcc->BindToDocument(newAcc, nsAccUtils::GetRoleMapEntry(aNode)))
return newAcc;
return nsnull;
@ -1155,12 +1133,12 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
if (roleMapEntry->role == roles::TABLE ||
roleMapEntry->role == roles::TREE_TABLE) {
newAcc = new nsARIAGridAccessibleWrap(content, docAcc);
newAcc = new nsARIAGridAccessibleWrap(content, aWeakShell);
} else if (roleMapEntry->role == roles::GRID_CELL ||
roleMapEntry->role == roles::ROWHEADER ||
roleMapEntry->role == roles::COLUMNHEADER) {
newAcc = new nsARIAGridCellAccessibleWrap(content, docAcc);
newAcc = new nsARIAGridCellAccessibleWrap(content, aWeakShell);
}
}
}
@ -1172,7 +1150,7 @@ nsAccessibilityService::GetOrCreateAccessible(nsINode* aNode,
// we do not call it if accessibles for table related content are
// prevented above.
newAcc = CreateHTMLAccessibleByMarkup(weakFrame.GetFrame(), content,
docAcc);
aWeakShell);
if (!newAcc) {
// Do not create accessible object subtrees for non-rendered table
@ -1204,24 +1182,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, docAcc);
newAcc = CreateAccessibleByType(content, aWeakShell);
}
if (!newAcc) {
// Create generic accessibles for SVG and MathML nodes.
if (content->IsSVG(nsGkAtoms::svg)) {
newAcc = new nsEnumRoleAccessible(content, docAcc,
newAcc = new nsEnumRoleAccessible(content, aWeakShell,
roles::DIAGRAM);
}
else if (content->IsMathML(nsGkAtoms::math)) {
newAcc = new nsEnumRoleAccessible(content, docAcc,
newAcc = new nsEnumRoleAccessible(content, aWeakShell,
roles::EQUATION);
}
}
if (!newAcc) {
newAcc = CreateAccessibleForDeckChild(weakFrame.GetFrame(), content,
docAcc);
aWeakShell);
}
// If no accessible, see if we need to create a generic accessible because
@ -1238,11 +1216,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, docAcc);
newAcc = new nsHyperTextAccessibleWrap(content, aWeakShell);
}
else { // XUL, SVG, MathML etc.
// Interesting generic non-HTML container
newAcc = new nsAccessibleWrap(content, docAcc);
newAcc = new nsAccessibleWrap(content, aWeakShell);
}
}
@ -1323,7 +1301,7 @@ nsAccessibilityService::HasUniversalAriaProperty(nsIContent *aContent)
already_AddRefed<nsAccessible>
nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
nsDocAccessible* aDoc)
nsIWeakReference* aWeakShell)
{
nsCOMPtr<nsIAccessibleProvider> accessibleProvider(do_QueryInterface(aContent));
if (!accessibleProvider)
@ -1335,7 +1313,7 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
return nsnull;
if (type == nsIAccessibleProvider::OuterDoc) {
nsAccessible* accessible = new nsOuterDocAccessible(aContent, aDoc);
nsAccessible* accessible = new nsOuterDocAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -1349,35 +1327,35 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
// XUL controls
case nsIAccessibleProvider::XULAlert:
accessible = new nsXULAlertAccessible(aContent, aDoc);
accessible = new nsXULAlertAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULButton:
accessible = new nsXULButtonAccessible(aContent, aDoc);
accessible = new nsXULButtonAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULCheckbox:
accessible = new nsXULCheckboxAccessible(aContent, aDoc);
accessible = new nsXULCheckboxAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULColorPicker:
accessible = new nsXULColorPickerAccessible(aContent, aDoc);
accessible = new nsXULColorPickerAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULColorPickerTile:
accessible = new nsXULColorPickerTileAccessible(aContent, aDoc);
accessible = new nsXULColorPickerTileAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULCombobox:
accessible = new nsXULComboboxAccessible(aContent, aDoc);
accessible = new nsXULComboboxAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULDropmarker:
accessible = new nsXULDropmarkerAccessible(aContent, aDoc);
accessible = new nsXULDropmarkerAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULGroupbox:
accessible = new nsXULGroupboxAccessible(aContent, aDoc);
accessible = new nsXULGroupboxAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULImage:
@ -1387,40 +1365,40 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
nsGkAtoms::tooltiptext))
return nsnull;
accessible = new nsHTMLImageAccessibleWrap(aContent, aDoc);
accessible = new nsHTMLImageAccessibleWrap(aContent, aWeakShell);
break;
}
case nsIAccessibleProvider::XULLink:
accessible = new nsXULLinkAccessible(aContent, aDoc);
accessible = new nsXULLinkAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULListbox:
accessible = new nsXULListboxAccessibleWrap(aContent, aDoc);
accessible = new nsXULListboxAccessibleWrap(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULListCell:
accessible = new nsXULListCellAccessibleWrap(aContent, aDoc);
accessible = new nsXULListCellAccessibleWrap(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULListHead:
accessible = new nsXULColumnsAccessible(aContent, aDoc);
accessible = new nsXULColumnsAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULListHeader:
accessible = new nsXULColumnItemAccessible(aContent, aDoc);
accessible = new nsXULColumnItemAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULListitem:
accessible = new nsXULListitemAccessible(aContent, aDoc);
accessible = new nsXULListitemAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULMenubar:
accessible = new nsXULMenubarAccessible(aContent, aDoc);
accessible = new nsXULMenubarAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULMenuitem:
accessible = new nsXULMenuitemAccessibleWrap(aContent, aDoc);
accessible = new nsXULMenuitemAccessibleWrap(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULMenupopup:
@ -1436,167 +1414,167 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
kNameSpaceID_XUL))
return nsnull;
#endif
accessible = new nsXULMenupopupAccessible(aContent, aDoc);
accessible = new nsXULMenupopupAccessible(aContent, aWeakShell);
break;
}
case nsIAccessibleProvider::XULMenuSeparator:
accessible = new nsXULMenuSeparatorAccessible(aContent, aDoc);
accessible = new nsXULMenuSeparatorAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULPane:
accessible = new nsEnumRoleAccessible(aContent, aDoc,
accessible = new nsEnumRoleAccessible(aContent, aWeakShell,
roles::PANE);
break;
case nsIAccessibleProvider::XULProgressMeter:
accessible = new XULProgressMeterAccessible(aContent, aDoc);
accessible = new XULProgressMeterAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULStatusBar:
accessible = new nsXULStatusBarAccessible(aContent, aDoc);
accessible = new nsXULStatusBarAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULScale:
accessible = new nsXULSliderAccessible(aContent, aDoc);
accessible = new nsXULSliderAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULRadioButton:
accessible = new nsXULRadioButtonAccessible(aContent, aDoc);
accessible = new nsXULRadioButtonAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULRadioGroup:
accessible = new nsXULRadioGroupAccessible(aContent, aDoc);
accessible = new nsXULRadioGroupAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULTab:
accessible = new nsXULTabAccessible(aContent, aDoc);
accessible = new nsXULTabAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULTabs:
accessible = new nsXULTabsAccessible(aContent, aDoc);
accessible = new nsXULTabsAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULTabpanels:
accessible = new nsXULTabpanelsAccessible(aContent, aDoc);
accessible = new nsXULTabpanelsAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULText:
accessible = new nsXULTextAccessible(aContent, aDoc);
accessible = new nsXULTextAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULTextBox:
accessible = new nsXULTextFieldAccessible(aContent, aDoc);
accessible = new nsXULTextFieldAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULThumb:
accessible = new nsXULThumbAccessible(aContent, aDoc);
accessible = new nsXULThumbAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULTree:
return CreateAccessibleForXULTree(aContent, aDoc);
return CreateAccessibleForXULTree(aContent, aWeakShell);
case nsIAccessibleProvider::XULTreeColumns:
accessible = new nsXULTreeColumnsAccessible(aContent, aDoc);
accessible = new nsXULTreeColumnsAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULTreeColumnItem:
accessible = new nsXULColumnItemAccessible(aContent, aDoc);
accessible = new nsXULColumnItemAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULToolbar:
accessible = new nsXULToolbarAccessible(aContent, aDoc);
accessible = new nsXULToolbarAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULToolbarSeparator:
accessible = new nsXULToolbarSeparatorAccessible(aContent, aDoc);
accessible = new nsXULToolbarSeparatorAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULTooltip:
accessible = new nsXULTooltipAccessible(aContent, aDoc);
accessible = new nsXULTooltipAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XULToolbarButton:
accessible = new nsXULToolbarButtonAccessible(aContent, aDoc);
accessible = new nsXULToolbarButtonAccessible(aContent, aWeakShell);
break;
#endif // MOZ_XUL
// XForms elements
case nsIAccessibleProvider::XFormsContainer:
accessible = new nsXFormsContainerAccessible(aContent, aDoc);
accessible = new nsXFormsContainerAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsLabel:
accessible = new nsXFormsLabelAccessible(aContent, aDoc);
accessible = new nsXFormsLabelAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsOutput:
accessible = new nsXFormsOutputAccessible(aContent, aDoc);
accessible = new nsXFormsOutputAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsTrigger:
accessible = new nsXFormsTriggerAccessible(aContent, aDoc);
accessible = new nsXFormsTriggerAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsInput:
accessible = new nsXFormsInputAccessible(aContent, aDoc);
accessible = new nsXFormsInputAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsInputBoolean:
accessible = new nsXFormsInputBooleanAccessible(aContent, aDoc);
accessible = new nsXFormsInputBooleanAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsInputDate:
accessible = new nsXFormsInputDateAccessible(aContent, aDoc);
accessible = new nsXFormsInputDateAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsSecret:
accessible = new nsXFormsSecretAccessible(aContent, aDoc);
accessible = new nsXFormsSecretAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsSliderRange:
accessible = new nsXFormsRangeAccessible(aContent, aDoc);
accessible = new nsXFormsRangeAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsSelect:
accessible = new nsXFormsSelectAccessible(aContent, aDoc);
accessible = new nsXFormsSelectAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsChoices:
accessible = new nsXFormsChoicesAccessible(aContent, aDoc);
accessible = new nsXFormsChoicesAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsSelectFull:
accessible = new nsXFormsSelectFullAccessible(aContent, aDoc);
accessible = new nsXFormsSelectFullAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsItemCheckgroup:
accessible = new nsXFormsItemCheckgroupAccessible(aContent, aDoc);
accessible = new nsXFormsItemCheckgroupAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsItemRadiogroup:
accessible = new nsXFormsItemRadiogroupAccessible(aContent, aDoc);
accessible = new nsXFormsItemRadiogroupAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsSelectCombobox:
accessible = new nsXFormsSelectComboboxAccessible(aContent, aDoc);
accessible = new nsXFormsSelectComboboxAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsItemCombobox:
accessible = new nsXFormsItemComboboxAccessible(aContent, aDoc);
accessible = new nsXFormsItemComboboxAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsDropmarkerWidget:
accessible = new nsXFormsDropmarkerWidgetAccessible(aContent, aDoc);
accessible = new nsXFormsDropmarkerWidgetAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsCalendarWidget:
accessible = new nsXFormsCalendarWidgetAccessible(aContent, aDoc);
accessible = new nsXFormsCalendarWidgetAccessible(aContent, aWeakShell);
break;
case nsIAccessibleProvider::XFormsComboboxPopupWidget:
accessible = new nsXFormsComboboxPopupWidgetAccessible(aContent, aDoc);
accessible = new nsXFormsComboboxPopupWidgetAccessible(aContent, aWeakShell);
break;
default:
@ -1610,45 +1588,46 @@ nsAccessibilityService::CreateAccessibleByType(nsIContent* aContent,
already_AddRefed<nsAccessible>
nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
nsIContent* aContent,
nsDocAccessible* aDoc)
nsIWeakReference* aWeakShell)
{
// This method assumes we're in an HTML namespace.
nsIAtom* tag = aContent->Tag();
if (tag == nsGkAtoms::figcaption) {
nsAccessible* accessible =
new nsHTMLFigcaptionAccessible(aContent, aDoc);
new nsHTMLFigcaptionAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsGkAtoms::figure) {
nsAccessible* accessible = new nsHTMLFigureAccessible(aContent, aDoc);
nsAccessible* accessible = new nsHTMLFigureAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsGkAtoms::legend) {
nsAccessible* accessible = new nsHTMLLegendAccessible(aContent, aDoc);
nsAccessible* accessible = new nsHTMLLegendAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsGkAtoms::option) {
nsAccessible* accessible = new nsHTMLSelectOptionAccessible(aContent, aDoc);
nsAccessible* accessible = new nsHTMLSelectOptionAccessible(aContent,
aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsGkAtoms::optgroup) {
nsAccessible* accessible = new nsHTMLSelectOptGroupAccessible(aContent,
aDoc);
aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsGkAtoms::ul || tag == nsGkAtoms::ol ||
tag == nsGkAtoms::dl) {
nsAccessible* accessible = new nsHTMLListAccessible(aContent, aDoc);
nsAccessible* accessible = new nsHTMLListAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -1659,12 +1638,13 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(aContent);
if (roleMapEntry && roleMapEntry->role != roles::NOTHING &&
roleMapEntry->role != roles::LINK) {
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, aDoc);
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent,
aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
nsAccessible* accessible = new nsHTMLLinkAccessible(aContent, aDoc);
nsAccessible* accessible = new nsHTMLLinkAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -1675,7 +1655,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, aDoc);
nsAccessible* accessible = new nsHTMLLIAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -1692,13 +1672,13 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
tag == nsGkAtoms::h5 ||
tag == nsGkAtoms::h6 ||
tag == nsGkAtoms::q) {
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, aDoc);
nsAccessible* accessible = new nsHyperTextAccessibleWrap(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsGkAtoms::tr) {
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aDoc,
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aWeakShell,
roles::ROW);
NS_IF_ADDREF(accessible);
return accessible;
@ -1706,20 +1686,20 @@ nsAccessibilityService::CreateHTMLAccessibleByMarkup(nsIFrame* aFrame,
if (nsCoreUtils::IsHTMLTableHeader(aContent)) {
nsAccessible* accessible = new nsHTMLTableHeaderCellAccessibleWrap(aContent,
aDoc);
aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsGkAtoms::output) {
nsAccessible* accessible = new nsHTMLOutputAccessible(aContent, aDoc);
nsAccessible* accessible = new nsHTMLOutputAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
if (tag == nsGkAtoms::progress) {
nsAccessible* accessible =
new HTMLProgressMeterAccessible(aContent, aDoc);
new HTMLProgressMeterAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
@ -1803,7 +1783,7 @@ NS_GetAccessibilityService(nsIAccessibilityService** aResult)
already_AddRefed<nsAccessible>
nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
nsIContent* aContent,
nsDocAccessible* aDoc)
nsIWeakReference* aWeakShell)
{
if (aFrame->GetType() == nsGkAtoms::boxFrame ||
aFrame->GetType() == nsGkAtoms::scrollFrame) {
@ -1816,12 +1796,13 @@ nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
#ifdef MOZ_XUL
if (parentContent->NodeInfo()->Equals(nsGkAtoms::tabpanels,
kNameSpaceID_XUL)) {
nsAccessible* accessible = new nsXULTabpanelAccessible(aContent, aDoc);
nsAccessible* accessible = new nsXULTabpanelAccessible(aContent,
aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
#endif
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aDoc,
nsAccessible* accessible = new nsEnumRoleAccessible(aContent, aWeakShell,
roles::PROPERTYPAGE);
NS_IF_ADDREF(accessible);
return accessible;
@ -1834,7 +1815,7 @@ nsAccessibilityService::CreateAccessibleForDeckChild(nsIFrame* aFrame,
#ifdef MOZ_XUL
already_AddRefed<nsAccessible>
nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
nsDocAccessible* aDoc)
nsIWeakReference* aWeakShell)
{
nsCOMPtr<nsITreeBoxObject> treeBoxObj = nsCoreUtils::GetTreeBoxObject(aContent);
if (!treeBoxObj)
@ -1850,13 +1831,13 @@ nsAccessibilityService::CreateAccessibleForXULTree(nsIContent* aContent,
// Outline of list accessible.
if (count == 1) {
nsAccessible* accessible = new nsXULTreeAccessible(aContent, aDoc);
nsAccessible* accessible = new nsXULTreeAccessible(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}
// Table or tree table accessible.
nsAccessible* accessible = new nsXULTreeGridAccessibleWrap(aContent, aDoc);
nsAccessible* accessible = new nsXULTreeGridAccessibleWrap(aContent, aWeakShell);
NS_IF_ADDREF(accessible);
return accessible;
}

Просмотреть файл

@ -217,15 +217,17 @@ public:
* Return an accessible for the given DOM node or container accessible if
* the node is not accessible.
*/
nsAccessible* GetAccessibleOrContainer(nsINode* aNode, nsIPresShell* aPresShell);
nsAccessible* GetAccessibleOrContainer(nsINode* aNode,
nsIWeakReference* aWeakShell);
/**
* Return a container accessible for the given DOM node.
*/
inline nsAccessible* GetContainerAccessible(nsINode* aNode, nsIPresShell* aPresShell)
inline nsAccessible* GetContainerAccessible(nsINode* aNode,
nsIWeakReference* aWeakShell)
{
return aNode ?
GetAccessibleOrContainer(aNode->GetNodeParent(), aPresShell) : nsnull;
GetAccessibleOrContainer(aNode->GetNodeParent(), aWeakShell) : nsnull;
}
private:
@ -251,28 +253,28 @@ private:
* interface.
*/
already_AddRefed<nsAccessible>
CreateAccessibleByType(nsIContent* aContent, nsDocAccessible* aDoc);
CreateAccessibleByType(nsIContent* aContent, nsIWeakReference* aWeakShell);
/**
* Create accessible for HTML node by tag name.
*/
already_AddRefed<nsAccessible>
CreateHTMLAccessibleByMarkup(nsIFrame* aFrame, nsIContent* aContent,
nsDocAccessible* aDoc);
nsIWeakReference* aWeakShell);
/**
* Create accessible if parent is a deck frame.
*/
already_AddRefed<nsAccessible>
CreateAccessibleForDeckChild(nsIFrame* aFrame, nsIContent* aContent,
nsDocAccessible* aDoc);
nsIWeakReference* aWeakShell);
#ifdef MOZ_XUL
/**
* Create accessible for XUL tree element.
*/
already_AddRefed<nsAccessible>
CreateAccessibleForXULTree(nsIContent* aContent, nsDocAccessible* aDoc);
CreateAccessibleForXULTree(nsIContent* aContent, nsIWeakReference* aWeakShell);
#endif
/**

Просмотреть файл

@ -190,8 +190,8 @@ nsresult nsAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
return nsAccessNodeWrap::QueryInterface(aIID, aInstancePtr);
}
nsAccessible::nsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessNodeWrap(aContent, aDoc),
nsAccessible::nsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessNodeWrap(aContent, aShell),
mParent(nsnull), mIndexInParent(-1), mFlags(eChildrenUninitialized),
mIndexOfEmbeddedChild(-1), mRoleMapEntry(nsnull)
{
@ -597,7 +597,7 @@ nsAccessible::VisibilityState()
if (!frame)
return vstates;
nsIPresShell* shell(mDoc->PresShell());
const nsCOMPtr<nsIPresShell> shell(GetPresShell());
if (!shell)
return vstates;
@ -764,7 +764,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, presShell);
GetAccService()->GetAccessibleOrContainer(content, mWeakShell);
if (!accessible)
return fallbackAnswer;
@ -951,7 +951,7 @@ nsAccessible::GetBounds(PRInt32* aX, PRInt32* aY,
if (IsDefunct())
return NS_ERROR_FAILURE;
nsIPresShell* presShell = mDoc->PresShell();
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
// This routine will get the entire rectangle for all the frames in this node.
// -------------------------------------------------------------------------
@ -1630,7 +1630,7 @@ nsAccessible::GetValue(nsAString& aValue)
// Check if it's a simple xlink.
if (nsCoreUtils::IsXLink(mContent)) {
nsIPresShell* presShell = mDoc->PresShell();
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
if (presShell) {
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
return presShell->GetLinkLocation(DOMNode, aValue);
@ -2156,7 +2156,7 @@ nsAccessible::DispatchClickEvent(nsIContent *aContent, PRUint32 aActionIndex)
if (IsDefunct())
return;
nsIPresShell* presShell = mDoc->PresShell();
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
// Scroll into view.
presShell->ScrollContentIntoView(aContent, NS_PRESSHELL_SCROLL_ANYWHERE,
@ -2936,10 +2936,7 @@ nsAccessible::ContainerWidget() const
void
nsAccessible::CacheChildren()
{
nsDocAccessible* doc = GetDocAccessible();
NS_ENSURE_TRUE(doc,);
nsAccTreeWalker walker(doc->GetWeakShell(), mContent, GetAllowsAnonChildAccessibles());
nsAccTreeWalker walker(mWeakShell, mContent, GetAllowsAnonChildAccessibles());
nsAccessible* child = nsnull;
while ((child = walker.NextChild()) && AppendChild(child));
@ -3012,7 +3009,8 @@ nsAccessible::GetSiblingAtOffset(PRInt32 aOffset, nsresult* aError) const
nsAccessible *
nsAccessible::GetFirstAvailableAccessible(nsINode *aStartNode) const
{
nsAccessible* accessible = mDoc->GetAccessible(aStartNode);
nsAccessible* accessible =
GetAccService()->GetAccessibleInWeakShell(aStartNode, mWeakShell);
if (accessible)
return accessible;
@ -3034,7 +3032,8 @@ nsAccessible::GetFirstAvailableAccessible(nsINode *aStartNode) const
return nsnull;
nsCOMPtr<nsINode> node(do_QueryInterface(currentNode));
nsAccessible* accessible = mDoc->GetAccessible(node);
nsAccessible* accessible =
GetAccService()->GetAccessibleInWeakShell(node, mWeakShell);
if (accessible)
return accessible;
}

Просмотреть файл

@ -104,7 +104,7 @@ class nsAccessible : public nsAccessNodeWrap,
public nsIAccessibleValue
{
public:
nsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsAccessible();
NS_DECL_ISUPPORTS_INHERITED

Просмотреть файл

@ -59,8 +59,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsLeafAccessible::
nsLeafAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsLeafAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -92,8 +92,8 @@ nsLeafAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsLinkableAccessible::
nsLinkableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc),
nsLinkableAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell),
mActionAcc(nsnull),
mIsLink(false),
mIsOnclick(false)
@ -253,9 +253,9 @@ nsLinkableAccessible::BindToParent(nsAccessible* aParent,
////////////////////////////////////////////////////////////////////////////////
nsEnumRoleAccessible::
nsEnumRoleAccessible(nsIContent* aNode, nsDocAccessible* aDoc,
nsEnumRoleAccessible(nsIContent *aNode, nsIWeakReference *aShell,
roles::Role aRole) :
nsAccessibleWrap(aNode, aDoc), mRole(aRole)
nsAccessibleWrap(aNode, aShell), mRole(aRole)
{
}

Просмотреть файл

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

Просмотреть файл

@ -103,10 +103,9 @@ static const PRUint32 kRelationAttrsLen = NS_ARRAY_LENGTH(kRelationAttrs);
nsDocAccessible::
nsDocAccessible(nsIDocument *aDocument, nsIContent *aRootContent,
nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aRootContent, this),
nsHyperTextAccessibleWrap(aRootContent, aShell),
mDocument(aDocument), mScrollPositionChangedTicks(0),
mLoadState(eTreeConstructionPending), mLoadEventType(0),
mPresShell(nsCOMPtr<nsIPresShell>(do_QueryReferent(aShell)).get())
mLoadState(eTreeConstructionPending), mLoadEventType(0)
{
mFlags |= eDocAccessible;
@ -130,9 +129,9 @@ nsDocAccessible::
nsDocAccessible::~nsDocAccessible()
{
NS_ASSERTION(!mPresShell, "LastRelease was never called!?!");
}
////////////////////////////////////////////////////////////////////////////////
// nsISupports
@ -194,6 +193,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsDocAccessible)
NS_IMPL_ADDREF_INHERITED(nsDocAccessible, nsHyperTextAccessible)
NS_IMPL_RELEASE_INHERITED(nsDocAccessible, nsHyperTextAccessible)
////////////////////////////////////////////////////////////////////////////////
// nsIAccessible
@ -586,7 +586,8 @@ nsDocAccessible::Init()
NS_LOG_ACCDOCCREATE_FOR("document initialize", mDocument, this)
// Initialize notification controller.
mNotificationController = new NotificationController(this, mPresShell);
nsCOMPtr<nsIPresShell> shell(GetPresShell());
mNotificationController = new NotificationController(this, shell);
if (!mNotificationController)
return false;
@ -603,7 +604,7 @@ nsDocAccessible::Init()
void
nsDocAccessible::Shutdown()
{
if (!mPresShell) // already shutdown
if (!mWeakShell) // already shutdown
return;
NS_LOG_ACCDOCDESTROY_FOR("document shutdown", mDocument, this)
@ -636,7 +637,7 @@ nsDocAccessible::Shutdown()
mChildDocuments.Clear();
mPresShell = nsnull; // Avoid reentrancy
mWeakShell = nsnull; // Avoid reentrancy
mDependentIDsHash.Clear();
mNodeToAccessibleMap.Clear();
@ -650,9 +651,11 @@ nsDocAccessible::Shutdown()
nsIFrame*
nsDocAccessible::GetFrame() const
{
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
nsIFrame* root = nsnull;
if (mPresShell)
root = mPresShell->GetRootFrame();
if (shell)
root = shell->GetRootFrame();
return root;
}
@ -710,7 +713,8 @@ nsresult nsDocAccessible::AddEventListeners()
// 1) Set up scroll position listener
// 2) Check for editor and listen for changes to editor
NS_ENSURE_TRUE(mPresShell, NS_ERROR_FAILURE);
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);
nsCOMPtr<nsISupports> container = mDocument->GetContainer();
nsCOMPtr<nsIDocShellTreeItem> docShellTreeItem(do_QueryInterface(container));
@ -738,7 +742,7 @@ nsresult nsDocAccessible::AddEventListeners()
NS_ENSURE_TRUE(rootAccessible, NS_ERROR_FAILURE);
nsRefPtr<nsCaretAccessible> caretAccessible = rootAccessible->GetCaretAccessible();
if (caretAccessible) {
caretAccessible->AddDocSelectionListener(mPresShell);
caretAccessible->AddDocSelectionListener(presShell);
}
}
@ -784,8 +788,11 @@ nsresult nsDocAccessible::RemoveEventListeners()
nsRootAccessible* rootAccessible = RootAccessible();
if (rootAccessible) {
nsRefPtr<nsCaretAccessible> caretAccessible = rootAccessible->GetCaretAccessible();
if (caretAccessible)
caretAccessible->RemoveDocSelectionListener(mPresShell);
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);
}
}
return NS_OK;
@ -815,10 +822,11 @@ void nsDocAccessible::ScrollTimerCallback(nsITimer *aTimer, void *aClosure)
// nsDocAccessible protected member
void nsDocAccessible::AddScrollListener()
{
if (!mPresShell)
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
if (!presShell)
return;
nsIScrollableFrame* sf = mPresShell->GetRootScrollFrameAsScrollableExternal();
nsIScrollableFrame* sf = presShell->GetRootScrollFrameAsScrollableExternal();
if (sf) {
sf->AddScrollPositionListener(this);
NS_LOG_ACCDOCCREATE_TEXT("add scroll listener")
@ -828,10 +836,11 @@ void nsDocAccessible::AddScrollListener()
// nsDocAccessible protected member
void nsDocAccessible::RemoveScrollListener()
{
if (!mPresShell)
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
if (!presShell)
return;
nsIScrollableFrame* sf = mPresShell->GetRootScrollFrameAsScrollableExternal();
nsIScrollableFrame* sf = presShell->GetRootScrollFrameAsScrollableExternal();
if (sf) {
sf->RemoveScrollPositionListener(this);
}
@ -1269,10 +1278,11 @@ nsDocAccessible::HandleAccEvent(AccEvent* aAccEvent)
void*
nsDocAccessible::GetNativeWindow() const
{
if (!mPresShell)
nsCOMPtr<nsIPresShell> shell(do_QueryReferent(mWeakShell));
if (!shell)
return nsnull;
nsIViewManager* vm = mPresShell->GetViewManager();
nsIViewManager* vm = shell->GetViewManager();
if (!vm)
return nsnull;
@ -1459,7 +1469,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(do_GetWeakReference(mPresShell).get(), mDocument->GetRootElement(),
nsAccTreeWalker walker(mWeakShell, mDocument->GetRootElement(),
GetAllowsAnonChildAccessibles());
nsAccessible* child = nsnull;
@ -1815,7 +1825,7 @@ nsDocAccessible::UpdateTree(nsAccessible* aContainer, nsIContent* aChildNode,
updateFlags |= UpdateTreeInternal(child, aIsInsert);
} else {
nsAccTreeWalker walker(do_GetWeakReference(mPresShell).get(), aChildNode,
nsAccTreeWalker walker(mWeakShell, aChildNode,
aContainer->GetAllowsAnonChildAccessibles(), true);
while ((child = walker.NextChild()))

Просмотреть файл

@ -129,17 +129,6 @@ 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.
*/
@ -172,8 +161,7 @@ public:
* Return true if the document has given document state.
*/
bool HasLoadState(LoadState aState) const
{ return (mLoadState & static_cast<PRUint32>(aState)) ==
static_cast<PRUint32>(aState); }
{ return (mLoadState & aState) == aState; }
/**
* Return a native window handler or pointer depending on platform.
@ -380,8 +368,6 @@ public:
protected:
void LastRelease();
// nsAccessible
virtual void CacheChildren();
@ -648,10 +634,6 @@ 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, nsDocAccessible* aDoc) :
nsFormControlAccessible(aContent, aDoc)
nsRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsFormControlAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -50,8 +50,8 @@ template<int Max>
class ProgressMeterAccessible: public nsFormControlAccessible
{
public:
ProgressMeterAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsFormControlAccessible(aContent, aDoc)
ProgressMeterAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
nsFormControlAccessible(aContent, aShell)
{
}
@ -75,7 +75,7 @@ class nsRadioButtonAccessible : public nsFormControlAccessible
{
public:
nsRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);

Просмотреть файл

@ -50,8 +50,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsOuterDocAccessible::
nsOuterDocAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsOuterDocAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -53,7 +53,7 @@
class nsOuterDocAccessible : public nsAccessibleWrap
{
public:
nsOuterDocAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsOuterDocAccessible(nsIContent *aContent, nsIWeakReference *aShell);
NS_DECL_ISUPPORTS_INHERITED

Просмотреть файл

@ -371,13 +371,18 @@ 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, nsnull);
GetAccService()->GetAccessibleOrContainer(origTargetNode, weakShell);
if (!accessible)
return;
@ -563,7 +568,7 @@ void
nsRootAccessible::Shutdown()
{
// Called manually or by nsAccessNode::LastRelease()
if (!PresShell())
if (!mWeakShell)
return; // Already shutdown
nsDocAccessibleWrap::Shutdown();

Просмотреть файл

@ -49,8 +49,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsTextAccessible::
nsTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsLinkableAccessible(aContent, aDoc)
nsTextAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsLinkableAccessible(aContent, aShell)
{
mFlags |= eTextLeafAccessible;
}

Просмотреть файл

@ -47,7 +47,7 @@
class nsTextAccessible : public nsLinkableAccessible
{
public:
nsTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsTextAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();

Просмотреть файл

@ -42,8 +42,8 @@
using namespace mozilla::a11y;
nsHTMLCanvasAccessible::
nsHTMLCanvasAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessible(aContent, aDoc)
nsHTMLCanvasAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
nsHyperTextAccessible(aContent, aShell)
{
}

Просмотреть файл

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

Просмотреть файл

@ -68,8 +68,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLCheckboxAccessible::
nsHTMLCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsFormControlAccessible(aContent, aDoc)
nsHTMLCheckboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsFormControlAccessible(aContent, aShell)
{
}
@ -154,8 +154,8 @@ nsHTMLCheckboxAccessible::IsWidget() const
////////////////////////////////////////////////////////////////////////////////
nsHTMLRadioButtonAccessible::
nsHTMLRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsRadioButtonAccessible(aContent, aDoc)
nsHTMLRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsRadioButtonAccessible(aContent, aShell)
{
}
@ -243,8 +243,8 @@ nsHTMLRadioButtonAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
////////////////////////////////////////////////////////////////////////////////
nsHTMLButtonAccessible::
nsHTMLButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -358,8 +358,8 @@ nsHTMLButtonAccessible::IsWidget() const
////////////////////////////////////////////////////////////////////////////////
nsHTML4ButtonAccessible::
nsHTML4ButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTML4ButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -423,8 +423,8 @@ nsHTML4ButtonAccessible::IsWidget() const
////////////////////////////////////////////////////////////////////////////////
nsHTMLTextFieldAccessible::
nsHTMLTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLTextFieldAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -655,8 +655,8 @@ nsHTMLTextFieldAccessible::ContainerWidget() const
////////////////////////////////////////////////////////////////////////////////
nsHTMLFileInputAccessible::
nsHTMLFileInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLFileInputAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
mFlags |= eHTMLFileInputAccessible;
}
@ -710,8 +710,8 @@ nsHTMLFileInputAccessible::HandleAccEvent(AccEvent* aEvent)
////////////////////////////////////////////////////////////////////////////////
nsHTMLGroupboxAccessible::
nsHTMLGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLGroupboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -770,8 +770,8 @@ nsHTMLGroupboxAccessible::RelationByType(PRUint32 aType)
////////////////////////////////////////////////////////////////////////////////
nsHTMLLegendAccessible::
nsHTMLLegendAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLLegendAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -800,8 +800,8 @@ nsHTMLLegendAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsHTMLFigureAccessible::
nsHTMLFigureAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLFigureAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -870,8 +870,8 @@ nsHTMLFigureAccessible::Caption() const
////////////////////////////////////////////////////////////////////////////////
nsHTMLFigcaptionAccessible::
nsHTMLFigcaptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLFigcaptionAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -56,7 +56,7 @@ class nsHTMLCheckboxAccessible : public nsFormControlAccessible
public:
enum { eAction_Click = 0 };
nsHTMLCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLCheckboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -81,7 +81,7 @@ class nsHTMLRadioButtonAccessible : public nsRadioButtonAccessible
{
public:
nsHTMLRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual PRUint64 NativeState();
@ -100,7 +100,7 @@ class nsHTMLButtonAccessible : public nsHyperTextAccessibleWrap
public:
enum { eAction_Click = 0 };
nsHTMLButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -129,7 +129,7 @@ class nsHTML4ButtonAccessible : public nsHyperTextAccessibleWrap
public:
enum { eAction_Click = 0 };
nsHTML4ButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTML4ButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -156,7 +156,7 @@ class nsHTMLTextFieldAccessible : public nsHyperTextAccessibleWrap
public:
enum { eAction_Click = 0 };
nsHTMLTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLTextFieldAccessible(nsIContent *aContent, nsIWeakReference *aShell);
NS_DECL_ISUPPORTS_INHERITED
@ -190,7 +190,7 @@ public:
class nsHTMLFileInputAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLFileInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLFileInputAccessible(nsIContent* aContent, nsIWeakReference* aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -203,7 +203,7 @@ public:
class nsHTMLGroupboxAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLGroupboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual nsresult GetNameInternal(nsAString& aName);
@ -221,7 +221,7 @@ protected:
class nsHTMLLegendAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLLegendAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLLegendAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -234,7 +234,7 @@ public:
class nsHTMLFigureAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLFigureAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLFigureAccessible(nsIContent* aContent, nsIWeakReference* aShell);
// nsAccessible
virtual nsresult GetAttributesInternal(nsIPersistentProperties* aAttributes);
@ -253,7 +253,7 @@ protected:
class nsHTMLFigcaptionAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLFigcaptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLFigcaptionAccessible(nsIContent* aContent, nsIWeakReference* aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();

Просмотреть файл

@ -60,8 +60,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLImageAccessible::
nsHTMLImageAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsLinkableAccessible(aContent, aDoc)
nsHTMLImageAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsLinkableAccessible(aContent, aShell)
{
}

Просмотреть файл

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

Просмотреть файл

@ -57,9 +57,9 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLImageMapAccessible::
nsHTMLImageMapAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
nsIDOMHTMLMapElement* aMapElm) :
nsHTMLImageAccessibleWrap(aContent, aDoc), mMapElement(aMapElm)
nsHTMLImageMapAccessible(nsIContent *aContent, nsIWeakReference *aShell,
nsIDOMHTMLMapElement *aMapElm) :
nsHTMLImageAccessibleWrap(aContent, aShell), mMapElement(aMapElm)
{
}
@ -130,7 +130,7 @@ nsHTMLImageMapAccessible::CacheChildren()
nsCOMPtr<nsIContent> areaContent(do_QueryInterface(areaNode));
nsRefPtr<nsAccessible> area =
new nsHTMLAreaAccessible(areaContent, mDoc);
new nsHTMLAreaAccessible(areaContent, mWeakShell);
if (!document->BindToDocument(area, nsAccUtils::GetRoleMapEntry(areaContent)) ||
!AppendChild(area)) {
@ -145,8 +145,8 @@ nsHTMLImageMapAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsHTMLAreaAccessible::
nsHTMLAreaAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLLinkAccessible(aContent, aDoc)
nsHTMLAreaAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHTMLLinkAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -51,8 +51,8 @@
class nsHTMLImageMapAccessible : public nsHTMLImageAccessibleWrap
{
public:
nsHTMLImageMapAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
nsIDOMHTMLMapElement* aMapElm);
nsHTMLImageMapAccessible(nsIContent *aContent, nsIWeakReference *aShell,
nsIDOMHTMLMapElement *aMapElm);
// nsISupports and cycle collector
NS_DECL_ISUPPORTS_INHERITED
@ -83,7 +83,7 @@ class nsHTMLAreaAccessible : public nsHTMLLinkAccessible
{
public:
nsHTMLAreaAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLAreaAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible

Просмотреть файл

@ -43,7 +43,6 @@
#include "Role.h"
#include "States.h"
#include "nsDocAccessible.h"
#include "nsEventStates.h"
#include "mozilla/dom/Element.h"
@ -54,8 +53,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLLinkAccessible::
nsHTMLLinkAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLLinkAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -117,7 +116,7 @@ nsHTMLLinkAccessible::GetValue(nsAString& aValue)
if (!aValue.IsEmpty())
return NS_OK;
nsIPresShell* presShell(mDoc->PresShell());
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
return presShell->GetLinkLocation(DOMNode, aValue);
}

Просмотреть файл

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

Просмотреть файл

@ -65,8 +65,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLSelectListAccessible::
nsHTMLSelectListAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsHTMLSelectListAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
mFlags |= eListControlAccessible;
}
@ -179,7 +179,7 @@ nsHTMLSelectListAccessible::CacheChildren()
void
nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
{
nsIPresShell* presShell(mDoc->PresShell());
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
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,
mDoc->GetWeakShell());
mWeakShell);
if (accessible)
AppendChild(accessible);
@ -210,8 +210,8 @@ nsHTMLSelectListAccessible::CacheOptSiblings(nsIContent *aParentContent)
////////////////////////////////////////////////////////////////////////////////
nsHTMLSelectOptionAccessible::
nsHTMLSelectOptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLSelectOptionAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -454,9 +454,9 @@ nsHTMLSelectOptionAccessible::GetSelectState(PRUint64* aState)
////////////////////////////////////////////////////////////////////////////////
nsHTMLSelectOptGroupAccessible::
nsHTMLSelectOptGroupAccessible(nsIContent* aContent,
nsDocAccessible* aDoc) :
nsHTMLSelectOptionAccessible(aContent, aDoc)
nsHTMLSelectOptGroupAccessible(nsIContent *aContent,
nsIWeakReference *aShell) :
nsHTMLSelectOptionAccessible(aContent, aShell)
{
}
@ -511,8 +511,8 @@ nsHTMLSelectOptGroupAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsHTMLComboboxAccessible::
nsHTMLComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsHTMLComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
mFlags |= eComboboxAccessible;
}
@ -552,7 +552,7 @@ nsHTMLComboboxAccessible::CacheChildren()
if (!mListAccessible) {
mListAccessible =
new nsHTMLComboboxListAccessible(mParent, mContent, mDoc);
new nsHTMLComboboxListAccessible(mParent, mContent, mWeakShell);
// Initialize and put into cache.
if (!GetDocAccessible()->BindToDocument(mListAccessible, nsnull))
@ -733,9 +733,9 @@ nsHTMLComboboxAccessible::SelectedOption() const
////////////////////////////////////////////////////////////////////////////////
nsHTMLComboboxListAccessible::
nsHTMLComboboxListAccessible(nsIAccessible* aParent, nsIContent* aContent,
nsDocAccessible* aDoc) :
nsHTMLSelectListAccessible(aContent, aDoc)
nsHTMLComboboxListAccessible(nsIAccessible *aParent, nsIContent *aContent,
nsIWeakReference *aShell) :
nsHTMLSelectListAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -68,7 +68,7 @@ class nsHTMLSelectListAccessible : public nsAccessibleWrap
{
public:
nsHTMLSelectListAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLSelectListAccessible(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsHTMLSelectListAccessible() {}
// nsAccessible
@ -108,7 +108,7 @@ class nsHTMLSelectOptionAccessible : public nsHyperTextAccessibleWrap
public:
enum { eAction_Select = 0 };
nsHTMLSelectOptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLSelectOptionAccessible(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsHTMLSelectOptionAccessible() {}
// nsIAccessible
@ -152,7 +152,7 @@ class nsHTMLSelectOptGroupAccessible : public nsHTMLSelectOptionAccessible
{
public:
nsHTMLSelectOptGroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLSelectOptGroupAccessible(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsHTMLSelectOptGroupAccessible() {}
// nsIAccessible
@ -185,7 +185,7 @@ class nsHTMLComboboxAccessible : public nsAccessibleWrap
public:
enum { eAction_Click = 0 };
nsHTMLComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsHTMLComboboxAccessible() {}
// nsIAccessible
@ -234,9 +234,9 @@ class nsHTMLComboboxListAccessible : public nsHTMLSelectListAccessible
{
public:
nsHTMLComboboxListAccessible(nsIAccessible* aParent,
nsIContent* aContent,
nsDocAccessible* aDoc);
nsHTMLComboboxListAccessible(nsIAccessible *aParent,
nsIContent *aContent,
nsIWeakReference* aShell);
virtual ~nsHTMLComboboxListAccessible() {}
// nsAccessNode

Просмотреть файл

@ -76,8 +76,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLTableCellAccessible::
nsHTMLTableCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLTableCellAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -347,11 +347,9 @@ nsHTMLTableCellAccessible::GetHeaderCells(PRInt32 aRowOrColumnHeaderCell,
else if (aRowOrColumnHeaderCell == nsAccUtils::eColumnHeaderCells)
desiredRole = roles::COLUMNHEADER;
nsIWeakReference* weakShell = mDoc->GetWeakShell();
do {
nsAccessible* headerCell =
GetAccService()->GetAccessibleInWeakShell(headerCellElm, weakShell);
GetAccService()->GetAccessibleInWeakShell(headerCellElm, mWeakShell);
if (headerCell && headerCell->Role() == desiredRole)
headerCells->AppendElement(static_cast<nsIAccessible*>(headerCell),
@ -378,9 +376,9 @@ nsHTMLTableCellAccessible::GetHeaderCells(PRInt32 aRowOrColumnHeaderCell,
////////////////////////////////////////////////////////////////////////////////
nsHTMLTableHeaderCellAccessible::
nsHTMLTableHeaderCellAccessible(nsIContent* aContent,
nsDocAccessible* aDoc) :
nsHTMLTableCellAccessible(aContent, aDoc)
nsHTMLTableHeaderCellAccessible(nsIContent *aContent,
nsIWeakReference *aShell) :
nsHTMLTableCellAccessible(aContent, aShell)
{
}
@ -438,8 +436,8 @@ nsHTMLTableHeaderCellAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsHTMLTableAccessible::
nsHTMLTableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsHTMLTableAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -460,7 +458,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(mDoc->GetWeakShell(), mContent, GetAllowsAnonChildAccessibles());
nsAccTreeWalker walker(mWeakShell, mContent, GetAllowsAnonChildAccessibles());
nsAccessible* child = nsnull;
while ((child = walker.NextChild())) {
@ -706,7 +704,6 @@ nsHTMLTableAccessible::GetSelectedCells(nsIArray **aCells)
rowSpan, colSpan, actualRowSpan, actualColSpan;
bool isSelected = false;
nsIWeakReference* weakShell = mDoc->GetWeakShell();
PRInt32 rowIndex, index;
for (rowIndex = 0, index = 0; rowIndex < rowCount; rowIndex++) {
PRInt32 columnIndex;
@ -722,7 +719,7 @@ nsHTMLTableAccessible::GetSelectedCells(nsIArray **aCells)
startColIndex == columnIndex && isSelected) {
nsCOMPtr<nsIContent> cellContent(do_QueryInterface(cellElement));
nsAccessible *cell =
GetAccService()->GetAccessibleInWeakShell(cellContent, weakShell);
GetAccService()->GetAccessibleInWeakShell(cellContent, mWeakShell);
selCells->AppendElement(static_cast<nsIAccessible*>(cell), false);
}
}
@ -895,8 +892,8 @@ nsHTMLTableAccessible::GetCellAt(PRInt32 aRow, PRInt32 aColumn,
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIContent> cellContent(do_QueryInterface(cellElement));
nsAccessible* cell =
GetAccService()->GetAccessibleInWeakShell(cellContent, mDoc->GetWeakShell());
nsAccessible *cell =
GetAccService()->GetAccessibleInWeakShell(cellContent, mWeakShell);
if (!cell) {
return NS_ERROR_INVALID_ARG;
@ -1197,7 +1194,7 @@ nsHTMLTableAccessible::AddRowOrColumnToSelection(PRInt32 aIndex,
NS_ENSURE_SUCCESS(rv, rv);
nsIPresShell* presShell(mDoc->PresShell());
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
nsRefPtr<nsFrameSelection> tableSelection =
const_cast<nsFrameSelection*>(presShell->ConstFrameSelection());
@ -1229,7 +1226,7 @@ nsHTMLTableAccessible::RemoveRowsOrColumnsFromSelection(PRInt32 aIndex,
nsITableLayout *tableLayout = GetTableLayout();
NS_ENSURE_STATE(tableLayout);
nsIPresShell* presShell(mDoc->PresShell());
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
nsRefPtr<nsFrameSelection> tableSelection =
const_cast<nsFrameSelection*>(presShell->ConstFrameSelection());

Просмотреть файл

@ -52,7 +52,7 @@ class nsHTMLTableCellAccessible : public nsHyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:
nsHTMLTableCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLTableCellAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -95,8 +95,8 @@ protected:
class nsHTMLTableHeaderCellAccessible : public nsHTMLTableCellAccessible
{
public:
nsHTMLTableHeaderCellAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsHTMLTableHeaderCellAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -124,7 +124,7 @@ class nsHTMLTableAccessible : public nsAccessibleWrap,
public nsIAccessibleTable
{
public:
nsHTMLTableAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLTableAccessible(nsIContent *aContent, nsIWeakReference *aShell);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLETABLE
@ -211,9 +211,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsHTMLTableAccessible,
class nsHTMLCaptionAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLCaptionAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc) { }
virtual ~nsHTMLCaptionAccessible() { }
nsHTMLCaptionAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell) { }
// nsIAccessible

Просмотреть файл

@ -61,8 +61,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLTextAccessible::
nsHTMLTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsTextAccessibleWrap(aContent, aDoc)
nsHTMLTextAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsTextAccessibleWrap(aContent, aShell)
{
}
@ -122,8 +122,8 @@ nsHTMLTextAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes
////////////////////////////////////////////////////////////////////////////////
nsHTMLHRAccessible::
nsHTMLHRAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
nsHTMLHRAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsLeafAccessible(aContent, aShell)
{
}
@ -139,8 +139,8 @@ nsHTMLHRAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsHTMLBRAccessible::
nsHTMLBRAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
nsHTMLBRAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsLeafAccessible(aContent, aShell)
{
}
@ -168,8 +168,8 @@ nsHTMLBRAccessible::GetNameInternal(nsAString& aName)
////////////////////////////////////////////////////////////////////////////////
nsHTMLLabelAccessible::
nsHTMLLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLLabelAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -192,8 +192,8 @@ nsHTMLLabelAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsHTMLOutputAccessible::
nsHTMLOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLOutputAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -233,14 +233,14 @@ nsHTMLOutputAccessible::GetAttributesInternal(nsIPersistentProperties* aAttribut
////////////////////////////////////////////////////////////////////////////////
nsHTMLLIAccessible::
nsHTMLLIAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc), mBullet(nsnull)
nsHTMLLIAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
nsHyperTextAccessibleWrap(aContent, aShell), mBullet(nsnull)
{
mFlags |= eHTMLListItemAccessible;
nsBlockFrame* blockFrame = do_QueryFrame(GetFrame());
if (blockFrame && blockFrame->HasBullet()) {
mBullet = new nsHTMLListBulletAccessible(mContent, mDoc);
mBullet = new nsHTMLListBulletAccessible(mContent, mWeakShell);
if (!GetDocAccessible()->BindToDocument(mBullet, nsnull))
mBullet = nsnull;
}
@ -296,7 +296,7 @@ nsHTMLLIAccessible::UpdateBullet(bool aHasBullet)
nsDocAccessible* document = GetDocAccessible();
if (aHasBullet) {
mBullet = new nsHTMLListBulletAccessible(mContent, mDoc);
mBullet = new nsHTMLListBulletAccessible(mContent, mWeakShell);
if (document->BindToDocument(mBullet, nsnull)) {
InsertChildAt(0, mBullet);
}
@ -328,8 +328,8 @@ nsHTMLLIAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsHTMLListBulletAccessible::
nsHTMLListBulletAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
nsHTMLListBulletAccessible(nsIContent* aContent, nsIWeakReference* aShell) :
nsLeafAccessible(aContent, aShell)
{
}
@ -400,8 +400,8 @@ nsHTMLListBulletAccessible::AppendTextTo(nsAString& aText, PRUint32 aStartOffset
////////////////////////////////////////////////////////////////////////////////
nsHTMLListAccessible::
nsHTMLListAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsHTMLListAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -50,7 +50,7 @@
class nsHTMLTextAccessible : public nsTextAccessibleWrap
{
public:
nsHTMLTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLTextAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -70,7 +70,7 @@ public:
class nsHTMLHRAccessible : public nsLeafAccessible
{
public:
nsHTMLHRAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLHRAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -82,7 +82,7 @@ public:
class nsHTMLBRAccessible : public nsLeafAccessible
{
public:
nsHTMLBRAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLBRAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual nsresult GetNameInternal(nsAString& aName);
@ -96,7 +96,7 @@ public:
class nsHTMLLabelAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLLabelAccessible(nsIContent *aContent, nsIWeakReference *aShell);
NS_DECL_ISUPPORTS_INHERITED
@ -111,7 +111,7 @@ public:
class nsHTMLOutputAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLOutputAccessible(nsIContent* aContent, nsIWeakReference* aShell);
NS_DECL_ISUPPORTS_INHERITED
@ -127,7 +127,7 @@ public:
class nsHTMLListBulletAccessible : public nsLeafAccessible
{
public:
nsHTMLListBulletAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLListBulletAccessible(nsIContent* aContent, nsIWeakReference* aShell);
// nsIAccessible
NS_IMETHOD GetName(nsAString& aName);
@ -148,7 +148,7 @@ public:
class nsHTMLListAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLListAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLListAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -164,7 +164,7 @@ public:
class nsHTMLLIAccessible : public nsHyperTextAccessibleWrap
{
public:
nsHTMLLIAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsHTMLLIAccessible(nsIContent* aContent, nsIWeakReference* aShell);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED

Просмотреть файл

@ -41,7 +41,6 @@
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "nsTextAttrs.h"
#include "Role.h"
#include "States.h"
@ -72,8 +71,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHyperTextAccessible::
nsHyperTextAccessible(nsIContent* aNode, nsDocAccessible* aDoc) :
nsAccessibleWrap(aNode, aDoc)
nsHyperTextAccessible(nsIContent *aNode, nsIWeakReference *aShell) :
nsAccessibleWrap(aNode, aShell)
{
mFlags |= eHyperTextAccessible;
}
@ -210,8 +209,7 @@ nsIntRect nsHyperTextAccessible::GetBoundsForString(nsIFrame *aFrame, PRUint32 a
&startContentOffsetInFrame, &frame);
NS_ENSURE_SUCCESS(rv, screenRect);
NS_ENSURE_TRUE(mDoc, screenRect);
nsIPresShell* shell = mDoc->PresShell();
nsCOMPtr<nsIPresShell> shell = GetPresShell();
NS_ENSURE_TRUE(shell, screenRect);
nsPresContext *context = shell->GetPresContext();
@ -884,10 +882,7 @@ nsresult nsHyperTextAccessible::GetTextHelper(EGetTextType aType, nsAccessibleTe
NS_ENSURE_ARG_POINTER(aEndOffset);
*aStartOffset = *aEndOffset = 0;
if (!mDoc)
return NS_ERROR_FAILURE;
nsIPresShell* presShell = mDoc->PresShell();
nsCOMPtr<nsIPresShell> presShell = GetPresShell();
if (!presShell) {
return NS_ERROR_FAILURE;
}
@ -1298,10 +1293,7 @@ nsHyperTextAccessible::GetOffsetAtPoint(PRInt32 aX, PRInt32 aY,
PRUint32 aCoordType, PRInt32 *aOffset)
{
*aOffset = -1;
if (!mDoc)
return NS_ERROR_FAILURE;
nsIPresShell* shell = mDoc->PresShell();
nsCOMPtr<nsIPresShell> shell = GetPresShell();
if (!shell) {
return NS_ERROR_FAILURE;
}
@ -1551,12 +1543,14 @@ nsHyperTextAccessible::GetAssociatedEditor(nsIEditor **aEditor)
if (!editingSession)
return NS_OK; // No editing session interface
NS_ENSURE_TRUE(mDoc, NS_ERROR_FAILURE);
nsIDocument* docNode = mDoc->GetDocumentNode();
NS_ENSURE_TRUE(docNode, NS_ERROR_FAILURE);
nsCOMPtr<nsIPresShell> shell = GetPresShell();
NS_ENSURE_TRUE(shell, NS_ERROR_FAILURE);
nsCOMPtr<nsIDocument> doc = shell->GetDocument();
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
nsCOMPtr<nsIEditor> editor;
return editingSession->GetEditorForWindow(docNode->GetWindow(), aEditor);
return editingSession->GetEditorForWindow(doc->GetWindow(), aEditor);
}
/**
@ -1594,10 +1588,11 @@ nsHyperTextAccessible::SetSelectionRange(PRInt32 aStartPos, PRInt32 aEndPos)
// Now that selection is done, move the focus to the selection.
nsFocusManager* DOMFocusManager = nsFocusManager::GetFocusManager();
if (DOMFocusManager) {
NS_ENSURE_TRUE(mDoc, NS_ERROR_FAILURE);
nsIDocument* docNode = mDoc->GetDocumentNode();
NS_ENSURE_TRUE(docNode, NS_ERROR_FAILURE);
nsCOMPtr<nsPIDOMWindow> window = docNode->GetWindow();
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();
nsCOMPtr<nsIDOMElement> result;
DOMFocusManager->MoveFocus(window, nsnull, nsIFocusManager::MOVEFOCUS_CARET,
nsIFocusManager::FLAG_BYMOVEFOCUS, getter_AddRefs(result));

Просмотреть файл

@ -76,9 +76,7 @@ class nsHyperTextAccessible : public nsAccessibleWrap,
public nsIAccessibleEditableText
{
public:
nsHyperTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
virtual ~nsHyperTextAccessible() { }
nsHyperTextAccessible(nsIContent *aContent, nsIWeakReference *aShell);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIACCESSIBLETEXT
NS_DECL_NSIACCESSIBLEHYPERTEXT

Просмотреть файл

@ -47,12 +47,12 @@
class nsAccessNodeWrap : public nsAccessNode
{
public:
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
virtual ~nsAccessNodeWrap();
public: // construction, destruction
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsAccessNodeWrap();
static void InitAccessibility();
static void ShutdownAccessibility();
static void InitAccessibility();
static void ShutdownAccessibility();
};
#endif

Просмотреть файл

@ -52,8 +52,8 @@
//-----------------------------------------------------
nsAccessNodeWrap::
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessNode(aContent, aDoc)
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessNode(aContent, aShell)
{
}

Просмотреть файл

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

Просмотреть файл

@ -51,8 +51,8 @@
using namespace mozilla::a11y;
nsAccessibleWrap::
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessible(aContent, aDoc), mNativeObject(nil),
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessible(aContent, aShell), mNativeObject(nil),
mNativeInited(false)
{
}

Просмотреть файл

@ -53,8 +53,8 @@ class nsARIAGridAccessibleWrap : public nsARIAGridAccessible,
public CAccessibleTable
{
public:
nsARIAGridAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsARIAGridAccessible(aContent, aDoc) {}
nsARIAGridAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsARIAGridAccessible(aContent, aShell) {}
// IUnknown
DECL_IUNKNOWN_INHERITED
@ -71,8 +71,8 @@ class nsARIAGridCellAccessibleWrap : public nsARIAGridCellAccessible,
public CAccessibleTableCell
{
public:
nsARIAGridCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsARIAGridCellAccessible(aContent, aDoc) {}
nsARIAGridCellAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsARIAGridCellAccessible(aContent, aShell) {}
// IUnknown
DECL_IUNKNOWN_INHERITED

Просмотреть файл

@ -78,8 +78,8 @@ AccTextChangeEvent* nsAccessNodeWrap::gTextEvent = nsnull;
////////////////////////////////////////////////////////////////////////////////
nsAccessNodeWrap::
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessNode(aContent, aDoc)
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessNode(aContent, aShell)
{
}
@ -421,7 +421,8 @@ nsAccessNodeWrap::MakeAccessNode(nsINode *aNode)
nsAccessNodeWrap *newNode = NULL;
ISimpleDOMNode *iNode = NULL;
nsAccessible* acc = mDoc->GetAccessible(aNode);
nsAccessible *acc =
GetAccService()->GetAccessibleInWeakShell(aNode, mWeakShell);
if (acc) {
IAccessible *msaaAccessible = nsnull;
acc->GetNativeInterface((void**)&msaaAccessible); // addrefs
@ -435,7 +436,7 @@ nsAccessNodeWrap::MakeAccessNode(nsINode *aNode)
return NULL;
}
newNode = new nsAccessNodeWrap(content, mDoc);
newNode = new nsAccessNodeWrap(content, mWeakShell);
if (!newNode)
return NULL;

Просмотреть файл

@ -85,7 +85,7 @@ class nsAccessNodeWrap : public nsAccessNode,
STDMETHODIMP QueryService(REFGUID guidService, REFIID riid, void** ppv);
public: // construction, destruction
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsAccessNodeWrap();
// IUnknown

Просмотреть файл

@ -97,8 +97,8 @@ ITypeInfo* nsAccessibleWrap::gTypeInfo = NULL;
// construction
//-----------------------------------------------------
nsAccessibleWrap::
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessible(aContent, aDoc), mEnumVARIANTPosition(0)
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessible(aContent, aShell), mEnumVARIANTPosition(0)
{
}
@ -1550,7 +1550,7 @@ nsAccessibleWrap::FirePlatformEvent(AccEvent* aEvent)
return NS_OK;
// Means we're not active.
NS_ENSURE_TRUE(!IsDefunct(), NS_ERROR_FAILURE);
NS_ENSURE_TRUE(mWeakShell, NS_ERROR_FAILURE);
nsAccessible *accessible = aEvent->GetAccessible();
if (!accessible)
@ -1621,10 +1621,6 @@ 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).
@ -1635,7 +1631,7 @@ nsAccessibleWrap::GetHWNDFor(nsAccessible *aAccessible)
bool isVisible = false;
widget->IsVisible(isVisible);
if (isVisible) {
nsCOMPtr<nsIPresShell> shell(document->PresShell());
nsCOMPtr<nsIPresShell> shell(aAccessible->GetPresShell());
nsIViewManager* vm = shell->GetViewManager();
if (vm) {
nsCOMPtr<nsIWidget> rootWidget;
@ -1650,7 +1646,9 @@ nsAccessibleWrap::GetHWNDFor(nsAccessible *aAccessible)
}
}
return static_cast<HWND>(document->GetNativeWindow());
nsDocAccessible* document = aAccessible->GetDocAccessible();
if (document)
return static_cast<HWND>(document->GetNativeWindow());
}
return nsnull;
}

Просмотреть файл

@ -104,7 +104,7 @@ class nsAccessibleWrap : public nsAccessible,
public IEnumVARIANT
{
public: // construction, destruction
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsAccessibleWrap();
// nsISupports

Просмотреть файл

@ -48,8 +48,8 @@ class nsHTMLImageAccessibleWrap : public nsHTMLImageAccessible,
public CAccessibleImage
{
public:
nsHTMLImageAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLImageAccessible(aContent, aDoc) {}
nsHTMLImageAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsHTMLImageAccessible(aContent, aShell) {}
// IUnknown
DECL_IUNKNOWN_INHERITED

Просмотреть файл

@ -54,8 +54,8 @@ class nsHTMLTableAccessibleWrap : public nsHTMLTableAccessible,
public CAccessibleTable
{
public:
nsHTMLTableAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLTableAccessible(aContent, aDoc) {}
nsHTMLTableAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsHTMLTableAccessible(aContent, aShell) {}
// IUnknown
DECL_IUNKNOWN_INHERITED
@ -73,8 +73,8 @@ class nsHTMLTableCellAccessibleWrap : public nsHTMLTableCellAccessible,
public CAccessibleTableCell
{
public:
nsHTMLTableCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHTMLTableCellAccessible(aContent, aDoc) {}
nsHTMLTableCellAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsHTMLTableCellAccessible(aContent, aShell) {}
// IUnknown
DECL_IUNKNOWN_INHERITED
@ -92,9 +92,9 @@ class nsHTMLTableHeaderCellAccessibleWrap : public nsHTMLTableHeaderCellAccessib
public CAccessibleTableCell
{
public:
nsHTMLTableHeaderCellAccessibleWrap(nsIContent* aContent,
nsDocAccessible* aDoc) :
nsHTMLTableHeaderCellAccessible(aContent, aDoc) {}
nsHTMLTableHeaderCellAccessibleWrap(nsIContent *aContent,
nsIWeakReference *aShell) :
nsHTMLTableHeaderCellAccessible(aContent, aShell) {}
// IUnknown
DECL_IUNKNOWN_INHERITED

Просмотреть файл

@ -48,9 +48,9 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsHTMLWin32ObjectOwnerAccessible::
nsHTMLWin32ObjectOwnerAccessible(nsIContent* aContent,
nsDocAccessible* aDoc, void* aHwnd) :
nsAccessibleWrap(aContent, aDoc), mHwnd(aHwnd)
nsHTMLWin32ObjectOwnerAccessible(nsIContent *aContent,
nsIWeakReference *aShell, void *aHwnd) :
nsAccessibleWrap(aContent, aShell), 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,
nsDocAccessible* aDoc, void* aHwnd);
nsHTMLWin32ObjectOwnerAccessible(nsIContent *aContent,
nsIWeakReference *aShell, void *aHwnd);
virtual ~nsHTMLWin32ObjectOwnerAccessible() {}
// nsAccessNode

Просмотреть файл

@ -51,8 +51,8 @@ class nsHyperTextAccessibleWrap : public nsHyperTextAccessible,
public CAccessibleEditableText
{
public:
nsHyperTextAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessible(aContent, aDoc) {}
nsHyperTextAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessible(aContent, aShell) {}
// IUnknown
DECL_IUNKNOWN_INHERITED

Просмотреть файл

@ -56,8 +56,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsTextAccessibleWrap::
nsTextAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsTextAccessible(aContent, aDoc)
nsTextAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsTextAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -50,7 +50,7 @@ class nsTextAccessibleWrap : public nsTextAccessible,
public ISimpleDOMText
{
public:
nsTextAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsTextAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsTextAccessibleWrap() {}
// IUnknown methods - see iunknown.h for documentation

Просмотреть файл

@ -43,8 +43,8 @@
////////////////////////////////////////////////////////////////////////////////
nsXULListboxAccessibleWrap::
nsXULListboxAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXULListboxAccessible(aContent, aDoc)
nsXULListboxAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsXULListboxAccessible(aContent, aShell)
{
}
@ -62,8 +62,8 @@ IMPL_IUNKNOWN_QUERY_TAIL
////////////////////////////////////////////////////////////////////////////////
nsXULListCellAccessibleWrap::
nsXULListCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXULListCellAccessible(aContent, aDoc)
nsXULListCellAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsXULListCellAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -52,7 +52,7 @@ class nsXULListboxAccessibleWrap : public nsXULListboxAccessible,
public CAccessibleTable
{
public:
nsXULListboxAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULListboxAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
// IUnknown
DECL_IUNKNOWN_INHERITED
@ -69,7 +69,7 @@ class nsXULListCellAccessibleWrap : public nsXULListCellAccessible,
public CAccessibleTableCell
{
public:
nsXULListCellAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULListCellAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
// IUnknown
DECL_IUNKNOWN_INHERITED

Просмотреть файл

@ -43,8 +43,8 @@
////////////////////////////////////////////////////////////////////////////////
nsXULMenuitemAccessibleWrap::
nsXULMenuitemAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXULMenuitemAccessible(aContent, aDoc)
nsXULMenuitemAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsXULMenuitemAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -43,7 +43,7 @@
class nsXULMenuitemAccessibleWrap : public nsXULMenuitemAccessible
{
public:
nsXULMenuitemAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULMenuitemAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsXULMenuitemAccessibleWrap() {}
// nsIAccessible

Просмотреть файл

@ -44,8 +44,8 @@
////////////////////////////////////////////////////////////////////////////////
nsXULTreeGridAccessibleWrap::
nsXULTreeGridAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXULTreeGridAccessible(aContent, aDoc)
nsXULTreeGridAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsXULTreeGridAccessible(aContent, aShell)
{
}
@ -62,13 +62,13 @@ IMPL_IUNKNOWN_INHERITED1(nsXULTreeGridAccessibleWrap,
////////////////////////////////////////////////////////////////////////////////
nsXULTreeGridCellAccessibleWrap::
nsXULTreeGridCellAccessibleWrap(nsIContent* aContent,
nsDocAccessible* aDoc,
nsXULTreeGridRowAccessible* aRowAcc,
nsITreeBoxObject* aTree,
nsITreeView* aTreeView,
nsXULTreeGridCellAccessibleWrap(nsIContent *aContent,
nsIWeakReference *aShell,
nsXULTreeGridRowAccessible *aRowAcc,
nsITreeBoxObject *aTree,
nsITreeView *aTreeView,
PRInt32 aRow, nsITreeColumn* aColumn) :
nsXULTreeGridCellAccessible(aContent, aDoc, aRowAcc, aTree, aTreeView,
nsXULTreeGridCellAccessible(aContent, aShell, aRowAcc, aTree, aTreeView,
aRow, aColumn)
{
}

Просмотреть файл

@ -53,7 +53,7 @@ class nsXULTreeGridAccessibleWrap : public nsXULTreeGridAccessible,
public CAccessibleTable
{
public:
nsXULTreeGridAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTreeGridAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell);
// IUnknown
DECL_IUNKNOWN_INHERITED
@ -70,11 +70,11 @@ class nsXULTreeGridCellAccessibleWrap : public nsXULTreeGridCellAccessible,
public CAccessibleTableCell
{
public:
nsXULTreeGridCellAccessibleWrap(nsIContent* aContent,
nsDocAccessible* aDoc,
nsXULTreeGridRowAccessible* aRowAcc,
nsITreeBoxObject* aTree,
nsITreeView* aTreeView,
nsXULTreeGridCellAccessibleWrap(nsIContent *aContent,
nsIWeakReference *aShell,
nsXULTreeGridRowAccessible *aRowAcc,
nsITreeBoxObject *aTree,
nsITreeView *aTreeView,
PRInt32 aRow, nsITreeColumn* aColumn);
// IUnknown

Просмотреть файл

@ -52,8 +52,8 @@
//-----------------------------------------------------
nsAccessNodeWrap::
nsAccessNodeWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessNode(aContent, aDoc)
nsAccessNodeWrap(nsIContent *aContent, nsIWeakReference* aShell) :
nsAccessNode(aContent, aShell)
{
}

Просмотреть файл

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

Просмотреть файл

@ -42,8 +42,8 @@
// construction
//-----------------------------------------------------
nsAccessibleWrap::
nsAccessibleWrap(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessible(aContent, aDoc)
nsAccessibleWrap(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessible(aContent, aShell)
{
}

Просмотреть файл

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

Просмотреть файл

@ -40,7 +40,6 @@
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "nsTextEquivUtils.h"
#include "Role.h"
#include "States.h"
@ -78,8 +77,8 @@ nsXFormsAccessibleBase::nsXFormsAccessibleBase()
////////////////////////////////////////////////////////////////////////////////
nsXFormsAccessible::
nsXFormsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsXFormsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -124,7 +123,7 @@ nsXFormsAccessible::CacheSelectChildren(nsIDOMNode *aContainerNode)
if (!children)
return;
nsIPresShell* presShell(mDoc->PresShell());
nsCOMPtr<nsIPresShell> presShell(do_QueryReferent(mWeakShell));
PRUint32 length = 0;
children->GetLength(&length);
@ -137,7 +136,7 @@ nsXFormsAccessible::CacheSelectChildren(nsIDOMNode *aContainerNode)
nsCOMPtr<nsIContent> child(do_QueryInterface(DOMChild));
nsAccessible* accessible =
GetAccService()->GetOrCreateAccessible(child, presShell, mDoc->GetWeakShell());
GetAccService()->GetOrCreateAccessible(child, presShell, mWeakShell);
if (!accessible)
continue;
@ -225,8 +224,8 @@ nsXFormsAccessible::GetAllowsAnonChildAccessibles()
////////////////////////////////////////////////////////////////////////////////
nsXFormsContainerAccessible::
nsXFormsContainerAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsContainerAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}
@ -248,8 +247,8 @@ nsXFormsContainerAccessible::GetAllowsAnonChildAccessibles()
////////////////////////////////////////////////////////////////////////////////
nsXFormsEditableAccessible::
nsXFormsEditableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsEditableAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}
@ -298,8 +297,8 @@ nsXFormsEditableAccessible::GetAssociatedEditor(nsIEditor **aEditor)
////////////////////////////////////////////////////////////////////////////////
nsXFormsSelectableAccessible::
nsXFormsSelectableAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsEditableAccessible(aContent, aDoc), mIsSelect1Element(nsnull)
nsXFormsSelectableAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsEditableAccessible(aContent, aShell), mIsSelect1Element(nsnull)
{
mIsSelect1Element =
mContent->NodeInfo()->Equals(nsGkAtoms::select1);
@ -326,12 +325,12 @@ nsXFormsSelectableAccessible::SelectedItems()
nsCOMPtr<nsIDOMNode> itemDOMNode;
rv = sXFormsService->GetSelectedItemForSelect1(DOMNode,
getter_AddRefs(itemDOMNode));
if (NS_FAILED(rv) || !itemDOMNode || !mDoc)
if (NS_FAILED(rv) || !itemDOMNode)
return nsnull;
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemDOMNode));
nsIAccessible* item = GetAccService()->GetAccessibleInWeakShell(itemNode,
mDoc->GetWeakShell());
mWeakShell);
if (item)
selectedItems->AppendElement(item, false);
@ -343,12 +342,11 @@ nsXFormsSelectableAccessible::SelectedItems()
nsCOMPtr<nsIDOMNodeList> itemNodeList;
rv = sXFormsService->GetSelectedItemsForSelect(DOMNode,
getter_AddRefs(itemNodeList));
if (NS_FAILED(rv) || !itemNodeList || !mDoc)
if (NS_FAILED(rv) || !itemNodeList)
return nsnull;
PRUint32 length = 0;
itemNodeList->GetLength(&length);
for (PRUint32 index = 0; index < length; index++) {
nsCOMPtr<nsIDOMNode> itemDOMNode;
itemNodeList->Item(index, getter_AddRefs(itemDOMNode));
@ -356,7 +354,8 @@ nsXFormsSelectableAccessible::SelectedItems()
return nsnull;
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemDOMNode));
nsIAccessible* item = mDoc->GetAccessible(itemNode);
nsIAccessible* item = GetAccService()->GetAccessibleInWeakShell(itemNode,
mWeakShell);
if (item)
selectedItems->AppendElement(item, false);
}
@ -431,9 +430,6 @@ nsXFormsSelectableAccessible::RemoveItemFromSelection(PRUint32 aIndex)
nsAccessible*
nsXFormsSelectableAccessible::GetSelectedItem(PRUint32 aIndex)
{
if (!mDoc)
return nsnull;
nsresult rv;
nsCOMPtr<nsIDOMNode> DOMNode(do_QueryInterface(mContent));
if (mIsSelect1Element) {
@ -445,7 +441,7 @@ nsXFormsSelectableAccessible::GetSelectedItem(PRUint32 aIndex)
getter_AddRefs(itemDOMNode));
if (NS_SUCCEEDED(rv) && itemDOMNode) {
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemDOMNode));
return mDoc->GetAccessible(itemNode);
return GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell);
}
return nsnull;
}
@ -460,7 +456,7 @@ nsXFormsSelectableAccessible::GetSelectedItem(PRUint32 aIndex)
itemNodeList->Item(aIndex, getter_AddRefs(itemDOMNode));
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemDOMNode));
return mDoc->GetAccessible(itemNode);
return GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell);
}
bool
@ -538,9 +534,9 @@ nsXFormsSelectableAccessible::GetItemByIndex(PRUint32* aIndex,
////////////////////////////////////////////////////////////////////////////////
nsXFormsSelectableItemAccessible::
nsXFormsSelectableItemAccessible(nsIContent* aContent,
nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsSelectableItemAccessible(nsIContent *aContent,
nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -70,7 +70,7 @@ class nsXFormsAccessible : public nsHyperTextAccessibleWrap,
public nsXFormsAccessibleBase
{
public:
nsXFormsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
@ -124,7 +124,7 @@ protected:
class nsXFormsContainerAccessible : public nsXFormsAccessible
{
public:
nsXFormsContainerAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsContainerAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -142,7 +142,7 @@ public:
class nsXFormsEditableAccessible : public nsXFormsAccessible
{
public:
nsXFormsEditableAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsEditableAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessibleEditableText
NS_IMETHOD GetAssociatedEditor(nsIEditor **aEditor);
@ -159,7 +159,7 @@ public:
class nsXFormsSelectableAccessible : public nsXFormsEditableAccessible
{
public:
nsXFormsSelectableAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsSelectableAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// SelectAccessible
virtual bool IsSelect();
@ -186,8 +186,8 @@ protected:
class nsXFormsSelectableItemAccessible : public nsXFormsAccessible
{
public:
nsXFormsSelectableItemAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsXFormsSelectableItemAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
NS_IMETHOD GetValue(nsAString& aValue);
NS_IMETHOD DoAction(PRUint8 aIndex);

Просмотреть файл

@ -49,8 +49,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXFormsLabelAccessible::
nsXFormsLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsLabelAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}
@ -81,8 +81,8 @@ nsXFormsLabelAccessible::Description(nsString& aDescription)
////////////////////////////////////////////////////////////////////////////////
nsXFormsOutputAccessible::
nsXFormsOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsOutputAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}
@ -98,8 +98,8 @@ nsXFormsOutputAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsXFormsTriggerAccessible::
nsXFormsTriggerAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsTriggerAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}
@ -148,8 +148,8 @@ nsXFormsTriggerAccessible::DoAction(PRUint8 aIndex)
////////////////////////////////////////////////////////////////////////////////
nsXFormsInputAccessible::
nsXFormsInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsEditableAccessible(aContent, aDoc)
nsXFormsInputAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsEditableAccessible(aContent, aShell)
{
}
@ -193,8 +193,8 @@ nsXFormsInputAccessible::DoAction(PRUint8 aIndex)
////////////////////////////////////////////////////////////////////////////////
nsXFormsInputBooleanAccessible::
nsXFormsInputBooleanAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsInputBooleanAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}
@ -261,8 +261,8 @@ nsXFormsInputBooleanAccessible::DoAction(PRUint8 aIndex)
////////////////////////////////////////////////////////////////////////////////
nsXFormsInputDateAccessible::
nsXFormsInputDateAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsContainerAccessible(aContent, aDoc)
nsXFormsInputDateAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsContainerAccessible(aContent, aShell)
{
}
@ -278,8 +278,8 @@ nsXFormsInputDateAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsXFormsSecretAccessible::
nsXFormsSecretAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsInputAccessible(aContent, aDoc)
nsXFormsSecretAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsInputAccessible(aContent, aShell)
{
}
@ -307,8 +307,8 @@ nsXFormsSecretAccessible::GetValue(nsAString& aValue)
////////////////////////////////////////////////////////////////////////////////
nsXFormsRangeAccessible::
nsXFormsRangeAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsRangeAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}
@ -400,8 +400,8 @@ nsXFormsRangeAccessible::GetCurrentValue(double *aCurrentValue)
////////////////////////////////////////////////////////////////////////////////
nsXFormsSelectAccessible::
nsXFormsSelectAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsContainerAccessible(aContent, aDoc)
nsXFormsSelectAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsContainerAccessible(aContent, aShell)
{
}
@ -427,8 +427,8 @@ nsXFormsSelectAccessible::NativeState()
////////////////////////////////////////////////////////////////////////////////
nsXFormsChoicesAccessible::
nsXFormsChoicesAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsChoicesAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}
@ -457,8 +457,8 @@ nsXFormsChoicesAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsXFormsSelectFullAccessible::
nsXFormsSelectFullAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsSelectableAccessible(aContent, aDoc)
nsXFormsSelectFullAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsSelectableAccessible(aContent, aShell)
{
}
@ -480,8 +480,8 @@ nsXFormsSelectFullAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsXFormsItemCheckgroupAccessible::
nsXFormsItemCheckgroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsSelectableItemAccessible(aContent, aDoc)
nsXFormsItemCheckgroupAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsSelectableItemAccessible(aContent, aShell)
{
}
@ -522,8 +522,8 @@ nsXFormsItemCheckgroupAccessible::GetActionName(PRUint8 aIndex, nsAString& aName
////////////////////////////////////////////////////////////////////////////////
nsXFormsItemRadiogroupAccessible::
nsXFormsItemRadiogroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsSelectableItemAccessible(aContent, aDoc)
nsXFormsItemRadiogroupAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsSelectableItemAccessible(aContent, aShell)
{
}
@ -560,8 +560,8 @@ nsXFormsItemRadiogroupAccessible::GetActionName(PRUint8 aIndex, nsAString& aName
////////////////////////////////////////////////////////////////////////////////
nsXFormsSelectComboboxAccessible::
nsXFormsSelectComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsSelectableAccessible(aContent, aDoc)
nsXFormsSelectComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsSelectableAccessible(aContent, aShell)
{
}
@ -601,8 +601,8 @@ nsXFormsSelectComboboxAccessible::GetAllowsAnonChildAccessibles()
////////////////////////////////////////////////////////////////////////////////
nsXFormsItemComboboxAccessible::
nsXFormsItemComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXFormsSelectableItemAccessible(aContent, aDoc)
nsXFormsItemComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXFormsSelectableItemAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -48,7 +48,7 @@
class nsXFormsLabelAccessible : public nsXFormsAccessible
{
public:
nsXFormsLabelAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsLabelAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual void Description(nsString& aDescription);
@ -63,7 +63,7 @@ public:
class nsXFormsOutputAccessible : public nsXFormsAccessible
{
public:
nsXFormsOutputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsOutputAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -76,7 +76,7 @@ public:
class nsXFormsTriggerAccessible : public nsXFormsAccessible
{
public:
nsXFormsTriggerAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsTriggerAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetValue(nsAString& aValue);
@ -98,7 +98,7 @@ public:
class nsXFormsInputAccessible : public nsXFormsEditableAccessible
{
public:
nsXFormsInputAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsInputAccessible(nsIContent *aContent, nsIWeakReference *aShell);
NS_DECL_ISUPPORTS_INHERITED
@ -120,7 +120,7 @@ public:
class nsXFormsInputBooleanAccessible : public nsXFormsAccessible
{
public:
nsXFormsInputBooleanAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsInputBooleanAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -141,7 +141,7 @@ public:
class nsXFormsInputDateAccessible : public nsXFormsContainerAccessible
{
public:
nsXFormsInputDateAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsInputDateAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -154,7 +154,7 @@ public:
class nsXFormsSecretAccessible : public nsXFormsInputAccessible
{
public:
nsXFormsSecretAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsSecretAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetValue(nsAString& aValue);
@ -172,7 +172,7 @@ public:
class nsXFormsRangeAccessible : public nsXFormsAccessible
{
public:
nsXFormsRangeAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsRangeAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessibleValue
NS_IMETHOD GetMaximumValue(double *aMaximumValue);
@ -194,7 +194,7 @@ public:
class nsXFormsSelectAccessible : public nsXFormsContainerAccessible
{
public:
nsXFormsSelectAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsSelectAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual PRUint64 NativeState();
@ -208,7 +208,7 @@ public:
class nsXFormsChoicesAccessible : public nsXFormsAccessible
{
public:
nsXFormsChoicesAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsChoicesAccessible(nsIContent* aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetValue(nsAString& aValue);
@ -230,7 +230,7 @@ protected:
class nsXFormsSelectFullAccessible : public nsXFormsSelectableAccessible
{
public:
nsXFormsSelectFullAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXFormsSelectFullAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -250,8 +250,8 @@ protected:
class nsXFormsItemCheckgroupAccessible : public nsXFormsSelectableItemAccessible
{
public:
nsXFormsItemCheckgroupAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsXFormsItemCheckgroupAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -271,8 +271,8 @@ public:
class nsXFormsItemRadiogroupAccessible : public nsXFormsSelectableItemAccessible
{
public:
nsXFormsItemRadiogroupAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsXFormsItemRadiogroupAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -291,8 +291,8 @@ public:
class nsXFormsSelectComboboxAccessible : public nsXFormsSelectableAccessible
{
public:
nsXFormsSelectComboboxAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsXFormsSelectComboboxAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -310,8 +310,8 @@ public:
class nsXFormsItemComboboxAccessible : public nsXFormsSelectableItemAccessible
{
public:
nsXFormsItemComboboxAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsXFormsItemComboboxAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);

Просмотреть файл

@ -48,9 +48,9 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXFormsDropmarkerWidgetAccessible::
nsXFormsDropmarkerWidgetAccessible(nsIContent* aContent,
nsDocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
nsXFormsDropmarkerWidgetAccessible(nsIContent *aContent,
nsIWeakReference *aShell) :
nsLeafAccessible(aContent, aShell)
{
}
@ -113,8 +113,8 @@ nsXFormsDropmarkerWidgetAccessible::DoAction(PRUint8 aIndex)
////////////////////////////////////////////////////////////////////////////////
nsXFormsCalendarWidgetAccessible::
nsXFormsCalendarWidgetAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXFormsCalendarWidgetAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -130,9 +130,9 @@ nsXFormsCalendarWidgetAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsXFormsComboboxPopupWidgetAccessible::
nsXFormsComboboxPopupWidgetAccessible(nsIContent* aContent,
nsDocAccessible* aDoc) :
nsXFormsAccessible(aContent, aDoc)
nsXFormsComboboxPopupWidgetAccessible(nsIContent *aContent,
nsIWeakReference *aShell) :
nsXFormsAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -51,8 +51,8 @@ class nsXFormsDropmarkerWidgetAccessible : public nsLeafAccessible,
public nsXFormsAccessibleBase
{
public:
nsXFormsDropmarkerWidgetAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsXFormsDropmarkerWidgetAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -73,8 +73,8 @@ public:
class nsXFormsCalendarWidgetAccessible : public nsAccessibleWrap
{
public:
nsXFormsCalendarWidgetAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsXFormsCalendarWidgetAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -88,8 +88,8 @@ public:
class nsXFormsComboboxPopupWidgetAccessible : public nsXFormsAccessible
{
public:
nsXFormsComboboxPopupWidgetAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsXFormsComboboxPopupWidgetAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetValue(nsAString& aValue);

Просмотреть файл

@ -61,8 +61,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
XULSelectControlAccessible::
XULSelectControlAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
XULSelectControlAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
mSelectControl = do_QueryInterface(aContent);
}
@ -92,7 +92,7 @@ XULSelectControlAccessible::SelectedItems()
{
nsCOMPtr<nsIMutableArray> selectedItems =
do_CreateInstance(NS_ARRAY_CONTRACTID);
if (!selectedItems || !mDoc)
if (!selectedItems)
return nsnull;
// For XUL multi-select control
@ -105,7 +105,8 @@ XULSelectControlAccessible::SelectedItems()
nsCOMPtr<nsIDOMXULSelectControlItemElement> itemElm;
xulMultiSelect->GetSelectedItem(index, getter_AddRefs(itemElm));
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemElm));
nsAccessible* item = mDoc->GetAccessible(itemNode);
nsAccessible* item =
GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell);
if (item)
selectedItems->AppendElement(static_cast<nsIAccessible*>(item),
false);
@ -115,12 +116,13 @@ XULSelectControlAccessible::SelectedItems()
mSelectControl->GetSelectedItem(getter_AddRefs(itemElm));
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemElm));
if(itemNode) {
nsAccessible* item = mDoc->GetAccessible(itemNode);
nsAccessible* item =
GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell);
if (item)
selectedItems->AppendElement(static_cast<nsIAccessible*>(item),
false);
}
}
}
nsIMutableArray* items = nsnull;
selectedItems.forget(&items);
@ -140,8 +142,8 @@ XULSelectControlAccessible::GetSelectedItem(PRUint32 aIndex)
mSelectControl->GetSelectedItem(getter_AddRefs(itemElm));
nsCOMPtr<nsINode> itemNode(do_QueryInterface(itemElm));
return itemNode && mDoc ?
GetAccService()->GetAccessibleInWeakShell(itemNode, mDoc->GetWeakShell()) : nsnull;
return itemNode ?
GetAccService()->GetAccessibleInWeakShell(itemNode, mWeakShell) : nsnull;
}
PRUint32

Просмотреть файл

@ -49,7 +49,7 @@
class XULSelectControlAccessible : public nsAccessibleWrap
{
public:
XULSelectControlAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
XULSelectControlAccessible(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~XULSelectControlAccessible() {}
// nsAccessNode

Просмотреть файл

@ -47,8 +47,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULAlertAccessible::
nsXULAlertAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULAlertAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -47,7 +47,7 @@
class nsXULAlertAccessible : public nsAccessibleWrap
{
public:
nsXULAlertAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULAlertAccessible(nsIContent *aContent, nsIWeakReference *aShell);
NS_DECL_ISUPPORTS_INHERITED

Просмотреть файл

@ -55,8 +55,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULColorPickerTileAccessible::
nsXULColorPickerTileAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULColorPickerTileAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -117,8 +117,8 @@ nsXULColorPickerTileAccessible::ContainerWidget() const
////////////////////////////////////////////////////////////////////////////////
nsXULColorPickerAccessible::
nsXULColorPickerAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXULColorPickerTileAccessible(aContent, aDoc)
nsXULColorPickerAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXULColorPickerTileAccessible(aContent, aShell)
{
mFlags |= eMenuButtonAccessible;
}
@ -177,9 +177,7 @@ nsXULColorPickerAccessible::AreItemsOperable() const
void
nsXULColorPickerAccessible::CacheChildren()
{
NS_ENSURE_TRUE(mDoc,);
nsAccTreeWalker walker(mDoc->GetWeakShell(), mContent, true);
nsAccTreeWalker walker(mWeakShell, mContent, true);
nsAccessible* child = nsnull;
while ((child = walker.NextChild())) {

Просмотреть файл

@ -47,8 +47,8 @@
class nsXULColorPickerTileAccessible : public nsAccessibleWrap
{
public:
nsXULColorPickerTileAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsXULColorPickerTileAccessible(nsIContent *aContent,
nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetValue(nsAString& _retval);
@ -68,7 +68,7 @@ public:
class nsXULColorPickerAccessible : public nsXULColorPickerTileAccessible
{
public:
nsXULColorPickerAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULColorPickerAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();

Просмотреть файл

@ -41,7 +41,6 @@
#include "nsXULComboboxAccessible.h"
#include "nsAccessibilityService.h"
#include "nsDocAccessible.h"
#include "nsCoreUtils.h"
#include "Role.h"
#include "States.h"
@ -57,8 +56,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULComboboxAccessible::
nsXULComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
if (mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::autocomplete, eIgnoreCase))
@ -132,8 +131,9 @@ nsXULComboboxAccessible::Description(nsString& aDescription)
menuListElm->GetSelectedItem(getter_AddRefs(focusedOptionItem));
nsCOMPtr<nsIContent> focusedOptionContent =
do_QueryInterface(focusedOptionItem);
if (focusedOptionContent && mDoc) {
nsAccessible* focusedOptionAcc = mDoc->GetAccessible(focusedOptionContent);
if (focusedOptionContent) {
nsAccessible* focusedOptionAcc = GetAccService()->
GetAccessibleInWeakShell(focusedOptionContent, mWeakShell);
if (focusedOptionAcc)
focusedOptionAcc->Description(aDescription);
}

Просмотреть файл

@ -50,7 +50,7 @@ class nsXULComboboxAccessible : public nsAccessibleWrap
public:
enum { eAction_Click = 0 };
nsXULComboboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULComboboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetValue(nsAString& aValue);

Просмотреть файл

@ -71,8 +71,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULButtonAccessible::
nsXULButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
if (ContainsMenu())
mFlags |= eMenuButtonAccessible;
@ -226,14 +226,13 @@ 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(mDoc->GetWeakShell(), mContent, true);
nsAccTreeWalker walker(mWeakShell, mContent, true);
nsAccessible* child = nsnull;
while ((child = walker.NextChild())) {
@ -282,8 +281,8 @@ nsXULButtonAccessible::ContainsMenu()
////////////////////////////////////////////////////////////////////////////////
nsXULDropmarkerAccessible::
nsXULDropmarkerAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsFormControlAccessible(aContent, aDoc)
nsXULDropmarkerAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsFormControlAccessible(aContent, aShell)
{
}
@ -363,8 +362,8 @@ nsXULDropmarkerAccessible::NativeState()
////////////////////////////////////////////////////////////////////////////////
nsXULCheckboxAccessible::
nsXULCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsFormControlAccessible(aContent, aDoc)
nsXULCheckboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsFormControlAccessible(aContent, aShell)
{
}
@ -443,8 +442,8 @@ nsXULCheckboxAccessible::NativeState()
////////////////////////////////////////////////////////////////////////////////
nsXULGroupboxAccessible::
nsXULGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULGroupboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -500,8 +499,8 @@ nsXULGroupboxAccessible::RelationByType(PRUint32 aType)
////////////////////////////////////////////////////////////////////////////////
nsXULRadioButtonAccessible::
nsXULRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsRadioButtonAccessible(aContent, aDoc)
nsXULRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsRadioButtonAccessible(aContent, aShell)
{
}
@ -559,8 +558,8 @@ nsXULRadioButtonAccessible::ContainerWidget() const
*/
nsXULRadioGroupAccessible::
nsXULRadioGroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
XULSelectControlAccessible(aContent, aDoc)
nsXULRadioGroupAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
XULSelectControlAccessible(aContent, aShell)
{
}
@ -606,8 +605,8 @@ nsXULRadioGroupAccessible::AreItemsOperable() const
////////////////////////////////////////////////////////////////////////////////
nsXULStatusBarAccessible::
nsXULStatusBarAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULStatusBarAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -623,8 +622,8 @@ nsXULStatusBarAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsXULToolbarButtonAccessible::
nsXULToolbarButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXULButtonAccessible(aContent, aDoc)
nsXULToolbarButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXULButtonAccessible(aContent, aShell)
{
}
@ -681,8 +680,8 @@ nsXULToolbarButtonAccessible::IsSeparator(nsAccessible *aAccessible)
////////////////////////////////////////////////////////////////////////////////
nsXULToolbarAccessible::
nsXULToolbarAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULToolbarAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -710,9 +709,9 @@ nsXULToolbarAccessible::GetNameInternal(nsAString& aName)
////////////////////////////////////////////////////////////////////////////////
nsXULToolbarSeparatorAccessible::
nsXULToolbarSeparatorAccessible(nsIContent* aContent,
nsDocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
nsXULToolbarSeparatorAccessible(nsIContent *aContent,
nsIWeakReference *aShell) :
nsLeafAccessible(aContent, aShell)
{
}
@ -733,8 +732,8 @@ nsXULToolbarSeparatorAccessible::NativeState()
////////////////////////////////////////////////////////////////////////////////
nsXULTextFieldAccessible::
nsXULTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsXULTextFieldAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -784,7 +783,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, mDoc);
new nsHTMLTextFieldAccessible(inputField, mWeakShell);
if (!tempAccessible)
return state;
@ -873,14 +872,13 @@ 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(mDoc->GetWeakShell(), inputContent, false);
nsAccTreeWalker walker(mWeakShell, 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, nsDocAccessible* aDoc);
nsXULButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -100,7 +100,7 @@ class nsXULCheckboxAccessible : public nsFormControlAccessible
{
public:
enum { eAction_Click = 0 };
nsXULCheckboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULCheckboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -121,7 +121,7 @@ class nsXULDropmarkerAccessible : public nsFormControlAccessible
{
public:
enum { eAction_Click = 0 };
nsXULDropmarkerAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULDropmarkerAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -144,7 +144,7 @@ private:
class nsXULGroupboxAccessible : public nsAccessibleWrap
{
public:
nsXULGroupboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULGroupboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -159,7 +159,7 @@ class nsXULRadioButtonAccessible : public nsRadioButtonAccessible
{
public:
nsXULRadioButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULRadioButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual void GetPositionAndSizeInternal(PRInt32 *aPosInSet,
@ -176,7 +176,7 @@ public:
class nsXULRadioGroupAccessible : public XULSelectControlAccessible
{
public:
nsXULRadioGroupAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULRadioGroupAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -194,7 +194,7 @@ public:
class nsXULStatusBarAccessible : public nsAccessibleWrap
{
public:
nsXULStatusBarAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULStatusBarAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -206,7 +206,7 @@ public:
class nsXULToolbarButtonAccessible : public nsXULButtonAccessible
{
public:
nsXULToolbarButtonAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULToolbarButtonAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual void GetPositionAndSizeInternal(PRInt32 *aPosInSet,
@ -222,7 +222,7 @@ public:
class nsXULToolbarAccessible : public nsAccessibleWrap
{
public:
nsXULToolbarAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULToolbarAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -236,7 +236,7 @@ class nsXULToolbarSeparatorAccessible : public nsLeafAccessible
{
public:
nsXULToolbarSeparatorAccessible(nsIContent* aContent,
nsDocAccessible* aDoc);
nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -251,7 +251,7 @@ class nsXULTextFieldAccessible : public nsHyperTextAccessibleWrap
public:
enum { eAction_Click = 0 };
nsXULTextFieldAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTextFieldAccessible(nsIContent* aContent, nsIWeakReference *aShell);
NS_DECL_ISUPPORTS_INHERITED

Просмотреть файл

@ -42,7 +42,6 @@
#include "nsAccessibilityService.h"
#include "nsAccUtils.h"
#include "nsDocAccessible.h"
#include "Role.h"
#include "States.h"
@ -62,8 +61,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULColumnsAccessible::
nsXULColumnsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULColumnsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -85,8 +84,8 @@ nsXULColumnsAccessible::NativeState()
////////////////////////////////////////////////////////////////////////////////
nsXULColumnItemAccessible::
nsXULColumnItemAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
nsXULColumnItemAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsLeafAccessible(aContent, aShell)
{
}
@ -133,8 +132,8 @@ nsXULColumnItemAccessible::DoAction(PRUint8 aIndex)
////////////////////////////////////////////////////////////////////////////////
nsXULListboxAccessible::
nsXULListboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
XULSelectControlAccessible(aContent, aDoc)
nsXULListboxAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
XULSelectControlAccessible(aContent, aShell)
{
nsIContent* parentContent = mContent->GetParent();
if (parentContent) {
@ -317,8 +316,9 @@ nsXULListboxAccessible::GetCellAt(PRInt32 aRow, PRInt32 aColumn,
NS_ENSURE_TRUE(item, NS_ERROR_INVALID_ARG);
nsCOMPtr<nsIContent> itemContent(do_QueryInterface(item));
NS_ENSURE_TRUE(mDoc, NS_ERROR_FAILURE);
nsAccessible *row = mDoc->GetAccessible(itemContent);
nsAccessible *row =
GetAccService()->GetAccessibleInWeakShell(itemContent, mWeakShell);
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 = mDoc->GetAccessible(itemContent);
nsAccessible *item =
GetAccService()->GetAccessibleInWeakShell(itemContent, mWeakShell);
if (item) {
PRInt32 cellCount = item->GetChildCount();
@ -900,8 +900,8 @@ nsXULListboxAccessible::ContainerWidget() const
////////////////////////////////////////////////////////////////////////////////
nsXULListitemAccessible::
nsXULListitemAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXULMenuitemAccessible(aContent, aDoc)
nsXULListitemAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXULMenuitemAccessible(aContent, aShell)
{
mIsCheckbox = mContent->AttrValueIs(kNameSpaceID_None,
nsGkAtoms::type,
@ -929,7 +929,7 @@ nsXULListitemAccessible::GetListAccessible()
if (!listContent)
return nsnull;
return mDoc->GetAccessible(listContent);
return GetAccService()->GetAccessibleInWeakShell(listContent, mWeakShell);
}
////////////////////////////////////////////////////////////////////////////////
@ -1053,8 +1053,8 @@ nsXULListitemAccessible::ContainerWidget() const
////////////////////////////////////////////////////////////////////////////////
nsXULListCellAccessible::
nsXULListCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsXULListCellAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -56,7 +56,7 @@ class nsIWeakReference;
class nsXULColumnsAccessible : public nsAccessibleWrap
{
public:
nsXULColumnsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULColumnsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -70,7 +70,7 @@ public:
class nsXULColumnItemAccessible : public nsLeafAccessible
{
public:
nsXULColumnItemAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULColumnItemAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -93,7 +93,7 @@ class nsXULListboxAccessible : public XULSelectControlAccessible,
public nsIAccessibleTable
{
public:
nsXULListboxAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULListboxAccessible(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsXULListboxAccessible() {}
NS_DECL_ISUPPORTS_INHERITED
@ -127,7 +127,7 @@ public:
NS_DECL_ISUPPORTS_INHERITED
nsXULListitemAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULListitemAccessible(nsIContent *aContent, nsIWeakReference *aShell);
virtual ~nsXULListitemAccessible() {}
// nsIAccessible
@ -163,7 +163,7 @@ class nsXULListCellAccessible : public nsHyperTextAccessibleWrap,
public nsIAccessibleTableCell
{
public:
nsXULListCellAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULListCellAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED

Просмотреть файл

@ -71,8 +71,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULMenuitemAccessible::
nsXULMenuitemAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULMenuitemAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -408,8 +408,8 @@ nsXULMenuitemAccessible::ContainerWidget() const
////////////////////////////////////////////////////////////////////////////////
nsXULMenuSeparatorAccessible::
nsXULMenuSeparatorAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXULMenuitemAccessible(aContent, aDoc)
nsXULMenuSeparatorAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXULMenuitemAccessible(aContent, aShell)
{
}
@ -454,8 +454,8 @@ nsXULMenuSeparatorAccessible::ActionCount()
////////////////////////////////////////////////////////////////////////////////
nsXULMenupopupAccessible::
nsXULMenupopupAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
XULSelectControlAccessible(aContent, aDoc)
nsXULMenupopupAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
XULSelectControlAccessible(aContent, aShell)
{
nsMenuPopupFrame* menuPopupFrame = do_QueryFrame(GetFrame());
if (menuPopupFrame && menuPopupFrame->IsMenu())
@ -594,8 +594,8 @@ nsXULMenupopupAccessible::ContainerWidget() const
////////////////////////////////////////////////////////////////////////////////
nsXULMenubarAccessible::
nsXULMenubarAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULMenubarAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -51,7 +51,7 @@ class nsXULMenuitemAccessible : public nsAccessibleWrap
public:
enum { eAction_Click = 0 };
nsXULMenuitemAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULMenuitemAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD DoAction(PRUint8 index);
@ -85,7 +85,7 @@ public:
class nsXULMenuSeparatorAccessible : public nsXULMenuitemAccessible
{
public:
nsXULMenuSeparatorAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULMenuSeparatorAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD DoAction(PRUint8 index);
@ -107,7 +107,7 @@ public:
class nsXULMenupopupAccessible : public XULSelectControlAccessible
{
public:
nsXULMenupopupAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULMenupopupAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual nsresult GetNameInternal(nsAString& aName);
@ -128,7 +128,7 @@ public:
class nsXULMenubarAccessible : public nsAccessibleWrap
{
public:
nsXULMenubarAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULMenubarAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual nsresult GetNameInternal(nsAString& aName);

Просмотреть файл

@ -53,8 +53,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULSliderAccessible::
nsXULSliderAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULSliderAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -289,8 +289,8 @@ nsXULSliderAccessible::SetSliderAttr(nsIAtom *aName, double aValue)
////////////////////////////////////////////////////////////////////////////////
nsXULThumbAccessible::
nsXULThumbAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULThumbAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -49,7 +49,7 @@
class nsXULSliderAccessible : public nsAccessibleWrap
{
public:
nsXULSliderAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULSliderAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
@ -90,7 +90,7 @@ private:
class nsXULThumbAccessible : public nsAccessibleWrap
{
public:
nsXULThumbAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULThumbAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();

Просмотреть файл

@ -59,8 +59,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULTabAccessible::
nsXULTabAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULTabAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -178,8 +178,8 @@ nsXULTabAccessible::GetPositionAndSizeInternal(PRInt32 *aPosInSet,
////////////////////////////////////////////////////////////////////////////////
nsXULTabsAccessible::
nsXULTabsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
XULSelectControlAccessible(aContent, aDoc)
nsXULTabsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
XULSelectControlAccessible(aContent, aShell)
{
}
@ -214,8 +214,8 @@ nsXULTabsAccessible::GetNameInternal(nsAString& aName)
////////////////////////////////////////////////////////////////////////////////
nsXULTabpanelsAccessible::
nsXULTabpanelsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULTabpanelsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}
@ -231,8 +231,8 @@ nsXULTabpanelsAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsXULTabpanelAccessible::
nsXULTabpanelAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULTabpanelAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -52,7 +52,7 @@ class nsXULTabAccessible : public nsAccessibleWrap
public:
enum { eAction_Switch = 0 };
nsXULTabAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTabAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetActionName(PRUint8 aIndex, nsAString& aName);
@ -76,7 +76,7 @@ public:
class nsXULTabsAccessible : public XULSelectControlAccessible
{
public:
nsXULTabsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTabsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsIAccessible
NS_IMETHOD GetValue(nsAString& _retval);
@ -96,7 +96,7 @@ public:
class nsXULTabpanelsAccessible : public nsAccessibleWrap
{
public:
nsXULTabpanelsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTabpanelsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -116,7 +116,7 @@ public:
class nsXULTabpanelAccessible : public nsAccessibleWrap
{
public:
nsXULTabpanelAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTabpanelAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();

Просмотреть файл

@ -61,8 +61,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULTextAccessible::
nsXULTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsXULTextAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}
@ -112,8 +112,8 @@ nsXULTextAccessible::RelationByType(PRUint32 aType)
////////////////////////////////////////////////////////////////////////////////
nsXULTooltipAccessible::
nsXULTooltipAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsLeafAccessible(aContent, aDoc)
nsXULTooltipAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsLeafAccessible(aContent, aShell)
{
}
@ -139,8 +139,8 @@ nsXULTooltipAccessible::NativeRole()
////////////////////////////////////////////////////////////////////////////////
nsXULLinkAccessible::
nsXULLinkAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsHyperTextAccessibleWrap(aContent, aDoc)
nsXULLinkAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsHyperTextAccessibleWrap(aContent, aShell)
{
}

Просмотреть файл

@ -49,7 +49,7 @@
class nsXULTextAccessible : public nsHyperTextAccessibleWrap
{
public:
nsXULTextAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTextAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual nsresult GetNameInternal(nsAString& aName);
@ -65,7 +65,7 @@ class nsXULTooltipAccessible : public nsLeafAccessible
{
public:
nsXULTooltipAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTooltipAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsAccessible
virtual mozilla::a11y::role NativeRole();
@ -76,7 +76,7 @@ class nsXULLinkAccessible : public nsHyperTextAccessibleWrap
{
public:
nsXULLinkAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULLinkAccessible(nsIContent *aContent, nsIWeakReference *aShell);
NS_DECL_ISUPPORTS_INHERITED

Просмотреть файл

@ -65,8 +65,8 @@ using namespace mozilla::a11y;
////////////////////////////////////////////////////////////////////////////////
nsXULTreeAccessible::
nsXULTreeAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsAccessibleWrap(aContent, aDoc)
nsXULTreeAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsAccessibleWrap(aContent, aShell)
{
mTree = nsCoreUtils::GetTreeBoxObject(aContent);
if (mTree)
@ -685,7 +685,7 @@ already_AddRefed<nsAccessible>
nsXULTreeAccessible::CreateTreeItemAccessible(PRInt32 aRow)
{
nsRefPtr<nsAccessible> accessible =
new nsXULTreeItemAccessible(mContent, mDoc, this, mTree, mTreeView,
new nsXULTreeItemAccessible(mContent, mWeakShell, this, mTree, mTreeView,
aRow);
return accessible.forget();
@ -696,10 +696,10 @@ nsXULTreeAccessible::CreateTreeItemAccessible(PRInt32 aRow)
////////////////////////////////////////////////////////////////////////////////
nsXULTreeItemAccessibleBase::
nsXULTreeItemAccessibleBase(nsIContent* aContent, nsDocAccessible* aDoc,
nsAccessible* aParent, nsITreeBoxObject* aTree,
nsITreeView* aTreeView, PRInt32 aRow) :
nsAccessibleWrap(aContent, aDoc),
nsXULTreeItemAccessibleBase(nsIContent *aContent, nsIWeakReference *aShell,
nsAccessible *aParent, nsITreeBoxObject *aTree,
nsITreeView *aTreeView, PRInt32 aRow) :
nsAccessibleWrap(aContent, aShell),
mTree(aTree), mTreeView(aTreeView), mRow(aRow)
{
mParent = aParent;
@ -1113,10 +1113,10 @@ nsXULTreeItemAccessibleBase::GetCellName(nsITreeColumn* aColumn,
////////////////////////////////////////////////////////////////////////////////
nsXULTreeItemAccessible::
nsXULTreeItemAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
nsAccessible* aParent, nsITreeBoxObject* aTree,
nsITreeView* aTreeView, PRInt32 aRow) :
nsXULTreeItemAccessibleBase(aContent, aDoc, aParent, aTree, aTreeView, aRow)
nsXULTreeItemAccessible(nsIContent *aContent, nsIWeakReference *aShell,
nsAccessible *aParent, nsITreeBoxObject *aTree,
nsITreeView *aTreeView, PRInt32 aRow) :
nsXULTreeItemAccessibleBase(aContent, aShell, aParent, aTree, aTreeView, aRow)
{
mColumn = nsCoreUtils::GetFirstSensibleColumn(mTree);
}
@ -1231,8 +1231,8 @@ nsXULTreeItemAccessible::CacheChildren()
////////////////////////////////////////////////////////////////////////////////
nsXULTreeColumnsAccessible::
nsXULTreeColumnsAccessible(nsIContent* aContent, nsDocAccessible* aDoc) :
nsXULColumnsAccessible(aContent, aDoc)
nsXULTreeColumnsAccessible(nsIContent *aContent, nsIWeakReference *aShell) :
nsXULColumnsAccessible(aContent, aShell)
{
}

Просмотреть файл

@ -67,7 +67,7 @@ public:
using nsAccessible::GetChildCount;
using nsAccessible::GetChildAt;
nsXULTreeAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTreeAccessible(nsIContent *aContent, nsIWeakReference *aShell);
// nsISupports and cycle collection
NS_DECL_ISUPPORTS_INHERITED
@ -180,9 +180,9 @@ class nsXULTreeItemAccessibleBase : public nsAccessibleWrap
public:
using nsAccessible::GetParent;
nsXULTreeItemAccessibleBase(nsIContent* aContent, nsDocAccessible* aDoc,
nsAccessible* aParent, nsITreeBoxObject* aTree,
nsITreeView* aTreeView, PRInt32 aRow);
nsXULTreeItemAccessibleBase(nsIContent *aContent, nsIWeakReference *aShell,
nsAccessible *aParent, nsITreeBoxObject *aTree,
nsITreeView *aTreeView, PRInt32 aRow);
// nsISupports and cycle collection
NS_DECL_ISUPPORTS_INHERITED
@ -275,9 +275,9 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsXULTreeItemAccessibleBase,
class nsXULTreeItemAccessible : public nsXULTreeItemAccessibleBase
{
public:
nsXULTreeItemAccessible(nsIContent* aContent, nsDocAccessible* aDoc,
nsAccessible* aParent, nsITreeBoxObject* aTree,
nsITreeView* aTreeView, PRInt32 aRow);
nsXULTreeItemAccessible(nsIContent *aContent, nsIWeakReference *aShell,
nsAccessible *aParent, nsITreeBoxObject *aTree,
nsITreeView *aTreeView, PRInt32 aRow);
// nsISupports and cycle collection
NS_DECL_ISUPPORTS_INHERITED
@ -314,7 +314,7 @@ protected:
class nsXULTreeColumnsAccessible : public nsXULColumnsAccessible
{
public:
nsXULTreeColumnsAccessible(nsIContent* aContent, nsDocAccessible* aDoc);
nsXULTreeColumnsAccessible(nsIContent *aContent, nsIWeakReference *aShell);
protected:

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше