зеркало из https://github.com/mozilla/gecko-dev.git
Bug 493683 part 1: Rename HasNameDependentParent to HasNameDependent due to upcoming broader usage. r=eeejay
Differential Revision: https://phabricator.services.mozilla.com/D102676
This commit is contained in:
Родитель
27e5bcae00
Коммит
1af2138c00
|
@ -51,7 +51,7 @@ bool EventQueue::PushNameChange(Accessible* aTarget) {
|
|||
// Fire name change event on parent given that this event hasn't been
|
||||
// coalesced, the parent's name was calculated from its subtree, and the
|
||||
// subtree was changed.
|
||||
if (aTarget->HasNameDependentParent()) {
|
||||
if (aTarget->HasNameDependent()) {
|
||||
// Only continue traversing up the tree if it's possible that the parent
|
||||
// accessible's name can depend on this accessible's name.
|
||||
Accessible* parent = aTarget->Parent();
|
||||
|
|
|
@ -2070,10 +2070,11 @@ void Accessible::BindToParent(Accessible* aParent, uint32_t aIndexInParent) {
|
|||
mIndexInParent = aIndexInParent;
|
||||
|
||||
// Note: this is currently only used for richlistitems and their children.
|
||||
if (mParent->HasNameDependentParent() || mParent->IsXULListItem())
|
||||
mContextFlags |= eHasNameDependentParent;
|
||||
else
|
||||
mContextFlags &= ~eHasNameDependentParent;
|
||||
if (mParent->HasNameDependent() || mParent->IsXULListItem()) {
|
||||
mContextFlags |= eHasNameDependent;
|
||||
} else {
|
||||
mContextFlags &= ~eHasNameDependent;
|
||||
}
|
||||
|
||||
mContextFlags |=
|
||||
static_cast<uint32_t>((mParent->IsAlert() || mParent->IsInsideAlert())) &
|
||||
|
@ -2098,7 +2099,7 @@ void Accessible::UnbindFromParent() {
|
|||
|
||||
delete mBits.groupInfo;
|
||||
mBits.groupInfo = nullptr;
|
||||
mContextFlags &= ~eHasNameDependentParent & ~eInsideAlert;
|
||||
mContextFlags &= ~eHasNameDependent & ~eInsideAlert;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -932,12 +932,10 @@ class Accessible : public nsISupports {
|
|||
bool KidsFromDOM() const { return !(mStateFlags & eNoKidsFromDOM); }
|
||||
|
||||
/**
|
||||
* Return true if this accessible has a parent whose name depends on this
|
||||
* accessible.
|
||||
* Return true if this accessible has a parent, relation or ancestor with a
|
||||
* relation whose name depends on this accessible.
|
||||
*/
|
||||
bool HasNameDependentParent() const {
|
||||
return mContextFlags & eHasNameDependentParent;
|
||||
}
|
||||
bool HasNameDependent() const { return mContextFlags & eHasNameDependent; }
|
||||
|
||||
/**
|
||||
* Return true if the element is inside an alert.
|
||||
|
@ -1046,8 +1044,7 @@ class Accessible : public nsISupports {
|
|||
* Flags used for contextual information about the accessible.
|
||||
*/
|
||||
enum ContextFlags {
|
||||
eHasNameDependentParent =
|
||||
1 << 0, // Parent's name depends on this accessible.
|
||||
eHasNameDependent = 1 << 0, // See HasNameDependent().
|
||||
eInsideAlert = 1 << 1,
|
||||
|
||||
eLastContextFlag = eInsideAlert
|
||||
|
|
Загрузка…
Ссылка в новой задаче