diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 644ad8e395ea..be03e726db47 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -398,7 +398,6 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext, mHasLoadedNonBlankURI(false), mBlankTiming(false), mTitleValidForCurrentURI(false), - mIsFrame(false), mWillChangeProcess(false), mWatchedByDevtools(false), mIsNavigating(false) { @@ -11637,8 +11636,6 @@ nsresult nsDocShell::EnsureFind() { return NS_OK; } -bool nsDocShell::IsFrame() { return mIsFrame; } - NS_IMETHODIMP nsDocShell::IsBeingDestroyed(bool* aDoomed) { NS_ENSURE_ARG(aDoomed); diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index 6492c48cf1d4..2f9dabf4eb38 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -360,8 +360,6 @@ class nsDocShell final : public nsDocLoader, void SetInFrameSwap(bool aInSwap) { mInFrameSwap = aInSwap; } bool InFrameSwap(); - void SetIsFrame() { mIsFrame = true; }; - const mozilla::Encoding* GetForcedCharset() { return mForcedCharset; } mozilla::HTMLEditor* GetHTMLEditorInternal(); @@ -1002,7 +1000,7 @@ class nsDocShell final : public nsDocLoader, void RecomputeCanExecuteScripts(); void ClearFrameHistory(nsISHEntry* aEntry); void UpdateGlobalHistoryTitle(nsIURI* aURI); - bool IsFrame(); + bool IsFrame() { return mBrowsingContext->GetParent(); } bool CanSetOriginAttributes(); bool ShouldBlockLoadingForBackButton(); bool ShouldDiscardLayoutState(nsIHttpChannel* aChannel); @@ -1333,8 +1331,6 @@ class nsDocShell final : public nsDocLoader, // This flag indicates when the title is valid for the current URI. bool mTitleValidForCurrentURI : 1; - bool mIsFrame : 1; - // If mWillChangeProcess is set to true, then when the docshell is destroyed, // we prepare the browsing context to change process. bool mWillChangeProcess : 1; diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp index 11da7a0ebb0e..5f4c2986fbe6 100644 --- a/dom/base/nsFrameLoader.cpp +++ b/dom/base/nsFrameLoader.cpp @@ -2147,8 +2147,6 @@ nsresult nsFrameLoader::MaybeCreateDocShell() { if (OwnerIsMozBrowserFrame()) { docShell->SetFrameType(nsIDocShell::FRAME_TYPE_BROWSER); - } else if (mPendingBrowsingContext->GetParent()) { - docShell->SetIsFrame(); } // Apply sandbox flags even if our owner is not an iframe, as this copies