Bug 1244837 - only performing multiple attempts to retrieve an accessible object iff raisesAccessibilityExceptions capability is set to true. r=ato

This commit is contained in:
Yura Zenevich 2016-02-03 15:13:00 -05:00
Родитель b058b9b1f2
Коммит ea91590b51
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -124,6 +124,10 @@ Accessibility.prototype = {
// If accessible object is found, return it. If it is not required,
// also resolve.
resolve(acc);
} else if (mustHaveAccessible && !this.strict) {
// If we must have an accessible but are not raising accessibility
// exceptions, reject now and avoid polling for an accessible object.
reject();
} else {
// If we require an accessible object, we need to poll for it because
// accessible tree might be out of sync with DOM tree for a short time.