Bug 1525720, part 13 - Stop inheriting nsIRemoteTab interface in BrowserParent. r=nika
This commit removes nsIRemoteTab as a parent class from BrowserParent, so that BrowserHost is the only concrete implementation of nsIRemoteTab. Some static_cast's are updated to cast to BrowserHost, and other places have to be updated to pass a BrowserHost instead of a BrowserParent. WindowGlobalParent had a getter to return it's managing BrowserParent as a nsIRemoteTab. I couldn't find a use of this in-tree, so I've just opt-ed to remove it. If there's a use-case, we can add something back in. Differential Revision: https://phabricator.services.mozilla.com/D31444
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "mozilla/dom/CustomEvent.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "mozilla/dom/BrowserHost.h"
|
||||
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
@@ -669,12 +670,12 @@ ProxyAccessible* RootAccessible::GetPrimaryRemoteTopLevelContentDoc() const {
|
||||
mDocumentNode->GetDocShell()->GetTreeOwner(getter_AddRefs(owner));
|
||||
NS_ENSURE_TRUE(owner, nullptr);
|
||||
|
||||
nsCOMPtr<nsIRemoteTab> browserParent;
|
||||
owner->GetPrimaryRemoteTab(getter_AddRefs(browserParent));
|
||||
if (!browserParent) {
|
||||
nsCOMPtr<nsIRemoteTab> remoteTab;
|
||||
owner->GetPrimaryRemoteTab(getter_AddRefs(remoteTab));
|
||||
if (!remoteTab) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto tab = static_cast<dom::BrowserParent*>(browserParent.get());
|
||||
auto tab = static_cast<dom::BrowserHost*>(remoteTab.get());
|
||||
return tab->GetTopLevelDocAccessible();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user