forked from mirrors/gecko-dev
Bug 1868023. Get rid of nsIDocShell.getSameTypeInProcessParentIgnoreBrowserBoundaries. r=aiunusov
Differential Revision: https://phabricator.services.mozilla.com/D195361
This commit is contained in:
parent
a35ac330ae
commit
7dbfaa7f5d
4 changed files with 5 additions and 58 deletions
|
|
@ -2708,25 +2708,6 @@ nsDocShell::GetInProcessSameTypeParent(nsIDocShellTreeItem** aParent) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetSameTypeInProcessParentIgnoreBrowserBoundaries(
|
||||
nsIDocShell** aParent) {
|
||||
NS_ENSURE_ARG_POINTER(aParent);
|
||||
*aParent = nullptr;
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> parent =
|
||||
do_QueryInterface(GetAsSupports(mParent));
|
||||
if (!parent) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (parent->ItemType() == mItemType) {
|
||||
nsCOMPtr<nsIDocShell> parentDS = do_QueryInterface(parent);
|
||||
parentDS.forget(aParent);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetInProcessRootTreeItem(nsIDocShellTreeItem** aRootTreeItem) {
|
||||
NS_ENSURE_ARG_POINTER(aRootTreeItem);
|
||||
|
|
|
|||
|
|
@ -539,14 +539,6 @@ interface nsIDocShell : nsIDocShellTreeItem
|
|||
*/
|
||||
[infallible] readonly attribute boolean isTopLevelContentDocShell;
|
||||
|
||||
/**
|
||||
* Like nsIDocShellTreeItem::GetSameTypeParent, except this ignores <iframe
|
||||
* mozbrowser> boundaries. Which no longer exist.
|
||||
*
|
||||
* @deprecated: Use `BrowsingContext::GetParent()` in the future.
|
||||
*/
|
||||
nsIDocShell getSameTypeInProcessParentIgnoreBrowserBoundaries();
|
||||
|
||||
/**
|
||||
* True iff asynchronous panning and zooming is enabled for this
|
||||
* docshell.
|
||||
|
|
|
|||
|
|
@ -3124,26 +3124,17 @@ nsPIDOMWindowOuter* nsGlobalWindowOuter::GetInProcessScriptableParentOrNull() {
|
|||
return (nsGlobalWindowOuter::Cast(parent) == this) ? nullptr : parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* nsPIDOMWindow::GetParent (when called from C++) is just a wrapper around
|
||||
* GetRealParent.
|
||||
*/
|
||||
already_AddRefed<nsPIDOMWindowOuter> nsGlobalWindowOuter::GetInProcessParent() {
|
||||
if (!mDocShell) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShell> parent;
|
||||
mDocShell->GetSameTypeInProcessParentIgnoreBrowserBoundaries(
|
||||
getter_AddRefs(parent));
|
||||
|
||||
if (parent) {
|
||||
nsCOMPtr<nsPIDOMWindowOuter> win = parent->GetWindow();
|
||||
return win.forget();
|
||||
if (auto* parentBC = GetBrowsingContext()->GetParent()) {
|
||||
if (auto* parent = parentBC->GetDOMWindow()) {
|
||||
return do_AddRef(parent);
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> win(this);
|
||||
return win.forget();
|
||||
return do_AddRef(this);
|
||||
}
|
||||
|
||||
static nsresult GetTopImpl(nsGlobalWindowOuter* aWin, nsIURI* aURIBeingLoaded,
|
||||
|
|
|
|||
|
|
@ -2652,23 +2652,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"flags": [
|
||||
"hasretval"
|
||||
],
|
||||
"name": "getSameTypeInProcessParentIgnoreBrowserBoundaries",
|
||||
"params": [
|
||||
{
|
||||
"flags": [
|
||||
"out"
|
||||
],
|
||||
"type": {
|
||||
"name": "nsIDocShell",
|
||||
"tag": "TD_INTERFACE_TYPE"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"flags": [
|
||||
"getter",
|
||||
|
|
|
|||
Loading…
Reference in a new issue