From cd554f1bcffbf82b5103779a8a03c04b87a94677 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 28 Nov 2017 15:55:36 -0500 Subject: [PATCH] Backed out 2 changesets (bug 1387427) for crashtest assertions on a CLOSED TREE. Backed out changeset ae0c53b70e5e (bug 1387427) Backed out changeset 45412efc0aff (bug 1387427) --HG-- extra : amend_source : c44efc692191faa5ad73b1142679f739f52fecfc --- dom/xml/nsXMLContentSink.cpp | 93 +++++++++---------- dom/xml/nsXMLContentSink.h | 8 +- dom/xslt/base/txURIUtils.cpp | 11 ++- dom/xslt/base/txURIUtils.h | 4 +- dom/xslt/nsIDocumentTransformer.h | 6 +- dom/xslt/xslt/txExecutionState.cpp | 15 +-- dom/xslt/xslt/txExecutionState.h | 7 +- dom/xslt/xslt/txMozillaStylesheetCompiler.cpp | 3 +- dom/xslt/xslt/txMozillaTextOutput.cpp | 6 +- dom/xslt/xslt/txMozillaTextOutput.h | 3 +- dom/xslt/xslt/txMozillaXMLOutput.cpp | 6 +- dom/xslt/xslt/txMozillaXMLOutput.h | 2 +- dom/xslt/xslt/txMozillaXSLTProcessor.cpp | 43 +++++---- dom/xslt/xslt/txMozillaXSLTProcessor.h | 7 +- 14 files changed, 100 insertions(+), 114 deletions(-) diff --git a/dom/xml/nsXMLContentSink.cpp b/dom/xml/nsXMLContentSink.cpp index 93b6f259fb0e..1b89883095ed 100644 --- a/dom/xml/nsXMLContentSink.cpp +++ b/dom/xml/nsXMLContentSink.cpp @@ -152,7 +152,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsXMLContentSink, const StackNode& node = tmp->mContentStack.ElementAt(i); cb.NoteXPCOMChild(node.mContent); } - NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocumentChildren) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END // nsIContentSink @@ -294,7 +293,8 @@ nsXMLContentSink::DidBuildModel(bool aTerminated) } } - mXSLTProcessor->SetSourceContentModel(mDocument, mDocumentChildren); + nsCOMPtr currentDOMDoc(do_QueryInterface(mDocument)); + mXSLTProcessor->SetSourceContentModel(currentDOMDoc); // Since the processor now holds a reference to us we drop our reference // to it to avoid owning cycles mXSLTProcessor = nullptr; @@ -358,9 +358,8 @@ NS_IMETHODIMP nsXMLContentSink::OnTransformDone(nsresult aResult, nsIDocument* aResultDocument) { - MOZ_ASSERT(aResultDocument, "Don't notify about transform end without a document."); - - mDocumentChildren.Clear(); + NS_ASSERTION(NS_FAILED(aResult) || aResultDocument, + "Don't notify about transform success without a document."); nsCOMPtr domDoc = do_QueryInterface(aResultDocument); @@ -369,17 +368,28 @@ nsXMLContentSink::OnTransformDone(nsresult aResult, if (NS_FAILED(aResult) && contentViewer) { // Transform failed. - aResultDocument->SetMayStartLayout(false); - // We have an error document. - contentViewer->SetDOMDocument(domDoc); + if (domDoc) { + aResultDocument->SetMayStartLayout(false); + // We have an error document. + contentViewer->SetDOMDocument(domDoc); + } + else { + // We don't have an error document, display the + // untransformed source document. + nsCOMPtr document = do_QueryInterface(mDocument); + contentViewer->SetDOMDocument(document); + } } nsCOMPtr originalDocument = mDocument; - // Transform succeeded, or it failed and we have an error document to display. - mDocument = aResultDocument; - nsCOMPtr htmlDoc = do_QueryInterface(mDocument); - if (htmlDoc) { - htmlDoc->SetDocWriteDisabled(false); + if (NS_SUCCEEDED(aResult) || aResultDocument) { + // Transform succeeded or it failed and we have an error + // document to display. + mDocument = aResultDocument; + nsCOMPtr htmlDoc = do_QueryInterface(mDocument); + if (htmlDoc) { + htmlDoc->SetDocWriteDisabled(false); + } } // Notify document observers that all the content has been stuck @@ -605,17 +615,12 @@ nsXMLContentSink::AddContentAsLeaf(nsIContent *aContent) { nsresult result = NS_OK; - if (mState == eXMLContentSinkState_InProlog) { - NS_ASSERTION(mDocument, "Fragments have no prolog"); - mDocumentChildren.AppendElement(aContent); - } else if (mState == eXMLContentSinkState_InEpilog) { - NS_ASSERTION(mDocument, "Fragments have no epilog"); - if (mXSLTProcessor) { - mDocumentChildren.AppendElement(aContent); - } else { - mDocument->AppendChildTo(aContent, false); - } - } else { + if ((eXMLContentSinkState_InProlog == mState) || + (eXMLContentSinkState_InEpilog == mState)) { + NS_ASSERTION(mDocument, "Fragments have no prolog or epilog"); + mDocument->AppendChildTo(aContent, false); + } + else { nsCOMPtr parent = GetCurrentContent(); if (parent) { @@ -870,20 +875,6 @@ nsXMLContentSink::SetDocElement(int32_t aNameSpaceID, if (mDocElement) return false; - mDocElement = aContent; - - if (mXSLTProcessor) { - mDocumentChildren.AppendElement(aContent); - return true; - } - - if (!mDocumentChildren.IsEmpty()) { - for (nsIContent* child : mDocumentChildren) { - mDocument->AppendChildTo(child, false); - } - mDocumentChildren.Clear(); - } - // check for root elements that needs special handling for // prettyprinting if ((aNameSpaceID == kNameSpaceID_XBL && @@ -902,6 +893,7 @@ nsXMLContentSink::SetDocElement(int32_t aNameSpaceID, } } + mDocElement = aContent; nsresult rv = mDocument->AppendChildTo(mDocElement, NotifyForDocElement()); if (NS_FAILED(rv)) { // If we return false here, the caller will bail out because it won't @@ -1009,17 +1001,17 @@ nsXMLContentSink::HandleStartElement(const char16_t *aName, mInMonolithicContainer++; } - if (!mXSLTProcessor) { - if (content == mDocElement) { - NotifyDocElementCreated(mDocument); + if (content != mDocElement && !mCurrentHead) { + // This isn't the root and we're not inside an XHTML . + // Might need to start layout + MaybeStartLayout(false); + } - if (aInterruptable && NS_SUCCEEDED(result) && mParser && !mParser->IsParserEnabled()) { - return NS_ERROR_HTMLPARSER_BLOCK; - } - } else if (!mCurrentHead) { - // This isn't the root and we're not inside an XHTML . - // Might need to start layout - MaybeStartLayout(false); + if (content == mDocElement) { + NotifyDocElementCreated(mDocument); + + if (aInterruptable && NS_SUCCEEDED(result) && mParser && !mParser->IsParserEnabled()) { + return NS_ERROR_HTMLPARSER_BLOCK; } } @@ -1183,9 +1175,9 @@ nsXMLContentSink::HandleDoctypeDecl(const nsAString & aSubset, nsCOMPtr content = do_QueryInterface(docType); NS_ASSERTION(content, "doctype isn't content?"); - mDocumentChildren.AppendElement(content); + rv = mDocument->AppendChildTo(content, false); DidAddContent(); - return DidProcessATokenImpl(); + return NS_SUCCEEDED(rv) ? DidProcessATokenImpl() : rv; } NS_IMETHODIMP @@ -1335,7 +1327,6 @@ nsXMLContentSink::ReportError(const char16_t* aErrorText, mIsDocumentObserver = false; // Clear the current content - mDocumentChildren.Clear(); nsCOMPtr node(do_QueryInterface(mDocument)); if (node) { for (;;) { diff --git a/dom/xml/nsXMLContentSink.h b/dom/xml/nsXMLContentSink.h index 4b39c08dc829..2347288d1a71 100644 --- a/dom/xml/nsXMLContentSink.h +++ b/dom/xml/nsXMLContentSink.h @@ -139,7 +139,7 @@ protected: void DidAddContent() { - if (!mXSLTProcessor && IsTimeToNotify()) { + if (IsTimeToNotify()) { FlushTags(); } } @@ -191,12 +191,6 @@ protected: nsCOMPtr mXSLTProcessor; - // Holds the children in the prolog until the root element is added, after which they're - // inserted in the document. However, if we're doing an XSLT transform this will - // actually hold all the children of the source document, until the transform is - // finished. After the transform is finished we'll just discard the children. - nsTArray> mDocumentChildren; - static const int NS_ACCUMULATION_BUFFER_SIZE = 4096; // Our currently accumulated text that we have not flushed to a textnode yet. char16_t mText[NS_ACCUMULATION_BUFFER_SIZE]; diff --git a/dom/xslt/base/txURIUtils.cpp b/dom/xslt/base/txURIUtils.cpp index 3f3556f80110..2c0dec942b80 100644 --- a/dom/xslt/base/txURIUtils.cpp +++ b/dom/xslt/base/txURIUtils.cpp @@ -43,9 +43,16 @@ void URIUtils::resolveHref(const nsAString& href, const nsAString& base, // static void -URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode) +URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsIDOMNode *aSourceNode) { - nsCOMPtr sourceDoc = aSourceNode->OwnerDoc(); + nsCOMPtr node = do_QueryInterface(aSourceNode); + if (!node) { + // XXXbz passing nullptr as the first arg to Reset is illegal + aNewDoc->Reset(nullptr, nullptr); + return; + } + + nsCOMPtr sourceDoc = node->OwnerDoc(); nsIPrincipal* sourcePrincipal = sourceDoc->NodePrincipal(); // Copy the channel and loadgroup from the source document. diff --git a/dom/xslt/base/txURIUtils.h b/dom/xslt/base/txURIUtils.h index ad182a00a795..ca38538a8b82 100644 --- a/dom/xslt/base/txURIUtils.h +++ b/dom/xslt/base/txURIUtils.h @@ -9,7 +9,7 @@ #include "txCore.h" class nsIDocument; -class nsINode; +class nsIDOMNode; /** * A utility class for URI handling @@ -22,7 +22,7 @@ public: /** * Reset the given document with the document of the source node */ - static void ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode); + static void ResetWithSource(nsIDocument *aNewDoc, nsIDOMNode *aSourceNode); /** * Resolves the given href argument, using the given documentBase diff --git a/dom/xslt/nsIDocumentTransformer.h b/dom/xslt/nsIDocumentTransformer.h index 470af2d0408a..7b838dbd8f92 100644 --- a/dom/xslt/nsIDocumentTransformer.h +++ b/dom/xslt/nsIDocumentTransformer.h @@ -8,12 +8,9 @@ #include "nsISupports.h" #include "nsStringFwd.h" -template class nsCOMPtr; -class nsIContent; class nsIDocument; class nsIDOMNode; class nsIURI; -template class nsTArray; #define NS_ITRANSFORMOBSERVER_IID \ { 0x04b2d17c, 0xe98d, 0x45f5, \ @@ -46,8 +43,7 @@ public: NS_IMETHOD SetTransformObserver(nsITransformObserver* aObserver) = 0; NS_IMETHOD LoadStyleSheet(nsIURI* aUri, nsIDocument* aLoaderDocument) = 0; - NS_IMETHOD SetSourceContentModel(nsIDocument* aDocument, - const nsTArray>& aSource) = 0; + NS_IMETHOD SetSourceContentModel(nsIDOMNode* aSource) = 0; NS_IMETHOD CancelLoads() = 0; NS_IMETHOD AddXSLTParamNamespace(const nsString& aPrefix, diff --git a/dom/xslt/xslt/txExecutionState.cpp b/dom/xslt/xslt/txExecutionState.cpp index 9406547c21f4..f31d6fd04cda 100644 --- a/dom/xslt/xslt/txExecutionState.cpp +++ b/dom/xslt/xslt/txExecutionState.cpp @@ -17,9 +17,9 @@ const int32_t txExecutionState::kMaxRecursionDepth = 20000; nsresult -txLoadedDocumentsHash::init(const txXPathNode& aSource) +txLoadedDocumentsHash::init(txXPathNode* aSourceDocument) { - mSourceDocument = txXPathNodeUtils::getOwnerDocument(aSource); + mSourceDocument = aSourceDocument; nsAutoString baseURI; nsresult rv = txXPathNodeUtils::getBaseURI(*mSourceDocument, baseURI); @@ -27,14 +27,7 @@ txLoadedDocumentsHash::init(const txXPathNode& aSource) return rv; } - // Technically the hash holds documents, but we allow a document fragment too in case - // we're transforming from one. In particular, the document() function uses this hash - // and it can return the source document, but if we're transforming from a fragment it - // makes more sense to return the real root of the source tree which is the fragment. - MOZ_ASSERT(txXPathNodeUtils::getNodeType(aSource) == txXPathNodeType::DOCUMENT_NODE || - txXPathNodeUtils::getNodeType(aSource) == txXPathNodeType::DOCUMENT_FRAGMENT_NODE); - - PutEntry(baseURI)->mDocument = txXPathNativeNode::createXPathNode(txXPathNativeNode::getNode(aSource)); + PutEntry(baseURI)->mDocument = mSourceDocument; return NS_OK; } @@ -123,7 +116,7 @@ txExecutionState::init(const txXPathNode& aNode, mOutputHandler->startDocument(); // Set up loaded-documents-hash - rv = mLoadedDocuments.init(aNode); + rv = mLoadedDocuments.init(txXPathNodeUtils::getOwnerDocument(aNode)); NS_ENSURE_SUCCESS(rv, rv); // Init members diff --git a/dom/xslt/xslt/txExecutionState.h b/dom/xslt/xslt/txExecutionState.h index 1a2da00d4822..01d6251bacb3 100644 --- a/dom/xslt/xslt/txExecutionState.h +++ b/dom/xslt/xslt/txExecutionState.h @@ -56,15 +56,16 @@ class txLoadedDocumentsHash : public nsTHashtable { public: txLoadedDocumentsHash() - : nsTHashtable(4) + : nsTHashtable(4), + mSourceDocument(nullptr) { } ~txLoadedDocumentsHash(); - MOZ_MUST_USE nsresult init(const txXPathNode& aSource); + MOZ_MUST_USE nsresult init(txXPathNode* aSourceDocument); private: friend class txExecutionState; - nsAutoPtr mSourceDocument; + txXPathNode* mSourceDocument; }; diff --git a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp index e57de68da8ef..eaf27c3a4e42 100644 --- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp +++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp @@ -630,7 +630,8 @@ txSyncCompileObserver::loadURI(const nsAString& aUri, // make sense. nsCOMPtr source; if (mProcessor) { - source = mProcessor->GetSourceContentModel(); + source = + do_QueryInterface(mProcessor->GetSourceContentModel()); } nsAutoSyncOperation sync(source ? source->OwnerDoc() : nullptr); nsCOMPtr document; diff --git a/dom/xslt/xslt/txMozillaTextOutput.cpp b/dom/xslt/xslt/txMozillaTextOutput.cpp index db65131ee8c5..d25bfc0b18ac 100644 --- a/dom/xslt/xslt/txMozillaTextOutput.cpp +++ b/dom/xslt/xslt/txMozillaTextOutput.cpp @@ -121,7 +121,7 @@ txMozillaTextOutput::startDocument() } nsresult -txMozillaTextOutput::createResultDocument(nsIDocument* aSourceDocument, +txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument, bool aLoadedAsData) { /* @@ -148,9 +148,11 @@ txMozillaTextOutput::createResultDocument(nsIDocument* aSourceDocument, MOZ_ASSERT(mDocument->GetReadyStateEnum() == nsIDocument::READYSTATE_UNINITIALIZED, "Bad readyState"); mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_LOADING); + nsCOMPtr source = do_QueryInterface(aSourceDocument); + NS_ENSURE_STATE(source); bool hasHadScriptObject = false; nsIScriptGlobalObject* sgo = - aSourceDocument->GetScriptHandlingObject(hasHadScriptObject); + source->GetScriptHandlingObject(hasHadScriptObject); NS_ENSURE_STATE(sgo || !hasHadScriptObject); NS_ASSERTION(mDocument, "Need document"); diff --git a/dom/xslt/xslt/txMozillaTextOutput.h b/dom/xslt/xslt/txMozillaTextOutput.h index e1c84640e65d..4520dce3921d 100644 --- a/dom/xslt/xslt/txMozillaTextOutput.h +++ b/dom/xslt/xslt/txMozillaTextOutput.h @@ -11,6 +11,7 @@ #include "nsWeakPtr.h" #include "txOutputFormat.h" +class nsIDOMDocument; class nsIDOMDocumentFragment; class nsITransformObserver; class nsIDocument; @@ -26,7 +27,7 @@ public: TX_DECL_TXAXMLEVENTHANDLER TX_DECL_TXAOUTPUTXMLEVENTHANDLER - nsresult createResultDocument(nsIDocument* aSourceDocument, + nsresult createResultDocument(nsIDOMDocument* aSourceDocument, bool aLoadedAsData); private: diff --git a/dom/xslt/xslt/txMozillaXMLOutput.cpp b/dom/xslt/xslt/txMozillaXMLOutput.cpp index f69b8185629e..e3e1b8d75df4 100644 --- a/dom/xslt/xslt/txMozillaXMLOutput.cpp +++ b/dom/xslt/xslt/txMozillaXMLOutput.cpp @@ -777,7 +777,7 @@ void txMozillaXMLOutput::processHTTPEquiv(nsAtom* aHeader, const nsString& aValu nsresult txMozillaXMLOutput::createResultDocument(const nsAString& aName, int32_t aNsID, - nsIDocument* aSourceDocument, + nsIDOMDocument* aSourceDocument, bool aLoadedAsData) { nsresult rv; @@ -800,9 +800,11 @@ txMozillaXMLOutput::createResultDocument(const nsAString& aName, int32_t aNsID, nsIDocument::READYSTATE_UNINITIALIZED, "Bad readyState"); mDocument->SetReadyStateInternal(nsIDocument::READYSTATE_LOADING); mDocument->SetMayStartLayout(false); + nsCOMPtr source = do_QueryInterface(aSourceDocument); + NS_ENSURE_STATE(source); bool hasHadScriptObject = false; nsIScriptGlobalObject* sgo = - aSourceDocument->GetScriptHandlingObject(hasHadScriptObject); + source->GetScriptHandlingObject(hasHadScriptObject); NS_ENSURE_STATE(sgo || !hasHadScriptObject); mCurrentNode = mDocument; diff --git a/dom/xslt/xslt/txMozillaXMLOutput.h b/dom/xslt/xslt/txMozillaXMLOutput.h index 7cc1beb076e9..e748e3f284e1 100644 --- a/dom/xslt/xslt/txMozillaXMLOutput.h +++ b/dom/xslt/xslt/txMozillaXMLOutput.h @@ -73,7 +73,7 @@ public: nsresult closePrevious(bool aFlushText); nsresult createResultDocument(const nsAString& aName, int32_t aNsID, - nsIDocument* aSourceDocument, + nsIDOMDocument* aSourceDocument, bool aLoadedAsData); private: diff --git a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp index fd7f26f2c336..8267383e1a69 100644 --- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp +++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp @@ -50,7 +50,7 @@ class txToDocHandlerFactory : public txAOutputHandlerFactory { public: txToDocHandlerFactory(txExecutionState* aEs, - nsIDocument* aSourceDocument, + nsIDOMDocument* aSourceDocument, nsITransformObserver* aObserver, bool aDocumentIsData) : mEs(aEs), mSourceDocument(aSourceDocument), mObserver(aObserver), @@ -62,7 +62,7 @@ public: private: txExecutionState* mEs; - nsCOMPtr mSourceDocument; + nsCOMPtr mSourceDocument; nsCOMPtr mObserver; bool mDocumentIsData; }; @@ -377,27 +377,15 @@ txMozillaXSLTProcessor::SetTransformObserver(nsITransformObserver* aObserver) } nsresult -txMozillaXSLTProcessor::SetSourceContentModel(nsIDocument* aDocument, - const nsTArray>& aSource) +txMozillaXSLTProcessor::SetSourceContentModel(nsIDOMNode* aSourceDOM) { + mSource = aSourceDOM; + if (NS_FAILED(mTransformResult)) { notifyError(); return NS_OK; } - mSource = aDocument->CreateDocumentFragment(); - - ErrorResult rv; - for (nsIContent* child : aSource) { - // XPath data model doesn't have DocumentType nodes. - if (child->NodeType() != nsIDOMNode::DOCUMENT_TYPE_NODE) { - mSource->AppendChild(*child, rv); - if (rv.Failed()) { - return rv.StealNSResult(); - } - } - } - if (mStylesheet) { return DoTransform(); } @@ -564,7 +552,8 @@ public: ~nsTransformBlockerEvent() { - nsCOMPtr document = mProcessor->GetSourceContentModel()->OwnerDoc(); + nsCOMPtr document = + do_QueryInterface(mProcessor->GetSourceContentModel()); document->UnblockOnload(true); } @@ -583,9 +572,13 @@ txMozillaXSLTProcessor::DoTransform() NS_ASSERTION(mObserver, "no observer"); NS_ASSERTION(NS_IsMainThread(), "should only be on main thread"); + nsresult rv; + nsCOMPtr document = do_QueryInterface(mSource, &rv); + NS_ENSURE_SUCCESS(rv, rv); + nsCOMPtr event = new nsTransformBlockerEvent(this); - mSource->OwnerDoc()->BlockOnload(); - nsresult rv = NS_DispatchToCurrentThread(event); + document->BlockOnload(); + rv = NS_DispatchToCurrentThread(event); if (NS_FAILED(rv)) { // XXX Maybe we should just display the source document in this case? // Also, set up context information, see bug 204655. @@ -650,7 +643,7 @@ txMozillaXSLTProcessor::TransformToDocument(nsIDOMNode *aSource, nsresult rv = ensureStylesheet(); NS_ENSURE_SUCCESS(rv, rv); - mSource = do_QueryInterface(aSource); + mSource = aSource; return TransformToDoc(aResult, true); } @@ -664,12 +657,18 @@ txMozillaXSLTProcessor::TransformToDoc(nsIDOMDocument **aResult, return NS_ERROR_OUT_OF_MEMORY; } + nsCOMPtr sourceDOMDocument; + mSource->GetOwnerDocument(getter_AddRefs(sourceDOMDocument)); + if (!sourceDOMDocument) { + sourceDOMDocument = do_QueryInterface(mSource); + } + txExecutionState es(mStylesheet, IsLoadDisabled()); // XXX Need to add error observers // If aResult is non-null, we're a data document - txToDocHandlerFactory handlerFactory(&es, mSource->OwnerDoc(), mObserver, + txToDocHandlerFactory handlerFactory(&es, sourceDOMDocument, mObserver, aCreateDataDocument); es.mOutputHandlerFactory = &handlerFactory; diff --git a/dom/xslt/xslt/txMozillaXSLTProcessor.h b/dom/xslt/xslt/txMozillaXSLTProcessor.h index b3c5420d6fee..569ca7adbf6e 100644 --- a/dom/xslt/xslt/txMozillaXSLTProcessor.h +++ b/dom/xslt/xslt/txMozillaXSLTProcessor.h @@ -75,8 +75,7 @@ public: // nsIDocumentTransformer interface NS_IMETHOD SetTransformObserver(nsITransformObserver* aObserver) override; NS_IMETHOD LoadStyleSheet(nsIURI* aUri, nsIDocument* aLoaderDocument) override; - NS_IMETHOD SetSourceContentModel(nsIDocument* aDocument, - const nsTArray>& aSource) override; + NS_IMETHOD SetSourceContentModel(nsIDOMNode* aSource) override; NS_IMETHOD CancelLoads() override {return NS_OK;} NS_IMETHOD AddXSLTParamNamespace(const nsString& aPrefix, const nsString& aNamespace) override; @@ -137,7 +136,7 @@ public: void reportError(nsresult aResult, const char16_t *aErrorText, const char16_t *aSourceText); - nsINode *GetSourceContentModel() + nsIDOMNode *GetSourceContentModel() { return mSource; } @@ -170,7 +169,7 @@ private: nsIDocument* mStylesheetDocument; // weak nsCOMPtr mEmbeddedStylesheetRoot; - nsCOMPtr mSource; + nsCOMPtr mSource; nsresult mTransformResult; nsresult mCompileResult; nsString mErrorText, mSourceText;