summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.8.095
-rw-r--r--src/core/web_engine_context.cpp43
-rw-r--r--src/webengine/api/qquickwebengineview.cpp7
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc4
-rw-r--r--src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp5
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp5
6 files changed, 135 insertions, 24 deletions
diff --git a/dist/changes-5.8.0 b/dist/changes-5.8.0
new file mode 100644
index 000000000..abead3c38
--- /dev/null
+++ b/dist/changes-5.8.0
@@ -0,0 +1,95 @@
+Qt 5.8 introduces many new features and improvements as well as bugfixes
+over the 5.7.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+ http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.8 series is binary compatible with the 5.7.x series.
+Applications compiled for 5.7 will continue to run with 5.8.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+
+****************************************************************************
+* General *
+****************************************************************************
+
+ - Important Changes:
+ * The enum value ResourceTypeUnknown has changed value because there was
+ a mismatch between 5.6 and 5.7+ definitions. In general any unknown
+ ResourceType value should be handled as unknown for forward
+ compatibility, because more types are and can be added in later
+ Qt versions.
+
+ - Chromium Snapshot:
+ * The Chromium version has been updated to 53.0.2785.148.
+
+ - General:
+ * Spellchecking support has been introduced.
+ * Build time options can now be controlled via arguments to the global
+ configure script or app.
+ * [QTBUG-52999] Added focusOnNavigationEnabled setting which allows
+ controlling whether a web view will receive focus on a navigation
+ request. Previously the view always received the focus.
+ * [QTBUG-54902] Added setting to allow secure content to run insecure
+ content.
+ * [QTBUG-54918] Printing will now include the CSS background of the
+ printed elements by default. This restores the default behavior from Qt
+ WebKit. It can be controlled via the PrintElementBackgrounds web
+ setting.
+ * Some chrome:// URLs are now supported. For instance chrome://gpu.
+ * [QTBUG-53042] Pepper Flash glyph draw is now supported.
+ * A DownloadType has been added to download items.
+ * Greasemonkey attributes are now supported in user scripts.
+ * [QTBUG-55766] Added support for colored underline and background
+ to InputMethodEvent.
+ * Qt no-opengl builds are now supported.
+
+
+****************************************************************************
+* Qt WebEngine[QML] *
+****************************************************************************
+
+ - General:
+ * [QTBUG-53467][QTBUG-51177] Qt WebEngine (QML) now optionally uses Qt
+ Quick 2 Controls to show standard dialogs.
+ * [QTBUG-51190] Added ability to provide custom dialogs for HTTP and
+ proxy authentication, JavaScript alerts, file and color picking, and
+ form validation messages.
+ * [QTBUG-52554] Added ability to show custom context menu.
+
+ - QQuickWebEngineView:
+ * ToolTip (HTML title attributes) are now handled.
+ * View Source feature is now supported.
+
+
+****************************************************************************
+* Qt WebEngineWidgets *
+****************************************************************************
+
+ - Scenegraph Integration:
+ * Using the software rasterizing scenegraph backend is now supported.
+
+ - Printing:
+ * Enables printing QWebPage content on a QPrinter. Currently does not
+ support previewing the document. Widgets only for the moment.
+
+ - QWebEnginePage:
+ * Introduced a new save method to save a page to a predefined location.
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+ - Linux:
+ * Pepper Flash is now also searched for in /usr/lib/adobe-flashplugin/
+
+ - Windows:
+ * MSVC2015 and Windows 10 SDK are now required.
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 227918d51..152859bee 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -240,17 +240,15 @@ QObject *WebEngineContext::globalQObject()
#define CHROMIUM_VERSION // This is solely to keep Qt Creator happy.
#endif
+const static char kChromiumFlagsEnv[] = "QTWEBENGINE_CHROMIUM_FLAGS";
+const static char kDisableSandboxEnv[] = "QTWEBENGINE_DISABLE_SANDBOX";
+
WebEngineContext::WebEngineContext()
: m_mainDelegate(new ContentMainDelegateQt)
, m_contentRunner(content::ContentMainRunner::Create())
, m_browserRunner(content::BrowserMainRunner::Create())
, m_globalQObject(new QObject())
{
- QStringList appArgs = QCoreApplication::arguments();
- bool useEmbeddedSwitches = appArgs.removeAll(QStringLiteral("--enable-embedded-switches"));
-#if defined(QTWEBENGINE_EMBEDDED_SWITCHES)
- useEmbeddedSwitches = !appArgs.removeAll(QStringLiteral("--disable-embedded-switches"));
-#endif
#ifdef Q_OS_LINUX
// Call qputenv before BrowserMainRunnerImpl::Initialize is called.
@@ -261,32 +259,35 @@ WebEngineContext::WebEngineContext()
// Allow us to inject javascript like any webview toolkit.
content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView();
-#if defined(Q_OS_WIN)
- // We must initialize the command line with the UTF-16 arguments vector we got from
- // QCoreApplication. CommandLine::Init ignores its arguments on Windows and calls
- // GetCommandLineW() instead.
base::CommandLine::CreateEmpty();
base::CommandLine* parsedCommandLine = base::CommandLine::ForCurrentProcess();
+ QStringList appArgs = QCoreApplication::arguments();
+ if (qEnvironmentVariableIsSet(kChromiumFlagsEnv)) {
+ appArgs = appArgs.mid(0, 1); // Take application name and drop the rest
+ appArgs.append(QString::fromLocal8Bit(qgetenv(kChromiumFlagsEnv)).split(' '));
+ }
+
+ bool useEmbeddedSwitches = false;
+#if defined(QTWEBENGINE_EMBEDDED_SWITCHES)
+ useEmbeddedSwitches = !appArgs.removeAll(QStringLiteral("--disable-embedded-switches"));
+#else
+ useEmbeddedSwitches = appArgs.removeAll(QStringLiteral("--enable-embedded-switches"));
+#endif
base::CommandLine::StringVector argv;
argv.resize(appArgs.size());
- std::transform(appArgs.constBegin(), appArgs.constEnd(), argv.begin(), &toString16);
- parsedCommandLine->InitFromArgv(argv);
+#if defined(Q_OS_WIN)
+ for (int i = 0; i < appArgs.size(); ++i)
+ argv[i] = toString16(appArgs[i]);
#else
- QVector<QByteArray> args;
- Q_FOREACH (const QString& arg, appArgs)
- args << arg.toUtf8();
-
- QVector<const char*> argv(args.size());
- for (int i = 0; i < args.size(); ++i)
- argv[i] = args[i].constData();
- base::CommandLine::Init(argv.size(), argv.constData());
- base::CommandLine* parsedCommandLine = base::CommandLine::ForCurrentProcess();
+ for (int i = 0; i < appArgs.size(); ++i)
+ argv[i] = appArgs[i].toStdString();
#endif
+ parsedCommandLine->InitFromArgv(argv);
parsedCommandLine->AppendSwitchPath(switches::kBrowserSubprocessPath, WebEngineLibraryInfo::getPath(content::CHILD_PROCESS_EXE));
// Enable sandboxing on OS X and Linux (Desktop / Embedded) by default.
- bool disable_sandbox = qEnvironmentVariableIsSet("QTWEBENGINE_DISABLE_SANDBOX");
+ bool disable_sandbox = qEnvironmentVariableIsSet(kDisableSandboxEnv);
if (!disable_sandbox) {
#if defined(Q_OS_WIN)
parsedCommandLine->AppendSwitch(switches::kNoSandbox);
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 547be2246..f0811014b 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -1309,6 +1309,10 @@ void QQuickWebEngineView::printToPdf(const QString& filePath, PrintedPageSizeId
QPageLayout pageLayout(layoutSize, layoutOrientation, QMarginsF(0.0, 0.0, 0.0, 0.0));
d->adapter->printToPDF(pageLayout, filePath);
+#else
+ Q_UNUSED(filePath);
+ Q_UNUSED(pageSizeId);
+ Q_UNUSED(orientation);
#endif
}
@@ -1326,6 +1330,9 @@ void QQuickWebEngineView::printToPdf(const QJSValue &callback, PrintedPageSizeId
quint64 requestId = d->adapter->printToPDFCallbackResult(pageLayout);
d->m_callbacks.insert(requestId, callback);
#else
+ Q_UNUSED(pageSizeId);
+ Q_UNUSED(orientation);
+
// Call back with null result.
QJSValueList args;
args.append(QJSValue(QByteArray().data()));
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
index c5ebe0f06..615e3eed0 100644
--- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -62,14 +62,14 @@
On all platforms, the following tools are required:
\list
- \li \l Python 2.7 or later
+ \li \l Python 2.7.5 or later
\li Bison, Flex
\li GPerf
\endlist
\section2 Windows
- On Windows, Visual Studio 2013 or Visual Studio 2015 is required.
+ On Windows, Visual Studio 2015 and Windows 10 SDK are required.
\section2 Linux
diff --git a/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp b/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
index bf3514f71..a39c0e483 100644
--- a/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
+++ b/src/webenginewidgets/api/qtwebenginewidgetsglobal.cpp
@@ -49,10 +49,13 @@ namespace QtWebEngineCore
QT_BEGIN_NAMESPACE
+#ifndef QT_NO_OPENGL
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
+#endif
static void initialize()
{
+#ifndef QT_NO_OPENGL
if (QCoreApplication::instance()) {
//On window/ANGLE, calling QtWebEngine::initialize from DllMain will result in a crash.
if (!qt_gl_global_share_context()) {
@@ -62,9 +65,9 @@ static void initialize()
}
return;
}
-
//QCoreApplication is not yet instantiated, ensuring the call will be deferred
qAddPreRoutine(QtWebEngineCore::initialize);
+#endif // QT_NO_OPENGL
}
Q_CONSTRUCTOR_FUNCTION(initialize)
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index f769ea0f4..16e9438c9 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -1957,6 +1957,9 @@ void QWebEnginePage::printToPdf(const QString &filePath, const QPageLayout &page
}
#endif
d->adapter->printToPDF(pageLayout, filePath);
+#else
+ Q_UNUSED(filePath);
+ Q_UNUSED(pageLayout);
#endif // if defined(ENABLE_PDF)
}
@@ -1990,6 +1993,7 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &res
quint64 requestId = d->adapter->printToPDFCallbackResult(pageLayout);
d->m_callbacks.registerCallback(requestId, resultCallback);
#else // if defined(ENABLE_PDF)
+ Q_UNUSED(pageLayout);
d->m_callbacks.invokeEmpty(resultCallback);
#endif // if defined(ENABLE_PDF)
}
@@ -2025,6 +2029,7 @@ void QWebEnginePage::print(QPrinter *printer, const QWebEngineCallback<bool> &re
quint64 requestId = d->adapter->printToPDFCallbackResult(printer->pageLayout(), printer->colorMode() == QPrinter::Color);
d->m_callbacks.registerCallback(requestId, resultCallback);
#else // if defined(ENABLE_PDF)
+ Q_UNUSED(printer);
d->m_callbacks.invokeDirectly(resultCallback, false);
#endif // if defined(ENABLE_PDF)
}