mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 865997 - Don't prune complex subtrees for roles usually having no children, r=tbsaunde
This commit is contained in:
parent
84bfe510d9
commit
1bbfb14e1e
@ -439,18 +439,21 @@ nsAccUtils::MustPrune(Accessible* aAccessible)
|
||||
{
|
||||
roles::Role role = aAccessible->Role();
|
||||
|
||||
// We don't prune buttons any more however AT don't expect children inside of
|
||||
// button in general, we allow menu buttons to have children to make them
|
||||
// accessible.
|
||||
return role == roles::MENUITEM ||
|
||||
role == roles::COMBOBOX_OPTION ||
|
||||
role == roles::OPTION ||
|
||||
role == roles::ENTRY ||
|
||||
role == roles::FLAT_EQUATION ||
|
||||
role == roles::PASSWORD_TEXT ||
|
||||
role == roles::TOGGLE_BUTTON ||
|
||||
role == roles::GRAPHIC ||
|
||||
role == roles::SLIDER ||
|
||||
role == roles::PROGRESSBAR ||
|
||||
role == roles::SEPARATOR;
|
||||
// Don't prune the tree for certain roles if the tree is more complex than
|
||||
// a single text leaf.
|
||||
return
|
||||
(role == roles::MENUITEM ||
|
||||
role == roles::COMBOBOX_OPTION ||
|
||||
role == roles::OPTION ||
|
||||
role == roles::ENTRY ||
|
||||
role == roles::FLAT_EQUATION ||
|
||||
role == roles::PASSWORD_TEXT ||
|
||||
role == roles::PUSHBUTTON ||
|
||||
role == roles::TOGGLE_BUTTON ||
|
||||
role == roles::GRAPHIC ||
|
||||
role == roles::SLIDER ||
|
||||
role == roles::PROGRESSBAR ||
|
||||
role == roles::SEPARATOR) &&
|
||||
aAccessible->ContentChildCount() == 1 &&
|
||||
aAccessible->ContentChildAt(0)->IsTextLeaf();
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ if (!MAC) {
|
||||
// Not specific case, point is inside of btn accessible.
|
||||
var btn = getAccessible("btn");
|
||||
var btnText = btn.firstChild;
|
||||
testChildAtPoint(btn, 1, 1, btnText, btnText);
|
||||
testChildAtPoint(btn, 1, 1, btn, btn);
|
||||
|
||||
// Not specific case, point is outside of btn accessible.
|
||||
testChildAtPoint(btn, -1, 1, null, null);
|
||||
|
Loading…
Reference in New Issue
Block a user