summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
m---------src/3rdparty0
-rw-r--r--src/buildtools/config/common.pri1
-rw-r--r--src/buildtools/config/linux.pri5
-rw-r--r--src/buildtools/config/mac_osx.pri3
-rw-r--r--src/buildtools/configure.json85
-rw-r--r--src/core/browser_accessibility_qt.cpp24
-rw-r--r--src/core/certificate_error_controller.cpp9
-rw-r--r--src/core/certificate_error_controller.h3
-rw-r--r--src/core/certificate_error_controller_p.h4
-rw-r--r--src/core/content_browser_client_qt.cpp127
-rw-r--r--src/core/content_browser_client_qt.h17
-rw-r--r--src/core/content_client_qt.cpp6
-rw-r--r--src/core/content_main_delegate_qt.cpp2
-rw-r--r--src/core/core_chromium.pri8
-rw-r--r--src/core/download_manager_delegate_qt.cpp28
-rw-r--r--src/core/download_manager_delegate_qt.h4
-rw-r--r--src/core/extensions/extensions_browser_client_qt.cpp36
-rw-r--r--src/core/extensions/extensions_browser_client_qt.h7
-rw-r--r--src/core/favicon_manager.cpp1
-rw-r--r--src/core/net/custom_url_loader_factory.cpp6
-rw-r--r--src/core/net/plugin_response_interceptor_url_loader_throttle.cpp2
-rw-r--r--src/core/net/plugin_response_interceptor_url_loader_throttle.h2
-rw-r--r--src/core/net/proxying_url_loader_factory_qt.cpp63
-rw-r--r--src/core/net/proxying_url_loader_factory_qt.h5
-rw-r--r--src/core/net/ssl_host_state_delegate_qt.cpp2
-rw-r--r--src/core/net/ssl_host_state_delegate_qt.h2
-rw-r--r--src/core/net/system_network_context_manager.cpp22
-rw-r--r--src/core/ozone/BUILD.gn4
-rw-r--r--src/core/ozone/gl_ozone_glx_qt.cpp7
-rw-r--r--src/core/ozone/gl_ozone_glx_qt.h2
-rw-r--r--src/core/ozone/ozone_platform_qt.cpp7
-rw-r--r--src/core/ozone/platform_window_qt.h4
-rw-r--r--src/core/permission_manager_qt.cpp1
-rw-r--r--src/core/printing/print_view_manager_base_qt.cpp11
-rw-r--r--src/core/printing/print_view_manager_qt.cpp2
-rw-r--r--src/core/printing/printing_message_filter_qt.h4
-rw-r--r--src/core/qtwebengine.gni6
-rw-r--r--src/core/qtwebengine_resources.gni12
-rw-r--r--src/core/render_widget_host_view_qt.cpp1
-rw-r--r--src/core/renderer/content_renderer_client_qt.cpp66
-rw-r--r--src/core/renderer/content_renderer_client_qt.h14
-rw-r--r--src/core/renderer/content_settings_observer_qt.cpp9
-rw-r--r--src/core/renderer/content_settings_observer_qt.h2
-rw-r--r--src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp2
-rw-r--r--src/core/renderer_host/web_channel_ipc_transport_host.cpp4
-rw-r--r--src/core/renderer_host/web_channel_ipc_transport_host.h5
-rw-r--r--src/core/resource_bundle_qt.cpp4
-rw-r--r--src/core/visited_links_manager_qt.cpp18
-rw-r--r--src/core/visited_links_manager_qt.h4
-rw-r--r--src/core/web_contents_adapter.cpp18
-rw-r--r--src/core/web_contents_delegate_qt.cpp4
-rw-r--r--src/core/web_contents_delegate_qt.h2
-rw-r--r--src/core/web_contents_view_qt.cpp38
-rw-r--r--src/core/web_contents_view_qt.h2
-rw-r--r--src/core/web_engine_context.cpp9
-rw-r--r--src/core/web_engine_settings.cpp29
-rw-r--r--src/webengine/api/qquickwebenginecertificateerror.cpp4
-rw-r--r--src/webengine/api/qquickwebenginecertificateerror_p.h1
-rw-r--r--src/webenginewidgets/api/qwebenginecertificateerror.cpp3
-rw-r--r--src/webenginewidgets/api/qwebenginecertificateerror.h1
-rw-r--r--tests/auto/quick/publicapi/tst_publicapi.cpp1
-rw-r--r--tests/auto/widgets/accessibility/tst_accessibility.cpp21
-rwxr-xr-xtools/scripts/take_snapshot.py5
-rw-r--r--tools/scripts/version_resolver.py4
64 files changed, 427 insertions, 378 deletions
diff --git a/src/3rdparty b/src/3rdparty
-Subproject 9424dc7ceeccf6e6d5edc7757edb39a7ae4983a
+Subproject 6b151acc9f31574c7b739433c538b90b989c9a2
diff --git a/src/buildtools/config/common.pri b/src/buildtools/config/common.pri
index f2b4a854e..9824897f0 100644
--- a/src/buildtools/config/common.pri
+++ b/src/buildtools/config/common.pri
@@ -16,6 +16,7 @@ gn_args += \
enable_reporting=false \
enable_resource_whitelist_generation=false \
enable_swiftshader=false \
+ angle_enable_swiftshader=false \
enable_web_auth=false \
enable_web_speech=false \
enable_widevine=true \
diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri
index 2aa345c21..c02af3909 100644
--- a/src/buildtools/config/linux.pri
+++ b/src/buildtools/config/linux.pri
@@ -192,6 +192,11 @@ host_build {
} else {
gn_args += use_alsa=false
}
+ qtConfig(build-qtwebengine-core):qtConfig(webengine-system-xkbcommon) {
+ gn_args += use_xkbcommon=true
+ } else {
+ gn_args += use_xkbcommon=false
+ }
!packagesExist(libpci): gn_args += use_libpci=false
qtConfig(build-qtwebengine-core):qtConfig(webengine-ozone-x11) {
diff --git a/src/buildtools/config/mac_osx.pri b/src/buildtools/config/mac_osx.pri
index a7ed61214..01aca4ca7 100644
--- a/src/buildtools/config/mac_osx.pri
+++ b/src/buildtools/config/mac_osx.pri
@@ -29,7 +29,8 @@ gn_args += \
clang_use_chrome_plugins=false \
mac_deployment_target=\"$${QMAKE_MACOSX_DEPLOYMENT_TARGET}\" \
mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION}\" \
- use_external_popup_menu=false
+ use_external_popup_menu=false \
+ angle_enable_vulkan=false
qtConfig(build-qtwebengine-core):qtConfig(webengine-spellchecker) {
qtConfig(webengine-native-spellchecker): gn_args += use_browser_spellchecker=true
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
index c2531a744..1298ab916 100644
--- a/src/buildtools/configure.json
+++ b/src/buildtools/configure.json
@@ -32,6 +32,12 @@
{ "type": "pkgConfig", "args": "libdrm" }
]
},
+ "webengine-xkbcommon": {
+ "label": "xkbcommon",
+ "sources": [
+ { "type": "pkgConfig", "args": "xkbcommon" }
+ ]
+ },
"webengine-xcomposite": {
"label": "xcomposite",
"sources": [
@@ -143,10 +149,13 @@
"test" : {
"main": [
"std::string s;",
- "RE2 re2(s);"
+ "re2::FilteredRE2 fre2(1);",
+ "int id = 0;",
+ "fre2.Add(s, {}, &id);",
+ "const RE2 &re2 = fre2.GetRE2(id);"
]
},
- "headers": "re2/re2.h",
+ "headers": "re2/filtered_re2.h",
"sources": [
{ "type": "pkgConfig", "args": "re2" }
]
@@ -203,36 +212,6 @@
{ "type": "pkgConfig", "args": "libxml-2.0 libxslt" }
]
},
- "webengine-libdrm": {
- "label": "libdrm",
- "sources": [
- { "type": "pkgConfig", "args": "libdrm" }
- ]
- },
- "webengine-xcomposite": {
- "label": "xcomposite",
- "sources": [
- { "type": "pkgConfig", "args": "xcomposite" }
- ]
- },
- "webengine-xcursor": {
- "label": "xcursor",
- "sources": [
- { "type": "pkgConfig", "args": "xcursor" }
- ]
- },
- "webengine-xi": {
- "label": "xi",
- "sources": [
- { "type": "pkgConfig", "args": "xi" }
- ]
- },
- "webengine-xtst": {
- "label": "xtst",
- "sources": [
- { "type": "pkgConfig", "args": "xtst" }
- ]
- },
"webengine-ffmpeg": {
"label": "libavcodec libavformat libavutil",
"sources": [
@@ -242,7 +221,7 @@
"webengine-opus": {
"label": "opus",
"sources": [
- { "type": "pkgConfig", "args": "opus" }
+ { "type": "pkgConfig", "args": "opus >= 1.3.1" }
]
},
"webengine-snappy": {
@@ -317,6 +296,13 @@
]
}
},
+ "webengine-xkbcommon": {
+ "label": "system xkbcommon",
+ "type": "compile",
+ "test": {
+ "include": "xkbcommon/xkbcommon.h"
+ }
+ },
"webengine-ninja": {
"label": "system ninja",
"type": "detectNinja"
@@ -467,6 +453,11 @@
"condition": "libs.webengine-libdrm",
"output": [ "privateFeature" ]
},
+ "webengine-system-xkbcommon": {
+ "label": "xkbcommon",
+ "condition": "libs.webengine-xkbcommon && tests.webengine-xkbcommon",
+ "output": [ "privateFeature" ]
+ },
"webengine-system-xcomposite": {
"label": "xcomposite",
"condition": "libs.webengine-xcomposite",
@@ -541,31 +532,6 @@
{ "type": "varAssign", "name": "QMAKE_JUMBO_MERGE_LIMIT", "value": "tests.webengine-jumbo-build.merge_limit" }
]
},
- "webengine-system-libdrm": {
- "label": "libdrm",
- "condition": "libs.webengine-libdrm",
- "output": [ "privateFeature" ]
- },
- "webengine-system-xcomposite": {
- "label": "xcomposite",
- "condition": "libs.webengine-xcomposite",
- "output": [ "privateFeature" ]
- },
- "webengine-system-xcursor": {
- "label": "xcursor",
- "condition": "libs.webengine-xcursor",
- "output": [ "privateFeature" ]
- },
- "webengine-system-xi": {
- "label": "xi",
- "condition": "libs.webengine-xi",
- "output": [ "privateFeature" ]
- },
- "webengine-system-xtst": {
- "label": "xtst",
- "condition": "libs.webengine-xtst",
- "output": [ "privateFeature" ]
- },
"webengine-system-harfbuzz": {
"label": "harfbuzz",
"condition": "config.unix && features.system-harfbuzz && libs.webengine-harfbuzz",
@@ -786,7 +752,8 @@
"webengine-system-png",
"webengine-system-jpeg",
"webengine-system-harfbuzz",
- "webengine-system-freetype"
+ "webengine-system-freetype",
+ "webengine-system-xkbcommon"
]
}
]
diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index d816678e3..6104fb1f8 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -225,15 +225,6 @@ QAccessible::Role BrowserAccessibilityQt::role() const
return QAccessible::AlertMessage;
case ax::mojom::Role::kAnchor:
return QAccessible::Link;
-
- // REMINDER: annotation roles are removed from Chromium 80: https://chromium-review.googlesource.com/c/chromium/src/+/1907074
- case ax::mojom::Role::kAnnotationAttribution:
- case ax::mojom::Role::kAnnotationCommentary:
- case ax::mojom::Role::kAnnotationPresence:
- case ax::mojom::Role::kAnnotationRevision:
- case ax::mojom::Role::kAnnotationSuggestion:
- return QAccessible::Section;
-
case ax::mojom::Role::kApplication:
return QAccessible::Document; // returning Application here makes Qt return the top level app object
case ax::mojom::Role::kArticle:
@@ -258,6 +249,8 @@ QAccessible::Role BrowserAccessibilityQt::role() const
return QAccessible::CheckBox;
case ax::mojom::Role::kClient:
return QAccessible::Client;
+ case ax::mojom::Role::kCode:
+ return QAccessible::StaticText;
case ax::mojom::Role::kColorWell:
return QAccessible::ColorChooser;
case ax::mojom::Role::kColumn:
@@ -270,6 +263,9 @@ QAccessible::Role BrowserAccessibilityQt::role() const
return QAccessible::ComboBox;
case ax::mojom::Role::kComplementary:
return QAccessible::ComplementaryContent;
+ case ax::mojom::Role::kComment:
+ case ax::mojom::Role::kCommentSection:
+ return QAccessible::Section;
case ax::mojom::Role::kContentDeletion:
case ax::mojom::Role::kContentInsertion:
return QAccessible::Grouping;
@@ -348,6 +344,8 @@ QAccessible::Role BrowserAccessibilityQt::role() const
return QAccessible::Document;
case ax::mojom::Role::kEmbeddedObject:
return QAccessible::Grouping;
+ case ax::mojom::Role::kEmphasis:
+ return QAccessible::StaticText;
case ax::mojom::Role::kFeed:
return QAccessible::Section;
case ax::mojom::Role::kFigcaption:
@@ -466,8 +464,12 @@ QAccessible::Role BrowserAccessibilityQt::role() const
return QAccessible::Grouping;
case ax::mojom::Role::kRegion:
return QAccessible::Section;
+ case ax::mojom::Role::kRevision:
+ return QAccessible::Section;
case ax::mojom::Role::kRow:
return QAccessible::Row;
+ case ax::mojom::Role::kRowGroup:
+ return QAccessible::Section;
case ax::mojom::Role::kRowHeader:
return QAccessible::RowHeader;
case ax::mojom::Role::kRuby:
@@ -495,6 +497,10 @@ QAccessible::Role BrowserAccessibilityQt::role() const
return QAccessible::StaticText;
case ax::mojom::Role::kStatus:
return QAccessible::Indicator;
+ case ax::mojom::Role::kStrong:
+ return QAccessible::StaticText;
+ case ax::mojom::Role::kSuggestion:
+ return QAccessible::Section;
case ax::mojom::Role::kSvgRoot:
return QAccessible::Graphic;
case ax::mojom::Role::kSwitch:
diff --git a/src/core/certificate_error_controller.cpp b/src/core/certificate_error_controller.cpp
index f3b16357b..353228c2d 100644
--- a/src/core/certificate_error_controller.cpp
+++ b/src/core/certificate_error_controller.cpp
@@ -68,11 +68,12 @@ ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateNameConstraintViolatio
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateValidityTooLong, net::ERR_CERT_VALIDITY_TOO_LONG)
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateTransparencyRequired, net::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED)
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateSymantecLegacy, net::ERR_CERT_SYMANTEC_LEGACY)
+ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateKnownInterceptionBlocked, net::ERR_CERT_KNOWN_INTERCEPTION_BLOCKED)
ASSERT_ENUMS_MATCH(CertificateErrorController::CertificateErrorEnd, net::ERR_CERT_END)
void CertificateErrorControllerPrivate::accept(bool accepted)
{
- callback.Run(accepted ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE : content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
+ std::move(callback).Run(accepted ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE : content::CERTIFICATE_REQUEST_RESULT_TYPE_DENY);
}
CertificateErrorControllerPrivate::CertificateErrorControllerPrivate(int cert_error,
@@ -81,14 +82,14 @@ CertificateErrorControllerPrivate::CertificateErrorControllerPrivate(int cert_er
bool main_frame,
bool fatal_error,
bool strict_enforcement,
- const base::Callback<void(content::CertificateRequestResultType)>& cb
+ base::OnceCallback<void(content::CertificateRequestResultType)> cb
)
: certError(CertificateErrorController::CertificateError(cert_error))
, requestUrl(toQt(request_url))
, resourceType(main_frame ? CertificateErrorController::ResourceTypeMainFrame : CertificateErrorController::ResourceTypeOther)
, fatalError(fatal_error)
, strictEnforcement(strict_enforcement)
- , callback(cb)
+ , callback(std::move(cb))
{
if (auto cert = ssl_info.cert.get()) {
validStart = toQt(cert->valid_start());
@@ -158,6 +159,8 @@ QString CertificateErrorController::errorString() const
else
return getQStringForMessageId(IDS_CERT_ERROR_NOT_YET_VALID_DESCRIPTION);
case CertificateAuthorityInvalid:
+ case CertificateKnownInterceptionBlocked:
+ case CertificateSymantecLegacy:
return getQStringForMessageId(IDS_CERT_ERROR_AUTHORITY_INVALID_DESCRIPTION);
case CertificateContainsErrors:
return getQStringForMessageId(IDS_CERT_ERROR_CONTAINS_ERRORS_DESCRIPTION);
diff --git a/src/core/certificate_error_controller.h b/src/core/certificate_error_controller.h
index 7c7db37ef..dc1c3cf54 100644
--- a/src/core/certificate_error_controller.h
+++ b/src/core/certificate_error_controller.h
@@ -85,7 +85,8 @@ public:
CertificateValidityTooLong = -213,
CertificateTransparencyRequired = -214,
CertificateSymantecLegacy = -215,
- CertificateErrorEnd = -217 // not an error, just an enum boundary
+ CertificateKnownInterceptionBlocked = -217,
+ CertificateErrorEnd = -218 // not an error, just an enum boundary
};
CertificateError error() const;
diff --git a/src/core/certificate_error_controller_p.h b/src/core/certificate_error_controller_p.h
index ceae99853..b0b0bc658 100644
--- a/src/core/certificate_error_controller_p.h
+++ b/src/core/certificate_error_controller_p.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
class CertificateErrorControllerPrivate {
public:
- CertificateErrorControllerPrivate(int cert_error, const net::SSLInfo& ssl_info, const GURL& request_url, bool main_frame, bool fatal_error, bool strict_enforcement, const base::Callback<void(content::CertificateRequestResultType)>& callback);
+ CertificateErrorControllerPrivate(int cert_error, const net::SSLInfo& ssl_info, const GURL& request_url, bool main_frame, bool fatal_error, bool strict_enforcement, base::OnceCallback<void(content::CertificateRequestResultType)> callback);
void accept(bool accepted);
@@ -70,7 +70,7 @@ public:
CertificateErrorController::ResourceType resourceType;
bool fatalError;
bool strictEnforcement;
- const base::Callback<void(content::CertificateRequestResultType)> callback;
+ base::OnceCallback<void(content::CertificateRequestResultType)> callback;
QList<QSslCertificate> certificateChain;
};
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index d38a5916e..2c5ba36c8 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -54,7 +54,7 @@
#include "components/guest_view/browser/guest_view_base.h"
#include "components/navigation_interception/intercept_navigation_throttle.h"
#include "components/navigation_interception/navigation_params.h"
-#include "components/network_hints/browser/network_hints_message_filter.h"
+#include "components/network_hints/browser/simple_network_hints_handler_impl.h"
#include "components/spellcheck/spellcheck_buildflags.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/common/url_schemes.h"
@@ -162,7 +162,6 @@
#include "content/public/browser/file_url_loader.h"
#include "extensions/browser/extension_message_filter.h"
#include "extensions/browser/guest_view/extensions_guest_view_message_filter.h"
-#include "extensions/browser/io_thread_extension_message_filter.h"
#include "extensions/common/constants.h"
#include "common/extensions/extensions_client_qt.h"
@@ -194,6 +193,43 @@ QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
QT_END_NAMESPACE
+// Implement IsHandledProtocol as declared in //url/url_util_qt.h.
+namespace url {
+bool IsHandledProtocol(base::StringPiece scheme)
+{
+ static const char *const kProtocolList[] = {
+ url::kHttpScheme,
+ url::kHttpsScheme,
+#if BUILDFLAG(ENABLE_WEBSOCKETS)
+ url::kWsScheme,
+ url::kWssScheme,
+#endif // BUILDFLAG(ENABLE_WEBSOCKETS)
+ url::kFileScheme,
+ content::kChromeDevToolsScheme,
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+ extensions::kExtensionScheme,
+#endif
+ content::kChromeUIScheme,
+ url::kDataScheme,
+ url::kAboutScheme,
+#if !BUILDFLAG(DISABLE_FTP_SUPPORT)
+ url::kFtpScheme,
+#endif // !BUILDFLAG(DISABLE_FTP_SUPPORT)
+ url::kBlobScheme,
+ url::kFileSystemScheme,
+ url::kQrcScheme,
+ };
+
+ for (const char *protocol : kProtocolList) {
+ if (scheme == protocol)
+ return true;
+ }
+ if (const auto cs = url::CustomScheme::FindScheme(scheme))
+ return true;
+ return false;
+}
+}
+
namespace QtWebEngineCore {
class QtShareGLContext : public gl::GLContext {
@@ -301,8 +337,6 @@ void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost
const int id = host->GetID();
Profile *profile = Profile::FromBrowserContext(host->GetBrowserContext());
- host->AddFilter(new network_hints::NetworkHintsMessageFilter(id));
-
// Allow requesting custom schemes.
const auto policy = content::ChildProcessSecurityPolicy::GetInstance();
const auto profileAdapter = static_cast<ProfileQt *>(profile)->profileAdapter();
@@ -318,7 +352,6 @@ void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost
#endif
#if BUILDFLAG(ENABLE_EXTENSIONS)
host->AddFilter(new extensions::ExtensionMessageFilter(id, profile));
- host->AddFilter(new extensions::IOThreadExtensionMessageFilter());
host->AddFilter(new extensions::ExtensionsGuestViewMessageFilter(id, profile));
#endif //ENABLE_EXTENSIONS
@@ -363,7 +396,7 @@ void ContentBrowserClientQt::GetQuotaSettings(content::BrowserContext* context,
base::OnceCallback<void(base::Optional<storage::QuotaSettings>)> callback)
{
storage::GetNominalDynamicSettings(partition->GetPath(), context->IsOffTheRecord(),
- storage::GetDefaultDiskInfoHelper(), std::move(callback));
+ storage::GetDefaultDeviceInfoHelper(), std::move(callback));
}
// Copied from chrome/browser/ssl/ssl_error_handler.cc:
@@ -398,7 +431,7 @@ void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webCont
const GURL &request_url,
bool is_main_frame_request,
bool strict_enforcement,
- const base::Callback<void(content::CertificateRequestResultType)> &callback)
+ base::OnceCallback<void(content::CertificateRequestResultType)> callback)
{
WebContentsDelegateQt* contentsDelegate = static_cast<WebContentsDelegateQt*>(webContents->GetDelegate());
@@ -411,7 +444,7 @@ void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webCont
is_main_frame_request,
IsCertErrorFatal(cert_error),
strict_enforcement,
- callback)));
+ std::move(callback))));
contentsDelegate->allowCertificateError(errorController);
}
@@ -435,12 +468,12 @@ base::OnceClosure ContentBrowserClientQt::SelectClientCertificate(content::WebCo
return base::OnceClosure();
}
-std::unique_ptr<net::ClientCertStore> ContentBrowserClientQt::CreateClientCertStore(content::ResourceContext *resource_context)
+std::unique_ptr<net::ClientCertStore> ContentBrowserClientQt::CreateClientCertStore(content::BrowserContext *browser_context)
{
- if (!resource_context)
+ if (!browser_context)
return nullptr;
- return ProfileIODataQt::FromResourceContext(resource_context)->CreateClientCertStore();
+ return ProfileIODataQt::FromBrowserContext(browser_context)->CreateClientCertStore();
}
std::string ContentBrowserClientQt::GetApplicationLocale()
@@ -490,7 +523,7 @@ void ContentBrowserClientQt::GetAdditionalAllowedSchemesForFileSystem(std::vecto
void ContentBrowserClientQt::GetAdditionalMappedFilesForChildProcess(const base::CommandLine& command_line, int child_process_id, content::PosixFileDescriptorInfo* mappings)
{
const std::string &locale = GetApplicationLocale();
- const base::FilePath &locale_file_path = ui::ResourceBundle::GetSharedInstance().GetLocaleFilePath(locale, true);
+ const base::FilePath &locale_file_path = ui::ResourceBundle::GetSharedInstance().GetLocaleFilePath(locale);
if (locale_file_path.empty())
return;
@@ -599,6 +632,20 @@ void ContentBrowserClientQt::BindHostReceiverForRenderer(content::RenderProcessH
#endif // BUILDFLAG(ENABLE_SPELLCHECK)
}
+static void BindNetworkHintsHandler(content::RenderFrameHost *frame_host,
+ mojo::PendingReceiver<network_hints::mojom::NetworkHintsHandler> receiver)
+{
+ network_hints::SimpleNetworkHintsHandlerImpl::Create(frame_host, std::move(receiver));
+}
+
+void ContentBrowserClientQt::RegisterBrowserInterfaceBindersForFrame(
+ content::RenderFrameHost *render_frame_host,
+ service_manager::BinderMapWithContext<content::RenderFrameHost *> *map)
+{
+ Q_UNUSED(render_frame_host);
+ map->Add<network_hints::mojom::NetworkHintsHandler>(base::BindRepeating(&BindNetworkHintsHandler));
+}
+
void ContentBrowserClientQt::RunServiceInstance(const service_manager::Identity &identity,
mojo::PendingReceiver<service_manager::mojom::Service> *receiver)
{
@@ -616,8 +663,6 @@ base::Optional<service_manager::Manifest> ContentBrowserClientQt::GetServiceMani
{
if (name == content::mojom::kBrowserServiceName)
return GetQtWebEngineContentBrowserOverlayManifest();
- else if (name == content::mojom::kRendererServiceName)
- return GetQtWebEngineContentRendererOverlayManifest();
return base::nullopt;
}
@@ -763,11 +808,11 @@ bool ContentBrowserClientQt::AllowWorkerIndexedDB(const GURL &url,
}
static void LaunchURL(const GURL& url,
- const content::WebContents::Getter& web_contents_getter,
+ base::OnceCallback<content::WebContents*()> web_contents_getter,
ui::PageTransition page_transition, bool is_main_frame, bool has_user_gesture)
{
Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- content::WebContents* webContents = web_contents_getter.Run();
+ content::WebContents* webContents = std::move(web_contents_getter).Run();
if (!webContents)
return;
@@ -783,26 +828,26 @@ static void LaunchURL(const GURL& url,
}
-bool ContentBrowserClientQt::HandleExternalProtocol(
- const GURL &url,
- content::WebContents::Getter web_contents_getter,
+bool ContentBrowserClientQt::HandleExternalProtocol(const GURL &url,
+ base::OnceCallback<content::WebContents*()> web_contents_getter,
int child_id,
content::NavigationUIData *navigation_data,
bool is_main_frame,
ui::PageTransition page_transition,
bool has_user_gesture,
const base::Optional<url::Origin> &initiating_origin,
- network::mojom::URLLoaderFactoryPtr *out_factory)
+ mojo::PendingRemote<network::mojom::URLLoaderFactory> *out_factory)
{
// Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
Q_UNUSED(child_id);
Q_UNUSED(navigation_data);
+ Q_UNUSED(initiating_origin);
Q_UNUSED(out_factory);
base::PostTask(FROM_HERE, {content::BrowserThread::UI},
base::BindOnce(&LaunchURL,
url,
- web_contents_getter,
+ std::move(web_contents_getter),
page_transition,
is_main_frame,
has_user_gesture));
@@ -826,7 +871,8 @@ public:
}
void WillRedirectRequest(net::RedirectInfo *redirect_info,
- const network::ResourceResponseHead &response_head, bool *defer,
+ const network::mojom::URLResponseHead &response_head,
+ bool *defer,
std::vector<std::string> *to_be_removed_headers,
net::HttpRequestHeaders *modified_headers) override
{
@@ -921,34 +967,7 @@ std::vector<std::unique_ptr<content::NavigationThrottle>> ContentBrowserClientQt
bool ContentBrowserClientQt::IsHandledURL(const GURL &url)
{
- static const char *const kProtocolList[] = {
- url::kFileScheme,
- content::kChromeDevToolsScheme,
-#if BUILDFLAG(ENABLE_EXTENSIONS)
- extensions::kExtensionScheme,
-#endif
- content::kChromeUIScheme,
- url::kDataScheme,
- url::kAboutScheme,
-#if !BUILDFLAG(DISABLE_FTP_SUPPORT)
- url::kFtpScheme,
-#endif // !BUILDFLAG(DISABLE_FTP_SUPPORT)
- url::kBlobScheme,
- url::kFileSystemScheme,
- url::kQrcScheme,
- };
-
- // We don't check url.IsCustom() here because we don't
- // know if the registered protocol is installed in the
- // profile that will be used to load the URL.
-
- const std::string scheme = url.scheme();
-
- for (const char *protocol : kProtocolList) {
- if (scheme == protocol)
- return true;
- }
- return net::URLRequest::IsHandledProtocol(scheme);
+ return url::IsHandledProtocol(url.scheme());
}
std::unique_ptr<content::LoginDelegate> ContentBrowserClientQt::CreateLoginDelegate(
@@ -1000,8 +1019,10 @@ bool ContentBrowserClientQt::ShouldUseSpareRenderProcessHost(content::BrowserCon
return ContentBrowserClient::ShouldUseSpareRenderProcessHost(browser_context, site_url);
}
-bool ContentBrowserClientQt::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(base::StringPiece scheme)
+bool ContentBrowserClientQt::ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(base::StringPiece scheme, bool is_embedded_origin_secure)
{
+ if (is_embedded_origin_secure && scheme == content::kChromeUIScheme)
+ return true;
#if BUILDFLAG(ENABLE_EXTENSIONS)
return scheme == extensions::kExtensionScheme;
#else
@@ -1185,9 +1206,11 @@ bool ContentBrowserClientQt::WillCreateURLLoaderFactory(
int render_process_id,
URLLoaderFactoryType type,
const url::Origin &request_initiator,
+ base::Optional<int64_t> navigation_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory> *factory_receiver,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient> *header_client,
- bool *bypass_redirect_checks)
+ bool *bypass_redirect_checks,
+ network::mojom::URLLoaderFactoryOverridePtr *factory_override)
{
if (!base::FeatureList::IsEnabled(network::features::kNetworkService))
return false;
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index d828d44b6..341564574 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -98,12 +98,12 @@ public:
const GURL &request_url,
bool is_main_frame_request,
bool strict_enforcement,
- const base::Callback<void(content::CertificateRequestResultType)> &callback) override;
+ base::OnceCallback<void(content::CertificateRequestResultType)> callback) override;
base::OnceClosure SelectClientCertificate(content::WebContents* web_contents,
net::SSLCertRequestInfo* cert_request_info,
net::ClientCertIdentityList client_certs,
std::unique_ptr<content::ClientCertificateDelegate> delegate) override;
- std::unique_ptr<net::ClientCertStore> CreateClientCertStore(content::ResourceContext *resource_context) override;
+ std::unique_ptr<net::ClientCertStore> CreateClientCertStore(content::BrowserContext *browser_context) override;
content::DevToolsManagerDelegate *GetDevToolsManagerDelegate() override;
content::PlatformNotificationService * GetPlatformNotificationService(content::BrowserContext *browser_context) override;
@@ -120,6 +120,8 @@ public:
mojo::ScopedMessagePipeHandle interface_pipe) override;
void BindHostReceiverForRenderer(content::RenderProcessHost *render_process_host,
mojo::GenericPendingReceiver receiver) override;
+ void RegisterBrowserInterfaceBindersForFrame(content::RenderFrameHost *render_frame_host,
+ service_manager::BinderMapWithContext<content::RenderFrameHost *> *map) override;
void RunServiceInstance(const service_manager::Identity &identity,
mojo::PendingReceiver<service_manager::mojom::Service> *receiver) override;
@@ -186,7 +188,8 @@ public:
bool DoesSiteRequireDedicatedProcess(content::BrowserContext *browser_context,
const GURL &effective_site_url) override;
bool ShouldUseSpareRenderProcessHost(content::BrowserContext *browser_context, const GURL& site_url) override;
- bool ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(base::StringPiece scheme) override;
+ bool ShouldTreatURLSchemeAsFirstPartyWhenTopLevel(base::StringPiece scheme,
+ bool is_embedded_origin_secure) override;
#if defined(Q_OS_LINUX)
void GetAdditionalMappedFilesForChildProcess(const base::CommandLine& command_line, int child_process_id, content::PosixFileDescriptorInfo* mappings) override;
@@ -208,14 +211,14 @@ public:
bool HandleExternalProtocol(
const GURL &url,
- base::Callback<content::WebContents*(void)> web_contents_getter,
+ base::OnceCallback<content::WebContents*()> web_contents_getter,
int child_id,
content::NavigationUIData *navigation_data,
bool is_main_frame,
ui::PageTransition page_transition,
bool has_user_gesture,
const base::Optional<url::Origin> &initiating_origin,
- network::mojom::URLLoaderFactoryPtr *out_factory) override;
+ mojo::PendingRemote<network::mojom::URLLoaderFactory> *out_factory) override;
std::vector<std::unique_ptr<blink::URLLoaderThrottle>> CreateURLLoaderThrottles(
const network::ResourceRequest &request, content::BrowserContext *browser_context,
@@ -232,9 +235,11 @@ public:
int render_process_id,
URLLoaderFactoryType type,
const url::Origin &request_initiator,
+ base::Optional<int64_t> navigation_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory> *factory_receiver,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient> *header_client,
- bool *bypass_redirect_checks) override;
+ bool *bypass_redirect_checks,
+ network::mojom::URLLoaderFactoryOverridePtr *factory_override) override;
scoped_refptr<network::SharedURLLoaderFactory> GetSystemSharedURLLoaderFactory() override;
network::mojom::NetworkContext *GetSystemNetworkContext() override;
void OnNetworkServiceCreated(network::mojom::NetworkService *network_service) override;
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index 6f8fc04f9..1ab7e5d8e 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -347,8 +347,8 @@ static bool IsWidevineAvailable(base::FilePath *cdm_path,
// Add the supported encryption schemes as if they came from the
// component manifest. This list must match the CDM that is being
// bundled with Chrome.
- capability->encryption_schemes.insert(media::EncryptionMode::kCenc);
- capability->encryption_schemes.insert(media::EncryptionMode::kCbcs);
+ capability->encryption_schemes.insert(media::EncryptionScheme::kCenc);
+ capability->encryption_schemes.insert(media::EncryptionScheme::kCbcs);
// Temporary session is always supported.
capability->session_types.insert(media::CdmSessionType::kTemporary);
@@ -391,7 +391,7 @@ void ContentClientQt::AddContentDecryptionModules(std::vector<content::CdmInfo>
// Supported codecs are hard-coded in ExternalClearKeyProperties.
content::CdmCapability capability(
- {}, {media::EncryptionMode::kCenc, media::EncryptionMode::kCbcs},
+ {}, {media::EncryptionScheme::kCenc, media::EncryptionScheme::kCbcs},
{media::CdmSessionType::kTemporary,
media::CdmSessionType::kPersistentLicense},
{});
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index ff6bf4366..708d175f3 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -107,7 +107,7 @@ struct LazyDirectoryListerCacher
dict.SetString("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr");
std::string html =
webui::GetI18nTemplateHtml(
- ui::ResourceBundle::GetSharedInstance().DecompressDataResource(IDR_DIR_HEADER_HTML),
+ ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(IDR_DIR_HEADER_HTML),
&dict);
html_data = base::RefCountedString::TakeString(&html);
}
diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri
index ac118101a..6a8b8c4bd 100644
--- a/src/core/core_chromium.pri
+++ b/src/core/core_chromium.pri
@@ -118,7 +118,6 @@ SOURCES = \
renderer/render_view_observer_qt.cpp \
renderer/render_thread_observer_qt.cpp \
renderer/user_resource_controller.cpp \
- renderer/plugins/loadable_plugin_placeholder_qt.cpp \
renderer/plugins/plugin_placeholder_qt.cpp \
renderer_host/render_view_observer_host_qt.cpp \
renderer_host/user_resource_controller_host.cpp \
@@ -231,7 +230,6 @@ HEADERS = \
renderer/render_view_observer_qt.h \
renderer/render_thread_observer_qt.h \
renderer/user_resource_controller.h \
- renderer/plugins/loadable_plugin_placeholder_qt.h \
renderer/plugins/plugin_placeholder_qt.h \
renderer_host/render_view_observer_host_qt.h \
renderer_host/user_resource_controller_host.h \
@@ -269,14 +267,16 @@ qtConfig(webengine-pepper-plugins) {
renderer_host/pepper/pepper_host_factory_qt.cpp \
renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp \
renderer/pepper/pepper_flash_renderer_host_qt.cpp \
- renderer/pepper/pepper_renderer_host_factory_qt.cpp
+ renderer/pepper/pepper_renderer_host_factory_qt.cpp \
+ renderer/plugins/loadable_plugin_placeholder_qt.cpp
HEADERS += \
renderer_host/pepper/pepper_flash_browser_host_qt.h \
renderer_host/pepper/pepper_host_factory_qt.h \
renderer_host/pepper/pepper_isolated_file_system_message_filter.h \
renderer/pepper/pepper_flash_renderer_host_qt.h \
- renderer/pepper/pepper_renderer_host_factory_qt.h
+ renderer/pepper/pepper_renderer_host_factory_qt.h \
+ renderer/plugins/loadable_plugin_placeholder_qt.h
}
qtConfig(webengine-printing-and-pdf) {
diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp
index fe7f7c57b..ebf498fdf 100644
--- a/src/core/download_manager_delegate_qt.cpp
+++ b/src/core/download_manager_delegate_qt.cpp
@@ -241,7 +241,7 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
const base::FilePath &suggested_path,
const base::FilePath::StringType &default_extension,
bool can_save_as_complete,
- const content::SavePackagePathPickedCallback &callback)
+ content::SavePackagePathPickedCallback callback)
{
Q_UNUSED(default_extension);
Q_UNUSED(can_save_as_complete);
@@ -308,29 +308,9 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
if (!info.accepted)
return;
- callback.Run(toFilePath(info.path), static_cast<content::SavePageType>(info.savePageFormat),
- base::Bind(&DownloadManagerDelegateQt::savePackageDownloadCreated,
- m_weakPtrFactory.GetWeakPtr()));
-}
-
-bool DownloadManagerDelegateQt::IsMostRecentDownloadItemAtFilePath(download::DownloadItem *download)
-{
- content::BrowserContext *context = content::DownloadItemUtils::GetBrowserContext(download);
- std::vector<download::DownloadItem*> all_downloads;
-
- content::DownloadManager* manager =
- content::BrowserContext::GetDownloadManager(context);
- if (manager)
- manager->GetAllDownloads(&all_downloads);
-
- for (const auto* item : all_downloads) {
- if (item->GetGuid() == download->GetGuid() ||
- item->GetTargetFilePath() != download->GetTargetFilePath())
- continue;
- if (item->GetState() == download::DownloadItem::IN_PROGRESS)
- return false;
- }
- return true;
+ std::move(callback).Run(toFilePath(info.path), static_cast<content::SavePageType>(info.savePageFormat),
+ base::Bind(&DownloadManagerDelegateQt::savePackageDownloadCreated,
+ m_weakPtrFactory.GetWeakPtr()));
}
void DownloadManagerDelegateQt::savePackageDownloadCreated(download::DownloadItem *item)
diff --git a/src/core/download_manager_delegate_qt.h b/src/core/download_manager_delegate_qt.h
index 4634790cc..0cdbd6ee3 100644
--- a/src/core/download_manager_delegate_qt.h
+++ b/src/core/download_manager_delegate_qt.h
@@ -82,9 +82,7 @@ public:
const base::FilePath &suggested_path,
const base::FilePath::StringType &default_extension,
bool can_save_as_complete,
- const content::SavePackagePathPickedCallback &callback) override;
- bool IsMostRecentDownloadItemAtFilePath(download::DownloadItem* download) override;
-
+ content::SavePackagePathPickedCallback callback) override;
void cancelDownload(quint32 downloadId);
void pauseDownload(quint32 downloadId);
diff --git a/src/core/extensions/extensions_browser_client_qt.cpp b/src/core/extensions/extensions_browser_client_qt.cpp
index a91127192..8b5da3d60 100644
--- a/src/core/extensions/extensions_browser_client_qt.cpp
+++ b/src/core/extensions/extensions_browser_client_qt.cpp
@@ -63,13 +63,13 @@
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_host_delegate.h"
#include "extensions/browser/extension_protocols.h"
+#include "extensions/browser/extensions_browser_interface_binders.h"
#include "extensions/browser/mojo/interface_registration.h"
#include "extensions/browser/url_request_util.h"
#include "extensions/common/file_util.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "net/base/completion_once_callback.h"
#include "net/base/mime_util.h"
-#include "net/url_request/url_request_simple_job.h"
#include "services/network/public/cpp/resource_response.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "third_party/zlib/google/compression_utils.h"
@@ -144,9 +144,11 @@ scoped_refptr<base::RefCountedMemory> GetResource(int resource_id, const std::st
class ResourceBundleFileLoader : public network::mojom::URLLoader
{
public:
- static void CreateAndStart(const network::ResourceRequest &request, network::mojom::URLLoaderRequest loader,
- network::mojom::URLLoaderClientPtrInfo client_info, const base::FilePath &filename,
- int resource_id, const std::string &content_security_policy, bool send_cors_header)
+ static void CreateAndStart(const network::ResourceRequest &request,
+ mojo::PendingReceiver<network::mojom::URLLoader> loader,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client_info,
+ const base::FilePath &filename, int resource_id,
+ const std::string &content_security_policy, bool send_cors_header)
{
// Owns itself. Will live as long as its URLLoader and URLLoaderClientPtr
// bindings are alive - essentially until either the client gives up or all
@@ -174,10 +176,12 @@ private:
}
~ResourceBundleFileLoader() override = default;
- void Start(const network::ResourceRequest &request, network::mojom::URLLoaderRequest loader,
- network::mojom::URLLoaderClientPtrInfo client_info, const base::FilePath &filename, int resource_id)
+ void Start(const network::ResourceRequest &request,
+ mojo::PendingReceiver<network::mojom::URLLoader> loader,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client_info_remote,
+ const base::FilePath &filename, int resource_id)
{
- client_.Bind(std::move(client_info));
+ client_.Bind(std::move(client_info_remote));
binding_.Bind(std::move(loader));
binding_.set_connection_error_handler(
base::BindOnce(&ResourceBundleFileLoader::OnBindingError, base::Unretained(this)));
@@ -364,14 +368,14 @@ base::FilePath ExtensionsBrowserClientQt::GetBundleResourcePath(const network::R
// Creates and starts a URLLoader to load an extension resource from the
// embedder's resource bundle (.pak) files. Used for component extensions.
void ExtensionsBrowserClientQt::LoadResourceFromResourceBundle(const network::ResourceRequest &request,
- network::mojom::URLLoaderRequest loader,
+ mojo::PendingReceiver<network::mojom::URLLoader> loader,
const base::FilePath &resource_relative_path,
int resource_id,
const std::string &content_security_policy,
- network::mojom::URLLoaderClientPtr client,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client,
bool send_cors_header)
{
- ResourceBundleFileLoader::CreateAndStart(request, std::move(loader), client.PassInterface(), resource_relative_path,
+ ResourceBundleFileLoader::CreateAndStart(request, std::move(loader), std::move(client), resource_relative_path,
resource_id, content_security_policy, send_cors_header);
}
@@ -460,6 +464,18 @@ void ExtensionsBrowserClientQt::RegisterExtensionInterfaces(service_manager::Bin
RegisterInterfacesForExtension(registry, render_frame_host, extension);
}
+void ExtensionsBrowserClientQt::RegisterBrowserInterfaceBindersForFrame(
+ service_manager::BinderMapWithContext<content::RenderFrameHost*> *binder_map,
+ content::RenderFrameHost* render_frame_host,
+ const Extension* extension) const
+{
+ PopulateExtensionFrameBinders(binder_map, render_frame_host, extension);
+
+ // FIXME Do we need something from here?
+ // PopulateChromeFrameBindersForExtension(binder_map, render_frame_host,
+ // extension);
+}
+
std::unique_ptr<RuntimeAPIDelegate> ExtensionsBrowserClientQt::CreateRuntimeAPIDelegate(content::BrowserContext *context) const
{
// TODO(extensions): Implement to support Apps.
diff --git a/src/core/extensions/extensions_browser_client_qt.h b/src/core/extensions/extensions_browser_client_qt.h
index 1a90bae95..97da83240 100644
--- a/src/core/extensions/extensions_browser_client_qt.h
+++ b/src/core/extensions/extensions_browser_client_qt.h
@@ -91,7 +91,8 @@ public:
bool IsRunningInForcedAppMode() override;
bool IsLoggedInAsPublicAccount() override;
ExtensionSystemProvider *GetExtensionSystemFactory() override;
-// void RegisterExtensionFunctions(ExtensionFunctionRegistry *registry) const;
+ void RegisterBrowserInterfaceBindersForFrame(service_manager::BinderMapWithContext<content::RenderFrameHost*> *,
+ content::RenderFrameHost *, const extensions::Extension *) const override;
std::unique_ptr<RuntimeAPIDelegate> CreateRuntimeAPIDelegate(content::BrowserContext *context) const override;
void RegisterExtensionInterfaces(service_manager::BinderRegistryWithArgs<content::RenderFrameHost *> *registry,
content::RenderFrameHost *render_frame_host,
@@ -122,11 +123,11 @@ public:
// Creates and starts a URLLoader to load an extension resource from the
// embedder's resource bundle (.pak) files. Used for component extensions.
void LoadResourceFromResourceBundle(const network::ResourceRequest &request,
- network::mojom::URLLoaderRequest loader,
+ mojo::PendingReceiver<network::mojom::URLLoader> loader,
const base::FilePath &resource_relative_path,
int resource_id,
const std::string &content_security_policy,
- network::mojom::URLLoaderClientPtr client,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client,
bool send_cors_header) override;
// Returns the locale used by the application.
diff --git a/src/core/favicon_manager.cpp b/src/core/favicon_manager.cpp
index a06da6769..412aab90d 100644
--- a/src/core/favicon_manager.cpp
+++ b/src/core/favicon_manager.cpp
@@ -96,6 +96,7 @@ int FaviconManager::downloadIcon(const QUrl &url)
id = m_webContents->DownloadImage(
toGurl(url),
true, // is_favicon
+ 0, // preferred_size
maxSize,
false, // normal cache policy
base::Bind(&FaviconManager::iconDownloadFinished, m_weakFactory->GetWeakPtr()));
diff --git a/src/core/net/custom_url_loader_factory.cpp b/src/core/net/custom_url_loader_factory.cpp
index a96b35696..e5f580536 100644
--- a/src/core/net/custom_url_loader_factory.cpp
+++ b/src/core/net/custom_url_loader_factory.cpp
@@ -441,12 +441,12 @@ public:
~CustomURLLoaderFactory() override = default;
// network::mojom::URLLoaderFactory:
- void CreateLoaderAndStart(network::mojom::URLLoaderRequest loader,
+ void CreateLoaderAndStart(mojo::PendingReceiver<network::mojom::URLLoader> loader,
int32_t routing_id,
int32_t request_id,
uint32_t options,
const network::ResourceRequest &request,
- network::mojom::URLLoaderClientPtr client,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client,
const net::MutableNetworkTrafficAnnotationTag &traffic_annotation) override
{
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -457,7 +457,7 @@ public:
m_taskRunner->PostTask(FROM_HERE,
base::BindOnce(&CustomURLLoader::CreateAndStart, request,
- std::move(loader), client.PassInterface(),
+ std::move(loader), std::move(client),
m_profileAdapter));
}
diff --git a/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp b/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
index 2b6158f4a..d854a556c 100644
--- a/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
+++ b/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
@@ -104,7 +104,7 @@ PluginResponseInterceptorURLLoaderThrottle::PluginResponseInterceptorURLLoaderTh
{}
void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse(const GURL &response_url,
- network::ResourceResponseHead *response_head,
+ network::mojom::URLResponseHead *response_head,
bool *defer)
{
Q_UNUSED(defer);
diff --git a/src/core/net/plugin_response_interceptor_url_loader_throttle.h b/src/core/net/plugin_response_interceptor_url_loader_throttle.h
index 1fc9e654f..7b9db6490 100644
--- a/src/core/net/plugin_response_interceptor_url_loader_throttle.h
+++ b/src/core/net/plugin_response_interceptor_url_loader_throttle.h
@@ -61,7 +61,7 @@ public:
private:
// content::URLLoaderThrottle overrides;
- void WillProcessResponse(const GURL &response_url, network::ResourceResponseHead *response_head, bool *defer) override;
+ void WillProcessResponse(const GURL &response_url, network::mojom::URLResponseHead *response_head, bool *defer) override;
content::ResourceContext *m_resource_context = nullptr;
content::BrowserContext *m_browser_context = nullptr;
diff --git a/src/core/net/proxying_url_loader_factory_qt.cpp b/src/core/net/proxying_url_loader_factory_qt.cpp
index 4931bb3e3..71f710737 100644
--- a/src/core/net/proxying_url_loader_factory_qt.cpp
+++ b/src/core/net/proxying_url_loader_factory_qt.cpp
@@ -97,8 +97,9 @@ public:
const network::ResourceRequest &request,
const net::MutableNetworkTrafficAnnotationTag &traffic_annotation,
ProfileIODataQt *profileData,
- network::mojom::URLLoaderRequest loader_request, network::mojom::URLLoaderClientPtr client,
- network::mojom::URLLoaderFactoryPtr target_factory);
+ mojo::PendingReceiver<network::mojom::URLLoader> loader,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client,
+ mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory);
~InterceptedRequest() override;
void Start();
@@ -158,12 +159,12 @@ private:
QWebEngineUrlRequestInfo m_requestInfo;
ProfileIODataQt *m_profileData;
- mojo::Binding<network::mojom::URLLoader> proxied_loader_binding_;
- network::mojom::URLLoaderClientPtr target_client_;
+ mojo::Receiver<network::mojom::URLLoader> proxied_loader_receiver_;
+ mojo::Remote<network::mojom::URLLoaderClient> target_client_;
- mojo::Binding<network::mojom::URLLoaderClient> proxied_client_binding_;
- network::mojom::URLLoaderPtr target_loader_;
- network::mojom::URLLoaderFactoryPtr target_factory_;
+ mojo::Receiver<network::mojom::URLLoaderClient> proxied_client_receiver_{this};
+ mojo::Remote<network::mojom::URLLoader> target_loader_;
+ mojo::Remote<network::mojom::URLLoaderFactory> target_factory_;
base::WeakPtrFactory<InterceptedRequest> m_weakFactory;
base::WeakPtr<InterceptedRequest> m_weakPtr;
@@ -174,9 +175,9 @@ InterceptedRequest::InterceptedRequest(int process_id, uint64_t request_id, int3
const network::ResourceRequest &request,
const net::MutableNetworkTrafficAnnotationTag &traffic_annotation,
ProfileIODataQt *profileData,
- network::mojom::URLLoaderRequest loader_request,
- network::mojom::URLLoaderClientPtr client,
- network::mojom::URLLoaderFactoryPtr target_factory)
+ mojo::PendingReceiver<network::mojom::URLLoader> loader_receiver,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client,
+ mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory)
: process_id_(process_id)
, request_id_(request_id)
, routing_id_(routing_id)
@@ -184,18 +185,17 @@ InterceptedRequest::InterceptedRequest(int process_id, uint64_t request_id, int3
, request_(request)
, traffic_annotation_(traffic_annotation)
, m_profileData(profileData)
- , proxied_loader_binding_(this, std::move(loader_request))
+ , proxied_loader_receiver_(this, std::move(loader_receiver))
, target_client_(std::move(client))
- , proxied_client_binding_(this)
, target_factory_(std::move(target_factory))
, m_weakFactory(this)
, m_weakPtr(m_weakFactory.GetWeakPtr())
{
// If there is a client error, clean up the request.
- target_client_.set_connection_error_handler(
- base::BindOnce(&InterceptedRequest::OnURLLoaderClientError, m_weakFactory.GetWeakPtr()));
- proxied_loader_binding_.set_connection_error_with_reason_handler(
- base::BindOnce(&InterceptedRequest::OnURLLoaderError, m_weakFactory.GetWeakPtr()));
+ target_client_.set_disconnect_handler(
+ base::BindOnce(&InterceptedRequest::OnURLLoaderClientError, m_weakFactory.GetWeakPtr()));
+ proxied_loader_receiver_.set_disconnect_with_reason_handler(
+ base::BindOnce(&InterceptedRequest::OnURLLoaderError, m_weakFactory.GetWeakPtr()));
}
InterceptedRequest::~InterceptedRequest()
@@ -341,10 +341,9 @@ void InterceptedRequest::ContinueAfterIntercept()
}
if (!target_loader_ && target_factory_) {
- network::mojom::URLLoaderClientPtr proxied_client;
- proxied_client_binding_.Bind(mojo::MakeRequest(&proxied_client));
- target_factory_->CreateLoaderAndStart(mojo::MakeRequest(&target_loader_), routing_id_, request_id_, options_,
- request_, std::move(proxied_client), traffic_annotation_);
+ target_factory_->CreateLoaderAndStart(target_loader_.BindNewPipeAndPassReceiver(), routing_id_, request_id_,
+ options_, request_, proxied_client_receiver_.BindNewPipeAndPassRemote(),
+ traffic_annotation_);
}
}
@@ -460,18 +459,18 @@ void InterceptedRequest::CallOnComplete(const network::URLLoaderCompletionStatus
if (target_client_)
target_client_->OnComplete(status);
- if (proxied_loader_binding_ && wait_for_loader_error) {
- // Don't delete |this| yet, in case the |proxied_loader_binding_|'s
+ if (proxied_loader_receiver_.is_bound() && wait_for_loader_error) {
+ // Since the original client is gone no need to continue loading the
+ // request.
+ proxied_client_receiver_.reset();
+ target_loader_.reset();
+
+ // Don't delete |this| yet, in case the |proxied_loader_receiver_|'s
// error_handler is called with a reason to indicate an error which we want
// to send to the client bridge. Also reset |target_client_| so we don't
// get its error_handler called and then delete |this|.
target_client_.reset();
- // Since the original client is gone no need to continue loading the
- // request.
- proxied_client_binding_.Close();
- target_loader_.reset();
-
// In case there are pending checks as to whether this request should be
// intercepted, we don't want that causing |target_client_| to be used
// later.
@@ -523,10 +522,10 @@ void ProxyingURLLoaderFactoryQt::CreateProxy(int process_id,
new ProxyingURLLoaderFactoryQt(process_id, resourceContext, std::move(loader_receiver), std::move(target_factory_info));
}
-void ProxyingURLLoaderFactoryQt::CreateLoaderAndStart(network::mojom::URLLoaderRequest loader, int32_t routing_id,
- int32_t request_id, uint32_t options,
+void ProxyingURLLoaderFactoryQt::CreateLoaderAndStart(mojo::PendingReceiver<network::mojom::URLLoader> loader,
+ int32_t routing_id, int32_t request_id, uint32_t options,
const network::ResourceRequest &request,
- network::mojom::URLLoaderClientPtr client,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client,
const net::MutableNetworkTrafficAnnotationTag &traffic_annotation)
{
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
@@ -541,9 +540,9 @@ void ProxyingURLLoaderFactoryQt::CreateLoaderAndStart(network::mojom::URLLoaderR
return;
}
- network::mojom::URLLoaderFactoryPtr target_factory_clone;
+ mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory_clone;
if (m_targetFactory)
- m_targetFactory->Clone(mojo::MakeRequest(&target_factory_clone));
+ m_targetFactory->Clone(target_factory_clone.InitWithNewPipeAndPassReceiver());
// Will manage its own lifetime
InterceptedRequest *req = new InterceptedRequest(m_processId, request_id, routing_id, options, request,
diff --git a/src/core/net/proxying_url_loader_factory_qt.h b/src/core/net/proxying_url_loader_factory_qt.h
index 0a436fd81..ba19bab97 100644
--- a/src/core/net/proxying_url_loader_factory_qt.h
+++ b/src/core/net/proxying_url_loader_factory_qt.h
@@ -78,9 +78,10 @@ public:
mojo::PendingReceiver<network::mojom::URLLoaderFactory> loader_receiver,
network::mojom::URLLoaderFactoryPtrInfo target_factory_info);
- void CreateLoaderAndStart(network::mojom::URLLoaderRequest loader, int32_t routing_id, int32_t request_id,
+ void CreateLoaderAndStart(mojo::PendingReceiver<network::mojom::URLLoader> loader,
+ int32_t routing_id, int32_t request_id,
uint32_t options, const network::ResourceRequest &request,
- network::mojom::URLLoaderClientPtr client,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client,
const net::MutableNetworkTrafficAnnotationTag &traffic_annotation) override;
void Clone(mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver) override;
diff --git a/src/core/net/ssl_host_state_delegate_qt.cpp b/src/core/net/ssl_host_state_delegate_qt.cpp
index f327717e9..3f3f95c83 100644
--- a/src/core/net/ssl_host_state_delegate_qt.cpp
+++ b/src/core/net/ssl_host_state_delegate_qt.cpp
@@ -83,7 +83,7 @@ void SSLHostStateDelegateQt::AllowCert(const std::string &host, const net::X509C
}
// Clear all allow preferences.
-void SSLHostStateDelegateQt::Clear(const base::Callback<bool(const std::string &)> &host_filter)
+void SSLHostStateDelegateQt::Clear(base::RepeatingCallback<bool(const std::string&)> host_filter)
{
if (host_filter.is_null()) {
m_certPolicyforHost.clear();
diff --git a/src/core/net/ssl_host_state_delegate_qt.h b/src/core/net/ssl_host_state_delegate_qt.h
index b3b89f117..26e503eb5 100644
--- a/src/core/net/ssl_host_state_delegate_qt.h
+++ b/src/core/net/ssl_host_state_delegate_qt.h
@@ -67,7 +67,7 @@ public:
// content::SSLHostStateDelegate implementation:
void AllowCert(const std::string &, const net::X509Certificate &cert, int error) override;
- void Clear(const base::Callback<bool(const std::string &)> &host_filter) override;
+ void Clear(base::RepeatingCallback<bool(const std::string&)> host_filter) override;
CertJudgment QueryPolicy(const std::string &host, const net::X509Certificate &cert, int error) override;
void HostRanInsecureContent(const std::string &host, int child_id, InsecureContentType content_type) override;
bool DidHostRunInsecureContent(const std::string &host, int child_id, InsecureContentType content_type) override;
diff --git a/src/core/net/system_network_context_manager.cpp b/src/core/net/system_network_context_manager.cpp
index 2c5f49615..bc42a684d 100644
--- a/src/core/net/system_network_context_manager.cpp
+++ b/src/core/net/system_network_context_manager.cpp
@@ -74,7 +74,7 @@
#include "net/net_buildflags.h"
#include "net/third_party/uri_template/uri_template.h"
#include "services/network/network_service.h"
-#include "services/network/public/cpp/cross_thread_shared_url_loader_factory_info.h"
+#include "services/network/public/cpp/cross_thread_pending_shared_url_loader_factory.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/mojom/host_resolver.mojom.h"
@@ -122,19 +122,23 @@ public:
// mojom::URLLoaderFactory implementation:
- void CreateLoaderAndStart(network::mojom::URLLoaderRequest request, int32_t routing_id, int32_t request_id,
- uint32_t options, const network::ResourceRequest &url_request,
- network::mojom::URLLoaderClientPtr client,
+ void CreateLoaderAndStart(mojo::PendingReceiver<network::mojom::URLLoader> receiver,
+ int32_t routing_id,
+ int32_t request_id,
+ uint32_t options,
+ const network::ResourceRequest &url_request,
+ mojo::PendingRemote<network::mojom::URLLoaderClient> client,
const net::MutableNetworkTrafficAnnotationTag &traffic_annotation) override
{
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!manager_)
return;
- manager_->GetURLLoaderFactory()->CreateLoaderAndStart(std::move(request), routing_id, request_id, options,
- url_request, std::move(client), traffic_annotation);
+ manager_->GetURLLoaderFactory()->CreateLoaderAndStart(
+ std::move(receiver), routing_id, request_id, options, url_request,
+ std::move(client), traffic_annotation);
}
- void Clone(mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver)
+ void Clone(mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver) override
{
if (!manager_)
return;
@@ -142,10 +146,10 @@ public:
}
// SharedURLLoaderFactory implementation:
- std::unique_ptr<network::SharedURLLoaderFactoryInfo> Clone() override
+ std::unique_ptr<network::PendingSharedURLLoaderFactory> Clone() override
{
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- return std::make_unique<network::CrossThreadSharedURLLoaderFactoryInfo>(this);
+ return std::make_unique<network::CrossThreadPendingSharedURLLoaderFactory>(this);
}
void Shutdown() { manager_ = nullptr; }
diff --git a/src/core/ozone/BUILD.gn b/src/core/ozone/BUILD.gn
index b96d8a47a..4d27f8877 100644
--- a/src/core/ozone/BUILD.gn
+++ b/src/core/ozone/BUILD.gn
@@ -18,8 +18,4 @@ source_set("qt") {
]
defines = [ "OZONE_IMPLEMENTATION" ]
-
- if (is_linux && !is_desktop_linux) {
- deps += [ "//ui/events/ozone:events_ozone_evdev"]
- }
}
diff --git a/src/core/ozone/gl_ozone_glx_qt.cpp b/src/core/ozone/gl_ozone_glx_qt.cpp
index f934a5c80..0c54299ba 100644
--- a/src/core/ozone/gl_ozone_glx_qt.cpp
+++ b/src/core/ozone/gl_ozone_glx_qt.cpp
@@ -95,9 +95,10 @@ bool GLOzoneGLXQt::InitializeStaticGLBindings(
return true;
}
-void GLOzoneGLXQt::InitializeDebugGLBindings() {
- gl::InitializeDebugGLBindingsGL();
- gl::InitializeDebugGLBindingsGLX();
+void GLOzoneGLXQt::InitializeLogGLBindings()
+{
+ gl::InitializeLogGLBindingsGL();
+ gl::InitializeLogGLBindingsGLX();
}
void GLOzoneGLXQt::SetDisabledExtensionsPlatform(
diff --git a/src/core/ozone/gl_ozone_glx_qt.h b/src/core/ozone/gl_ozone_glx_qt.h
index 1596ea12f..8f85ea23b 100644
--- a/src/core/ozone/gl_ozone_glx_qt.h
+++ b/src/core/ozone/gl_ozone_glx_qt.h
@@ -54,7 +54,7 @@ public:
bool InitializeGLOneOffPlatform() override;
bool InitializeStaticGLBindings(gl::GLImplementation implementation) override;
- void InitializeDebugGLBindings() override;
+ void InitializeLogGLBindings() override;
bool InitializeExtensionSettingsOneOffPlatform() override;
void ShutdownGL() override;
void SetDisabledExtensionsPlatform(
diff --git a/src/core/ozone/ozone_platform_qt.cpp b/src/core/ozone/ozone_platform_qt.cpp
index 887bc167e..fb5af18c5 100644
--- a/src/core/ozone/ozone_platform_qt.cpp
+++ b/src/core/ozone/ozone_platform_qt.cpp
@@ -48,6 +48,7 @@
#include "ui/ozone/public/gpu_platform_support_host.h"
#include "ui/ozone/public/input_controller.h"
#include "ui/ozone/public/ozone_platform.h"
+#include "ui/ozone/public/platform_screen.h"
#include "ui/ozone/public/system_input_injector.h"
#include "ui/platform_window/platform_window_delegate.h"
#include "ui/platform_window/platform_window_init_properties.h"
@@ -67,13 +68,13 @@ public:
ui::SurfaceFactoryOzone* GetSurfaceFactoryOzone() override;
ui::CursorFactoryOzone* GetCursorFactoryOzone() override;
GpuPlatformSupportHost* GetGpuPlatformSupportHost() override;
- std::unique_ptr<PlatformWindowBase> CreatePlatformWindow(PlatformWindowDelegate* delegate, PlatformWindowInitProperties properties) override;
+ std::unique_ptr<PlatformWindow> CreatePlatformWindow(PlatformWindowDelegate* delegate, PlatformWindowInitProperties properties) override;
std::unique_ptr<display::NativeDisplayDelegate> CreateNativeDisplayDelegate() override;
ui::InputController* GetInputController() override;
std::unique_ptr<ui::SystemInputInjector> CreateSystemInputInjector() override;
ui::OverlayManagerOzone* GetOverlayManager() override;
std::unique_ptr<InputMethod> CreateInputMethod(internal::InputMethodDelegate *delegate) override;
-
+ std::unique_ptr<ui::PlatformScreen> CreateScreen() override { return nullptr; }
private:
void InitializeUI(const ui::OzonePlatform::InitParams &) override;
void InitializeGPU(const ui::OzonePlatform::InitParams &) override;
@@ -108,7 +109,7 @@ GpuPlatformSupportHost* OzonePlatformQt::GetGpuPlatformSupportHost()
return gpu_platform_support_host_.get();
}
-std::unique_ptr<PlatformWindowBase> OzonePlatformQt::CreatePlatformWindow(PlatformWindowDelegate* delegate, PlatformWindowInitProperties properties)
+std::unique_ptr<PlatformWindow> OzonePlatformQt::CreatePlatformWindow(PlatformWindowDelegate* delegate, PlatformWindowInitProperties properties)
{
return base::WrapUnique(new PlatformWindowQt(delegate, properties.bounds));
}
diff --git a/src/core/ozone/platform_window_qt.h b/src/core/ozone/platform_window_qt.h
index 344e9b115..b1021df9d 100644
--- a/src/core/ozone/platform_window_qt.h
+++ b/src/core/ozone/platform_window_qt.h
@@ -45,12 +45,12 @@
#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
-#include "ui/platform_window/platform_window_base.h"
+#include "ui/platform_window/platform_window.h"
#include "ui/platform_window/platform_window_delegate.h"
namespace ui {
-class PlatformWindowQt : public PlatformWindowBase, public PlatformEventDispatcher
+class PlatformWindowQt : public PlatformWindow, public PlatformEventDispatcher
{
public:
PlatformWindowQt(PlatformWindowDelegate* delegate, const gfx::Rect& bounds);
diff --git a/src/core/permission_manager_qt.cpp b/src/core/permission_manager_qt.cpp
index decc6dd7c..c6eb2c238 100644
--- a/src/core/permission_manager_qt.cpp
+++ b/src/core/permission_manager_qt.cpp
@@ -82,6 +82,7 @@ ProfileAdapter::PermissionType toQt(content::PermissionType type)
case content::PermissionType::PERIODIC_BACKGROUND_SYNC:
case content::PermissionType::WAKE_LOCK_SCREEN:
case content::PermissionType::WAKE_LOCK_SYSTEM:
+ case content::PermissionType::NFC:
case content::PermissionType::NUM:
NOTIMPLEMENTED() << "Unsupported permission type: " << static_cast<int>(type);
break;
diff --git a/src/core/printing/print_view_manager_base_qt.cpp b/src/core/printing/print_view_manager_base_qt.cpp
index 0cc334776..34c86e506 100644
--- a/src/core/printing/print_view_manager_base_qt.cpp
+++ b/src/core/printing/print_view_manager_base_qt.cpp
@@ -48,7 +48,6 @@
#include "web_engine_context.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_current.h"
#include "base/run_loop.h"
@@ -427,12 +426,8 @@ void PrintViewManagerBaseQt::ReleasePrintJob()
if (!m_printJob.get())
return;
- if (rfh) {
- auto msg = std::make_unique<PrintMsg_PrintingDone>(rfh->GetRoutingID(),
- m_didPrintingSucceed);
- rfh->Send(msg.release());
- }
-
+ if (rfh)
+ GetPrintRenderFrame(rfh)->PrintingDone(m_didPrintingSucceed);
m_registrar.Remove(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
content::Source<printing::PrintJob>(m_printJob.get()));
@@ -543,7 +538,7 @@ void PrintViewManagerBaseQt::StopWorker(int documentCookie)
void PrintViewManagerBaseQt::SendPrintingEnabled(bool enabled, content::RenderFrameHost* rfh)
{
- rfh->Send(new PrintMsg_SetPrintingEnabled(rfh->GetRoutingID(), enabled));
+ GetPrintRenderFrame(rfh)->SetPrintingEnabled(enabled);
}
} // namespace QtWebEngineCore
diff --git a/src/core/printing/print_view_manager_qt.cpp b/src/core/printing/print_view_manager_qt.cpp
index ebaad9a80..79e92fd6a 100644
--- a/src/core/printing/print_view_manager_qt.cpp
+++ b/src/core/printing/print_view_manager_qt.cpp
@@ -270,7 +270,7 @@ bool PrintViewManagerQt::PrintToPDFInternal(const QPageLayout &pageLayout,
return false;
content::RenderFrameHost* rfh = web_contents()->GetMainFrame();
- GetPrintRenderFrame(rfh)->InitiatePrintPreview(nullptr, false);
+ GetPrintRenderFrame(rfh)->InitiatePrintPreview(mojo::PendingAssociatedRemote<printing::mojom::PrintRenderer>(), false);
DCHECK(!m_printPreviewRfh);
m_printPreviewRfh = rfh;
diff --git a/src/core/printing/printing_message_filter_qt.h b/src/core/printing/printing_message_filter_qt.h
index 88559d3df..89e473dcf 100644
--- a/src/core/printing/printing_message_filter_qt.h
+++ b/src/core/printing/printing_message_filter_qt.h
@@ -50,10 +50,6 @@
#include "components/prefs/pref_member.h"
#include "content/public/browser/browser_message_filter.h"
-#if defined(OS_WIN)
-#include "base/memory/shared_memory.h"
-#endif
-
struct PrintHostMsg_PreviewIds;
struct PrintHostMsg_ScriptedPrint_Params;
diff --git a/src/core/qtwebengine.gni b/src/core/qtwebengine.gni
index f17f28495..a5628bb88 100644
--- a/src/core/qtwebengine.gni
+++ b/src/core/qtwebengine.gni
@@ -22,7 +22,7 @@ deps = [
"//components/keyed_service/content",
"//components/navigation_interception",
"//components/network_hints/browser",
- "//components/network_hints/common",
+ "//components/network_hints/common:mojo_bindings",
"//components/network_hints/renderer",
"//components/visitedlink/browser",
"//components/visitedlink/renderer",
@@ -34,7 +34,7 @@ deps = [
"//content/public/app:browser",
"//content",
"//media:media_buildflags",
- "//net:net_with_v8",
+ "//net",
"//services/proxy_resolver:lib",
"//skia",
"//third_party/blink/public:blink",
@@ -48,7 +48,7 @@ deps = [
]
if (enable_webrtc) {
- deps += [ "//third_party/webrtc_overrides" ]
+ deps += [ "//third_party/webrtc_overrides:webrtc_component" ]
}
if (use_ozone) {
diff --git a/src/core/qtwebengine_resources.gni b/src/core/qtwebengine_resources.gni
index 749546741..4f6c51d81 100644
--- a/src/core/qtwebengine_resources.gni
+++ b/src/core/qtwebengine_resources.gni
@@ -25,6 +25,7 @@ repack("qtwebengine_repack_resources") {
"$root_gen_dir/chrome/common_resources.pak",
"$root_gen_dir/chrome/quota_internals_resources.pak",
"$root_gen_dir/components/components_resources.pak",
+ "$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
"$root_gen_dir/net/net_resources.pak",
@@ -34,10 +35,11 @@ repack("qtwebengine_repack_resources") {
output = "$root_out_dir/qtwebengine_resources.pak"
deps = [
"//qtwebengine/browser:qt_webengine_resources",
- "//chrome/browser/resources:quota_internals_resources",
+ "//chrome/browser/resources/quota_internals:quota_internals_resources",
"//chrome/browser:resources_grit",
"//chrome/common:resources_grit",
"//components/resources:components_resources_grit",
+ "//content/browser/resources/media:media_internals_resources",
"//content:resources_grit",
"//mojo/public/js:resources",
"//net:net_resources_grit",
@@ -58,6 +60,14 @@ repack("qtwebengine_repack_resources") {
]
}
+ if (enable_webrtc) {
+ sources += [
+ "$root_gen_dir/content/browser/webrtc/resources/webrtc_internals_resources.pak",
+ ]
+ deps += [
+ "//content/browser/webrtc/resources",
+ ]
+ }
}
repack("qtwebengine_repack_resources_100") {
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index c1b1791cf..813ce4be9 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -1840,7 +1840,6 @@ const viz::LocalSurfaceIdAllocation &RenderWidgetHostViewQt::GetLocalSurfaceIdAl
void RenderWidgetHostViewQt::TakeFallbackContentFrom(content::RenderWidgetHostView *view)
{
DCHECK(!static_cast<RenderWidgetHostViewBase*>(view)->IsRenderWidgetHostViewChildFrame());
- DCHECK(!static_cast<RenderWidgetHostViewBase*>(view)->IsRenderWidgetHostViewGuest());
RenderWidgetHostViewQt *viewQt = static_cast<RenderWidgetHostViewQt *>(view);
base::Optional<SkColor> color = viewQt->GetBackgroundColor();
if (color)
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index f7c8a497b..b2138a82a 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -39,7 +39,6 @@
#include "renderer/content_renderer_client_qt.h"
-#include "common/qt_messages.h"
#include "extensions/buildflags/buildflags.h"
#include "printing/buildflags/buildflags.h"
#include "renderer/content_settings_observer_qt.h"
@@ -53,20 +52,20 @@
#include "components/error_page/common/error.h"
#include "components/error_page/common/error_page_params.h"
#include "components/error_page/common/localized_error.h"
-#include "components/network_hints/renderer/prescient_networking_dispatcher.h"
+#include "components/network_hints/renderer/web_prescient_networking_impl.h"
#if QT_CONFIG(webengine_printing_and_pdf)
#include "components/printing/renderer/print_render_frame_helper.h"
#endif
-#include "components/visitedlink/renderer/visitedlink_slave.h"
+#include "components/visitedlink/renderer/visitedlink_reader.h"
#include "components/web_cache/renderer/web_cache_impl.h"
#include "content/public/renderer/render_frame.h"
#include "content/public/child/child_thread.h"
-#include "content/public/common/service_manager_connection.h"
-#include "content/public/common/simple_connection_filter.h"
+#include "content/public/common/url_constants.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "media/base/key_system_properties.h"
#include "media/media_buildflags.h"
+#include "mojo/public/cpp/bindings/binder_map.h"
#include "net/base/net_errors.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/interface_provider.h"
@@ -82,6 +81,7 @@
#include "renderer/print_web_view_helper_delegate_qt.h"
#endif
+#include "common/qt_messages.h"
#include "renderer/render_frame_observer_qt.h"
#include "renderer/render_view_observer_qt.h"
#include "renderer/render_thread_observer_qt.h"
@@ -134,16 +134,9 @@ void ContentRendererClientQt::RenderThreadStarted()
{
content::RenderThread *renderThread = content::RenderThread::Get();
m_renderThreadObserver.reset(new RenderThreadObserverQt());
- m_visitedLinkSlave.reset(new visitedlink::VisitedLinkSlave);
+ m_visitedLinkReader.reset(new visitedlink::VisitedLinkReader);
m_webCacheImpl.reset(new web_cache::WebCacheImpl());
- m_prescientNetworkingDispatcher.reset(new network_hints::PrescientNetworkingDispatcher());
-
- auto registry = std::make_unique<service_manager::BinderRegistry>();
- registry->AddInterface(m_visitedLinkSlave->GetBindCallback(), base::ThreadTaskRunnerHandle::Get());
- content::ChildThread::Get()->GetServiceManagerConnection()->AddConnectionFilter(
- std::make_unique<content::SimpleConnectionFilter>(std::move(registry)));
-
renderThread->AddObserver(m_renderThreadObserver.data());
renderThread->AddObserver(UserResourceController::instance());
@@ -174,6 +167,26 @@ void ContentRendererClientQt::RenderThreadStarted()
#endif
}
+void ContentRendererClientQt::ExposeInterfacesToBrowser(mojo::BinderMap* binders)
+{
+ binders->Add(m_visitedLinkReader->GetBindCallback(), base::SequencedTaskRunnerHandle::Get());
+
+ binders->Add(base::BindRepeating(&web_cache::WebCacheImpl::BindReceiver,
+ base::Unretained(m_webCacheImpl.get())),
+ base::SequencedTaskRunnerHandle::Get());
+
+#if QT_CONFIG(webengine_spellchecker)
+ binders->Add(base::BindRepeating(
+ [](ContentRendererClientQt *client,
+ mojo::PendingReceiver<spellcheck::mojom::SpellChecker> receiver) {
+ if (!client->m_spellCheck)
+ client->InitSpellCheck();
+ client->m_spellCheck->BindReceiver(std::move(receiver));
+ }, this),
+ base::SequencedTaskRunnerHandle::Get());
+#endif
+}
+
void ContentRendererClientQt::RenderViewCreated(content::RenderView *render_view)
{
// RenderViewObservers destroy themselves with their RenderView.
@@ -298,7 +311,7 @@ void ContentRendererClientQt::GetNavigationErrorStringsInternal(content::RenderF
resourceId = IDR_NET_ERROR_HTML;
- std::string extracted_string = ui::ResourceBundle::GetSharedInstance().DecompressDataResource(resourceId);
+ std::string extracted_string = ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(resourceId);
const base::StringPiece template_html(extracted_string.data(), extracted_string.size());
if (template_html.empty())
NOTREACHED() << "unable to load template. ID: " << resourceId;
@@ -309,17 +322,17 @@ void ContentRendererClientQt::GetNavigationErrorStringsInternal(content::RenderF
uint64_t ContentRendererClientQt::VisitedLinkHash(const char *canonicalUrl, size_t length)
{
- return m_visitedLinkSlave->ComputeURLFingerprint(canonicalUrl, length);
+ return m_visitedLinkReader->ComputeURLFingerprint(canonicalUrl, length);
}
bool ContentRendererClientQt::IsLinkVisited(uint64_t linkHash)
{
- return m_visitedLinkSlave->IsVisited(linkHash);
+ return m_visitedLinkReader->IsVisited(linkHash);
}
-blink::WebPrescientNetworking *ContentRendererClientQt::GetPrescientNetworking()
+std::unique_ptr<blink::WebPrescientNetworking> ContentRendererClientQt::CreatePrescientNetworking(content::RenderFrame *render_frame)
{
- return m_prescientNetworkingDispatcher.get();
+ return std::make_unique<network_hints::WebPrescientNetworkingImpl>(render_frame);
}
bool ContentRendererClientQt::OverrideCreatePlugin(content::RenderFrame *render_frame,
@@ -586,25 +599,32 @@ void ContentRendererClientQt::AddSupportedKeySystems(std::vector<std::unique_ptr
#if QT_CONFIG(webengine_spellchecker)
void ContentRendererClientQt::InitSpellCheck()
{
- m_spellCheck.reset(new SpellCheck(&m_registry, this));
+ m_spellCheck.reset(new SpellCheck(this));
}
#endif
void ContentRendererClientQt::WillSendRequest(blink::WebLocalFrame *frame,
ui::PageTransition transition_type,
const blink::WebURL &url,
+ const blink::WebURL &site_for_cookies,
const url::Origin *initiator_origin,
GURL *new_url,
bool *attach_same_site_cookies)
{
#if BUILDFLAG(ENABLE_EXTENSIONS)
- ExtensionsRendererClientQt::GetInstance()->WillSendRequest(frame, transition_type, url, initiator_origin, new_url,
- attach_same_site_cookies);
+ ExtensionsRendererClientQt::GetInstance()->WillSendRequest(frame, transition_type, url, /*site_for_cookies,*/
+ initiator_origin, new_url, attach_same_site_cookies);
if (!new_url->is_empty())
return;
#endif
- content::ContentRendererClient::WillSendRequest(frame, transition_type, url, initiator_origin, new_url,
- attach_same_site_cookies);
+}
+
+bool ContentRendererClientQt::RequiresWebComponentsV0(const GURL &url)
+{
+ Q_UNUSED(url);
+ // Google services still presents pages using these features
+ // to Chromium 80 based browsers (YouTube in particular).
+ return true;
}
} // namespace QtWebEngineCore
diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h
index da70d29a8..f2e725453 100644
--- a/src/core/renderer/content_renderer_client_qt.h
+++ b/src/core/renderer/content_renderer_client_qt.h
@@ -57,12 +57,8 @@ namespace error_page {
class Error;
}
-namespace network_hints {
-class PrescientNetworkingDispatcher;
-}
-
namespace visitedlink {
-class VisitedLinkSlave;
+class VisitedLinkReader;
}
namespace web_cache {
@@ -91,6 +87,7 @@ public:
// content::ContentRendererClient:
void RenderThreadStarted() override;
+ void ExposeInterfacesToBrowser(mojo::BinderMap* binders) override;
void RenderViewCreated(content::RenderView *render_view) override;
void RenderFrameCreated(content::RenderFrame *render_frame) override;
bool ShouldSuppressErrorPage(content::RenderFrame *, const GURL &) override;
@@ -108,7 +105,7 @@ public:
uint64_t VisitedLinkHash(const char *canonical_url, size_t length) override;
bool IsLinkVisited(uint64_t linkHash) override;
- blink::WebPrescientNetworking *GetPrescientNetworking() override;
+ std::unique_ptr<blink::WebPrescientNetworking> CreatePrescientNetworking(content::RenderFrame *render_frame) override;
void AddSupportedKeySystems(std::vector<std::unique_ptr<media::KeySystemProperties>> *key_systems) override;
void RunScriptsAtDocumentStart(content::RenderFrame *render_frame) override;
@@ -125,11 +122,13 @@ public:
void WillSendRequest(blink::WebLocalFrame *frame,
ui::PageTransition transition_type,
const blink::WebURL &url,
+ const blink::WebURL &site_for_cookies,
const url::Origin *initiator_origin,
GURL *new_url,
bool *attach_same_site_cookies) override;
void BindReceiverOnMainThread(mojo::GenericPendingReceiver receiver) override;
+ bool RequiresWebComponentsV0(const GURL &url) override;
#if BUILDFLAG(ENABLE_PLUGINS)
static blink::WebPlugin* CreatePlugin(content::RenderFrame* render_frame,
@@ -148,14 +147,13 @@ private:
const error_page::Error &error, std::string *errorHtml);
QScopedPointer<RenderThreadObserverQt> m_renderThreadObserver;
- QScopedPointer<visitedlink::VisitedLinkSlave> m_visitedLinkSlave;
+ QScopedPointer<visitedlink::VisitedLinkReader> m_visitedLinkReader;
QScopedPointer<web_cache::WebCacheImpl> m_webCacheImpl;
#if QT_CONFIG(webengine_spellchecker)
QScopedPointer<SpellCheck> m_spellCheck;
#endif
service_manager::BinderRegistry m_registry;
- std::unique_ptr<network_hints::PrescientNetworkingDispatcher> m_prescientNetworkingDispatcher;
DISALLOW_COPY_AND_ASSIGN(ContentRendererClientQt);
};
diff --git a/src/core/renderer/content_settings_observer_qt.cpp b/src/core/renderer/content_settings_observer_qt.cpp
index fc7019367..df9b77037 100644
--- a/src/core/renderer/content_settings_observer_qt.cpp
+++ b/src/core/renderer/content_settings_observer_qt.cpp
@@ -59,8 +59,8 @@ namespace {
bool IsUniqueFrame(blink::WebFrame *frame)
{
- return frame->GetSecurityOrigin().IsUnique() ||
- frame->Top()->GetSecurityOrigin().IsUnique();
+ return frame->GetSecurityOrigin().IsOpaque() ||
+ frame->Top()->GetSecurityOrigin().IsOpaque();
}
} // namespace
@@ -139,14 +139,15 @@ void ContentSettingsObserverQt::RequestFileSystemAccessAsync(base::OnceCallback<
url::Origin(frame->Top()->GetSecurityOrigin()).GetURL()));
}
-bool ContentSettingsObserverQt::AllowIndexedDB(const WebSecurityOrigin &origin)
+bool ContentSettingsObserverQt::AllowIndexedDB()
{
blink::WebFrame *frame = render_frame()->GetWebFrame();
if (IsUniqueFrame(frame))
return false;
bool result = false;
- Send(new QtWebEngineHostMsg_AllowIndexedDB(routing_id(), url::Origin(origin).GetURL(),
+ Send(new QtWebEngineHostMsg_AllowIndexedDB(routing_id(),
+ url::Origin(frame->GetSecurityOrigin()).GetURL(),
url::Origin(frame->Top()->GetSecurityOrigin()).GetURL(), &result));
return result;
}
diff --git a/src/core/renderer/content_settings_observer_qt.h b/src/core/renderer/content_settings_observer_qt.h
index 71e1fbca5..0c69d289c 100644
--- a/src/core/renderer/content_settings_observer_qt.h
+++ b/src/core/renderer/content_settings_observer_qt.h
@@ -69,7 +69,7 @@ public:
// blink::WebContentSettingsClient:
bool AllowDatabase() override;
void RequestFileSystemAccessAsync(base::OnceCallback<void(bool)> callback) override;
- bool AllowIndexedDB(const blink::WebSecurityOrigin &origin) override;
+ bool AllowIndexedDB() override;
bool AllowStorage(bool local) override;
private:
diff --git a/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp
index bd93f0dd3..6e9efb5ad 100644
--- a/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp
+++ b/src/core/renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp
@@ -58,7 +58,7 @@
#include "ppapi/host/ppapi_host.h"
#include "ppapi/proxy/ppapi_messages.h"
#include "ppapi/shared_impl/file_system_util.h"
-#include "storage/browser/fileapi/isolated_context.h"
+#include "storage/browser/file_system/isolated_context.h"
namespace QtWebEngineCore {
diff --git a/src/core/renderer_host/web_channel_ipc_transport_host.cpp b/src/core/renderer_host/web_channel_ipc_transport_host.cpp
index c071a566a..9ed3749ad 100644
--- a/src/core/renderer_host/web_channel_ipc_transport_host.cpp
+++ b/src/core/renderer_host/web_channel_ipc_transport_host.cpp
@@ -74,7 +74,7 @@ WebChannelIPCTransportHost::WebChannelIPCTransportHost(content::WebContents *con
: QWebChannelAbstractTransport(parent)
, content::WebContentsObserver(contents)
, m_worldId(worldId)
- , m_binding(contents, this)
+ , m_receiver(contents, this)
{
for (content::RenderFrameHost *frame : contents->GetAllFrames())
setWorldId(frame, worldId);
@@ -136,7 +136,7 @@ void WebChannelIPCTransportHost::DispatchWebChannelMessage(const std::vector<uin
{
content::RenderFrameHost *frame = web_contents()->GetMainFrame();
- if (m_binding.GetCurrentTargetFrame() != frame) {
+ if (m_receiver.GetCurrentTargetFrame() != frame) {
return;
}
diff --git a/src/core/renderer_host/web_channel_ipc_transport_host.h b/src/core/renderer_host/web_channel_ipc_transport_host.h
index d53b24b6b..a1575355a 100644
--- a/src/core/renderer_host/web_channel_ipc_transport_host.h
+++ b/src/core/renderer_host/web_channel_ipc_transport_host.h
@@ -43,8 +43,7 @@
#include "qtwebenginecoreglobal.h"
#include "content/public/browser/web_contents_observer.h"
-#include "services/service_manager/public/cpp/binder_registry.h"
-#include "content/public/browser/web_contents_binding_set.h"
+#include "content/public/browser/web_contents_receiver_set.h"
#include "qtwebengine/browser/qtwebchannel.mojom.h"
#include <QWebChannelAbstractTransport>
@@ -82,7 +81,7 @@ private:
// Empty only during construction/destruction. Synchronized to all the
// WebChannelIPCTransports/RenderFrames in the observed WebContents.
uint32_t m_worldId;
- content::WebContentsFrameBindingSet<qtwebchannel::mojom::WebChannelTransportHost> m_binding;
+ content::WebContentsFrameReceiverSet<qtwebchannel::mojom::WebChannelTransportHost> m_receiver;
};
} // namespace
diff --git a/src/core/resource_bundle_qt.cpp b/src/core/resource_bundle_qt.cpp
index 0e80859ae..61b0f3021 100644
--- a/src/core/resource_bundle_qt.cpp
+++ b/src/core/resource_bundle_qt.cpp
@@ -87,7 +87,7 @@ bool ResourceBundle::LocaleDataPakExists(const std::string& locale)
}
#endif
- return !GetLocaleFilePath(locale, true).empty();
+ return !GetLocaleFilePath(locale).empty();
}
std::string ResourceBundle::LoadLocaleResources(const std::string& pref_locale)
@@ -108,7 +108,7 @@ std::string ResourceBundle::LoadLocaleResources(const std::string& pref_locale)
base::FilePath locale_file_path = GetOverriddenPakPath();
if (locale_file_path.empty())
- locale_file_path = GetLocaleFilePath(app_locale, true);
+ locale_file_path = GetLocaleFilePath(app_locale);
if (locale_file_path.empty()) {
// It's possible that there is no locale.pak.
diff --git a/src/core/visited_links_manager_qt.cpp b/src/core/visited_links_manager_qt.cpp
index d4885e8e8..37343cc39 100644
--- a/src/core/visited_links_manager_qt.cpp
+++ b/src/core/visited_links_manager_qt.cpp
@@ -45,12 +45,12 @@
#include <base/files/file_util.h>
#include "components/visitedlink/browser/visitedlink_delegate.h"
-#include "components/visitedlink/browser/visitedlink_master.h"
+#include "components/visitedlink/browser/visitedlink_writer.h"
namespace QtWebEngineCore {
namespace {
-class BasicUrlIterator : public visitedlink::VisitedLinkMaster::URLIterator {
+class BasicUrlIterator : public visitedlink::VisitedLinkWriter::URLIterator {
public:
BasicUrlIterator(const QList<QUrl> &urls) : m_urls(urls) {}
virtual const GURL& NextURL() { m_currentUrl = toGurl(m_urls.takeFirst()); return m_currentUrl; }
@@ -76,18 +76,18 @@ public:
void VisitedLinksManagerQt::deleteAllVisitedLinkData()
{
- m_visitedLinkMaster->DeleteAllURLs();
+ m_visitedLinkWriter->DeleteAllURLs();
}
void VisitedLinksManagerQt::deleteVisitedLinkDataForUrls(const QList<QUrl> &urlsToDelete)
{
BasicUrlIterator iterator(urlsToDelete);
- m_visitedLinkMaster->DeleteURLs(&iterator);
+ m_visitedLinkWriter->DeleteURLs(&iterator);
}
bool VisitedLinksManagerQt::containsUrl(const QUrl &url) const
{
- return m_visitedLinkMaster->IsVisited(toGurl(url));
+ return m_visitedLinkWriter->IsVisited(toGurl(url));
}
static void ensureDirectoryExists(const base::FilePath &path)
@@ -111,8 +111,8 @@ VisitedLinksManagerQt::VisitedLinksManagerQt(ProfileQt *profile, bool persistVis
Q_ASSERT(profile);
if (persistVisitedLinks)
ensureDirectoryExists(profile->GetPath());
- m_visitedLinkMaster.reset(new visitedlink::VisitedLinkMaster(profile, m_delegate.data(), persistVisitedLinks));
- m_visitedLinkMaster->Init();
+ m_visitedLinkWriter.reset(new visitedlink::VisitedLinkWriter(profile, m_delegate.data(), persistVisitedLinks));
+ m_visitedLinkWriter->Init();
}
VisitedLinksManagerQt::~VisitedLinksManagerQt()
@@ -121,8 +121,8 @@ VisitedLinksManagerQt::~VisitedLinksManagerQt()
void VisitedLinksManagerQt::addUrl(const GURL &urlToAdd)
{
- Q_ASSERT(m_visitedLinkMaster);
- m_visitedLinkMaster->AddURL(urlToAdd);
+ Q_ASSERT(m_visitedLinkWriter);
+ m_visitedLinkWriter->AddURL(urlToAdd);
}
} // namespace QtWebEngineCore
diff --git a/src/core/visited_links_manager_qt.h b/src/core/visited_links_manager_qt.h
index ecac8f30f..c4e24ce1f 100644
--- a/src/core/visited_links_manager_qt.h
+++ b/src/core/visited_links_manager_qt.h
@@ -60,7 +60,7 @@ class QUrl;
QT_END_NAMESPACE
namespace visitedlink {
-class VisitedLinkMaster;
+class VisitedLinkWriter;
}
class GURL;
@@ -85,7 +85,7 @@ private:
void addUrl(const GURL &);
friend class WebContentsDelegateQt;
- QScopedPointer<visitedlink::VisitedLinkMaster> m_visitedLinkMaster;
+ QScopedPointer<visitedlink::VisitedLinkWriter> m_visitedLinkWriter;
QScopedPointer<VisitedLinkDelegateQt> m_delegate;
};
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 9cecb9ecb..61f8e5da0 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -86,9 +86,9 @@
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
#include "extensions/buildflags/buildflags.h"
+#include "third_party/blink/public/common/media/media_player_action.h"
#include "third_party/blink/public/common/page/page_zoom.h"
#include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h"
-#include "third_party/blink/public/web/web_media_player_action.h"
#include "printing/buildflags/buildflags.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/clipboard_constants.h"
@@ -239,7 +239,7 @@ static void callbackOnPdfSavingFinished(WebContentsAdapterClient *adapterClient,
static std::unique_ptr<content::WebContents> createBlankWebContents(WebContentsAdapterClient *adapterClient, content::BrowserContext *browserContext)
{
- content::WebContents::CreateParams create_params(browserContext, NULL);
+ content::WebContents::CreateParams create_params(browserContext, nullptr);
create_params.routing_id = MSG_ROUTING_NONE;
create_params.initially_hidden = true;
@@ -1175,22 +1175,22 @@ void WebContentsAdapter::copyImageAt(const QPoint &location)
m_webContents->GetRenderViewHost()->GetMainFrame()->CopyImageAt(location.x(), location.y());
}
-static blink::WebMediaPlayerAction::Type toBlinkMediaPlayerActionType(WebContentsAdapter::MediaPlayerAction action)
+static blink::MediaPlayerAction::Type toBlinkMediaPlayerActionType(WebContentsAdapter::MediaPlayerAction action)
{
switch (action) {
case WebContentsAdapter::MediaPlayerPlay:
- return blink::WebMediaPlayerAction::Type::kPlay;
+ return blink::MediaPlayerAction::Type::kPlay;
case WebContentsAdapter::MediaPlayerMute:
- return blink::WebMediaPlayerAction::Type::kMute;
+ return blink::MediaPlayerAction::Type::kMute;
case WebContentsAdapter::MediaPlayerLoop:
- return blink::WebMediaPlayerAction::Type::kLoop;
+ return blink::MediaPlayerAction::Type::kLoop;
case WebContentsAdapter::MediaPlayerControls:
- return blink::WebMediaPlayerAction::Type::kControls;
+ return blink::MediaPlayerAction::Type::kControls;
case WebContentsAdapter::MediaPlayerNoAction:
break;
}
NOTREACHED();
- return (blink::WebMediaPlayerAction::Type)-1;
+ return (blink::MediaPlayerAction::Type)-1;
}
void WebContentsAdapter::executeMediaPlayerActionAt(const QPoint &location, MediaPlayerAction action, bool enable)
@@ -1198,7 +1198,7 @@ void WebContentsAdapter::executeMediaPlayerActionAt(const QPoint &location, Medi
CHECK_INITIALIZED();
if (action == MediaPlayerNoAction)
return;
- blink::WebMediaPlayerAction blinkAction(toBlinkMediaPlayerActionType(action), enable);
+ blink::MediaPlayerAction blinkAction(toBlinkMediaPlayerActionType(action), enable);
m_webContents->GetRenderViewHost()->GetMainFrame()->ExecuteMediaPlayerActionAtLocation(toGfx(location), blinkAction);
}
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index e97536593..d1cdb8d9f 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -156,7 +156,7 @@ content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents
load_url_params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE;
load_url_params.href_translate = params.href_translate;
load_url_params.reload_type = params.reload_type;
- if (params.uses_post) {
+ if (params.post_data) {
load_url_params.load_type = content::NavigationController::LOAD_TYPE_HTTP_POST;
load_url_params.post_data = params.post_data;
}
@@ -255,7 +255,7 @@ void WebContentsDelegateQt::CloseContents(content::WebContents *source)
GetJavaScriptDialogManager(source)->CancelDialogs(source, /* whatever?: */false);
}
-void WebContentsDelegateQt::LoadProgressChanged(content::WebContents */*source*/, double progress)
+void WebContentsDelegateQt::LoadProgressChanged(double progress)
{
if (!m_loadingErrorFrameList.isEmpty())
return;
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index 6818fa551..81d6c8671 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -122,7 +122,7 @@ public:
void NavigationStateChanged(content::WebContents* source, content::InvalidateTypes changed_flags) override;
void AddNewContents(content::WebContents *source, std::unique_ptr<content::WebContents> new_contents, WindowOpenDisposition disposition, const gfx::Rect &initial_pos, bool user_gesture, bool *was_blocked) override;
void CloseContents(content::WebContents *source) override;
- void LoadProgressChanged(content::WebContents* source, double progress) override;
+ void LoadProgressChanged(double progress) override;
bool HandleKeyboardEvent(content::WebContents *source, const content::NativeWebKeyboardEvent &event) override;
content::ColorChooser* OpenColorChooser(content::WebContents *source, SkColor color, const std::vector<blink::mojom::ColorSuggestionPtr> &suggestions) override;
void WebContentsCreated(content::WebContents *source_contents, int opener_render_process_id, int opener_render_frame_id,
diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp
index 139450cd8..7f6bfe34f 100644
--- a/src/core/web_contents_view_qt.cpp
+++ b/src/core/web_contents_view_qt.cpp
@@ -57,6 +57,8 @@
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/context_menu_params.h"
+#include "third_party/blink/public/common/context_menu_data/edit_flags.h"
+#include "third_party/blink/public/common/context_menu_data/media_type.h"
#include "ui/gfx/image/image_skia.h"
#include <QtGui/qpixmap.h>
@@ -87,7 +89,7 @@ void WebContentsViewQt::setClient(WebContentsAdapterClient* client)
}
}
-content::RenderWidgetHostViewBase* WebContentsViewQt::CreateViewForWidget(content::RenderWidgetHost* render_widget_host, bool is_guest_view_hack)
+content::RenderWidgetHostViewBase* WebContentsViewQt::CreateViewForWidget(content::RenderWidgetHost *render_widget_host)
{
RenderWidgetHostViewQt *view = new RenderWidgetHostViewQt(render_widget_host);
@@ -158,13 +160,13 @@ void WebContentsViewQt::FocusThroughTabTraversal(bool reverse)
}
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeNone, blink::WebContextMenuData::kMediaTypeNone)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeImage, blink::WebContextMenuData::kMediaTypeImage)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeVideo, blink::WebContextMenuData::kMediaTypeVideo)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeAudio, blink::WebContextMenuData::kMediaTypeAudio)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeCanvas, blink::WebContextMenuData::kMediaTypeCanvas)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeFile, blink::WebContextMenuData::kMediaTypeFile)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypePlugin, blink::WebContextMenuData::kMediaTypePlugin)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeNone, blink::ContextMenuDataMediaType::kNone)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeImage, blink::ContextMenuDataMediaType::kImage)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeVideo, blink::ContextMenuDataMediaType::kVideo)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeAudio, blink::ContextMenuDataMediaType::kAudio)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeCanvas, blink::ContextMenuDataMediaType::kCanvas)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypeFile, blink::ContextMenuDataMediaType::kFile)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaTypePlugin, blink::ContextMenuDataMediaType::kPlugin)
ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaNone, blink::WebContextMenuData::kMediaNone)
ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaInError, blink::WebContextMenuData::kMediaInError)
@@ -178,16 +180,16 @@ ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaControls, blink::WebContextMen
ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaCanPrint, blink::WebContextMenuData::kMediaCanPrint)
ASSERT_ENUMS_MATCH(WebEngineContextMenuData::MediaCanRotate, blink::WebContextMenuData::kMediaCanRotate)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanDoNone, blink::WebContextMenuData::kCanDoNone)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanUndo, blink::WebContextMenuData::kCanUndo)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanRedo, blink::WebContextMenuData::kCanRedo)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanCut, blink::WebContextMenuData::kCanCut)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanCopy, blink::WebContextMenuData::kCanCopy)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanPaste, blink::WebContextMenuData::kCanPaste)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanDelete, blink::WebContextMenuData::kCanDelete)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanSelectAll, blink::WebContextMenuData::kCanSelectAll)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanTranslate, blink::WebContextMenuData::kCanTranslate)
-ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanEditRichly, blink::WebContextMenuData::kCanEditRichly)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanDoNone, blink::kCanDoNone)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanUndo, blink::kCanUndo)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanRedo, blink::kCanRedo)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanCut, blink::kCanCut)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanCopy, blink::kCanCopy)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanPaste, blink::kCanPaste)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanDelete, blink::kCanDelete)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanSelectAll, blink::kCanSelectAll)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanTranslate, blink::kCanTranslate)
+ASSERT_ENUMS_MATCH(WebEngineContextMenuData::CanEditRichly, blink::kCanEditRichly)
static inline WebEngineContextMenuData fromParams(const content::ContextMenuParams &params)
{
diff --git a/src/core/web_contents_view_qt.h b/src/core/web_contents_view_qt.h
index 6f5ffdb86..3dcb648bf 100644
--- a/src/core/web_contents_view_qt.h
+++ b/src/core/web_contents_view_qt.h
@@ -70,7 +70,7 @@ public:
WebContentsAdapterClient *client() { return m_client; }
// content::WebContentsView overrides:
- content::RenderWidgetHostViewBase *CreateViewForWidget(content::RenderWidgetHost* render_widget_host, bool is_guest_view_hack) override;
+ content::RenderWidgetHostViewBase *CreateViewForWidget(content::RenderWidgetHost *render_widget_host) override;
void CreateView(gfx::NativeView context) override;
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 1fa12885f..5e6a18e5b 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -589,9 +589,10 @@ WebEngineContext::WebEngineContext()
appendToFeatureList(disableFeatures, features::kFontSrcLocalMatching.name);
#endif
-#if QT_CONFIG(webengine_printing_and_pdf)
- appendToFeatureList(disableFeatures, printing::features::kUsePdfCompositorServiceForPrint.name);
-#endif
+ // We don't support the skia renderer (enabled by default on Linux since 80)
+ appendToFeatureList(disableFeatures, features::kUseSkiaRenderer.name);
+
+ appendToFeatureList(disableFeatures, network::features::kDnsOverHttpsUpgrade.name);
// Explicitly tell Chromium about default-on features we do not support
appendToFeatureList(disableFeatures, features::kBackgroundFetch.name);
@@ -629,7 +630,7 @@ WebEngineContext::WebEngineContext()
// Viz Display Compositor is enabled by default since 73. Doesn't work for us (also implies SurfaceSynchronization)
appendToFeatureList(disableFeatures, features::kVizDisplayCompositor.name);
// VideoSurfaceLayer is enabled by default since 75. We don't support it.
- appendToFeatureList(disableFeatures, media::kUseSurfaceLayerForVideo.name);
+ appendToFeatureList(enableFeatures, media::kDisableSurfaceLayerForVideo.name);
}
appendToFeatureSwitch(parsedCommandLine, switches::kDisableFeatures, disableFeatures);
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index c54570b33..edd72a117 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -404,18 +404,23 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p
// Set the theme colors. Based on chrome_content_browser_client.cc:
const ui::NativeTheme *webTheme = ui::NativeTheme::GetInstanceForWeb();
- if (webTheme) {
- switch (webTheme->GetPreferredColorScheme()) {
- case ui::NativeTheme::PreferredColorScheme::kDark:
- prefs->preferred_color_scheme = blink::PreferredColorScheme::kDark;
- break;
- case ui::NativeTheme::PreferredColorScheme::kLight:
- prefs->preferred_color_scheme = blink::PreferredColorScheme::kLight;
- break;
- case ui::NativeTheme::PreferredColorScheme::kNoPreference:
- prefs->preferred_color_scheme = blink::PreferredColorScheme::kNoPreference;
- }
- }
+ // WebPreferences::preferred_color_scheme was deleted in Chromium 80, but it
+ // will make a comeback in Chromium 82...
+ //
+ // See also: https://chromium-review.googlesource.com/c/chromium/src/+/2079192
+ //
+ // if (webTheme) {
+ // switch (webTheme->GetPreferredColorScheme()) {
+ // case ui::NativeTheme::PreferredColorScheme::kDark:
+ // prefs->preferred_color_scheme = blink::PreferredColorScheme::kDark;
+ // break;
+ // case ui::NativeTheme::PreferredColorScheme::kLight:
+ // prefs->preferred_color_scheme = blink::PreferredColorScheme::kLight;
+ // break;
+ // case ui::NativeTheme::PreferredColorScheme::kNoPreference:
+ // prefs->preferred_color_scheme = blink::PreferredColorScheme::kNoPreference;
+ // }
+ // }
// Apply native CaptionStyle parameters.
base::Optional<ui::CaptionStyle> style;
diff --git a/src/webengine/api/qquickwebenginecertificateerror.cpp b/src/webengine/api/qquickwebenginecertificateerror.cpp
index 855e61817..63beb1bae 100644
--- a/src/webengine/api/qquickwebenginecertificateerror.cpp
+++ b/src/webengine/api/qquickwebenginecertificateerror.cpp
@@ -200,6 +200,10 @@ QUrl QQuickWebEngineCertificateError::url() const
\value WebEngineCertificateError.CertificateTransparencyRequired
Certificate Transparency was required for this connection, but the server
did not provide CT information that complied with the policy. (Added in 5.8)
+ \value WebEngineCertificateError.CertificateKnownInterceptionBlocked
+ The certificate is known to be used for interception by an entity other
+ the device owner. (Added in 5.15)
+
*/
QQuickWebEngineCertificateError::Error QQuickWebEngineCertificateError::error() const
{
diff --git a/src/webengine/api/qquickwebenginecertificateerror_p.h b/src/webengine/api/qquickwebenginecertificateerror_p.h
index 77fbe27aa..4a8ef6ae0 100644
--- a/src/webengine/api/qquickwebenginecertificateerror_p.h
+++ b/src/webengine/api/qquickwebenginecertificateerror_p.h
@@ -85,6 +85,7 @@ public:
CertificateNameConstraintViolation = -212,
CertificateValidityTooLong = -213,
CertificateTransparencyRequired = -214,
+ CertificateKnownInterceptionBlocked = -217,
};
Q_ENUM(Error)
diff --git a/src/webenginewidgets/api/qwebenginecertificateerror.cpp b/src/webenginewidgets/api/qwebenginecertificateerror.cpp
index 3f20b6483..d86019af8 100644
--- a/src/webenginewidgets/api/qwebenginecertificateerror.cpp
+++ b/src/webenginewidgets/api/qwebenginecertificateerror.cpp
@@ -147,6 +147,9 @@ QWebEngineCertificateError::~QWebEngineCertificateError()
\value CertificateValidityTooLong The certificate has a validity period that is too long. (Added in Qt 5.7)
\value CertificateTransparencyRequired Certificate Transparency was required for this connection, but the server
did not provide CT information that complied with the policy. (Added in Qt 5.8)
+ \value CertificateKnownInterceptionBlocked The certificate is known to be
+ used for interception by an entity other the device owner. (Added in
+ 5.15)
*/
/*!
diff --git a/src/webenginewidgets/api/qwebenginecertificateerror.h b/src/webenginewidgets/api/qwebenginecertificateerror.h
index d3a19edfc..a32f7ab8e 100644
--- a/src/webenginewidgets/api/qwebenginecertificateerror.h
+++ b/src/webenginewidgets/api/qwebenginecertificateerror.h
@@ -73,6 +73,7 @@ public:
CertificateNameConstraintViolation = -212,
CertificateValidityTooLong = -213,
CertificateTransparencyRequired = -214,
+ CertificateKnownInterceptionBlocked = -217,
};
Error error() const;
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index aaca7997b..dad962576 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -126,6 +126,7 @@ static const QStringList expectedAPI = QStringList()
<< "QQuickWebEngineCertificateError.CertificateContainsErrors --> Error"
<< "QQuickWebEngineCertificateError.CertificateDateInvalid --> Error"
<< "QQuickWebEngineCertificateError.CertificateInvalid --> Error"
+ << "QQuickWebEngineCertificateError.CertificateKnownInterceptionBlocked --> Error"
<< "QQuickWebEngineCertificateError.CertificateNameConstraintViolation --> Error"
<< "QQuickWebEngineCertificateError.CertificateNoRevocationMechanism --> Error"
<< "QQuickWebEngineCertificateError.CertificateNonUniqueName --> Error"
diff --git a/tests/auto/widgets/accessibility/tst_accessibility.cpp b/tests/auto/widgets/accessibility/tst_accessibility.cpp
index 9ec9e6a5b..748837c7f 100644
--- a/tests/auto/widgets/accessibility/tst_accessibility.cpp
+++ b/tests/auto/widgets/accessibility/tst_accessibility.cpp
@@ -337,17 +337,9 @@ void tst_Accessibility::roles_data()
QTest::addColumn<QAccessible::Role>("role");
QTest::newRow("ax::mojom::Role::kAbbr") << QString("<abbr>a</abbr>") << 1 << QAccessible::StaticText;
- QTest::newRow("ax::mojom::Role::KAlert") << QString("<div role='alert'>alert</div>") << 0 << QAccessible::AlertMessage;
+ QTest::newRow("ax::mojom::Role::kAlert") << QString("<div role='alert'>alert</div>") << 0 << QAccessible::AlertMessage;
QTest::newRow("ax::mojom::Role::kAlertDialog") << QString("<div role='alertdialog'>alert</div>") << 0 << QAccessible::AlertMessage;
QTest::newRow("ax::mojom::Role::kAnchor") << QString("<a id='a'>Chapter a</a>") << 1 << QAccessible::Link;
-
- // REMINDER: annotation roles are removed from Chromium 80: https://chromium-review.googlesource.com/c/chromium/src/+/1907074
- //QTest::newRow("ax::mojom::Role::kAnnotationAttribution") << QString("<div role='annotation-attribution'></div>") << 0 << QAccessible::Section; // FIXME: Aria role 'annotation-attribution' should work
- //QTest::newRow("ax::mojom::Role::kAnnotationCommentary") << QString("<div role='annotation-commentary'></div>") << 0 << QAccessible::Section; // FIXME: Aria role 'annotation-commentary' should work
- //QTest::newRow("ax::mojom::Role::kAnnotationPresence") << QString("<div role='annotation-presence'></div>") << 0 << QAccessible::Section; // FIXME: Aria role 'annotation-presence' should work
- //QTest::newRow("ax::mojom::Role::kAnnotationRevision") << QString("<div role='annotation-revision'></div>") << 0 << QAccessible::Section; // FIXME: Aria role 'annotation-revision' should work
- //QTest::newRow("ax::mojom::Role::kAnnotationSuggestion") << QString("<div role='annotation-suggestion'></div>") << 0 << QAccessible::Section; // FIXME: Aria role 'annotation-suggestion' should work
-
QTest::newRow("ax::mojom::Role::kApplication") << QString("<div role='application'>landmark</div>") << 0 << QAccessible::Document;
QTest::newRow("ax::mojom::Role::kArticle") << QString("<article>a</article>") << 0 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kAudio") << QString("<audio controls><source src='test.mp3' type='audio/mpeg'></audio>") << 1 << QAccessible::Sound;
@@ -360,6 +352,7 @@ void tst_Accessibility::roles_data()
QTest::newRow("ax::mojom::Role::kCell") << QString("<table role=table><tr><td>a</td></tr></table>") << 2 << QAccessible::Cell;
QTest::newRow("ax::mojom::Role::kCheckBox") << QString("<input type='checkbox'>a</input>") << 1 << QAccessible::CheckBox;
QTest::newRow("ax::mojom::Role::kClient") << QString("") << 0 << QAccessible::Client;
+ QTest::newRow("ax::mojom::Role::kCode") << QString("<code>a</code>") << 1 << QAccessible::StaticText;
QTest::newRow("ax::mojom::Role::kColorWell") << QString("<input type='color'>a</input>") << 1 << QAccessible::ColorChooser;
//QTest::newRow("ax::mojom::Role::kColumn") << QString("<table><tr><td>a</td></tr></table>") << 0 << QAccessible::Column; // FIXME: The test case might be wrong (see AXTableColumn.h)
QTest::newRow("ax::mojom::Role::kColumnHeader") << QString("<table role=table><tr><th>a</th></tr><tr><td>a</td></tr></table>") << 2 << QAccessible::ColumnHeader;
@@ -367,6 +360,8 @@ void tst_Accessibility::roles_data()
QTest::newRow("ax::mojom::Role::kComboBoxMenuButton") << QString("<div tabindex=0 role='combobox'>Select</div>") << 0 << QAccessible::ComboBox;
QTest::newRow("ax::mojom::Role::kTextFieldWithComboBox") << QString("<input role='combobox'>") << 1 << QAccessible::ComboBox;
QTest::newRow("ax::mojom::Role::kComplementary") << QString("<aside>a</aside>") << 0 << QAccessible::ComplementaryContent;
+ QTest::newRow("ax::mojom::Role::kComment") << QString("<div role='comment'></div>") << 0 << QAccessible::Section;
+ QTest::newRow("ax::mojom::Role::kCommenSection") << QString("<div role='commentsection'></div>") << 0 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kContentDeletion") << QString("<div role='deletion'></div>") << 0 << QAccessible::Grouping;
QTest::newRow("ax::mojom::Role::kContentInsertion") << QString("<div role='insertion'></div>") << 0 << QAccessible::Grouping;
QTest::newRow("ax::mojom::Role::kContentInfo") << QString("<div role='contentinfo'></div>") << 0 << QAccessible::Section;
@@ -423,6 +418,7 @@ void tst_Accessibility::roles_data()
QTest::newRow("ax::mojom::Role::kDocToc") << QString("<div role='doc-toc'></div>") << 0 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kDocument") << QString("<div role='document'>a</div>") << 0 << QAccessible::Document;
QTest::newRow("ax::mojom::Role::kEmbeddedObject") << QString("<object width='10' height='10'></object>") << 1 << QAccessible::Grouping;
+ QTest::newRow("ax::mojom::Role::kEmphasis") << QString("<em>a</em>") << 1 << QAccessible::StaticText;
QTest::newRow("ax::mojom::Role::kFeed") << QString("<div role='feed'>a</div>") << 0 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kFigcaption") << QString("<figcaption>a</figcaption>") << 0 << QAccessible::Heading;
QTest::newRow("ax::mojom::Role::kFigure") << QString("<figure>a</figure>") << 0 << QAccessible::Section;
@@ -484,7 +480,9 @@ void tst_Accessibility::roles_data()
QTest::newRow("ax::mojom::Role::kRadioButton") << QString("<input type='radio'></input>") << 1 << QAccessible::RadioButton;
QTest::newRow("ax::mojom::Role::kRadioGroup") << QString("<fieldset role='radiogroup'></fieldset>") << 0 << QAccessible::Grouping;
QTest::newRow("ax::mojom::Role::kRegion") << QString("<div role='region'>a</div>") << 0 << QAccessible::Section;
+ QTest::newRow("ax::mojom::Role::kRevision") << QString("<div role='revision'></div>") << 0 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kRow") << QString("<table role=table><tr><td>a</td></tr></table>") << 1 << QAccessible::Row;
+ QTest::newRow("ax::mojom::Role::kRowGroup") << QString("<table role=table><tbody role=rowgroup><tr><td>a</td></tr></tbody></table>") << 1 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kRowHeader") << QString("<table role=table><tr><th>a</td><td>b</td></tr></table>") << 2 << QAccessible::RowHeader;
QTest::newRow("ax::mojom::Role::kRuby") << QString("<ruby>a</ruby>") << 1 << QAccessible::StaticText;
QTest::newRow("ax::mojom::Role::kRubyAnnotation") << QString("<ruby><rt>a</rt></ruby>") << 2 << QAccessible::StaticText;
@@ -499,6 +497,8 @@ void tst_Accessibility::roles_data()
QTest::newRow("ax::mojom::Role::kSplitter") << QString("<hr>") << 0 << QAccessible::Splitter;
QTest::newRow("ax::mojom::Role::kStaticText") << QString("a") << 1 << QAccessible::StaticText;
QTest::newRow("ax::mojom::Role::kStatus") << QString("<output>a</output>") << 1 << QAccessible::Indicator;
+ QTest::newRow("ax::mojom::Role::kStrong") << QString("<strong>a</strong>") << 1 << QAccessible::StaticText;
+ QTest::newRow("ax::mojom::Role::kSuggestion") << QString("<div role='suggestion'></div>") << 0 << QAccessible::Section;
QTest::newRow("ax::mojom::Role::kSvgRoot") << QString("<svg width='10' height='10'></svg>") << 1 << QAccessible::Graphic;
QTest::newRow("ax::mojom::Role::kSwitch") << QString("<button aria-checked='false'>a</button>") << 1 << QAccessible::Button;
QTest::newRow("ax::mojom::Role::kTable") << QString("<table role=table><td>a</td></table>") << 0 << QAccessible::Table;
@@ -554,7 +554,8 @@ void tst_Accessibility::roles()
}
static QByteArrayList params = QByteArrayList()
- << "--force-renderer-accessibility";
+ << "--force-renderer-accessibility"
+ << "--enable-features=AccessibilityExposeARIAAnnotations";
W_QTEST_MAIN(tst_Accessibility, params)
#include "tst_accessibility.moc"
diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py
index dffdcbc11..8ec0a898e 100755
--- a/tools/scripts/take_snapshot.py
+++ b/tools/scripts/take_snapshot.py
@@ -159,7 +159,7 @@ def isInChromiumBlacklist(file_path):
or file_path.startswith('third_party/chromite')
or file_path.startswith('third_party/colorama')
or file_path.startswith('third_party/depot_tools')
- or file_path.startswith('third_party/devtools-node-modules')
+ or file_path.startswith('third_party/devtools-frontend/src/node-modules/')
or file_path.startswith('third_party/fuschsia-sdk/')
or file_path.startswith('third_party/glslang/src/Test/')
or file_path.startswith('third_party/google_')
@@ -193,7 +193,7 @@ def isInChromiumBlacklist(file_path):
or file_path.startswith('third_party/skia/infra')
or file_path.startswith('third_party/sqlite/sqlite-src-')
or file_path.startswith('third_party/speech-dispatcher')
- or file_path.startswith('third_party/spirv-cross/')
+ or file_path.startswith('third_party/spirv-cross/spirv-cross/reference/')
or file_path.startswith('third_party/swiftshader/third_party/')
or file_path.startswith('third_party/wayland')
or file_path.startswith('third_party/webgl')
@@ -231,6 +231,7 @@ def isInChromiumBlacklist(file_path):
not '/webrtc/' in file_path and
not file_path.startswith('net/test/') and
not file_path.endswith('mock_chrome_application_mac.h') and
+ not file_path.endswith('test_mock_time_task_runner.h') and
not file_path.endswith('perftimer.h') and
not file_path.endswith('test-torque.tq') and
not file_path.endswith('fonts.conf') and
diff --git a/tools/scripts/version_resolver.py b/tools/scripts/version_resolver.py
index 58d5aa19d..20141e4b2 100644
--- a/tools/scripts/version_resolver.py
+++ b/tools/scripts/version_resolver.py
@@ -38,8 +38,8 @@ import json
import urllib2
import git_submodule as GitSubmodule
-chromium_version = '79.0.3945.147'
-chromium_branch = '3945'
+chromium_version = '80.0.3987.136'
+chromium_branch = '3987'
ninja_version = 'v1.8.2'
json_url = 'http://omahaproxy.appspot.com/all.json'