mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 545738 - clean up nsAccessibilityService::GetAccessible() and related, r=davidb
This commit is contained in:
parent
fe5bb58d17
commit
e8d87caa1c
@ -44,17 +44,15 @@ interface nsIFrame;
|
||||
interface nsObjectFrame;
|
||||
interface nsIContent;
|
||||
|
||||
[uuid(84a3ab70-8f7e-4610-9cd8-bd69308b76c5)]
|
||||
[uuid(4df7499d-d96e-48f8-a936-8a22ec0d4915)]
|
||||
interface nsIAccessibilityService : nsIAccessibleRetrieval
|
||||
{
|
||||
nsIAccessible createOuterDocAccessible(in nsIDOMNode aNode);
|
||||
nsIAccessible createRootAccessible(in nsIPresShell aShell, in nsIDocument aDocument);
|
||||
|
||||
nsIAccessible createHTML4ButtonAccessible(in nsIFrame aFrame);
|
||||
nsIAccessible createHyperTextAccessible(in nsIFrame aFrame);
|
||||
nsIAccessible createHTMLBRAccessible(in nsIFrame aFrame);
|
||||
nsIAccessible createHTMLButtonAccessible(in nsIFrame aFrame);
|
||||
nsIAccessible createHTMLAccessibleByMarkup(in nsIFrame aFrame, in nsIWeakReference aWeakShell, in nsIDOMNode aDOMNode);
|
||||
nsIAccessible createHTMLLIAccessible(in nsIFrame aFrame, in nsIFrame aBulletFrame, in AString aBulletText);
|
||||
nsIAccessible createHTMLCheckboxAccessible(in nsIFrame aFrame);
|
||||
nsIAccessible createHTMLComboboxAccessible(in nsIDOMNode aNode, in nsIWeakReference aPresShell);
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
#include "nsAccTreeWalker.h"
|
||||
|
||||
#include "nsAccessible.h"
|
||||
#include "nsAccessibilityService.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -88,7 +89,7 @@ nsAccTreeWalker::~nsAccTreeWalker()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccTreeWalker: private
|
||||
|
||||
already_AddRefed<nsIAccessible>
|
||||
already_AddRefed<nsAccessible>
|
||||
nsAccTreeWalker::GetNextChildInternal(PRBool aNoWalkUp)
|
||||
{
|
||||
if (!mState || !mState->content)
|
||||
@ -108,10 +109,10 @@ nsAccTreeWalker::GetNextChildInternal(PRBool aNoWalkUp)
|
||||
mState->childIdx++;
|
||||
|
||||
PRBool isHidden = PR_FALSE;
|
||||
nsCOMPtr<nsIAccessible> accessible;
|
||||
nsCOMPtr<nsIDOMNode> childDOMNode(do_QueryInterface(childNode));
|
||||
GetAccService()->GetAccessible(childDOMNode, presShell, mWeakShell, nsnull,
|
||||
&isHidden, getter_AddRefs(accessible));
|
||||
nsRefPtr<nsAccessible> accessible =
|
||||
GetAccService()->GetAccessible(childDOMNode, presShell, mWeakShell,
|
||||
&isHidden);
|
||||
|
||||
if (accessible)
|
||||
return accessible.forget();
|
||||
|
@ -40,10 +40,11 @@
|
||||
#ifndef _nsAccTreeWalker_H_
|
||||
#define _nsAccTreeWalker_H_
|
||||
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIWeakReference.h"
|
||||
|
||||
class nsAccessible;
|
||||
struct WalkState;
|
||||
|
||||
/**
|
||||
@ -59,7 +60,7 @@ public:
|
||||
/**
|
||||
* Return the next child accessible.
|
||||
*/
|
||||
already_AddRefed<nsIAccessible> GetNextChild()
|
||||
already_AddRefed<nsAccessible> GetNextChild()
|
||||
{
|
||||
return GetNextChildInternal(PR_FALSE);
|
||||
}
|
||||
@ -73,7 +74,7 @@ private:
|
||||
* shouldn't go up through the tree if we failed find
|
||||
* accessible children.
|
||||
*/
|
||||
already_AddRefed<nsIAccessible>
|
||||
already_AddRefed<nsAccessible>
|
||||
GetNextChildInternal(PRBool aNoWalkUp = PR_FALSE);
|
||||
|
||||
/**
|
||||
|
@ -365,8 +365,7 @@ nsAccUtils::HasAccessibleChildren(nsIDOMNode *aNode)
|
||||
|
||||
nsCOMPtr<nsIWeakReference> weakShell(do_GetWeakReference(presShell));
|
||||
nsAccTreeWalker walker(weakShell, content, PR_FALSE);
|
||||
|
||||
nsCOMPtr<nsIAccessible> accessible = walker.GetNextChild();
|
||||
nsRefPtr<nsAccessible> accessible = walker.GetNextChild();
|
||||
return accessible ? PR_TRUE : PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE_FULL(nsAccessNode, nsIAccessNode,
|
||||
LastRelease())
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessible. Constructor
|
||||
// nsAccessNode construction/desctruction
|
||||
|
||||
nsAccessNode::nsAccessNode(nsIDOMNode *aNode, nsIWeakReference* aShell):
|
||||
mDOMNode(aNode), mWeakShell(aShell)
|
||||
@ -112,9 +112,6 @@ nsAccessNode::nsAccessNode(nsIDOMNode *aNode, nsIWeakReference* aShell):
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// destruction
|
||||
//-----------------------------------------------------
|
||||
nsAccessNode::~nsAccessNode()
|
||||
{
|
||||
NS_ASSERTION(!mWeakShell, "LastRelease was never called!?!");
|
||||
@ -131,6 +128,9 @@ void nsAccessNode::LastRelease()
|
||||
NS_DELETEXPCOM(this);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode public
|
||||
|
||||
nsresult
|
||||
nsAccessNode::Init()
|
||||
{
|
||||
@ -168,7 +168,9 @@ nsAccessNode::Init()
|
||||
nsRefPtr<nsDocAccessible> docAcc =
|
||||
nsAccUtils::QueryAccessibleDocument(docAccessible);
|
||||
NS_ASSERTION(docAcc, "No nsDocAccessible for document accessible!");
|
||||
docAcc->CacheAccessNode(uniqueID, this);
|
||||
|
||||
if (!docAcc->CacheAccessNode(uniqueID, this))
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
// Make sure an ancestor in real content is cached
|
||||
// so that nsDocAccessible::RefreshNodes() can find the anonymous subtree to release when
|
||||
@ -201,12 +203,14 @@ nsAccessNode::Shutdown()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsIAccessNode
|
||||
NS_IMETHODIMP nsAccessNode::GetUniqueID(void **aUniqueID)
|
||||
{
|
||||
*aUniqueID = static_cast<void*>(mDOMNode);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsIAccessNode
|
||||
NS_IMETHODIMP nsAccessNode::GetOwnerWindow(void **aWindow)
|
||||
{
|
||||
*aWindow = nsnull;
|
||||
@ -269,6 +273,7 @@ void nsAccessNode::InitXPAccessibility()
|
||||
NotifyA11yInitOrShutdown(PR_TRUE);
|
||||
}
|
||||
|
||||
// nsAccessNode protected static
|
||||
void nsAccessNode::NotifyA11yInitOrShutdown(PRBool aIsInit)
|
||||
{
|
||||
nsCOMPtr<nsIObserverService> obsService =
|
||||
@ -331,6 +336,7 @@ already_AddRefed<nsIPresShell> nsAccessNode::GetPresShell()
|
||||
return presShell;
|
||||
}
|
||||
|
||||
// nsAccessNode protected
|
||||
nsPresContext* nsAccessNode::GetPresContext()
|
||||
{
|
||||
nsCOMPtr<nsIPresShell> presShell(GetPresShell());
|
||||
@ -340,6 +346,7 @@ nsPresContext* nsAccessNode::GetPresContext()
|
||||
return presShell->GetPresContext();
|
||||
}
|
||||
|
||||
// nsAccessNode protected
|
||||
already_AddRefed<nsIAccessibleDocument> nsAccessNode::GetDocAccessible()
|
||||
{
|
||||
return GetDocAccessibleFor(mWeakShell); // Addref'd
|
||||
@ -379,6 +386,28 @@ nsAccessNode::GetFrame()
|
||||
return content ? content->GetPrimaryFrame() : nsnull;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
PRBool
|
||||
nsAccessNode::IsInCache()
|
||||
{
|
||||
nsCOMPtr<nsIAccessibleDocument> accessibleDoc =
|
||||
nsAccessNode::GetDocAccessibleFor(mWeakShell);
|
||||
|
||||
if (!accessibleDoc)
|
||||
return nsnull;
|
||||
|
||||
void* uniqueID = nsnull;
|
||||
GetUniqueID(&uniqueID);
|
||||
|
||||
nsRefPtr<nsDocAccessible> docAccessible =
|
||||
nsAccUtils::QueryObject<nsDocAccessible>(accessibleDoc);
|
||||
return docAccessible->GetCachedAccessNode(uniqueID) ? PR_TRUE : PR_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsIAccessNode
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAccessNode::GetDOMNode(nsIDOMNode **aNode)
|
||||
{
|
||||
@ -459,6 +488,7 @@ nsAccessNode::ScrollToPoint(PRUint32 aCoordinateType, PRInt32 aX, PRInt32 aY)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// nsAccessNode protected
|
||||
nsresult
|
||||
nsAccessNode::MakeAccessNode(nsIDOMNode *aNode, nsIAccessNode **aAccessNode)
|
||||
{
|
||||
@ -610,7 +640,8 @@ nsAccessNode::GetComputedStyleCSSValue(const nsAString& aPseudoElt,
|
||||
return CallQueryInterface(cssValue, aCSSValue);
|
||||
}
|
||||
|
||||
/***************** Hashtable of nsIAccessNode's *****************/
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode public static
|
||||
|
||||
already_AddRefed<nsIAccessibleDocument>
|
||||
nsAccessNode::GetDocAccessibleFor(nsIDocument *aDocument)
|
||||
@ -725,6 +756,7 @@ already_AddRefed<nsIDOMNode> nsAccessNode::GetCurrentFocus()
|
||||
return focusedNode;
|
||||
}
|
||||
|
||||
// nsIAccessNode
|
||||
NS_IMETHODIMP
|
||||
nsAccessNode::GetLanguage(nsAString& aLanguage)
|
||||
{
|
||||
@ -764,4 +796,3 @@ nsAccessNode::GetLanguage(nsAString& aLanguage)
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -175,6 +175,13 @@ class nsAccessNode: public nsIAccessNode
|
||||
*/
|
||||
PRBool HasWeakShell() const { return !!mWeakShell; }
|
||||
|
||||
#ifdef DEBUG
|
||||
/**
|
||||
* Return true if the access node is cached.
|
||||
*/
|
||||
PRBool IsInCache();
|
||||
#endif
|
||||
|
||||
protected:
|
||||
nsresult MakeAccessNode(nsIDOMNode *aNode, nsIAccessNode **aAccessNode);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -50,6 +50,7 @@
|
||||
#include "nsWeakReference.h"
|
||||
|
||||
class nsAccessNode;
|
||||
class nsAccessible;
|
||||
class nsIFrame;
|
||||
class nsIWeakReference;
|
||||
class nsIDOMNode;
|
||||
@ -93,12 +94,12 @@ public:
|
||||
* @param aNode [in] the given node
|
||||
* @param aPresShell [in] the pres shell of the node
|
||||
* @param aWeakShell [in] the weak shell for the pres shell
|
||||
* @param aFrameHint [in] the frame of the given node
|
||||
* @param aIsHidden [out] indicates whether the node's frame is hidden
|
||||
* @param aIsHidden [out, optional] indicates whether the node's frame is
|
||||
* hidden
|
||||
*/
|
||||
nsresult GetAccessible(nsIDOMNode *aNode, nsIPresShell *aPresShell,
|
||||
nsIWeakReference *aWeakShell, nsIFrame *aFrameHint,
|
||||
PRBool *aIsHidden, nsIAccessible **aAccessible);
|
||||
already_AddRefed<nsAccessible>
|
||||
GetAccessible(nsIDOMNode *aNode, nsIPresShell *aPresShell,
|
||||
nsIWeakReference *aWeakShell, PRBool *aIsHidden = nsnull);
|
||||
|
||||
/**
|
||||
* Return an accessible for a DOM node in the given pres shell.
|
||||
@ -139,38 +140,48 @@ private:
|
||||
* Initialize an accessible and cache it. The method should be called for
|
||||
* every created accessible.
|
||||
*
|
||||
* @param aAccessibleIn - accessible to initialize.
|
||||
* @param aAcccessibleOut - set to the same thing as aAccessibleIn, unless there was
|
||||
* an error initializing the accessible, in which case
|
||||
* it is set to nsnull
|
||||
* @param aRoleMapEntry - The role map entry role the ARIA role or nsnull if none
|
||||
* @param aAccessible [in] accessible to initialize.
|
||||
* @param aRoleMapEntry [in] the role map entry role the ARIA role or nsnull
|
||||
* if none
|
||||
*
|
||||
* @return true if the accessible was initialized, otherwise false
|
||||
*/
|
||||
nsresult InitAccessible(nsIAccessible *aAccessibleIn, nsIAccessible **aAccessibleOut,
|
||||
nsRoleMapEntry *aRoleMapEntry = nsnull);
|
||||
PRBool InitAccessible(nsAccessible *aAccessible,
|
||||
nsRoleMapEntry *aRoleMapEntry);
|
||||
|
||||
/**
|
||||
* Return accessible object for elements implementing nsIAccessibleProvider
|
||||
* Create accessible for the element implementing nsIAccessibleProvider
|
||||
* interface.
|
||||
*
|
||||
* @param aNode - DOM node that accessible is returned for.
|
||||
*/
|
||||
nsresult GetAccessibleByType(nsIDOMNode *aNode, nsIAccessible **aAccessible);
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateAccessibleByType(nsIDOMNode *aNode, nsIWeakReference *aWeakShell);
|
||||
|
||||
/**
|
||||
* Return accessible object if parent is a deck frame.
|
||||
*
|
||||
* @param aNode - DOMNode that accessible is returned for.
|
||||
* Create document or root accessible.
|
||||
*/
|
||||
nsresult GetAccessibleForDeckChildren(nsIDOMNode *aNode,
|
||||
nsIAccessible **aAccessible);
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateDocOrRootAccessible(nsIPresShell *aShell, nsIDocument *aDocument);
|
||||
|
||||
/**
|
||||
* Create accessible for HTML node by tag name.
|
||||
*/
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateHTMLAccessibleByMarkup(nsIFrame *aFrame, nsIWeakReference *aWeakShell,
|
||||
nsIDOMNode *aNode);
|
||||
|
||||
/**
|
||||
* Create accessible if parent is a deck frame.
|
||||
*/
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateAccessibleForDeckChild(nsIFrame *aFrame, nsIDOMNode *aNode,
|
||||
nsIWeakReference *aWeakShell);
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
/**
|
||||
* Create accessible for XUL tree element.
|
||||
*/
|
||||
nsresult GetAccessibleForXULTree(nsIDOMNode *aNode,
|
||||
nsIWeakReference *aWeakShell,
|
||||
nsIAccessible **aAccessible);
|
||||
already_AddRefed<nsAccessible>
|
||||
CreateAccessibleForXULTree(nsIDOMNode *aNode, nsIWeakReference *aWeakShell);
|
||||
#endif
|
||||
|
||||
static nsAccessibilityService *gAccessibilityService;
|
||||
|
@ -2990,14 +2990,10 @@ nsAccessible::CacheChildren()
|
||||
nsAccTreeWalker walker(mWeakShell, nsCoreUtils::GetRoleContent(mDOMNode),
|
||||
GetAllowsAnonChildAccessibles());
|
||||
|
||||
nsCOMPtr<nsIAccessible> child;
|
||||
nsRefPtr<nsAccessible> child;
|
||||
while ((child = walker.GetNextChild())) {
|
||||
nsRefPtr<nsAccessible> acc =
|
||||
nsAccUtils::QueryObject<nsAccessible>(child);
|
||||
|
||||
mChildren.AppendElement(acc);
|
||||
|
||||
acc->SetParent(this);
|
||||
mChildren.AppendElement(child);
|
||||
child->SetParent(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -572,7 +572,7 @@ nsDocAccessible::GetCachedAccessNode(void *aUniqueID)
|
||||
}
|
||||
|
||||
// nsDocAccessible public method
|
||||
void
|
||||
PRBool
|
||||
nsDocAccessible::CacheAccessNode(void *aUniqueID, nsAccessNode *aAccessNode)
|
||||
{
|
||||
// If there is already an access node with the given unique ID, shut it down
|
||||
@ -581,7 +581,7 @@ nsDocAccessible::CacheAccessNode(void *aUniqueID, nsAccessNode *aAccessNode)
|
||||
if (accessNode)
|
||||
accessNode->Shutdown();
|
||||
|
||||
mAccessNodeCache.Put(aUniqueID, aAccessNode);
|
||||
return mAccessNodeCache.Put(aUniqueID, aAccessNode);
|
||||
}
|
||||
|
||||
// nsDocAccessible public method
|
||||
@ -602,20 +602,26 @@ nsDocAccessible::RemoveAccessNodeFromCache(nsIAccessNode *aAccessNode)
|
||||
nsresult
|
||||
nsDocAccessible::Init()
|
||||
{
|
||||
gGlobalDocAccessibleCache.Put(static_cast<void*>(mDocument), this);
|
||||
|
||||
AddEventListeners();
|
||||
|
||||
GetParent(); // Ensure outer doc mParent accessible.
|
||||
// Put the document into the global cache.
|
||||
if (!gGlobalDocAccessibleCache.Put(static_cast<void*>(mDocument), this))
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
// Initialize event queue.
|
||||
mEventQueue = new nsAccEventQueue(this);
|
||||
if (!mEventQueue)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
AddEventListeners();
|
||||
|
||||
// Ensure outer doc mParent accessible.
|
||||
GetParent();
|
||||
|
||||
// Fire reorder event to notify new accessible document has been created and
|
||||
// attached to the tree.
|
||||
nsRefPtr<nsAccEvent> reorderEvent =
|
||||
new nsAccReorderEvent(mParent, PR_FALSE, PR_TRUE, mDOMNode);
|
||||
NS_ENSURE_TRUE(reorderEvent, NS_ERROR_OUT_OF_MEMORY);
|
||||
if (!reorderEvent)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
FireDelayedAccessibleEvent(reorderEvent);
|
||||
return NS_OK;
|
||||
|
@ -167,8 +167,10 @@ public:
|
||||
*
|
||||
* @param aUniquID [in] the unique identifier of accessible
|
||||
* @param aAccessNode [in] accessible to cache
|
||||
*
|
||||
* @return true if node beign cached, otherwise false
|
||||
*/
|
||||
void CacheAccessNode(void *aUniqueID, nsAccessNode *aAccessNode);
|
||||
PRBool CacheAccessNode(void *aUniqueID, nsAccessNode *aAccessNode);
|
||||
|
||||
/**
|
||||
* Remove the given access node from document cache.
|
||||
|
@ -169,17 +169,14 @@ nsXULColorPickerAccessible::CacheChildren()
|
||||
nsCOMPtr<nsIContent> node(do_QueryInterface(mDOMNode));
|
||||
nsAccTreeWalker walker(mWeakShell, node, PR_TRUE);
|
||||
|
||||
nsCOMPtr<nsIAccessible> child;
|
||||
nsRefPtr<nsAccessible> child;
|
||||
while ((child = walker.GetNextChild())) {
|
||||
PRUint32 role = nsAccUtils::Role(child);
|
||||
|
||||
// Get an accessbile for menupopup or panel elements.
|
||||
if (role == nsIAccessibleRole::ROLE_ALERT) {
|
||||
nsRefPtr<nsAccessible> menupopupAcc =
|
||||
nsAccUtils::QueryObject<nsAccessible>(child);
|
||||
|
||||
mChildren.AppendElement(menupopupAcc);
|
||||
menupopupAcc->SetParent(this);
|
||||
mChildren.AppendElement(child);
|
||||
child->SetParent(this);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -204,23 +204,23 @@ nsXULButtonAccessible::CacheChildren()
|
||||
if (!isMenu && !isMenuButton)
|
||||
return;
|
||||
|
||||
nsCOMPtr<nsIAccessible> buttonAccessible;
|
||||
nsCOMPtr<nsIAccessible> menupopupAccessible;
|
||||
nsRefPtr<nsAccessible> menupopupAccessible;
|
||||
nsRefPtr<nsAccessible> buttonAccessible;
|
||||
|
||||
nsAccTreeWalker walker(mWeakShell, content, PR_TRUE);
|
||||
|
||||
nsCOMPtr<nsIAccessible> child;
|
||||
nsRefPtr<nsAccessible> child;
|
||||
while ((child = walker.GetNextChild())) {
|
||||
PRUint32 role = nsAccUtils::Role(child);
|
||||
|
||||
if (role == nsIAccessibleRole::ROLE_MENUPOPUP) {
|
||||
// Get an accessbile for menupopup or panel elements.
|
||||
child.swap(menupopupAccessible);
|
||||
menupopupAccessible.swap(child);
|
||||
|
||||
} else if (isMenuButton && role == nsIAccessibleRole::ROLE_PUSHBUTTON) {
|
||||
// Button type="menu-button" contains a real button. Get an accessible
|
||||
// for it. Ignore dropmarker button what is placed as a last child.
|
||||
child.swap(buttonAccessible);
|
||||
buttonAccessible.swap(child);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -228,18 +228,12 @@ nsXULButtonAccessible::CacheChildren()
|
||||
if (!menupopupAccessible)
|
||||
return;
|
||||
|
||||
nsRefPtr<nsAccessible> menupopupAcc =
|
||||
nsAccUtils::QueryObject<nsAccessible>(menupopupAccessible);
|
||||
|
||||
mChildren.AppendElement(menupopupAcc);
|
||||
menupopupAcc->SetParent(this);
|
||||
mChildren.AppendElement(menupopupAccessible);
|
||||
menupopupAccessible->SetParent(this);
|
||||
|
||||
if (buttonAccessible) {
|
||||
nsRefPtr<nsAccessible> buttonAcc =
|
||||
nsAccUtils::QueryObject<nsAccessible>(buttonAccessible);
|
||||
|
||||
mChildren.AppendElement(buttonAcc);
|
||||
buttonAcc->SetParent(this);
|
||||
mChildren.AppendElement(buttonAccessible);
|
||||
buttonAccessible->SetParent(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1080,13 +1074,9 @@ nsXULTextFieldAccessible::CacheChildren()
|
||||
|
||||
nsAccTreeWalker walker(mWeakShell, inputContent, PR_FALSE);
|
||||
|
||||
nsCOMPtr<nsIAccessible> child;
|
||||
nsRefPtr<nsAccessible> child;
|
||||
while ((child = walker.GetNextChild())) {
|
||||
nsRefPtr<nsAccessible> acc =
|
||||
nsAccUtils::QueryObject<nsAccessible>(child);
|
||||
|
||||
mChildren.AppendElement(acc);
|
||||
|
||||
acc->SetParent(this);
|
||||
mChildren.AppendElement(child);
|
||||
child->SetParent(this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user