bug 1270916 - allow tracking in an accessible if it has a pending show / hide / reorder event r=davidb

This commit is contained in:
Trevor Saunders 2016-09-05 22:53:08 -04:00
Родитель 93e1959ffb
Коммит 9b4d4eb7ea
2 изменённых файлов: 35 добавлений и 1 удалений

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

@ -109,7 +109,8 @@ Accessible::Accessible(nsIContent* aContent, DocAccessible* aDoc) :
mContent(aContent), mDoc(aDoc),
mParent(nullptr), mIndexInParent(-1),
mRoleMapEntryIndex(aria::NO_ROLE_MAP_ENTRY_INDEX),
mStateFlags(0), mContextFlags(0), mType(0), mGenericTypes(0)
mStateFlags(0), mContextFlags(0), mType(0), mGenericTypes(0),
mReorderEventTarget(false), mShowEventTarget(false), mHideEventTarget(false)
{
mBits.groupInfo = nullptr;
mInt.mIndexOfEmbeddedChild = -1;

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

@ -956,6 +956,36 @@ public:
*/
bool IsInsideAlert() const { return mContextFlags & eInsideAlert; }
/**
* Return true if there is a pending reorder event for this accessible.
*/
bool ReorderEventTarget() const { return mReorderEventTarget; }
/**
* Return true if there is a pending show event for this accessible.
*/
bool ShowEventTarget() const { return mShowEventTarget; }
/**
* Return true if there is a pending hide event for this accessible.
*/
bool HideEventTarget() const { return mHideEventTarget; }
/**
* Set if there is a pending reorder event for this accessible.
*/
void SetReorderEventTarget(bool aTarget) { mReorderEventTarget = aTarget; }
/**
* Set if this accessible is a show event target.
*/
void SetShowEventTarget(bool aTarget) { mShowEventTarget = aTarget; }
/**
* Set if this accessible is a hide event target.
*/
void SetHideEventTarget(bool aTarget) { mHideEventTarget = aTarget; }
protected:
virtual ~Accessible();
@ -1132,6 +1162,9 @@ protected:
uint32_t mContextFlags : kContextFlagsBits;
uint32_t mType : kTypeBits;
uint32_t mGenericTypes : kGenericTypesBits;
uint32_t mReorderEventTarget : 1;
uint32_t mShowEventTarget : 1;
uint32_t mHideEventTarget : 1;
void StaticAsserts() const;