Bug 1445140 part 1. Remove the XPCOM-ish version of NS_NewDOMDocumentType. r=mystor

MozReview-Commit-ID: 6sEFIfMgqet
This commit is contained in:
Boris Zbarsky
2018-03-13 16:24:01 -04:00
parent 12bde0a333
commit f65a0fdfbc
7 changed files with 36 additions and 89 deletions

View File

@@ -23,7 +23,6 @@
#include "nsIDOMHTMLFormElement.h"
#include "nsIFormControl.h"
#include "nsIStyleSheetLinkingElement.h"
#include "nsIDOMDocumentType.h"
#include "nsIObserverService.h"
#include "mozilla/Services.h"
#include "nsIMutationObserver.h"
@@ -31,6 +30,7 @@
#include "nsIServiceManager.h"
#include "nsEscape.h"
#include "mozilla/dom/Comment.h"
#include "mozilla/dom/DocumentType.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLImageElement.h"
#include "mozilla/dom/HTMLTemplateElement.h"
@@ -736,16 +736,13 @@ nsHtml5TreeOperation::AppendDoctypeToDocument(nsAtom* aName,
{
// Adapted from nsXMLContentSink
// Create a new doctype node
nsCOMPtr<nsIDOMDocumentType> docType;
NS_NewDOMDocumentType(getter_AddRefs(docType),
aBuilder->GetNodeInfoManager(),
aName,
aPublicId,
aSystemId,
VoidString());
NS_ASSERTION(docType, "Doctype creation failed.");
nsCOMPtr<nsIContent> asContent = do_QueryInterface(docType);
return AppendToDocument(asContent, aBuilder);
RefPtr<dom::DocumentType> docType =
NS_NewDOMDocumentType(aBuilder->GetNodeInfoManager(),
aName,
aPublicId,
aSystemId,
VoidString());
return AppendToDocument(docType, aBuilder);
}
nsIContent*