gecko/layout/build/nsLayoutModule.cpp

1332 lines
54 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2012-05-21 04:12:37 -07:00
/* 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 "base/basictypes.h"
Bug 691411 - Move js/src/xpconnect to js/xpconnect and rename source files while we're at it. r=khuey, sr=mrbkap --HG-- rename : js/src/xpconnect/Makefile.in => js/xpconnect/Makefile.in rename : js/src/xpconnect/crashtests/117307-1.html => js/xpconnect/crashtests/117307-1.html rename : js/src/xpconnect/crashtests/193710.html => js/xpconnect/crashtests/193710.html rename : js/src/xpconnect/crashtests/290162-1.html => js/xpconnect/crashtests/290162-1.html rename : js/src/xpconnect/crashtests/326615-1.html => js/xpconnect/crashtests/326615-1.html rename : js/src/xpconnect/crashtests/328553-1.html => js/xpconnect/crashtests/328553-1.html rename : js/src/xpconnect/crashtests/346258-1.html => js/xpconnect/crashtests/346258-1.html rename : js/src/xpconnect/crashtests/346512-1-frame1.xhtml => js/xpconnect/crashtests/346512-1-frame1.xhtml rename : js/src/xpconnect/crashtests/346512-1-frame2.xhtml => js/xpconnect/crashtests/346512-1-frame2.xhtml rename : js/src/xpconnect/crashtests/346512-1.xhtml => js/xpconnect/crashtests/346512-1.xhtml rename : js/src/xpconnect/crashtests/382133-1.html => js/xpconnect/crashtests/382133-1.html rename : js/src/xpconnect/crashtests/386680-1.html => js/xpconnect/crashtests/386680-1.html rename : js/src/xpconnect/crashtests/394810-1.html => js/xpconnect/crashtests/394810-1.html rename : js/src/xpconnect/crashtests/400349-1.html => js/xpconnect/crashtests/400349-1.html rename : js/src/xpconnect/crashtests/403356-1.html => js/xpconnect/crashtests/403356-1.html rename : js/src/xpconnect/crashtests/418139-1.svg => js/xpconnect/crashtests/418139-1.svg rename : js/src/xpconnect/crashtests/420513-1.html => js/xpconnect/crashtests/420513-1.html rename : js/src/xpconnect/crashtests/453935-1.html => js/xpconnect/crashtests/453935-1.html rename : js/src/xpconnect/crashtests/462926.html => js/xpconnect/crashtests/462926.html rename : js/src/xpconnect/crashtests/467693-1.html => js/xpconnect/crashtests/467693-1.html rename : js/src/xpconnect/crashtests/468552-1.html => js/xpconnect/crashtests/468552-1.html rename : js/src/xpconnect/crashtests/471366-1.html => js/xpconnect/crashtests/471366-1.html rename : js/src/xpconnect/crashtests/475185-1.html => js/xpconnect/crashtests/475185-1.html rename : js/src/xpconnect/crashtests/475291-1.html => js/xpconnect/crashtests/475291-1.html rename : js/src/xpconnect/crashtests/503286-1.html => js/xpconnect/crashtests/503286-1.html rename : js/src/xpconnect/crashtests/504000-1.html => js/xpconnect/crashtests/504000-1.html rename : js/src/xpconnect/crashtests/509075-1.html => js/xpconnect/crashtests/509075-1.html rename : js/src/xpconnect/crashtests/512815-1.html => js/xpconnect/crashtests/512815-1.html rename : js/src/xpconnect/crashtests/515726-1.html => js/xpconnect/crashtests/515726-1.html rename : js/src/xpconnect/crashtests/545291-1.html => js/xpconnect/crashtests/545291-1.html rename : js/src/xpconnect/crashtests/558979.html => js/xpconnect/crashtests/558979.html rename : js/src/xpconnect/crashtests/582649.html => js/xpconnect/crashtests/582649.html rename : js/src/xpconnect/crashtests/601284-1.html => js/xpconnect/crashtests/601284-1.html rename : js/src/xpconnect/crashtests/603146-1.html => js/xpconnect/crashtests/603146-1.html rename : js/src/xpconnect/crashtests/603858-1.html => js/xpconnect/crashtests/603858-1.html rename : js/src/xpconnect/crashtests/608963.html => js/xpconnect/crashtests/608963.html rename : js/src/xpconnect/crashtests/616930-1.html => js/xpconnect/crashtests/616930-1.html rename : js/src/xpconnect/crashtests/639737-1.html => js/xpconnect/crashtests/639737-1.html rename : js/src/xpconnect/crashtests/648206-1.html => js/xpconnect/crashtests/648206-1.html rename : js/src/xpconnect/crashtests/crashtests.list => js/xpconnect/crashtests/crashtests.list rename : js/src/xpconnect/idl/Makefile.in => js/xpconnect/idl/Makefile.in rename : js/src/xpconnect/idl/mozIJSSubScriptLoader.idl => js/xpconnect/idl/mozIJSSubScriptLoader.idl rename : js/src/xpconnect/idl/nsIJSContextStack.idl => js/xpconnect/idl/nsIJSContextStack.idl rename : js/src/xpconnect/idl/nsIJSEngineTelemetryStats.idl => js/xpconnect/idl/nsIJSEngineTelemetryStats.idl rename : js/src/xpconnect/idl/nsIJSRuntimeService.idl => js/xpconnect/idl/nsIJSRuntimeService.idl rename : js/src/xpconnect/idl/nsIScriptError.idl => js/xpconnect/idl/nsIScriptError.idl rename : js/src/xpconnect/idl/nsIXPCScriptNotify.idl => js/xpconnect/idl/nsIXPCScriptNotify.idl rename : js/src/xpconnect/idl/nsIXPCScriptable.idl => js/xpconnect/idl/nsIXPCScriptable.idl rename : js/src/xpconnect/idl/nsIXPCSecurityManager.idl => js/xpconnect/idl/nsIXPCSecurityManager.idl rename : js/src/xpconnect/idl/nsIXPConnect.idl => js/xpconnect/idl/nsIXPConnect.idl rename : js/src/xpconnect/idl/xpcIJSGetFactory.idl => js/xpconnect/idl/xpcIJSGetFactory.idl rename : js/src/xpconnect/idl/xpcIJSModuleLoader.idl => js/xpconnect/idl/xpcIJSModuleLoader.idl rename : js/src/xpconnect/idl/xpcIJSWeakReference.idl => js/xpconnect/idl/xpcIJSWeakReference.idl rename : js/src/xpconnect/idl/xpccomponents.idl => js/xpconnect/idl/xpccomponents.idl rename : js/src/xpconnect/idl/xpcexception.idl => js/xpconnect/idl/xpcexception.idl rename : js/src/xpconnect/idl/xpcjsid.idl => js/xpconnect/idl/xpcjsid.idl rename : js/src/xpconnect/loader/Makefile.in => js/xpconnect/loader/Makefile.in rename : js/src/xpconnect/loader/XPCOMUtils.jsm => js/xpconnect/loader/XPCOMUtils.jsm rename : js/src/xpconnect/loader/mozJSComponentLoader.cpp => js/xpconnect/loader/mozJSComponentLoader.cpp rename : js/src/xpconnect/loader/mozJSComponentLoader.h => js/xpconnect/loader/mozJSComponentLoader.h rename : js/src/xpconnect/loader/mozJSLoaderUtils.cpp => js/xpconnect/loader/mozJSLoaderUtils.cpp rename : js/src/xpconnect/loader/mozJSLoaderUtils.h => js/xpconnect/loader/mozJSLoaderUtils.h rename : js/src/xpconnect/loader/mozJSSubScriptLoader.cpp => js/xpconnect/loader/mozJSSubScriptLoader.cpp rename : js/src/xpconnect/loader/mozJSSubScriptLoader.h => js/xpconnect/loader/mozJSSubScriptLoader.h rename : js/src/xpconnect/public/Makefile.in => js/xpconnect/public/Makefile.in rename : js/src/xpconnect/public/nsAXPCNativeCallContext.h => js/xpconnect/public/nsAXPCNativeCallContext.h rename : js/src/xpconnect/public/nsAutoJSValHolder.h => js/xpconnect/public/nsAutoJSValHolder.h rename : js/src/xpconnect/public/xpc_map_end.h => js/xpconnect/public/xpc_map_end.h rename : js/src/xpconnect/shell/Makefile.in => js/xpconnect/shell/Makefile.in rename : js/src/xpconnect/shell/jsshell.msg => js/xpconnect/shell/jsshell.msg rename : js/src/xpconnect/shell/xpcshell.cpp => js/xpconnect/shell/xpcshell.cpp rename : js/src/xpconnect/shell/xpcshellMacUtils.h => js/xpconnect/shell/xpcshellMacUtils.h rename : js/src/xpconnect/shell/xpcshellMacUtils.mm => js/xpconnect/shell/xpcshellMacUtils.mm rename : js/src/xpconnect/src/Makefile.in => js/xpconnect/src/Makefile.in rename : js/src/xpconnect/src/README => js/xpconnect/src/README rename : js/src/xpconnect/src/xpccallcontext.cpp => js/xpconnect/src/XPCCallContext.cpp rename : js/src/xpconnect/src/xpccomponents.cpp => js/xpconnect/src/XPCComponents.cpp rename : js/src/xpconnect/src/xpccontext.cpp => js/xpconnect/src/XPCContext.cpp rename : js/src/xpconnect/src/xpcconvert.cpp => js/xpconnect/src/XPCConvert.cpp rename : js/src/xpconnect/src/xpcdebug.cpp => js/xpconnect/src/XPCDebug.cpp rename : js/src/xpconnect/src/xpcexception.cpp => js/xpconnect/src/XPCException.cpp rename : js/src/xpconnect/src/xpcforwards.h => js/xpconnect/src/XPCForwards.h rename : js/src/xpconnect/src/xpcinlines.h => js/xpconnect/src/XPCInlines.h rename : js/src/xpconnect/src/xpcjsid.cpp => js/xpconnect/src/XPCJSID.cpp rename : js/src/xpconnect/src/xpcjsruntime.cpp => js/xpconnect/src/XPCJSRuntime.cpp rename : js/src/xpconnect/src/xpcJSWeakReference.cpp => js/xpconnect/src/XPCJSWeakReference.cpp rename : js/src/xpconnect/src/xpcJSWeakReference.h => js/xpconnect/src/XPCJSWeakReference.h rename : js/src/xpconnect/src/xpclocale.cpp => js/xpconnect/src/XPCLocale.cpp rename : js/src/xpconnect/src/xpclog.cpp => js/xpconnect/src/XPCLog.cpp rename : js/src/xpconnect/src/xpclog.h => js/xpconnect/src/XPCLog.h rename : js/src/xpconnect/src/xpcmaps.cpp => js/xpconnect/src/XPCMaps.cpp rename : js/src/xpconnect/src/xpcmaps.h => js/xpconnect/src/XPCMaps.h rename : js/src/xpconnect/src/xpcmodule.cpp => js/xpconnect/src/XPCModule.cpp rename : js/src/xpconnect/src/xpcmodule.h => js/xpconnect/src/XPCModule.h rename : js/src/xpconnect/src/xpcquickstubs.cpp => js/xpconnect/src/XPCQuickStubs.cpp rename : js/src/xpconnect/src/xpcquickstubs.h => js/xpconnect/src/XPCQuickStubs.h rename : js/src/xpconnect/src/xpcruntimesvc.cpp => js/xpconnect/src/XPCRuntimeService.cpp rename : js/src/xpconnect/src/xpcstack.cpp => js/xpconnect/src/XPCStack.cpp rename : js/src/xpconnect/src/xpcstring.cpp => js/xpconnect/src/XPCString.cpp rename : js/src/xpconnect/src/xpcthreadcontext.cpp => js/xpconnect/src/XPCThreadContext.cpp rename : js/src/xpconnect/src/xpcthrower.cpp => js/xpconnect/src/XPCThrower.cpp rename : js/src/xpconnect/src/xpcvariant.cpp => js/xpconnect/src/XPCVariant.cpp rename : js/src/xpconnect/src/xpcwrappedjs.cpp => js/xpconnect/src/XPCWrappedJS.cpp rename : js/src/xpconnect/src/xpcwrappedjsclass.cpp => js/xpconnect/src/XPCWrappedJSClass.cpp rename : js/src/xpconnect/src/xpcwrappednative.cpp => js/xpconnect/src/XPCWrappedNative.cpp rename : js/src/xpconnect/src/xpcwrappednativeinfo.cpp => js/xpconnect/src/XPCWrappedNativeInfo.cpp rename : js/src/xpconnect/src/xpcwrappednativejsops.cpp => js/xpconnect/src/XPCWrappedNativeJSOps.cpp rename : js/src/xpconnect/src/xpcwrappednativeproto.cpp => js/xpconnect/src/XPCWrappedNativeProto.cpp rename : js/src/xpconnect/src/xpcwrappednativescope.cpp => js/xpconnect/src/XPCWrappedNativeScope.cpp rename : js/src/xpconnect/src/XPCWrapper.cpp => js/xpconnect/src/XPCWrapper.cpp rename : js/src/xpconnect/src/XPCWrapper.h => js/xpconnect/src/XPCWrapper.h rename : js/src/xpconnect/src/codegen.py => js/xpconnect/src/codegen.py rename : js/src/xpconnect/src/dom_quickstubs.qsconf => js/xpconnect/src/dom_quickstubs.qsconf rename : js/src/xpconnect/src/dombindings.conf => js/xpconnect/src/dombindings.conf rename : js/src/xpconnect/src/dombindings.cpp => js/xpconnect/src/dombindings.cpp rename : js/src/xpconnect/src/dombindings.h => js/xpconnect/src/dombindings.h rename : js/src/xpconnect/src/dombindingsgen.py => js/xpconnect/src/dombindingsgen.py rename : js/src/xpconnect/src/nsCSSPropertiesQS.h => js/xpconnect/src/nsCSSPropertiesQS.h rename : js/src/xpconnect/src/nsDOMQS.h => js/xpconnect/src/nsDOMQS.h rename : js/src/xpconnect/src/nsScriptError.cpp => js/xpconnect/src/nsScriptError.cpp rename : js/src/xpconnect/src/nsXPConnect.cpp => js/xpconnect/src/nsXPConnect.cpp rename : js/src/xpconnect/src/qsWinUndefs.h => js/xpconnect/src/qsWinUndefs.h rename : js/src/xpconnect/src/qsgen.py => js/xpconnect/src/qsgen.py rename : js/src/xpconnect/src/xpc.msg => js/xpconnect/src/xpc.msg rename : js/src/xpconnect/src/xpcprivate.h => js/xpconnect/src/xpcprivate.h rename : js/src/xpconnect/src/xpcpublic.h => js/xpconnect/src/xpcpublic.h rename : js/src/xpconnect/tests/Makefile.in => js/xpconnect/tests/Makefile.in rename : js/src/xpconnect/tests/chrome/Makefile.in => js/xpconnect/tests/chrome/Makefile.in rename : js/src/xpconnect/tests/chrome/bug503926.xul => js/xpconnect/tests/chrome/bug503926.xul rename : js/src/xpconnect/tests/chrome/file_bug618176.xul => js/xpconnect/tests/chrome/file_bug618176.xul rename : js/src/xpconnect/tests/chrome/file_evalInSandbox.html => js/xpconnect/tests/chrome/file_evalInSandbox.html rename : js/src/xpconnect/tests/chrome/test_APIExposer.xul => js/xpconnect/tests/chrome/test_APIExposer.xul rename : js/src/xpconnect/tests/chrome/test_bug448587.xul => js/xpconnect/tests/chrome/test_bug448587.xul rename : js/src/xpconnect/tests/chrome/test_bug484459.xul => js/xpconnect/tests/chrome/test_bug484459.xul rename : js/src/xpconnect/tests/chrome/test_bug500931.xul => js/xpconnect/tests/chrome/test_bug500931.xul rename : js/src/xpconnect/tests/chrome/test_bug503926.xul => js/xpconnect/tests/chrome/test_bug503926.xul rename : js/src/xpconnect/tests/chrome/test_bug517163.xul => js/xpconnect/tests/chrome/test_bug517163.xul rename : js/src/xpconnect/tests/chrome/test_bug533596.xul => js/xpconnect/tests/chrome/test_bug533596.xul rename : js/src/xpconnect/tests/chrome/test_bug571849.xul => js/xpconnect/tests/chrome/test_bug571849.xul rename : js/src/xpconnect/tests/chrome/test_bug596580.xul => js/xpconnect/tests/chrome/test_bug596580.xul rename : js/src/xpconnect/tests/chrome/test_bug601803.xul => js/xpconnect/tests/chrome/test_bug601803.xul rename : js/src/xpconnect/tests/chrome/test_bug610390.xul => js/xpconnect/tests/chrome/test_bug610390.xul rename : js/src/xpconnect/tests/chrome/test_bug614757.xul => js/xpconnect/tests/chrome/test_bug614757.xul rename : js/src/xpconnect/tests/chrome/test_bug616992.xul => js/xpconnect/tests/chrome/test_bug616992.xul rename : js/src/xpconnect/tests/chrome/test_bug618176.xul => js/xpconnect/tests/chrome/test_bug618176.xul rename : js/src/xpconnect/tests/chrome/test_bug654370.xul => js/xpconnect/tests/chrome/test_bug654370.xul rename : js/src/xpconnect/tests/chrome/test_bug658560.xul => js/xpconnect/tests/chrome/test_bug658560.xul rename : js/src/xpconnect/tests/chrome/test_bug664689.xul => js/xpconnect/tests/chrome/test_bug664689.xul rename : js/src/xpconnect/tests/chrome/test_bug679861.xul => js/xpconnect/tests/chrome/test_bug679861.xul rename : js/src/xpconnect/tests/chrome/test_cows.xul => js/xpconnect/tests/chrome/test_cows.xul rename : js/src/xpconnect/tests/chrome/test_doublewrappedcompartments.xul => js/xpconnect/tests/chrome/test_doublewrappedcompartments.xul rename : js/src/xpconnect/tests/chrome/test_evalInSandbox.xul => js/xpconnect/tests/chrome/test_evalInSandbox.xul rename : js/src/xpconnect/tests/chrome/test_getweakmapkeys.xul => js/xpconnect/tests/chrome/test_getweakmapkeys.xul rename : js/src/xpconnect/tests/chrome/test_nodelists.xul => js/xpconnect/tests/chrome/test_nodelists.xul rename : js/src/xpconnect/tests/chrome/test_precisegc.xul => js/xpconnect/tests/chrome/test_precisegc.xul rename : js/src/xpconnect/tests/chrome/test_sandboxImport.xul => js/xpconnect/tests/chrome/test_sandboxImport.xul rename : js/src/xpconnect/tests/chrome/test_wrappers-2.xul => js/xpconnect/tests/chrome/test_wrappers-2.xul rename : js/src/xpconnect/tests/chrome/test_wrappers.xul => js/xpconnect/tests/chrome/test_wrappers.xul rename : js/src/xpconnect/tests/components/js/Makefile.in => js/xpconnect/tests/components/js/Makefile.in rename : js/src/xpconnect/tests/components/js/xpctest.manifest => js/xpconnect/tests/components/js/xpctest.manifest rename : js/src/xpconnect/tests/components/js/xpctest_attributes.js => js/xpconnect/tests/components/js/xpctest_attributes.js rename : js/src/xpconnect/tests/components/js/xpctest_params.js => js/xpconnect/tests/components/js/xpctest_params.js rename : js/src/xpconnect/tests/components/native/Makefile.in => js/xpconnect/tests/components/native/Makefile.in rename : js/src/xpconnect/tests/components/native/xpctest.manifest => js/xpconnect/tests/components/native/xpctest.manifest rename : js/src/xpconnect/tests/components/native/xpctest_attributes.cpp => js/xpconnect/tests/components/native/xpctest_attributes.cpp rename : js/src/xpconnect/tests/components/native/xpctest_module.cpp => js/xpconnect/tests/components/native/xpctest_module.cpp rename : js/src/xpconnect/tests/components/native/xpctest_params.cpp => js/xpconnect/tests/components/native/xpctest_params.cpp rename : js/src/xpconnect/tests/components/native/xpctest_private.h => js/xpconnect/tests/components/native/xpctest_private.h rename : js/src/xpconnect/tests/idl/Makefile.in => js/xpconnect/tests/idl/Makefile.in rename : js/src/xpconnect/tests/idl/xpctest_attributes.idl => js/xpconnect/tests/idl/xpctest_attributes.idl rename : js/src/xpconnect/tests/idl/xpctest_params.idl => js/xpconnect/tests/idl/xpctest_params.idl rename : js/src/xpconnect/tests/mochitest/Makefile.in => js/xpconnect/tests/mochitest/Makefile.in rename : js/src/xpconnect/tests/mochitest/bug500931_helper.html => js/xpconnect/tests/mochitest/bug500931_helper.html rename : js/src/xpconnect/tests/mochitest/bug504877_helper.html => js/xpconnect/tests/mochitest/bug504877_helper.html rename : js/src/xpconnect/tests/mochitest/bug571849_helper.html => js/xpconnect/tests/mochitest/bug571849_helper.html rename : js/src/xpconnect/tests/mochitest/bug589028_helper.html => js/xpconnect/tests/mochitest/bug589028_helper.html rename : js/src/xpconnect/tests/mochitest/bug657267.jar => js/xpconnect/tests/mochitest/bug657267.jar rename : js/src/xpconnect/tests/mochitest/bug92773_helper.html => js/xpconnect/tests/mochitest/bug92773_helper.html rename : js/src/xpconnect/tests/mochitest/chrome_wrappers_helper.html => js/xpconnect/tests/mochitest/chrome_wrappers_helper.html rename : js/src/xpconnect/tests/mochitest/file1_bug629227.html => js/xpconnect/tests/mochitest/file1_bug629227.html rename : js/src/xpconnect/tests/mochitest/file2_bug629227.html => js/xpconnect/tests/mochitest/file2_bug629227.html rename : js/src/xpconnect/tests/mochitest/file_bug505915.html => js/xpconnect/tests/mochitest/file_bug505915.html rename : js/src/xpconnect/tests/mochitest/file_bug650273.html => js/xpconnect/tests/mochitest/file_bug650273.html rename : js/src/xpconnect/tests/mochitest/file_bug658560.html => js/xpconnect/tests/mochitest/file_bug658560.html rename : js/src/xpconnect/tests/mochitest/file_doublewrappedcompartments.html => js/xpconnect/tests/mochitest/file_doublewrappedcompartments.html rename : js/src/xpconnect/tests/mochitest/file_evalInSandbox.html => js/xpconnect/tests/mochitest/file_evalInSandbox.html rename : js/src/xpconnect/tests/mochitest/file_nodelists.html => js/xpconnect/tests/mochitest/file_nodelists.html rename : js/src/xpconnect/tests/mochitest/file_wrappers-2.html => js/xpconnect/tests/mochitest/file_wrappers-2.html rename : js/src/xpconnect/tests/mochitest/inner.html => js/xpconnect/tests/mochitest/inner.html rename : js/src/xpconnect/tests/mochitest/test1_bug629331.html => js/xpconnect/tests/mochitest/test1_bug629331.html rename : js/src/xpconnect/tests/mochitest/test2_bug629331.html => js/xpconnect/tests/mochitest/test2_bug629331.html rename : js/src/xpconnect/tests/mochitest/test_bug361111.xul => js/xpconnect/tests/mochitest/test_bug361111.xul rename : js/src/xpconnect/tests/mochitest/test_bug384632.html => js/xpconnect/tests/mochitest/test_bug384632.html rename : js/src/xpconnect/tests/mochitest/test_bug390488.html => js/xpconnect/tests/mochitest/test_bug390488.html rename : js/src/xpconnect/tests/mochitest/test_bug393269.html => js/xpconnect/tests/mochitest/test_bug393269.html rename : js/src/xpconnect/tests/mochitest/test_bug396851.html => js/xpconnect/tests/mochitest/test_bug396851.html rename : js/src/xpconnect/tests/mochitest/test_bug428021.html => js/xpconnect/tests/mochitest/test_bug428021.html rename : js/src/xpconnect/tests/mochitest/test_bug446584.html => js/xpconnect/tests/mochitest/test_bug446584.html rename : js/src/xpconnect/tests/mochitest/test_bug462428.html => js/xpconnect/tests/mochitest/test_bug462428.html rename : js/src/xpconnect/tests/mochitest/test_bug478438.html => js/xpconnect/tests/mochitest/test_bug478438.html rename : js/src/xpconnect/tests/mochitest/test_bug484107.html => js/xpconnect/tests/mochitest/test_bug484107.html rename : js/src/xpconnect/tests/mochitest/test_bug500691.html => js/xpconnect/tests/mochitest/test_bug500691.html rename : js/src/xpconnect/tests/mochitest/test_bug502959.html => js/xpconnect/tests/mochitest/test_bug502959.html rename : js/src/xpconnect/tests/mochitest/test_bug503926.html => js/xpconnect/tests/mochitest/test_bug503926.html rename : js/src/xpconnect/tests/mochitest/test_bug504877.html => js/xpconnect/tests/mochitest/test_bug504877.html rename : js/src/xpconnect/tests/mochitest/test_bug505915.html => js/xpconnect/tests/mochitest/test_bug505915.html rename : js/src/xpconnect/tests/mochitest/test_bug553407.html => js/xpconnect/tests/mochitest/test_bug553407.html rename : js/src/xpconnect/tests/mochitest/test_bug560351.html => js/xpconnect/tests/mochitest/test_bug560351.html rename : js/src/xpconnect/tests/mochitest/test_bug564330.html => js/xpconnect/tests/mochitest/test_bug564330.html rename : js/src/xpconnect/tests/mochitest/test_bug585745.html => js/xpconnect/tests/mochitest/test_bug585745.html rename : js/src/xpconnect/tests/mochitest/test_bug589028.html => js/xpconnect/tests/mochitest/test_bug589028.html rename : js/src/xpconnect/tests/mochitest/test_bug601299.html => js/xpconnect/tests/mochitest/test_bug601299.html rename : js/src/xpconnect/tests/mochitest/test_bug605167.html => js/xpconnect/tests/mochitest/test_bug605167.html rename : js/src/xpconnect/tests/mochitest/test_bug618017.html => js/xpconnect/tests/mochitest/test_bug618017.html rename : js/src/xpconnect/tests/mochitest/test_bug623437.html => js/xpconnect/tests/mochitest/test_bug623437.html rename : js/src/xpconnect/tests/mochitest/test_bug628410.html => js/xpconnect/tests/mochitest/test_bug628410.html rename : js/src/xpconnect/tests/mochitest/test_bug628794.html => js/xpconnect/tests/mochitest/test_bug628794.html rename : js/src/xpconnect/tests/mochitest/test_bug629227.html => js/xpconnect/tests/mochitest/test_bug629227.html rename : js/src/xpconnect/tests/mochitest/test_bug629331.html => js/xpconnect/tests/mochitest/test_bug629331.html rename : js/src/xpconnect/tests/mochitest/test_bug636097.html => js/xpconnect/tests/mochitest/test_bug636097.html rename : js/src/xpconnect/tests/mochitest/test_bug650273.html => js/xpconnect/tests/mochitest/test_bug650273.html rename : js/src/xpconnect/tests/mochitest/test_bug655297.html => js/xpconnect/tests/mochitest/test_bug655297.html rename : js/src/xpconnect/tests/mochitest/test_bug657267.html => js/xpconnect/tests/mochitest/test_bug657267.html rename : js/src/xpconnect/tests/mochitest/test_bug661980.html => js/xpconnect/tests/mochitest/test_bug661980.html rename : js/src/xpconnect/tests/mochitest/test_bug691059.html => js/xpconnect/tests/mochitest/test_bug691059.html rename : js/src/xpconnect/tests/mochitest/test_bug92773.html => js/xpconnect/tests/mochitest/test_bug92773.html rename : js/src/xpconnect/tests/mochitest/test_frameWrapping.html => js/xpconnect/tests/mochitest/test_frameWrapping.html rename : js/src/xpconnect/tests/unit/CatRegistrationComponents.manifest => js/xpconnect/tests/unit/CatRegistrationComponents.manifest rename : js/src/xpconnect/tests/unit/bogus_element_type.jsm => js/xpconnect/tests/unit/bogus_element_type.jsm rename : js/src/xpconnect/tests/unit/bogus_exports_type.jsm => js/xpconnect/tests/unit/bogus_exports_type.jsm rename : js/src/xpconnect/tests/unit/bug451678_subscript.js => js/xpconnect/tests/unit/bug451678_subscript.js rename : js/src/xpconnect/tests/unit/bug596580_versioned.js => js/xpconnect/tests/unit/bug596580_versioned.js rename : js/src/xpconnect/tests/unit/component-file.js => js/xpconnect/tests/unit/component-file.js rename : js/src/xpconnect/tests/unit/component-file.manifest => js/xpconnect/tests/unit/component-file.manifest rename : js/src/xpconnect/tests/unit/component_import.js => js/xpconnect/tests/unit/component_import.js rename : js/src/xpconnect/tests/unit/component_import.manifest => js/xpconnect/tests/unit/component_import.manifest rename : js/src/xpconnect/tests/unit/recursive_importA.jsm => js/xpconnect/tests/unit/recursive_importA.jsm rename : js/src/xpconnect/tests/unit/recursive_importB.jsm => js/xpconnect/tests/unit/recursive_importB.jsm rename : js/src/xpconnect/tests/unit/syntax_error.jsm => js/xpconnect/tests/unit/syntax_error.jsm rename : js/src/xpconnect/tests/unit/test_attributes.js => js/xpconnect/tests/unit/test_attributes.js rename : js/src/xpconnect/tests/unit/test_bogus_files.js => js/xpconnect/tests/unit/test_bogus_files.js rename : js/src/xpconnect/tests/unit/test_bug408412.js => js/xpconnect/tests/unit/test_bug408412.js rename : js/src/xpconnect/tests/unit/test_bug451678.js => js/xpconnect/tests/unit/test_bug451678.js rename : js/src/xpconnect/tests/unit/test_bug596580.js => js/xpconnect/tests/unit/test_bug596580.js rename : js/src/xpconnect/tests/unit/test_bug604362.js => js/xpconnect/tests/unit/test_bug604362.js rename : js/src/xpconnect/tests/unit/test_bug608142.js => js/xpconnect/tests/unit/test_bug608142.js rename : js/src/xpconnect/tests/unit/test_bug641378.js => js/xpconnect/tests/unit/test_bug641378.js rename : js/src/xpconnect/tests/unit/test_bug677864.js => js/xpconnect/tests/unit/test_bug677864.js rename : js/src/xpconnect/tests/unit/test_bug_442086.js => js/xpconnect/tests/unit/test_bug_442086.js rename : js/src/xpconnect/tests/unit/test_file.js => js/xpconnect/tests/unit/test_file.js rename : js/src/xpconnect/tests/unit/test_import.js => js/xpconnect/tests/unit/test_import.js rename : js/src/xpconnect/tests/unit/test_js_weak_references.js => js/xpconnect/tests/unit/test_js_weak_references.js rename : js/src/xpconnect/tests/unit/test_localeCompare.js => js/xpconnect/tests/unit/test_localeCompare.js rename : js/src/xpconnect/tests/unit/test_params.js => js/xpconnect/tests/unit/test_params.js rename : js/src/xpconnect/tests/unit/test_recursive_import.js => js/xpconnect/tests/unit/test_recursive_import.js rename : js/src/xpconnect/tests/unit/test_reflect_parse.js => js/xpconnect/tests/unit/test_reflect_parse.js rename : js/src/xpconnect/tests/unit/test_unload.js => js/xpconnect/tests/unit/test_unload.js rename : js/src/xpconnect/tests/unit/test_xpcomutils.js => js/xpconnect/tests/unit/test_xpcomutils.js rename : js/src/xpconnect/tests/unit/xpcshell.ini => js/xpconnect/tests/unit/xpcshell.ini rename : js/src/xpconnect/wrappers/AccessCheck.cpp => js/xpconnect/wrappers/AccessCheck.cpp rename : js/src/xpconnect/wrappers/AccessCheck.h => js/xpconnect/wrappers/AccessCheck.h rename : js/src/xpconnect/wrappers/CrossOriginWrapper.cpp => js/xpconnect/wrappers/CrossOriginWrapper.cpp rename : js/src/xpconnect/wrappers/CrossOriginWrapper.h => js/xpconnect/wrappers/CrossOriginWrapper.h rename : js/src/xpconnect/wrappers/FilteringWrapper.cpp => js/xpconnect/wrappers/FilteringWrapper.cpp rename : js/src/xpconnect/wrappers/FilteringWrapper.h => js/xpconnect/wrappers/FilteringWrapper.h rename : js/src/xpconnect/wrappers/Makefile.in => js/xpconnect/wrappers/Makefile.in rename : js/src/xpconnect/wrappers/WrapperFactory.cpp => js/xpconnect/wrappers/WrapperFactory.cpp rename : js/src/xpconnect/wrappers/WrapperFactory.h => js/xpconnect/wrappers/WrapperFactory.h rename : js/src/xpconnect/wrappers/XrayWrapper.cpp => js/xpconnect/wrappers/XrayWrapper.cpp rename : js/src/xpconnect/wrappers/XrayWrapper.h => js/xpconnect/wrappers/XrayWrapper.h
2011-10-14 10:52:47 -07:00
#include "XPCModule.h"
#include "mozilla/ModuleUtils.h"
#include "nsLayoutStatics.h"
#include "nsContentCID.h"
#include "nsContentDLF.h"
#include "nsContentPolicyUtils.h"
#include "nsDataDocumentContentPolicy.h"
#include "nsNoDataProtocolContentPolicy.h"
#include "nsDOMCID.h"
#include "nsHTMLContentSerializer.h"
#include "nsHTMLParts.h"
#include "nsGenericHTMLElement.h"
#include "nsIComponentManager.h"
#include "nsIContentIterator.h"
#include "nsIContentSerializer.h"
#include "nsIContentViewer.h"
#include "nsIController.h"
#include "nsIControllers.h"
#include "nsIDOMDOMImplementation.h"
#include "nsIDocument.h"
#include "nsIDocumentEncoder.h"
#include "nsIFactory.h"
#include "nsIFrameUtil.h"
#include "nsHTMLStyleSheet.h"
#include "nsILayoutDebugger.h"
#include "nsINameSpaceManager.h"
#include "nsINodeInfo.h"
#include "nsIObserver.h"
#include "nsIObserverService.h"
#include "nsIPresShell.h"
#include "nsIScriptNameSpaceManager.h"
#include "nsISelection.h"
#include "nsCaret.h"
#include "nsPlainTextSerializer.h"
#include "nsXMLContentSerializer.h"
#include "nsXHTMLContentSerializer.h"
#include "nsRuleNode.h"
#include "nsContentAreaDragDrop.h"
#include "nsContentList.h"
#include "nsBox.h"
2012-10-15 11:35:50 -07:00
#include "nsIFrameTraversal.h"
#include "nsLayoutCID.h"
#include "nsStyleSheetService.h"
#include "nsFocusManager.h"
#include "ThirdPartyUtil.h"
#include "mozilla/Services.h"
#include "nsStructuredCloneContainer.h"
#include "mozilla/Attributes.h"
#include "nsIEventListenerService.h"
#include "nsIMessageManager.h"
// Transformiix stuff
#include "nsXPathEvaluator.h"
#include "txMozillaXSLTProcessor.h"
#include "txNodeSetAdaptor.h"
#include "nsDOMParser.h"
#include "nsDOMSerializer.h"
#include "nsXMLHttpRequest.h"
#include "nsChannelPolicy.h"
#include "nsEventSource.h"
// view stuff
#include "nsViewsCID.h"
#include "nsViewManager.h"
#include "nsContentCreatorFunctions.h"
// DOM includes
#include "nsDOMException.h"
#include "nsDOMFileReader.h"
#include "ArchiveReader.h"
#include "nsFormData.h"
#include "nsBlobProtocolHandler.h"
#include "nsBlobURI.h"
#include "nsGlobalWindowCommands.h"
#include "nsIControllerCommandTable.h"
#include "nsJSProtocolHandler.h"
#include "nsScriptNameSpaceManager.h"
#include "nsIControllerContext.h"
#include "nsDOMScriptObjectFactory.h"
#include "nsDOMStorage.h"
#include "nsJSON.h"
#include "mozilla/dom/indexedDB/IndexedDatabaseManager.h"
#include "mozIApplicationClearPrivateDataParams.h"
#include "mozilla/dom/DOMRequest.h"
#include "mozilla/OSFileConstants.h"
#include "mozilla/dom/Activity.h"
#include "mozilla/dom/network/TCPSocketChild.h"
#ifdef MOZ_B2G_RIL
#include "SystemWorkerManager.h"
using mozilla::dom::gonk::SystemWorkerManager;
#define SYSTEMWORKERMANAGER_CID \
{0xd53b6524, 0x6ac3, 0x42b0, {0xae, 0xca, 0x62, 0xb3, 0xc4, 0xe5, 0x2b, 0x04}}
#define SYSTEMWORKERMANAGER_CONTRACTID \
"@mozilla.org/telephony/system-worker-manager;1"
#endif
#ifdef MOZ_B2G_BT
#include "BluetoothService.h"
using mozilla::dom::bluetooth::BluetoothService;
#define BLUETOOTHSERVICE_CID \
{0xa753b487, 0x3344, 0x4de4, {0xad, 0x5f, 0x06, 0x36, 0x76, 0xa7, 0xc1, 0x04}}
#define BLUETOOTHSERVICE_CONTRACTID \
"@mozilla.org/bluetooth/service;1"
#endif
#ifdef MOZ_WIDGET_GONK
#include "AudioManager.h"
using mozilla::dom::gonk::AudioManager;
#include "nsVolumeService.h"
using mozilla::system::nsVolumeService;
#endif
#ifdef MOZ_B2G_FM
#include "FMRadio.h"
using mozilla::dom::fm::FMRadio;
#endif
#include "nsDOMMutationObserver.h"
// Editor stuff
#include "nsEditorCID.h"
#include "nsEditor.h"
#include "nsPlaintextEditor.h"
#include "nsEditorController.h" //CID
#include "nsHTMLEditor.h"
#include "nsTextServicesDocument.h"
#include "nsTextServicesCID.h"
#include "nsScriptSecurityManager.h"
#include "nsPrincipal.h"
#include "nsSystemPrincipal.h"
#include "nsNullPrincipal.h"
#include "nsNetCID.h"
#ifndef MOZ_WIDGET_GONK
#if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_PLATFORM_MAEMO)
#include "nsHapticFeedback.h"
#endif
#endif
#include "nsParserUtils.h"
#define NS_EDITORCOMMANDTABLE_CID \
{ 0x4f5e62b8, 0xd659, 0x4156, { 0x84, 0xfc, 0x2f, 0x60, 0x99, 0x40, 0x03, 0x69 }}
#define NS_EDITINGCOMMANDTABLE_CID \
{ 0xcb38a746, 0xbeb8, 0x43f3, { 0x94, 0x29, 0x77, 0x96, 0xe1, 0xa9, 0x3f, 0xb4 }}
#define NS_HAPTICFEEDBACK_CID \
{ 0x1f15dbc8, 0xbfaa, 0x45de, \
{ 0x8a, 0x46, 0x08, 0xe2, 0xe2, 0x63, 0x26, 0xb0 } }
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPlaintextEditor)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsParserUtils)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextServicesDocument)
#ifdef ENABLE_EDITOR_API_LOG
#include "nsHTMLEditorLog.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditorLog)
#else
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLEditor)
#endif
#include "nsHTMLCanvasFrame.h"
#include "nsIDOMCanvasRenderingContext2D.h"
#include "nsIDOMWebGLRenderingContext.h"
class nsIDocumentLoaderFactory;
#define PRODUCT_NAME "Gecko"
#define NS_HTMLIMGELEMENT_CONTRACTID \
"@mozilla.org/content/element/html;1?name=img"
#define NS_HTMLOPTIONELEMENT_CONTRACTID \
"@mozilla.org/content/element/html;1?name=option"
#ifdef MOZ_MEDIA
#define NS_HTMLAUDIOELEMENT_CONTRACTID \
"@mozilla.org/content/element/html;1?name=audio"
#endif
/* 0ddf4df8-4dbb-4133-8b79-9afb966514f5 */
#define NS_PLUGINDOCLOADERFACTORY_CID \
{ 0x0ddf4df8, 0x4dbb, 0x4133, { 0x8b, 0x79, 0x9a, 0xfb, 0x96, 0x65, 0x14, 0xf5 } }
#define NS_WINDOWCOMMANDTABLE_CID \
{ /* 0DE2FBFA-6B7F-11D7-BBBA-0003938A9D96 */ \
0x0DE2FBFA, 0x6B7F, 0x11D7, {0xBB, 0xBA, 0x00, 0x03, 0x93, 0x8A, 0x9D, 0x96} }
#include "nsIBoxObject.h"
#ifdef MOZ_XUL
#include "inDOMView.h"
#endif /* MOZ_XUL */
#include "inDeepTreeWalker.h"
#include "inFlasher.h"
#include "inCSSValueSearch.h"
#include "inDOMUtils.h"
#ifdef MOZ_XUL
#include "nsIXULDocument.h"
#include "nsIXULSortService.h"
nsresult
NS_NewXULContentBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
nsresult
NS_NewXULTreeBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
#endif
static void Shutdown();
#ifdef MOZ_XTF
#include "nsIXTFService.h"
#include "nsIXMLContentBuilder.h"
#endif
#include "nsGeolocation.h"
#include "nsDeviceSensors.h"
#include "nsCSPService.h"
#include "nsISmsService.h"
#include "nsISmsDatabaseService.h"
#include "mozilla/dom/sms/SmsRequestManager.h"
#include "mozilla/dom/sms/SmsServicesFactory.h"
#include "nsIPowerManagerService.h"
#include "nsIAlarmHalService.h"
#include "nsMixedContentBlocker.h"
#include "mozilla/dom/power/PowerManagerService.h"
#include "mozilla/dom/alarm/AlarmHalService.h"
#include "mozilla/dom/time/TimeService.h"
#ifdef MOZ_WIDGET_GONK
#include "GonkGPSGeolocationProvider.h"
#endif
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::dom::file;
using namespace mozilla::dom::sms;
using mozilla::dom::alarm::AlarmHalService;
using mozilla::dom::indexedDB::IndexedDatabaseManager;
using mozilla::dom::power::PowerManagerService;
using mozilla::dom::TCPSocketChild;
using mozilla::dom::time::TimeService;
// Transformiix
/* 5d5d92cd-6bf8-11d9-bf4a-000a95dc234c */
#define TRANSFORMIIX_NODESET_CID \
{ 0x5d5d92cd, 0x6bf8, 0x11d9, { 0xbf, 0x4a, 0x0, 0x0a, 0x95, 0xdc, 0x23, 0x4c } }
#define TRANSFORMIIX_NODESET_CONTRACTID \
"@mozilla.org/transformiix-nodeset;1"
// Factory Constructor
NS_GENERIC_FACTORY_CONSTRUCTOR(txMozillaXSLTProcessor)
NS_GENERIC_AGGREGATED_CONSTRUCTOR_INIT(nsXPathEvaluator, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(txNodeSetAdaptor, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMSerializer)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsXMLHttpRequest, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEventSource)
NS_GENERIC_FACTORY_CONSTRUCTOR(Activity)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDOMFileReader, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(ArchiveReader)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFormData)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlobProtocolHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBlobURI)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMParser)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsDOMStorageManager,
nsDOMStorageManager::GetInstance)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsChannelPolicy)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(IndexedDatabaseManager,
IndexedDatabaseManager::FactoryCreate)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(DOMRequestService,
DOMRequestService::FactoryCreate)
#ifdef MOZ_B2G_RIL
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(SystemWorkerManager,
SystemWorkerManager::FactoryCreate)
#endif
#ifdef MOZ_B2G_BT
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(BluetoothService,
BluetoothService::FactoryCreate)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMMutationObserver)
#ifdef MOZ_WIDGET_GONK
NS_GENERIC_FACTORY_CONSTRUCTOR(AudioManager)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsVolumeService)
#endif
#ifdef MOZ_B2G_FM
NS_GENERIC_FACTORY_CONSTRUCTOR(FMRadio)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDeviceSensors)
#ifndef MOZ_WIDGET_GONK
#if defined(ANDROID) || defined(MOZ_PLATFORM_MAEMO)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHapticFeedback)
#endif
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ThirdPartyUtil, Init)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsISmsService, SmsServicesFactory::CreateSmsService)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsISmsDatabaseService, SmsServicesFactory::CreateSmsDatabaseService)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIPowerManagerService,
PowerManagerService::GetInstance)
NS_GENERIC_FACTORY_CONSTRUCTOR(SmsRequestManager)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIAlarmHalService,
AlarmHalService::GetInstance)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsITimeService,
TimeService::GetInstance)
#ifdef MOZ_WIDGET_GONK
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIGeolocationProvider,
GonkGPSGeolocationProvider::GetSingleton)
#endif
//-----------------------------------------------------------------------------
// Per bug 209804, it is necessary to observe the "xpcom-shutdown" event and
// perform shutdown of the layout modules at that time instead of waiting for
// our module destructor to run. If we do not do this, then we risk holding
// references to objects in other component libraries that have already been
// shutdown (and possibly unloaded if 60709 is ever fixed).
class LayoutShutdownObserver MOZ_FINAL : public nsIObserver
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIOBSERVER
};
NS_IMPL_ISUPPORTS1(LayoutShutdownObserver, nsIObserver)
NS_IMETHODIMP
LayoutShutdownObserver::Observe(nsISupports *aSubject,
const char *aTopic,
const PRUnichar *someData)
{
if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
Shutdown();
nsContentUtils::XPCOMShutdown();
}
return NS_OK;
}
//-----------------------------------------------------------------------------
static bool gInitialized = false;
// Perform our one-time intialization for this module
// static
nsresult
Initialize()
{
if (gInitialized) {
NS_RUNTIMEABORT("Recursive layout module initialization");
return NS_ERROR_FAILURE;
}
MOZ_STATIC_ASSERT(sizeof(uintptr_t) == sizeof(void*),
"Eeek! You'll need to adjust the size of uintptr_t to the "
"size of a pointer on your platform.");
gInitialized = true;
nsresult rv;
rv = xpcModuleCtor();
if (NS_FAILED(rv))
return rv;
rv = nsLayoutStatics::Initialize();
if (NS_FAILED(rv)) {
Shutdown();
return rv;
}
// Add our shutdown observer.
nsCOMPtr<nsIObserverService> observerService =
mozilla::services::GetObserverService();
if (observerService) {
LayoutShutdownObserver* observer = new LayoutShutdownObserver();
if (!observer) {
Shutdown();
return NS_ERROR_OUT_OF_MEMORY;
}
observerService->AddObserver(observer, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
} else {
NS_WARNING("Could not get an observer service. We will leak on shutdown.");
}
return NS_OK;
}
// Shutdown this module, releasing all of the module resources
// static
void
Shutdown()
{
NS_PRECONDITION(gInitialized, "module not initialized");
if (!gInitialized)
return;
gInitialized = false;
nsLayoutStatics::Release();
}
#ifdef DEBUG
nsresult NS_NewFrameUtil(nsIFrameUtil** aResult);
nsresult NS_NewLayoutDebugger(nsILayoutDebugger** aResult);
#endif
nsresult NS_NewBoxObject(nsIBoxObject** aResult);
#ifdef MOZ_XUL
nsresult NS_NewListBoxObject(nsIBoxObject** aResult);
nsresult NS_NewScrollBoxObject(nsIBoxObject** aResult);
nsresult NS_NewMenuBoxObject(nsIBoxObject** aResult);
nsresult NS_NewPopupBoxObject(nsIBoxObject** aResult);
nsresult NS_NewContainerBoxObject(nsIBoxObject** aResult);
nsresult NS_NewTreeBoxObject(nsIBoxObject** aResult);
#endif
nsresult NS_NewCanvasRenderingContext2D(nsIDOMCanvasRenderingContext2D** aResult);
nsresult NS_NewCanvasRenderingContextWebGL(nsIDOMWebGLRenderingContext** aResult);
2012-10-15 11:35:50 -07:00
nsresult NS_CreateFrameTraversal(nsIFrameTraversal** aResult);
nsresult NS_NewDomSelection(nsISelection** aResult);
nsresult NS_NewContentViewer(nsIContentViewer** aResult);
nsresult NS_NewGenRegularIterator(nsIContentIterator** aResult);
nsresult NS_NewGenSubtreeIterator(nsIContentIterator** aInstancePtrResult);
nsresult NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
nsresult NS_NewHTMLCopyTextEncoder(nsIDocumentEncoder** aResult);
nsresult NS_NewTextEncoder(nsIDocumentEncoder** aResult);
nsresult NS_NewContentPolicy(nsIContentPolicy** aResult);
nsresult NS_NewEventListenerService(nsIEventListenerService** aResult);
nsresult NS_NewGlobalMessageManager(nsIMessageBroadcaster** aResult);
nsresult NS_NewParentProcessMessageManager(nsIMessageBroadcaster** aResult);
nsresult NS_NewChildProcessMessageManager(nsISyncMessageSender** aResult);
nsresult NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult);
#define MAKE_CTOR(ctor_, iface_, func_) \
static nsresult \
ctor_(nsISupports* aOuter, REFNSIID aIID, void** aResult) \
{ \
*aResult = nullptr; \
if (aOuter) \
return NS_ERROR_NO_AGGREGATION; \
iface_* inst; \
nsresult rv = func_(&inst); \
if (NS_SUCCEEDED(rv)) { \
rv = inst->QueryInterface(aIID, aResult); \
NS_RELEASE(inst); \
} \
return rv; \
}
// As above, but expects
// already_AddRefed<nsIFoo> NS_NewFoo();
// instead of
// nsresult NS_NewFoo(nsIFoo**);
#define MAKE_CTOR2(ctor_, iface_, func_) \
static nsresult \
ctor_(nsISupports* aOuter, REFNSIID aIID, void** aResult) \
{ \
*aResult = nullptr; \
if (aOuter) { \
return NS_ERROR_NO_AGGREGATION; \
} \
nsCOMPtr<iface_> inst = func_(); \
inst.forget(aResult); \
return NS_OK; \
}
#ifdef DEBUG
MAKE_CTOR(CreateNewFrameUtil, nsIFrameUtil, NS_NewFrameUtil)
MAKE_CTOR(CreateNewLayoutDebugger, nsILayoutDebugger, NS_NewLayoutDebugger)
#endif
2012-10-15 11:35:50 -07:00
MAKE_CTOR(CreateNewFrameTraversal, nsIFrameTraversal, NS_CreateFrameTraversal)
MAKE_CTOR(CreateNewPresShell, nsIPresShell, NS_NewPresShell)
MAKE_CTOR(CreateNewBoxObject, nsIBoxObject, NS_NewBoxObject)
#ifdef MOZ_XUL
MAKE_CTOR(CreateNewListBoxObject, nsIBoxObject, NS_NewListBoxObject)
MAKE_CTOR(CreateNewMenuBoxObject, nsIBoxObject, NS_NewMenuBoxObject)
MAKE_CTOR(CreateNewPopupBoxObject, nsIBoxObject, NS_NewPopupBoxObject)
MAKE_CTOR(CreateNewScrollBoxObject, nsIBoxObject, NS_NewScrollBoxObject)
MAKE_CTOR(CreateNewTreeBoxObject, nsIBoxObject, NS_NewTreeBoxObject)
MAKE_CTOR(CreateNewContainerBoxObject, nsIBoxObject, NS_NewContainerBoxObject)
#endif // MOZ_XUL
#ifdef MOZ_XUL
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMView)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(inDeepTreeWalker)
NS_GENERIC_FACTORY_CONSTRUCTOR(inFlasher)
NS_GENERIC_FACTORY_CONSTRUCTOR(inCSSValueSearch)
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtils)
MAKE_CTOR(CreateNameSpaceManager, nsINameSpaceManager, NS_GetNameSpaceManager)
MAKE_CTOR(CreateContentViewer, nsIContentViewer, NS_NewContentViewer)
MAKE_CTOR(CreateHTMLDocument, nsIDocument, NS_NewHTMLDocument)
MAKE_CTOR(CreateXMLDocument, nsIDocument, NS_NewXMLDocument)
MAKE_CTOR(CreateSVGDocument, nsIDocument, NS_NewSVGDocument)
MAKE_CTOR(CreateImageDocument, nsIDocument, NS_NewImageDocument)
MAKE_CTOR(CreateDOMSelection, nsISelection, NS_NewDomSelection)
MAKE_CTOR2(CreateContentIterator, nsIContentIterator, NS_NewContentIterator)
MAKE_CTOR2(CreatePreContentIterator, nsIContentIterator, NS_NewPreContentIterator)
MAKE_CTOR2(CreateSubtreeIterator, nsIContentIterator, NS_NewContentSubtreeIterator)
// CreateHTMLImgElement, see below
// CreateHTMLOptionElement, see below
// CreateHTMLAudioElement, see below
MAKE_CTOR(CreateTextEncoder, nsIDocumentEncoder, NS_NewTextEncoder)
MAKE_CTOR(CreateHTMLCopyTextEncoder, nsIDocumentEncoder, NS_NewHTMLCopyTextEncoder)
MAKE_CTOR(CreateXMLContentSerializer, nsIContentSerializer, NS_NewXMLContentSerializer)
MAKE_CTOR(CreateHTMLContentSerializer, nsIContentSerializer, NS_NewHTMLContentSerializer)
MAKE_CTOR(CreateXHTMLContentSerializer, nsIContentSerializer, NS_NewXHTMLContentSerializer)
MAKE_CTOR(CreatePlainTextSerializer, nsIContentSerializer, NS_NewPlainTextSerializer)
MAKE_CTOR(CreateContentPolicy, nsIContentPolicy, NS_NewContentPolicy)
#ifdef MOZ_XUL
MAKE_CTOR(CreateXULSortService, nsIXULSortService, NS_NewXULSortService)
// NS_NewXULContentBuilder
// NS_NewXULTreeBuilder
MAKE_CTOR(CreateXULDocument, nsIXULDocument, NS_NewXULDocument)
// NS_NewXULControllers
#endif
#ifdef MOZ_XTF
MAKE_CTOR(CreateXTFService, nsIXTFService, NS_NewXTFService)
MAKE_CTOR(CreateXMLContentBuilder, nsIXMLContentBuilder, NS_NewXMLContentBuilder)
#endif
MAKE_CTOR(CreateContentDLF, nsIDocumentLoaderFactory, NS_NewContentDocumentLoaderFactory)
MAKE_CTOR(CreateEventListenerService, nsIEventListenerService, NS_NewEventListenerService)
MAKE_CTOR(CreateGlobalMessageManager, nsIMessageBroadcaster, NS_NewGlobalMessageManager)
MAKE_CTOR(CreateParentMessageManager, nsIMessageBroadcaster, NS_NewParentProcessMessageManager)
MAKE_CTOR(CreateChildMessageManager, nsISyncMessageSender, NS_NewChildProcessMessageManager)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDataDocumentContentPolicy)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoDataProtocolContentPolicy)
MAKE_CTOR(CreatePluginDocument, nsIDocument, NS_NewPluginDocument)
#ifdef MOZ_MEDIA
MAKE_CTOR(CreateVideoDocument, nsIDocument, NS_NewVideoDocument)
#endif
MAKE_CTOR(CreateFocusManager, nsIFocusManager, NS_NewFocusManager)
MAKE_CTOR(CreateCanvasRenderingContext2D, nsIDOMCanvasRenderingContext2D, NS_NewCanvasRenderingContext2D)
MAKE_CTOR(CreateCanvasRenderingContextWebGL, nsIDOMWebGLRenderingContext, NS_NewCanvasRenderingContextWebGL)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStyleSheetService, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJSURI)
// views are not refcounted, so this is the same as
// NS_GENERIC_FACTORY_CONSTRUCTOR without the NS_ADDREF/NS_RELEASE
#define NS_GENERIC_FACTORY_CONSTRUCTOR_NOREFS(_InstanceClass) \
static nsresult \
_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \
void **aResult) \
{ \
nsresult rv; \
\
*aResult = NULL; \
if (NULL != aOuter) { \
rv = NS_ERROR_NO_AGGREGATION; \
return rv; \
} \
\
_InstanceClass * inst = new _InstanceClass(); \
if (NULL == inst) { \
rv = NS_ERROR_OUT_OF_MEMORY; \
return rv; \
} \
rv = inst->QueryInterface(aIID, aResult); \
\
return rv; \
} \
NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewManager)
static nsresult
CreateHTMLImgElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
{
*aResult = nullptr;
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
// Note! NS_NewHTMLImageElement is special cased to handle a null nodeinfo
nsCOMPtr<nsINodeInfo> ni;
nsIContent* inst = NS_NewHTMLImageElement(ni.forget());
nsresult rv = NS_ERROR_OUT_OF_MEMORY;
if (inst) {
NS_ADDREF(inst);
rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
}
return rv;
}
static nsresult
CreateHTMLOptionElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
{
*aResult = nullptr;
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
// Note! NS_NewHTMLOptionElement is special cased to handle a null nodeinfo
nsCOMPtr<nsINodeInfo> ni;
nsIContent* inst = NS_NewHTMLOptionElement(ni.forget());
nsresult rv = NS_ERROR_OUT_OF_MEMORY;
if (inst) {
NS_ADDREF(inst);
rv = inst->QueryInterface(aIID, aResult);
NS_RELEASE(inst);
}
return rv;
}
#ifdef MOZ_MEDIA
static nsresult
CreateHTMLAudioElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
{
*aResult = nullptr;
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
// Note! NS_NewHTMLAudioElement is special cased to handle a null nodeinfo
nsCOMPtr<nsINodeInfo> ni;
nsCOMPtr<nsIContent> inst(NS_NewHTMLAudioElement(ni.forget()));
return inst ? inst->QueryInterface(aIID, aResult) : NS_ERROR_OUT_OF_MEMORY;
}
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMScriptObjectFactory)
#define NS_GEOLOCATION_CID \
{ 0x1E1C3FF, 0x94A, 0xD048, { 0x44, 0xB4, 0x62, 0xD2, 0x9C, 0x7B, 0x4F, 0x39 } }
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGeolocation, Init)
#define NS_GEOLOCATION_SERVICE_CID \
{ 0x404d02a, 0x1CA, 0xAAAB, { 0x47, 0x62, 0x94, 0x4b, 0x1b, 0xf2, 0xf7, 0xb5 } }
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsGeolocationService, nsGeolocationService::GetGeolocationService)
NS_GENERIC_FACTORY_CONSTRUCTOR(CSPService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMixedContentBlocker)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPrincipal)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSecurityNameSet)
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsSystemPrincipal,
nsScriptSecurityManager::SystemPrincipalSingletonConstructor)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNullPrincipal, Init)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsStructuredCloneContainer)
NS_GENERIC_FACTORY_CONSTRUCTOR(OSFileConstantsService)
NS_GENERIC_FACTORY_CONSTRUCTOR(TCPSocketChild)
static nsresult
Construct_nsIScriptSecurityManager(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
if (!aResult)
return NS_ERROR_NULL_POINTER;
*aResult = nullptr;
if (aOuter)
return NS_ERROR_NO_AGGREGATION;
nsScriptSecurityManager *obj = nsScriptSecurityManager::GetScriptSecurityManager();
if (!obj)
return NS_ERROR_OUT_OF_MEMORY;
if (NS_FAILED(obj->QueryInterface(aIID, aResult)))
return NS_ERROR_FAILURE;
return NS_OK;
}
#ifdef DEBUG
NS_DEFINE_NAMED_CID(NS_FRAME_UTIL_CID);
NS_DEFINE_NAMED_CID(NS_LAYOUT_DEBUGGER_CID);
#endif
2012-10-15 11:35:50 -07:00
NS_DEFINE_NAMED_CID(NS_FRAMETRAVERSAL_CID);
NS_DEFINE_NAMED_CID(NS_PRESSHELL_CID);
NS_DEFINE_NAMED_CID(NS_BOXOBJECT_CID);
#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_LISTBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_MENUBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_POPUPBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_CONTAINERBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_SCROLLBOXOBJECT_CID);
NS_DEFINE_NAMED_CID(NS_TREEBOXOBJECT_CID);
#endif // MOZ_XUL
#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(IN_DOMVIEW_CID);
#endif
NS_DEFINE_NAMED_CID(IN_DEEPTREEWALKER_CID);
NS_DEFINE_NAMED_CID(IN_FLASHER_CID);
NS_DEFINE_NAMED_CID(IN_CSSVALUESEARCH_CID);
NS_DEFINE_NAMED_CID(IN_DOMUTILS_CID);
NS_DEFINE_NAMED_CID(NS_NAMESPACEMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_CONTENT_VIEWER_CID);
NS_DEFINE_NAMED_CID(NS_HTMLDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_XMLDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_SVGDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_IMAGEDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_DOMSELECTION_CID);
NS_DEFINE_NAMED_CID(NS_CONTENTITERATOR_CID);
NS_DEFINE_NAMED_CID(NS_PRECONTENTITERATOR_CID);
NS_DEFINE_NAMED_CID(NS_SUBTREEITERATOR_CID);
NS_DEFINE_NAMED_CID(NS_HTMLIMAGEELEMENT_CID);
NS_DEFINE_NAMED_CID(NS_HTMLOPTIONELEMENT_CID);
#ifdef MOZ_MEDIA
NS_DEFINE_NAMED_CID(NS_HTMLAUDIOELEMENT_CID);
#endif
NS_DEFINE_NAMED_CID(NS_CANVASRENDERINGCONTEXT2D_CID);
NS_DEFINE_NAMED_CID(NS_CANVASRENDERINGCONTEXTWEBGL_CID);
NS_DEFINE_NAMED_CID(NS_TEXT_ENCODER_CID);
NS_DEFINE_NAMED_CID(NS_HTMLCOPY_TEXT_ENCODER_CID);
NS_DEFINE_NAMED_CID(NS_XMLCONTENTSERIALIZER_CID);
NS_DEFINE_NAMED_CID(NS_XHTMLCONTENTSERIALIZER_CID);
NS_DEFINE_NAMED_CID(NS_HTMLCONTENTSERIALIZER_CID);
NS_DEFINE_NAMED_CID(NS_PLAINTEXTSERIALIZER_CID);
NS_DEFINE_NAMED_CID(NS_PARSERUTILS_CID);
NS_DEFINE_NAMED_CID(NS_SCRIPTABLEUNESCAPEHTML_CID);
NS_DEFINE_NAMED_CID(NS_CONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_DATADOCUMENTCONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_NODATAPROTOCOLCONTENTPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_XULCONTROLLERS_CID);
#ifdef MOZ_XUL
NS_DEFINE_NAMED_CID(NS_XULSORTSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_XULTEMPLATEBUILDER_CID);
NS_DEFINE_NAMED_CID(NS_XULTREEBUILDER_CID);
NS_DEFINE_NAMED_CID(NS_XULDOCUMENT_CID);
#endif
#ifdef MOZ_XTF
NS_DEFINE_NAMED_CID(NS_XTFSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_XMLCONTENTBUILDER_CID);
#endif
NS_DEFINE_NAMED_CID(NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID);
NS_DEFINE_NAMED_CID(NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
NS_DEFINE_NAMED_CID(NS_JSPROTOCOLHANDLER_CID);
NS_DEFINE_NAMED_CID(NS_JSURI_CID);
NS_DEFINE_NAMED_CID(NS_WINDOWCOMMANDTABLE_CID);
NS_DEFINE_NAMED_CID(NS_WINDOWCONTROLLER_CID);
NS_DEFINE_NAMED_CID(NS_VIEW_MANAGER_CID);
NS_DEFINE_NAMED_CID(NS_PLUGINDOCLOADERFACTORY_CID);
NS_DEFINE_NAMED_CID(NS_PLUGINDOCUMENT_CID);
#ifdef MOZ_MEDIA
NS_DEFINE_NAMED_CID(NS_VIDEODOCUMENT_CID);
#endif
NS_DEFINE_NAMED_CID(NS_STYLESHEETSERVICE_CID);
NS_DEFINE_NAMED_CID(TRANSFORMIIX_XSLT_PROCESSOR_CID);
NS_DEFINE_NAMED_CID(TRANSFORMIIX_XPATH_EVALUATOR_CID);
NS_DEFINE_NAMED_CID(TRANSFORMIIX_NODESET_CID);
NS_DEFINE_NAMED_CID(NS_XMLSERIALIZER_CID);
NS_DEFINE_NAMED_CID(NS_FILEREADER_CID);
NS_DEFINE_NAMED_CID(NS_ARCHIVEREADER_CID);
NS_DEFINE_NAMED_CID(NS_FORMDATA_CID);
NS_DEFINE_NAMED_CID(NS_BLOBPROTOCOLHANDLER_CID);
NS_DEFINE_NAMED_CID(NS_BLOBURI_CID);
NS_DEFINE_NAMED_CID(NS_XMLHTTPREQUEST_CID);
NS_DEFINE_NAMED_CID(NS_EVENTSOURCE_CID);
NS_DEFINE_NAMED_CID(NS_DOMACTIVITY_CID);
NS_DEFINE_NAMED_CID(NS_DOMPARSER_CID);
NS_DEFINE_NAMED_CID(NS_DOMSTORAGE2_CID);
NS_DEFINE_NAMED_CID(NS_DOMSTORAGEMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_DOMJSON_CID);
NS_DEFINE_NAMED_CID(NS_TEXTEDITOR_CID);
NS_DEFINE_NAMED_CID(INDEXEDDB_MANAGER_CID);
NS_DEFINE_NAMED_CID(DOMREQUEST_SERVICE_CID);
#ifdef MOZ_B2G_RIL
NS_DEFINE_NAMED_CID(SYSTEMWORKERMANAGER_CID);
#endif
#ifdef MOZ_B2G_BT
NS_DEFINE_NAMED_CID(BLUETOOTHSERVICE_CID);
#endif
#ifdef MOZ_WIDGET_GONK
NS_DEFINE_NAMED_CID(NS_AUDIOMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_VOLUMESERVICE_CID);
#endif
#ifdef MOZ_B2G_FM
NS_DEFINE_NAMED_CID(NS_FMRADIO_CID);
#endif
#ifdef ENABLE_EDITOR_API_LOG
NS_DEFINE_NAMED_CID(NS_HTMLEDITOR_CID);
#else
NS_DEFINE_NAMED_CID(NS_HTMLEDITOR_CID);
#endif
NS_DEFINE_NAMED_CID(NS_EDITORCONTROLLER_CID);
NS_DEFINE_NAMED_CID(NS_EDITINGCONTROLLER_CID);
NS_DEFINE_NAMED_CID(NS_EDITORCOMMANDTABLE_CID);
NS_DEFINE_NAMED_CID(NS_EDITINGCOMMANDTABLE_CID);
NS_DEFINE_NAMED_CID(NS_TEXTSERVICESDOCUMENT_CID);
NS_DEFINE_NAMED_CID(NS_GEOLOCATION_SERVICE_CID);
NS_DEFINE_NAMED_CID(NS_GEOLOCATION_CID);
NS_DEFINE_NAMED_CID(NS_FOCUSMANAGER_CID);
NS_DEFINE_NAMED_CID(CSPSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_MIXEDCONTENTBLOCKER_CID);
NS_DEFINE_NAMED_CID(NS_EVENTLISTENERSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_GLOBALMESSAGEMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_PARENTPROCESSMESSAGEMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_CHILDPROCESSMESSAGEMANAGER_CID);
NS_DEFINE_NAMED_CID(NSCHANNELPOLICY_CID);
NS_DEFINE_NAMED_CID(NS_SCRIPTSECURITYMANAGER_CID);
NS_DEFINE_NAMED_CID(NS_PRINCIPAL_CID);
NS_DEFINE_NAMED_CID(NS_SYSTEMPRINCIPAL_CID);
NS_DEFINE_NAMED_CID(NS_NULLPRINCIPAL_CID);
NS_DEFINE_NAMED_CID(NS_SECURITYNAMESET_CID);
NS_DEFINE_NAMED_CID(THIRDPARTYUTIL_CID);
NS_DEFINE_NAMED_CID(NS_STRUCTUREDCLONECONTAINER_CID);
NS_DEFINE_NAMED_CID(NS_DOMMUTATIONOBSERVER_CID);
NS_DEFINE_NAMED_CID(NS_DEVICE_SENSORS_CID);
#ifndef MOZ_WIDGET_GONK
#if defined(ANDROID) || defined(MOZ_PLATFORM_MAEMO)
NS_DEFINE_NAMED_CID(NS_HAPTICFEEDBACK_CID);
#endif
#endif
NS_DEFINE_NAMED_CID(SMS_SERVICE_CID);
NS_DEFINE_NAMED_CID(SMS_DATABASE_SERVICE_CID);
NS_DEFINE_NAMED_CID(SMS_REQUEST_MANAGER_CID);
NS_DEFINE_NAMED_CID(NS_POWERMANAGERSERVICE_CID);
NS_DEFINE_NAMED_CID(OSFILECONSTANTSSERVICE_CID);
NS_DEFINE_NAMED_CID(NS_ALARMHALSERVICE_CID);
NS_DEFINE_NAMED_CID(TCPSOCKETCHILD_CID);
NS_DEFINE_NAMED_CID(NS_TIMESERVICE_CID);
#ifdef MOZ_WIDGET_GONK
NS_DEFINE_NAMED_CID(GONK_GPS_GEOLOCATION_PROVIDER_CID);
#endif
static nsresult
CreateWindowCommandTableConstructor(nsISupports *aOuter,
REFNSIID aIID, void **aResult)
{
nsresult rv;
nsCOMPtr<nsIControllerCommandTable> commandTable =
do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
rv = nsWindowCommandRegistration::RegisterWindowCommands(commandTable);
if (NS_FAILED(rv)) return rv;
return commandTable->QueryInterface(aIID, aResult);
}
static nsresult
CreateWindowControllerWithSingletonCommandTable(nsISupports *aOuter,
REFNSIID aIID, void **aResult)
{
nsresult rv;
nsCOMPtr<nsIController> controller =
do_CreateInstance("@mozilla.org/embedcomp/base-command-controller;1", &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIControllerCommandTable> windowCommandTable = do_GetService(kNS_WINDOWCOMMANDTABLE_CID, &rv);
if (NS_FAILED(rv)) return rv;
// this is a singleton; make it immutable
windowCommandTable->MakeImmutable();
nsCOMPtr<nsIControllerContext> controllerContext = do_QueryInterface(controller, &rv);
if (NS_FAILED(rv)) return rv;
controllerContext->Init(windowCommandTable);
if (NS_FAILED(rv)) return rv;
return controller->QueryInterface(aIID, aResult);
}
// Constructor of a controller which is set up to use, internally, a
// singleton command-table pre-filled with editor commands.
static nsresult
nsEditorControllerConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
nsresult rv;
nsCOMPtr<nsIController> controller = do_CreateInstance("@mozilla.org/embedcomp/base-command-controller;1", &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIControllerCommandTable> editorCommandTable = do_GetService(kNS_EDITORCOMMANDTABLE_CID, &rv);
if (NS_FAILED(rv)) return rv;
// this guy is a singleton, so make it immutable
editorCommandTable->MakeImmutable();
nsCOMPtr<nsIControllerContext> controllerContext = do_QueryInterface(controller, &rv);
if (NS_FAILED(rv)) return rv;
rv = controllerContext->Init(editorCommandTable);
if (NS_FAILED(rv)) return rv;
return controller->QueryInterface(aIID, aResult);
}
// Constructor of a controller which is set up to use, internally, a
// singleton command-table pre-filled with editing commands.
static nsresult
nsEditingControllerConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
nsresult rv;
nsCOMPtr<nsIController> controller = do_CreateInstance("@mozilla.org/embedcomp/base-command-controller;1", &rv);
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIControllerCommandTable> editingCommandTable = do_GetService(kNS_EDITINGCOMMANDTABLE_CID, &rv);
if (NS_FAILED(rv)) return rv;
// this guy is a singleton, so make it immutable
editingCommandTable->MakeImmutable();
nsCOMPtr<nsIControllerContext> controllerContext = do_QueryInterface(controller, &rv);
if (NS_FAILED(rv)) return rv;
rv = controllerContext->Init(editingCommandTable);
if (NS_FAILED(rv)) return rv;
return controller->QueryInterface(aIID, aResult);
}
// Constructor for a command-table pre-filled with editor commands
static nsresult
nsEditorCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
nsresult rv;
nsCOMPtr<nsIControllerCommandTable> commandTable =
do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
rv = nsEditorController::RegisterEditorCommands(commandTable);
if (NS_FAILED(rv)) return rv;
// we don't know here whether we're being created as an instance,
// or a service, so we can't become immutable
return commandTable->QueryInterface(aIID, aResult);
}
// Constructor for a command-table pre-filled with editing commands
static nsresult
nsEditingCommandTableConstructor(nsISupports *aOuter, REFNSIID aIID,
void **aResult)
{
nsresult rv;
nsCOMPtr<nsIControllerCommandTable> commandTable =
do_CreateInstance(NS_CONTROLLERCOMMANDTABLE_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
rv = nsEditorController::RegisterEditingCommands(commandTable);
if (NS_FAILED(rv)) return rv;
// we don't know here whether we're being created as an instance,
// or a service, so we can't become immutable
return commandTable->QueryInterface(aIID, aResult);
}
static const mozilla::Module::CIDEntry kLayoutCIDs[] = {
XPCONNECT_CIDENTRIES
#ifdef DEBUG
{ &kNS_FRAME_UTIL_CID, false, NULL, CreateNewFrameUtil },
{ &kNS_LAYOUT_DEBUGGER_CID, false, NULL, CreateNewLayoutDebugger },
#endif
2012-10-15 11:35:50 -07:00
{ &kNS_FRAMETRAVERSAL_CID, false, NULL, CreateNewFrameTraversal },
{ &kNS_PRESSHELL_CID, false, NULL, CreateNewPresShell },
{ &kNS_BOXOBJECT_CID, false, NULL, CreateNewBoxObject },
#ifdef MOZ_XUL
{ &kNS_LISTBOXOBJECT_CID, false, NULL, CreateNewListBoxObject },
{ &kNS_MENUBOXOBJECT_CID, false, NULL, CreateNewMenuBoxObject },
{ &kNS_POPUPBOXOBJECT_CID, false, NULL, CreateNewPopupBoxObject },
{ &kNS_CONTAINERBOXOBJECT_CID, false, NULL, CreateNewContainerBoxObject },
{ &kNS_SCROLLBOXOBJECT_CID, false, NULL, CreateNewScrollBoxObject },
{ &kNS_TREEBOXOBJECT_CID, false, NULL, CreateNewTreeBoxObject },
#endif // MOZ_XUL
#ifdef MOZ_XUL
{ &kIN_DOMVIEW_CID, false, NULL, inDOMViewConstructor },
#endif
{ &kIN_DEEPTREEWALKER_CID, false, NULL, inDeepTreeWalkerConstructor },
{ &kIN_FLASHER_CID, false, NULL, inFlasherConstructor },
{ &kIN_CSSVALUESEARCH_CID, false, NULL, inCSSValueSearchConstructor },
{ &kIN_DOMUTILS_CID, false, NULL, inDOMUtilsConstructor },
{ &kNS_NAMESPACEMANAGER_CID, false, NULL, CreateNameSpaceManager },
{ &kNS_CONTENT_VIEWER_CID, false, NULL, CreateContentViewer },
{ &kNS_HTMLDOCUMENT_CID, false, NULL, CreateHTMLDocument },
{ &kNS_XMLDOCUMENT_CID, false, NULL, CreateXMLDocument },
{ &kNS_SVGDOCUMENT_CID, false, NULL, CreateSVGDocument },
{ &kNS_IMAGEDOCUMENT_CID, false, NULL, CreateImageDocument },
{ &kNS_DOMSELECTION_CID, false, NULL, CreateDOMSelection },
{ &kNS_CONTENTITERATOR_CID, false, NULL, CreateContentIterator },
{ &kNS_PRECONTENTITERATOR_CID, false, NULL, CreatePreContentIterator },
{ &kNS_SUBTREEITERATOR_CID, false, NULL, CreateSubtreeIterator },
{ &kNS_HTMLIMAGEELEMENT_CID, false, NULL, CreateHTMLImgElement },
{ &kNS_HTMLOPTIONELEMENT_CID, false, NULL, CreateHTMLOptionElement },
#ifdef MOZ_MEDIA
{ &kNS_HTMLAUDIOELEMENT_CID, false, NULL, CreateHTMLAudioElement },
#endif
{ &kNS_CANVASRENDERINGCONTEXT2D_CID, false, NULL, CreateCanvasRenderingContext2D },
{ &kNS_CANVASRENDERINGCONTEXTWEBGL_CID, false, NULL, CreateCanvasRenderingContextWebGL },
{ &kNS_TEXT_ENCODER_CID, false, NULL, CreateTextEncoder },
{ &kNS_HTMLCOPY_TEXT_ENCODER_CID, false, NULL, CreateHTMLCopyTextEncoder },
{ &kNS_XMLCONTENTSERIALIZER_CID, false, NULL, CreateXMLContentSerializer },
{ &kNS_HTMLCONTENTSERIALIZER_CID, false, NULL, CreateHTMLContentSerializer },
{ &kNS_XHTMLCONTENTSERIALIZER_CID, false, NULL, CreateXHTMLContentSerializer },
{ &kNS_PLAINTEXTSERIALIZER_CID, false, NULL, CreatePlainTextSerializer },
{ &kNS_PARSERUTILS_CID, false, NULL, nsParserUtilsConstructor },
{ &kNS_SCRIPTABLEUNESCAPEHTML_CID, false, NULL, nsParserUtilsConstructor },
{ &kNS_CONTENTPOLICY_CID, false, NULL, CreateContentPolicy },
{ &kNS_DATADOCUMENTCONTENTPOLICY_CID, false, NULL, nsDataDocumentContentPolicyConstructor },
{ &kNS_NODATAPROTOCOLCONTENTPOLICY_CID, false, NULL, nsNoDataProtocolContentPolicyConstructor },
{ &kNS_XULCONTROLLERS_CID, false, NULL, NS_NewXULControllers },
#ifdef MOZ_XUL
{ &kNS_XULSORTSERVICE_CID, false, NULL, CreateXULSortService },
{ &kNS_XULTEMPLATEBUILDER_CID, false, NULL, NS_NewXULContentBuilder },
{ &kNS_XULTREEBUILDER_CID, false, NULL, NS_NewXULTreeBuilder },
{ &kNS_XULDOCUMENT_CID, false, NULL, CreateXULDocument },
#endif
#ifdef MOZ_XTF
{ &kNS_XTFSERVICE_CID, false, NULL, CreateXTFService },
{ &kNS_XMLCONTENTBUILDER_CID, false, NULL, CreateXMLContentBuilder },
#endif
{ &kNS_CONTENT_DOCUMENT_LOADER_FACTORY_CID, false, NULL, CreateContentDLF },
{ &kNS_DOM_SCRIPT_OBJECT_FACTORY_CID, false, NULL, nsDOMScriptObjectFactoryConstructor },
{ &kNS_JSPROTOCOLHANDLER_CID, false, NULL, nsJSProtocolHandler::Create },
{ &kNS_JSURI_CID, false, NULL, nsJSURIConstructor },
{ &kNS_WINDOWCOMMANDTABLE_CID, false, NULL, CreateWindowCommandTableConstructor },
{ &kNS_WINDOWCONTROLLER_CID, false, NULL, CreateWindowControllerWithSingletonCommandTable },
{ &kNS_VIEW_MANAGER_CID, false, NULL, nsViewManagerConstructor },
{ &kNS_PLUGINDOCLOADERFACTORY_CID, false, NULL, CreateContentDLF },
{ &kNS_PLUGINDOCUMENT_CID, false, NULL, CreatePluginDocument },
#ifdef MOZ_MEDIA
{ &kNS_VIDEODOCUMENT_CID, false, NULL, CreateVideoDocument },
#endif
{ &kNS_STYLESHEETSERVICE_CID, false, NULL, nsStyleSheetServiceConstructor },
{ &kTRANSFORMIIX_XSLT_PROCESSOR_CID, false, NULL, txMozillaXSLTProcessorConstructor },
{ &kTRANSFORMIIX_XPATH_EVALUATOR_CID, false, NULL, nsXPathEvaluatorConstructor },
{ &kTRANSFORMIIX_NODESET_CID, false, NULL, txNodeSetAdaptorConstructor },
{ &kNS_XMLSERIALIZER_CID, false, NULL, nsDOMSerializerConstructor },
{ &kNS_FILEREADER_CID, false, NULL, nsDOMFileReaderConstructor },
{ &kNS_ARCHIVEREADER_CID, false, NULL, ArchiveReaderConstructor },
{ &kNS_FORMDATA_CID, false, NULL, nsFormDataConstructor },
{ &kNS_BLOBPROTOCOLHANDLER_CID, false, NULL, nsBlobProtocolHandlerConstructor },
{ &kNS_BLOBURI_CID, false, NULL, nsBlobURIConstructor },
{ &kNS_XMLHTTPREQUEST_CID, false, NULL, nsXMLHttpRequestConstructor },
{ &kNS_EVENTSOURCE_CID, false, NULL, nsEventSourceConstructor },
{ &kNS_DOMACTIVITY_CID, false, NULL, ActivityConstructor },
{ &kNS_DOMPARSER_CID, false, NULL, nsDOMParserConstructor },
{ &kNS_DOMSTORAGE2_CID, false, NULL, NS_NewDOMStorage2 },
{ &kNS_DOMSTORAGEMANAGER_CID, false, NULL, nsDOMStorageManagerConstructor },
{ &kNS_DOMJSON_CID, false, NULL, NS_NewJSON },
{ &kNS_TEXTEDITOR_CID, false, NULL, nsPlaintextEditorConstructor },
{ &kINDEXEDDB_MANAGER_CID, false, NULL, IndexedDatabaseManagerConstructor },
{ &kDOMREQUEST_SERVICE_CID, false, NULL, DOMRequestServiceConstructor },
#ifdef MOZ_B2G_RIL
{ &kSYSTEMWORKERMANAGER_CID, true, NULL, SystemWorkerManagerConstructor },
#endif
#ifdef MOZ_B2G_BT
{ &kBLUETOOTHSERVICE_CID, true, NULL, BluetoothServiceConstructor },
#endif
#ifdef MOZ_WIDGET_GONK
{ &kNS_AUDIOMANAGER_CID, true, NULL, AudioManagerConstructor },
{ &kNS_VOLUMESERVICE_CID, true, NULL, nsVolumeServiceConstructor },
#endif
#ifdef MOZ_B2G_FM
{ &kNS_FMRADIO_CID, true, NULL, FMRadioConstructor },
#endif
#ifdef ENABLE_EDITOR_API_LOG
{ &kNS_HTMLEDITOR_CID, false, NULL, nsHTMLEditorLogConstructor },
#else
{ &kNS_HTMLEDITOR_CID, false, NULL, nsHTMLEditorConstructor },
#endif
{ &kNS_EDITORCONTROLLER_CID, false, NULL, nsEditorControllerConstructor },
{ &kNS_EDITINGCONTROLLER_CID, false, NULL, nsEditingControllerConstructor },
{ &kNS_EDITORCOMMANDTABLE_CID, false, NULL, nsEditorCommandTableConstructor },
{ &kNS_EDITINGCOMMANDTABLE_CID, false, NULL, nsEditingCommandTableConstructor },
{ &kNS_TEXTSERVICESDOCUMENT_CID, false, NULL, nsTextServicesDocumentConstructor },
{ &kNS_GEOLOCATION_SERVICE_CID, false, NULL, nsGeolocationServiceConstructor },
{ &kNS_GEOLOCATION_CID, false, NULL, nsGeolocationConstructor },
{ &kNS_FOCUSMANAGER_CID, false, NULL, CreateFocusManager },
{ &kCSPSERVICE_CID, false, NULL, CSPServiceConstructor },
{ &kNS_MIXEDCONTENTBLOCKER_CID, false, NULL, nsMixedContentBlockerConstructor },
{ &kNS_EVENTLISTENERSERVICE_CID, false, NULL, CreateEventListenerService },
{ &kNS_GLOBALMESSAGEMANAGER_CID, false, NULL, CreateGlobalMessageManager },
{ &kNS_PARENTPROCESSMESSAGEMANAGER_CID, false, NULL, CreateParentMessageManager },
{ &kNS_CHILDPROCESSMESSAGEMANAGER_CID, false, NULL, CreateChildMessageManager },
{ &kNSCHANNELPOLICY_CID, false, NULL, nsChannelPolicyConstructor },
{ &kNS_SCRIPTSECURITYMANAGER_CID, false, NULL, Construct_nsIScriptSecurityManager },
{ &kNS_PRINCIPAL_CID, false, NULL, nsPrincipalConstructor },
{ &kNS_SYSTEMPRINCIPAL_CID, false, NULL, nsSystemPrincipalConstructor },
{ &kNS_NULLPRINCIPAL_CID, false, NULL, nsNullPrincipalConstructor },
{ &kNS_SECURITYNAMESET_CID, false, NULL, nsSecurityNameSetConstructor },
{ &kNS_DEVICE_SENSORS_CID, false, NULL, nsDeviceSensorsConstructor },
#ifndef MOZ_WIDGET_GONK
#if defined(ANDROID) || defined(MOZ_PLATFORM_MAEMO)
{ &kNS_HAPTICFEEDBACK_CID, false, NULL, nsHapticFeedbackConstructor },
#endif
#endif
{ &kTHIRDPARTYUTIL_CID, false, NULL, ThirdPartyUtilConstructor },
{ &kNS_STRUCTUREDCLONECONTAINER_CID, false, NULL, nsStructuredCloneContainerConstructor },
{ &kNS_DOMMUTATIONOBSERVER_CID, false, NULL, nsDOMMutationObserverConstructor },
{ &kSMS_SERVICE_CID, false, NULL, nsISmsServiceConstructor },
{ &kSMS_DATABASE_SERVICE_CID, false, NULL, nsISmsDatabaseServiceConstructor },
{ &kSMS_REQUEST_MANAGER_CID, false, NULL, SmsRequestManagerConstructor },
{ &kNS_POWERMANAGERSERVICE_CID, false, NULL, nsIPowerManagerServiceConstructor },
{ &kOSFILECONSTANTSSERVICE_CID, true, NULL, OSFileConstantsServiceConstructor },
{ &kNS_ALARMHALSERVICE_CID, false, NULL, nsIAlarmHalServiceConstructor },
{ &kTCPSOCKETCHILD_CID, false, NULL, TCPSocketChildConstructor },
{ &kNS_TIMESERVICE_CID, false, NULL, nsITimeServiceConstructor },
#ifdef MOZ_WIDGET_GONK
{ &kGONK_GPS_GEOLOCATION_PROVIDER_CID, false, NULL, nsIGeolocationProviderConstructor },
#endif
{ NULL }
};
static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
XPCONNECT_CONTRACTS
{ "@mozilla.org/layout/xul-boxobject;1", &kNS_BOXOBJECT_CID },
#ifdef MOZ_XUL
{ "@mozilla.org/layout/xul-boxobject-listbox;1", &kNS_LISTBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-menu;1", &kNS_MENUBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-popup;1", &kNS_POPUPBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-container;1", &kNS_CONTAINERBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-scrollbox;1", &kNS_SCROLLBOXOBJECT_CID },
{ "@mozilla.org/layout/xul-boxobject-tree;1", &kNS_TREEBOXOBJECT_CID },
#endif // MOZ_XUL
#ifdef MOZ_XUL
{ "@mozilla.org/inspector/dom-view;1", &kIN_DOMVIEW_CID },
#endif
{ "@mozilla.org/inspector/deep-tree-walker;1", &kIN_DEEPTREEWALKER_CID },
{ "@mozilla.org/inspector/flasher;1", &kIN_FLASHER_CID },
{ "@mozilla.org/inspector/search;1?type=cssvalue", &kIN_CSSVALUESEARCH_CID },
{ "@mozilla.org/inspector/dom-utils;1", &kIN_DOMUTILS_CID },
{ NS_NAMESPACEMANAGER_CONTRACTID, &kNS_NAMESPACEMANAGER_CID },
{ "@mozilla.org/xml/xml-document;1", &kNS_XMLDOCUMENT_CID },
{ "@mozilla.org/svg/svg-document;1", &kNS_SVGDOCUMENT_CID },
{ "@mozilla.org/content/dom-selection;1", &kNS_DOMSELECTION_CID },
{ "@mozilla.org/content/post-content-iterator;1", &kNS_CONTENTITERATOR_CID },
{ "@mozilla.org/content/pre-content-iterator;1", &kNS_PRECONTENTITERATOR_CID },
{ "@mozilla.org/content/subtree-content-iterator;1", &kNS_SUBTREEITERATOR_CID },
{ NS_HTMLIMGELEMENT_CONTRACTID, &kNS_HTMLIMAGEELEMENT_CID },
{ NS_HTMLOPTIONELEMENT_CONTRACTID, &kNS_HTMLOPTIONELEMENT_CID },
#ifdef MOZ_MEDIA
{ NS_HTMLAUDIOELEMENT_CONTRACTID, &kNS_HTMLAUDIOELEMENT_CID },
#endif
{ "@mozilla.org/content/canvas-rendering-context;1?id=2d", &kNS_CANVASRENDERINGCONTEXT2D_CID },
{ "@mozilla.org/content/canvas-rendering-context;1?id=moz-webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID },
{ "@mozilla.org/content/canvas-rendering-context;1?id=experimental-webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID },
{ NS_DOC_ENCODER_CONTRACTID_BASE "text/xml", &kNS_TEXT_ENCODER_CID },
{ NS_DOC_ENCODER_CONTRACTID_BASE "application/xml", &kNS_TEXT_ENCODER_CID },
{ NS_DOC_ENCODER_CONTRACTID_BASE "application/xhtml+xml", &kNS_TEXT_ENCODER_CID },
{ NS_DOC_ENCODER_CONTRACTID_BASE "image/svg+xml", &kNS_TEXT_ENCODER_CID },
{ NS_DOC_ENCODER_CONTRACTID_BASE "text/html", &kNS_TEXT_ENCODER_CID },
{ NS_DOC_ENCODER_CONTRACTID_BASE "text/plain", &kNS_TEXT_ENCODER_CID },
{ NS_HTMLCOPY_ENCODER_CONTRACTID, &kNS_HTMLCOPY_TEXT_ENCODER_CID },
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/xml", &kNS_XMLCONTENTSERIALIZER_CID },
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xml", &kNS_XMLCONTENTSERIALIZER_CID },
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xhtml+xml", &kNS_XHTMLCONTENTSERIALIZER_CID },
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "image/svg+xml", &kNS_XMLCONTENTSERIALIZER_CID },
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/html", &kNS_HTMLCONTENTSERIALIZER_CID },
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/vnd.mozilla.xul+xml", &kNS_XMLCONTENTSERIALIZER_CID },
{ NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/plain", &kNS_PLAINTEXTSERIALIZER_CID },
{ NS_PARSERUTILS_CONTRACTID, &kNS_PARSERUTILS_CID },
{ NS_SCRIPTABLEUNESCAPEHTML_CONTRACTID, &kNS_SCRIPTABLEUNESCAPEHTML_CID },
{ NS_CONTENTPOLICY_CONTRACTID, &kNS_CONTENTPOLICY_CID },
{ NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID, &kNS_DATADOCUMENTCONTENTPOLICY_CID },
{ NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID, &kNS_NODATAPROTOCOLCONTENTPOLICY_CID },
{ "@mozilla.org/xul/xul-controllers;1", &kNS_XULCONTROLLERS_CID },
#ifdef MOZ_XUL
{ "@mozilla.org/xul/xul-sort-service;1", &kNS_XULSORTSERVICE_CID },
{ "@mozilla.org/xul/xul-template-builder;1", &kNS_XULTEMPLATEBUILDER_CID },
{ "@mozilla.org/xul/xul-tree-builder;1", &kNS_XULTREEBUILDER_CID },
{ "@mozilla.org/xul/xul-document;1", &kNS_XULDOCUMENT_CID },
#endif
#ifdef MOZ_XTF
{ NS_XTFSERVICE_CONTRACTID, &kNS_XTFSERVICE_CID },
{ NS_XMLCONTENTBUILDER_CONTRACTID, &kNS_XMLCONTENTBUILDER_CID },
#endif
{ CONTENT_DLF_CONTRACTID, &kNS_CONTENT_DOCUMENT_LOADER_FACTORY_CID },
{ NS_JSPROTOCOLHANDLER_CONTRACTID, &kNS_JSPROTOCOLHANDLER_CID },
{ NS_WINDOWCONTROLLER_CONTRACTID, &kNS_WINDOWCONTROLLER_CID },
{ "@mozilla.org/view-manager;1", &kNS_VIEW_MANAGER_CID },
{ PLUGIN_DLF_CONTRACTID, &kNS_PLUGINDOCLOADERFACTORY_CID },
{ NS_STYLESHEETSERVICE_CONTRACTID, &kNS_STYLESHEETSERVICE_CID },
{ TRANSFORMIIX_XSLT_PROCESSOR_CONTRACTID, &kTRANSFORMIIX_XSLT_PROCESSOR_CID },
{ NS_XPATH_EVALUATOR_CONTRACTID, &kTRANSFORMIIX_XPATH_EVALUATOR_CID },
{ TRANSFORMIIX_NODESET_CONTRACTID, &kTRANSFORMIIX_NODESET_CID },
{ NS_XMLSERIALIZER_CONTRACTID, &kNS_XMLSERIALIZER_CID },
{ NS_FILEREADER_CONTRACTID, &kNS_FILEREADER_CID },
{ NS_ARCHIVEREADER_CONTRACTID, &kNS_ARCHIVEREADER_CID },
{ NS_FORMDATA_CONTRACTID, &kNS_FORMDATA_CID },
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX BLOBURI_SCHEME, &kNS_BLOBPROTOCOLHANDLER_CID },
{ NS_XMLHTTPREQUEST_CONTRACTID, &kNS_XMLHTTPREQUEST_CID },
{ NS_EVENTSOURCE_CONTRACTID, &kNS_EVENTSOURCE_CID },
{ NS_DOMACTIVITY_CONTRACTID, &kNS_DOMACTIVITY_CID },
{ NS_DOMPARSER_CONTRACTID, &kNS_DOMPARSER_CID },
{ "@mozilla.org/dom/storage;2", &kNS_DOMSTORAGE2_CID },
{ "@mozilla.org/dom/storagemanager;1", &kNS_DOMSTORAGEMANAGER_CID },
{ "@mozilla.org/dom/json;1", &kNS_DOMJSON_CID },
{ "@mozilla.org/editor/texteditor;1", &kNS_TEXTEDITOR_CID },
{ INDEXEDDB_MANAGER_CONTRACTID, &kINDEXEDDB_MANAGER_CID },
{ DOMREQUEST_SERVICE_CONTRACTID, &kDOMREQUEST_SERVICE_CID },
#ifdef MOZ_B2G_RIL
{ SYSTEMWORKERMANAGER_CONTRACTID, &kSYSTEMWORKERMANAGER_CID },
#endif
#ifdef MOZ_B2G_BT
{ BLUETOOTHSERVICE_CONTRACTID, &kBLUETOOTHSERVICE_CID },
#endif
#ifdef MOZ_WIDGET_GONK
{ NS_AUDIOMANAGER_CONTRACTID, &kNS_AUDIOMANAGER_CID },
{ NS_VOLUMESERVICE_CONTRACTID, &kNS_VOLUMESERVICE_CID },
#endif
#ifdef MOZ_B2G_FM
{ NS_FMRADIO_CONTRACTID, &kNS_FMRADIO_CID },
#endif
#ifdef ENABLE_EDITOR_API_LOG
{ "@mozilla.org/editor/htmleditor;1", &kNS_HTMLEDITOR_CID },
#else
{ "@mozilla.org/editor/htmleditor;1", &kNS_HTMLEDITOR_CID },
#endif
{ "@mozilla.org/editor/editorcontroller;1", &kNS_EDITORCONTROLLER_CID },
{ "@mozilla.org/editor/editingcontroller;1", &kNS_EDITINGCONTROLLER_CID },
{ "@mozilla.org/textservices/textservicesdocument;1", &kNS_TEXTSERVICESDOCUMENT_CID },
{ "@mozilla.org/geolocation/service;1", &kNS_GEOLOCATION_SERVICE_CID },
{ "@mozilla.org/geolocation;1", &kNS_GEOLOCATION_CID },
{ "@mozilla.org/focus-manager;1", &kNS_FOCUSMANAGER_CID },
{ CSPSERVICE_CONTRACTID, &kCSPSERVICE_CID },
{ NS_MIXEDCONTENTBLOCKER_CONTRACTID, &kNS_MIXEDCONTENTBLOCKER_CID },
{ NS_EVENTLISTENERSERVICE_CONTRACTID, &kNS_EVENTLISTENERSERVICE_CID },
{ NS_GLOBALMESSAGEMANAGER_CONTRACTID, &kNS_GLOBALMESSAGEMANAGER_CID },
{ NS_PARENTPROCESSMESSAGEMANAGER_CONTRACTID, &kNS_PARENTPROCESSMESSAGEMANAGER_CID },
{ NS_CHILDPROCESSMESSAGEMANAGER_CONTRACTID, &kNS_CHILDPROCESSMESSAGEMANAGER_CID },
{ NSCHANNELPOLICY_CONTRACTID, &kNSCHANNELPOLICY_CID },
{ NS_SCRIPTSECURITYMANAGER_CONTRACTID, &kNS_SCRIPTSECURITYMANAGER_CID },
{ NS_GLOBAL_CHANNELEVENTSINK_CONTRACTID, &kNS_SCRIPTSECURITYMANAGER_CID },
{ NS_PRINCIPAL_CONTRACTID, &kNS_PRINCIPAL_CID },
{ NS_SYSTEMPRINCIPAL_CONTRACTID, &kNS_SYSTEMPRINCIPAL_CID },
{ NS_NULLPRINCIPAL_CONTRACTID, &kNS_NULLPRINCIPAL_CID },
{ NS_SECURITYNAMESET_CONTRACTID, &kNS_SECURITYNAMESET_CID },
{ NS_DEVICE_SENSORS_CONTRACTID, &kNS_DEVICE_SENSORS_CID },
#ifndef MOZ_WIDGET_GONK
#if defined(ANDROID) || defined(MOZ_PLATFORM_MAEMO)
{ "@mozilla.org/widget/hapticfeedback;1", &kNS_HAPTICFEEDBACK_CID },
#endif
#endif
{ THIRDPARTYUTIL_CONTRACTID, &kTHIRDPARTYUTIL_CID },
{ NS_STRUCTUREDCLONECONTAINER_CONTRACTID, &kNS_STRUCTUREDCLONECONTAINER_CID },
{ NS_DOMMUTATIONOBSERVER_CONTRACTID, &kNS_DOMMUTATIONOBSERVER_CID },
{ SMS_SERVICE_CONTRACTID, &kSMS_SERVICE_CID },
{ SMS_DATABASE_SERVICE_CONTRACTID, &kSMS_DATABASE_SERVICE_CID },
{ SMS_REQUEST_MANAGER_CONTRACTID, &kSMS_REQUEST_MANAGER_CID },
{ POWERMANAGERSERVICE_CONTRACTID, &kNS_POWERMANAGERSERVICE_CID },
{ OSFILECONSTANTSSERVICE_CONTRACTID, &kOSFILECONSTANTSSERVICE_CID },
{ ALARMHALSERVICE_CONTRACTID, &kNS_ALARMHALSERVICE_CID },
{ "@mozilla.org/tcp-socket-child;1", &kTCPSOCKETCHILD_CID },
{ TIMESERVICE_CONTRACTID, &kNS_TIMESERVICE_CID },
#ifdef MOZ_WIDGET_GONK
{ GONK_GPS_GEOLOCATION_PROVIDER_CONTRACTID, &kGONK_GPS_GEOLOCATION_PROVIDER_CID },
#endif
{ NULL }
};
static const mozilla::Module::CategoryEntry kLayoutCategories[] = {
XPCONNECT_CATEGORIES
{ JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY, "Image", NS_HTMLIMGELEMENT_CONTRACTID },
{ JAVASCRIPT_GLOBAL_CONSTRUCTOR_PROTO_ALIAS_CATEGORY, "Image", "HTMLImageElement" },
{ JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY, "Option", NS_HTMLOPTIONELEMENT_CONTRACTID },
{ JAVASCRIPT_GLOBAL_CONSTRUCTOR_PROTO_ALIAS_CATEGORY, "Option", "HTMLOptionElement" },
#ifdef MOZ_MEDIA
{ JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY, "Audio", NS_HTMLAUDIOELEMENT_CONTRACTID },
{ JAVASCRIPT_GLOBAL_CONSTRUCTOR_PROTO_ALIAS_CATEGORY, "Audio", "HTMLAudioElement" },
#endif
{ "content-policy", NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID, NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID },
{ "content-policy", NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID, NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID },
{ "content-policy", "CSPService", CSPSERVICE_CONTRACTID },
{ "content-policy", NS_MIXEDCONTENTBLOCKER_CONTRACTID, NS_MIXEDCONTENTBLOCKER_CONTRACTID },
{ "net-channel-event-sinks", "CSPService", CSPSERVICE_CONTRACTID },
{ JAVASCRIPT_GLOBAL_STATIC_NAMESET_CATEGORY, "PrivilegeManager", NS_SECURITYNAMESET_CONTRACTID },
{ "app-startup", "Script Security Manager", "service," NS_SCRIPTSECURITYMANAGER_CONTRACTID },
{ TOPIC_WEB_APP_CLEAR_DATA, "IndexedDatabaseManager", "service," INDEXEDDB_MANAGER_CONTRACTID },
#ifdef MOZ_WIDGET_GONK
{ "app-startup", "Volume Service", "service," NS_VOLUMESERVICE_CONTRACTID },
#endif
CONTENTDLF_CATEGORIES
#ifdef MOZ_B2G_RIL
{ "profile-after-change", "Telephony System Worker Manager", SYSTEMWORKERMANAGER_CONTRACTID },
#endif
#ifdef MOZ_B2G_BT
{ "profile-after-change", "Bluetooth Service", BLUETOOTHSERVICE_CONTRACTID },
#endif
{ NULL }
};
static void
LayoutModuleDtor()
{
nsScriptSecurityManager::Shutdown();
xpcModuleDtor();
}
static const mozilla::Module kLayoutModule = {
mozilla::Module::kVersion,
kLayoutCIDs,
kLayoutContracts,
kLayoutCategories,
NULL,
Initialize,
LayoutModuleDtor
};
NSMODULE_DEFN(nsLayoutModule) = &kLayoutModule;