Removing files that are no longer part of the build. a=roc.
git-svn-id: svn://10.0.0.236/trunk@136877 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
e177f83f70
commit
b0dbbbd846
@ -1,5 +0,0 @@
|
||||
#
|
||||
# This is a list of local files which get copied to the mozilla:dist:content directory
|
||||
#
|
||||
|
||||
nsContentCID.h
|
||||
@ -1,148 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape 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/NPL/
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
BUILD_DATE = gbdate.h
|
||||
|
||||
MODULE = content
|
||||
LIBRARY_NAME = gkcontent
|
||||
EXPORT_LIBRARY = 1
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
SHORT_LIBNAME = gkcontnt
|
||||
endif
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsContentModule
|
||||
GRE_MODULE = 1
|
||||
|
||||
EXTRA_DSO_LIBS = gkgfx
|
||||
ifdef MOZ_PERF_METRICS
|
||||
EXTRA_DSO_LIBS += mozutil_s
|
||||
endif
|
||||
|
||||
REQUIRES = xpcom \
|
||||
string \
|
||||
gfx \
|
||||
layout \
|
||||
widget \
|
||||
necko \
|
||||
necko2 \
|
||||
rdf \
|
||||
docshell \
|
||||
dom \
|
||||
htmlparser \
|
||||
uriloader \
|
||||
webshell \
|
||||
locale \
|
||||
unicharutil \
|
||||
lwbrk \
|
||||
js \
|
||||
pref \
|
||||
xul \
|
||||
xuldoc \
|
||||
xultmpl \
|
||||
webbrwsr \
|
||||
caps \
|
||||
xpconnect \
|
||||
imglib2 \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
nsContentDLF.cpp \
|
||||
nsContentModule.cpp \
|
||||
nsContentHTTPStartup.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = nsContentCID.h
|
||||
|
||||
SHARED_LIBRARY_LIBS = \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconevents_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconhtmlcon_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconhtmldoc_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconhtmlstyle_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconxmlcon_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconxmldoc_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconxsldoc_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconxulcon_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconxuldoc_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconxultmpl_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconxbl_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconbase_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconshared_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_SVG
|
||||
SHARED_LIBRARY_LIBS += \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkconsvgdoc_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/$(LIB_PREFIX)gkcontentsvg_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(LIBS_DIR) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_UNICHARUTIL_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
|
||||
EXPORT_OBJS = 1
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifeq ($(OS_ARCH),IRIX)
|
||||
ifeq ($(GNU_CXX),1)
|
||||
LDFLAGS += -Wl,-LD_LAYOUT:lgot_buffer=80
|
||||
endif
|
||||
endif
|
||||
|
||||
LOCAL_INCLUDES = -I$(srcdir)/../base/src \
|
||||
-I$(srcdir)/../html/base/src \
|
||||
-I$(srcdir)/../html/style/src \
|
||||
-I$(srcdir)/../xul/content/src \
|
||||
-I$(srcdir)/../xul/base/src \
|
||||
-I$(srcdir)/../xul/templates/src \
|
||||
-I$(srcdir)/../events/src \
|
||||
-I$(srcdir)/../html/content/src \
|
||||
-I$(srcdir)/../html/document/src \
|
||||
-I. \
|
||||
$(NULL)
|
||||
|
||||
GARBAGE+=$(BUILD_DATE)
|
||||
|
||||
export:: $(BUILD_DATE)
|
||||
|
||||
$(BUILD_DATE): gbdate.pl
|
||||
$(RM) $@
|
||||
$(PERL) $(srcdir)/gbdate.pl > $@
|
||||
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
#
|
||||
# The contents of this file are subject to the Netscape 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/NPL/
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
$given_date = $ENV{"MOZ_BUILD_DATE"};
|
||||
|
||||
if ($given_date ne "") {
|
||||
# The gecko date does not use hour resolution
|
||||
chop($given_date);
|
||||
chop($given_date);
|
||||
printf("#define PRODUCT_VERSION \"%08d\"\n", $given_date);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
# XP way of doing the build date.
|
||||
# 1998091509 = 1998, September, 15th, 9am local time zone
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
|
||||
# localtime returns year minus 1900
|
||||
$year = $year + 1900;
|
||||
printf("#define PRODUCT_VERSION \"%04d%02d%02d\"\n", $year, 1+$mon, $mday);
|
||||
@ -1,324 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape 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/NPL/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either 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"),
|
||||
* 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
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* 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
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsContentCID_h__
|
||||
#define nsContentCID_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
// {1691E1F7-EE41-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_STYLESET_CID \
|
||||
{ 0x1691e1f7, 0xee41, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
// {96882B70-8A27-11d2-8EAF-00805F29F370}
|
||||
#define NS_HTMLSTYLESHEET_CID \
|
||||
{ 0x96882b70, 0x8a27, 0x11d2, { 0x8e, 0xaf, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
|
||||
|
||||
// {972D8D8F-F0DA-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_DOCUMENT_VIEWER_CID \
|
||||
{ 0x972d8d8f, 0xf0da, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
// {A5121627-EDB6-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_ANONYMOUSCONTENT_CID \
|
||||
{ 0xa5121627, 0xedb6, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
// {FC886801-E768-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID \
|
||||
{ 0xfc886801, 0xe768, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
/* a6cf90f9-15b3-11d2-932e-00805f8add32 */
|
||||
#define NS_LAYOUT_DEBUGGER_CID \
|
||||
{ 0xa6cf90f9, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||
|
||||
/* a6cf90fc-15b3-11d2-932e-00805f8add32 */
|
||||
#define NS_HTML_ELEMENT_FACTORY_CID \
|
||||
{ 0xa6cf90fc, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||
|
||||
#define NS_HTMLDOCUMENT_CID \
|
||||
{ /* 5d0fcdd0-4daa-11d2-b328-00805f8a3859 */ \
|
||||
0x5d0fcdd0, 0x4daa, 0x11d2, \
|
||||
{0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59}}
|
||||
|
||||
#define NS_WYCIWYGPROTOCOLHANDLER_CID \
|
||||
{ /* e7509b46-2eB2-410a-9d7c-c3ce73284d01 */ \
|
||||
0xe7509b46, 0x2eb2, 0x410a, \
|
||||
{0x9d, 0x7c, 0xc3, 0xce, 0x73, 0x28, 0x4d, 0x01}}
|
||||
|
||||
#define NS_XMLDOCUMENT_CID \
|
||||
{ /* a6cf9063-15b3-11d2-932e-00805f8add32 */ \
|
||||
0xa6cf9063, 0x15b3, 0x11d2, \
|
||||
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||
|
||||
#define NS_XML_ELEMENT_FACTORY_CID \
|
||||
{ /* CF170391-79CC-11d3-BE44-0020A6361667 */ \
|
||||
0xcf170391, 0x79cc, 0x11d3, \
|
||||
{0xbe, 0x44, 0x0, 0x20, 0xa6, 0x36, 0x16, 0x67}}
|
||||
|
||||
#define NS_IMAGEDOCUMENT_CID \
|
||||
{ /* e11a6080-4daa-11d2-b328-00805f8a3859 */ \
|
||||
0xe11a6080, 0x4daa, 0x11d2, \
|
||||
{0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59}}
|
||||
|
||||
// {A1FDE864-E802-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_HTMLHRELEMENT_CID \
|
||||
{ 0xa1fde864, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
// {A1FDE865-E802-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_HTMLINPUTELEMENT_CID \
|
||||
{ 0xa1fde865, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
#define NS_HTMLIMAGEELEMENT_CID \
|
||||
{ /* d6008c40-4dad-11d2-b328-00805f8a3859 */ \
|
||||
0xd6008c40, 0x4dad, 0x11d2, \
|
||||
{0xb3, 0x28, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59}}
|
||||
|
||||
#define NS_HTMLOPTIONELEMENT_CID \
|
||||
{ /* a6cf90f5-15b3-11d2-932e-00805f8add32 */ \
|
||||
0xa6cf90f5, 0x15b3, 0x11d2, \
|
||||
{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||
|
||||
#define NS_NAMESPACEMANAGER_CID \
|
||||
{ /* d9783472-8fe9-11d2-9d3c-0060088f9ff7 */ \
|
||||
0xd9783472, 0x8fe9, 0x11d2, \
|
||||
{0x9d, 0x3c, 0x00, 0x60, 0x08, 0x8f, 0x9f, 0xf7}}
|
||||
|
||||
/* a6cf90d7-15b3-11d2-932e-00805f8add32 */
|
||||
#define NS_FRAME_UTIL_CID \
|
||||
{ 0xa6cf90d5, 0x15b3, 0x11d2,{0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32}}
|
||||
|
||||
|
||||
// XXX This should really be factored into a style-specific DLL so
|
||||
// that all the HTML, generic layout, and style stuff isn't munged
|
||||
// together.
|
||||
|
||||
// {2E363D60-872E-11d2-B531-000000000000}
|
||||
#define NS_CSSPARSER_CID \
|
||||
{ 0x2e363d60, 0x872e, 0x11d2, { 0xb5, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }
|
||||
|
||||
// {95F46161-D177-11d2-BF86-00105A1B0627}
|
||||
#define NS_HTML_CSS_STYLESHEET_CID \
|
||||
{ 0x95f46161, 0xd177, 0x11d2, { 0xbf, 0x86, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
|
||||
|
||||
// {A1FDE867-E802-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_CSS_STYLESHEET_CID \
|
||||
{ 0xa1fde867, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
// {eaca2576-0d4a-11d3-9d7e-0060088f9ff7}
|
||||
#define NS_CSS_LOADER_CID \
|
||||
{ 0xeaca2576, 0x0d4a, 0x11d3, { 0x9d, 0x7e, 0x00, 0x60, 0x08, 0x8f, 0x9f, 0xf7 } }
|
||||
|
||||
// {96882B71-8A27-11d2-8EAF-00805F29F370}
|
||||
#define NS_TEXTNODE_CID \
|
||||
{ 0x96882b71, 0x8a27, 0x11d2, { 0x8e, 0xaf, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
|
||||
|
||||
// {96882B72-8A27-11d2-8EAF-00805F29F370}
|
||||
#define NS_SELECTION_CID \
|
||||
{ 0x96882b72, 0x8a27, 0x11d2, { 0x8e, 0xaf, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
|
||||
|
||||
#define NS_FRAMESELECTION_CID \
|
||||
{/* {905F80F1-8A7B-11d2-918C-0080C8E44DB5}*/ \
|
||||
0x905f80f1, 0x8a7b, 0x11d2, { 0x91, 0x8c, 0x0, 0x80, 0xc8, 0xe4, 0x4d, 0xb5 } }
|
||||
|
||||
#define NS_DOMSELECTION_CID \
|
||||
{/* {C87A37FC-8109-4ce2-A322-8CDEC925379F}*/ \
|
||||
0xc87a37fc, 0x8109, 0x4ce2, { 0xa3, 0x22, 0x8c, 0xde, 0xc9, 0x25, 0x37, 0x9f } }
|
||||
|
||||
#define NS_RANGE_CID \
|
||||
{/* {56AD2981-8A87-11d2-918C-0080C8E44DB5}*/ \
|
||||
0x56ad2981, 0x8a87, 0x11d2, { 0x91, 0x8c, 0x0, 0x80, 0xc8, 0xe4, 0x4d, 0xb5 } }
|
||||
|
||||
// {A1FDE868-E802-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_ATTRIBUTECONTENT_CID \
|
||||
{ 0xa1fde868, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
#define NS_CONTENTITERATOR_CID \
|
||||
{/* {a6cf90e3-15b3-11d2-932e-00805f8add32}*/ \
|
||||
0xa6cf90e3, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
|
||||
|
||||
#define NS_PRECONTENTITERATOR_CID \
|
||||
{/* {80D7E247-D4B8-45d7-BB59-6F1DD56F384C} */ \
|
||||
0x80d7e247, 0xd4b8, 0x45d7, { 0xbb, 0x59, 0x6f, 0x1d, 0xd5, 0x6f, 0x38, 0x4c } }
|
||||
|
||||
#define NS_GENERATEDSUBTREEITERATOR_CID \
|
||||
{/* {9A45253B-EB8F-49f1-B925-E9EA90D3EB3A}*/ \
|
||||
0x9a45253b, 0xeb8f, 0x49f1, { 0xb9, 0x25, 0xe9, 0xea, 0x90, 0xd3, 0xeb, 0x3a } }
|
||||
|
||||
#define NS_GENERATEDCONTENTITERATOR_CID \
|
||||
{/* {A364930F-E353-49f1-AC69-91637EB8B757}*/ \
|
||||
0xa364930f, 0xe353, 0x49f1, { 0xac, 0x69, 0x91, 0x63, 0x7e, 0xb8, 0xb7, 0x57 } }
|
||||
|
||||
#define NS_SUBTREEITERATOR_CID \
|
||||
{/* {a6cf90e5-15b3-11d2-932e-00805f8add32}*/ \
|
||||
0xa6cf90e5, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
|
||||
|
||||
// {09F689E0-B4DA-11d2-A68B-00104BDE6048}
|
||||
#define NS_EVENTLISTENERMANAGER_CID \
|
||||
{ 0x9f689e0, 0xb4da, 0x11d2, { 0xa6, 0x8b, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } }
|
||||
|
||||
// {A1FDE862-E802-11d4-9885-00C04FA0CF4B}
|
||||
#define NS_EVENTSTATEMANAGER_CID \
|
||||
{ 0xa1fde862, 0xe802, 0x11d4, { 0x98, 0x85, 0x0, 0xc0, 0x4f, 0xa0, 0xcf, 0x4b } }
|
||||
|
||||
// {66856477-6596-40eb-bb87-59ca2dabb6f7}
|
||||
#define NS_DOMEVENTGROUP_CID \
|
||||
{ 0x66856477, 0x6596, 0x40eb, { 0xbb, 0x87, 0x59, 0xca, 0x2d, 0xab, 0xb6, 0xf7 } }
|
||||
|
||||
// {64F300A1-C88C-11d3-97FB-00400553EEF0}
|
||||
#define NS_XBLSERVICE_CID \
|
||||
{ 0x64f300a1, 0xc88c, 0x11d3, { 0x97, 0xfb, 0x0, 0x40, 0x5, 0x53, 0xee, 0xf0 } }
|
||||
|
||||
// {15671AF5-39F9-4c70-8CE3-72C97111B52D}
|
||||
#define NS_BINDINGMANAGER_CID \
|
||||
{ 0x15671af5, 0x39f9, 0x4c70, { 0x8c, 0xe3, 0x72, 0xc9, 0x71, 0x11, 0xb5, 0x2d } }
|
||||
|
||||
// 3a9cd622-264d-11d4-ba06-0060b0fc76dd
|
||||
#define NS_DOM_IMPLEMENTATION_CID \
|
||||
{ 0x3a9cd622, 0x264d, 0x11d4, {0xba, 0x06, 0x00, 0x60, 0xb0, 0xfc, 0x76, 0xdd } }
|
||||
|
||||
// {AE52FE52-683A-437D-B661-DE55F4E0A873}
|
||||
#define NS_NODEINFOMANAGER_CID \
|
||||
{ 0xae52fe52, 0x683a, 0x437d, { 0xb6, 0x61, 0xde, 0x55, 0xf4, 0xe0, 0xa8, 0x73 } }
|
||||
|
||||
// {ECEA1B28-AE54-4047-8BBE-C624235106B4}
|
||||
#define NS_COMPUTEDDOMSTYLE_CID \
|
||||
{ 0xecea1b28, 0xae54, 0x4047, { 0x8b, 0xbe, 0xc6, 0x24, 0x23, 0x51, 0x06, 0xb4 } }
|
||||
|
||||
// {4aef38b7-6364-4e23-a5e7-12f837fbbd9c}
|
||||
#define NS_XMLCONTENTSERIALIZER_CID \
|
||||
{ 0x4aef38b7, 0x6364, 0x4e23, { 0xa5, 0xe7, 0x12, 0xf8, 0x37, 0xfb, 0xbd, 0x9c } }
|
||||
|
||||
// {9d3f70da-86e9-11d4-95ec-00b0d03e37b7}
|
||||
#define NS_HTMLCONTENTSERIALIZER_CID \
|
||||
{ 0x9d3f70da, 0x86e9, 0x11d4, { 0x95, 0xec, 0x00, 0xb0, 0xd0, 0x3e, 0x37, 0xb7 } }
|
||||
|
||||
// {feca3c34-205e-4ae5-bd1c-03c686ff012b}
|
||||
#define MOZ_SANITIZINGHTMLSERIALIZER_CID \
|
||||
{ 0xfeca3c34, 0x205e, 0x4ae5, { 0xbd, 0x1c, 0x03, 0xc6, 0x86, 0xff, 0x01, 0x2b } }
|
||||
|
||||
// {6030f7ef-32ed-46a7-9a63-6a5d3f90445f}
|
||||
#define NS_PLAINTEXTSERIALIZER_CID \
|
||||
{ 0x6030f7ef, 0x32ed, 0x46a7, { 0x9a, 0x63, 0x6a, 0x5d, 0x3f, 0x90, 0x44, 0x5f } }
|
||||
|
||||
// {d4f2b600-b5c1-11d6-b483-cc97c63e567c}
|
||||
#define NS_HTMLFRAGMENTSINK_CID \
|
||||
{ 0xd4f2b600, 0xb5c1, 0x11d6, { 0xb4, 0x83, 0xcc, 0x97, 0xc6, 0x3e, 0x56, 0x7c } }
|
||||
|
||||
// {13111d00-ce81-11d6-8082-ecf3665af67c}
|
||||
#define NS_HTMLFRAGMENTSINK2_CID \
|
||||
{ 0x13111d00, 0xce81, 0x11d6, { 0x80, 0x82, 0xec, 0xf3, 0x66, 0x5a, 0xf6, 0x7c } }
|
||||
|
||||
// {3986B301-097C-11d3-BF87-00105A1B0627}
|
||||
#define NS_XULPOPUPLISTENER_CID \
|
||||
{ 0x3986b301, 0x97c, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
|
||||
|
||||
// {1F5C1721-7DC3-11d3-BF87-00105A1B0627}
|
||||
#define NS_XULCONTROLLERS_CID \
|
||||
{ 0x1f5c1721, 0x7dc3, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
|
||||
|
||||
|
||||
// {daedcb43-1dd1-11b2-b1d2-caf06cb40387}
|
||||
#define NS_DLGDEFAULTKEYS_CID \
|
||||
{ 0xdaedcb43, 0x1dd1, 0x11b2, { 0xb1, 0xd2, 0xca, 0xf0, 0x6c, 0xb4, 0x3, 0x87 } }
|
||||
|
||||
// {76E92881-CDDB-11d3-BF87-00105A1B0627}
|
||||
#define NS_XULELEMENTFACTORY_CID \
|
||||
{ 0x76e92881, 0xcddb, 0x11d3, { 0xbf, 0x87, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
|
||||
|
||||
|
||||
// {BFD05264-834C-11d2-8EAC-00805F29F371}
|
||||
#define NS_XULSORTSERVICE_CID \
|
||||
{ 0xbfd05264, 0x834c, 0x11d2, { 0x8e, 0xac, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x71 } }
|
||||
|
||||
// {3D262D00-8B5A-11d2-8EB0-00805F29F370}
|
||||
#define NS_XULTEMPLATEBUILDER_CID \
|
||||
{ 0x3d262d00, 0x8b5a, 0x11d2, { 0x8e, 0xb0, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
|
||||
|
||||
// {1abdcc96-1dd2-11b2-b520-f8f59cdd67bc}
|
||||
#define NS_XULTREEBUILDER_CID \
|
||||
{ 0x1abdcc96, 0x1dd2, 0x11b2, { 0xb5, 0x20, 0xf8, 0xf5, 0x9c, 0xdd, 0x67, 0xbc } }
|
||||
|
||||
// {CE058B21-BA9C-11d2-BF86-00105A1B0627}
|
||||
#define NS_XULCONTENTSINK_CID \
|
||||
{ 0xce058b21, 0xba9c, 0x11d2, { 0xbf, 0x86, 0x0, 0x10, 0x5a, 0x1b, 0x6, 0x27 } }
|
||||
|
||||
// {541AFCB2-A9A3-11d2-8EC5-00805F29F370}
|
||||
#define NS_XULDOCUMENT_CID \
|
||||
{ 0x541afcb2, 0xa9a3, 0x11d2, { 0x8e, 0xc5, 0x0, 0x80, 0x5f, 0x29, 0xf3, 0x70 } }
|
||||
|
||||
// {3A0A0FC1-8349-11d3-BE47-00104BDE6048}
|
||||
#define NS_XULPROTOTYPECACHE_CID \
|
||||
{ 0x3a0a0fc1, 0x8349, 0x11d3, { 0xbe, 0x47, 0x0, 0x10, 0x4b, 0xde, 0x60, 0x48 } }
|
||||
|
||||
// {a6cf9126-15b3-11d2-932e-00805f8add32}
|
||||
#define NS_RANGEUTILS_CID \
|
||||
{ 0xa6cf9126, 0x15b3, 0x11d2, {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } }
|
||||
|
||||
#ifdef MOZ_MATHML
|
||||
// {68b9fbda-f230-45a9-bf92-dbbbd4ac8555}
|
||||
#define NS_MATHMLELEMENTFACTORY_CID \
|
||||
{ 0x68b9fbda, 0xf230, 0x45a9, {0xbf, 0x92, 0xdb, 0xbb, 0xd4, 0xac, 0x85, 0x55 } }
|
||||
#endif // MOZ_MATHML
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
|
||||
// {4E48C00A-E20F-4061-B869-2BAC285D68E8}
|
||||
#define NS_SVGELEMENTFACTORY_DEPRECATED_CID \
|
||||
{ 0x4e48c00a, 0xe20f, 0x4061, { 0xb8, 0x69, 0x2b, 0xac, 0x28, 0x5d, 0x68, 0xe8 } }
|
||||
|
||||
|
||||
// {34D9B28A-FBFF-4bbd-8546-1822FE3FB8B5}
|
||||
#define NS_SVGELEMENTFACTORY_CID \
|
||||
{ 0x34d9b28a, 0xfbff, 0x4bbd, { 0x85, 0x46, 0x18, 0x22, 0xfe, 0x3f, 0xb8, 0xb5 } }
|
||||
|
||||
#define NS_SVGDOCUMENT_CID \
|
||||
{ /* b7f44954-1dd1-11b2-8c2e-c2feab4186bc */ \
|
||||
0xb7f44954, 0x11d1, 0x11b2, \
|
||||
{0x8c, 0x2e, 0xc2, 0xfe, 0xab, 0x41, 0x86, 0xbc}}
|
||||
|
||||
#endif // MOZ_SVG
|
||||
|
||||
#define NS_SYNCLOADDOMSERVICE_CID \
|
||||
{ /* 0e4e7d00-f71a-439f-9178-1a71ff11b55f */ \
|
||||
0x0e4e7d00, 0xf71a, 0x439f, \
|
||||
{0x91, 0x78, 0x1a, 0x71, 0xff, 0x11, 0xb5, 0x5f} }
|
||||
#define NS_SYNCLOADDOMSERVICE_CONTRACTID \
|
||||
"@mozilla.org/content/syncload-dom-service;1"
|
||||
|
||||
#endif /* nsContentCID_h__ */
|
||||
@ -1,706 +0,0 @@
|
||||
/* -*- Mode: c++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape 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/NPL/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either 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"),
|
||||
* 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
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* 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
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsContentDLF.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsHTMLAtoms.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIDocumentLoader.h"
|
||||
#include "nsIDocumentLoaderFactory.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIHTMLContent.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsICSSStyleSheet.h"
|
||||
#include "nsNodeInfo.h"
|
||||
#include "nsNodeInfoManager.h"
|
||||
#include "nsString.h"
|
||||
#include "nsContentCID.h"
|
||||
#include "prprf.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsICSSLoader.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIViewSourceChannel.h"
|
||||
|
||||
#include "nsRDFCID.h"
|
||||
#include "nsIRDFResource.h"
|
||||
#include "nsIXULContentSink.h"
|
||||
#include "nsIDocStreamLoaderFactory.h"
|
||||
|
||||
#include "imgILoader.h"
|
||||
|
||||
// URL for the "user agent" style sheet
|
||||
#define UA_CSS_URL "resource:/res/ua.css"
|
||||
|
||||
// Factory code for creating variations on html documents
|
||||
|
||||
#undef NOISY_REGISTRY
|
||||
|
||||
static NS_DEFINE_IID(kHTMLDocumentCID, NS_HTMLDOCUMENT_CID);
|
||||
static NS_DEFINE_IID(kXMLDocumentCID, NS_XMLDOCUMENT_CID);
|
||||
#ifdef MOZ_SVG
|
||||
static NS_DEFINE_IID(kSVGDocumentCID, NS_SVGDOCUMENT_CID);
|
||||
#endif
|
||||
static NS_DEFINE_IID(kImageDocumentCID, NS_IMAGEDOCUMENT_CID);
|
||||
static NS_DEFINE_IID(kXULDocumentCID, NS_XULDOCUMENT_CID);
|
||||
|
||||
extern nsresult NS_NewDocumentViewer(nsIDocumentViewer** aResult);
|
||||
|
||||
static const char* const gHTMLTypes[] = {
|
||||
"text/html",
|
||||
"text/plain",
|
||||
"text/css",
|
||||
"text/javascript",
|
||||
"application/x-javascript",
|
||||
"application/x-view-source", //XXX I wish I could just use nsMimeTypes.h here
|
||||
0
|
||||
};
|
||||
|
||||
static const char* const gXMLTypes[] = {
|
||||
"text/xml",
|
||||
"application/xml",
|
||||
"application/xhtml+xml",
|
||||
0
|
||||
};
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
static char* gSVGTypes[] = {
|
||||
"image/svg+xml",
|
||||
0
|
||||
};
|
||||
#endif
|
||||
|
||||
static const char* const gRDFTypes[] = {
|
||||
"text/rdf",
|
||||
"application/vnd.mozilla.xul+xml",
|
||||
"mozilla.application/cached-xul",
|
||||
0
|
||||
};
|
||||
|
||||
static const char* const gImageTypes[] = {
|
||||
"image/gif",
|
||||
"image/jpeg",
|
||||
"image/jpg",
|
||||
"image/pjpeg",
|
||||
"image/png",
|
||||
"image/x-png",
|
||||
"image/x-art",
|
||||
"image/x-jg",
|
||||
"image/bmp",
|
||||
"image/x-icon",
|
||||
"video/x-mng",
|
||||
"image/x-jng",
|
||||
"image/x-xbitmap",
|
||||
"image/x-xbm",
|
||||
"image/xbm",
|
||||
0
|
||||
};
|
||||
|
||||
nsICSSStyleSheet* nsContentDLF::gUAStyleSheet;
|
||||
|
||||
nsresult
|
||||
NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult)
|
||||
{
|
||||
NS_PRECONDITION(aResult, "null OUT ptr");
|
||||
if (!aResult) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
nsContentDLF* it = new nsContentDLF();
|
||||
if (!it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return CallQueryInterface(it, aResult);
|
||||
}
|
||||
|
||||
nsContentDLF::nsContentDLF()
|
||||
{
|
||||
}
|
||||
|
||||
nsContentDLF::~nsContentDLF()
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS2(nsContentDLF,
|
||||
nsIDocumentLoaderFactory,
|
||||
nsIDocStreamLoaderFactory);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsContentDLF::CreateInstance(const char* aCommand,
|
||||
nsIChannel* aChannel,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
const char* aContentType,
|
||||
nsISupports* aContainer,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIStreamListener** aDocListener,
|
||||
nsIContentViewer** aDocViewer)
|
||||
{
|
||||
EnsureUAStyleSheet();
|
||||
|
||||
// Are we viewing source?
|
||||
|
||||
nsCOMPtr<nsIViewSourceChannel> viewSourceChannel = do_QueryInterface(aChannel);
|
||||
if (viewSourceChannel)
|
||||
{
|
||||
aCommand = "view-source";
|
||||
|
||||
// The parser freaks out when it sees the content-type that a
|
||||
// view-source channel normally returns. Get the actual content
|
||||
// type of the data. If it's known, use it; otherwise use
|
||||
// text/plain.
|
||||
nsCAutoString type;
|
||||
viewSourceChannel->GetOriginalContentType(type);
|
||||
PRBool knownType = PR_FALSE;
|
||||
PRInt32 typeIndex;
|
||||
for (typeIndex = 0; gHTMLTypes[typeIndex] && !knownType; ++typeIndex) {
|
||||
if (type.Equals(gHTMLTypes[typeIndex]) &&
|
||||
!type.Equals(NS_LITERAL_CSTRING("application/x-view-source"))) {
|
||||
knownType = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
for (typeIndex = 0; gXMLTypes[typeIndex] && !knownType; ++typeIndex) {
|
||||
if (type.Equals(gXMLTypes[typeIndex])) {
|
||||
knownType = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
for (typeIndex = 0; gSVGTypes[typeIndex] && !knownType; ++typeIndex) {
|
||||
if (type.Equals(gSVGTypes[typeIndex])) {
|
||||
knownType = PR_TRUE;
|
||||
}
|
||||
}
|
||||
#endif // MOZ_SVG
|
||||
|
||||
for (typeIndex = 0; gRDFTypes[typeIndex] && !knownType; ++typeIndex) {
|
||||
if (type.Equals(gRDFTypes[typeIndex])) {
|
||||
knownType = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (knownType) {
|
||||
viewSourceChannel->SetContentType(type);
|
||||
} else {
|
||||
viewSourceChannel->SetContentType(NS_LITERAL_CSTRING("text/plain"));
|
||||
}
|
||||
} else if (0 == PL_strcmp("application/x-view-source", aContentType)) {
|
||||
aChannel->SetContentType(NS_LITERAL_CSTRING("text/plain"));
|
||||
aContentType = "text/plain";
|
||||
}
|
||||
|
||||
// Try html
|
||||
int typeIndex=0;
|
||||
while(gHTMLTypes[typeIndex]) {
|
||||
if (0 == PL_strcmp(gHTMLTypes[typeIndex++], aContentType)) {
|
||||
return CreateDocument(aCommand,
|
||||
aChannel, aLoadGroup,
|
||||
aContainer, kHTMLDocumentCID,
|
||||
aDocListener, aDocViewer);
|
||||
}
|
||||
}
|
||||
|
||||
// Try XML
|
||||
typeIndex = 0;
|
||||
while(gXMLTypes[typeIndex]) {
|
||||
if (0== PL_strcmp(gXMLTypes[typeIndex++], aContentType)) {
|
||||
return CreateDocument(aCommand,
|
||||
aChannel, aLoadGroup,
|
||||
aContainer, kXMLDocumentCID,
|
||||
aDocListener, aDocViewer);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
// Try SVG
|
||||
typeIndex = 0;
|
||||
while(gSVGTypes[typeIndex]) {
|
||||
if (!PL_strcmp(gSVGTypes[typeIndex++], aContentType)) {
|
||||
return CreateDocument(aCommand,
|
||||
aChannel, aLoadGroup,
|
||||
aContainer, kSVGDocumentCID,
|
||||
aDocListener, aDocViewer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Try RDF
|
||||
typeIndex = 0;
|
||||
while (gRDFTypes[typeIndex]) {
|
||||
if (0 == PL_strcmp(gRDFTypes[typeIndex++], aContentType)) {
|
||||
return CreateRDFDocument(aCommand,
|
||||
aChannel, aLoadGroup,
|
||||
aContentType, aContainer,
|
||||
aExtraInfo, aDocListener, aDocViewer);
|
||||
}
|
||||
}
|
||||
|
||||
// Try image types
|
||||
nsCOMPtr<imgILoader> loader(do_GetService("@mozilla.org/image/loader;1"));
|
||||
PRBool isReg = PR_FALSE;
|
||||
loader->SupportImageWithMimeType(aContentType, &isReg);
|
||||
if (isReg) {
|
||||
return CreateDocument(aCommand,
|
||||
aChannel, aLoadGroup,
|
||||
aContainer, kImageDocumentCID,
|
||||
aDocListener, aDocViewer);
|
||||
}
|
||||
|
||||
// If we get here, then we weren't able to create anything. Sorry!
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsContentDLF::CreateInstanceForDocument(nsISupports* aContainer,
|
||||
nsIDocument* aDocument,
|
||||
const char *aCommand,
|
||||
nsIContentViewer** aDocViewerResult)
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
EnsureUAStyleSheet();
|
||||
|
||||
do {
|
||||
nsCOMPtr<nsIDocumentViewer> docv;
|
||||
rv = NS_NewDocumentViewer(getter_AddRefs(docv));
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
||||
docv->SetUAStyleSheet(NS_STATIC_CAST(nsIStyleSheet*, gUAStyleSheet));
|
||||
|
||||
// Bind the document to the Content Viewer
|
||||
nsIContentViewer* cv = NS_STATIC_CAST(nsIContentViewer*, docv.get());
|
||||
rv = cv->LoadStart(aDocument);
|
||||
NS_ADDREF(*aDocViewerResult = cv);
|
||||
} while (PR_FALSE);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsContentDLF::CreateBlankDocument(nsILoadGroup *aLoadGroup, nsIDocument **aDocument)
|
||||
{
|
||||
*aDocument = nsnull;
|
||||
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
// create a new blank HTML document
|
||||
nsCOMPtr<nsIDocument> blankDoc(do_CreateInstance(kHTMLDocumentCID));
|
||||
|
||||
if (blankDoc) {
|
||||
// initialize
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
NS_NewURI(getter_AddRefs(uri), NS_LITERAL_CSTRING("about:blank"));
|
||||
if (uri)
|
||||
rv = blankDoc->ResetToURI(uri, aLoadGroup);
|
||||
}
|
||||
|
||||
// add some simple content structure
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsINodeInfoManager> nim;
|
||||
blankDoc->GetNodeInfoManager(*getter_AddRefs(nim));
|
||||
|
||||
if (nim) {
|
||||
nsCOMPtr<nsINodeInfo> htmlNodeInfo;
|
||||
|
||||
// generate an html html element
|
||||
nsCOMPtr<nsIHTMLContent> htmlElement;
|
||||
nim->GetNodeInfo(nsHTMLAtoms::html, 0, kNameSpaceID_None,
|
||||
*getter_AddRefs(htmlNodeInfo));
|
||||
NS_NewHTMLHtmlElement(getter_AddRefs(htmlElement), htmlNodeInfo);
|
||||
|
||||
// generate an html head element
|
||||
nsCOMPtr<nsIHTMLContent> headElement;
|
||||
nim->GetNodeInfo(nsHTMLAtoms::head, 0, kNameSpaceID_None,
|
||||
*getter_AddRefs(htmlNodeInfo));
|
||||
NS_NewHTMLHeadElement(getter_AddRefs(headElement), htmlNodeInfo);
|
||||
|
||||
// generate an html body element
|
||||
nsCOMPtr<nsIHTMLContent> bodyElement;
|
||||
nim->GetNodeInfo(nsHTMLAtoms::body, 0, kNameSpaceID_None,
|
||||
*getter_AddRefs(htmlNodeInfo));
|
||||
NS_NewHTMLBodyElement(getter_AddRefs(bodyElement), htmlNodeInfo);
|
||||
|
||||
// blat in the structure
|
||||
if (htmlElement && headElement && bodyElement) {
|
||||
htmlElement->SetDocument(blankDoc, PR_FALSE, PR_TRUE);
|
||||
blankDoc->SetRootContent(htmlElement);
|
||||
|
||||
htmlElement->AppendChildTo(headElement, PR_FALSE, PR_FALSE);
|
||||
|
||||
PRInt32 id;
|
||||
blankDoc->GetAndIncrementContentID(&id);
|
||||
bodyElement->SetContentID(id);
|
||||
htmlElement->AppendChildTo(bodyElement, PR_FALSE, PR_FALSE);
|
||||
|
||||
rv = NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add a nice bow
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
*aDocument = blankDoc;
|
||||
NS_ADDREF(*aDocument);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsContentDLF::CreateDocument(const char* aCommand,
|
||||
nsIChannel* aChannel,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsISupports* aContainer,
|
||||
const nsCID& aDocumentCID,
|
||||
nsIStreamListener** aDocListener,
|
||||
nsIContentViewer** aDocViewer)
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIURI> aURL;
|
||||
rv = aChannel->GetURI(getter_AddRefs(aURL));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
#ifdef NOISY_CREATE_DOC
|
||||
if (nsnull != aURL) {
|
||||
nsAutoString tmp;
|
||||
aURL->ToString(tmp);
|
||||
fputs(NS_LossyConvertUCS2toASCII(tmp).get(), stdout);
|
||||
printf(": creating document\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
nsCOMPtr<nsIDocumentViewer> docv;
|
||||
do {
|
||||
// Create the document
|
||||
doc = do_CreateInstance(aDocumentCID, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
||||
// Create the document viewer XXX: could reuse document viewer here!
|
||||
rv = NS_NewDocumentViewer(getter_AddRefs(docv));
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
docv->SetUAStyleSheet(gUAStyleSheet);
|
||||
|
||||
doc->SetContainer(aContainer);
|
||||
|
||||
// Initialize the document to begin loading the data. An
|
||||
// nsIStreamListener connected to the parser is returned in
|
||||
// aDocListener.
|
||||
rv = doc->StartDocumentLoad(aCommand, aChannel, aLoadGroup, aContainer, aDocListener, PR_TRUE);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
|
||||
// Bind the document to the Content Viewer
|
||||
rv = docv->LoadStart(doc);
|
||||
*aDocViewer = docv;
|
||||
NS_IF_ADDREF(*aDocViewer);
|
||||
} while (PR_FALSE);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsContentDLF::CreateInstance(nsIInputStream& aInputStream,
|
||||
const char* aContentType,
|
||||
const char* aCommand,
|
||||
nsISupports* aContainer,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIContentViewer** aDocViewer)
|
||||
|
||||
{
|
||||
nsresult status = NS_ERROR_FAILURE;
|
||||
|
||||
EnsureUAStyleSheet();
|
||||
|
||||
// Try RDF
|
||||
int typeIndex = 0;
|
||||
while (gRDFTypes[typeIndex]) {
|
||||
if (0 == PL_strcmp(gRDFTypes[typeIndex++], aContentType)) {
|
||||
return CreateXULDocumentFromStream(aInputStream,
|
||||
aCommand,
|
||||
aContainer,
|
||||
aExtraInfo,
|
||||
aDocViewer);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
// ...common work for |CreateRDFDocument| and |CreateXULDocumentFromStream|
|
||||
nsresult
|
||||
nsContentDLF::CreateRDFDocument(nsISupports* aExtraInfo,
|
||||
nsCOMPtr<nsIDocument>* doc,
|
||||
nsCOMPtr<nsIDocumentViewer>* docv)
|
||||
{
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
// Create the XUL document
|
||||
*doc = do_CreateInstance(kXULDocumentCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// Create the image content viewer...
|
||||
rv = NS_NewDocumentViewer(getter_AddRefs(*docv));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// Load the UA style sheet if we haven't already done that
|
||||
(*docv)->SetUAStyleSheet(gUAStyleSheet);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// ...note, this RDF document _may_ be XUL :-)
|
||||
nsresult
|
||||
nsContentDLF::CreateRDFDocument(const char* aCommand,
|
||||
nsIChannel* aChannel,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
const char* aContentType,
|
||||
nsISupports* aContainer,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIStreamListener** aDocListener,
|
||||
nsIContentViewer** aDocViewer)
|
||||
{
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
nsCOMPtr<nsIDocumentViewer> docv;
|
||||
nsresult rv = CreateRDFDocument(aExtraInfo, address_of(doc), address_of(docv));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> aURL;
|
||||
rv = aChannel->GetURI(getter_AddRefs(aURL));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
/*
|
||||
* Initialize the document to begin loading the data...
|
||||
*
|
||||
* An nsIStreamListener connected to the parser is returned in
|
||||
* aDocListener.
|
||||
*/
|
||||
|
||||
doc->SetContainer(aContainer);
|
||||
|
||||
rv = doc->StartDocumentLoad(aCommand, aChannel, aLoadGroup, aContainer, aDocListener, PR_TRUE);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
/*
|
||||
* Bind the document to the Content Viewer...
|
||||
*/
|
||||
rv = docv->LoadStart(doc);
|
||||
*aDocViewer = docv;
|
||||
NS_IF_ADDREF(*aDocViewer);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsContentDLF::CreateXULDocumentFromStream(nsIInputStream& aXULStream,
|
||||
const char* aCommand,
|
||||
nsISupports* aContainer,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIContentViewer** aDocViewer)
|
||||
{
|
||||
nsresult status = NS_OK;
|
||||
|
||||
#if 0 // XXX dead code; remove
|
||||
do
|
||||
{
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
nsCOMPtr<nsIDocumentViewer> docv;
|
||||
if ( NS_FAILED(status = CreateRDFDocument(aExtraInfo, address_of(doc), address_of(docv))) )
|
||||
break;
|
||||
|
||||
if ( NS_FAILED(status = docv->LoadStart(doc)) )
|
||||
break;
|
||||
|
||||
*aDocViewer = docv;
|
||||
NS_IF_ADDREF(*aDocViewer);
|
||||
|
||||
nsCOMPtr<nsIStreamLoadableDocument> loader = do_QueryInterface(doc, &status);
|
||||
if ( NS_FAILED(status) )
|
||||
break;
|
||||
|
||||
status = loader->LoadFromStream(aXULStream, aContainer, aCommand);
|
||||
}
|
||||
while (0);
|
||||
#endif
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kDocumentFactoryImplCID, NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID);
|
||||
|
||||
static nsresult
|
||||
RegisterTypes(nsIComponentManager* aCompMgr,
|
||||
nsICategoryManager* aCatMgr,
|
||||
const char* aCommand,
|
||||
nsIFile* aPath,
|
||||
const char *aLocation,
|
||||
const char *aType,
|
||||
const char* const* aTypes)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
while (*aTypes) {
|
||||
char contractid[500];
|
||||
const char* contentType = *aTypes++;
|
||||
PR_snprintf(contractid, sizeof(contractid),
|
||||
NS_DOCUMENT_LOADER_FACTORY_CONTRACTID_PREFIX "%s;1?type=%s",
|
||||
aCommand, contentType);
|
||||
#ifdef NOISY_REGISTRY
|
||||
printf("Register %s => %s\n", contractid, aPath);
|
||||
#endif
|
||||
nsCOMPtr<nsIComponentRegistrar> registrar = do_QueryInterface(aCompMgr, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = registrar->RegisterFactoryLocation(kDocumentFactoryImplCID,
|
||||
"Layout",
|
||||
contractid,
|
||||
aPath,
|
||||
aLocation,
|
||||
aType);
|
||||
if (NS_FAILED(rv)) break;
|
||||
|
||||
// add the MIME types layotu can handle to the handlers category.
|
||||
// this allows users of layout's viewers (the docshell for example)
|
||||
// to query the types of viewers layout can create.
|
||||
nsXPIDLCString previous;
|
||||
rv = aCatMgr->AddCategoryEntry("Gecko-Content-Viewers", contentType,
|
||||
contractid,
|
||||
PR_TRUE, PR_TRUE, getter_Copies(previous));
|
||||
if (NS_FAILED(rv)) break;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsContentDLF::RegisterDocumentFactories(nsIComponentManager* aCompMgr,
|
||||
nsIFile* aPath,
|
||||
const char *aLocation,
|
||||
const char *aType,
|
||||
const nsModuleComponentInfo* aInfo)
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsICategoryManager> catmgr(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
do {
|
||||
rv = RegisterTypes(aCompMgr, catmgr, "view", aPath, aLocation, aType, gHTMLTypes);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
rv = RegisterTypes(aCompMgr, catmgr, "view-source", aPath, aLocation, aType, gHTMLTypes);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
rv = RegisterTypes(aCompMgr, catmgr, "view", aPath, aLocation, aType, gXMLTypes);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
rv = RegisterTypes(aCompMgr, catmgr, "view-source", aPath, aLocation, aType, gXMLTypes);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
#ifdef MOZ_SVG
|
||||
rv = RegisterTypes(aCompMgr, catmgr, "view", aPath, aLocation, aType, gSVGTypes);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
rv = RegisterTypes(aCompMgr, catmgr, "view-source", aPath, aLocation, aType, gSVGTypes);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
#endif
|
||||
rv = RegisterTypes(aCompMgr, catmgr, "view", aPath, aLocation, aType, gImageTypes);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
rv = RegisterTypes(aCompMgr, catmgr, "view", aPath, aLocation, aType, gRDFTypes);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
rv = RegisterTypes(aCompMgr, catmgr, "view-source", aPath, aLocation, aType, gRDFTypes);
|
||||
if (NS_FAILED(rv))
|
||||
break;
|
||||
} while (PR_FALSE);
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsContentDLF::UnregisterDocumentFactories(nsIComponentManager* aCompMgr,
|
||||
nsIFile* aPath,
|
||||
const char* aRegistryLocation,
|
||||
const nsModuleComponentInfo* aInfo)
|
||||
{
|
||||
// XXXwaterson seems like this leaves the registry pretty dirty.
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIComponentRegistrar> registrar = do_QueryInterface(aCompMgr, &rv);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
return registrar->UnregisterFactoryLocation(kDocumentFactoryImplCID, aPath);
|
||||
}
|
||||
|
||||
/* static */ nsresult
|
||||
nsContentDLF::EnsureUAStyleSheet()
|
||||
{
|
||||
if (gUAStyleSheet)
|
||||
return NS_OK;
|
||||
|
||||
// Load the UA style sheet
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NS_NewURI(getter_AddRefs(uri), NS_LITERAL_CSTRING(UA_CSS_URL));
|
||||
if (NS_FAILED(rv)) {
|
||||
#ifdef DEBUG
|
||||
printf("*** open of %s failed: error=%x\n", UA_CSS_URL, rv);
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
nsCOMPtr<nsICSSLoader> cssLoader;
|
||||
NS_NewCSSLoader(getter_AddRefs(cssLoader));
|
||||
if (!cssLoader)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
rv = cssLoader->LoadAgentSheet(uri, &gUAStyleSheet);
|
||||
#ifdef DEBUG
|
||||
if (NS_FAILED(rv))
|
||||
printf("*** open of %s failed: error=%x\n", UA_CSS_URL, rv);
|
||||
#endif
|
||||
return rv;
|
||||
}
|
||||
@ -1,107 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "MPL"); you may not use this file except in
|
||||
* compliance with the MPL. You may obtain a copy of the MPL at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the MPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* MPL.
|
||||
*
|
||||
* The Initial Developer of this code under the MPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 2000 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsContentDLF_h__
|
||||
#define nsContentDLF_h__
|
||||
|
||||
#include "nsIDocumentLoaderFactory.h"
|
||||
#include "nsIDocStreamLoaderFactory.h"
|
||||
#include "nsIDocumentViewer.h"
|
||||
#include "nsIDocument.h"
|
||||
|
||||
class nsICSSStyleSheet;
|
||||
class nsIChannel;
|
||||
class nsIComponentManager;
|
||||
class nsIContentViewer;
|
||||
class nsIDocumentViewer;
|
||||
class nsIFile;
|
||||
class nsIInputStream;
|
||||
class nsILoadGroup;
|
||||
class nsIStreamListener;
|
||||
struct nsModuleComponentInfo;
|
||||
|
||||
class nsContentDLF : public nsIDocumentLoaderFactory,
|
||||
public nsIDocStreamLoaderFactory
|
||||
{
|
||||
public:
|
||||
nsContentDLF();
|
||||
virtual ~nsContentDLF();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOCUMENTLOADERFACTORY
|
||||
|
||||
// for nsIDocStreamLoaderFactory
|
||||
NS_METHOD CreateInstance(nsIInputStream& aInputStream,
|
||||
const char* aContentType,
|
||||
const char* aCommand,
|
||||
nsISupports* aContainer,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIContentViewer** aDocViewer);
|
||||
|
||||
nsresult InitUAStyleSheet();
|
||||
|
||||
nsresult CreateDocument(const char* aCommand,
|
||||
nsIChannel* aChannel,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
nsISupports* aContainer,
|
||||
const nsCID& aDocumentCID,
|
||||
nsIStreamListener** aDocListener,
|
||||
nsIContentViewer** aDocViewer);
|
||||
|
||||
nsresult CreateRDFDocument(const char* aCommand,
|
||||
nsIChannel* aChannel,
|
||||
nsILoadGroup* aLoadGroup,
|
||||
const char* aContentType,
|
||||
nsISupports* aContainer,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIStreamListener** aDocListener,
|
||||
nsIContentViewer** aDocViewer);
|
||||
|
||||
nsresult CreateXULDocumentFromStream(nsIInputStream& aXULStream,
|
||||
const char* aCommand,
|
||||
nsISupports* aContainer,
|
||||
nsISupports* aExtraInfo,
|
||||
nsIContentViewer** aDocViewer);
|
||||
|
||||
nsresult CreateRDFDocument(nsISupports*,
|
||||
nsCOMPtr<nsIDocument>*,
|
||||
nsCOMPtr<nsIDocumentViewer>*);
|
||||
|
||||
static nsICSSStyleSheet* gUAStyleSheet;
|
||||
|
||||
static NS_IMETHODIMP
|
||||
RegisterDocumentFactories(nsIComponentManager* aCompMgr,
|
||||
nsIFile* aPath,
|
||||
const char *aLocation,
|
||||
const char *aType,
|
||||
const nsModuleComponentInfo* aInfo);
|
||||
|
||||
static NS_IMETHODIMP
|
||||
UnregisterDocumentFactories(nsIComponentManager* aCompMgr,
|
||||
nsIFile* aPath,
|
||||
const char* aRegistryLocation,
|
||||
const nsModuleComponentInfo* aInfo);
|
||||
|
||||
private:
|
||||
static nsresult EnsureUAStyleSheet();
|
||||
};
|
||||
|
||||
nsresult
|
||||
NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
|
||||
|
||||
#endif
|
||||
|
||||
@ -1,114 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape 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/NPL/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Alec Flett <alecf@netscape.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either 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"),
|
||||
* 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
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* 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
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsICategoryManager.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
#include "nsContentHTTPStartup.h"
|
||||
#include "nsIHttpProtocolHandler.h"
|
||||
#include "gbdate.h"
|
||||
|
||||
#define PRODUCT_NAME "Gecko"
|
||||
|
||||
NS_IMPL_ISUPPORTS1(nsContentHTTPStartup,nsIObserver)
|
||||
|
||||
nsresult
|
||||
nsContentHTTPStartup::Observe( nsISupports *aSubject,
|
||||
const char *aTopic,
|
||||
const PRUnichar *aData)
|
||||
{
|
||||
if (nsCRT::strcmp(aTopic, NS_HTTP_STARTUP_TOPIC) != 0)
|
||||
return NS_OK;
|
||||
|
||||
nsresult rv = nsnull;
|
||||
|
||||
nsCOMPtr<nsIHttpProtocolHandler> http(do_QueryInterface(aSubject));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = http->SetProduct(NS_LITERAL_CSTRING(PRODUCT_NAME));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = http->SetProductSub(NS_LITERAL_CSTRING(PRODUCT_VERSION));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsContentHTTPStartup::RegisterHTTPStartup(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 previousEntry;
|
||||
rv = catMan->AddCategoryEntry(NS_HTTP_STARTUP_CATEGORY,
|
||||
"Content UserAgent Setter",
|
||||
NS_CONTENTHTTPSTARTUP_CONTRACTID,
|
||||
PR_TRUE, PR_TRUE,
|
||||
getter_Copies(previousEntry));
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsContentHTTPStartup::UnregisterHTTPStartup(nsIComponentManager* aCompMgr,
|
||||
nsIFile* aPath,
|
||||
const char* aRegistryLocation,
|
||||
const nsModuleComponentInfo* aInfo)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsICategoryManager>
|
||||
catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
|
||||
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1,78 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape 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/NPL/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Alec Flett <alecf@netscape.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either 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"),
|
||||
* 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
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* 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
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsIObserver.h"
|
||||
|
||||
#define NS_CONTENTHTTPSTARTUP_CONTRACTID \
|
||||
"@mozilla.org/content/http-startup;1"
|
||||
|
||||
/* c2f6ef7e-afd5-4be4-a1f5-c824efa4231b */
|
||||
#define NS_CONTENTHTTPSTARTUP_CID \
|
||||
{ 0xc2f6ef7e, 0xafd5, 0x4be4, \
|
||||
{0xa1, 0xf5, 0xc8, 0x24, 0xef, 0xa4, 0x23, 0x1b} }
|
||||
|
||||
struct nsModuleComponentInfo;
|
||||
|
||||
class nsContentHTTPStartup : public nsIObserver
|
||||
{
|
||||
public:
|
||||
nsContentHTTPStartup() { }
|
||||
virtual ~nsContentHTTPStartup() {}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
public:
|
||||
static NS_IMETHODIMP
|
||||
RegisterHTTPStartup(nsIComponentManager* aCompMgr,
|
||||
nsIFile* aPath,
|
||||
const char* aRegistryLocation,
|
||||
const char* aComponentType,
|
||||
const nsModuleComponentInfo* aInfo);
|
||||
|
||||
static NS_IMETHODIMP
|
||||
UnregisterHTTPStartup(nsIComponentManager* aCompMgr,
|
||||
nsIFile* aPath,
|
||||
const char* aRegistryLocation,
|
||||
const nsModuleComponentInfo* aInfo);
|
||||
|
||||
private:
|
||||
nsresult setUserAgent();
|
||||
|
||||
};
|
||||
@ -1,916 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape 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/NPL/
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either 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"),
|
||||
* 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
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* 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
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include "nsXBLAtoms.h" // to addref/release table
|
||||
#include "nsCSSPseudoElements.h" // to addref/release table
|
||||
#include "nsCSSPseudoClasses.h" // to addref/release table
|
||||
#include "nsCSSAnonBoxes.h" // to addref/release table
|
||||
#include "nsCSSKeywords.h" // to addref/release table
|
||||
#include "nsCSSProps.h" // to addref/release table
|
||||
#include "nsColorNames.h" // to addref/release table
|
||||
#include "nsContentCID.h"
|
||||
#include "nsContentHTTPStartup.h"
|
||||
#include "nsContentDLF.h"
|
||||
#include "nsContentPolicyUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDOMCID.h"
|
||||
#include "nsCSSOMFactory.h"
|
||||
#include "nsInspectorCSSUtils.h"
|
||||
#include "nsEventStateManager.h"
|
||||
#include "nsEventListenerManager.h"
|
||||
#include "nsGenericElement.h"
|
||||
#include "nsGenericDOMDataNode.h"
|
||||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLAtoms.h"
|
||||
#include "nsHTMLContentSerializer.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIBindingManager.h"
|
||||
#include "nsICSSLoader.h"
|
||||
#include "nsICSSParser.h"
|
||||
#include "nsICSSStyleSheet.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIComputedDOMStyle.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 "nsIElementFactory.h"
|
||||
#include "nsIEventListenerManager.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsIFrameSelection.h"
|
||||
#include "nsIFrameUtil.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsHTMLAttributes.h"
|
||||
#include "nsIHTMLCSSStyleSheet.h"
|
||||
#include "nsIHTMLContent.h"
|
||||
#include "nsIHTMLFragmentContentSink.h"
|
||||
#include "nsIHTMLStyleSheet.h"
|
||||
#include "nsIHTMLToTextSink.h"
|
||||
#include "nsILayoutDebugger.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIPrivateDOMImplementation.h"
|
||||
#include "nsIRangeUtils.h"
|
||||
#include "nsIScriptNameSpaceManager.h"
|
||||
#include "nsISelection.h"
|
||||
#include "nsITextContent.h"
|
||||
#include "nsIXBLService.h"
|
||||
#include "nsIFrameLoader.h"
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsPlainTextSerializer.h"
|
||||
#include "mozSanitizingSerializer.h"
|
||||
#include "nsRange.h"
|
||||
#include "nsComputedDOMStyle.h"
|
||||
#include "nsXMLContentSerializer.h"
|
||||
#include "nsRuleNode.h"
|
||||
#include "nsWyciwygProtocolHandler.h"
|
||||
#include "nsContentAreaDragDrop.h"
|
||||
#include "nsContentList.h"
|
||||
#include "nsISyncLoadDOMService.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_XUL
|
||||
#include "nsIXULContentSink.h"
|
||||
#include "nsIXULDocument.h"
|
||||
#include "nsIXULPopupListener.h"
|
||||
#include "nsIXULPrototypeCache.h"
|
||||
#include "nsIXULPrototypeDocument.h"
|
||||
#include "nsIXULPrototypeDocument.h"
|
||||
#include "nsIXULSortService.h"
|
||||
#include "nsXULAtoms.h"
|
||||
#include "nsXULContentUtils.h"
|
||||
#include "nsXULElement.h"
|
||||
|
||||
extern NS_IMETHODIMP
|
||||
NS_NewXULContentBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
||||
|
||||
extern NS_IMETHODIMP
|
||||
NS_NewXULTreeBuilder(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
#include "nsSVGAtoms.h"
|
||||
#endif
|
||||
|
||||
// jst says, ``we need this to avoid holding on to XPConnect past its
|
||||
// destruction. By being an XPCOM shutdown observer we can make sure
|
||||
// we release the content global reference to XPConnect before
|
||||
// XPConnect is shutdown, which cuts down on leaks n' whatnot...''
|
||||
class ContentShutdownObserver : public nsIObserver
|
||||
{
|
||||
public:
|
||||
ContentShutdownObserver() { }
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(ContentShutdownObserver, nsIObserver)
|
||||
|
||||
NS_IMETHODIMP
|
||||
ContentShutdownObserver::Observe(nsISupports *aSubject,
|
||||
const char *aTopic,
|
||||
const PRUnichar *someData)
|
||||
{
|
||||
if (!nsCRT::strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID))
|
||||
nsContentUtils::Shutdown();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static PRBool gInitialized = PR_FALSE;
|
||||
|
||||
// Perform our one-time intialization for this module
|
||||
PR_STATIC_CALLBACK(nsresult)
|
||||
Initialize(nsIModule* aSelf)
|
||||
{
|
||||
NS_PRECONDITION(!gInitialized, "module already initialized");
|
||||
if (gInitialized)
|
||||
return NS_OK;
|
||||
|
||||
gInitialized = PR_TRUE;
|
||||
|
||||
nsContentUtils::Init();
|
||||
|
||||
// Register all of our atoms once
|
||||
nsCSSAnonBoxes::AddRefAtoms();
|
||||
nsCSSPseudoClasses::AddRefAtoms();
|
||||
nsCSSPseudoElements::AddRefAtoms();
|
||||
nsCSSKeywords::AddRefTable();
|
||||
nsCSSProps::AddRefTable();
|
||||
nsColorNames::AddRefTable();
|
||||
nsHTMLAtoms::AddRefAtoms();
|
||||
nsXBLAtoms::AddRefAtoms();
|
||||
nsLayoutAtoms::AddRefAtoms();
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
nsXULAtoms::AddRefAtoms();
|
||||
nsXULContentUtils::Init();
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
nsSVGAtoms::AddRefAtoms();
|
||||
#endif
|
||||
|
||||
// Add our shutdown observer.
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
do_GetService("@mozilla.org/observer-service;1");
|
||||
|
||||
if (observerService) {
|
||||
ContentShutdownObserver* observer =
|
||||
new ContentShutdownObserver();
|
||||
|
||||
if (observer)
|
||||
observerService->AddObserver(observer, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Shutdown this module, releasing all of the module resources
|
||||
PR_STATIC_CALLBACK(void)
|
||||
Shutdown(nsIModule* aSelf)
|
||||
{
|
||||
NS_PRECONDITION(gInitialized, "module not initialized");
|
||||
if (! gInitialized)
|
||||
return;
|
||||
|
||||
gInitialized = PR_FALSE;
|
||||
|
||||
nsRange::Shutdown();
|
||||
nsGenericElement::Shutdown();
|
||||
nsGenericDOMDataNode::Shutdown();
|
||||
nsEventListenerManager::Shutdown();
|
||||
nsContentList::Shutdown();
|
||||
nsComputedDOMStyle::Shutdown();
|
||||
|
||||
// Release all of our atoms
|
||||
nsColorNames::ReleaseTable();
|
||||
nsCSSProps::ReleaseTable();
|
||||
nsCSSKeywords::ReleaseTable();
|
||||
nsCSSAnonBoxes::ReleaseAtoms();
|
||||
nsCSSPseudoClasses::ReleaseAtoms();
|
||||
nsCSSPseudoElements::ReleaseAtoms();
|
||||
nsHTMLAtoms::ReleaseAtoms();
|
||||
nsXBLAtoms::ReleaseAtoms();
|
||||
nsLayoutAtoms::ReleaseAtoms();
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
nsXULContentUtils::Finish();
|
||||
nsXULAtoms::ReleaseAtoms();
|
||||
nsXULElement::ReleaseGlobals();
|
||||
nsXULPrototypeElement::ReleaseGlobals();
|
||||
nsXULPrototypeScript::ReleaseGlobals();
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
nsSVGAtoms::ReleaseAtoms();
|
||||
#endif
|
||||
|
||||
NS_IF_RELEASE(nsContentDLF::gUAStyleSheet);
|
||||
NS_IF_RELEASE(nsRuleNode::gLangService);
|
||||
nsGenericHTMLElement::Shutdown();
|
||||
|
||||
nsContentUtils::Shutdown();
|
||||
NS_NameSpaceManagerShutdown();
|
||||
}
|
||||
|
||||
extern nsresult NS_NewSelection(nsIFrameSelection** aResult);
|
||||
extern nsresult NS_NewDomSelection(nsISelection** aResult);
|
||||
extern nsresult NS_NewDocumentViewer(nsIDocumentViewer** aResult);
|
||||
extern nsresult NS_NewRange(nsIDOMRange** aResult);
|
||||
extern nsresult NS_NewRangeUtils(nsIRangeUtils** aResult);
|
||||
extern nsresult NS_NewContentIterator(nsIContentIterator** aResult);
|
||||
extern nsresult NS_NewPreContentIterator(nsIContentIterator** aResult);
|
||||
extern nsresult NS_NewGenRegularIterator(nsIContentIterator** aResult);
|
||||
extern nsresult NS_NewContentSubtreeIterator(nsIContentIterator** aResult);
|
||||
extern nsresult NS_NewGenSubtreeIterator(nsIContentIterator** aInstancePtrResult);
|
||||
extern nsresult NS_NewContentDocumentLoaderFactory(nsIDocumentLoaderFactory** aResult);
|
||||
extern nsresult NS_NewHTMLElementFactory(nsIElementFactory** aResult);
|
||||
extern nsresult NS_NewXMLElementFactory(nsIElementFactory** aResult);
|
||||
extern nsresult NS_NewHTMLCopyTextEncoder(nsIDocumentEncoder** aResult);
|
||||
extern nsresult NS_NewTextEncoder(nsIDocumentEncoder** aResult);
|
||||
extern nsresult NS_NewXBLService(nsIXBLService** aResult);
|
||||
extern nsresult NS_NewBindingManager(nsIBindingManager** aResult);
|
||||
extern nsresult NS_NewNodeInfoManager(nsINodeInfoManager** aResult);
|
||||
extern nsresult NS_NewContentPolicy(nsIContentPolicy** aResult);
|
||||
extern nsresult NS_NewFrameLoader(nsIFrameLoader** aResult);
|
||||
extern nsresult NS_NewSyncLoadDOMService(nsISyncLoadDOMService** aResult);
|
||||
extern nsresult NS_NewDOMEventGroup(nsIDOMEventGroup** aResult);
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
extern nsresult NS_NewXULElementFactory(nsIElementFactory** aResult);
|
||||
extern NS_IMETHODIMP NS_NewXULControllers(nsISupports* aOuter, REFNSIID aIID, void** aResult);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_MATHML
|
||||
extern nsresult NS_NewMathMLElementFactory(nsIElementFactory** aResult);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
extern nsresult NS_NewSVGElementFactory(nsIElementFactory** aResult);
|
||||
#endif
|
||||
|
||||
#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; \
|
||||
}
|
||||
|
||||
MAKE_CTOR(CreateNameSpaceManager, nsINameSpaceManager, NS_GetNameSpaceManager)
|
||||
MAKE_CTOR(CreateEventListenerManager, nsIEventListenerManager, NS_NewEventListenerManager)
|
||||
MAKE_CTOR(CreateEventStateManager, nsIEventStateManager, NS_NewEventStateManager)
|
||||
MAKE_CTOR(CreateDOMEventGroup, nsIDOMEventGroup, NS_NewDOMEventGroup)
|
||||
MAKE_CTOR(CreateDocumentViewer, nsIDocumentViewer, NS_NewDocumentViewer)
|
||||
MAKE_CTOR(CreateHTMLStyleSheet, nsIHTMLStyleSheet, NS_NewHTMLStyleSheet)
|
||||
MAKE_CTOR(CreateStyleSet, nsIStyleSet, NS_NewStyleSet)
|
||||
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(CreateHTMLElementFactory, nsIElementFactory, NS_NewHTMLElementFactory)
|
||||
MAKE_CTOR(CreateTextNode, nsITextContent, NS_NewTextNode)
|
||||
//MAKE_CTOR(CreateAnonymousElement, nsIContent, NS_NewAnonymousElement)
|
||||
MAKE_CTOR(CreateAttributeContent, nsIContent, NS_NewAttributeContent)
|
||||
MAKE_CTOR(CreateXMLElementFactory, nsIElementFactory, NS_NewXMLElementFactory)
|
||||
//MAKE_CTOR(CreateSelection, nsISelection, NS_NewSelection)
|
||||
MAKE_CTOR(CreateDOMSelection, nsISelection, NS_NewDomSelection)
|
||||
MAKE_CTOR(CreateSelection, nsIFrameSelection, NS_NewSelection)
|
||||
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(CreateGeneratedContentIterator, nsIContentIterator, NS_NewGenRegularIterator)
|
||||
MAKE_CTOR(CreateGeneratedSubtreeIterator, nsIContentIterator, NS_NewGenSubtreeIterator)
|
||||
MAKE_CTOR(CreateSubtreeIterator, nsIContentIterator, NS_NewContentSubtreeIterator)
|
||||
// CreateHTMLImgElement, see below
|
||||
// CreateHTMLOptionElement, 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(CreatePlainTextSerializer, nsIContentSerializer, NS_NewPlainTextSerializer)
|
||||
MAKE_CTOR(CreateHTMLFragmentSink, nsIHTMLFragmentContentSink, NS_NewHTMLFragmentContentSink)
|
||||
MAKE_CTOR(CreateHTMLFragmentSink2, nsIHTMLFragmentContentSink, NS_NewHTMLFragmentContentSink2)
|
||||
MAKE_CTOR(CreateSanitizingHTMLSerializer, nsIContentSerializer, NS_NewSanitizingHTMLSerializer)
|
||||
MAKE_CTOR(CreateXBLService, nsIXBLService, NS_NewXBLService)
|
||||
MAKE_CTOR(CreateBindingManager, nsIBindingManager, NS_NewBindingManager)
|
||||
MAKE_CTOR(CreateContentPolicy, nsIContentPolicy, NS_NewContentPolicy)
|
||||
MAKE_CTOR(CreateFrameLoader, nsIFrameLoader, NS_NewFrameLoader)
|
||||
MAKE_CTOR(CreateNodeInfoManager, nsINodeInfoManager, NS_NewNodeInfoManager)
|
||||
MAKE_CTOR(CreateComputedDOMStyle, nsIComputedDOMStyle, NS_NewComputedDOMStyle)
|
||||
#ifdef MOZ_XUL
|
||||
MAKE_CTOR(CreateXULSortService, nsIXULSortService, NS_NewXULSortService)
|
||||
// NS_NewXULContentBuilder
|
||||
// NS_NewXULTreeBuilder
|
||||
MAKE_CTOR(CreateXULContentSink, nsIXULContentSink, NS_NewXULContentSink)
|
||||
MAKE_CTOR(CreateXULDocument, nsIXULDocument, NS_NewXULDocument)
|
||||
MAKE_CTOR(CreateXULPopupListener, nsIXULPopupListener, NS_NewXULPopupListener)
|
||||
// NS_NewXULControllers
|
||||
// NS_NewXULPrototypeCache
|
||||
MAKE_CTOR(CreateXULElementFactory, nsIElementFactory, NS_NewXULElementFactory)
|
||||
#endif
|
||||
#ifdef MOZ_MATHML
|
||||
MAKE_CTOR(CreateMathMLElementFactory, nsIElementFactory, NS_NewMathMLElementFactory)
|
||||
#endif
|
||||
#ifdef MOZ_SVG
|
||||
MAKE_CTOR(CreateSVGElementFactory, nsIElementFactory, NS_NewSVGElementFactory)
|
||||
#endif
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsContentHTTPStartup)
|
||||
MAKE_CTOR(CreateContentDLF, nsIDocumentLoaderFactory, NS_NewContentDocumentLoaderFactory)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCSSOMFactory)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsInspectorCSSUtils)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWyciwygProtocolHandler)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsContentAreaDragDrop)
|
||||
MAKE_CTOR(CreateSyncLoadDOMService, nsISyncLoadDOMService, NS_NewSyncLoadDOMService)
|
||||
|
||||
static NS_IMETHODIMP
|
||||
CreateHTMLImgElement(nsISupports* aOuter, REFNSIID aIID, void** aResult)
|
||||
{
|
||||
*aResult = nsnull;
|
||||
if (aOuter)
|
||||
return NS_ERROR_NO_AGGREGATION;
|
||||
nsIHTMLContent* inst;
|
||||
// Note! NS_NewHTMLImageElement is special cased to handle a null nodeinfo
|
||||
nsresult rv = NS_NewHTMLImageElement(&inst, nsnull);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
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;
|
||||
nsIHTMLContent* inst;
|
||||
// Note! NS_NewHTMLOptionElement is special cased to handle a null nodeinfo
|
||||
nsresult rv = NS_NewHTMLOptionElement(&inst, nsnull);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
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;
|
||||
}
|
||||
|
||||
// The list of components we register
|
||||
static const nsModuleComponentInfo gComponents[] = {
|
||||
{ "Namespace manager",
|
||||
NS_NAMESPACEMANAGER_CID,
|
||||
NS_NAMESPACEMANAGER_CONTRACTID,
|
||||
CreateNameSpaceManager },
|
||||
|
||||
{ "Event listener manager",
|
||||
NS_EVENTLISTENERMANAGER_CID,
|
||||
nsnull,
|
||||
CreateEventListenerManager },
|
||||
|
||||
{ "Event state manager",
|
||||
NS_EVENTSTATEMANAGER_CID,
|
||||
nsnull,
|
||||
CreateEventStateManager },
|
||||
|
||||
{ "DOM Event group",
|
||||
NS_DOMEVENTGROUP_CID,
|
||||
nsnull,
|
||||
CreateDOMEventGroup },
|
||||
|
||||
{ "Document Viewer",
|
||||
NS_DOCUMENT_VIEWER_CID,
|
||||
nsnull,
|
||||
CreateDocumentViewer },
|
||||
|
||||
{ "HTML Style Sheet",
|
||||
NS_HTMLSTYLESHEET_CID,
|
||||
nsnull,
|
||||
CreateHTMLStyleSheet },
|
||||
|
||||
{ "Style Set",
|
||||
NS_STYLESET_CID,
|
||||
nsnull,
|
||||
CreateStyleSet },
|
||||
|
||||
{ "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,
|
||||
nsnull,
|
||||
CreateXMLDocument },
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
{ "SVG document",
|
||||
NS_SVGDOCUMENT_CID,
|
||||
nsnull,
|
||||
CreateSVGDocument },
|
||||
#endif
|
||||
|
||||
{ "Image document",
|
||||
NS_IMAGEDOCUMENT_CID,
|
||||
nsnull,
|
||||
CreateImageDocument },
|
||||
|
||||
{ "CSS parser",
|
||||
NS_CSSPARSER_CID,
|
||||
nsnull,
|
||||
CreateCSSParser },
|
||||
|
||||
{ "CSS loader",
|
||||
NS_CSS_LOADER_CID,
|
||||
nsnull,
|
||||
CreateCSSLoader },
|
||||
|
||||
{ "HTML element factory",
|
||||
NS_HTML_ELEMENT_FACTORY_CID,
|
||||
NS_HTML_ELEMENT_FACTORY_CONTRACTID,
|
||||
CreateHTMLElementFactory },
|
||||
|
||||
{ "Text element",
|
||||
NS_TEXTNODE_CID,
|
||||
nsnull,
|
||||
CreateTextNode },
|
||||
|
||||
#if 0 // XXX apparently there is no such thing?
|
||||
{ "Anonymous Content",
|
||||
NS_ANONYMOUSCONTENT_CID,
|
||||
nsnull,
|
||||
CreateAnonymousElement },
|
||||
#endif
|
||||
|
||||
{ "Attribute Content",
|
||||
NS_ATTRIBUTECONTENT_CID,
|
||||
nsnull,
|
||||
CreateAttributeContent },
|
||||
|
||||
{ "XML element factory",
|
||||
NS_XML_ELEMENT_FACTORY_CID,
|
||||
NS_XML_ELEMENT_FACTORY_CONTRACTID,
|
||||
CreateXMLElementFactory },
|
||||
|
||||
#if 0 // XXX apparently there is no such thing?
|
||||
{ "Selection",
|
||||
NS_SELECTION_CID,
|
||||
nsnull,
|
||||
CreateSelection },
|
||||
#endif
|
||||
|
||||
{ "Dom selection",
|
||||
NS_DOMSELECTION_CID,
|
||||
nsnull,
|
||||
CreateDOMSelection },
|
||||
|
||||
{ "Frame selection",
|
||||
NS_FRAMESELECTION_CID,
|
||||
nsnull,
|
||||
CreateSelection },
|
||||
|
||||
{ "Range",
|
||||
NS_RANGE_CID,
|
||||
nsnull,
|
||||
CreateRange },
|
||||
|
||||
{ "Range Utils",
|
||||
NS_RANGEUTILS_CID,
|
||||
nsnull,
|
||||
CreateRangeUtils },
|
||||
|
||||
{ "Content iterator",
|
||||
NS_CONTENTITERATOR_CID,
|
||||
nsnull,
|
||||
CreateContentIterator },
|
||||
|
||||
{ "Pre Content iterator",
|
||||
NS_PRECONTENTITERATOR_CID,
|
||||
nsnull,
|
||||
CreatePreContentIterator },
|
||||
|
||||
{ "Generated Content iterator",
|
||||
NS_GENERATEDCONTENTITERATOR_CID,
|
||||
nsnull,
|
||||
CreateGeneratedContentIterator },
|
||||
|
||||
{ "Generated Subtree iterator",
|
||||
NS_GENERATEDSUBTREEITERATOR_CID,
|
||||
nsnull,
|
||||
CreateGeneratedSubtreeIterator },
|
||||
|
||||
{ "Subtree iterator",
|
||||
NS_SUBTREEITERATOR_CID,
|
||||
nsnull,
|
||||
CreateSubtreeIterator },
|
||||
|
||||
{ "CSS Object Model Factory",
|
||||
NS_CSSOMFACTORY_CID,
|
||||
nsnull,
|
||||
nsCSSOMFactoryConstructor },
|
||||
|
||||
{ "Inspector CSS Utils",
|
||||
NS_INSPECTORCSSUTILS_CID,
|
||||
nsnull,
|
||||
nsInspectorCSSUtilsConstructor },
|
||||
|
||||
// Needed to support "new Option;" and "new Image;" in JavaScript
|
||||
{ "HTML img element",
|
||||
NS_HTMLIMAGEELEMENT_CID,
|
||||
NS_HTMLIMGELEMENT_CONTRACTID,
|
||||
CreateHTMLImgElement,
|
||||
RegisterHTMLImgElement,
|
||||
UnregisterHTMLImgElement },
|
||||
|
||||
{ "HTML option element",
|
||||
NS_HTMLOPTIONELEMENT_CID,
|
||||
NS_HTMLOPTIONELEMENT_CONTRACTID,
|
||||
CreateHTMLOptionElement,
|
||||
RegisterHTMLOptionElement,
|
||||
UnregisterHTMLOptionElement },
|
||||
|
||||
{ "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 },
|
||||
|
||||
{ "XML document encoder",
|
||||
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 },
|
||||
|
||||
{ "XML content serializer",
|
||||
NS_XMLCONTENTSERIALIZER_CID,
|
||||
NS_CONTENTSERIALIZER_CONTRACTID_PREFIX "application/xhtml+xml",
|
||||
CreateXMLContentSerializer },
|
||||
|
||||
#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 },
|
||||
|
||||
{ "HTML sanitizing content serializer",
|
||||
MOZ_SANITIZINGHTMLSERIALIZER_CID,
|
||||
MOZ_SANITIZINGHTMLSERIALIZER_CONTRACTID,
|
||||
CreateSanitizingHTMLSerializer },
|
||||
|
||||
{ "XBL Service",
|
||||
NS_XBLSERVICE_CID,
|
||||
"@mozilla.org/xbl;1",
|
||||
CreateXBLService },
|
||||
|
||||
{ "XBL Binding Manager",
|
||||
NS_BINDINGMANAGER_CID,
|
||||
"@mozilla.org/xbl/binding-manager;1",
|
||||
CreateBindingManager },
|
||||
|
||||
{ "Content policy service",
|
||||
NS_CONTENTPOLICY_CID,
|
||||
NS_CONTENTPOLICY_CONTRACTID,
|
||||
CreateContentPolicy },
|
||||
|
||||
{ "Frame Loader",
|
||||
NS_FRAMELOADER_CID,
|
||||
NS_FRAMELOADER_CONTRACTID,
|
||||
CreateFrameLoader },
|
||||
|
||||
{ "NodeInfoManager",
|
||||
NS_NODEINFOMANAGER_CID,
|
||||
NS_NODEINFOMANAGER_CONTRACTID,
|
||||
CreateNodeInfoManager },
|
||||
|
||||
{ "DOM CSS Computed Style Declaration",
|
||||
NS_COMPUTEDDOMSTYLE_CID,
|
||||
"@mozilla.org/DOM/Level2/CSS/computedStyleDeclaration;1",
|
||||
CreateComputedDOMStyle },
|
||||
|
||||
#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 },
|
||||
|
||||
{ "XUL Content Sink",
|
||||
NS_XULCONTENTSINK_CID,
|
||||
"@mozilla.org/xul/xul-content-sink;1",
|
||||
CreateXULContentSink },
|
||||
|
||||
{ "XUL Document",
|
||||
NS_XULDOCUMENT_CID,
|
||||
"@mozilla.org/xul/xul-document;1",
|
||||
CreateXULDocument },
|
||||
|
||||
{ "XUL PopupListener",
|
||||
NS_XULPOPUPLISTENER_CID,
|
||||
"@mozilla.org/xul/xul-popup-listener;1",
|
||||
CreateXULPopupListener },
|
||||
|
||||
{ "XUL Controllers",
|
||||
NS_XULCONTROLLERS_CID,
|
||||
"@mozilla.org/xul/xul-controllers;1",
|
||||
NS_NewXULControllers },
|
||||
|
||||
{ "XUL Prototype Cache",
|
||||
NS_XULPROTOTYPECACHE_CID,
|
||||
"@mozilla.org/xul/xul-prototype-cache;1",
|
||||
NS_NewXULPrototypeCache },
|
||||
|
||||
{ NS_XULPROTOTYPEDOCUMENT_CLASSNAME,
|
||||
NS_XULPROTOTYPEDOCUMENT_CID,
|
||||
nsnull,
|
||||
NS_NewXULPrototypeDocument },
|
||||
|
||||
{ "XUL Element Factory",
|
||||
NS_XULELEMENTFACTORY_CID,
|
||||
NS_ELEMENT_FACTORY_CONTRACTID_PREFIX "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
CreateXULElementFactory },
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_MATHML
|
||||
{ "MathML Element Factory",
|
||||
NS_MATHMLELEMENTFACTORY_CID,
|
||||
NS_MATHML_ELEMENT_FACTORY_CONTRACTID,
|
||||
CreateMathMLElementFactory },
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_SVG
|
||||
{ "SVG element factory (deprecated namespace)",
|
||||
NS_SVGELEMENTFACTORY_CID,
|
||||
NS_SVG_DEPRECATED_ELEMENT_FACTORY_CONTRACTID,
|
||||
CreateSVGElementFactory },
|
||||
|
||||
{ "SVG element factory",
|
||||
NS_SVGELEMENTFACTORY_CID,
|
||||
NS_SVG_ELEMENT_FACTORY_CONTRACTID,
|
||||
CreateSVGElementFactory },
|
||||
#endif
|
||||
|
||||
{ "Content HTTP Startup Listener",
|
||||
NS_CONTENTHTTPSTARTUP_CID,
|
||||
NS_CONTENTHTTPSTARTUP_CONTRACTID,
|
||||
nsContentHTTPStartupConstructor,
|
||||
nsContentHTTPStartup::RegisterHTTPStartup,
|
||||
nsContentHTTPStartup::UnregisterHTTPStartup },
|
||||
|
||||
{ "Document Loader Factory",
|
||||
NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID,
|
||||
"@mozilla.org:/content/document-loader-factory;1",
|
||||
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,
|
||||
CreateSyncLoadDOMService }
|
||||
|
||||
};
|
||||
|
||||
NS_IMPL_NSGETMODULE_WITH_CTOR_DTOR(nsContentModule, gComponents, Initialize, Shutdown)
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user