Bug 1438193 - part11-1: Role r=surkov

turn Accessible::Role into a const function
This commit is contained in:
Tokio Kajitsuka 2018-05-15 21:50:38 +09:00
parent d11ede6c1b
commit 17d2e291d4
5 changed files with 6 additions and 6 deletions

View File

@ -144,7 +144,7 @@ AccGroupInfo::Update()
}
Accessible*
AccGroupInfo::FirstItemOf(Accessible* aContainer)
AccGroupInfo::FirstItemOf(const Accessible* aContainer)
{
// ARIA tree can be arranged by ARIA groups case #1 (previous sibling of a
// group is a parent) or by aria-level.

View File

@ -67,7 +67,7 @@ public:
/**
* Return a first item for the given container.
*/
static Accessible* FirstItemOf(Accessible* aContainer);
static Accessible* FirstItemOf(const Accessible* aContainer);
/**
* Return next item of the same group to the given item.

View File

@ -19,7 +19,7 @@ namespace mozilla {
namespace a11y {
inline mozilla::a11y::role
Accessible::Role()
Accessible::Role() const
{
const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
if (!roleMapEntry || roleMapEntry->roleRule != kUseMapRole)

View File

@ -1445,7 +1445,7 @@ Accessible::SetCurValue(double aValue)
}
role
Accessible::ARIATransformRole(role aRole)
Accessible::ARIATransformRole(role aRole) const
{
// Beginning with ARIA 1.1, user agents are expected to use the native host
// language role of the element when the region role is used without a name.

View File

@ -222,7 +222,7 @@ public:
/**
* Return enumerated accessible role (see constants in Role.h).
*/
mozilla::a11y::role Role();
mozilla::a11y::role Role() const;
/**
* Return true if ARIA role is specified on the element.
@ -1062,7 +1062,7 @@ protected:
/**
* Return ARIA role (helper method).
*/
mozilla::a11y::role ARIATransformRole(mozilla::a11y::role aRole);
mozilla::a11y::role ARIATransformRole(mozilla::a11y::role aRole) const;
//////////////////////////////////////////////////////////////////////////////
// Name helpers