mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
bug 1209615 - use TabParent::GetTopLevelDocAccessible() in OuterDocAccessible::RemoteChildDoc() r=davidb
This commit is contained in:
parent
a12ee7e426
commit
c3e44cb6c3
@ -192,14 +192,8 @@ OuterDocAccessible::RemoteChildDoc() const
|
|||||||
if (!tab)
|
if (!tab)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
// XXX Consider managing non top level remote documents with there parent
|
if (DocAccessibleParent* doc = tab->GetTopLevelDocAccessible()) {
|
||||||
// document.
|
return doc;
|
||||||
const nsTArray<PDocAccessibleParent*>& docs = tab->ManagedPDocAccessibleParent();
|
|
||||||
size_t docCount = docs.Length();
|
|
||||||
for (size_t i = 0; i < docCount; i++) {
|
|
||||||
auto doc = static_cast<DocAccessibleParent*>(docs[i]);
|
|
||||||
if (!doc->ParentDoc())
|
|
||||||
return doc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ASSERT(false, "no top level tab document?");
|
MOZ_ASSERT(false, "no top level tab document?");
|
||||||
|
Loading…
Reference in New Issue
Block a user