backout 3efe998b6136 for M2 failure

This commit is contained in:
Fabrice Desré 2014-10-11 08:40:19 -07:00
parent 63f47bcc6f
commit 4cd604712e
7 changed files with 2 additions and 41 deletions

View File

@ -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")

View File

@ -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)
{

View File

@ -915,7 +915,6 @@ protected:
#endif
bool mAffectPrivateSessionLifetime;
bool mInvisible;
bool mHasLoadedNonBlankURI;
uint64_t mHistoryID;
uint32_t mDefaultLoadFlags;

View File

@ -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;
};

View File

@ -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;
}
}

View File

@ -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();
}

View File

@ -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')
};
},