diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-01-09 10:18:01 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-01-09 17:27:39 +0000 |
commit | 4f2355075cb7d2fa586e85d307bc9b1a6b9209d1 (patch) | |
tree | f6b6d5e597dde12d782c24f528a18adec35eaff0 | |
parent | e71d63f65ed84aeb869b369ee472b1dea2ec88f4 (diff) | |
download | qtwebengine-chromium-4f2355075cb7d2fa586e85d307bc9b1a6b9209d1.tar.gz |
FIXUP: Extend url library for WebEngine custom schemes
Re-enable custom scheme handling like for Android webview
Change-Id: Icebfb1d96042e49b4923ea81ddbff1d5a3477337
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
-rw-r--r-- | chromium/content/common/url_schemes.cc | 2 | ||||
-rw-r--r-- | chromium/content/public/common/content_client.h | 4 | ||||
-rw-r--r-- | chromium/url/origin.cc | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/chromium/content/common/url_schemes.cc b/chromium/content/common/url_schemes.cc index c324ec2f935..d1ac151beaf 100644 --- a/chromium/content/common/url_schemes.cc +++ b/chromium/content/common/url_schemes.cc @@ -91,7 +91,7 @@ void RegisterContentSchemes(bool lock_schemes) { for (auto& scheme : schemes.empty_document_schemes) url::AddEmptyDocumentScheme(scheme.c_str()); -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(TOOLKIT_QT) if (schemes.allow_non_standard_schemes_in_origins) url::EnableNonStandardSchemesForAndroidWebView(); #endif diff --git a/chromium/content/public/common/content_client.h b/chromium/content/public/common/content_client.h index 618a328b476..4da5d9bada7 100644 --- a/chromium/content/public/common/content_client.h +++ b/chromium/content/public/common/content_client.h @@ -139,10 +139,10 @@ class CONTENT_EXPORT ContentClient { // Registers a URL scheme as strictly empty documents, allowing them to // commit synchronously. std::vector<std::string> empty_document_schemes; -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(TOOLKIT_QT) // Normally, non-standard schemes canonicalize to opaque origins. However, // Android WebView requires non-standard schemes to still be preserved. - bool allow_non_standard_schemes_in_origins = false; + bool allow_non_standard_schemes_in_origins = true; #endif }; diff --git a/chromium/url/origin.cc b/chromium/url/origin.cc index d470fa34168..9dab59eb73c 100644 --- a/chromium/url/origin.cc +++ b/chromium/url/origin.cc @@ -42,7 +42,7 @@ Origin Origin::Create(const GURL& url) { // It's SchemeHostPort's responsibility to filter out unrecognized schemes; // sanity check that this is happening. - DCHECK(tuple.IsInvalid() || url.IsStandard() || + DCHECK(tuple.IsInvalid() || url.IsStandard() || url.IsCustom() || base::ContainsValue(GetLocalSchemes(), url.scheme_piece()) || AllowNonStandardSchemesForAndroidWebView()); } |