diff options
-rw-r--r-- | configure.json | 43 | ||||
-rw-r--r-- | dist/changes-5.8.0 | 10 | ||||
m--------- | src/3rdparty | 0 | ||||
-rw-r--r-- | src/core/clipboard_qt.cpp | 20 | ||||
-rw-r--r-- | src/core/config/linux.pri | 7 | ||||
-rw-r--r-- | src/core/gl_surface_qt.cpp | 16 | ||||
-rw-r--r-- | src/core/gyp_run.pro | 2 | ||||
-rw-r--r-- | src/core/renderer/print_web_view_helper_delegate_qt.cpp | 10 | ||||
-rw-r--r-- | src/core/web_engine_context.cpp | 7 | ||||
-rw-r--r-- | src/webengine/api/qquickwebenginedownloaditem.cpp | 4 | ||||
-rw-r--r-- | src/webengine/doc/src/qtwebengine-overview.qdoc | 4 | ||||
-rw-r--r-- | tools/qmake/config.tests/alsa/alsa.pro | 2 | ||||
-rw-r--r-- | tools/qmake/config.tests/alsa/alsatest.cpp | 37 | ||||
-rw-r--r-- | tools/qmake/mkspecs/features/configure.prf | 15 | ||||
-rwxr-xr-x | tools/scripts/take_snapshot.py | 5 |
15 files changed, 156 insertions, 26 deletions
diff --git a/configure.json b/configure.json index a6aae977a..7f5f46f72 100644 --- a/configure.json +++ b/configure.json @@ -1,13 +1,33 @@ { "module": "webengine", + "testDir": "tools/qmake/config.tests", + "commandline": { "options": { + "alsa": "boolean", "proprietary-codecs": "boolean", + "pulseaudio": "boolean", "spellchecker": "boolean" } }, + "libraries": { + "alsa": { + "label": "ALSA", + "test": "alsa", + "sources": [ + "-lasound" + ] + }, + "pulseaudio": { + "label": "PulseAudio >= 0.9.10", + "sources": [ + { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" } + ] + } + }, + "tests" : { "ninja": { "label": "system ninja", @@ -20,6 +40,17 @@ }, "features": { + "alsa": { + "label": "ALSA", + "condition": "config.unix && libs.alsa", + "output": [ "privateFeature" ] + }, + "pulseaudio": { + "label": "PulseAudio", + "autoDetect": "config.unix", + "condition": "libs.pulseaudio", + "output": [ "privateFeature" ] + }, "proprietary-codecs": { "label": "Proprietary Codecs", "autoDetect": false, @@ -50,7 +81,17 @@ "proprietary-codecs", "spellchecker", "system-gn", - "system-ninja" + "system-ninja", + { + "type": "feature", + "args": "alsa", + "condition": "config.unix" + }, + { + "type": "feature", + "args": "pulseaudio", + "condition": "config.unix" + } ] } ] diff --git a/dist/changes-5.8.0 b/dist/changes-5.8.0 index abead3c38..62b380be8 100644 --- a/dist/changes-5.8.0 +++ b/dist/changes-5.8.0 @@ -29,6 +29,16 @@ information about a particular change. - Chromium Snapshot: * The Chromium version has been updated to 53.0.2785.148. + * Security fixes from Chromium up to version 55.0.2883.75 + Including fixes for: CVE-2016-5181, CVE-2016-5182, CVE-2016-5183, + CVE-2016-5185, CVE-2016-5186, CVE-2016-5187, CVE-2016-5189, + CVE-2016-5192, CVE-2016-5199, CVE-2016-5201, CVE-2016-5203, + CVE-2016-5204, CVE-2016-5205, CVE-2016-5206, CVE-2016-5208, + CVE-2016-5207, CVE-2016-5210, CVE-2016-5211, CVE-2016-5212, + CVE-2016-5213, CVE-2016-5214, CVE-2016-5215. CVE-2016-5216, + CVE-2016-5217, CVE-2016-5218, CVE-2016-5219, CVE-2016-5221, + CVE-2016-5222, CVE-2016-5223, CVE-2016-5224, CVE-2016-5225, + CVE-2016-9650 and CVE-2016-9651 - General: * Spellchecking support has been introduced. diff --git a/src/3rdparty b/src/3rdparty -Subproject 804dc2f5ec4adf6467357919a5187400d7be7f7 +Subproject af5276a40a0c6e45eede1fd929dd8eb927473ec diff --git a/src/core/clipboard_qt.cpp b/src/core/clipboard_qt.cpp index 712ff5703..3f4b2eb17 100644 --- a/src/core/clipboard_qt.cpp +++ b/src/core/clipboard_qt.cpp @@ -275,7 +275,7 @@ void ClipboardQt::WriteData(const FormatType& format, const char* data_data, siz bool ClipboardQt::IsFormatAvailable(const ui::Clipboard::FormatType& format, ui::ClipboardType type) const { const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); - return mimeData->hasFormat(QString::fromStdString(format.ToString())); + return mimeData && mimeData->hasFormat(QString::fromStdString(format.ToString())); } void ClipboardQt::Clear(ui::ClipboardType type) @@ -292,6 +292,8 @@ void ClipboardQt::ReadAvailableTypes(ui::ClipboardType type, std::vector<base::s types->clear(); const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); + if (!mimeData) + return; if (mimeData->hasImage()) types->push_back(toString16(QStringLiteral("image/png"))); Q_FOREACH (const QString &mimeType, mimeData->formats()) @@ -306,13 +308,15 @@ void ClipboardQt::ReadAvailableTypes(ui::ClipboardType type, std::vector<base::s void ClipboardQt::ReadText(ui::ClipboardType type, base::string16* result) const { const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); - *result = toString16(mimeData->text()); + if (mimeData) + *result = toString16(mimeData->text()); } void ClipboardQt::ReadAsciiText(ui::ClipboardType type, std::string* result) const { const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); - *result = mimeData->text().toStdString(); + if (mimeData) + *result = mimeData->text().toStdString(); } void ClipboardQt::ReadHTML(ui::ClipboardType type, base::string16* markup, std::string* src_url, uint32_t* fragment_start, uint32_t* fragment_end) const @@ -324,6 +328,8 @@ void ClipboardQt::ReadHTML(ui::ClipboardType type, base::string16* markup, std:: *fragment_end = 0; const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); + if (!mimeData) + return; *markup = toString16(mimeData->html()); *fragment_end = static_cast<uint32_t>(markup->length()); } @@ -331,6 +337,8 @@ void ClipboardQt::ReadHTML(ui::ClipboardType type, base::string16* markup, std:: void ClipboardQt::ReadRTF(ui::ClipboardType type, std::string* result) const { const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); + if (!mimeData) + return; const QByteArray byteArray = mimeData->data(QString::fromLatin1(kMimeTypeRTF)); *result = std::string(byteArray.constData(), byteArray.length()); } @@ -338,6 +346,8 @@ void ClipboardQt::ReadRTF(ui::ClipboardType type, std::string* result) const SkBitmap ClipboardQt::ReadImage(ui::ClipboardType type) const { const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); + if (!mimeData) + return SkBitmap(); QImage image = qvariant_cast<QImage>(mimeData->imageData()); image = image.convertToFormat(QImage::Format_ARGB32); @@ -354,6 +364,8 @@ SkBitmap ClipboardQt::ReadImage(ui::ClipboardType type) const void ClipboardQt::ReadCustomData(ui::ClipboardType clipboard_type, const base::string16& type, base::string16* result) const { const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(clipboard_type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection); + if (!mimeData) + return; const QByteArray customData = mimeData->data(QString::fromLatin1(kMimeTypeWebCustomDataCopy)); ui::ReadCustomDataForType(customData.constData(), customData.size(), type, result); } @@ -366,6 +378,8 @@ void ClipboardQt::ReadBookmark(base::string16* title, std::string* url) const void ClipboardQt::ReadData(const FormatType& format, std::string* result) const { const QMimeData *mimeData = QGuiApplication::clipboard()->mimeData(); + if (!mimeData) + return; const QByteArray byteArray = mimeData->data(QString::fromStdString(format.ToString())); *result = std::string(byteArray.constData(), byteArray.length()); } diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri index 83c852f86..59417997a 100644 --- a/src/core/config/linux.pri +++ b/src/core/config/linux.pri @@ -1,5 +1,6 @@ include(common.pri) -QT_FOR_CONFIG += gui-private +include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) +QT_FOR_CONFIG += gui-private webengine-private # linux_use_bundled_gold currently relies on a hardcoded relative path from chromium/src/out/(Release|Debug) # Disable it along with the -Wl,--threads flag just in case gold isn't installed on the system. @@ -41,12 +42,12 @@ qtConfig(system-png): GYP_CONFIG += use_system_libpng=1 qtConfig(system-jpeg): GYP_CONFIG += use_system_libjpeg=1 qtConfig(system-harfbuzz): use?(system_harfbuzz): GYP_CONFIG += use_system_harfbuzz=1 !qtConfig(glib): GYP_CONFIG += use_glib=0 -contains(QT_CONFIG, pulseaudio) { +qtConfig(pulseaudio) { GYP_CONFIG += use_pulseaudio=1 } else { GYP_CONFIG += use_pulseaudio=0 } -contains(QT_CONFIG, alsa) { +qtConfig(alsa) { GYP_CONFIG += use_alsa=1 } else { GYP_CONFIG += use_alsa=0 diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp index 74bb32d1f..e8f77e9ed 100644 --- a/src/core/gl_surface_qt.cpp +++ b/src/core/gl_surface_qt.cpp @@ -614,13 +614,19 @@ CreateOffscreenGLSurface(const gfx::Size& size) #endif } case kGLImplementationEGLGLES2: { - if (g_egl_surfaceless_context_supported) - surface = new GLSurfacelessQtEGL(size); - else - surface = new GLSurfaceQtEGL(size); - + surface = new GLSurfaceQtEGL(size); if (surface->Initialize()) return surface; + + // Surfaceless context will be used ONLY if pseudo surfaceless context + // is not available since some implementations of surfaceless context + // have problems. (e.g. QTBUG-57290) + if (g_egl_surfaceless_context_supported) { + surface = new GLSurfacelessQtEGL(size); + if (surface->Initialize()) + return surface; + } + break; } default: diff --git a/src/core/gyp_run.pro b/src/core/gyp_run.pro index 7ab8cbb13..c583845e9 100644 --- a/src/core/gyp_run.pro +++ b/src/core/gyp_run.pro @@ -91,7 +91,7 @@ contains(QT_ARCH, "arm") { !lessThan(MARMV, 7): GYP_CONFIG += arm_neon_optional=1 } - contains(QMAKE_CFLAGS, "-marm"): GYP_CONFIG += arm_thumb=0 + if(isEmpty(MARMV)|lessThan(MARMV, 7)):contains(QMAKE_CFLAGS, "-marm"): GYP_CONFIG += arm_thumb=0 contains(QMAKE_CFLAGS, "-mthumb"): GYP_CONFIG += arm_thumb=1 } diff --git a/src/core/renderer/print_web_view_helper_delegate_qt.cpp b/src/core/renderer/print_web_view_helper_delegate_qt.cpp index 6d74685fe..872ab1c9a 100644 --- a/src/core/renderer/print_web_view_helper_delegate_qt.cpp +++ b/src/core/renderer/print_web_view_helper_delegate_qt.cpp @@ -39,8 +39,8 @@ // found in the LICENSE file. #include "print_web_view_helper_delegate_qt.h" - #include "third_party/WebKit/public/web/WebElement.h" +#include "web_engine_library_info.h" namespace QtWebEngineCore { PrintWebViewHelperDelegateQt::~PrintWebViewHelperDelegateQt() @@ -70,3 +70,11 @@ bool PrintWebViewHelperDelegateQt::OverridePrint(blink::WebLocalFrame* frame) } } + +namespace printing { +// std::string PrintingContextDelegate::GetAppLocale() +std::string getApplicationLocale() +{ + return WebEngineLibraryInfo::getApplicationLocale(); +} +} diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 152859bee..b88f6308f 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -249,6 +249,13 @@ WebEngineContext::WebEngineContext() , m_browserRunner(content::BrowserMainRunner::Create()) , m_globalQObject(new QObject()) { +#if defined(USE_X11) + QString platform = qApp->platformName(); + if (platform != QLatin1String("xcb")) { + qWarning("WebEngine compiled with X11 support, however qpa backend is not xcb. " + "This may fail."); + } +#endif #ifdef Q_OS_LINUX // Call qputenv before BrowserMainRunnerImpl::Initialize is called. diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp index 8a6bd0407..520839880 100644 --- a/src/webengine/api/qquickwebenginedownloaditem.cpp +++ b/src/webengine/api/qquickwebenginedownloaditem.cpp @@ -122,7 +122,7 @@ QQuickWebEngineDownloadItemPrivate::~QQuickWebEngineDownloadItemPrivate() Stores the state of a download to be used to manage requested downloads. By default, the download is rejected unless the user explicitly accepts it with - WebEngineDownloadItem::accept(). + accept(). */ void QQuickWebEngineDownloadItemPrivate::update(const BrowserContextAdapterClient::DownloadItemInfo &info) @@ -161,8 +161,6 @@ void QQuickWebEngineDownloadItemPrivate::updateState(QQuickWebEngineDownloadItem \qmlmethod void WebEngineDownloadItem::accept() Accepts the download request, which will start the download. - - \sa WebEngineDownloadItem::cancel() */ void QQuickWebEngineDownloadItem::accept() diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc index 6995be2fa..c3d737384 100644 --- a/src/webengine/doc/src/qtwebengine-overview.qdoc +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -89,7 +89,7 @@ \l{https://chromium.googlesource.com/chromium/src/+/master/docs/chromium_browser_vs_google_chrome.md}{overview} that is part of the documentation in the \l {Chromium Project} upstream source tree. - This version of Qt WebEngine is based on Chromium version 49.0.2623.111, with + This version of Qt WebEngine is based on Chromium version 53.0.2785.148, with additional security fixes from newer versions. \section2 Qt WebEngine Process @@ -199,7 +199,7 @@ Qt WebEngine uses the proxy settings from \l{Qt Network}. If QNetworkProxy::applicationProxy is set, it will also be used for Qt WebEngine, and if - QNetworkProxy::usesSystemConfiguration() is enabled, the proxy settings are automatically + QNetworkProxyFactory::usesSystemConfiguration() is enabled, the proxy settings are automatically retrieved from the system. Settings from an installed QNetworkProxyFactory will be ignored though. diff --git a/tools/qmake/config.tests/alsa/alsa.pro b/tools/qmake/config.tests/alsa/alsa.pro new file mode 100644 index 000000000..7322b6fb8 --- /dev/null +++ b/tools/qmake/config.tests/alsa/alsa.pro @@ -0,0 +1,2 @@ +SOURCES = alsatest.cpp + diff --git a/tools/qmake/config.tests/alsa/alsatest.cpp b/tools/qmake/config.tests/alsa/alsatest.cpp new file mode 100644 index 000000000..ea511cd21 --- /dev/null +++ b/tools/qmake/config.tests/alsa/alsatest.cpp @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <alsa/asoundlib.h> +#if SND_LIB_VERSION < 0x1000a // 1.0.10 +#error "Alsa version found too old, require >= 1.0.10" +#endif + +int main(int argc,char **argv) +{ +} + diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf index bb4c56cae..43a5f2757 100644 --- a/tools/qmake/mkspecs/features/configure.prf +++ b/tools/qmake/mkspecs/features/configure.prf @@ -20,13 +20,20 @@ defineTest(runConfigure) { qtCompileTest($$test) } + isQtMinimum(5, 8) { + include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) + QT_FOR_CONFIG += webengine-private + qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs + qtConfig(spellchecker): WEBENGINE_CONFIG += use_spellchecker + } + linux { QT_FOR_CONFIG += gui-private !config_khr:skipBuild("khronos development headers appear to be missing (mesa/libegl1-mesa-dev)") REQUIRED_PACKAGES = dbus-1 fontconfig !cross_compile: qtConfig(xcb): REQUIRED_PACKAGES += libdrm xcomposite xcursor xi xrandr xscrnsaver xtst - contains(QT_CONFIG, pulseaudio): REQUIRED_PACKAGES += libpulse + qtConfig(pulseaudio): REQUIRED_PACKAGES += libpulse qtConfig(system-png): REQUIRED_PACKAGES += libpng qtConfig(system-harfbuzz) { packagesExist("\'harfbuzz >= 1.2.0\'"): WEBENGINE_CONFIG += use_system_harfbuzz @@ -81,12 +88,6 @@ defineTest(runConfigure) { !cross_compile { WEBENGINE_CONFIG += enable_pdf } - isQtMinimum(5, 8) { - include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) - QT_FOR_CONFIG += webengine-private - qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs - qtConfig(spellchecker): WEBENGINE_CONFIG += use_spellchecker - } isEmpty(skipBuildReason): { cache(CONFIG, add, $$list(webengine_successfully_configured)) diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py index 7f52ec476..78b8066ca 100755 --- a/tools/scripts/take_snapshot.py +++ b/tools/scripts/take_snapshot.py @@ -184,12 +184,14 @@ def isInChromiumBlacklist(file_path): or file_path.startswith('third_party/instrumented_libraries') or file_path.startswith('third_party/jsr-305/src') or file_path.startswith('third_party/junit') + or file_path.startswith('third_party/lcov') or file_path.startswith('third_party/libphonenumber') or file_path.startswith('third_party/libaddressinput/src/testdata') or file_path.startswith('third_party/libaddressinput/src/common/src/test') or file_path.startswith('third_party/libc++') or file_path.startswith('third_party/liblouis') or file_path.startswith('third_party/lighttpd') + or file_path.startswith('third_party/logilab') or file_path.startswith('third_party/markdown') or file_path.startswith('third_party/mingw-w64') or file_path.startswith('third_party/nacl_sdk_binaries') @@ -201,8 +203,11 @@ def isInChromiumBlacklist(file_path): or file_path.startswith('third_party/pefile') or file_path.startswith('third_party/perl') or file_path.startswith('third_party/psyco_win32') + or file_path.startswith('third_party/pylint') or file_path.startswith('third_party/scons-2.0.1') or file_path.startswith('third_party/sfntly/src/cpp/data/fonts') + or file_path.startswith('third_party/speech-dispatcher') + or file_path.startswith('third_party/talloc') or file_path.startswith('third_party/trace-viewer') or file_path.startswith('third_party/undoview') or file_path.startswith('third_party/webgl') |