зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1582619 - Return DocAccessible if doc root element is passed to GetAccessibleOrDescendant. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D47365 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
18deeb8110
Коммит
cc288d94bb
|
@ -1215,12 +1215,12 @@ Accessible* DocAccessible::GetAccessibleOrDescendant(nsINode* aNode) const {
|
|||
Accessible* acc = GetAccessible(aNode);
|
||||
if (acc) return acc;
|
||||
|
||||
acc = GetContainerAccessible(aNode);
|
||||
if (acc == this && aNode == mContent) {
|
||||
// The body node is the doc's content node.
|
||||
return acc;
|
||||
if (aNode == mContent || aNode == mDocumentNode->GetRootElement()) {
|
||||
// If the node is the doc's body or root element, return the doc accessible.
|
||||
return const_cast<DocAccessible*>(this);
|
||||
}
|
||||
|
||||
acc = GetContainerAccessible(aNode);
|
||||
if (acc) {
|
||||
// We access the `mChildren` array directly so that we don't access
|
||||
// lazily created children in places like `XULTreeAccessible` and
|
||||
|
|
Загрузка…
Ссылка в новой задаче