From 7b6e3a2d4ac41eb1ab229ce6e3c36c86e2057ff3 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sun, 17 Nov 2024 20:39:45 +0100 Subject: [PATCH] Issue #2653 - Part 1: Initial cleanup of AppId and isolated mozbrowser. This removes a lot of the plumbing for having the platform embed itself through IPC which was required for B2G running the browser as both shell and browser application. --- accessible/jsat/AccessFu.jsm | 4 +- caps/nsIPrincipal.idl | 9 - caps/nsScriptSecurityManager.cpp | 58 +-- devtools/server/actors/webconsole.js | 8 +- devtools/shared/layout/utils.js | 8 +- devtools/shared/webconsole/network-monitor.js | 7 +- docshell/base/LoadContext.cpp | 22 - docshell/base/LoadContext.h | 4 - docshell/base/nsDSURIContentListener.cpp | 2 +- docshell/base/nsDocShell.cpp | 120 +---- docshell/base/nsDocShell.h | 2 - docshell/base/nsIDocShell.idl | 85 +-- docshell/base/nsIDocShellTreeItem.idl | 7 +- docshell/base/nsILoadContext.idl | 15 - dom/apps/PermissionsTable.jsm | 5 - dom/base/Navigator.cpp | 1 - dom/base/ThirdPartyUtil.cpp | 3 +- dom/base/nsContentUtils.cpp | 2 +- dom/base/nsFrameLoader.cpp | 186 +------ dom/base/nsFrameLoader.h | 35 -- dom/base/nsGkAtomList.h | 3 - dom/base/nsGlobalWindow.cpp | 27 +- dom/base/nsIFrameLoader.idl | 14 +- dom/base/nsInProcessTabChildGlobal.cpp | 17 +- dom/base/nsInProcessTabChildGlobal.h | 7 +- dom/base/nsObjectLoadingContent.cpp | 11 - dom/browser-element/BrowserElementChild.js | 2 +- .../BrowserElementCopyPaste.js | 2 +- dom/browser-element/BrowserElementParent.cpp | 17 - dom/events/EventStateManager.cpp | 4 +- dom/html/nsBrowserElement.cpp | 13 +- dom/html/nsBrowserElement.h | 1 - dom/html/nsGenericHTMLFrameElement.cpp | 158 +----- dom/inputmethod/Keyboard.jsm | 4 +- dom/interfaces/html/nsIMozBrowserFrame.idl | 35 +- dom/ipc/ContentBridgeChild.cpp | 6 - dom/ipc/ContentBridgeChild.h | 3 - dom/ipc/ContentBridgeParent.cpp | 4 - dom/ipc/ContentBridgeParent.h | 12 - dom/ipc/ContentChild.cpp | 12 +- dom/ipc/ContentChild.h | 5 - dom/ipc/ContentParent.cpp | 485 ++++-------------- dom/ipc/ContentParent.h | 52 +- dom/ipc/ContentProcessManager.cpp | 14 - dom/ipc/ContentProcessManager.h | 9 - dom/ipc/PContent.ipdl | 35 +- dom/ipc/PContentBridge.ipdl | 2 +- dom/ipc/PTabContext.ipdlh | 3 - dom/ipc/ProcessPriorityManager.cpp | 8 +- dom/ipc/TabChild.cpp | 42 +- dom/ipc/TabChild.h | 2 - dom/ipc/TabContext.cpp | 186 +------ dom/ipc/TabContext.h | 123 +---- dom/ipc/TabParent.cpp | 3 - dom/ipc/nsIContentChild.cpp | 1 - dom/ipc/nsIContentChild.h | 2 - dom/ipc/nsIContentParent.cpp | 2 - dom/ipc/nsIContentParent.h | 3 - dom/media/MediaManager.cpp | 26 +- dom/network/TCPServerSocketParent.cpp | 16 +- dom/network/TCPSocketParent.cpp | 29 +- dom/webidl/HTMLIFrameElement.webidl | 6 - dom/xul/nsXULElement.cpp | 11 - dom/xul/nsXULElement.h | 1 - .../windowwatcher/nsWindowWatcher.cpp | 2 +- extensions/cookie/nsPermissionManager.cpp | 1 - layout/base/nsPresShell.cpp | 14 - layout/generic/nsViewportFrame.cpp | 2 +- layout/style/nsCSSRuleProcessor.cpp | 2 +- modules/libpref/init/all.js | 2 - netwerk/base/nsNetUtil.cpp | 44 +- netwerk/base/nsUDPSocket.cpp | 3 +- netwerk/cookie/nsCookieService.cpp | 1 - netwerk/protocol/http/HttpBaseChannel.cpp | 4 - .../prefetch/OfflineCacheUpdateParent.cpp | 14 - uriloader/prefetch/nsIOfflineCacheUpdate.idl | 6 +- xpfe/appshell/nsContentTreeOwner.cpp | 2 +- 77 files changed, 297 insertions(+), 1801 deletions(-) diff --git a/accessible/jsat/AccessFu.jsm b/accessible/jsat/AccessFu.jsm index 4cfbfc2fa3..e0d8ecb493 100644 --- a/accessible/jsat/AccessFu.jsm +++ b/accessible/jsat/AccessFu.jsm @@ -340,9 +340,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/caps/nsIPrincipal.idl b/caps/nsIPrincipal.idl index 03f293f7b2..f197021caa 100644 --- a/caps/nsIPrincipal.idl +++ b/caps/nsIPrincipal.idl @@ -303,15 +303,6 @@ interface nsIPrincipal : nsISerializable */ [infallible] readonly attribute unsigned long privateBrowsingId; - /** - * Returns true iff the principal is inside an isolated mozbrowser element. - *