diff --git a/content/base/src/nsGkAtomList.h b/content/base/src/nsGkAtomList.h index 53162fee49c..a680b6c381b 100644 --- a/content/base/src/nsGkAtomList.h +++ b/content/base/src/nsGkAtomList.h @@ -609,7 +609,6 @@ GK_ATOM(mozfullscreenerror, "mozfullscreenerror") GK_ATOM(mozpasspointerevents, "mozpasspointerevents") GK_ATOM(mozpointerlockchange, "mozpointerlockchange") GK_ATOM(mozpointerlockerror, "mozpointerlockerror") -GK_ATOM(mozprivatebrowsing, "mozprivatebrowsing") GK_ATOM(moz_opaque, "moz-opaque") GK_ATOM(moz_action_hint, "mozactionhint") GK_ATOM(x_moz_errormessage, "x-moz-errormessage") diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 94d3d12a787..f7e1d7df4a3 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -851,7 +851,6 @@ nsDocShell::nsDocShell(): #endif mAffectPrivateSessionLifetime(true), mInvisible(false), - mHasLoadedNonBlankURI(false), mDefaultLoadFlags(nsIRequest::LOAD_NORMAL), mFrameType(eFrameTypeRegular), mOwnOrContainingAppId(nsIScriptSecurityManager::UNKNOWN_APP_ID), @@ -1929,10 +1928,6 @@ nsDocShell::SetCurrentURI(nsIURI *aURI, nsIRequest *aRequest, mCurrentURI = NS_TryToMakeImmutable(aURI); - if (!NS_IsAboutBlank(mCurrentURI)) { - mHasLoadedNonBlankURI = true; - } - bool isRoot = false; // Is this the root docshell bool isSubFrame = false; // Is this a subframe navigation? @@ -2282,15 +2277,6 @@ nsDocShell::SetPrivateBrowsing(bool aUsePrivateBrowsing) return NS_OK; } -NS_IMETHODIMP -nsDocShell::GetHasLoadedNonBlankURI(bool* aResult) -{ - NS_ENSURE_ARG_POINTER(aResult); - - *aResult = mHasLoadedNonBlankURI; - return NS_OK; -} - NS_IMETHODIMP nsDocShell::GetUseRemoteTabs(bool* aUseRemoteTabs) { diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index d9a82abe4f7..eda8f221558 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -915,7 +915,6 @@ protected: #endif bool mAffectPrivateSessionLifetime; bool mInvisible; - bool mHasLoadedNonBlankURI; uint64_t mHistoryID; uint32_t mDefaultLoadFlags; diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl index cf81b57427e..02c07d548dd 100644 --- a/docshell/base/nsIDocShell.idl +++ b/docshell/base/nsIDocShell.idl @@ -54,7 +54,7 @@ interface nsITabParent; typedef unsigned long nsLoadFlags; -[scriptable, builtinclass, uuid(23157a63-26fd-44a0-a0f9-fdc64dcc004c)] +[scriptable, builtinclass, uuid(2b8e4a50-7744-454d-a05b-debead8070fe)] interface nsIDocShell : nsIDocShellTreeItem { /** @@ -1017,11 +1017,4 @@ interface nsIDocShell : nsIDocShellTreeItem // URLSearchParams for the window.location is owned by the docShell. [noscript,notxpcom] URLSearchParams getURLSearchParams(); - - /** - * This attribute determines whether a document which is not about:blank has - * already be loaded by this docShell. - */ - [infallible] readonly attribute boolean hasLoadedNonBlankURI; - }; diff --git a/dom/browser-element/BrowserElementChild.js b/dom/browser-element/BrowserElementChild.js index 4996b178e0f..aa06587c95f 100644 --- a/dom/browser-element/BrowserElementChild.js +++ b/dom/browser-element/BrowserElementChild.js @@ -56,10 +56,3 @@ let infos = sendSyncMessage('browser-element-api:call', { 'msg_name': 'hello' })[0]; docShell.QueryInterface(Ci.nsIDocShellTreeItem).name = infos.name; docShell.setFullscreenAllowed(infos.fullscreenAllowed); -if (infos.isPrivate) { - if (docShell.hasLoadedNonBlankURI) { - Cu.reportError("We should not switch to Private Browsing after loading a document."); - } else { - docShell.QueryInterface(Ci.nsILoadContext).usePrivateBrowsing = true; - } -} diff --git a/dom/browser-element/BrowserElementParent.cpp b/dom/browser-element/BrowserElementParent.cpp index 83f5057ba4d..62ca3c119d1 100644 --- a/dom/browser-element/BrowserElementParent.cpp +++ b/dom/browser-element/BrowserElementParent.cpp @@ -76,14 +76,6 @@ CreateIframe(Element* aOpenerFrameElement, const nsAString& aName, bool aRemote) NS_LITERAL_STRING("false"), /* aNotify = */ false); - // Copy the opener frame's mozprivatebrowsing attribute to the popup frame. - nsAutoString mozprivatebrowsing; - if (aOpenerFrameElement->GetAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing, - mozprivatebrowsing)) { - popupFrameElement->SetAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing, - mozprivatebrowsing, /* aNotify = */ false); - } - return popupFrameElement.forget(); } diff --git a/dom/browser-element/BrowserElementParent.jsm b/dom/browser-element/BrowserElementParent.jsm index 3a7124be800..066c59a040a 100644 --- a/dom/browser-element/BrowserElementParent.jsm +++ b/dom/browser-element/BrowserElementParent.jsm @@ -389,8 +389,7 @@ BrowserElementParent.prototype = { name: this._frameElement.getAttribute('name'), fullscreenAllowed: this._frameElement.hasAttribute('allowfullscreen') || - this._frameElement.hasAttribute('mozallowfullscreen'), - isPrivate: this._frameElement.hasAttribute('mozprivatebrowsing') + this._frameElement.hasAttribute('mozallowfullscreen') }; },