mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1219743 - remove special ARIA owns support for ARIA menus, r=yzen
This commit is contained in:
parent
2834a412d0
commit
3b1f584fc6
@ -299,33 +299,18 @@ FocusManager::ProcessFocusEvent(AccEvent* aEvent)
|
||||
// Fire menu start/end events for ARIA menus.
|
||||
if (target->IsARIARole(nsGkAtoms::menuitem)) {
|
||||
// The focus was moved into menu.
|
||||
bool tryOwnsParent = true;
|
||||
Accessible* ARIAMenubar = nullptr;
|
||||
Accessible* child = target;
|
||||
Accessible* parent = child->Parent();
|
||||
while (parent) {
|
||||
nsRoleMapEntry* roleMap = parent->ARIARoleMap();
|
||||
if (roleMap) {
|
||||
if (roleMap->Is(nsGkAtoms::menubar)) {
|
||||
ARIAMenubar = parent;
|
||||
break;
|
||||
}
|
||||
|
||||
// Go up in the parent chain of the menu hierarchy.
|
||||
if (roleMap->Is(nsGkAtoms::menuitem) || roleMap->Is(nsGkAtoms::menu)) {
|
||||
child = parent;
|
||||
parent = child->Parent();
|
||||
tryOwnsParent = true;
|
||||
continue;
|
||||
}
|
||||
for (Accessible* parent = target->Parent(); parent; parent = parent->Parent()) {
|
||||
if (parent->IsARIARole(nsGkAtoms::menubar)) {
|
||||
ARIAMenubar = parent;
|
||||
break;
|
||||
}
|
||||
|
||||
// If no required context role then check aria-owns relation.
|
||||
if (!tryOwnsParent)
|
||||
// Go up in the parent chain of the menu hierarchy.
|
||||
if (!parent->IsARIARole(nsGkAtoms::menuitem) &&
|
||||
!parent->IsARIARole(nsGkAtoms::menu)) {
|
||||
break;
|
||||
|
||||
parent = ARIAOwnedByIterator(child).Next();
|
||||
tryOwnsParent = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (ARIAMenubar != mActiveARIAMenubar) {
|
||||
|
Loading…
Reference in New Issue
Block a user