Backed out changeset c2ffcbf39231 from a CLOSED TREE since it seems to depend on afc1cf222996 or 1bafff5720a8 that I just backed out

This commit is contained in:
Steve Fink 2012-07-19 15:45:19 -07:00
parent cb7fff5fbc
commit be6f447b39
4 changed files with 1 additions and 80 deletions

View File

@ -80,7 +80,6 @@
#include "mozilla/unused.h"
#include "mozilla/dom/Element.h"
#include "mozilla/layout/RenderFrameParent.h"
#include "nsIAppsService.h"
#include "jsapi.h"
@ -1477,24 +1476,6 @@ nsFrameLoader::MaybeCreateDocShell()
mDocShell = do_CreateInstance("@mozilla.org/docshell;1");
NS_ENSURE_TRUE(mDocShell, NS_ERROR_FAILURE);
if (OwnerIsBrowserFrame() &&
mOwnerContent->HasAttr(kNameSpaceID_None, nsGkAtoms::mozapp)) {
nsCOMPtr<nsIAppsService> appsService =
do_GetService(APPS_SERVICE_CONTRACTID);
if (!appsService) {
NS_ERROR("Apps Service is not available!");
return NS_ERROR_FAILURE;
}
nsAutoString manifest;
mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::mozapp, manifest);
PRUint32 appId;
appsService->GetAppLocalIdByManifestURL(manifest, &appId);
mDocShell->SetAppId(appId);
}
if (!mNetworkCreated) {
nsCOMPtr<nsIDocShellHistory> history = do_QueryInterface(mDocShell);
if (history) {

View File

@ -763,7 +763,6 @@ nsDocShell::nsDocShell():
#ifdef DEBUG
mInEnsureScriptEnv(false),
#endif
mAppId(nsIScriptSecurityManager::NO_APP_ID),
mParentCharsetSource(0)
{
mHistoryID = ++gDocshellIDCounter;
@ -12065,10 +12064,6 @@ nsDocShell::GetInheritedFrameType()
nsDocShell::FrameType
nsDocShell::GetFrameType()
{
if (mAppId != nsIScriptSecurityManager::NO_APP_ID) {
return eFrameTypeApp;
}
return mIsBrowserFrame ? eFrameTypeBrowser : eFrameTypeRegular;
}
@ -12132,37 +12127,3 @@ nsDocShell::GetIsBelowContentBoundary(bool* aIsInContentBoundary)
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::SetAppId(PRUint32 aAppId)
{
MOZ_ASSERT(mAppId == nsIScriptSecurityManager::NO_APP_ID);
MOZ_ASSERT(aAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID);
mAppId = aAppId;
return NS_OK;
}
NS_IMETHODIMP
nsDocShell::GetAppId(PRUint32* aAppId)
{
if (mAppId != nsIScriptSecurityManager::NO_APP_ID) {
MOZ_ASSERT(GetFrameType() == eFrameTypeApp);
*aAppId = mAppId;
return NS_OK;
}
MOZ_ASSERT(GetFrameType() != eFrameTypeApp);
nsCOMPtr<nsIDocShellTreeItem> parentAsItem;
GetSameTypeParent(getter_AddRefs(parentAsItem));
nsCOMPtr<nsIDocShell> parent = do_QueryInterface(parentAsItem);
if (!parent) {
*aAppId = nsIScriptSecurityManager::NO_APP_ID;
return NS_OK;
}
return parent->GetAppId(aAppId);
}

View File

@ -824,8 +824,6 @@ protected:
nsRefPtr<nsDOMNavigationTiming> mTiming;
PRUint32 mAppId;
private:
nsCOMPtr<nsIAtom> mForcedCharset;
nsCOMPtr<nsIAtom> mParentCharset;

View File

@ -39,7 +39,7 @@ interface nsIWebBrowserPrint;
interface nsIVariant;
interface nsIPrivacyTransitionObserver;
[scriptable, builtinclass, uuid(c98f0f21-fe96-4f06-9978-0a9422a789fa)]
[scriptable, builtinclass, uuid(57889367-590b-4ea2-a345-5211253babf5)]
interface nsIDocShell : nsISupports
{
/**
@ -630,23 +630,4 @@ interface nsIDocShell : nsISupports
* in his parent hierarchy.
*/
readonly attribute boolean isBelowContentBoundary;
/**
* Set the app id this docshell is associated with. The id has to be a valid
* app id. If the docshell isn't associated with any app, the value should be
* nsIScriptSecurityManager::NO_APP_ID. However, this is the default value if
* nothing is et.
*
* This method is [noscript] to reduce the scope. It should be used at very
* specific moments.
*
* Calling setAppId() will mark the frame as an app frame.
*/
[noscript] void setAppId(in unsigned long appId);
/**
* Returns the app id of the app the docshell is in. Returns
* nsIScriptSecurityManager::NO_APP_ID if the docshell is not in an app.
*/
readonly attribute unsigned long appId;
};