diff --git a/dom/base/Document.cpp b/dom/base/Document.cpp index 8ded875f325c..cc517b9c62c3 100644 --- a/dom/base/Document.cpp +++ b/dom/base/Document.cpp @@ -20265,11 +20265,7 @@ static already_AddRefed CreateHTMLDocument(GlobalObject& aGlobal, /* static */ already_AddRefed Document::ParseHTMLUnsafe( GlobalObject& aGlobal, const TrustedHTMLOrString& aHTML, - const SetHTMLUnsafeOptions& aOptions, nsIPrincipal* aSubjectPrincipal, - ErrorResult& aError) { - // Step 1. Let compliantHTML be the result of invoking the Get Trusted Type - // compliant string algorithm with TrustedHTML, this’s relevant global object, - // html, "Document parseHTMLUnsafe", and "script". + nsIPrincipal* aSubjectPrincipal, ErrorResult& aError) { nsCOMPtr global = do_QueryInterface(aGlobal.GetAsSupports()); constexpr nsLiteralString sink = u"Document parseHTMLUnsafe"_ns; Maybe compliantStringHolder; @@ -20281,50 +20277,16 @@ already_AddRefed Document::ParseHTMLUnsafe( return nullptr; } - // TODO: Always initialize the sanitizer. - bool sanitize = aOptions.mSanitizer.WasPassed(); - - // Step 2. Let document be a new Document, whose content type is "text/html". - // Step 3. Set document’s allow declarative shadow roots to true. - // TODO: Figure out if we can always loadAsData. - RefPtr doc = - CreateHTMLDocument(aGlobal, /* aLoadedAsData */ sanitize, aError); + RefPtr doc = CreateHTMLDocument(aGlobal, false, aError); if (aError.Failed()) { return nullptr; } - // Step 4. Parse HTML from a string given document and compliantHTML. - // TODO(bug 1960845): Investigate the behavior around