diff --git a/accessible/jsat/AccessFu.jsm b/accessible/jsat/AccessFu.jsm index c6b16b38fbc1..f78b870c8368 100644 --- a/accessible/jsat/AccessFu.jsm +++ b/accessible/jsat/AccessFu.jsm @@ -342,9 +342,9 @@ this.AccessFu = { // jshint ignore:line case 'remote-browser-shown': case 'inprocess-browser-shown': { - // Ignore notifications that aren't from a BrowserOrApp + // Ignore notifications that aren't from a Browser let frameLoader = aSubject.QueryInterface(Ci.nsIFrameLoader); - if (!frameLoader.ownerIsMozBrowserOrAppFrame) { + if (!frameLoader.ownerIsMozBrowserFrame) { return; } this._handleMessageManager(frameLoader.messageManager); diff --git a/b2g/chrome/content/devtools/hud.js b/b2g/chrome/content/devtools/hud.js index 64e9d553d883..08e7906b31aa 100644 --- a/b2g/chrome/content/devtools/hud.js +++ b/b2g/chrome/content/devtools/hud.js @@ -36,8 +36,6 @@ XPCOMUtils.defineLazyGetter(this, 'MemoryFront', function() { return devtools.require('devtools/server/actors/memory').MemoryFront; }); -Cu.import('resource://gre/modules/Frames.jsm'); - var _telemetryDebug = false; function telemetryDebug(...args) { @@ -54,7 +52,6 @@ function telemetryDebug(...args) { */ var developerHUD = { - _targets: new Map(), _histograms: new Set(), _customHistograms: new Set(), _client: null, @@ -99,13 +96,6 @@ var developerHUD = { } } - Frames.addObserver(this); - - let appFrames = Frames.list().filter(frame => frame.getAttribute('mozapp')); - for (let frame of appFrames) { - this.trackFrame(frame); - } - SettingsListener.observe('hud.logging', this._logging, enabled => { this._logging = enabled; }); @@ -124,63 +114,10 @@ var developerHUD = { return; } - for (let frame of this._targets.keys()) { - this.untrackFrame(frame); - } - - Frames.removeObserver(this); - this._client.close(); delete this._client; }, - /** - * This method will ask all registered watchers to track and update metrics - * on an app frame. - */ - trackFrame(frame) { - if (this._targets.has(frame)) { - return; - } - - DebuggerServer.connectToChild(this._conn, frame).then(actor => { - let target = new Target(frame, actor); - this._targets.set(frame, target); - - for (let w of this._watchers) { - w.trackTarget(target); - } - }); - }, - - untrackFrame(frame) { - let target = this._targets.get(frame); - if (target) { - for (let w of this._watchers) { - w.untrackTarget(target); - } - - target.destroy(); - this._targets.delete(frame); - } - }, - - onFrameCreated(frame, isFirstAppFrame) { - let mozapp = frame.getAttribute('mozapp'); - if (!mozapp) { - return; - } - this.trackFrame(frame); - }, - - onFrameDestroyed(frame, isLastAppFrame) { - let mozapp = frame.getAttribute('mozapp'); - if (!mozapp) { - return; - } - this.untrackFrame(frame); - }, - log(message) { if (this._logging) { dump(DEVELOPER_HUD_LOG_PREFIX + ': ' + message + '\n'); diff --git a/b2g/chrome/content/shell.js b/b2g/chrome/content/shell.js index d483f9a64f53..68979056955a 100644 --- a/b2g/chrome/content/shell.js +++ b/b2g/chrome/content/shell.js @@ -358,7 +358,6 @@ var shell = { document.createElementNS('http://www.w3.org/1999/xhtml', 'html:iframe'); systemAppFrame.setAttribute('id', 'systemapp'); systemAppFrame.setAttribute('mozbrowser', 'true'); - systemAppFrame.setAttribute('mozapp', manifestURL); systemAppFrame.setAttribute('allowfullscreen', 'true'); systemAppFrame.setAttribute('src', 'blank.html'); let container = document.getElementById('container'); diff --git a/b2g/chrome/content/shell_remote.js b/b2g/chrome/content/shell_remote.js index 1f1115ef0a02..7c273a96f959 100644 --- a/b2g/chrome/content/shell_remote.js +++ b/b2g/chrome/content/shell_remote.js @@ -53,7 +53,6 @@ var remoteShell = { document.createElementNS("http://www.w3.org/1999/xhtml", "html:iframe"); systemAppFrame.setAttribute("id", this.id); systemAppFrame.setAttribute("mozbrowser", "true"); - systemAppFrame.setAttribute("mozapp", manifestURL); systemAppFrame.setAttribute("allowfullscreen", "true"); systemAppFrame.setAttribute("src", "blank.html"); diff --git a/b2g/components/DebuggerActors.js b/b2g/components/DebuggerActors.js index 318c46e68844..da77a794be04 100644 --- a/b2g/components/DebuggerActors.js +++ b/b2g/components/DebuggerActors.js @@ -30,10 +30,7 @@ function B2GTabList(connection) { B2GTabList.prototype = Object.create(BrowserTabList.prototype); B2GTabList.prototype._getBrowsers = function() { - return Frames.list().filter(frame => { - // Ignore app frames - return !frame.getAttribute("mozapp"); - }); + return Frames.list(); }; B2GTabList.prototype._getSelectedBrowser = function() { @@ -59,21 +56,11 @@ B2GTabList.prototype._listenForEventsIf = function(shouldListen) { }; B2GTabList.prototype.onFrameCreated = function(frame) { - let mozapp = frame.getAttribute("mozapp"); - if (mozapp) { - // Ignore app frames - return; - } this._notifyListChanged(); this._checkListening(); }; B2GTabList.prototype.onFrameDestroyed = function(frame) { - let mozapp = frame.getAttribute("mozapp"); - if (mozapp) { - // Ignore app frames - return; - } let actor = this._actorByBrowser.get(frame); if (actor) { this._handleActorClose(actor, frame); diff --git a/b2g/components/ErrorPage.jsm b/b2g/components/ErrorPage.jsm index 2c0c64c21262..f320c3e7f84d 100644 --- a/b2g/components/ErrorPage.jsm +++ b/b2g/components/ErrorPage.jsm @@ -176,8 +176,8 @@ var ErrorPage = { observe: function errorPageObserve(aSubject, aTopic, aData) { let frameLoader = aSubject.QueryInterface(Ci.nsIFrameLoader); - // Ignore notifications that aren't from a BrowserOrApp - if (!frameLoader.ownerIsMozBrowserOrAppFrame) { + // Ignore notifications that aren't from a Browser + if (!frameLoader.ownerIsMozBrowserFrame) { return; } this._listenError(frameLoader); diff --git a/b2g/components/Frames.jsm b/b2g/components/Frames.jsm index 0eb00cb4cb7b..dae3618e8b91 100644 --- a/b2g/components/Frames.jsm +++ b/b2g/components/Frames.jsm @@ -19,9 +19,6 @@ const Observer = { // the FrameDestroyed event with a frame reference. _frames: new Map(), - // Also save current number of iframes opened by app - _apps: new Map(), - start: function () { Services.obs.addObserver(this, 'remote-browser-shown', false); Services.obs.addObserver(this, 'inprocess-browser-shown', false); @@ -30,10 +27,6 @@ const Observer = { SystemAppProxy.getFrames().forEach(frame => { let mm = frame.QueryInterface(Ci.nsIFrameLoaderOwner).frameLoader.messageManager; this._frames.set(mm, frame); - let mozapp = frame.getAttribute('mozapp'); - if (mozapp) { - this._apps.set(mozapp, (this._apps.get(mozapp) || 0) + 1); - } }); }, @@ -42,7 +35,6 @@ const Observer = { Services.obs.removeObserver(this, 'inprocess-browser-shown'); Services.obs.removeObserver(this, 'message-manager-close'); this._frames.clear(); - this._apps.clear(); }, observe: function (subject, topic, data) { @@ -70,17 +62,9 @@ const Observer = { onMessageManagerCreated: function (mm, frame) { this._frames.set(mm, frame); - let isFirstAppFrame = null; - let mozapp = frame.getAttribute('mozapp'); - if (mozapp) { - let count = (this._apps.get(mozapp) || 0) + 1; - this._apps.set(mozapp, count); - isFirstAppFrame = (count === 1); - } - listeners.forEach(function (listener) { try { - listener.onFrameCreated(frame, isFirstAppFrame); + listener.onFrameCreated(frame); } catch(e) { dump('Exception while calling Frames.jsm listener:' + e + '\n' + e.stack + '\n'); @@ -97,17 +81,9 @@ const Observer = { this._frames.delete(mm); - let isLastAppFrame = null; - let mozapp = frame.getAttribute('mozapp'); - if (mozapp) { - let count = (this._apps.get(mozapp) || 0) - 1; - this._apps.set(mozapp, count); - isLastAppFrame = (count === 0); - } - listeners.forEach(function (listener) { try { - listener.onFrameDestroyed(frame, isLastAppFrame); + listener.onFrameDestroyed(frame); } catch(e) { dump('Exception while calling Frames.jsm listener:' + e + '\n' + e.stack + '\n'); diff --git a/b2g/components/SafeMode.jsm b/b2g/components/SafeMode.jsm index 9f9342f679e5..375052e7c400 100644 --- a/b2g/components/SafeMode.jsm +++ b/b2g/components/SafeMode.jsm @@ -76,7 +76,6 @@ this.SafeMode = { debug("Registry is ready, loading " + url); let frame = document.createElementNS("http://www.w3.org/1999/xhtml", "html:iframe"); frame.setAttribute("mozbrowser", "true"); - frame.setAttribute("mozapp", shell.manifestURL); frame.setAttribute("id", "systemapp"); // To keep screen.js happy. let contentBrowser = document.body.appendChild(frame); diff --git a/b2g/simulator/custom-prefs.js b/b2g/simulator/custom-prefs.js index 634a9cebea8e..2ff59a167025 100644 --- a/b2g/simulator/custom-prefs.js +++ b/b2g/simulator/custom-prefs.js @@ -1,6 +1,5 @@ user_pref("devtools.debugger.prompt-connection", false); user_pref("devtools.debugger.forbid-certified-apps", false); -user_pref("devtools.apps.forbidden-permissions", ""); user_pref("b2g.software-buttons", true); // Required for Mulet in order to run the debugger server from the command line diff --git a/caps/nsIPrincipal.idl b/caps/nsIPrincipal.idl index c9c461d3b829..b9d407affe58 100644 --- a/caps/nsIPrincipal.idl +++ b/caps/nsIPrincipal.idl @@ -298,10 +298,10 @@ interface nsIPrincipal : nsISerializable /** * Returns true iff the principal is inside an isolated mozbrowser element. - * \n' + - '\n' + - ''; - - var iframes = document.getElementsByTagName("iframe"); - var promises = [] - for (var i = 0; i < promises.length; ++i) { - promises.push(new Promise(resolve => { - iframes[i].addEventListener("load", resolve); - })); - } - - return Promise.all(promises); -}); - -var prefs = new Promise(resolve => { - SpecialPowers.pushPrefEnv( - { set: [[ "dom.mozBrowserFramesEnabled", true ], - [ "dom.ipc.browser_frames.oop_by_default", false ]] }, - resolve); -}); - - -
-
-
- - diff --git a/devtools/server/actors/webconsole.js b/devtools/server/actors/webconsole.js index 95926f6e649f..6a6ad67e6d71 100644 --- a/devtools/server/actors/webconsole.js +++ b/devtools/server/actors/webconsole.js @@ -569,11 +569,9 @@ WebConsoleActor.prototype = let startedListeners = []; let window = !this.parentActor.isRootActor ? this.window : null; - let appId = null; let messageManager = null; if (this._parentIsContentActor) { - appId = this.parentActor.docShell.appId; messageManager = this.parentActor.messageManager; } @@ -604,16 +602,16 @@ WebConsoleActor.prototype = // Create a StackTraceCollector that's going to be shared both by the // NetworkMonitorChild (getting messages about requests from parent) and // by the NetworkMonitor that directly watches service workers requests. - this.stackTraceCollector = new StackTraceCollector({ window, appId }); + this.stackTraceCollector = new StackTraceCollector({ window }); this.stackTraceCollector.init(); let processBoundary = Services.appinfo.processType != Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT; - if ((appId || messageManager) && processBoundary) { + if (messageManager && processBoundary) { // Start a network monitor in the parent process to listen to // most requests than happen in parent this.networkMonitor = - new NetworkMonitorChild(appId, this.parentActor.outerWindowID, + new NetworkMonitorChild(this.parentActor.outerWindowID, messageManager, this.conn, this); this.networkMonitor.init(); // Spawn also one in the child to listen to service workers diff --git a/devtools/shared/layout/utils.js b/devtools/shared/layout/utils.js index 1e6ab5075ada..54f3ba84e519 100644 --- a/devtools/shared/layout/utils.js +++ b/devtools/shared/layout/utils.js @@ -37,12 +37,12 @@ function getTopWindow(win) { .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShell); - if (!docShell.isMozBrowserOrApp) { + if (!docShell.isMozBrowser) { return win.top; } let topDocShell = - docShell.getSameTypeRootTreeItemIgnoreBrowserAndAppBoundaries(); + docShell.getSameTypeRootTreeItemIgnoreBrowserBoundaries(); return topDocShell ? topDocShell.contentViewer.DOMDocument.defaultView @@ -98,12 +98,12 @@ function getParentWindow(win) { .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsIDocShell); - if (!docShell.isMozBrowserOrApp) { + if (!docShell.isMozBrowser) { return win.parent; } let parentDocShell = - docShell.getSameTypeParentIgnoreBrowserAndAppBoundaries(); + docShell.getSameTypeParentIgnoreBrowserBoundaries(); return parentDocShell ? parentDocShell.contentViewer.DOMDocument.defaultView diff --git a/devtools/shared/webconsole/network-monitor.js b/devtools/shared/webconsole/network-monitor.js index dec0be39d385..a90dc525f377 100644 --- a/devtools/shared/webconsole/network-monitor.js +++ b/devtools/shared/webconsole/network-monitor.js @@ -1508,8 +1508,6 @@ NetworkMonitor.prototype = { * data to the WebConsoleActor or to a NetworkEventActor. * * @constructor - * @param number appId - * The web appId of the child process. * @param number outerWindowID * The outerWindowID of the TabActor's main window. * @param nsIMessageManager messageManager @@ -1519,8 +1517,7 @@ NetworkMonitor.prototype = { * @param object owner * The WebConsoleActor that is listening for the network requests. */ -function NetworkMonitorChild(appId, outerWindowID, messageManager, conn, owner) { - this.appId = appId; +function NetworkMonitorChild(outerWindowID, messageManager, conn, owner) { this.outerWindowID = outerWindowID; this.conn = conn; this.owner = owner; @@ -1533,7 +1530,6 @@ function NetworkMonitorChild(appId, outerWindowID, messageManager, conn, owner) exports.NetworkMonitorChild = NetworkMonitorChild; NetworkMonitorChild.prototype = { - appId: null, owner: null, _netEvents: null, _saveRequestAndResponseBodies: true, @@ -1581,7 +1577,6 @@ NetworkMonitorChild.prototype = { mm.addMessageListener("debug:netmonitor:updateEvent", this._onUpdateEvent); mm.sendAsyncMessage("debug:netmonitor", { - appId: this.appId, outerWindowID: this.outerWindowID, action: "start", }); diff --git a/docshell/base/LoadContext.cpp b/docshell/base/LoadContext.cpp index c4095a951a61..723d15a51e87 100644 --- a/docshell/base/LoadContext.cpp +++ b/docshell/base/LoadContext.cpp @@ -169,17 +169,6 @@ LoadContext::GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserEleme return NS_OK; } -NS_IMETHODIMP -LoadContext::GetAppId(uint32_t* aAppId) -{ - MOZ_ASSERT(mIsNotNull); - - NS_ENSURE_ARG_POINTER(aAppId); - - *aAppId = mOriginAttributes.mAppId; - return NS_OK; -} - NS_IMETHODIMP LoadContext::GetOriginAttributes(JS::MutableHandleValue aAttrs) { diff --git a/docshell/base/nsDSURIContentListener.cpp b/docshell/base/nsDSURIContentListener.cpp index cfac54f7f4ec..65e5220325c8 100644 --- a/docshell/base/nsDSURIContentListener.cpp +++ b/docshell/base/nsDSURIContentListener.cpp @@ -331,7 +331,7 @@ nsDSURIContentListener::CheckOneFrameOptionsPolicy(nsIHttpChannel* aHttpChannel, curDocShellItem->GetParent(getter_AddRefs(parentDocShellItem))) && parentDocShellItem) { nsCOMPtr curDocShell = do_QueryInterface(curDocShellItem); - if (curDocShell && curDocShell->GetIsMozBrowserOrApp()) { + if (curDocShell && curDocShell->GetIsMozBrowser()) { break; } diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 6411a8a93f35..1bab8c0c7639 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -2603,7 +2603,7 @@ nsDocShell::GetFullscreenAllowed(bool* aFullscreenAllowed) NS_IMETHODIMP nsDocShell::SetFullscreenAllowed(bool aFullscreenAllowed) { - if (!nsIDocShell::GetIsMozBrowserOrApp()) { + if (!nsIDocShell::GetIsMozBrowser()) { // Only allow setting of fullscreenAllowed on content/process boundaries. // At non-boundaries the fullscreenAllowed attribute is calculated based on // whether all enclosing frames have the "mozFullscreenAllowed" attribute @@ -3433,7 +3433,7 @@ nsDocShell::GetSameTypeParent(nsIDocShellTreeItem** aParent) NS_ENSURE_ARG_POINTER(aParent); *aParent = nullptr; - if (nsIDocShell::GetIsMozBrowserOrApp()) { + if (nsIDocShell::GetIsMozBrowser()) { return NS_OK; } @@ -3450,7 +3450,7 @@ nsDocShell::GetSameTypeParent(nsIDocShellTreeItem** aParent) } NS_IMETHODIMP -nsDocShell::GetSameTypeParentIgnoreBrowserAndAppBoundaries(nsIDocShell** aParent) +nsDocShell::GetSameTypeParentIgnoreBrowserBoundaries(nsIDocShell** aParent) { NS_ENSURE_ARG_POINTER(aParent); *aParent = nullptr; @@ -3504,18 +3504,18 @@ nsDocShell::GetSameTypeRootTreeItem(nsIDocShellTreeItem** aRootTreeItem) } NS_IMETHODIMP -nsDocShell::GetSameTypeRootTreeItemIgnoreBrowserAndAppBoundaries(nsIDocShell ** aRootTreeItem) +nsDocShell::GetSameTypeRootTreeItemIgnoreBrowserBoundaries(nsIDocShell** aRootTreeItem) { NS_ENSURE_ARG_POINTER(aRootTreeItem); *aRootTreeItem = static_cast(this); nsCOMPtr parent; - NS_ENSURE_SUCCESS(GetSameTypeParentIgnoreBrowserAndAppBoundaries(getter_AddRefs(parent)), + NS_ENSURE_SUCCESS(GetSameTypeParentIgnoreBrowserBoundaries(getter_AddRefs(parent)), NS_ERROR_FAILURE); while (parent) { *aRootTreeItem = parent; NS_ENSURE_SUCCESS((*aRootTreeItem)-> - GetSameTypeParentIgnoreBrowserAndAppBoundaries(getter_AddRefs(parent)), + GetSameTypeParentIgnoreBrowserBoundaries(getter_AddRefs(parent)), NS_ERROR_FAILURE); } NS_ADDREF(*aRootTreeItem); @@ -3570,8 +3570,7 @@ nsDocShell::CanAccessItem(nsIDocShellTreeItem* aTargetItem, } if (targetDS->GetIsInIsolatedMozBrowserElement() != - accessingDS->GetIsInIsolatedMozBrowserElement() || - targetDS->GetAppId() != accessingDS->GetAppId()) { + accessingDS->GetIsInIsolatedMozBrowserElement()) { return false; } @@ -3595,7 +3594,7 @@ nsDocShell::CanAccessItem(nsIDocShellTreeItem* aTargetItem, if (OriginAttributes::IsFirstPartyEnabled()) { if (accessingDS == accessingRootDS && aAccessingItem->ItemType() == nsIDocShellTreeItem::typeContent && - !accessingDS->GetIsMozBrowserOrApp()) { + !accessingDS->GetIsMozBrowser()) { nsCOMPtr accessingDoc = aAccessingItem->GetDocument(); @@ -3609,7 +3608,7 @@ nsDocShell::CanAccessItem(nsIDocShellTreeItem* aTargetItem, if (targetDS == targetRootDS && aTargetItem->ItemType() == nsIDocShellTreeItem::typeContent && - !targetDS->GetIsMozBrowserOrApp()) { + !targetDS->GetIsMozBrowser()) { nsCOMPtr targetDoc = aAccessingItem->GetDocument(); @@ -3806,7 +3805,7 @@ nsDocShell::DoFindItemWithName(const nsAString& aName, // If we have a same-type parent, respecting browser and app boundaries. // NOTE: Could use GetSameTypeParent if the issues described in bug 1310344 are fixed. - if (!GetIsMozBrowserOrApp() && parentAsTreeItem->ItemType() == mItemType) { + if (!GetIsMozBrowser() && parentAsTreeItem->ItemType() == mItemType) { return parentAsTreeItem->FindItemWithName( aName, static_cast(this), @@ -5369,23 +5368,13 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL, errorPageUrl.AppendLiteral("&f="); errorPageUrl.AppendASCII(frameType.get()); - // Append the manifest URL if the error comes from an app. - nsString manifestURL; - nsresult rv = GetAppManifestURL(manifestURL); - if (manifestURL.Length() > 0) { - nsCString manifestParam; - SAFE_ESCAPE(manifestParam, NS_ConvertUTF16toUTF8(manifestURL), url_Path); - errorPageUrl.AppendLiteral("&m="); - errorPageUrl.AppendASCII(manifestParam.get()); - } - // netError.xhtml's getDescription only handles the "d" parameter at the // end of the URL, so append it last. errorPageUrl.AppendLiteral("&d="); errorPageUrl.AppendASCII(escapedDescription.get()); nsCOMPtr errorPageURI; - rv = NS_NewURI(getter_AddRefs(errorPageURI), errorPageUrl); + nsresult rv = NS_NewURI(getter_AddRefs(errorPageURI), errorPageUrl); NS_ENSURE_SUCCESS(rv, rv); return InternalLoad(errorPageURI, nullptr, false, nullptr, @@ -6205,9 +6194,7 @@ nsDocShell::SetIsActive(bool aIsActive) mScriptGlobal->SetIsBackground(!aIsActive); if (nsCOMPtr doc = mScriptGlobal->GetExtantDoc()) { // Update orientation when the top-level browsing context becomes active. - // We make an exception for apps because they currently rely on - // orientation locks persisting across browsing contexts. - if (aIsActive && !GetIsApp()) { + if (aIsActive) { nsCOMPtr parent; GetSameTypeParent(getter_AddRefs(parent)); if (!parent) { @@ -6244,7 +6231,7 @@ nsDocShell::SetIsActive(bool aIsActive) continue; } - if (!docshell->GetIsMozBrowserOrApp()) { + if (!docshell->GetIsMozBrowser()) { docshell->SetIsActive(aIsActive); } } @@ -10556,9 +10543,7 @@ nsDocShell::InternalLoad(nsIURI* aURI, // lock the orientation of the document to the document's default // orientation. We don't explicitly check for a top-level browsing context // here because orientation is only set on top-level browsing contexts. - // We make an exception for apps because they currently rely on - // orientation locks persisting across browsing contexts. - if (OrientationLock() != eScreenOrientation_None && !GetIsApp()) { + if (OrientationLock() != eScreenOrientation_None) { #ifdef DEBUG nsCOMPtr parent; GetSameTypeParent(getter_AddRefs(parent)); @@ -10911,7 +10896,7 @@ nsDocShell::DoURILoad(nsIURI* aURI, NeckoOriginAttributes neckoAttrs; bool isTopLevelDoc = aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT && mItemType == typeContent && - !GetIsMozBrowserOrApp(); + !GetIsMozBrowser(); neckoAttrs.InheritFromDocShellToNecko(GetOriginAttributes(), isTopLevelDoc, aURI); rv = loadInfo->SetOriginAttributes(neckoAttrs); if (NS_WARN_IF(NS_FAILED(rv))) { @@ -14238,16 +14223,9 @@ nsDocShell::GetFrameType(uint32_t* aFrameType) } /* [infallible] */ NS_IMETHODIMP -nsDocShell::GetIsApp(bool* aIsApp) +nsDocShell::GetIsMozBrowser(bool* aIsMozBrowser) { - *aIsApp = (mFrameType == FRAME_TYPE_APP); - return NS_OK; -} - -/* [infallible] */ NS_IMETHODIMP -nsDocShell::GetIsMozBrowserOrApp(bool* aIsMozBrowserOrApp) -{ - *aIsMozBrowserOrApp = (mFrameType != FRAME_TYPE_REGULAR); + *aIsMozBrowser = (mFrameType == FRAME_TYPE_BROWSER); return NS_OK; } @@ -14291,9 +14269,9 @@ nsDocShell::GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElemen } /* [infallible] */ NS_IMETHODIMP -nsDocShell::GetIsInMozBrowserOrApp(bool* aIsInMozBrowserOrApp) +nsDocShell::GetIsInMozBrowser(bool* aIsInMozBrowser) { - *aIsInMozBrowserOrApp = (GetInheritedFrameType() != FRAME_TYPE_REGULAR); + *aIsInMozBrowser = (GetInheritedFrameType() == FRAME_TYPE_BROWSER); return NS_OK; } @@ -14311,25 +14289,6 @@ nsDocShell::GetIsTopLevelContentDocShell(bool* aIsTopLevelContentDocShell) return NS_OK; } -/* [infallible] */ NS_IMETHODIMP -nsDocShell::GetAppId(uint32_t* aAppId) -{ - if (mOriginAttributes.mAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID) { - *aAppId = mOriginAttributes.mAppId; - return NS_OK; - } - - nsCOMPtr parent; - GetSameTypeParentIgnoreBrowserAndAppBoundaries(getter_AddRefs(parent)); - - if (!parent) { - *aAppId = nsIScriptSecurityManager::NO_APP_ID; - return NS_OK; - } - - return parent->GetAppId(aAppId); -} - // Implements nsILoadContext.originAttributes NS_IMETHODIMP nsDocShell::GetOriginAttributes(JS::MutableHandle aVal) @@ -14426,23 +14385,6 @@ nsDocShell::SetOriginAttributes(JS::Handle aOriginAttributes, return SetOriginAttributes(attrs); } -NS_IMETHODIMP -nsDocShell::GetAppManifestURL(nsAString& aAppManifestURL) -{ - uint32_t appId = nsIDocShell::GetAppId(); - if (appId != nsIScriptSecurityManager::NO_APP_ID && - appId != nsIScriptSecurityManager::UNKNOWN_APP_ID) { - nsCOMPtr appsService = - do_GetService(APPS_SERVICE_CONTRACTID); - NS_ASSERTION(appsService, "No AppsService available"); - appsService->GetManifestURLByLocalId(appId, aAppManifestURL); - } else { - aAppManifestURL.SetLength(0); - } - - return NS_OK; -} - NS_IMETHODIMP nsDocShell::GetAsyncPanZoomEnabled(bool* aOut) { diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h index 6617c7909c64..7c4282c9bcf3 100644 --- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -779,8 +779,6 @@ protected: static const nsCString FrameTypeToString(uint32_t aFrameType) { switch (aFrameType) { - case FRAME_TYPE_APP: - return NS_LITERAL_CSTRING("app"); case FRAME_TYPE_BROWSER: return NS_LITERAL_CSTRING("browser"); case FRAME_TYPE_REGULAR: diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl index 8261c45dcba2..7193fd379b31 100644 --- a/docshell/base/nsIDocShell.idl +++ b/docshell/base/nsIDocShell.idl @@ -792,34 +792,28 @@ interface nsIDocShell : nsIDocShellTreeItem */ [noscript] void notifyScrollObservers(); - /** - * Returns true iff the docshell corresponds to an