2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 18:30:37 +04:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1999-09-28 04:44:47 +04:00
|
|
|
*
|
2004-04-18 18:30:37 +04:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
1999-09-28 04:44:47 +04:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
1999-09-28 04:44:47 +04:00
|
|
|
*
|
|
|
|
* The Original Code is Mozilla Communicator client code.
|
|
|
|
*
|
2004-04-18 18:30:37 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-09-29 00:14:13 +04:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
1999-11-06 06:40:37 +03:00
|
|
|
*
|
2001-09-29 00:14:13 +04:00
|
|
|
* Contributor(s):
|
2000-02-03 01:24:56 +03:00
|
|
|
* Pierre Phaneuf <pp@ludusdesign.com>
|
2001-09-29 00:14:13 +04:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-18 18:30:37 +04:00
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
2001-09-29 00:14:13 +04:00
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-18 18:30:37 +04:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-09-29 00:14:13 +04:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-18 18:30:37 +04:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-09-29 00:14:13 +04:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2006-05-19 13:31:57 +04:00
|
|
|
|
|
|
|
#include "nsLayoutStatics.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
#include "nsContentCID.h"
|
|
|
|
#include "nsContentDLF.h"
|
|
|
|
#include "nsContentPolicyUtils.h"
|
2005-04-11 04:29:36 +04:00
|
|
|
#include "nsDataDocumentContentPolicy.h"
|
2006-06-26 21:57:44 +04:00
|
|
|
#include "nsNoDataProtocolContentPolicy.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
#include "nsDOMCID.h"
|
|
|
|
#include "nsHTMLContentSerializer.h"
|
2004-07-16 10:32:16 +04:00
|
|
|
#include "nsHTMLParts.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
#include "nsGenericHTMLElement.h"
|
|
|
|
#include "nsICSSLoader.h"
|
|
|
|
#include "nsICSSParser.h"
|
|
|
|
#include "nsICSSStyleSheet.h"
|
|
|
|
#include "nsICategoryManager.h"
|
|
|
|
#include "nsIComponentManager.h"
|
|
|
|
#include "nsIContentIterator.h"
|
|
|
|
#include "nsIContentSerializer.h"
|
|
|
|
#include "nsIController.h"
|
|
|
|
#include "nsIControllers.h"
|
|
|
|
#include "nsIDOMDOMImplementation.h"
|
|
|
|
#include "nsIDOMEventGroup.h"
|
|
|
|
#include "nsIDOMRange.h"
|
|
|
|
#include "nsIDocument.h"
|
|
|
|
#include "nsIDocumentEncoder.h"
|
|
|
|
#include "nsIDocumentViewer.h"
|
|
|
|
#include "nsIEventListenerManager.h"
|
|
|
|
#include "nsIFactory.h"
|
2006-04-26 06:01:07 +04:00
|
|
|
#include "nsFrameSelection.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
#include "nsIFrameUtil.h"
|
|
|
|
#include "nsIGenericFactory.h"
|
|
|
|
#include "nsIHTMLCSSStyleSheet.h"
|
2004-10-01 02:27:45 +04:00
|
|
|
#include "nsIFragmentContentSink.h"
|
2004-04-13 01:56:09 +04:00
|
|
|
#include "nsHTMLStyleSheet.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
#include "nsIHTMLToTextSink.h"
|
|
|
|
#include "nsILayoutDebugger.h"
|
|
|
|
#include "nsINameSpaceManager.h"
|
|
|
|
#include "nsINodeInfo.h"
|
|
|
|
#include "nsIObserver.h"
|
|
|
|
#include "nsIObserverService.h"
|
2004-08-01 03:15:21 +04:00
|
|
|
#include "nsPresContext.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
#include "nsIPresShell.h"
|
|
|
|
#include "nsIPrivateDOMImplementation.h"
|
|
|
|
#include "nsIRangeUtils.h"
|
|
|
|
#include "nsIScriptNameSpaceManager.h"
|
|
|
|
#include "nsISelection.h"
|
|
|
|
#include "nsIXBLService.h"
|
2008-07-16 14:52:01 +04:00
|
|
|
#include "nsCaret.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
#include "nsPlainTextSerializer.h"
|
|
|
|
#include "mozSanitizingSerializer.h"
|
|
|
|
#include "nsXMLContentSerializer.h"
|
2009-04-25 13:00:14 +04:00
|
|
|
#include "nsXHTMLContentSerializer.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
#include "nsRuleNode.h"
|
|
|
|
#include "nsWyciwygProtocolHandler.h"
|
|
|
|
#include "nsContentAreaDragDrop.h"
|
|
|
|
#include "nsContentList.h"
|
2006-06-16 00:30:44 +04:00
|
|
|
#include "nsSyncLoadService.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
#include "nsBox.h"
|
|
|
|
#include "nsIFrameTraversal.h"
|
2003-03-15 04:04:32 +03:00
|
|
|
#include "nsLayoutCID.h"
|
2004-07-20 10:11:27 +04:00
|
|
|
#include "nsILanguageAtomService.h"
|
2005-01-15 03:10:19 +03:00
|
|
|
#include "nsStyleSheetService.h"
|
2007-11-28 23:18:11 +03:00
|
|
|
#include "nsXULPopupManager.h"
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 22:00:39 +04:00
|
|
|
#include "nsFocusManager.h"
|
2003-03-15 04:04:32 +03:00
|
|
|
|
2009-10-16 12:57:32 +04:00
|
|
|
#include "nsIEventListenerService.h"
|
2005-11-02 22:03:06 +03:00
|
|
|
// Transformiix stuff
|
|
|
|
#include "nsXPathEvaluator.h"
|
|
|
|
#include "txMozillaXSLTProcessor.h"
|
2006-07-13 18:21:53 +04:00
|
|
|
#include "txNodeSetAdaptor.h"
|
2005-11-02 22:03:06 +03:00
|
|
|
#include "nsXPath1Scheme.h"
|
|
|
|
|
2006-04-26 13:19:48 +04:00
|
|
|
#include "nsDOMParser.h"
|
|
|
|
#include "nsDOMSerializer.h"
|
|
|
|
#include "nsXMLHttpRequest.h"
|
|
|
|
|
2003-03-15 04:04:32 +03:00
|
|
|
// view stuff
|
|
|
|
#include "nsViewsCID.h"
|
|
|
|
#include "nsViewManager.h"
|
2004-06-25 16:26:02 +04:00
|
|
|
#include "nsContentCreatorFunctions.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
|
2004-02-24 06:22:35 +03:00
|
|
|
// DOM includes
|
|
|
|
#include "nsDOMException.h"
|
2009-11-09 23:05:16 +03:00
|
|
|
#include "nsDOMFileReader.h"
|
2004-02-24 06:22:35 +03:00
|
|
|
#include "nsGlobalWindowCommands.h"
|
|
|
|
#include "nsIControllerCommandTable.h"
|
|
|
|
#include "nsJSProtocolHandler.h"
|
|
|
|
#include "nsScriptNameSpaceManager.h"
|
|
|
|
#include "nsIControllerContext.h"
|
|
|
|
#include "nsDOMScriptObjectFactory.h"
|
2006-05-19 09:57:36 +04:00
|
|
|
#include "nsDOMStorage.h"
|
2007-12-28 00:34:03 +03:00
|
|
|
#include "nsJSON.h"
|
2004-02-24 06:22:35 +03:00
|
|
|
|
2007-02-24 23:07:06 +03:00
|
|
|
// Editor stuff
|
|
|
|
#include "nsEditorCID.h"
|
|
|
|
#include "nsEditor.h"
|
|
|
|
#include "nsPlaintextEditor.h"
|
|
|
|
#include "nsEditorController.h" //CID
|
|
|
|
#include "nsIController.h"
|
|
|
|
#include "nsIControllerContext.h"
|
|
|
|
#include "nsIControllerCommandTable.h"
|
|
|
|
|
|
|
|
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
|
|
|
|
#include "nsHTMLEditor.h"
|
|
|
|
#include "nsTextServicesDocument.h"
|
|
|
|
#include "nsTextServicesCID.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define NS_EDITORCOMMANDTABLE_CID \
|
|
|
|
{ 0x4f5e62b8, 0xd659, 0x4156, { 0x84, 0xfc, 0x2f, 0x60, 0x99, 0x40, 0x03, 0x69 }}
|
|
|
|
|
|
|
|
static NS_DEFINE_CID(kEditorCommandTableCID, NS_EDITORCOMMANDTABLE_CID);
|
|
|
|
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPlaintextEditor)
|
|
|
|
|
|
|
|
// Constructor of a controller which is set up to use, internally, a
|
|
|
|
// singleton command-table pre-filled with editor commands.
|
|
|
|
static NS_METHOD
|
|
|
|
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(kEditorCommandTableCID, &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 for a command-table pref-filled with editor commands
|
|
|
|
static NS_METHOD
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
|
|
|
|
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
|
|
|
|
#endif
|
|
|
|
|
2005-04-18 10:33:23 +04:00
|
|
|
#include "nsHTMLCanvasFrame.h"
|
|
|
|
|
|
|
|
#include "nsIDOMCanvasRenderingContext2D.h"
|
2009-09-03 04:47:49 +04:00
|
|
|
#include "nsICanvasRenderingContextWebGL.h"
|
2005-04-18 10:33:23 +04:00
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
class nsIDocumentLoaderFactory;
|
|
|
|
|
|
|
|
#define PRODUCT_NAME "Gecko"
|
|
|
|
|
|
|
|
#define NS_HTMLIMGELEMENT_CONTRACTID \
|
|
|
|
"@mozilla.org/content/element/html;1?name=img"
|
2001-08-07 06:55:54 +04:00
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
#define NS_HTMLOPTIONELEMENT_CONTRACTID \
|
|
|
|
"@mozilla.org/content/element/html;1?name=option"
|
|
|
|
|
2009-05-19 09:18:41 +04:00
|
|
|
#ifdef MOZ_MEDIA
|
|
|
|
#define NS_HTMLAUDIOELEMENT_CONTRACTID \
|
|
|
|
"@mozilla.org/content/element/html;1?name=audio"
|
|
|
|
#endif
|
|
|
|
|
2003-03-22 06:20:23 +03:00
|
|
|
/* 0ddf4df8-4dbb-4133-8b79-9afb966514f5 */
|
|
|
|
#define NS_PLUGINDOCLOADERFACTORY_CID \
|
|
|
|
{ 0x0ddf4df8, 0x4dbb, 0x4133, { 0x8b, 0x79, 0x9a, 0xfb, 0x96, 0x65, 0x14, 0xf5 } }
|
|
|
|
|
2004-02-24 06:22:35 +03:00
|
|
|
#define NS_WINDOWCOMMANDTABLE_CID \
|
|
|
|
{ /* 0DE2FBFA-6B7F-11D7-BBBA-0003938A9D96 */ \
|
|
|
|
0x0DE2FBFA, 0x6B7F, 0x11D7, {0xBB, 0xBA, 0x00, 0x03, 0x93, 0x8A, 0x9D, 0x96} }
|
|
|
|
|
|
|
|
static NS_DEFINE_CID(kWindowCommandTableCID, NS_WINDOWCOMMANDTABLE_CID);
|
2003-01-14 10:08:59 +03:00
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
#include "nsIBoxObject.h"
|
2003-01-14 10:08:59 +03:00
|
|
|
|
2006-05-26 19:03:05 +04:00
|
|
|
#ifndef MOZ_NO_INSPECTOR_APIS
|
2007-07-18 09:41:40 +04:00
|
|
|
#ifdef MOZ_XUL
|
2006-05-19 22:59:39 +04:00
|
|
|
#include "inDOMView.h"
|
2007-07-18 09:41:40 +04:00
|
|
|
#endif /* MOZ_XUL */
|
|
|
|
|
2006-05-19 22:59:39 +04:00
|
|
|
#include "inDeepTreeWalker.h"
|
|
|
|
#include "inFlasher.h"
|
|
|
|
#include "inCSSValueSearch.h"
|
|
|
|
#include "inDOMUtils.h"
|
2007-07-18 09:41:40 +04:00
|
|
|
#endif /* MOZ_NO_INSPECTOR_APIS */
|
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
|
|
|
#include "nsIXULDocument.h"
|
|
|
|
#include "nsIXULPrototypeCache.h"
|
|
|
|
#include "nsIXULSortService.h"
|
2006-05-19 22:59:39 +04:00
|
|
|
|
2003-03-05 18:08:41 +03:00
|
|
|
NS_IMETHODIMP
|
2003-01-14 10:08:59 +03:00
|
|
|
NS_NewXULContentBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
|
|
|
|
2003-03-05 18:08:41 +03:00
|
|
|
NS_IMETHODIMP
|
2003-01-14 10:08:59 +03:00
|
|
|
NS_NewXULTreeBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
1999-09-28 04:44:47 +04:00
|
|
|
#endif
|
2001-08-07 06:55:54 +04:00
|
|
|
|
2008-10-10 19:04:34 +04:00
|
|
|
static nsresult Initialize(nsIModule* aSelf);
|
2004-04-30 03:17:54 +04:00
|
|
|
static void Shutdown();
|
2003-10-30 05:53:08 +03:00
|
|
|
|
2004-10-08 00:59:53 +04:00
|
|
|
#ifdef MOZ_XTF
|
|
|
|
#include "nsIXTFService.h"
|
|
|
|
#include "nsIXMLContentBuilder.h"
|
|
|
|
#endif
|
|
|
|
|
2008-07-16 03:37:48 +04:00
|
|
|
#include "nsGeolocation.h"
|
|
|
|
|
2005-11-02 22:03:06 +03:00
|
|
|
// Transformiix
|
|
|
|
/* {0C351177-0159-4500-86B0-A219DFDE4258} */
|
|
|
|
#define TRANSFORMIIX_XPATH1_SCHEME_CID \
|
|
|
|
{ 0xc351177, 0x159, 0x4500, { 0x86, 0xb0, 0xa2, 0x19, 0xdf, 0xde, 0x42, 0x58 } }
|
|
|
|
|
2006-07-13 18:21:53 +04:00
|
|
|
/* 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"
|
|
|
|
|
2005-11-02 22:03:06 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsXPath1SchemeProcessor)
|
|
|
|
|
|
|
|
// Factory Constructor
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(txMozillaXSLTProcessor)
|
2005-11-18 16:39:43 +03:00
|
|
|
NS_GENERIC_AGGREGATED_CONSTRUCTOR_INIT(nsXPathEvaluator, Init)
|
2006-07-13 18:21:53 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(txNodeSetAdaptor, Init)
|
2006-04-26 13:19:48 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMSerializer)
|
2007-12-12 11:33:32 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsXMLHttpRequest, Init)
|
2009-11-09 23:05:16 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDOMFileReader, Init)
|
2006-04-26 13:19:48 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMParser)
|
2007-10-04 10:05:32 +04:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsDOMStorageManager,
|
|
|
|
nsDOMStorageManager::GetInstance)
|
2005-11-02 22:03:06 +03:00
|
|
|
|
2004-04-30 03:17:54 +04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// 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 : public nsIObserver
|
2003-01-14 10:08:59 +03:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIOBSERVER
|
|
|
|
};
|
1999-09-28 04:44:47 +04:00
|
|
|
|
2004-04-30 03:17:54 +04:00
|
|
|
NS_IMPL_ISUPPORTS1(LayoutShutdownObserver, nsIObserver)
|
2003-01-14 10:08:59 +03:00
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2004-04-30 03:17:54 +04:00
|
|
|
LayoutShutdownObserver::Observe(nsISupports *aSubject,
|
|
|
|
const char *aTopic,
|
|
|
|
const PRUnichar *someData)
|
2003-01-14 10:08:59 +03:00
|
|
|
{
|
2004-04-30 03:17:54 +04:00
|
|
|
if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID))
|
|
|
|
Shutdown();
|
2003-01-14 10:08:59 +03:00
|
|
|
return NS_OK;
|
|
|
|
}
|
1999-09-28 04:44:47 +04:00
|
|
|
|
2004-04-30 03:17:54 +04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2001-08-07 06:55:54 +04:00
|
|
|
static PRBool gInitialized = PR_FALSE;
|
2000-03-21 13:34:56 +03:00
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
// Perform our one-time intialization for this module
|
2003-10-30 05:53:08 +03:00
|
|
|
|
|
|
|
// static
|
2008-10-10 19:04:34 +04:00
|
|
|
nsresult
|
2003-01-14 10:08:59 +03:00
|
|
|
Initialize(nsIModule* aSelf)
|
2001-08-07 06:55:54 +04:00
|
|
|
{
|
2003-10-30 05:53:08 +03:00
|
|
|
NS_PRECONDITION(!gInitialized, "module already initialized");
|
|
|
|
if (gInitialized) {
|
1999-09-28 04:44:47 +04:00
|
|
|
return NS_OK;
|
2003-10-30 05:53:08 +03:00
|
|
|
}
|
1999-09-28 04:44:47 +04:00
|
|
|
|
2006-02-07 17:34:10 +03:00
|
|
|
NS_ASSERTION(sizeof(PtrBits) == sizeof(void *),
|
|
|
|
"Eeek! You'll need to adjust the size of PtrBits to the size "
|
|
|
|
"of a pointer on your platform.");
|
|
|
|
|
2001-08-07 06:55:54 +04:00
|
|
|
gInitialized = PR_TRUE;
|
2004-06-09 22:36:25 +04:00
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
nsresult rv = nsLayoutStatics::Initialize();
|
2003-10-30 05:53:08 +03:00
|
|
|
if (NS_FAILED(rv)) {
|
2004-04-30 03:17:54 +04:00
|
|
|
Shutdown();
|
2003-10-30 05:53:08 +03:00
|
|
|
return rv;
|
|
|
|
}
|
2005-11-02 22:03:06 +03:00
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
// Add our shutdown observer.
|
|
|
|
nsCOMPtr<nsIObserverService> observerService =
|
|
|
|
do_GetService("@mozilla.org/observer-service;1");
|
|
|
|
|
|
|
|
if (observerService) {
|
2005-11-18 16:39:43 +03:00
|
|
|
LayoutShutdownObserver* observer = new LayoutShutdownObserver();
|
2003-01-14 10:08:59 +03:00
|
|
|
|
2003-10-30 05:53:08 +03:00
|
|
|
if (!observer) {
|
2004-04-30 03:17:54 +04:00
|
|
|
Shutdown();
|
2003-10-30 05:53:08 +03:00
|
|
|
|
|
|
|
return NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
observerService->AddObserver(observer, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE);
|
|
|
|
} else {
|
|
|
|
NS_WARNING("Could not get an observer service. We will leak on shutdown.");
|
2003-01-14 10:08:59 +03:00
|
|
|
}
|
2001-08-24 00:07:10 +04:00
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
return NS_OK;
|
1999-09-28 04:44:47 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Shutdown this module, releasing all of the module resources
|
2003-10-30 05:53:08 +03:00
|
|
|
|
|
|
|
// static
|
2004-04-30 03:17:54 +04:00
|
|
|
void
|
|
|
|
Shutdown()
|
1999-09-28 04:44:47 +04:00
|
|
|
{
|
2001-08-07 06:55:54 +04:00
|
|
|
NS_PRECONDITION(gInitialized, "module not initialized");
|
2003-10-30 05:53:08 +03:00
|
|
|
if (!gInitialized)
|
2000-02-16 10:42:00 +03:00
|
|
|
return;
|
2001-08-07 06:55:54 +04:00
|
|
|
|
|
|
|
gInitialized = PR_FALSE;
|
2000-11-08 06:22:03 +03:00
|
|
|
|
2006-05-19 13:31:57 +04:00
|
|
|
nsLayoutStatics::Release();
|
1999-09-28 04:44:47 +04:00
|
|
|
}
|
|
|
|
|
2001-08-07 06:55:54 +04:00
|
|
|
#ifdef NS_DEBUG
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult NS_NewFrameUtil(nsIFrameUtil** aResult);
|
|
|
|
nsresult NS_NewLayoutDebugger(nsILayoutDebugger** aResult);
|
2001-08-07 06:55:54 +04:00
|
|
|
#endif
|
1999-09-28 04:44:47 +04:00
|
|
|
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult NS_NewBoxObject(nsIBoxObject** aResult);
|
2008-01-16 04:27:53 +03:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult NS_NewListBoxObject(nsIBoxObject** aResult);
|
|
|
|
nsresult NS_NewScrollBoxObject(nsIBoxObject** aResult);
|
|
|
|
nsresult NS_NewMenuBoxObject(nsIBoxObject** aResult);
|
|
|
|
nsresult NS_NewPopupBoxObject(nsIBoxObject** aResult);
|
2006-07-13 13:02:05 +04:00
|
|
|
nsresult NS_NewContainerBoxObject(nsIBoxObject** aResult);
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult NS_NewTreeBoxObject(nsIBoxObject** aResult);
|
2005-04-18 10:33:23 +04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
nsresult NS_NewCanvasRenderingContext2D(nsIDOMCanvasRenderingContext2D** aResult);
|
2009-09-03 04:47:49 +04:00
|
|
|
nsresult NS_NewCanvasRenderingContextWebGL(nsICanvasRenderingContextWebGL** aResult);
|
2003-04-11 04:56:27 +04:00
|
|
|
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult NS_CreateFrameTraversal(nsIFrameTraversal** aResult);
|
2006-03-17 00:42:50 +03:00
|
|
|
|
2006-04-26 06:01:07 +04:00
|
|
|
nsresult NS_NewSelection(nsFrameSelection** aResult);
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult NS_NewDomSelection(nsISelection** aResult);
|
|
|
|
nsresult NS_NewDocumentViewer(nsIDocumentViewer** aResult);
|
|
|
|
nsresult NS_NewRange(nsIDOMRange** aResult);
|
|
|
|
nsresult NS_NewRangeUtils(nsIRangeUtils** aResult);
|
|
|
|
nsresult NS_NewContentIterator(nsIContentIterator** aResult);
|
|
|
|
nsresult NS_NewPreContentIterator(nsIContentIterator** aResult);
|
|
|
|
nsresult NS_NewGenRegularIterator(nsIContentIterator** aResult);
|
|
|
|
nsresult NS_NewContentSubtreeIterator(nsIContentIterator** aResult);
|
|
|
|
nsresult NS_NewGenSubtreeIterator(nsIContentIterator** aInstancePtrResult);
|
|
|
|
nsresult NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
|
|
|
|
nsresult NS_NewHTMLCopyTextEncoder(nsIDocumentEncoder** aResult);
|
|
|
|
nsresult NS_NewTextEncoder(nsIDocumentEncoder** aResult);
|
|
|
|
nsresult NS_NewXBLService(nsIXBLService** aResult);
|
|
|
|
nsresult NS_NewContentPolicy(nsIContentPolicy** aResult);
|
|
|
|
nsresult NS_NewDOMEventGroup(nsIDOMEventGroup** aResult);
|
2003-01-14 10:08:59 +03:00
|
|
|
|
2009-10-16 12:57:32 +04:00
|
|
|
nsresult NS_NewEventListenerService(nsIEventListenerService** aResult);
|
|
|
|
|
2003-03-05 18:08:41 +03:00
|
|
|
NS_IMETHODIMP NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
2003-01-14 10:08:59 +03:00
|
|
|
|
2001-08-07 06:55:54 +04:00
|
|
|
#define MAKE_CTOR(ctor_, iface_, func_) \
|
|
|
|
static NS_IMETHODIMP \
|
|
|
|
ctor_(nsISupports* aOuter, REFNSIID aIID, void** aResult) \
|
|
|
|
{ \
|
|
|
|
*aResult = nsnull; \
|
|
|
|
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; \
|
1999-09-28 04:44:47 +04:00
|
|
|
}
|
2003-01-14 10:08:59 +03:00
|
|
|
|
2001-08-07 06:55:54 +04:00
|
|
|
#ifdef DEBUG
|
2003-01-14 10:08:59 +03:00
|
|
|
MAKE_CTOR(CreateNewFrameUtil, nsIFrameUtil, NS_NewFrameUtil)
|
|
|
|
MAKE_CTOR(CreateNewLayoutDebugger, nsILayoutDebugger, NS_NewLayoutDebugger)
|
2001-08-07 06:55:54 +04:00
|
|
|
#endif
|
1999-09-28 04:44:47 +04:00
|
|
|
|
2001-08-07 06:55:54 +04:00
|
|
|
MAKE_CTOR(CreateNewFrameTraversal, nsIFrameTraversal, NS_CreateFrameTraversal)
|
|
|
|
MAKE_CTOR(CreateNewPresShell, nsIPresShell, NS_NewPresShell)
|
|
|
|
MAKE_CTOR(CreateNewBoxObject, nsIBoxObject, NS_NewBoxObject)
|
2008-01-16 04:27:53 +03:00
|
|
|
|
|
|
|
#ifdef MOZ_XUL
|
2002-01-24 07:26:28 +03:00
|
|
|
MAKE_CTOR(CreateNewListBoxObject, nsIBoxObject, NS_NewListBoxObject)
|
2001-08-07 06:55:54 +04:00
|
|
|
MAKE_CTOR(CreateNewMenuBoxObject, nsIBoxObject, NS_NewMenuBoxObject)
|
2001-08-18 05:04:47 +04:00
|
|
|
MAKE_CTOR(CreateNewPopupBoxObject, nsIBoxObject, NS_NewPopupBoxObject)
|
2001-08-07 06:55:54 +04:00
|
|
|
MAKE_CTOR(CreateNewScrollBoxObject, nsIBoxObject, NS_NewScrollBoxObject)
|
2002-03-29 05:46:01 +03:00
|
|
|
MAKE_CTOR(CreateNewTreeBoxObject, nsIBoxObject, NS_NewTreeBoxObject)
|
2006-07-13 13:02:05 +04:00
|
|
|
MAKE_CTOR(CreateNewContainerBoxObject, nsIBoxObject, NS_NewContainerBoxObject)
|
2006-05-19 22:59:39 +04:00
|
|
|
#endif // MOZ_XUL
|
|
|
|
|
|
|
|
#ifndef MOZ_NO_INSPECTOR_APIS
|
2007-07-18 09:35:23 +04:00
|
|
|
#ifdef MOZ_XUL
|
2006-05-19 22:59:39 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMView)
|
2007-07-18 09:35:23 +04:00
|
|
|
#endif
|
2006-05-19 22:59:39 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inDeepTreeWalker)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inFlasher)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inCSSValueSearch)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtils)
|
2003-03-15 04:04:32 +03:00
|
|
|
#endif
|
2006-05-19 22:59:39 +04:00
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
MAKE_CTOR(CreateNameSpaceManager, nsINameSpaceManager, NS_GetNameSpaceManager)
|
|
|
|
MAKE_CTOR(CreateEventListenerManager, nsIEventListenerManager, NS_NewEventListenerManager)
|
|
|
|
MAKE_CTOR(CreateDOMEventGroup, nsIDOMEventGroup, NS_NewDOMEventGroup)
|
|
|
|
MAKE_CTOR(CreateDocumentViewer, nsIDocumentViewer, NS_NewDocumentViewer)
|
|
|
|
MAKE_CTOR(CreateCSSStyleSheet, nsICSSStyleSheet, NS_NewCSSStyleSheet)
|
|
|
|
MAKE_CTOR(CreateHTMLDocument, nsIDocument, NS_NewHTMLDocument)
|
|
|
|
MAKE_CTOR(CreateHTMLCSSStyleSheet, nsIHTMLCSSStyleSheet, NS_NewHTMLCSSStyleSheet)
|
|
|
|
MAKE_CTOR(CreateDOMImplementation, nsIDOMDOMImplementation, NS_NewDOMImplementation)
|
|
|
|
MAKE_CTOR(CreateXMLDocument, nsIDocument, NS_NewXMLDocument)
|
|
|
|
#ifdef MOZ_SVG
|
|
|
|
MAKE_CTOR(CreateSVGDocument, nsIDocument, NS_NewSVGDocument)
|
|
|
|
#endif
|
|
|
|
MAKE_CTOR(CreateImageDocument, nsIDocument, NS_NewImageDocument)
|
|
|
|
MAKE_CTOR(CreateCSSParser, nsICSSParser, NS_NewCSSParser)
|
|
|
|
MAKE_CTOR(CreateCSSLoader, nsICSSLoader, NS_NewCSSLoader)
|
|
|
|
MAKE_CTOR(CreateDOMSelection, nsISelection, NS_NewDomSelection)
|
2007-08-24 04:13:43 +04:00
|
|
|
MAKE_CTOR(CreateSelection, nsFrameSelection, NS_NewSelection)
|
2003-01-14 10:08:59 +03:00
|
|
|
MAKE_CTOR(CreateRange, nsIDOMRange, NS_NewRange)
|
|
|
|
MAKE_CTOR(CreateRangeUtils, nsIRangeUtils, NS_NewRangeUtils)
|
|
|
|
MAKE_CTOR(CreateContentIterator, nsIContentIterator, NS_NewContentIterator)
|
|
|
|
MAKE_CTOR(CreatePreContentIterator, nsIContentIterator, NS_NewPreContentIterator)
|
|
|
|
MAKE_CTOR(CreateSubtreeIterator, nsIContentIterator, NS_NewContentSubtreeIterator)
|
|
|
|
// CreateHTMLImgElement, see below
|
|
|
|
// CreateHTMLOptionElement, see below
|
2009-05-19 09:18:41 +04:00
|
|
|
// CreateHTMLAudioElement, see below
|
2003-01-14 10:08:59 +03:00
|
|
|
MAKE_CTOR(CreateTextEncoder, nsIDocumentEncoder, NS_NewTextEncoder)
|
|
|
|
MAKE_CTOR(CreateHTMLCopyTextEncoder, nsIDocumentEncoder, NS_NewHTMLCopyTextEncoder)
|
|
|
|
MAKE_CTOR(CreateXMLContentSerializer, nsIContentSerializer, NS_NewXMLContentSerializer)
|
|
|
|
MAKE_CTOR(CreateHTMLContentSerializer, nsIContentSerializer, NS_NewHTMLContentSerializer)
|
2009-04-25 13:00:14 +04:00
|
|
|
MAKE_CTOR(CreateXHTMLContentSerializer, nsIContentSerializer, NS_NewXHTMLContentSerializer)
|
2003-01-14 10:08:59 +03:00
|
|
|
MAKE_CTOR(CreatePlainTextSerializer, nsIContentSerializer, NS_NewPlainTextSerializer)
|
2004-10-01 02:27:45 +04:00
|
|
|
MAKE_CTOR(CreateHTMLFragmentSink, nsIFragmentContentSink, NS_NewHTMLFragmentContentSink)
|
|
|
|
MAKE_CTOR(CreateHTMLFragmentSink2, nsIFragmentContentSink, NS_NewHTMLFragmentContentSink2)
|
2006-08-12 08:46:43 +04:00
|
|
|
MAKE_CTOR(CreateHTMLParanoidFragmentSink, nsIFragmentContentSink, NS_NewHTMLParanoidFragmentSink)
|
2004-10-01 02:27:45 +04:00
|
|
|
MAKE_CTOR(CreateXMLFragmentSink, nsIFragmentContentSink, NS_NewXMLFragmentContentSink)
|
|
|
|
MAKE_CTOR(CreateXMLFragmentSink2, nsIFragmentContentSink, NS_NewXMLFragmentContentSink2)
|
2006-08-12 08:46:43 +04:00
|
|
|
MAKE_CTOR(CreateXHTMLParanoidFragmentSink,nsIFragmentContentSink, NS_NewXHTMLParanoidFragmentSink)
|
2003-01-14 10:08:59 +03:00
|
|
|
MAKE_CTOR(CreateSanitizingHTMLSerializer, nsIContentSerializer, NS_NewSanitizingHTMLSerializer)
|
|
|
|
MAKE_CTOR(CreateXBLService, nsIXBLService, NS_NewXBLService)
|
|
|
|
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
|
|
|
|
// NS_NewXULPrototypeCache
|
2007-11-28 23:18:11 +03:00
|
|
|
MAKE_CTOR(CreateXULPopupManager, nsISupports, NS_NewXULPopupManager)
|
2003-01-14 10:08:59 +03:00
|
|
|
#endif
|
2004-10-08 00:59:53 +04:00
|
|
|
#ifdef MOZ_XTF
|
|
|
|
MAKE_CTOR(CreateXTFService, nsIXTFService, NS_NewXTFService)
|
|
|
|
MAKE_CTOR(CreateXMLContentBuilder, nsIXMLContentBuilder, NS_NewXMLContentBuilder)
|
|
|
|
#endif
|
2003-01-14 10:08:59 +03:00
|
|
|
MAKE_CTOR(CreateContentDLF, nsIDocumentLoaderFactory, NS_NewContentDocumentLoaderFactory)
|
2009-10-16 12:57:32 +04:00
|
|
|
MAKE_CTOR(CreateEventListenerService, nsIEventListenerService, NS_NewEventListenerService)
|
2003-01-14 10:08:59 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWyciwygProtocolHandler)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsContentAreaDragDrop)
|
2005-04-11 04:29:36 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDataDocumentContentPolicy)
|
2006-06-26 21:57:44 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsNoDataProtocolContentPolicy)
|
2006-06-16 00:30:44 +04:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSyncLoadService)
|
2003-03-22 06:20:23 +03:00
|
|
|
MAKE_CTOR(CreatePluginDocument, nsIDocument, NS_NewPluginDocument)
|
2008-10-30 08:20:08 +03:00
|
|
|
#ifdef MOZ_MEDIA
|
|
|
|
MAKE_CTOR(CreateVideoDocument, nsIDocument, NS_NewVideoDocument)
|
|
|
|
#endif
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 22:00:39 +04:00
|
|
|
MAKE_CTOR(CreateFocusManager, nsIFocusManager, NS_NewFocusManager)
|
2003-01-14 10:08:59 +03:00
|
|
|
|
2005-04-18 10:33:23 +04:00
|
|
|
MAKE_CTOR(CreateCanvasRenderingContext2D, nsIDOMCanvasRenderingContext2D, NS_NewCanvasRenderingContext2D)
|
2009-09-03 04:47:49 +04:00
|
|
|
MAKE_CTOR(CreateCanvasRenderingContextWebGL, nsICanvasRenderingContextWebGL, NS_NewCanvasRenderingContextWebGL)
|
2005-04-18 10:33:23 +04:00
|
|
|
|
2005-01-15 03:10:19 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsStyleSheetService, Init)
|
|
|
|
|
2008-11-19 01:54:36 +03:00
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsJSURI)
|
|
|
|
|
2003-03-15 04:04:32 +03:00
|
|
|
// 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 NS_IMETHODIMP \
|
|
|
|
_InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \
|
|
|
|
void **aResult) \
|
|
|
|
{ \
|
|
|
|
nsresult rv; \
|
|
|
|
\
|
|
|
|
_InstanceClass * inst; \
|
|
|
|
\
|
|
|
|
*aResult = NULL; \
|
|
|
|
if (NULL != aOuter) { \
|
|
|
|
rv = NS_ERROR_NO_AGGREGATION; \
|
|
|
|
return rv; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
NS_NEWXPCOM(inst, _InstanceClass); \
|
|
|
|
if (NULL == inst) { \
|
|
|
|
rv = NS_ERROR_OUT_OF_MEMORY; \
|
|
|
|
return rv; \
|
|
|
|
} \
|
|
|
|
rv = inst->QueryInterface(aIID, aResult); \
|
|
|
|
\
|
|
|
|
return rv; \
|
|
|
|
} \
|
|
|
|
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsViewManager)
|
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateHTMLImgElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
|
|
|
{
|
|
|
|
*aResult = nsnull;
|
|
|
|
if (aOuter)
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
// Note! NS_NewHTMLImageElement is special cased to handle a null nodeinfo
|
2005-01-12 22:45:38 +03:00
|
|
|
nsIContent* inst = NS_NewHTMLImageElement(nsnull);
|
2004-06-06 06:38:32 +04:00
|
|
|
nsresult rv = NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
if (inst) {
|
|
|
|
NS_ADDREF(inst);
|
2003-01-14 10:08:59 +03:00
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
NS_RELEASE(inst);
|
|
|
|
}
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
RegisterHTMLImgElement(nsIComponentManager *aCompMgr,
|
|
|
|
nsIFile* aPath,
|
|
|
|
const char* aRegistryLocation,
|
|
|
|
const char* aComponentType,
|
|
|
|
const nsModuleComponentInfo* aInfo)
|
|
|
|
{
|
|
|
|
nsCOMPtr<nsICategoryManager> catman =
|
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
|
|
|
|
|
|
|
|
if (!catman)
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
nsXPIDLCString previous;
|
|
|
|
nsresult rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
|
|
|
"Image", NS_HTMLIMGELEMENT_CONTRACTID,
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
|
|
|
|
return catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_PROTO_ALIAS_CATEGORY,
|
|
|
|
"Image", "HTMLImageElement",
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
UnregisterHTMLImgElement(nsIComponentManager* aCompMgr,
|
|
|
|
nsIFile* aPath,
|
|
|
|
const char* aRegistryLocation,
|
|
|
|
const nsModuleComponentInfo* aInfo)
|
|
|
|
{
|
|
|
|
// XXX remove category entry
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateHTMLOptionElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
|
|
|
{
|
|
|
|
*aResult = nsnull;
|
|
|
|
if (aOuter)
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
// Note! NS_NewHTMLOptionElement is special cased to handle a null nodeinfo
|
2005-01-12 22:45:38 +03:00
|
|
|
nsIContent* inst = NS_NewHTMLOptionElement(nsnull);
|
2004-06-06 06:38:32 +04:00
|
|
|
nsresult rv = NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
if (inst) {
|
|
|
|
NS_ADDREF(inst);
|
2003-01-14 10:08:59 +03:00
|
|
|
rv = inst->QueryInterface(aIID, aResult);
|
|
|
|
NS_RELEASE(inst);
|
|
|
|
}
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
RegisterHTMLOptionElement(nsIComponentManager *aCompMgr,
|
|
|
|
nsIFile* aPath,
|
|
|
|
const char* aRegistryLocation,
|
|
|
|
const char* aComponentType,
|
|
|
|
const nsModuleComponentInfo* aInfo)
|
|
|
|
{
|
|
|
|
nsCOMPtr<nsICategoryManager> catman =
|
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
|
|
|
|
|
|
|
|
if (!catman)
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
nsXPIDLCString previous;
|
|
|
|
nsresult rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
|
|
|
"Option", NS_HTMLOPTIONELEMENT_CONTRACTID,
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
|
|
|
|
return catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_PROTO_ALIAS_CATEGORY,
|
|
|
|
"Option", "HTMLOptionElement",
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
UnregisterHTMLOptionElement(nsIComponentManager* aCompMgr,
|
|
|
|
nsIFile* aPath,
|
|
|
|
const char* aRegistryLocation,
|
|
|
|
const nsModuleComponentInfo* aInfo)
|
|
|
|
{
|
|
|
|
// XXX remove category entry
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2009-05-19 09:18:41 +04:00
|
|
|
#ifdef MOZ_MEDIA
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
CreateHTMLAudioElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
|
|
|
{
|
|
|
|
*aResult = nsnull;
|
|
|
|
if (aOuter)
|
|
|
|
return NS_ERROR_NO_AGGREGATION;
|
|
|
|
// Note! NS_NewHTMLAudioElement is special cased to handle a null nodeinfo
|
|
|
|
nsCOMPtr<nsIContent> inst(NS_NewHTMLAudioElement(nsnull));
|
|
|
|
return inst ? inst->QueryInterface(aIID, aResult) : NS_ERROR_OUT_OF_MEMORY;
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
RegisterHTMLAudioElement(nsIComponentManager *aCompMgr,
|
|
|
|
nsIFile* aPath,
|
|
|
|
const char* aRegistryLocation,
|
|
|
|
const char* aComponentType,
|
|
|
|
const nsModuleComponentInfo* aInfo)
|
|
|
|
{
|
|
|
|
nsCOMPtr<nsICategoryManager> catman =
|
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
|
|
|
|
|
|
|
|
if (!catman)
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
nsXPIDLCString previous;
|
|
|
|
nsresult rv = catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_CATEGORY,
|
|
|
|
"Audio", NS_HTMLAUDIOELEMENT_CONTRACTID,
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
|
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
|
|
|
|
return catman->AddCategoryEntry(JAVASCRIPT_GLOBAL_CONSTRUCTOR_PROTO_ALIAS_CATEGORY,
|
|
|
|
"Audio", "HTMLAudioElement",
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_IMETHODIMP
|
|
|
|
UnregisterHTMLAudioElement(nsIComponentManager* aCompMgr,
|
|
|
|
nsIFile* aPath,
|
|
|
|
const char* aRegistryLocation,
|
|
|
|
const nsModuleComponentInfo* aInfo)
|
|
|
|
{
|
|
|
|
// XXX remove category entry
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-04-11 04:29:36 +04:00
|
|
|
static NS_METHOD
|
|
|
|
RegisterDataDocumentContentPolicy(nsIComponentManager *aCompMgr,
|
|
|
|
nsIFile* aPath,
|
|
|
|
const char* aRegistryLocation,
|
|
|
|
const char* aComponentType,
|
|
|
|
const nsModuleComponentInfo* aInfo)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsICategoryManager> catman =
|
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
nsXPIDLCString previous;
|
|
|
|
return catman->AddCategoryEntry("content-policy",
|
|
|
|
NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID,
|
|
|
|
NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID,
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_METHOD
|
|
|
|
UnregisterDataDocumentContentPolicy(nsIComponentManager *aCompMgr,
|
|
|
|
nsIFile *aPath,
|
|
|
|
const char *registryLocation,
|
|
|
|
const nsModuleComponentInfo *info)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsICategoryManager> catman =
|
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
return catman->DeleteCategoryEntry("content-policy",
|
|
|
|
NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID,
|
|
|
|
PR_TRUE);
|
|
|
|
}
|
|
|
|
|
2006-06-26 21:57:44 +04:00
|
|
|
static NS_METHOD
|
|
|
|
RegisterNoDataProtocolContentPolicy(nsIComponentManager *aCompMgr,
|
|
|
|
nsIFile* aPath,
|
|
|
|
const char* aRegistryLocation,
|
|
|
|
const char* aComponentType,
|
|
|
|
const nsModuleComponentInfo* aInfo)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsICategoryManager> catman =
|
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
nsXPIDLCString previous;
|
|
|
|
return catman->AddCategoryEntry("content-policy",
|
|
|
|
NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID,
|
|
|
|
NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID,
|
|
|
|
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
|
|
|
}
|
|
|
|
|
|
|
|
static NS_METHOD
|
|
|
|
UnregisterNoDataProtocolContentPolicy(nsIComponentManager *aCompMgr,
|
|
|
|
nsIFile *aPath,
|
|
|
|
const char *registryLocation,
|
|
|
|
const nsModuleComponentInfo *info)
|
|
|
|
{
|
|
|
|
nsresult rv;
|
|
|
|
nsCOMPtr<nsICategoryManager> catman =
|
|
|
|
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
return catman->DeleteCategoryEntry("content-policy",
|
|
|
|
NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID,
|
|
|
|
PR_TRUE);
|
|
|
|
}
|
|
|
|
|
2004-02-24 06:22:35 +03:00
|
|
|
static NS_METHOD
|
|
|
|
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 NS_METHOD
|
|
|
|
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(kWindowCommandTableCID, &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);
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDOMScriptObjectFactory)
|
|
|
|
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBaseDOMException)
|
|
|
|
|
2008-07-16 03:37:48 +04:00
|
|
|
#define NS_GEOLOCATION_SERVICE_CID \
|
|
|
|
{ 0x404d02a, 0x1CA, 0xAAAB, { 0x47, 0x62, 0x94, 0x4b, 0x1b, 0xf2, 0xf7, 0xb5 } }
|
|
|
|
|
2008-08-14 20:35:49 +04:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsGeolocationService, nsGeolocationService::GetGeolocationService)
|
2008-07-16 03:37:48 +04:00
|
|
|
|
1999-09-28 04:44:47 +04:00
|
|
|
// The list of components we register
|
2002-01-31 00:14:20 +03:00
|
|
|
static const nsModuleComponentInfo gComponents[] = {
|
2000-10-29 02:17:53 +04:00
|
|
|
#ifdef DEBUG
|
2001-08-07 06:55:54 +04:00
|
|
|
{ "Frame utility",
|
|
|
|
NS_FRAME_UTIL_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateNewFrameUtil },
|
|
|
|
{ "Layout debugger",
|
|
|
|
NS_LAYOUT_DEBUGGER_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateNewLayoutDebugger },
|
2000-10-29 02:17:53 +04:00
|
|
|
#endif
|
1999-09-28 04:44:47 +04:00
|
|
|
|
2001-08-07 06:55:54 +04:00
|
|
|
{ "Frame Traversal",
|
|
|
|
NS_FRAMETRAVERSAL_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateNewFrameTraversal },
|
1999-09-28 04:44:47 +04:00
|
|
|
|
2001-08-07 06:55:54 +04:00
|
|
|
// XXX ick
|
|
|
|
{ "Presentation shell",
|
|
|
|
NS_PRESSHELL_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateNewPresShell },
|
|
|
|
|
|
|
|
// XXX end ick
|
1999-09-28 04:44:47 +04:00
|
|
|
|
2008-01-16 04:27:53 +03:00
|
|
|
{ "Box Object",
|
2001-08-07 06:55:54 +04:00
|
|
|
NS_BOXOBJECT_CID,
|
|
|
|
"@mozilla.org/layout/xul-boxobject;1",
|
|
|
|
CreateNewBoxObject },
|
|
|
|
|
2008-01-16 04:27:53 +03:00
|
|
|
#ifdef MOZ_XUL
|
2002-01-24 07:26:28 +03:00
|
|
|
{ "XUL Listbox Box Object",
|
|
|
|
NS_LISTBOXOBJECT_CID,
|
|
|
|
"@mozilla.org/layout/xul-boxobject-listbox;1",
|
|
|
|
CreateNewListBoxObject },
|
|
|
|
|
2001-08-07 06:55:54 +04:00
|
|
|
{ "XUL Menu Box Object",
|
|
|
|
NS_MENUBOXOBJECT_CID,
|
|
|
|
"@mozilla.org/layout/xul-boxobject-menu;1",
|
|
|
|
CreateNewMenuBoxObject },
|
|
|
|
|
2001-08-18 05:04:47 +04:00
|
|
|
{ "XUL Popup Box Object",
|
|
|
|
NS_POPUPBOXOBJECT_CID,
|
|
|
|
"@mozilla.org/layout/xul-boxobject-popup;1",
|
|
|
|
CreateNewPopupBoxObject },
|
2001-08-07 06:55:54 +04:00
|
|
|
|
2006-07-13 13:02:05 +04:00
|
|
|
{ "Container Box Object",
|
|
|
|
NS_CONTAINERBOXOBJECT_CID,
|
|
|
|
"@mozilla.org/layout/xul-boxobject-container;1",
|
|
|
|
CreateNewContainerBoxObject },
|
2001-08-07 06:55:54 +04:00
|
|
|
|
|
|
|
{ "XUL ScrollBox Object",
|
|
|
|
NS_SCROLLBOXOBJECT_CID,
|
|
|
|
"@mozilla.org/layout/xul-boxobject-scrollbox;1",
|
|
|
|
CreateNewScrollBoxObject },
|
|
|
|
|
2002-03-29 05:46:01 +03:00
|
|
|
{ "XUL Tree Box Object",
|
|
|
|
NS_TREEBOXOBJECT_CID,
|
|
|
|
"@mozilla.org/layout/xul-boxobject-tree;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateNewTreeBoxObject },
|
2004-08-14 05:01:16 +04:00
|
|
|
|
2006-05-19 22:59:39 +04:00
|
|
|
#endif // MOZ_XUL
|
|
|
|
|
|
|
|
#ifndef MOZ_NO_INSPECTOR_APIS
|
2007-07-18 09:35:23 +04:00
|
|
|
#ifdef MOZ_XUL
|
2006-05-19 22:59:39 +04:00
|
|
|
{ "DOM View",
|
|
|
|
IN_DOMVIEW_CID,
|
|
|
|
"@mozilla.org/inspector/dom-view;1",
|
|
|
|
inDOMViewConstructor },
|
2007-07-18 09:35:23 +04:00
|
|
|
#endif
|
2006-05-19 22:59:39 +04:00
|
|
|
|
|
|
|
{ "Deep Tree Walker",
|
|
|
|
IN_DEEPTREEWALKER_CID,
|
|
|
|
"@mozilla.org/inspector/deep-tree-walker;1",
|
|
|
|
inDeepTreeWalkerConstructor },
|
|
|
|
|
|
|
|
{ "Flasher",
|
|
|
|
IN_FLASHER_CID,
|
|
|
|
"@mozilla.org/inspector/flasher;1",
|
|
|
|
inFlasherConstructor },
|
|
|
|
|
|
|
|
{ "CSS Value Search",
|
|
|
|
IN_CSSVALUESEARCH_CID,
|
|
|
|
"@mozilla.org/inspector/search;1?type=cssvalue",
|
|
|
|
inCSSValueSearchConstructor },
|
|
|
|
|
|
|
|
{ "DOM Utils",
|
|
|
|
IN_DOMUTILS_CID,
|
|
|
|
"@mozilla.org/inspector/dom-utils;1",
|
|
|
|
inDOMUtilsConstructor },
|
|
|
|
|
|
|
|
|
|
|
|
#endif // MOZ_NO_INSPECTOR_APIS
|
2001-08-07 06:55:54 +04:00
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
{ "Namespace manager",
|
|
|
|
NS_NAMESPACEMANAGER_CID,
|
|
|
|
NS_NAMESPACEMANAGER_CONTRACTID,
|
|
|
|
CreateNameSpaceManager },
|
|
|
|
|
|
|
|
{ "Event listener manager",
|
|
|
|
NS_EVENTLISTENERMANAGER_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateEventListenerManager },
|
|
|
|
|
|
|
|
{ "DOM Event group",
|
|
|
|
NS_DOMEVENTGROUP_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateDOMEventGroup },
|
|
|
|
|
|
|
|
{ "Document Viewer",
|
|
|
|
NS_DOCUMENT_VIEWER_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateDocumentViewer },
|
|
|
|
|
|
|
|
{ "CSS Style Sheet",
|
|
|
|
NS_CSS_STYLESHEET_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateCSSStyleSheet },
|
|
|
|
|
|
|
|
{ "HTML document",
|
|
|
|
NS_HTMLDOCUMENT_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateHTMLDocument },
|
|
|
|
|
|
|
|
{ "HTML-CSS style sheet",
|
|
|
|
NS_HTML_CSS_STYLESHEET_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateHTMLCSSStyleSheet },
|
|
|
|
|
|
|
|
{ "DOM implementation",
|
|
|
|
NS_DOM_IMPLEMENTATION_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateDOMImplementation },
|
|
|
|
|
|
|
|
|
|
|
|
{ "XML document",
|
|
|
|
NS_XMLDOCUMENT_CID,
|
2004-10-08 00:59:53 +04:00
|
|
|
"@mozilla.org/xml/xml-document;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateXMLDocument },
|
|
|
|
|
|
|
|
#ifdef MOZ_SVG
|
|
|
|
{ "SVG document",
|
|
|
|
NS_SVGDOCUMENT_CID,
|
2004-10-08 00:59:53 +04:00
|
|
|
"@mozilla.org/svg/svg-document;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateSVGDocument },
|
|
|
|
#endif
|
|
|
|
|
|
|
|
{ "Image document",
|
|
|
|
NS_IMAGEDOCUMENT_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateImageDocument },
|
|
|
|
|
|
|
|
{ "CSS parser",
|
|
|
|
NS_CSSPARSER_CID,
|
2003-07-03 01:34:16 +04:00
|
|
|
"@mozilla.org/content/css-parser;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateCSSParser },
|
|
|
|
|
|
|
|
{ "CSS loader",
|
|
|
|
NS_CSS_LOADER_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateCSSLoader },
|
|
|
|
|
|
|
|
{ "Dom selection",
|
|
|
|
NS_DOMSELECTION_CID,
|
2003-07-03 01:34:16 +04:00
|
|
|
"@mozilla.org/content/dom-selection;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateDOMSelection },
|
|
|
|
|
|
|
|
{ "Frame selection",
|
|
|
|
NS_FRAMESELECTION_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateSelection },
|
|
|
|
|
|
|
|
{ "Range",
|
|
|
|
NS_RANGE_CID,
|
2003-07-03 01:34:16 +04:00
|
|
|
"@mozilla.org/content/range;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateRange },
|
|
|
|
|
|
|
|
{ "Range Utils",
|
|
|
|
NS_RANGEUTILS_CID,
|
2003-07-03 01:34:16 +04:00
|
|
|
"@mozilla.org/content/range-utils;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateRangeUtils },
|
|
|
|
|
|
|
|
{ "Content iterator",
|
|
|
|
NS_CONTENTITERATOR_CID,
|
2003-07-03 01:34:16 +04:00
|
|
|
"@mozilla.org/content/post-content-iterator;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateContentIterator },
|
|
|
|
|
|
|
|
{ "Pre Content iterator",
|
|
|
|
NS_PRECONTENTITERATOR_CID,
|
2003-07-03 01:34:16 +04:00
|
|
|
"@mozilla.org/content/pre-content-iterator;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreatePreContentIterator },
|
|
|
|
|
|
|
|
{ "Subtree iterator",
|
|
|
|
NS_SUBTREEITERATOR_CID,
|
2003-07-03 01:34:16 +04:00
|
|
|
"@mozilla.org/content/subtree-content-iterator;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateSubtreeIterator },
|
|
|
|
|
2009-05-19 09:18:41 +04:00
|
|
|
// Needed to support "new Option;", "new Image;" and "new Audio;" in JavaScript
|
2003-01-14 10:08:59 +03:00
|
|
|
{ "HTML img element",
|
|
|
|
NS_HTMLIMAGEELEMENT_CID,
|
|
|
|
NS_HTMLIMGELEMENT_CONTRACTID,
|
|
|
|
CreateHTMLImgElement,
|
|
|
|
RegisterHTMLImgElement,
|
|
|
|
UnregisterHTMLImgElement },
|
|
|
|
|
|
|
|
{ "HTML option element",
|
|
|
|
NS_HTMLOPTIONELEMENT_CID,
|
|
|
|
NS_HTMLOPTIONELEMENT_CONTRACTID,
|
|
|
|
CreateHTMLOptionElement,
|
|
|
|
RegisterHTMLOptionElement,
|
|
|
|
UnregisterHTMLOptionElement },
|
|
|
|
|
2009-05-19 09:18:41 +04:00
|
|
|
#ifdef MOZ_MEDIA
|
|
|
|
{ "HTML audio element",
|
|
|
|
NS_HTMLAUDIOELEMENT_CID,
|
|
|
|
NS_HTMLAUDIOELEMENT_CONTRACTID,
|
|
|
|
CreateHTMLAudioElement,
|
|
|
|
RegisterHTMLAudioElement,
|
|
|
|
UnregisterHTMLAudioElement },
|
|
|
|
#endif
|
|
|
|
|
2005-04-18 10:33:23 +04:00
|
|
|
{ "Canvas 2D Rendering Context",
|
|
|
|
NS_CANVASRENDERINGCONTEXT2D_CID,
|
|
|
|
"@mozilla.org/content/canvas-rendering-context;1?id=2d",
|
|
|
|
CreateCanvasRenderingContext2D },
|
2009-09-03 04:47:49 +04:00
|
|
|
{ "Canvas WebGL Rendering Context",
|
|
|
|
NS_CANVASRENDERINGCONTEXTWEBGL_CID,
|
|
|
|
"@mozilla.org/content/canvas-rendering-context;1?id=moz-webgl",
|
|
|
|
CreateCanvasRenderingContextWebGL },
|
2009-11-02 03:33:39 +03:00
|
|
|
{ "Canvas WebGL Rendering Context",
|
|
|
|
NS_CANVASRENDERINGCONTEXTWEBGL_CID,
|
|
|
|
"@mozilla.org/content/canvas-rendering-context;1?id=experimental-webgl",
|
|
|
|
CreateCanvasRenderingContextWebGL },
|
|
|
|
|
2005-04-18 10:33:23 +04:00
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
{ "XML document encoder",
|
|
|
|
NS_TEXT_ENCODER_CID,
|
|
|
|
NS_DOC_ENCODER_CONTRACTID_BASE "text/xml",
|
|
|
|
CreateTextEncoder },
|
|
|
|
|
|
|
|
{ "XML document encoder",
|
|
|
|
NS_TEXT_ENCODER_CID,
|
|
|
|
NS_DOC_ENCODER_CONTRACTID_BASE "application/xml",
|
|
|
|
CreateTextEncoder },
|
|
|
|
|
2009-04-25 13:00:14 +04:00
|
|
|
{ "XHTML document encoder",
|
2003-01-14 10:08:59 +03:00
|
|
|
NS_TEXT_ENCODER_CID,
|
|
|
|
NS_DOC_ENCODER_CONTRACTID_BASE "application/xhtml+xml",
|
|
|
|
CreateTextEncoder },
|
|
|
|
|
|
|
|
#ifdef MOZ_SVG
|
|
|
|
{ "SVG document encoder",
|
|
|
|
NS_TEXT_ENCODER_CID,
|
|
|
|
NS_DOC_ENCODER_CONTRACTID_BASE "image/svg+xml",
|
|
|
|
CreateTextEncoder },
|
|
|
|
#endif
|
|
|
|
|
|
|
|
{ "HTML document encoder",
|
|
|
|
NS_TEXT_ENCODER_CID,
|
|
|
|
NS_DOC_ENCODER_CONTRACTID_BASE "text/html",
|
|
|
|
CreateTextEncoder },
|
|
|
|
|
|
|
|
{ "Plaintext document encoder",
|
|
|
|
NS_TEXT_ENCODER_CID,
|
|
|
|
NS_DOC_ENCODER_CONTRACTID_BASE "text/plain",
|
|
|
|
CreateTextEncoder },
|
|
|
|
|
|
|
|
{ "HTML copy encoder",
|
|
|
|
NS_HTMLCOPY_TEXT_ENCODER_CID,
|
|
|
|
NS_HTMLCOPY_ENCODER_CONTRACTID,
|
|
|
|
CreateHTMLCopyTextEncoder },
|
|
|
|
|
|
|
|
{ "XML content serializer",
|
|
|
|
NS_XMLCONTENTSERIALIZER_CID,
|
|
|
|
NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/xml",
|
|
|
|
CreateXMLContentSerializer },
|
|
|
|
|
|
|
|
{ "XML content serializer",
|
|
|
|
NS_XMLCONTENTSERIALIZER_CID,
|
|
|
|
NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xml",
|
|
|
|
CreateXMLContentSerializer },
|
|
|
|
|
2009-04-25 13:00:14 +04:00
|
|
|
{ "XHTML content serializer",
|
|
|
|
NS_XHTMLCONTENTSERIALIZER_CID,
|
2003-01-14 10:08:59 +03:00
|
|
|
NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xhtml+xml",
|
2009-04-25 13:00:14 +04:00
|
|
|
CreateXHTMLContentSerializer },
|
2003-01-14 10:08:59 +03:00
|
|
|
|
|
|
|
#ifdef MOZ_SVG
|
|
|
|
{ "SVG content serializer",
|
|
|
|
NS_XMLCONTENTSERIALIZER_CID,
|
|
|
|
NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "image/svg+xml",
|
|
|
|
CreateXMLContentSerializer },
|
|
|
|
#endif
|
|
|
|
|
|
|
|
{ "HTML content serializer",
|
|
|
|
NS_HTMLCONTENTSERIALIZER_CID,
|
|
|
|
NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/html",
|
|
|
|
CreateHTMLContentSerializer },
|
|
|
|
|
|
|
|
{ "XUL content serializer",
|
|
|
|
NS_XMLCONTENTSERIALIZER_CID,
|
|
|
|
NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/vnd.mozilla.xul+xml",
|
|
|
|
CreateXMLContentSerializer },
|
|
|
|
|
|
|
|
{ "plaintext content serializer",
|
|
|
|
NS_PLAINTEXTSERIALIZER_CID,
|
|
|
|
NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "text/plain",
|
|
|
|
CreatePlainTextSerializer },
|
|
|
|
|
|
|
|
{ "plaintext sink",
|
|
|
|
NS_PLAINTEXTSERIALIZER_CID,
|
|
|
|
NS_PLAINTEXTSINK_CONTRACTID,
|
|
|
|
CreatePlainTextSerializer },
|
|
|
|
|
|
|
|
{ "html fragment sink",
|
|
|
|
NS_HTMLFRAGMENTSINK_CID,
|
|
|
|
NS_HTMLFRAGMENTSINK_CONTRACTID,
|
|
|
|
CreateHTMLFragmentSink },
|
|
|
|
|
|
|
|
{ "html fragment sink 2",
|
|
|
|
NS_HTMLFRAGMENTSINK2_CID,
|
|
|
|
NS_HTMLFRAGMENTSINK2_CONTRACTID,
|
|
|
|
CreateHTMLFragmentSink2 },
|
|
|
|
|
2006-08-12 08:46:43 +04:00
|
|
|
{ "html paranoid fragment sink",
|
|
|
|
NS_HTMLPARANOIDFRAGMENTSINK_CID,
|
|
|
|
NS_HTMLPARANOIDFRAGMENTSINK_CONTRACTID,
|
|
|
|
CreateHTMLParanoidFragmentSink },
|
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
{ "HTML sanitizing content serializer",
|
|
|
|
MOZ_SANITIZINGHTMLSERIALIZER_CID,
|
|
|
|
MOZ_SANITIZINGHTMLSERIALIZER_CONTRACTID,
|
|
|
|
CreateSanitizingHTMLSerializer },
|
|
|
|
|
2004-10-01 02:27:45 +04:00
|
|
|
{ "xml fragment sink",
|
|
|
|
NS_XMLFRAGMENTSINK_CID,
|
|
|
|
NS_XMLFRAGMENTSINK_CONTRACTID,
|
|
|
|
CreateXMLFragmentSink },
|
|
|
|
|
|
|
|
{ "xml fragment sink 2",
|
|
|
|
NS_XMLFRAGMENTSINK2_CID,
|
|
|
|
NS_XMLFRAGMENTSINK2_CONTRACTID,
|
|
|
|
CreateXMLFragmentSink2 },
|
|
|
|
|
2006-08-12 08:46:43 +04:00
|
|
|
{ "xhtml paranoid fragment sink",
|
|
|
|
NS_XHTMLPARANOIDFRAGMENTSINK_CID,
|
|
|
|
NS_XHTMLPARANOIDFRAGMENTSINK_CONTRACTID,
|
|
|
|
CreateXHTMLParanoidFragmentSink },
|
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
{ "XBL Service",
|
|
|
|
NS_XBLSERVICE_CID,
|
|
|
|
"@mozilla.org/xbl;1",
|
|
|
|
CreateXBLService },
|
|
|
|
|
|
|
|
{ "Content policy service",
|
|
|
|
NS_CONTENTPOLICY_CID,
|
|
|
|
NS_CONTENTPOLICY_CONTRACTID,
|
|
|
|
CreateContentPolicy },
|
|
|
|
|
2005-04-11 04:29:36 +04:00
|
|
|
{ "Data document content policy",
|
|
|
|
NS_DATADOCUMENTCONTENTPOLICY_CID,
|
|
|
|
NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID,
|
|
|
|
nsDataDocumentContentPolicyConstructor,
|
|
|
|
RegisterDataDocumentContentPolicy,
|
|
|
|
UnregisterDataDocumentContentPolicy },
|
|
|
|
|
2006-06-26 21:57:44 +04:00
|
|
|
{ "No data protocol content policy",
|
|
|
|
NS_NODATAPROTOCOLCONTENTPOLICY_CID,
|
|
|
|
NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID,
|
|
|
|
nsNoDataProtocolContentPolicyConstructor,
|
|
|
|
RegisterNoDataProtocolContentPolicy,
|
|
|
|
UnregisterNoDataProtocolContentPolicy },
|
|
|
|
|
2003-03-15 04:04:32 +03:00
|
|
|
{ "XUL Controllers",
|
|
|
|
NS_XULCONTROLLERS_CID,
|
|
|
|
"@mozilla.org/xul/xul-controllers;1",
|
|
|
|
NS_NewXULControllers },
|
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
#ifdef MOZ_XUL
|
|
|
|
{ "XUL Sort Service",
|
|
|
|
NS_XULSORTSERVICE_CID,
|
|
|
|
"@mozilla.org/xul/xul-sort-service;1",
|
|
|
|
CreateXULSortService },
|
|
|
|
|
|
|
|
{ "XUL Template Builder",
|
|
|
|
NS_XULTEMPLATEBUILDER_CID,
|
|
|
|
"@mozilla.org/xul/xul-template-builder;1",
|
|
|
|
NS_NewXULContentBuilder },
|
|
|
|
|
|
|
|
{ "XUL Tree Builder",
|
|
|
|
NS_XULTREEBUILDER_CID,
|
|
|
|
"@mozilla.org/xul/xul-tree-builder;1",
|
|
|
|
NS_NewXULTreeBuilder },
|
|
|
|
|
2007-11-28 23:18:11 +03:00
|
|
|
{ "XUL Popup Manager",
|
|
|
|
NS_XULPOPUPMANAGER_CID,
|
|
|
|
"@mozilla.org/xul/xul-popup-manager;1",
|
|
|
|
CreateXULPopupManager },
|
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
{ "XUL Document",
|
|
|
|
NS_XULDOCUMENT_CID,
|
|
|
|
"@mozilla.org/xul/xul-document;1",
|
|
|
|
CreateXULDocument },
|
|
|
|
|
|
|
|
{ "XUL Prototype Cache",
|
|
|
|
NS_XULPROTOTYPECACHE_CID,
|
|
|
|
"@mozilla.org/xul/xul-prototype-cache;1",
|
|
|
|
NS_NewXULPrototypeCache },
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2004-10-08 00:59:53 +04:00
|
|
|
#ifdef MOZ_XTF
|
|
|
|
{ "XTF Service",
|
|
|
|
NS_XTFSERVICE_CID,
|
|
|
|
NS_XTFSERVICE_CONTRACTID,
|
|
|
|
CreateXTFService },
|
|
|
|
|
|
|
|
{ "XML Content Builder",
|
|
|
|
NS_XMLCONTENTBUILDER_CID,
|
|
|
|
NS_XMLCONTENTBUILDER_CONTRACTID,
|
|
|
|
CreateXMLContentBuilder },
|
|
|
|
#endif
|
|
|
|
|
2003-01-14 10:08:59 +03:00
|
|
|
{ "Document Loader Factory",
|
|
|
|
NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID,
|
2003-02-27 16:51:55 +03:00
|
|
|
"@mozilla.org/content/document-loader-factory;1",
|
2003-01-14 10:08:59 +03:00
|
|
|
CreateContentDLF,
|
|
|
|
nsContentDLF::RegisterDocumentFactories,
|
|
|
|
nsContentDLF::UnregisterDocumentFactories },
|
|
|
|
|
|
|
|
{ "Wyciwyg Handler",
|
|
|
|
NS_WYCIWYGPROTOCOLHANDLER_CID,
|
|
|
|
NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wyciwyg",
|
|
|
|
nsWyciwygProtocolHandlerConstructor },
|
|
|
|
|
|
|
|
{ "Content Area DragDrop",
|
|
|
|
NS_CONTENTAREADRAGDROP_CID,
|
|
|
|
NS_CONTENTAREADRAGDROP_CONTRACTID,
|
|
|
|
nsContentAreaDragDropConstructor },
|
|
|
|
|
|
|
|
{ "SyncLoad DOM Service",
|
|
|
|
NS_SYNCLOADDOMSERVICE_CID,
|
|
|
|
NS_SYNCLOADDOMSERVICE_CONTRACTID,
|
2006-06-16 00:30:44 +04:00
|
|
|
nsSyncLoadServiceConstructor },
|
2003-03-15 04:04:32 +03:00
|
|
|
|
2004-02-24 06:22:35 +03:00
|
|
|
// DOM objects
|
|
|
|
{ "Script Object Factory",
|
|
|
|
NS_DOM_SCRIPT_OBJECT_FACTORY_CID,
|
|
|
|
nsnull,
|
|
|
|
nsDOMScriptObjectFactoryConstructor
|
|
|
|
},
|
|
|
|
{ "Base DOM Exception",
|
|
|
|
NS_BASE_DOM_EXCEPTION_CID,
|
|
|
|
nsnull,
|
|
|
|
nsBaseDOMExceptionConstructor
|
|
|
|
},
|
|
|
|
{ "JavaScript Protocol Handler",
|
|
|
|
NS_JSPROTOCOLHANDLER_CID,
|
|
|
|
NS_JSPROTOCOLHANDLER_CONTRACTID,
|
|
|
|
nsJSProtocolHandler::Create },
|
2008-11-19 01:54:36 +03:00
|
|
|
{ "JavaScript URI",
|
|
|
|
NS_JSURI_CID,
|
|
|
|
nsnull,
|
|
|
|
nsJSURIConstructor },
|
2004-02-24 06:22:35 +03:00
|
|
|
{ "Window Command Table",
|
|
|
|
NS_WINDOWCOMMANDTABLE_CID,
|
|
|
|
"",
|
|
|
|
CreateWindowCommandTableConstructor
|
|
|
|
},
|
|
|
|
{ "Window Command Controller",
|
|
|
|
NS_WINDOWCONTROLLER_CID,
|
|
|
|
NS_WINDOWCONTROLLER_CONTRACTID,
|
|
|
|
CreateWindowControllerWithSingletonCommandTable
|
|
|
|
},
|
|
|
|
|
2003-03-15 04:04:32 +03:00
|
|
|
// view stuff
|
|
|
|
{ "View Manager", NS_VIEW_MANAGER_CID, "@mozilla.org/view-manager;1",
|
|
|
|
nsViewManagerConstructor },
|
2003-03-22 06:20:23 +03:00
|
|
|
|
|
|
|
{ "Plugin Document Loader Factory",
|
|
|
|
NS_PLUGINDOCLOADERFACTORY_CID,
|
|
|
|
"@mozilla.org/content/plugin/document-loader-factory;1",
|
|
|
|
CreateContentDLF },
|
|
|
|
|
|
|
|
{ "Plugin Document",
|
|
|
|
NS_PLUGINDOCUMENT_CID,
|
|
|
|
nsnull,
|
2005-01-15 03:10:19 +03:00
|
|
|
CreatePluginDocument },
|
|
|
|
|
2008-10-30 08:20:08 +03:00
|
|
|
#ifdef MOZ_MEDIA
|
|
|
|
{ "Video Document",
|
|
|
|
NS_VIDEODOCUMENT_CID,
|
|
|
|
nsnull,
|
|
|
|
CreateVideoDocument },
|
|
|
|
#endif
|
|
|
|
|
2005-01-15 03:10:19 +03:00
|
|
|
{ "Style sheet service",
|
|
|
|
NS_STYLESHEETSERVICE_CID,
|
|
|
|
NS_STYLESHEETSERVICE_CONTRACTID,
|
2005-11-02 22:03:06 +03:00
|
|
|
nsStyleSheetServiceConstructor },
|
|
|
|
|
|
|
|
// transformiix
|
|
|
|
|
|
|
|
{ "XSLTProcessor",
|
|
|
|
TRANSFORMIIX_XSLT_PROCESSOR_CID,
|
|
|
|
TRANSFORMIIX_XSLT_PROCESSOR_CONTRACTID,
|
2005-11-18 16:39:43 +03:00
|
|
|
txMozillaXSLTProcessorConstructor },
|
2005-11-02 22:03:06 +03:00
|
|
|
|
|
|
|
{ "XPathEvaluator",
|
|
|
|
TRANSFORMIIX_XPATH_EVALUATOR_CID,
|
|
|
|
NS_XPATH_EVALUATOR_CONTRACTID,
|
|
|
|
nsXPathEvaluatorConstructor },
|
|
|
|
|
|
|
|
{ "XPath1 XPointer Scheme Processor",
|
|
|
|
TRANSFORMIIX_XPATH1_SCHEME_CID,
|
|
|
|
NS_XPOINTER_SCHEME_PROCESSOR_BASE "xpath1",
|
2006-04-26 13:19:48 +04:00
|
|
|
nsXPath1SchemeProcessorConstructor },
|
|
|
|
|
2006-07-13 18:21:53 +04:00
|
|
|
{ "Transformiix NodeSet",
|
|
|
|
TRANSFORMIIX_NODESET_CID,
|
|
|
|
TRANSFORMIIX_NODESET_CONTRACTID,
|
|
|
|
txNodeSetAdaptorConstructor },
|
|
|
|
|
2006-04-26 13:19:48 +04:00
|
|
|
{ "XML Serializer",
|
|
|
|
NS_XMLSERIALIZER_CID,
|
|
|
|
NS_XMLSERIALIZER_CONTRACTID,
|
|
|
|
nsDOMSerializerConstructor },
|
|
|
|
|
2009-11-09 23:05:16 +03:00
|
|
|
{ "FileReader",
|
|
|
|
NS_FILEREADER_CID,
|
|
|
|
NS_FILEREADER_CONTRACTID,
|
|
|
|
nsDOMFileReaderConstructor },
|
2009-10-07 12:30:26 +04:00
|
|
|
|
2006-04-26 13:19:48 +04:00
|
|
|
{ "XMLHttpRequest",
|
|
|
|
NS_XMLHTTPREQUEST_CID,
|
|
|
|
NS_XMLHTTPREQUEST_CONTRACTID,
|
|
|
|
nsXMLHttpRequestConstructor },
|
|
|
|
|
|
|
|
{ "DOM Parser",
|
|
|
|
NS_DOMPARSER_CID,
|
|
|
|
NS_DOMPARSER_CONTRACTID,
|
2006-05-19 09:57:36 +04:00
|
|
|
nsDOMParserConstructor },
|
|
|
|
|
|
|
|
{ "DOM Storage",
|
|
|
|
NS_DOMSTORAGE_CID,
|
|
|
|
"@mozilla.org/dom/storage;1",
|
2007-02-24 23:07:06 +03:00
|
|
|
NS_NewDOMStorage },
|
|
|
|
|
2009-05-21 02:27:31 +04:00
|
|
|
{ "DOM Storage 2",
|
|
|
|
NS_DOMSTORAGE2_CID,
|
|
|
|
"@mozilla.org/dom/storage;2",
|
|
|
|
NS_NewDOMStorage2 },
|
|
|
|
|
2007-10-04 10:05:32 +04:00
|
|
|
{ "DOM Storage Manager",
|
|
|
|
NS_DOMSTORAGEMANAGER_CID,
|
|
|
|
"@mozilla.org/dom/storagemanager;1",
|
|
|
|
nsDOMStorageManagerConstructor },
|
|
|
|
|
2007-12-28 00:34:03 +03:00
|
|
|
{ "DOM JSON",
|
|
|
|
NS_DOMJSON_CID,
|
|
|
|
"@mozilla.org/dom/json;1",
|
|
|
|
NS_NewJSON },
|
|
|
|
|
2007-02-24 23:07:06 +03:00
|
|
|
{ "Text Editor",
|
|
|
|
NS_TEXTEDITOR_CID,
|
|
|
|
"@mozilla.org/editor/texteditor;1",
|
|
|
|
nsPlaintextEditorConstructor },
|
|
|
|
|
|
|
|
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
|
|
|
|
#ifdef ENABLE_EDITOR_API_LOG
|
|
|
|
{ "HTML Editor",
|
|
|
|
NS_HTMLEDITOR_CID,
|
|
|
|
"@mozilla.org/editor/htmleditor;1",
|
|
|
|
nsHTMLEditorLogConstructor },
|
|
|
|
#else
|
|
|
|
{ "HTML Editor",
|
|
|
|
NS_HTMLEDITOR_CID,
|
|
|
|
"@mozilla.org/editor/htmleditor;1",
|
|
|
|
nsHTMLEditorConstructor },
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
{ "Editor Controller",
|
|
|
|
NS_EDITORCONTROLLER_CID,
|
|
|
|
"@mozilla.org/editor/editorcontroller;1",
|
|
|
|
nsEditorControllerConstructor },
|
|
|
|
|
|
|
|
{ "Editor Command Table",
|
|
|
|
NS_EDITORCOMMANDTABLE_CID,
|
|
|
|
"", // no point in using a contract ID
|
|
|
|
nsEditorCommandTableConstructor },
|
|
|
|
|
|
|
|
#ifndef MOZILLA_PLAINTEXT_EDITOR_ONLY
|
|
|
|
{ NULL,
|
|
|
|
NS_TEXTSERVICESDOCUMENT_CID,
|
|
|
|
"@mozilla.org/textservices/textservicesdocument;1",
|
|
|
|
nsTextServicesDocumentConstructor },
|
|
|
|
#endif
|
2008-07-16 03:37:48 +04:00
|
|
|
|
|
|
|
{ "Geolocation Service",
|
|
|
|
NS_GEOLOCATION_SERVICE_CID,
|
|
|
|
"@mozilla.org/geolocation/service;1",
|
2008-08-14 20:35:49 +04:00
|
|
|
nsGeolocationServiceConstructor },
|
2008-07-16 03:37:48 +04:00
|
|
|
|
2009-10-16 12:57:32 +04:00
|
|
|
{ "Focus Manager",
|
|
|
|
NS_FOCUSMANAGER_CID,
|
|
|
|
"@mozilla.org/focus-manager;1",
|
|
|
|
CreateFocusManager },
|
2008-07-16 03:37:48 +04:00
|
|
|
|
Bug 178324, refactor focus by moving all focus handling into one place and simplifying it, add many tests, fixes many other bugs too numerous to mention in this small checkin comment, r=josh,smichaud,ere,dbaron,marco,neil,gavin,smaug,sr=smaug (CLOSED TREE)
2009-06-10 22:00:39 +04:00
|
|
|
|
2009-10-16 12:57:32 +04:00
|
|
|
{ "Event Listener Service",
|
|
|
|
NS_EVENTLISTENERSERVICE_CID,
|
|
|
|
NS_EVENTLISTENERSERVICE_CONTRACTID,
|
|
|
|
CreateEventListenerService }
|
2001-08-07 06:55:54 +04:00
|
|
|
};
|
1999-09-28 04:44:47 +04:00
|
|
|
|
2004-04-30 03:17:54 +04:00
|
|
|
NS_IMPL_NSGETMODULE_WITH_CTOR(nsLayoutModule, gComponents, Initialize)
|