summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_context.cpp
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2017-07-19 14:12:54 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-09-11 17:25:32 +0000
commit7282fb4fb4861320539f2b7288f63e1d4f48749d (patch)
tree3fb62ed4d45875be975410b08c776888803748ec /src/core/web_engine_context.cpp
parent82499104972d24027044acaff1136ea7d758efe2 (diff)
Adaptations for Chromium 60
Change-Id: I536258e22c2ec143f2fd3f1cbda229e0611b6af4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r--src/core/web_engine_context.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index d88fd8035..4df4dbfae 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -61,6 +61,7 @@
#include "content/public/browser/browser_main_runner.h"
#include "content/public/browser/plugin_service.h"
#include "content/public/browser/render_frame_host.h"
+#include "content/public/common/content_features.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
@@ -196,7 +197,8 @@ void WebEngineContext::destroy()
m_devtoolsServer->stop();
delete m_globalQObject;
m_globalQObject = 0;
- base::MessagePump::Delegate *delegate = m_runLoop->loop_;
+ base::MessagePump::Delegate *delegate =
+ static_cast<base::MessageLoop *>(m_runLoop->delegate_);
// Flush the UI message loop before quitting.
while (delegate->DoWork()) { }
GLContextHelper::destroy();
@@ -345,6 +347,13 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(switches::kDisableES3GLContext);
#endif
+ // Needed to allow navigations within pages that were set using setHtml(). One example is
+ // tst_QWebEnginePage::acceptNavigationRequest.
+ // This is deprecated behavior, and will be removed in a future Chromium version, as per
+ // upstream Chromium commit ba52f56207a4b9d70b34880fbff2352e71a06422.
+ parsedCommandLine->AppendSwitchASCII(switches::kEnableFeatures,
+ features::kAllowContentInitiatedDataUrlNavigations.name);
+
if (useEmbeddedSwitches) {
parsedCommandLine->AppendSwitchASCII(switches::kEnableFeatures, features::kOverlayScrollbar.name);
if (!parsedCommandLine->HasSwitch(switches::kDisablePinch))
@@ -408,8 +417,7 @@ WebEngineContext::WebEngineContext()
QSurfaceFormat globalSharedFormat = qt_gl_global_share_context()->format();
if (globalSharedFormat.profile() == QSurfaceFormat::CoreProfile) {
#ifdef Q_OS_MACOS
- // @TODO_FIXME_ADAPT_QT
- // glType = gl::kGLImplementationCoreProfileName;
+ glType = gl::kGLImplementationCoreProfileName;
#else
qWarning("An OpenGL Core Profile was requested, but it is not supported "
"on the current platform. Falling back to a non-Core profile. "
@@ -439,7 +447,6 @@ WebEngineContext::WebEngineContext()
mojo::edk::Init();
content::ContentMainParams contentMainParams(m_mainDelegate.get());
- contentMainParams.setup_signal_handlers = false;
#if defined(OS_WIN)
sandbox::SandboxInterfaceInfo sandbox_info = {0};
content::InitializeSandboxInfo(&sandbox_info);