Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it's no longer needed. r=timeless sr=jag
This commit is contained in:
Родитель
288cdc7e24
Коммит
329252c847
|
@ -66,7 +66,6 @@ NS_NewDateTime( oeIDateTime** inst )
|
|||
|
||||
oeDateTimeImpl::oeDateTimeImpl()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
m_datetime = icaltime_null_time();
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ oeICalContainerImpl::oeICalContainerImpl()
|
|||
#ifdef ICAL_DEBUG
|
||||
printf( "oeICalContainerImpl::oeICalContainerImpl()\n" );
|
||||
#endif
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
m_batchMode = false;
|
||||
|
||||
|
@ -1326,7 +1325,6 @@ NS_IMPL_ISUPPORTS1(oeFilterDateTime, oeIDateTime)
|
|||
|
||||
oeFilterDateTime::oeFilterDateTime()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
m_datetime = icaltime_null_time();
|
||||
}
|
||||
|
||||
|
|
|
@ -222,7 +222,6 @@ oeICalEventImpl::oeICalEventImpl()
|
|||
#ifdef ICAL_DEBUG
|
||||
printf( "oeICalEventImpl::oeICalEventImpl(): %d\n", ++gEventCount );
|
||||
#endif
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
nsresult rv;
|
||||
if( NS_FAILED( rv = NS_NewDateTime((oeIDateTime**) &m_start ))) {
|
||||
|
@ -2517,7 +2516,6 @@ oeICalEventDisplayImpl::oeICalEventDisplayImpl( oeIICalEvent* event )
|
|||
#ifdef ICAL_DEBUG_ALL
|
||||
printf( "oeICalEventDisplayImpl::oeICalEventDisplayImpl(): %d\n", ++gEventDisplayCount );
|
||||
#endif
|
||||
NS_INIT_ISUPPORTS();
|
||||
nsresult rv;
|
||||
if( event == nsnull ) {
|
||||
mEvent = do_CreateInstance(OE_ICALEVENTDISPLAY_CONTRACTID, &rv);
|
||||
|
|
|
@ -95,7 +95,6 @@ oeEventEnumerator::oeEventEnumerator( )
|
|||
:
|
||||
mCurrentIndex( 0 )
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
oeEventEnumerator::~oeEventEnumerator()
|
||||
|
@ -151,7 +150,6 @@ oeDateEnumerator::oeDateEnumerator( )
|
|||
:
|
||||
mCurrentIndex( 0 )
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
oeDateEnumerator::~oeDateEnumerator()
|
||||
|
@ -237,7 +235,6 @@ oeICalImpl::oeICalImpl()
|
|||
#ifdef ICAL_DEBUG
|
||||
printf( "oeICalImpl::oeICalImpl()\n" );
|
||||
#endif
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
m_batchMode = false;
|
||||
|
||||
|
@ -2046,7 +2043,6 @@ NS_IMPL_ISUPPORTS1(oeICalFilter, oeIICalTodo)
|
|||
|
||||
oeICalFilter::oeICalFilter()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
nsresult rv;
|
||||
if( NS_FAILED( rv = NS_NewDateTime((oeIDateTime**) &m_completed ))) {
|
||||
|
|
|
@ -41,7 +41,6 @@ NS_IMPL_ISUPPORTS1(oeICalStartupHandler, nsICmdLineHandler);
|
|||
|
||||
oeICalStartupHandler::oeICalStartupHandler()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
oeICalStartupHandler::~oeICalStartupHandler()
|
||||
|
|
|
@ -79,7 +79,6 @@ oeICalTodoImpl::oeICalTodoImpl()
|
|||
#ifdef ICAL_DEBUG
|
||||
printf( "oeICalTodoImpl::oeICalTodoImpl()\n" );
|
||||
#endif
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mEvent = new oeICalEventImpl();
|
||||
|
||||
|
|
|
@ -444,7 +444,6 @@ nsAggregatePrincipal::Write(nsIObjectOutputStream* aStream)
|
|||
|
||||
nsAggregatePrincipal::nsAggregatePrincipal() : mCodebaseWasChanged(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsAggregatePrincipal::~nsAggregatePrincipal()
|
||||
|
|
|
@ -220,7 +220,6 @@ nsCertificatePrincipal::Init(const char* aCertificateID)
|
|||
|
||||
nsCertificatePrincipal::nsCertificatePrincipal()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsCertificatePrincipal::~nsCertificatePrincipal()
|
||||
|
|
|
@ -239,7 +239,6 @@ nsCodebasePrincipal::Write(nsIObjectOutputStream* aStream)
|
|||
|
||||
nsCodebasePrincipal::nsCodebasePrincipal() : mTrusted(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
@ -2529,7 +2529,6 @@ nsScriptSecurityManager::nsScriptSecurityManager(void)
|
|||
|
||||
{
|
||||
NS_ASSERTION(sizeof(long) == sizeof(void*), "long and void* have different lengths on this platform. This may cause a security failure.");
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
JSContext* cx = GetSafeJSContext();
|
||||
if (sCallerID == JSVAL_VOID)
|
||||
|
|
|
@ -77,7 +77,6 @@ public:
|
|||
|
||||
nsSecurityNameSet::nsSecurityNameSet()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSecurityNameSet::~nsSecurityNameSet()
|
||||
|
|
|
@ -168,7 +168,6 @@ nsSystemPrincipal::Write(nsIObjectOutputStream* aStream)
|
|||
|
||||
nsSystemPrincipal::nsSystemPrincipal()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -88,7 +88,6 @@ nsresult NS_NewSanitizingHTMLSerializer(nsIContentSerializer** aSerializer)
|
|||
mozSanitizingHTMLSerializer::mozSanitizingHTMLSerializer()
|
||||
: mAllowedTags(30) // Just some initial buffer size
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mOutputString = nsnull;
|
||||
}
|
||||
|
|
|
@ -116,7 +116,6 @@ NS_INTERFACE_MAP_END
|
|||
nsContentAreaDragDrop::nsContentAreaDragDrop ( )
|
||||
: mListenerInstalled(PR_FALSE), mNavigator(nsnull), mOverrideDrag(nsnull), mOverrideDrop(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
} // ctor
|
||||
|
||||
|
||||
|
|
|
@ -362,7 +362,6 @@ nsContentIterator::nsContentIterator() :
|
|||
// don't need to explicitly initialize |nsCOMPtr|s, they will automatically be NULL
|
||||
mCachedIndex(0), mIsDone(PR_FALSE), mPre(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@ static nsIContentList *gCachedContentList;
|
|||
|
||||
nsBaseContentList::nsBaseContentList()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsBaseContentList::~nsBaseContentList()
|
||||
|
@ -223,7 +222,6 @@ nsFormContentList::nsFormContentList(nsIDOMHTMLFormElement *aForm,
|
|||
nsBaseContentList& aContentList)
|
||||
: nsBaseContentList()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
// move elements that belong to mForm into this content list
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ NS_NewContentPolicy(nsIContentPolicy **aResult)
|
|||
*/
|
||||
nsContentPolicy::nsContentPolicy()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsICategoryManager> catman =
|
||||
do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);
|
||||
|
|
|
@ -55,7 +55,6 @@ nsDOMAttribute::nsDOMAttribute(nsIContent* aContent, nsINodeInfo *aNodeInfo,
|
|||
{
|
||||
NS_ABORT_IF_FALSE(mNodeInfo, "We must get a nodeinfo here!");
|
||||
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
// We don't add a reference to our content. It will tell us
|
||||
// to drop our reference when it goes away.
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
nsDOMAttributeMap::nsDOMAttributeMap(nsIContent* aContent)
|
||||
: mContent(aContent)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
// We don't add a reference to our content. If it goes away,
|
||||
// we'll be told to drop our reference
|
||||
}
|
||||
|
|
|
@ -63,7 +63,6 @@ nsDOMBuilder::nsDOMBuilder(PRUint16 aMode,
|
|||
const nsAString& aSchemaType,
|
||||
nsIDOMDOMImplementation* aDOMImplementation)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mDOMImplementation = aDOMImplementation;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ nsDOMDocumentType::nsDOMDocumentType(const nsAString& aName,
|
|||
mSystemId(aSystemId),
|
||||
mInternalSubset(aInternalSubset)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mEntities = aEntities;
|
||||
mNotations = aNotations;
|
||||
|
|
|
@ -164,7 +164,6 @@ struct nsRadioGroupStruct
|
|||
|
||||
nsDOMStyleSheetList::nsDOMStyleSheetList(nsIDocument *aDocument)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mLength = -1;
|
||||
// Not reference counted to avoid circular references.
|
||||
// The document will tell us when its going away.
|
||||
|
@ -328,7 +327,6 @@ NS_NewDOMImplementation(nsIDOMDOMImplementation** aInstancePtrResult)
|
|||
|
||||
nsDOMImplementation::nsDOMImplementation(nsIURI* aBaseURI)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mBaseURI = aBaseURI;
|
||||
}
|
||||
|
||||
|
@ -507,7 +505,6 @@ nsDocument::nsDocument() : mSubDocuments(nsnull),
|
|||
mCSSLoader(nsnull),
|
||||
mXPathDocument(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mArena = nsnull;
|
||||
mDocumentURL = nsnull;
|
||||
|
|
|
@ -182,7 +182,6 @@ NS_INTERFACE_MAP_END
|
|||
|
||||
nsDocumentEncoder::nsDocumentEncoder()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mMimeType.Assign(NS_LITERAL_STRING("text/plain"));
|
||||
|
||||
|
|
|
@ -270,7 +270,6 @@ public:
|
|||
, mGotSelectionState(PR_FALSE)
|
||||
, mSelectionWasCollapsed(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
virtual ~nsDocViewerSelectionListener() {}
|
||||
|
@ -493,7 +492,6 @@ NS_NewDocumentViewer(nsIDocumentViewer** aResult)
|
|||
DocumentViewerImpl::DocumentViewerImpl()
|
||||
: mIsSticky(PR_TRUE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
PrepareToStartLoad();
|
||||
|
||||
mParentWidget = nsnull;
|
||||
|
@ -530,7 +528,6 @@ void DocumentViewerImpl::PrepareToStartLoad()
|
|||
DocumentViewerImpl::DocumentViewerImpl(nsIPresContext* aPresContext)
|
||||
: mPresContext(aPresContext), mAllowPlugins(PR_TRUE), mIsSticky(PR_TRUE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mHintCharsetSource = kCharsetUninitialized;
|
||||
PrepareToStartLoad();
|
||||
}
|
||||
|
@ -3012,7 +3009,6 @@ NS_IMPL_ISUPPORTS1(nsDocViewerFocusListener, nsIDOMFocusListener);
|
|||
nsDocViewerFocusListener::nsDocViewerFocusListener()
|
||||
:mDocViewer(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsDocViewerFocusListener::~nsDocViewerFocusListener(){}
|
||||
|
|
|
@ -111,7 +111,6 @@ NS_NewFrameLoader(nsIFrameLoader **aFrameLoader)
|
|||
nsFrameLoader::nsFrameLoader()
|
||||
: mOwnerContent(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsFrameLoader::~nsFrameLoader()
|
||||
|
|
|
@ -247,7 +247,6 @@ nsGeneratedContentIterator::nsGeneratedContentIterator() :
|
|||
// don't need to explicitly initialize |nsCOMPtr|s, they will automatically be NULL
|
||||
mIsDone(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ nsGenericDOMDataNode::Shutdown()
|
|||
nsGenericDOMDataNode::nsGenericDOMDataNode()
|
||||
: mText(), mDocument(nsnull), mParentPtrBits(0)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsGenericDOMDataNode::~nsGenericDOMDataNode()
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
nsGenericDOMNodeList::nsGenericDOMNodeList()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsGenericDOMNodeList::~nsGenericDOMNodeList()
|
||||
|
|
|
@ -411,7 +411,6 @@ PRUint32 nsDOMEventRTTearoff::mCachedEventTearoffCount = 0;
|
|||
nsDOMEventRTTearoff::nsDOMEventRTTearoff(nsIContent *aContent)
|
||||
: mContent(aContent)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsDOMEventRTTearoff::~nsDOMEventRTTearoff()
|
||||
|
@ -740,7 +739,6 @@ nsGenericElement::nsGenericElement()
|
|||
: mDocument(nsnull), mParent(nsnull), mNodeInfo(nsnull),
|
||||
mFlagsOrSlots(GENERIC_ELEMENT_DOESNT_HAVE_DOMSLOTS)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsGenericElement::~nsGenericElement()
|
||||
|
|
|
@ -235,7 +235,6 @@ class nsNode3Tearoff : public nsIDOM3Node
|
|||
|
||||
nsNode3Tearoff(nsIContent *aContent) : mContent(aContent)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
virtual ~nsNode3Tearoff() {};
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
nsNodeInfo::nsNodeInfo()
|
||||
: nsINodeInfo(), mOwnerManager(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@ nsNodeInfoManager::NodeInfoInnerKeyCompare(const void *key1, const void *key2)
|
|||
nsNodeInfoManager::nsNodeInfoManager()
|
||||
: mDocument(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
if (gNodeManagerCount == 1 && gAnonymousNodeInfoManager) {
|
||||
/*
|
||||
|
|
|
@ -48,7 +48,6 @@ nsPagePrintTimer::nsPagePrintTimer() :
|
|||
mPrintSettings(nsnull),
|
||||
mDelay(0)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsPagePrintTimer::~nsPagePrintTimer()
|
||||
|
|
|
@ -97,7 +97,6 @@ nsresult NS_NewPlainTextSerializer(nsIContentSerializer** aSerializer)
|
|||
nsPlainTextSerializer::nsPlainTextSerializer()
|
||||
: kSpace(NS_LITERAL_STRING(" ")) // Init of "constant"
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mOutputString = nsnull;
|
||||
mInHead = PR_FALSE;
|
||||
|
|
|
@ -273,7 +273,6 @@ nsPrintEngine::nsPrintEngine() :
|
|||
mDebugFile(nsnull)
|
||||
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
|
|
|
@ -43,7 +43,6 @@ nsPrintPreviewListener::nsPrintPreviewListener (nsIDOMEventReceiver* aEVRec)
|
|||
: mEventReceiver(aEVRec),
|
||||
mRegFlags(REG_NONE_LISTENER)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
NS_ADDREF_THIS();
|
||||
} // ctor
|
||||
|
||||
|
|
|
@ -322,7 +322,6 @@ NS_NewRangeUtils(nsIRangeUtils** aResult)
|
|||
|
||||
nsRangeUtils::nsRangeUtils()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsRangeUtils::~nsRangeUtils()
|
||||
|
@ -422,7 +421,6 @@ nsRange::nsRange() :
|
|||
mStartParent(),
|
||||
mEndParent()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsRange::~nsRange()
|
||||
|
|
|
@ -55,7 +55,6 @@ nsScriptEventManager::nsScriptEventManager(nsIDOMDocument *aDocument)
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
rv = aDocument->GetElementsByTagName(NS_LITERAL_STRING("script"),
|
||||
getter_AddRefs(mScriptElements));
|
||||
|
|
|
@ -85,7 +85,6 @@ nsScriptLoadRequest::nsScriptLoadRequest(nsIDOMHTMLScriptElement* aElement,
|
|||
mLoading(PR_TRUE), mWasPending(PR_FALSE),
|
||||
mIsInline(PR_TRUE), mJSVersion(aVersionString), mLineNo(1)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsScriptLoadRequest::~nsScriptLoadRequest()
|
||||
|
@ -125,7 +124,6 @@ nsScriptLoadRequest::FireScriptEvaluated(nsresult aResult)
|
|||
nsScriptLoader::nsScriptLoader()
|
||||
: mDocument(nsnull), mEnabled(PR_TRUE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsScriptLoader::~nsScriptLoader()
|
||||
|
|
|
@ -573,7 +573,6 @@ public:
|
|||
nsAutoScrollTimer()
|
||||
: mSelection(0), mView(0), mPresContext(0), mPoint(0,0), mDelay(30)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
virtual ~nsAutoScrollTimer()
|
||||
|
@ -799,7 +798,6 @@ IsValidSelectionPoint(nsSelection *aFrameSel, nsIContent *aContent)
|
|||
nsSelectionIterator::nsSelectionIterator(nsTypedSelection *aList)
|
||||
:mIndex(0)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
if (!aList)
|
||||
{
|
||||
NS_NOTREACHED("nsSelection");
|
||||
|
@ -947,7 +945,6 @@ nsSelectionIterator::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
|||
|
||||
nsSelection::nsSelection()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
PRInt32 i;
|
||||
for (i = 0;i<nsISelectionController::NUM_SELECTIONTYPES;i++){
|
||||
mDomSelections[i] = nsnull;
|
||||
|
@ -4663,7 +4660,6 @@ nsTypedSelection::nsTypedSelection(nsSelection *aList)
|
|||
mFixupState = PR_FALSE;
|
||||
mDirection = eDirNext;
|
||||
mAutoScrollTimer = nsnull;
|
||||
NS_INIT_ISUPPORTS();
|
||||
mScrollEventPosted = PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -4674,7 +4670,6 @@ nsTypedSelection::nsTypedSelection()
|
|||
mFixupState = PR_FALSE;
|
||||
mDirection = eDirNext;
|
||||
mAutoScrollTimer = nsnull;
|
||||
NS_INIT_ISUPPORTS();
|
||||
mScrollEventPosted = PR_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -152,7 +152,6 @@ nsStyleContext::nsStyleContext(nsIStyleContext* aParent,
|
|||
mRuleNode(aRuleNode),
|
||||
mBits(0)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mNextSibling = this;
|
||||
mPrevSibling = this;
|
||||
|
|
|
@ -390,7 +390,6 @@ StyleSetImpl::StyleSetImpl()
|
|||
,mTimerEnabled(PR_FALSE)
|
||||
#endif
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
if (gInstances++ == 0)
|
||||
{
|
||||
static const char kQuirk_href[] = "resource:/res/quirk.css";
|
||||
|
|
|
@ -168,7 +168,6 @@ protected:
|
|||
|
||||
txLoadListenerProxy::txLoadListenerProxy(nsWeakPtr aParent)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mParent = aParent;
|
||||
}
|
||||
|
||||
|
@ -240,7 +239,6 @@ txLoadListenerProxy::Error(nsIDOMEvent* aEvent)
|
|||
|
||||
nsSyncLoader::nsSyncLoader()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSyncLoader::~nsSyncLoader()
|
||||
|
@ -485,7 +483,6 @@ nsSyncLoader::GetInterface(const nsIID & aIID,
|
|||
|
||||
nsSyncLoadService::nsSyncLoadService()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSyncLoadService::~nsSyncLoadService()
|
||||
|
|
|
@ -57,7 +57,6 @@ nsTextContentChangeData::nsTextContentChangeData()
|
|||
mLength(0),
|
||||
mReplaceLength(0)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsTextContentChangeData::~nsTextContentChangeData()
|
||||
|
|
|
@ -86,7 +86,6 @@ nsTreeWalker::nsTreeWalker(nsIDOMNode *aRoot,
|
|||
mCurrentNode(aRoot),
|
||||
mPossibleIndexesPos(-1)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
NS_ASSERTION(aRoot, "invalid root in call to nsTreeWalker constructor");
|
||||
}
|
||||
|
|
|
@ -76,7 +76,6 @@ nsresult NS_NewXMLContentSerializer(nsIContentSerializer** aSerializer)
|
|||
|
||||
nsXMLContentSerializer::nsXMLContentSerializer()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mPrefixIndex = 0;
|
||||
mInAttribute = PR_FALSE;
|
||||
}
|
||||
|
|
|
@ -1,707 +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()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
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,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() { NS_INIT_ISUPPORTS(); }
|
||||
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_INIT_ISUPPORTS(); }
|
||||
|
||||
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)
|
|
@ -148,7 +148,6 @@ nsDOMEvent::operator delete(void* aPtr)
|
|||
nsDOMEvent::nsDOMEvent(nsIPresContext* aPresContext, nsEvent* aEvent,
|
||||
const nsAString& aEventType)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mPresContext = aPresContext;
|
||||
mEventIsTrusted = PR_FALSE;
|
||||
|
|
|
@ -43,7 +43,6 @@ NS_IMPL_ISUPPORTS1(nsDOMEventGroup, nsIDOMEventGroup)
|
|||
|
||||
nsDOMEventGroup::nsDOMEventGroup()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
/* member initializers and constructor code */
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,6 @@ nsEventListenerManager::nsEventListenerManager()
|
|||
mListenersRemoved = PR_FALSE;
|
||||
|
||||
mTarget = nsnull;
|
||||
NS_INIT_ISUPPORTS();
|
||||
++mInstanceCount;
|
||||
}
|
||||
|
||||
|
|
|
@ -180,7 +180,6 @@ nsEventStateManager::nsEventStateManager()
|
|||
mLeftClickOnly = PR_TRUE;
|
||||
mNormalLMouseEventInProcess = PR_FALSE;
|
||||
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
#ifdef CLICK_HOLD_CONTEXT_MENUS
|
||||
mEventDownWidget = nsnull;
|
||||
|
|
|
@ -44,7 +44,6 @@ nsPrivateTextRange::nsPrivateTextRange(PRUint16 aRangeStart, PRUint16 aRangeEnd,
|
|||
mRangeEnd(aRangeEnd),
|
||||
mRangeType(aRangeType)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsPrivateTextRange::~nsPrivateTextRange(void)
|
||||
|
@ -99,7 +98,6 @@ nsPrivateTextRangeList::nsPrivateTextRangeList(PRUint16 aLength,
|
|||
mLength = 0;
|
||||
}
|
||||
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsPrivateTextRangeList::~nsPrivateTextRangeList(void)
|
||||
|
|
|
@ -257,7 +257,6 @@ NS_NewAttributeContent(nsIContent** aContent)
|
|||
nsAttributeContent::nsAttributeContent()
|
||||
: mText()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mDocument = nsnull;
|
||||
mParent = nsnull;
|
||||
mContent = nsnull;
|
||||
|
|
|
@ -100,7 +100,7 @@ public:
|
|||
mEncoder(aEncoder),
|
||||
mFormProcessor(aFormProcessor),
|
||||
mBidiOptions(aBidiOptions)
|
||||
{ NS_INIT_ISUPPORTS(); };
|
||||
{ };
|
||||
virtual ~nsFormSubmission() { };
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
nsGenericDOMHTMLCollection::nsGenericDOMHTMLCollection()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsGenericDOMHTMLCollection::~nsGenericDOMHTMLCollection()
|
||||
|
|
|
@ -199,7 +199,6 @@ class nsGenericHTMLElementTearoff : public nsIDOMNSHTMLElement,
|
|||
nsGenericHTMLElementTearoff(nsGenericHTMLElement *aElement)
|
||||
: mElement(aElement)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
NS_ADDREF(mElement);
|
||||
}
|
||||
|
||||
|
|
|
@ -140,7 +140,6 @@ protected:
|
|||
|
||||
BodyRule::BodyRule(nsHTMLBodyElement* aPart, nsIHTMLStyleSheet* aSheet)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mPart = aPart;
|
||||
mSheet = aSheet;
|
||||
}
|
||||
|
|
|
@ -1585,7 +1585,6 @@ nsFormControlList::nsFormControlList(nsIDOMHTMLFormElement* aForm)
|
|||
: mForm(aForm),
|
||||
mNameLookupTable(NS_FORM_CONTROL_LIST_HASHTABLE_SIZE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsFormControlList::~nsFormControlList()
|
||||
|
@ -1893,7 +1892,6 @@ NS_IMPL_ISUPPORTS1(nsFormControlEnumerator, nsISimpleEnumerator);
|
|||
nsFormControlEnumerator::nsFormControlEnumerator(nsHTMLFormElement* aForm)
|
||||
: mForm(aForm), mElementsIndex(0), mNotInElementsIndex(0)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
// Create the sorted mNotInElementsSorted array
|
||||
PRInt32 len = aForm->mControls->mNotInElements.Count();
|
||||
|
|
|
@ -2778,7 +2778,7 @@ nsHTMLInputElement::VisitGroup(nsIRadioVisitor* aVisitor)
|
|||
//
|
||||
class nsRadioVisitor : public nsIRadioVisitor {
|
||||
public:
|
||||
nsRadioVisitor() { NS_INIT_ISUPPORTS(); }
|
||||
nsRadioVisitor() { }
|
||||
virtual ~nsRadioVisitor() { };
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
|
|
@ -95,7 +95,6 @@ protected:
|
|||
|
||||
nsHTMLScriptEventHandler::nsHTMLScriptEventHandler(nsIDOMHTMLScriptElement *aOuter)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
// Weak reference...
|
||||
mOuter = aOuter;
|
||||
|
|
|
@ -157,7 +157,6 @@ class nsSelectState : public nsISupports {
|
|||
public:
|
||||
nsSelectState()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
virtual ~nsSelectState()
|
||||
{
|
||||
|
|
|
@ -709,7 +709,6 @@ DummyParserRequest::Create(nsIRequest** aResult, nsIHTMLContentSink* aSink)
|
|||
|
||||
DummyParserRequest::DummyParserRequest(nsIHTMLContentSink* aSink)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
if (gRefCnt++ == 0) {
|
||||
#ifdef DEBUG
|
||||
|
@ -1084,7 +1083,6 @@ NS_NewHTMLElementFactory(nsIElementFactory** aInstancePtrResult)
|
|||
|
||||
nsHTMLElementFactory::nsHTMLElementFactory()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsHTMLElementFactory::~nsHTMLElementFactory()
|
||||
|
@ -2289,7 +2287,6 @@ HTMLContentSink::HTMLContentSink()
|
|||
{
|
||||
// Note: operator new zeros our memory
|
||||
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
if (!gSinkLogModuleInfo) {
|
||||
|
|
|
@ -203,7 +203,6 @@ NS_NewHTMLFragmentContentSink(nsIHTMLFragmentContentSink** aResult)
|
|||
|
||||
nsHTMLFragmentContentSink::nsHTMLFragmentContentSink()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mHitSentinel = PR_FALSE;
|
||||
mSeenBody = PR_TRUE;
|
||||
mRoot = nsnull;
|
||||
|
|
|
@ -131,7 +131,6 @@ public:
|
|||
|
||||
ImageListener::ImageListener(nsImageDocument* aDoc)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mDocument = aDoc;
|
||||
NS_ADDREF(aDoc);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@ nsWyciwygChannel::nsWyciwygChannel()
|
|||
mLoadFlags(LOAD_NORMAL),
|
||||
mIsPending(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsWyciwygChannel::~nsWyciwygChannel()
|
||||
|
|
|
@ -32,7 +32,6 @@ static NS_DEFINE_CID(kSimpleURICID, NS_SIMPLEURI_CID);
|
|||
|
||||
nsWyciwygProtocolHandler::nsWyciwygProtocolHandler()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
#if defined(PR_LOGGING)
|
||||
gWyciwygLog = PR_NewLogModule("nsWyciwygChannel");
|
||||
|
|
|
@ -467,7 +467,6 @@ SheetLoadData::SheetLoadData(CSSLoaderImpl* aLoader,
|
|||
mOwningElement(aOwningElement),
|
||||
mObserver(aObserver)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
NS_PRECONDITION(mLoader, "Must have a loader!");
|
||||
NS_ADDREF(mLoader);
|
||||
|
@ -492,7 +491,6 @@ SheetLoadData::SheetLoadData(CSSLoaderImpl* aLoader,
|
|||
mOwningElement(nsnull),
|
||||
mObserver(aObserver)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
NS_PRECONDITION(mLoader, "Must have a loader!");
|
||||
NS_ADDREF(mLoader);
|
||||
|
@ -523,7 +521,6 @@ SheetLoadData::SheetLoadData(CSSLoaderImpl* aLoader,
|
|||
mOwningElement(nsnull),
|
||||
mObserver(aObserver)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
NS_PRECONDITION(mLoader, "Must have a loader!");
|
||||
NS_ADDREF(mLoader);
|
||||
|
@ -546,7 +543,6 @@ CSSLoaderImpl::CSSLoaderImpl(void)
|
|||
mEnabled(PR_TRUE),
|
||||
mCompatMode(eCompatibility_FullStandards)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
CSSLoaderImpl::~CSSLoaderImpl(void)
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
nsCSSOMFactory::nsCSSOMFactory()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsCSSOMFactory::~nsCSSOMFactory()
|
||||
|
|
|
@ -435,7 +435,6 @@ CSSParserImpl::CSSParserImpl()
|
|||
mGroupStack(nsnull),
|
||||
mParsingCompoundProperty(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -45,7 +45,6 @@ nsCSSRule::nsCSSRule(void)
|
|||
mSheet(nsnull),
|
||||
mParentRule(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsCSSRule::nsCSSRule(const nsCSSRule& aCopy)
|
||||
|
@ -53,7 +52,6 @@ nsCSSRule::nsCSSRule(const nsCSSRule& aCopy)
|
|||
mSheet(aCopy.mSheet),
|
||||
mParentRule(aCopy.mParentRule)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -107,7 +107,6 @@ private:
|
|||
|
||||
CSSGroupRuleRuleListImpl::CSSGroupRuleRuleListImpl(nsICSSGroupRule *aGroupRule)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
// Not reference counted to avoid circular references.
|
||||
// The rule will tell us when its going away.
|
||||
mGroupRule = aGroupRule;
|
||||
|
|
|
@ -967,7 +967,6 @@ CSSImportantRule::CSSImportantRule(nsICSSStyleSheet* aSheet, nsCSSDeclaration* a
|
|||
: mDeclaration(aDeclaration),
|
||||
mSheet(aSheet)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
CSSImportantRule::~CSSImportantRule(void)
|
||||
|
|
|
@ -970,7 +970,6 @@ public:
|
|||
|
||||
CSSRuleListImpl::CSSRuleListImpl(CSSStyleSheetImpl *aStyleSheet)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
// Not reference counted to avoid circular references.
|
||||
// The style sheet will tell us when its going away.
|
||||
mStyleSheet = aStyleSheet;
|
||||
|
@ -1089,7 +1088,6 @@ DOMMediaListImpl::DOMMediaListImpl(nsISupportsArray *aArray,
|
|||
CSSStyleSheetImpl *aStyleSheet)
|
||||
: mArray(aArray), mStyleSheet(aStyleSheet)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
NS_ABORT_IF_FALSE(mArray, "This can't be used without an array!!");
|
||||
}
|
||||
|
@ -1409,7 +1407,6 @@ protected:
|
|||
|
||||
CSSImportsCollectionImpl::CSSImportsCollectionImpl(nsICSSStyleSheet *aStyleSheet)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
// Not reference counted to avoid circular references.
|
||||
// The style sheet will tell us when its going away.
|
||||
mStyleSheet = aStyleSheet;
|
||||
|
@ -1735,7 +1732,6 @@ CSSStyleSheetImpl::CSSStyleSheetImpl()
|
|||
mDirty(PR_FALSE),
|
||||
mRuleProcessors(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mInner = new CSSStyleSheetInner(this);
|
||||
}
|
||||
|
@ -1758,7 +1754,6 @@ CSSStyleSheetImpl::CSSStyleSheetImpl(const CSSStyleSheetImpl& aCopy)
|
|||
mInner(aCopy.mInner),
|
||||
mRuleProcessors(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
mInner->AddSheet(this);
|
||||
|
||||
|
@ -3294,7 +3289,6 @@ CSSRuleProcessor::CSSRuleProcessor(void)
|
|||
: mSheets(nsnull),
|
||||
mRuleCascades(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
static PRBool
|
||||
|
|
|
@ -97,7 +97,6 @@ NS_NewComputedDOMStyle(nsIComputedDOMStyle** aComputedStyle)
|
|||
nsComputedDOMStyle::nsComputedDOMStyle()
|
||||
: mInner(nsnull), mPresShellWeak(nsnull), mT2P(0.0f)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
nsDOMCSSDeclaration::nsDOMCSSDeclaration()
|
||||
: mInner(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsDOMCSSDeclaration::~nsDOMCSSDeclaration()
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* 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/
|
||||
*
|
||||
* 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:
|
||||
* Christopher A. Aillon <christopher@aillon.com>
|
||||
*
|
||||
* Portions created by the Initial Developer are Copyright (C) 2002
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Christopher A. Aillon <christopher@aillon.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 MPL, 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 MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIDOMCSSPrimitiveValue.h"
|
||||
#include "nsDOMCSSRGBColor.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
nsDOMCSSRGBColor::nsDOMCSSRGBColor(nsIDOMCSSPrimitiveValue* aRed,
|
||||
nsIDOMCSSPrimitiveValue* aGreen,
|
||||
nsIDOMCSSPrimitiveValue* aBlue)
|
||||
: mRed(aRed), mGreen(aGreen), mBlue(aBlue)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsDOMCSSRGBColor::~nsDOMCSSRGBColor(void)
|
||||
{
|
||||
}
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMCSSRGBColor)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMRGBColor)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(CSSRGBColor)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_ADDREF(nsDOMCSSRGBColor)
|
||||
NS_IMPL_RELEASE(nsDOMCSSRGBColor)
|
||||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSRGBColor::GetRed(nsIDOMCSSPrimitiveValue** aRed)
|
||||
{
|
||||
NS_ENSURE_TRUE(mRed, NS_ERROR_NOT_INITIALIZED);
|
||||
*aRed = mRed;
|
||||
NS_ADDREF(*aRed);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSRGBColor::GetGreen(nsIDOMCSSPrimitiveValue** aGreen)
|
||||
{
|
||||
NS_ENSURE_TRUE(mGreen, NS_ERROR_NOT_INITIALIZED);
|
||||
*aGreen = mGreen;
|
||||
NS_ADDREF(*aGreen);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSRGBColor::GetBlue(nsIDOMCSSPrimitiveValue** aBlue)
|
||||
{
|
||||
NS_ENSURE_TRUE(mBlue, NS_ERROR_NOT_INITIALIZED);
|
||||
*aBlue = mBlue;
|
||||
NS_ADDREF(*aBlue);
|
||||
return NS_OK;
|
||||
}
|
|
@ -48,7 +48,6 @@ nsDOMCSSRect::nsDOMCSSRect(nsIDOMCSSPrimitiveValue* aTop,
|
|||
nsIDOMCSSPrimitiveValue* aLeft)
|
||||
: mTop(aTop), mRight(aRight), mBottom(aBottom), mLeft(aLeft)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsDOMCSSRect::~nsDOMCSSRect(void)
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
nsDOMCSSValueList::nsDOMCSSValueList(PRBool aCommaDelimited, PRBool aReadonly)
|
||||
: mCommaDelimited(aCommaDelimited), mReadonly(aReadonly)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsDOMCSSValueList::~nsDOMCSSValueList()
|
||||
|
|
|
@ -379,7 +379,6 @@ nsHTMLMappedAttributes::nsHTMLMappedAttributes(void)
|
|||
mRuleMapper(nsnull),
|
||||
mUniqued(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsHTMLMappedAttributes::nsHTMLMappedAttributes(const nsHTMLMappedAttributes& aCopy)
|
||||
|
@ -390,7 +389,6 @@ nsHTMLMappedAttributes::nsHTMLMappedAttributes(const nsHTMLMappedAttributes& aCo
|
|||
mRuleMapper(aCopy.mRuleMapper),
|
||||
mUniqued(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
HTMLAttribute::CopyHTMLAttributes(aCopy.mFirst.mNext, &(mFirst.mNext));
|
||||
}
|
||||
|
|
|
@ -84,7 +84,6 @@ public:
|
|||
CSSFirstLineRule::CSSFirstLineRule(nsIHTMLCSSStyleSheet* aSheet)
|
||||
: mSheet(aSheet)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
CSSFirstLineRule::~CSSFirstLineRule()
|
||||
|
@ -263,7 +262,6 @@ HTMLCSSStyleSheetImpl::HTMLCSSStyleSheetImpl()
|
|||
mFirstLineRule(nsnull),
|
||||
mFirstLetterRule(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
HTMLCSSStyleSheetImpl::~HTMLCSSStyleSheetImpl()
|
||||
|
|
|
@ -111,7 +111,6 @@ protected:
|
|||
HTMLColorRule::HTMLColorRule(nsIHTMLStyleSheet* aSheet)
|
||||
: mSheet(aSheet)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
HTMLColorRule::~HTMLColorRule()
|
||||
|
@ -297,7 +296,6 @@ public:
|
|||
|
||||
GenericTableRule::GenericTableRule(nsIHTMLStyleSheet* aSheet)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mSheet = aSheet;
|
||||
}
|
||||
|
||||
|
@ -832,7 +830,6 @@ HTMLStyleSheetImpl::HTMLStyleSheetImpl(void)
|
|||
mActiveRule(nsnull),
|
||||
mDocumentColorRule(nsnull)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mMappedAttrTable.ops = nsnull;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
|
||||
nsInspectorCSSUtils::nsInspectorCSSUtils()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
nsCSSProps::AddRefTable();
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ nsROCSSPrimitiveValue::nsROCSSPrimitiveValue(float aT2P)
|
|||
: mType(CSS_PX), mT2P(aT2P)
|
||||
{
|
||||
mValue.mTwips = 0;
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -143,7 +143,6 @@ NS_IMPL_ISUPPORTS1(nsFontAlgorithmPrefObserver, nsIObserver)
|
|||
|
||||
nsFontAlgorithmPrefObserver::nsFontAlgorithmPrefObserver()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsFontAlgorithmPrefObserver::~nsFontAlgorithmPrefObserver()
|
||||
|
|
|
@ -86,7 +86,6 @@ protected:
|
|||
|
||||
nsSVGAnimatedLength::nsSVGAnimatedLength()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSVGAnimatedLength::~nsSVGAnimatedLength()
|
||||
|
|
|
@ -85,7 +85,6 @@ protected:
|
|||
|
||||
nsSVGAnimatedRect::nsSVGAnimatedRect()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSVGAnimatedRect::~nsSVGAnimatedRect()
|
||||
|
|
|
@ -86,7 +86,6 @@ protected:
|
|||
|
||||
nsSVGAnimatedTransformList::nsSVGAnimatedTransformList()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSVGAnimatedTransformList::~nsSVGAnimatedTransformList()
|
||||
|
|
|
@ -95,7 +95,6 @@ nsSVGAttribute::nsSVGAttribute(nsINodeInfo* aNodeInfo,
|
|||
mNodeInfo(aNodeInfo),
|
||||
mValue(value)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSVGAttribute::~nsSVGAttribute()
|
||||
|
@ -402,7 +401,6 @@ nsSVGAttribute::GetQualifiedName(nsAString& aQualifiedName)const
|
|||
nsSVGAttributes::nsSVGAttributes(nsIContent* aContent)
|
||||
: mContent(aContent)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ public:
|
|||
|
||||
nsSVGElementFactory::nsSVGElementFactory()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSVGElementFactory::~nsSVGElementFactory()
|
||||
|
|
|
@ -78,7 +78,6 @@ NS_CreateSVGGenericStringValue(const nsAString& aValue,
|
|||
|
||||
nsSVGGenericStringValue::nsSVGGenericStringValue(const nsAString& aValue)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mValue = aValue;
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,6 @@ nsSVGLength::nsSVGLength(float value,
|
|||
mSpecifiedUnitType(unit),
|
||||
mDirection(dir)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsresult nsSVGLength::Init(nsIDOMSVGElement* owner)
|
||||
|
|
|
@ -55,7 +55,6 @@ nsSVGMatrix::nsSVGMatrix(float a, float b, float c,
|
|||
float d, float e, float f)
|
||||
: mA(a), mB(b), mC(c), mD(d), mE(e), mF(f)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -111,7 +111,6 @@ NS_NewSVGPathSegClosePath(nsIDOMSVGPathSeg** result)
|
|||
|
||||
nsSVGPathSegClosePath::nsSVGPathSegClosePath()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -185,7 +184,6 @@ NS_NewSVGPathSegMovetoAbs(nsIDOMSVGPathSeg** result,
|
|||
nsSVGPathSegMovetoAbs::nsSVGPathSegMovetoAbs(float x, float y)
|
||||
: mX(x), mY(y)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -294,7 +292,6 @@ NS_NewSVGPathSegMovetoRel(nsIDOMSVGPathSeg** result,
|
|||
nsSVGPathSegMovetoRel::nsSVGPathSegMovetoRel(float x, float y)
|
||||
: mX(x), mY(y)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -402,7 +399,6 @@ NS_NewSVGPathSegLinetoAbs(nsIDOMSVGPathSeg** result,
|
|||
nsSVGPathSegLinetoAbs::nsSVGPathSegLinetoAbs(float x, float y)
|
||||
: mX(x), mY(y)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -511,7 +507,6 @@ NS_NewSVGPathSegLinetoRel(nsIDOMSVGPathSeg** result,
|
|||
nsSVGPathSegLinetoRel::nsSVGPathSegLinetoRel(float x, float y)
|
||||
: mX(x), mY(y)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -626,7 +621,6 @@ nsSVGPathSegCurvetoCubicAbs::nsSVGPathSegCurvetoCubicAbs(float x, float y,
|
|||
float x2, float y2)
|
||||
: mX(x), mY(y), mX1(x1), mY1(y1), mX2(x2), mY2(y2)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -798,7 +792,6 @@ nsSVGPathSegCurvetoCubicRel::nsSVGPathSegCurvetoCubicRel(float x, float y,
|
|||
float x2, float y2)
|
||||
: mX(x), mY(y), mX1(x1), mY1(y1), mX2(x2), mY2(y2)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -966,7 +959,6 @@ nsSVGPathSegCurvetoQuadraticAbs::nsSVGPathSegCurvetoQuadraticAbs(float x, float
|
|||
float x1, float y1)
|
||||
: mX(x), mY(y), mX1(x1), mY1(y1)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1107,7 +1099,6 @@ nsSVGPathSegCurvetoQuadraticRel::nsSVGPathSegCurvetoQuadraticRel(float x, float
|
|||
float x1, float y1)
|
||||
: mX(x), mY(y), mX1(x1), mY1(y1)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1254,7 +1245,6 @@ nsSVGPathSegArcAbs::nsSVGPathSegArcAbs(float x, float y,
|
|||
: mX(x), mY(y), mR1(r1), mR2(r2), mAngle(angle),
|
||||
mLargeArcFlag(largeArcFlag), mSweepFlag(sweepFlag)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1444,7 +1434,6 @@ nsSVGPathSegArcRel::nsSVGPathSegArcRel(float x, float y,
|
|||
: mX(x), mY(y), mR1(r1), mR2(r2), mAngle(angle),
|
||||
mLargeArcFlag(largeArcFlag), mSweepFlag(sweepFlag)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1623,7 +1612,6 @@ NS_NewSVGPathSegLinetoHorizontalAbs(nsIDOMSVGPathSeg** result, float x)
|
|||
nsSVGPathSegLinetoHorizontalAbs::nsSVGPathSegLinetoHorizontalAbs(float x)
|
||||
: mX(x)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1716,7 +1704,6 @@ NS_NewSVGPathSegLinetoHorizontalRel(nsIDOMSVGPathSeg** result, float x)
|
|||
nsSVGPathSegLinetoHorizontalRel::nsSVGPathSegLinetoHorizontalRel(float x)
|
||||
: mX(x)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1809,7 +1796,6 @@ NS_NewSVGPathSegLinetoVerticalAbs(nsIDOMSVGPathSeg** result, float y)
|
|||
nsSVGPathSegLinetoVerticalAbs::nsSVGPathSegLinetoVerticalAbs(float y)
|
||||
: mY(y)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1902,7 +1888,6 @@ NS_NewSVGPathSegLinetoVerticalRel(nsIDOMSVGPathSeg** result, float y)
|
|||
nsSVGPathSegLinetoVerticalRel::nsSVGPathSegLinetoVerticalRel(float y)
|
||||
: mY(y)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -1999,7 +1984,6 @@ nsSVGPathSegCurvetoCubicSmoothAbs::nsSVGPathSegCurvetoCubicSmoothAbs(float x, fl
|
|||
float x2, float y2)
|
||||
: mX(x), mY(y), mX2(x2), mY2(y2)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -2139,7 +2123,6 @@ nsSVGPathSegCurvetoCubicSmoothRel::nsSVGPathSegCurvetoCubicSmoothRel(float x, fl
|
|||
float x2, float y2)
|
||||
: mX(x), mY(y), mX2(x2), mY2(y2)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -2276,7 +2259,6 @@ NS_NewSVGPathSegCurvetoQuadraticSmoothAbs(nsIDOMSVGPathSeg** result,
|
|||
nsSVGPathSegCurvetoQuadraticSmoothAbs::nsSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y)
|
||||
: mX(x), mY(y)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -2384,7 +2366,6 @@ NS_NewSVGPathSegCurvetoQuadraticSmoothRel(nsIDOMSVGPathSeg** result,
|
|||
nsSVGPathSegCurvetoQuadraticSmoothRel::nsSVGPathSegCurvetoQuadraticSmoothRel(float x, float y)
|
||||
: mX(x), mY(y)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -96,7 +96,6 @@ protected:
|
|||
|
||||
nsSVGPathSegList::nsSVGPathSegList()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSVGPathSegList::~nsSVGPathSegList()
|
||||
|
|
|
@ -52,7 +52,6 @@ nsSVGPoint::Create(float x, float y, nsIDOMSVGPoint** aResult)
|
|||
nsSVGPoint::nsSVGPoint(float x, float y)
|
||||
: mX(x), mY(y)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -69,7 +69,6 @@ nsSVGPointList::Create(nsIDOMSVGPointList** aResult)
|
|||
|
||||
nsSVGPointList::nsSVGPointList()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
nsSVGPointList::~nsSVGPointList()
|
||||
|
|
|
@ -87,7 +87,6 @@ nsSVGRect::Create(nsIDOMSVGRect** result,
|
|||
nsSVGRect::nsSVGRect(float x, float y, float w, float h)
|
||||
: mX(x), mY(y), mWidth(w), mHeight(h)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -234,7 +233,6 @@ nsSVGRectPrototypeWrapper::nsSVGRectPrototypeWrapper(nsIDOMSVGRect* prototype,
|
|||
nsIDOMSVGRect* body)
|
||||
: mPrototype(prototype), mBody(body)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
NS_ASSERTION(mPrototype, "need prototype");
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,6 @@ NS_NewSVGStyleValue(nsISVGStyleValue** aResult)
|
|||
|
||||
nsSVGStyleValue::nsSVGStyleValue()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче