diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-24 11:30:15 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-10-30 12:56:19 +0000 |
commit | 6036726eb981b6c4b42047513b9d3f4ac865daac (patch) | |
tree | 673593e70678e7789766d1f732eb51f613a2703b /chromium/third_party/blink/renderer/core/xml | |
parent | 466052c4e7c052268fd931888cd58961da94c586 (diff) | |
download | qtwebengine-chromium-6036726eb981b6c4b42047513b9d3f4ac865daac.tar.gz |
BASELINE: Update Chromium to 70.0.3538.78
Change-Id: Ie634710bf039e26c1957f4ae45e101bd4c434ae7
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/xml')
5 files changed, 14 insertions, 17 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 b322ad3ac99..5b9e53b5a97 100644 --- a/chromium/third_party/blink/renderer/core/xml/dom_parser.cc +++ b/chromium/third_party/blink/renderer/core/xml/dom_parser.cc @@ -32,21 +32,12 @@ namespace blink { Document* DOMParser::parseFromString(const StringOrTrustedHTML& stringOrHTML, const String& type, ExceptionState& exception_state) { - DCHECK(stringOrHTML.IsString() || - RuntimeEnabledFeatures::TrustedDOMTypesEnabled()); - DCHECK(!stringOrHTML.IsNull()); - if (context_document_ && stringOrHTML.IsString() && - context_document_->RequireTrustedTypes()) { - exception_state.ThrowTypeError( - "This document requires `TrustedHTML` assignment."); - return nullptr; + String value = + TrustedHTML::GetString(stringOrHTML, context_document_, exception_state); + if (!exception_state.HadException()) { + return parseFromStringInternal(value, type); } - - String valueString = stringOrHTML.IsString() - ? stringOrHTML.GetAsString() - : stringOrHTML.GetAsTrustedHTML()->toString(); - - return parseFromStringInternal(valueString, type); + return nullptr; } Document* DOMParser::parseFromStringInternal(const String& str, diff --git a/chromium/third_party/blink/renderer/core/xml/xpath_parser.h b/chromium/third_party/blink/renderer/core/xml/xpath_parser.h index e245e40d55c..5880f2a21f3 100644 --- a/chromium/third_party/blink/renderer/core/xml/xpath_parser.h +++ b/chromium/third_party/blink/renderer/core/xml/xpath_parser.h @@ -46,6 +46,8 @@ class Parser; struct Token { STACK_ALLOCATED(); + + public: int type; String str; Step::Axis axis; diff --git a/chromium/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc b/chromium/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc index bf18794d9a6..59349d62453 100644 --- a/chromium/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc +++ b/chromium/third_party/blink/renderer/core/xml/xsl_style_sheet_libxslt.cc @@ -227,7 +227,8 @@ void XSLStyleSheet::LoadChildSheet(const String& href) { fetch_options.initiator_info.name = FetchInitiatorTypeNames::xml; FetchParameters params( ResourceRequest(OwnerDocument()->CompleteURL(url_string)), fetch_options); - params.SetOriginRestriction(FetchParameters::kRestrictToSameOrigin); + params.MutableResourceRequest().SetFetchRequestMode( + network::mojom::FetchRequestMode::kSameOrigin); XSLStyleSheetResource* resource = XSLStyleSheetResource::FetchSynchronously( params, OwnerDocument()->Fetcher()); if (!resource->Sheet()) diff --git a/chromium/third_party/blink/renderer/core/xml/xslt_processor.cc b/chromium/third_party/blink/renderer/core/xml/xslt_processor.cc index b59f7fc0cff..c421ca1189f 100644 --- a/chromium/third_party/blink/renderer/core/xml/xslt_processor.cc +++ b/chromium/third_party/blink/renderer/core/xml/xslt_processor.cc @@ -70,7 +70,11 @@ Document* XSLTProcessor::CreateDocumentFromSource( if (owner_document == source_node) url = owner_document->Url(); - DocumentInit init = DocumentInit::Create().WithFrame(frame).WithURL(url); + DocumentInit init = + DocumentInit::Create() + .WithDocumentLoader(frame ? frame->Loader().GetDocumentLoader() + : nullptr) + .WithURL(url); String document_source = source_string; bool force_xhtml = source_mime_type == "text/plain"; diff --git a/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc index bb879481ed5..1a0862042a4 100644 --- a/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc +++ b/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc @@ -109,7 +109,6 @@ static xmlDocPtr DocLoaderFunc(const xmlChar* uri, ResourceLoaderOptions fetch_options; fetch_options.initiator_info.name = FetchInitiatorTypeNames::xml; FetchParameters params(ResourceRequest(url), fetch_options); - params.SetOriginRestriction(FetchParameters::kRestrictToSameOrigin); params.MutableResourceRequest().SetFetchRequestMode( network::mojom::FetchRequestMode::kSameOrigin); Resource* resource = |