bug 856487 - remove some xpcom goo from nsAccUtils r=surkov

This commit is contained in:
Trevor Saunders 2013-03-31 20:57:07 -04:00
parent 4c278f90f9
commit 638f74473a
3 changed files with 8 additions and 20 deletions

View File

@ -239,7 +239,7 @@ nsAccUtils::GetSelectableContainer(Accessible* aAccessible, uint64_t aState)
Accessible* parent = aAccessible;
while ((parent = parent->Parent()) && !parent->IsSelect()) {
if (Role(parent) == nsIAccessibleRole::ROLE_PANE)
if (parent->Role() == roles::PANE)
return nullptr;
}
return parent;

View File

@ -6,8 +6,7 @@
#ifndef nsAccUtils_h_
#define nsAccUtils_h_
#include "nsIAccessible.h"
#include "nsIAccessibleRole.h"
#include "mozilla/a11y/Accessible.h"
#include "nsIAccessibleText.h"
#include "nsAccessibilityService.h"
@ -192,18 +191,6 @@ public:
*/
static nsIntPoint GetScreenCoordsForParent(Accessible* aAccessible);
/**
* Return the role of the given accessible.
*/
static uint32_t Role(nsIAccessible *aAcc)
{
uint32_t role = nsIAccessibleRole::ROLE_NOTHING;
if (aAcc)
aAcc->GetRole(&role);
return role;
}
/**
* Get the ARIA attribute characteristics for a given ARIA attribute.
*
@ -240,12 +227,12 @@ public:
/**
* Return true if the given accessible is embedded object.
*/
static bool IsEmbeddedObject(nsIAccessible *aAcc)
static bool IsEmbeddedObject(Accessible* aAcc)
{
uint32_t role = Role(aAcc);
return role != nsIAccessibleRole::ROLE_TEXT_LEAF &&
role != nsIAccessibleRole::ROLE_WHITESPACE &&
role != nsIAccessibleRole::ROLE_STATICTEXT;
uint32_t role = aAcc->Role();
return role != roles::TEXT_LEAF &&
role != roles::WHITESPACE &&
role != roles::STATICTEXT;
}
/**

View File

@ -14,6 +14,7 @@
#include "nsAccessibleRelation.h"
#include "nsAccessibilityService.h"
#include "nsIAccessibleRelation.h"
#include "nsIAccessibleRole.h"
#include "nsEventShell.h"
#include "nsTextEquivUtils.h"
#include "Relation.h"