Bug 1449791 - Remove XUL overlay provider.
MozReview-Commit-ID: 7HlJQ59r4Vx
--- a/chrome/nsChromeRegistry.cpp
+++ b/chrome/nsChromeRegistry.cpp
@@ -105,19 +105,16 @@ nsChromeRegistry::~nsChromeRegistry()
{
gChromeRegistry = nullptr;
}
NS_INTERFACE_MAP_BEGIN(nsChromeRegistry)
NS_INTERFACE_MAP_ENTRY(nsIChromeRegistry)
NS_INTERFACE_MAP_ENTRY(nsIXULChromeRegistry)
NS_INTERFACE_MAP_ENTRY(nsIToolkitChromeRegistry)
-#ifdef MOZ_XUL
- NS_INTERFACE_MAP_ENTRY(nsIXULOverlayProvider)
-#endif
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIChromeRegistry)
NS_INTERFACE_MAP_END
NS_IMPL_ADDREF(nsChromeRegistry)
NS_IMPL_RELEASE(nsChromeRegistry)
--- a/chrome/nsChromeRegistry.h
+++ b/chrome/nsChromeRegistry.h
@@ -5,20 +5,16 @@
#ifndef nsChromeRegistry_h
#define nsChromeRegistry_h
#include "nsIToolkitChromeRegistry.h"
#include "nsIObserver.h"
#include "nsWeakReference.h"
-#ifdef MOZ_XUL
-#include "nsIXULOverlayProvider.h"
-#endif
-
#include "nsString.h"
#include "nsURIHashKey.h"
#include "nsInterfaceHashtable.h"
#include "nsXULAppAPI.h"
#include "mozilla/FileLocation.h"
class nsPIDOMWindowOuter;
@@ -31,19 +27,16 @@ class nsIURL;
// sense for one side erroring out in the other.
// for component registration
// {47049e42-1d87-482a-984d-56ae185e367a}
#define NS_CHROMEREGISTRY_CID \
{ 0x47049e42, 0x1d87, 0x482a, { 0x98, 0x4d, 0x56, 0xae, 0x18, 0x5e, 0x36, 0x7a } }
class nsChromeRegistry : public nsIToolkitChromeRegistry,
-#ifdef MOZ_XUL
- public nsIXULOverlayProvider,
-#endif
public nsIObserver,
public nsSupportsWeakReference
{
public:
NS_DECL_ISUPPORTS
// nsIXULChromeRegistry methods:
NS_IMETHOD ReloadChrome() override;
--- a/chrome/nsChromeRegistryChrome.cpp
+++ b/chrome/nsChromeRegistryChrome.cpp
@@ -569,33 +569,16 @@ nsChromeRegistryChrome::OverlayListHash:
{
OverlayListEntry* entry = mTable.GetEntry(aBase);
if (!entry)
return nullptr;
return &entry->mArray;
}
-#ifdef MOZ_XUL
-NS_IMETHODIMP
-nsChromeRegistryChrome::GetXULOverlays(nsIURI *aChromeURL,
- nsISimpleEnumerator **aResult)
-{
- nsCOMPtr<nsIURI> chromeURLWithoutHash;
- if (aChromeURL) {
- aChromeURL->CloneIgnoringRef(getter_AddRefs(chromeURLWithoutHash));
- }
- const nsCOMArray<nsIURI>* parray = mOverlayHash.GetArray(chromeURLWithoutHash);
- if (!parray)
- return NS_NewEmptyEnumerator(aResult);
-
- return NS_NewArrayEnumerator(aResult, *parray);
-}
-#endif // MOZ_XUL
-
nsIURI*
nsChromeRegistry::ManifestProcessingContext::GetManifestURI()
{
if (!mManifestURI) {
nsCString uri;
mFile.GetURIString(uri);
NS_NewURI(getter_AddRefs(mManifestURI), uri);
}
--- a/chrome/nsChromeRegistryChrome.h
+++ b/chrome/nsChromeRegistryChrome.h
@@ -36,21 +36,16 @@ class nsChromeRegistryChrome : public ns
NS_IMETHOD IsLocaleRTL(const nsACString& package,
bool *aResult) override;
NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
bool aAsBCP47,
nsACString& aLocale) override;
NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic,
const char16_t *someData) override;
-#ifdef MOZ_XUL
- NS_IMETHOD GetXULOverlays(nsIURI *aURI,
- nsISimpleEnumerator **_retval) override;
-#endif
-
// If aChild is non-null then it is a new child to notify. If aChild is
// null, then we have installed new chrome and we are resetting all of our
// children's registered chrome.
void SendRegisteredChrome(mozilla::dom::PContentParent* aChild);
private:
struct PackageEntry;
static void ChromePackageFromPackageEntry(const nsACString& aPackageName,
--- a/chrome/nsChromeRegistryContent.cpp
+++ b/chrome/nsChromeRegistryContent.cpp
@@ -233,23 +233,16 @@ nsChromeRegistryContent::GetSelectedLoca
NS_IMETHODIMP
nsChromeRegistryContent::Observe(nsISupports* aSubject, const char* aTopic,
const char16_t* aData)
{
CONTENT_NOT_IMPLEMENTED();
}
-NS_IMETHODIMP
-nsChromeRegistryContent::GetXULOverlays(nsIURI *aChromeURL,
- nsISimpleEnumerator **aResult)
-{
- CONTENT_NOT_IMPLEMENTED();
-}
-
void
nsChromeRegistryContent::ManifestContent(ManifestProcessingContext& cx,
int lineno, char *const * argv,
int flags)
{
CONTENT_NOTREACHED();
}
--- a/chrome/nsChromeRegistryContent.h
+++ b/chrome/nsChromeRegistryContent.h
@@ -30,18 +30,16 @@ class nsChromeRegistryContent : public n
NS_IMETHOD CheckForOSAccessibility() override;
NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
const char16_t* aData) override;
NS_IMETHOD IsLocaleRTL(const nsACString& package,
bool *aResult) override;
NS_IMETHOD GetSelectedLocale(const nsACString& aPackage,
bool aAsBCP47,
nsACString& aLocale) override;
- NS_IMETHOD GetXULOverlays(nsIURI *aChromeURL,
- nsISimpleEnumerator **aResult) override;
void RegisterPackage(const ChromePackage& aPackage);
void RegisterOverride(const OverrideMapping& aOverride);
void RegisterSubstitution(const SubstitutionMapping& aResource);
private:
struct PackageEntry
{
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -33,17 +33,16 @@
#include "nsIContentViewer.h"
#include "nsIStreamListener.h"
#include "nsITimer.h"
#include "nsDocShell.h"
#include "nsGkAtoms.h"
#include "nsXMLContentSink.h"
#include "nsXULContentSink.h"
#include "nsXULContentUtils.h"
-#include "nsIXULOverlayProvider.h"
#include "nsIStringEnumerator.h"
#include "nsDocElementCreatedNotificationRunner.h"
#include "nsNetUtil.h"
#include "nsParserCIID.h"
#include "nsPIBoxObject.h"
#include "mozilla/dom/BoxObject.h"
#include "nsString.h"
#include "nsPIDOMWindow.h"
--- a/dom/xul/moz.build
+++ b/dom/xul/moz.build
@@ -10,20 +10,16 @@ with Files("**"):
if CONFIG['MOZ_BUILD_APP'] == 'browser':
DEFINES['MOZ_BREAK_XUL_OVERLAYS'] = True
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
if CONFIG['MOZ_XUL']:
- XPIDL_SOURCES += [
- 'nsIXULOverlayProvider.idl',
- ]
-
EXPORTS += [
'nsXULElement.h',
]
UNIFIED_SOURCES += [
'nsXULCommandDispatcher.cpp',
'nsXULContentSink.cpp',
'nsXULContentUtils.cpp',
deleted file mode 100644
--- a/dom/xul/nsIXULOverlayProvider.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "nsISupports.idl"
-
-interface nsISimpleEnumerator;
-interface nsIURI;
-
-/**
- * The chrome registry implements this interface to give overlays
- * to the gecko XUL engine.
- */
-
-[scriptable, uuid(1d5b5b94-dc47-4050-93b7-ac092e383cad)]
-interface nsIXULOverlayProvider : nsISupports
-{
- /**
- * Get the XUL overlays for a particular chrome URI.
- *
- * @param aURI The URI being loaded
- * @return An enumerator of nsIURI for the overlays of this URI
- */
- nsISimpleEnumerator /*nsIURI*/ getXULOverlays(in nsIURI aURI);
-};
--- a/xpcom/build/Services.py
+++ b/xpcom/build/Services.py
@@ -6,18 +6,16 @@ def service(name, iface, contractid):
services.append((name, iface, contractid))
service('ChromeRegistryService', 'nsIChromeRegistry',
"@mozilla.org/chrome/chrome-registry;1")
service('ToolkitChromeRegistryService', 'nsIToolkitChromeRegistry',
"@mozilla.org/chrome/chrome-registry;1")
service('XULChromeRegistryService', 'nsIXULChromeRegistry',
"@mozilla.org/chrome/chrome-registry;1")
-service('XULOverlayProviderService', 'nsIXULOverlayProvider',
- "@mozilla.org/chrome/chrome-registry;1")
service('IOService', 'nsIIOService',
"@mozilla.org/network/io-service;1")
service('ObserverService', 'nsIObserverService',
"@mozilla.org/observer-service;1")
service('StringBundleService', 'nsIStringBundleService',
"@mozilla.org/intl/stringbundle;1")
service('XPConnect', 'nsIXPConnect',
"@mozilla.org/js/xpc/XPConnect;1")
@@ -55,17 +53,16 @@ CPP_INCLUDES = """
#include "nsNetCID.h"
#include "nsObserverService.h"
#include "nsXPCOMPrivate.h"
#include "nsIIOService.h"
#include "nsIDirectoryService.h"
#include "nsIChromeRegistry.h"
#include "nsIStringBundle.h"
#include "nsIToolkitChromeRegistry.h"
-#include "nsIXULOverlayProvider.h"
#include "IHistory.h"
#include "nsIXPConnect.h"
#include "nsIPermissionManager.h"
#include "nsIServiceWorkerManager.h"
#include "nsICacheStorageService.h"
#include "nsIStreamTransportService.h"
#include "nsISocketTransportService.h"
#include "nsIURIClassifier.h"