Bug 1446599 part 3. Stop using nsIDOMProcessingInstruction in the XML content sink. r=mystor

MozReview-Commit-ID: 2v2aA37nYfH
This commit is contained in:
Boris Zbarsky 2018-03-19 15:15:40 -04:00
parent aa152ba529
commit b02b40a9e7

View File

@ -42,7 +42,6 @@
#include "nsIContentPolicy.h"
#include "nsContentPolicyUtils.h"
#include "nsError.h"
#include "nsIDOMProcessingInstruction.h"
#include "nsNodeUtils.h"
#include "nsIScriptGlobalObject.h"
#include "nsIHTMLDocument.h"
@ -217,7 +216,7 @@ nsXMLContentSink::MaybePrettyPrint()
}
static void
CheckXSLTParamPI(nsIDOMProcessingInstruction* aPi,
CheckXSLTParamPI(ProcessingInstruction* aPi,
nsIDocumentTransformer* aProcessor,
nsIDocument* aDocument)
{
@ -281,8 +280,7 @@ nsXMLContentSink::DidBuildModel(bool aTerminated)
for (nsIContent* child = mDocument->GetFirstChild();
child;
child = child->GetNextSibling()) {
if (child->IsNodeOfType(nsINode::ePROCESSING_INSTRUCTION)) {
nsCOMPtr<nsIDOMProcessingInstruction> pi = do_QueryInterface(child);
if (auto pi = ProcessingInstruction::FromContent(child)) {
CheckXSLTParamPI(pi, mXSLTProcessor, mDocument);
}
else if (child->IsElement()) {