diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-16 11:45:35 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-07-17 08:59:23 +0000 |
commit | 552906b0f222c5d5dd11b9fd73829d510980461a (patch) | |
tree | 3a11e6ed0538a81dd83b20cf3a4783e297f26d91 /chromium/third_party/blink/renderer/core/xml/dom_parser.cc | |
parent | 1b05827804eaf047779b597718c03e7d38344261 (diff) | |
download | qtwebengine-chromium-552906b0f222c5d5dd11b9fd73829d510980461a.tar.gz |
BASELINE: Update Chromium to 83.0.4103.122
Change-Id: Ie3a82f5bb0076eec2a7c6a6162326b4301ee291e
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/xml/dom_parser.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/xml/dom_parser.cc | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/chromium/third_party/blink/renderer/core/xml/dom_parser.cc b/chromium/third_party/blink/renderer/core/xml/dom_parser.cc index 996234e7538..c03568e633e 100644 --- a/chromium/third_party/blink/renderer/core/xml/dom_parser.cc +++ b/chromium/third_party/blink/renderer/core/xml/dom_parser.cc @@ -18,36 +18,22 @@ */ #include "third_party/blink/renderer/core/xml/dom_parser.h" -#include "third_party/blink/renderer/bindings/core/v8/string_or_trusted_html.h" #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/dom/document_init.h" #include "third_party/blink/renderer/core/dom/dom_implementation.h" -#include "third_party/blink/renderer/core/trustedtypes/trusted_types_util.h" #include "third_party/blink/renderer/platform/runtime_enabled_features.h" #include "third_party/blink/renderer/platform/weborigin/security_origin.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" namespace blink { -Document* DOMParser::parseFromString(const StringOrTrustedHTML& stringOrHTML, - const String& type, - ExceptionState& exception_state) { - String value = GetStringFromTrustedHTML(stringOrHTML, context_document_, - exception_state); - if (!exception_state.HadException()) { - return parseFromStringInternal(value, type); - } - return nullptr; -} - -Document* DOMParser::parseFromStringInternal(const String& str, - const String& type) { +Document* DOMParser::parseFromString(const String& str, const String& type) { Document* doc = DOMImplementation::createDocument( - type, DocumentInit::Create() + .WithTypeFrom(type) .WithContextDocument(context_document_) - .WithOwnerDocument(context_document_), - false); + .WithOwnerDocument(context_document_) + .WithContentSecurityPolicyFromContextDoc()); doc->SetContent(str); doc->SetMimeType(AtomicString(type)); if (context_document_) { @@ -59,9 +45,13 @@ Document* DOMParser::parseFromStringInternal(const String& str, DOMParser::DOMParser(Document& document) : context_document_(document.ContextDocument()) {} -void DOMParser::Trace(blink::Visitor* visitor) { +void DOMParser::Trace(Visitor* visitor) { visitor->Trace(context_document_); ScriptWrappable::Trace(visitor); } +Document* DOMParser::GetDocument() const { + return context_document_.Get(); +} + } // namespace blink |