From 002e47692b071400e8917a1604b37039860f86c2 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 11 Jul 2019 11:47:30 +0200 Subject: Doc: Edit docs on script injection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-76489 Change-Id: If489ebed802d273b0015bc6cfc190d948c4896e3 Reviewed-by: Jüri Valdmann --- src/webengine/doc/src/webengineview_lgpl.qdoc | 5 +++-- src/webenginewidgets/api/qwebenginepage.cpp | 2 +- src/webenginewidgets/api/qwebengineprofile.cpp | 3 ++- src/webenginewidgets/api/qwebenginescript.cpp | 2 ++ .../api/qwebenginescriptcollection.cpp | 2 ++ src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | 19 +++++++++++-------- 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/webengine/doc/src/webengineview_lgpl.qdoc b/src/webengine/doc/src/webengineview_lgpl.qdoc index d790cccea..6194a800e 100644 --- a/src/webengine/doc/src/webengineview_lgpl.qdoc +++ b/src/webengine/doc/src/webengineview_lgpl.qdoc @@ -396,7 +396,7 @@ runJavaScript("document.title", function(result) { console.log(result); }); \endcode - Only "plain data" can be returned from JavaScript as the result value. + Only plain data can be returned from JavaScript as the result value. Supported data types include all of the JSON data types as well as, for example, \c{Date} and \c{ArrayBuffer}. Unsupported data types include, for example, \c{Function} and \c{Promise}. @@ -407,7 +407,8 @@ \warning Do not execute lengthy routines in the callback function, because it might block the rendering of the web content. - See WebEngineView::userScripts for an alternative API to inject scripts. + For more information about injecting scripts, see \l {Script Injection}. + For an alternative way to inject scripts, see WebEngineView::userScripts. */ /*! diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 78b89a53c..055047341 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -2183,7 +2183,7 @@ void QWebEnginePage::runJavaScript(const QString& scriptSource, quint32 worldId, In addition, a page might also execute scripts added through QWebEngineProfile::scripts(). - \sa QWebEngineScriptCollection, QWebEngineScript + \sa QWebEngineScriptCollection, QWebEngineScript, {Script Injection} */ QWebEngineScriptCollection &QWebEnginePage::scripts() diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index c8aafa0e8..6644af3ff 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -593,7 +593,8 @@ bool QWebEngineProfile::visitedLinksContainsUrl(const QUrl &url) const Returns the collection of scripts that are injected into all pages that share this profile. - \sa QWebEngineScriptCollection, QWebEngineScript, QWebEnginePage::scripts() + \sa QWebEngineScriptCollection, QWebEngineScript, QWebEnginePage::scripts(), + {Script Injection} */ QWebEngineScriptCollection *QWebEngineProfile::scripts() const { diff --git a/src/webenginewidgets/api/qwebenginescript.cpp b/src/webenginewidgets/api/qwebenginescript.cpp index d1e996b3a..af6b9aa8d 100644 --- a/src/webenginewidgets/api/qwebenginescript.cpp +++ b/src/webenginewidgets/api/qwebenginescript.cpp @@ -67,6 +67,8 @@ using QtWebEngineCore::UserScript; Use QWebEnginePage::scripts() and QWebEngineProfile::scripts() to access the collection of scripts associated with a single page or a number of pages sharing the same profile. + + \sa {Script Injection} */ /*! \enum QWebEngineScript::InjectionPoint diff --git a/src/webenginewidgets/api/qwebenginescriptcollection.cpp b/src/webenginewidgets/api/qwebenginescriptcollection.cpp index 5ef0ffd44..8cbeeb804 100644 --- a/src/webenginewidgets/api/qwebenginescriptcollection.cpp +++ b/src/webenginewidgets/api/qwebenginescriptcollection.cpp @@ -55,6 +55,8 @@ using QtWebEngineCore::UserScript; Use QWebEnginePage::scripts() and QWebEngineProfile::scripts() to access the collection of scripts associated with a single page or a number of pages sharing the same profile. + + \sa {Script Injection} */ /*! diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc index 15e57e904..2bf4d0413 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -759,10 +759,15 @@ \fn void QWebEnginePage::runJavaScript(const QString &scriptSource, const QWebEngineCallback &resultCallback) \since 5.7 - Runs the JavaScript code contained in \a scriptSource in the world specified by \a worldId. - The world ID values are the same as provided by QWebEngineScript::ScriptWorldId, and between \c 0 - and \c 256. Using the \e runJavaScript() versions without the world ID is the same as running the - script in the \c MainWorld. + Runs the JavaScript code contained in \a scriptSource without checking + whether the DOM of the page has been constructed. If you need more + control over how the script is run, consider using \l scripts() instead. + + To avoid conflicts with other scripts executed on the page, the world in + which the script is run is specified by \a worldId. The world ID values are + the same as provided by QWebEngineScript::ScriptWorldId, and between \c 0 + and \c 256. If you leave out the \c world ID, the script is run in the + \c MainWorld. When the script has been executed, \a resultCallback is called with the result of the last executed statement. \c resultCallback can be any of a function pointer, a functor or a lambda, @@ -772,7 +777,7 @@ page.runJavaScript("document.title", [](const QVariant &v) { qDebug() << v.toString(); }); \endcode - Only "plain data" can be returned from JavaScript as the result value. + Only plain data can be returned from JavaScript as the result value. Supported data types include all of the JSON data types as well as, for example, \c{Date} and \c{ArrayBuffer}. Unsupported data types include, for example, \c{Function} and \c{Promise}. @@ -784,9 +789,7 @@ during page destruction. When QWebEnginePage is deleted, the callback is triggered with an invalid value and it is not safe to use the corresponding QWebEnginePage or QWebEngineView instance inside it. - See scripts() for an alternative API to inject scripts. - - \sa QWebEngineScript::ScriptWorldId + \sa scripts(), QWebEngineScript::ScriptWorldId, {Script Injection} */ /*! -- cgit v1.2.3 From 76a66c886156012ec85250904b64587960e733f3 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 22 Jul 2019 14:03:01 +0200 Subject: Update Chromium Pulls in following changes: * 0a0221c [Backport] CVE-2019-5839 * 3c46be6 [Backport] CVE-2019-5837 4/4 * c23cb87 [Backport] CVE-2019-5837 3/4 * f123d13 [Backport] CVE-2019-5837 2/4 * 10d98e6 [Backport] CVE-2019-5837 1/4 * 8ffc041 [Backport] CVE-2019-5832 * a97fa0a [Backport] CVE-2019-5831 * ec89d97 [Backport] CVE-2019-5829 * 2323dc9 Fix segfaults with arm 32bit on metrics * 6f3c15d Bump V8 patch level * e8eec84 Fix changing should_override_user_agent_in_new_tabs_ Task-number: QTBUG-76207 Change-Id: Ifc6b76ae4b253a7ea385398bfdc1bc0fcf699de7 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index bd792030e..0a0221c48 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit bd792030e194a0bcce4defbf2298041244b54121 +Subproject commit 0a0221c488ec808b850b66c849af1659d5ee2163 -- cgit v1.2.3 From 9dce1c5b12db094cdc469d7d68eb3124f9393dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Mon, 22 Jul 2019 11:33:46 +0200 Subject: Fix use-after-free of HostResolver Create one HostResolver per profile to avoid use-after-free in NetworkHintsMessageFilter (5.12) or NetworkContext (5.13). Fixes: QTBUG-75884 Change-Id: Ic1a2973b4fb0aed6bd0fa1bb9a1d7c3012c30fe0 Reviewed-by: Allan Sandfeld Jensen --- src/core/profile_io_data_qt.cpp | 3 ++- src/core/profile_io_data_qt.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp index dd363f74d..99a6f6db0 100644 --- a/src/core/profile_io_data_qt.cpp +++ b/src/core/profile_io_data_qt.cpp @@ -200,9 +200,11 @@ content::ResourceContext *ProfileIODataQt::resourceContext() void ProfileIODataQt::initializeOnIOThread() { m_networkDelegate.reset(new NetworkDelegateQt(this)); + m_hostResolver = net::HostResolver::CreateDefaultResolver(NULL); m_urlRequestContext.reset(new net::URLRequestContext()); m_urlRequestContext->set_network_delegate(m_networkDelegate.get()); m_urlRequestContext->set_enable_brotli(base::FeatureList::IsEnabled(features::kBrotliEncoding)); + m_urlRequestContext->set_host_resolver(m_hostResolver.get()); // this binds factory to io thread m_weakPtr = m_weakPtrFactory.GetWeakPtr(); QMutexLocker lock(&m_mutex); @@ -289,7 +291,6 @@ void ProfileIODataQt::generateStorage() ct_verifier->AddLogs(ct_logs); m_storage->set_cert_transparency_verifier(std::move(ct_verifier)); m_storage->set_ct_policy_enforcer(base::WrapUnique(new net::DefaultCTPolicyEnforcer())); - m_storage->set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL)); m_storage->set_ssl_config_service(std::make_unique()); if (!m_httpAuthPreferences) { m_httpAuthPreferences.reset(new net::HttpAuthPreferences()); diff --git a/src/core/profile_io_data_qt.h b/src/core/profile_io_data_qt.h index 2d4706bf4..8ce6185b5 100644 --- a/src/core/profile_io_data_qt.h +++ b/src/core/profile_io_data_qt.h @@ -120,6 +120,7 @@ private: std::unique_ptr m_httpAuthPreferences; std::unique_ptr m_jobFactory; std::unique_ptr m_transportSecurityPersister; + std::unique_ptr m_hostResolver; base::WeakPtr m_weakPtr; scoped_refptr m_cookieDelegate; content::URLRequestInterceptorScopedVector m_requestInterceptors; -- cgit v1.2.3 From 08053c0a8a2cfc01c4d92155342a98d610e12473 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 24 Jul 2019 15:01:47 +0300 Subject: Fix compilation with C++20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implicit capture of this in [=] is deprecated. Fix by using explicit captures. Change-Id: Ia4344c4a15669f5076ad848626278a57cbe6767a Reviewed-by: Mårten Nordheim Reviewed-by: Allan Sandfeld Jensen --- src/webenginewidgets/api/qwebenginepage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index a350433b8..7e6265fda 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -438,7 +438,7 @@ void QWebEnginePagePrivate::didPrintPage(quint64 requestId, QSharedPointerstart(); PrinterWorker *printerWorker = new PrinterWorker(result, currentPrinter); - QObject::connect(printerWorker, &PrinterWorker::resultReady, q, [=](bool success) { + QObject::connect(printerWorker, &PrinterWorker::resultReady, q, [requestId, this](bool success) { currentPrinter = nullptr; m_callbacks.invoke(requestId, success); }); -- cgit v1.2.3 From c3c37b4e93a26748497bec1a0dc29b8358408157 Mon Sep 17 00:00:00 2001 From: Tamas Zakor Date: Thu, 11 Jul 2019 10:44:05 +0200 Subject: Fix tooltip text wrapping Also set the hiding delay to a reasonable time. Fixes: QTBUG-76122 Change-Id: Id971edbd9fb87cc96df53f73f2e7c61bde5855ef Reviewed-by: Allan Sandfeld Jensen --- src/webengine/ui/ToolTip.qml | 8 +++++--- src/webenginewidgets/api/qwebenginepage.cpp | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/webengine/ui/ToolTip.qml b/src/webengine/ui/ToolTip.qml index 96033e8f1..2bfe9eaf5 100644 --- a/src/webengine/ui/ToolTip.qml +++ b/src/webengine/ui/ToolTip.qml @@ -47,8 +47,9 @@ Item { visible: false property alias text: toolTip.text - property int delayTimerInterval: 1000 - property int hideTimerInterval: 1500 + property int delayTimerInterval: 500 + property int hideTimerInterval: 10000 + property int toolTipMaxWidth: 400 Timer { id: delayTimer @@ -77,7 +78,8 @@ Item { Text { id: toolTip anchors {fill: parent; margins: 5} - wrapMode: Text.WrapAnywhere + wrapMode: Text.Wrap + width: Math.min(toolTipMaxWidth, (toolTip.text.length +1) * 8) } } diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 055047341..35fe542e8 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -1887,7 +1887,7 @@ void QWebEnginePagePrivate::setToolTip(const QString &toolTipText) } // Update tooltip if text was changed. - QString wrappedTip = QLatin1String("

") + QString wrappedTip = QLatin1String("

") % toolTipText.toHtmlEscaped().left(MaxTooltipLength) % QLatin1String("

"); if (view->toolTip() != wrappedTip) -- cgit v1.2.3 From 1e11cc6c856b731a7e8d42a433840671c46e97a8 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 25 Jul 2019 10:03:06 +0200 Subject: Update Chromium Pulls in following changes: * baa6d2fa [Backport] Security bug 959518 * fd789653 [Backport] Security bug 961597 * 09c99945 [Backport] Security bug 964795 * d42e2e2b [Backport] Security bug 964928 * cc4d38df [Backport] Security bug 939644 * 906ddce7 [Backport] Security bug 948228 * c51e0d38 Fix building with spellchecking disabled Task-number: QTBUG-76206 Change-Id: Ic858c5ed803c8fe71b9d436a420ff94f9a30b237 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 7871e09ac..baa6d2fad 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 7871e09ac266bd23fab100c9b56c14fcbdf2198f +Subproject commit baa6d2fad748acee8541ef6c46897e98b5b4601f -- cgit v1.2.3 From cc2397eea05eedbbcbf8a592fad13ee51f6db5cf Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 26 Jul 2019 14:28:34 +0200 Subject: Clean-up handling of selected files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplifies the code and makes sure both the two QML implementations of the file-selector are source compatible. Note, this does not address issues with test on Windows. Change-Id: Ieee84866c456d600a812683cae389d6a6980366f Reviewed-by: Michael Brüning --- src/core/file_picker_controller.cpp | 36 +++++++--------- tests/auto/quick/qmltests/data/tst_filePicker.qml | 52 ++++++++++------------- 2 files changed, 39 insertions(+), 49 deletions(-) diff --git a/src/core/file_picker_controller.cpp b/src/core/file_picker_controller.cpp index 3e64afd20..28ededf37 100644 --- a/src/core/file_picker_controller.cpp +++ b/src/core/file_picker_controller.cpp @@ -64,12 +64,19 @@ FilePickerController::~FilePickerController() = default; void FilePickerController::accepted(const QStringList &files) { QStringList stringList; - - for (const QString &file : files) { - if (QDir(file).isAbsolute()) - stringList.append(file); - else - qWarning("Ignore invalid item in FilePickerController::accepted(QStringList): %s", qPrintable(file)); + stringList.reserve(files.count()); + + for (const QString &urlString : files) { + // We accept strings on both absolute-path and file-URL form: + if (QDir::isAbsolutePath(urlString)) { + stringList.append(QDir::fromNativeSeparators(urlString)); + } else { + QUrl url(urlString, QUrl::StrictMode); + if (url.isLocalFile() && QDir::isAbsolutePath(url.toLocalFile())) + stringList.append(url.toLocalFile()); + else + qWarning("Ignoring invalid item in FilePickerController::accepted(QStringList): %s", qPrintable(urlString)); + } } FilePickerController::filesSelectedInChooser(stringList); @@ -77,21 +84,10 @@ void FilePickerController::accepted(const QStringList &files) void FilePickerController::accepted(const QVariant &files) { - QStringList stringList; - QList urlList = QUrl::fromStringList(files.toStringList()); - - if (urlList.isEmpty()) { - FilePickerController::accepted(stringList); - } else { - for (const QUrl &url : qAsConst(urlList)) { - if (url.isValid() && url.scheme() == "file" && !url.path().isEmpty()) - stringList.append(url.path()); - else - qWarning("Ignore invalid item in FilePickerController::accepted(QVariant): %s", qPrintable(url.toString())); - } + if (!files.canConvert(QVariant::StringList)) + qWarning("An unhandled type '%s' was provided in FilePickerController::accepted(QVariant)", files.typeName()); - FilePickerController::accepted(stringList); - } + accepted(files.toStringList()); } void FilePickerController::rejected() diff --git a/tests/auto/quick/qmltests/data/tst_filePicker.qml b/tests/auto/quick/qmltests/data/tst_filePicker.qml index 2f813b966..d2815e3a8 100644 --- a/tests/auto/quick/qmltests/data/tst_filePicker.qml +++ b/tests/auto/quick/qmltests/data/tst_filePicker.qml @@ -72,27 +72,25 @@ TestWebEngineView { function test_acceptSingleFileSelection_data() { return [ - { tag: "/test.txt)", input: "/test.txt", passDefaultDialog: false, passCustomDialog: true }, - { tag: "/tést.txt", input: "/tést.txt", passDefaultDialog: false, passCustomDialog: true }, - { tag: "file:///test.txt", input: "file:///test.txt", passDefaultDialog: true, passCustomDialog: false }, - { tag: "file:///tést.txt", input: "file:///tést.txt", passDefaultDialog: true, passCustomDialog: false }, - { tag: "file:///t%C3%A9st.txt", input: "file:///t%C3%A9st.txt", passDefaultDialog: true, passCustomDialog: false }, - { tag: "file://test.txt", input: "file://test.txt", passDefaultDialog: false, passCustomDialog: false }, - { tag: "file:/test.txt", input: "file:/test.txt", passDefaultDialog: true, passCustomDialog: false }, - { tag: "file:test//test.txt", input: "file:test//test.txt", passDefaultDialog: false, passCustomDialog: false }, - { tag: "http://test.txt", input: "http://test.txt", passDefaultDialog: false, passCustomDialog: false }, - { tag: "qrc:/test.txt", input: "qrc:/test.txt", passDefaultDialog: false, passCustomDialog: false }, + { tag: "/test.txt", input: "/test.txt", expected: "test.txt" }, + { tag: "test.txt", input: "test.txt", expected: "Failed to Upload" }, + { tag: "/tést.txt", input: "/tést.txt", expected: "tést.txt" }, + { tag: "/t%65st.txt", input: "/t%65st.txt", expected: "t%65st.txt" }, + { tag: "file:///test.txt", input: "file:///test.txt", expected: "test.txt" }, + { tag: "file:///tést.txt", input: "file:///tést.txt", expected: "tést.txt" }, + { tag: "file:///t%65st.txt", input: "file:///t%65st.txt", expected: "test.txt" }, + { tag: "file://test.txt", input: "file://test.txt", expected: "test.txt" }, + { tag: "file:/test.txt", input: "file:/test.txt", expected: "test.txt"}, + { tag: "file:test//test.txt", input: "file:test//test.txt", expected: "Failed to Upload" }, + { tag: "http://test.txt", input: "http://test.txt", expected: "Failed to Upload" }, + { tag: "qrc:/test.txt", input: "qrc:/test.txt", expected: "Failed to Upload" }, ]; } function test_acceptSingleFileSelection(row) { var expectedFileName; - // Default dialog (expects URL). - expectedFileName = "Failed to Upload"; - if (row.passDefaultDialog) - expectedFileName = row.input.slice(row.input.lastIndexOf('/') + 1); - + // Default dialog webEngineView.url = Qt.resolvedUrl("singlefileupload.html"); verify(webEngineView.waitForLoadSucceeded()); @@ -101,16 +99,12 @@ TestWebEngineView { keyClick(Qt.Key_Enter); // Focus is on the button. Open FileDialog. tryCompare(FilePickerParams, "filePickerOpened", true); - tryCompare(webEngineView, "title", decodeURIComponent(expectedFileName)); + tryCompare(webEngineView, "title", row.expected); - // Custom dialog (expects absolute path). + // Custom dialog var finished = false; - expectedFileName = "Failed to Upload"; - if (row.passCustomDialog) - expectedFileName = row.input.slice(row.input.lastIndexOf('/') + 1); - function acceptedFileHandler(request) { request.accepted = true; request.dialogAccept(row.input); @@ -123,7 +117,7 @@ TestWebEngineView { keyClick(Qt.Key_Enter); // Focus is on the button. Open FileDialog. tryVerify(function() { return finished; }); - tryCompare(webEngineView, "title", expectedFileName); + tryCompare(webEngineView, "title", row.expected); webEngineView.fileDialogRequested.disconnect(acceptedFileHandler); } @@ -165,14 +159,14 @@ TestWebEngineView { function test_acceptMultipleFilesWithCustomDialog_data() { return [ - { tag: "path", input: ["/test1.txt", "/test2.txt"], expectedValueForDefaultDialog: "Failed to Upload", expectedValueForCustomDialog: "test1.txt,test2.txt" }, - { tag: "file", input: ["file:///test1.txt", "file:///test2.txt"], expectedValueForDefaultDialog: "test1.txt,test2.txt", expectedValueForCustomDialog: "Failed to Upload" }, - { tag: "mixed", input: ["file:///test1.txt", "/test2.txt"], expectedValueForDefaultDialog: "test1.txt", expectedValueForCustomDialog: "test2.txt" }, + { tag: "path", input: ["/test1.txt", "/test2.txt"], expectedValue: "test1.txt,test2.txt" }, + { tag: "file", input: ["file:///test1.txt", "file:/test2.txt"], expectedValue: "test1.txt,test2.txt" }, + { tag: "mixed", input: ["file:///test1.txt", "/test2.txt"], expectedValue: "test1.txt,test2.txt" }, ]; } function test_acceptMultipleFilesWithCustomDialog(row) { - // Default dialog (expects URL). + // Default dialog webEngineView.url = Qt.resolvedUrl("multifileupload.html"); verify(webEngineView.waitForLoadSucceeded()); @@ -181,10 +175,10 @@ TestWebEngineView { keyClick(Qt.Key_Enter); // Focus is on the button. Open FileDialog. tryCompare(FilePickerParams, "filePickerOpened", true); - tryCompare(webEngineView, "title", row.expectedValueForDefaultDialog); + tryCompare(webEngineView, "title", row.expectedValue); - // Custom dialog (expects absolute path). + // Custom dialog var finished = false; function acceptedFileHandler(request) { @@ -199,7 +193,7 @@ TestWebEngineView { keyClick(Qt.Key_Enter); // Focus is on the button. Open FileDialog. tryVerify(function() { return finished; }); - tryCompare(webEngineView, "title", row.expectedValueForCustomDialog); + tryCompare(webEngineView, "title", row.expectedValue); webEngineView.fileDialogRequested.disconnect(acceptedFileHandler); } } -- cgit v1.2.3 From fa555f40bca60e82194bef22915bf7c545082c0e Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 25 Jul 2019 10:07:21 +0200 Subject: Update Chromium Pulls in following changes: * 8096caad [Backport] Security bug 952849 * b272b6b7 [Backport] Security bug 954762 * c92a0a92 [Backport] Security bug 956625 * 322434dc [Backport] Security bug 958457 * e1c1bf70 [Backport] Security bug 958689 * 4b6f9da2 [Backport] Security bug 959192 * a9aad285 [Backport] Security bug 959193 2/2 * 73e83d08 [Backport] Security bug 959193 1/2 Task-number: QTBUG-76206 Change-Id: I86b50d55d5dfc6f39b54757feb7b79507360a9a8 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index baa6d2fad..8096caad7 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit baa6d2fad748acee8541ef6c46897e98b5b4601f +Subproject commit 8096caad7098cb949899abb6a231d28349c7e409 -- cgit v1.2.3 From 83f83f68174c27ca984d84aacc323c209548ba43 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 25 Jul 2019 10:11:00 +0200 Subject: Update Chromium Pulls in following changes: * b15c6b71 [Backport] CVE-2019-5842 * 07267def [Backport] Security bug 934161 * 09302826 [Backport] Security bug 950005 * d66b2378 [Backport] Security bug 948172 * 1952a079 [Backport] Security bug 962083 * 4f97dbdf [Backport] Security bug 948944 Task-number: QTBUG-76206 Change-Id: I17295bb71b4c735293befd67bdd1092ade29e08d Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 8096caad7..b15c6b71b 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 8096caad7098cb949899abb6a231d28349c7e409 +Subproject commit b15c6b71b401c8650451fd877f10fca8e96618a5 -- cgit v1.2.3 From edbe8a4b07d31807e3c298e3bd018353ed77a107 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 25 Jul 2019 07:58:22 +0200 Subject: Lower requirement for glibc to 2.17 Fixes: QTBUG-77171 Change-Id: I9eb5a34adbc62c8738ba5ffdf315ccf056da7b98 Reviewed-by: Allan Sandfeld Jensen --- config.tests/glibc/glibc.cpp | 4 ++-- src/3rdparty | 2 +- src/core/configure.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config.tests/glibc/glibc.cpp b/config.tests/glibc/glibc.cpp index e78994b64..3cdd77f44 100644 --- a/config.tests/glibc/glibc.cpp +++ b/config.tests/glibc/glibc.cpp @@ -28,8 +28,8 @@ #include -#if __GLIBC__ < 2 || __GLIBC_MINOR__ < 27 -#error glibc versions below 2.27 are not supported +#if __GLIBC__ < 2 || __GLIBC_MINOR__ < 17 +#error glibc versions below 2.17 are not supported #endif int main(int , char **) { diff --git a/src/3rdparty b/src/3rdparty index b15c6b71b..96dfb9878 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit b15c6b71b401c8650451fd877f10fca8e96618a5 +Subproject commit 96dfb9878e90486353d994ca016c27c7c1f1b6b9 diff --git a/src/core/configure.json b/src/core/configure.json index 66e39ddc2..be686850b 100644 --- a/src/core/configure.json +++ b/src/core/configure.json @@ -313,7 +313,7 @@ "type": "compile" }, "webengine-glibc": { - "label": "glibc > 2.26", + "label": "glibc > 2.16", "type": "compile", "test": "glibc" }, -- cgit v1.2.3 From 62f819d7ed9f6b1a085d88d1397c29ff62e4458b Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 22 Jul 2019 15:24:59 +0200 Subject: Fix compilation against 5.9 Change-Id: Icfe50ba5c60a6e2e588af6cdc07500013b6df9a1 Reviewed-by: Allan Sandfeld Jensen --- src/core/render_widget_host_view_qt.cpp | 9 ++++++++- src/core/touch_selection_controller_client_qt.cpp | 2 +- src/core/web_event_factory.cpp | 4 ++-- src/webengine/plugin/plugin.cpp | 2 ++ src/webengine/render_widget_host_view_qt_delegate_quick.cpp | 4 ++++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 4407e706e..3be0c9390 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -723,8 +723,11 @@ void RenderWidgetHostViewQt::OnUpdateTextInputStateCalled(content::TextInputMana } ui::TextInputType type = getTextInputType(); +#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText | Qt::ImhNoTextHandles | Qt::ImhNoEditMenu); - +#else + m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText); +#endif m_surroundingText = toQt(state->value); // Remove IME composition text from the surrounding text if (state->composition_start != -1 && state->composition_end != -1) @@ -1101,7 +1104,11 @@ QVariant RenderWidgetHostViewQt::inputMethodQuery(Qt::InputMethodQuery query) // TODO: Implement this return QVariant(); // No limit. case Qt::ImHints: +#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) return int(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText | Qt::ImhNoTextHandles | Qt::ImhNoEditMenu); +#else + return int(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText); +#endif default: return QVariant(); } diff --git a/src/core/touch_selection_controller_client_qt.cpp b/src/core/touch_selection_controller_client_qt.cpp index da3c78b8a..0f44210d1 100644 --- a/src/core/touch_selection_controller_client_qt.cpp +++ b/src/core/touch_selection_controller_client_qt.cpp @@ -315,7 +315,7 @@ void TouchSelectionControllerClientQt::showMenu() WebContentsAdapterClient *adapterClient = m_rwhv->adapterClient(); Q_ASSERT(adapterClient); - adapterClient->showTouchSelectionMenu(m_menuController.get(), + adapterClient->showTouchSelectionMenu(m_menuController.data(), QRect(toQt(gfx::ToEnclosingRect(anchor_rect))), QSize(toQt(gfx::ToRoundedSize(max_handle_size)))); m_menuShowing = true; diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index b97696030..a0fac73ec 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -926,7 +926,7 @@ static ui::DomKey domKeyForQtKey(int qtKey) return ui::DomKey::ZENKAKU; case Qt::Key_Zenkaku_Hankaku: return ui::DomKey::ZENKAKU_HANKAKU; - +#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) // Dead keys (ui/events/keycodes/keyboard_code_conversion_xkb.cc) case Qt::Key_Dead_Grave: return ui::DomKey::DeadKeyFromCombiningCharacter(0x0300); @@ -994,7 +994,7 @@ static ui::DomKey domKeyForQtKey(int qtKey) return ui::DomKey::DeadKeyFromCombiningCharacter(0x00A4); case Qt::Key_Dead_Greek: return ui::DomKey::DeadKeyFromCombiningCharacter(0x037E); - +#endif // General-Purpose Function Keys case Qt::Key_F1: return ui::DomKey::F1; diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp index 56e5c5c9f..a332288d4 100644 --- a/src/webengine/plugin/plugin.cpp +++ b/src/webengine/plugin/plugin.cpp @@ -159,10 +159,12 @@ public: qmlRegisterUncreatableType(uri, 1, 7, "RegisterProtocolHandlerRequest", msgUncreatableType("RegisterProtocolHandlerRequest")); qmlRegisterUncreatableType(uri, 1, 8, "WebEngineAction", msgUncreatableType("WebEngineAction")); +#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) qmlRegisterUncreatableType(uri, 1, 9, "WebEngineClientCertificateSelection", msgUncreatableType("WebEngineClientCertificateSelection")); qmlRegisterUncreatableType(uri, 1, 9, "WebEngineClientCertificateOption", msgUncreatableType("WebEngineClientCertificateOption")); +#endif qmlRegisterUncreatableType(uri, 1, 9, "WebEngineNotification", msgUncreatableType("WebEngineNotification")); } diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp index b636448b3..55ec19fc9 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -106,7 +106,11 @@ QRectF RenderWidgetHostViewQtDelegateQuick::viewGeometry() const const QPointF p2 = mapToGlobal(mapFromScene(QPointF(width(), height()))); QRectF geometry = QRectF(p1, p2).normalized(); // But keep the size untransformed to behave like other QQuickItems. +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) geometry.setSize(size()); +#else + geometry.setSize(QSizeF(width(), height())); +#endif return geometry; } -- cgit v1.2.3 From 50dc091b5ddca2fb1c80e398d2ab360a5ec5e767 Mon Sep 17 00:00:00 2001 From: Tamas Zakor Date: Mon, 29 Jul 2019 12:37:33 +0200 Subject: Fix file URI checks for FilePickerController::accepted() on Windows Extend auto tests with windows specific cases. Change-Id: I731cd520c12a38636a5df4829a79d7bd1d85a314 Reviewed-by: Allan Sandfeld Jensen --- src/core/file_picker_controller.cpp | 23 ++++-- tests/auto/quick/qmltests/data/tst_filePicker.qml | 88 +++++++++++++++++++---- 2 files changed, 95 insertions(+), 16 deletions(-) diff --git a/src/core/file_picker_controller.cpp b/src/core/file_picker_controller.cpp index 28ededf37..63b93c502 100644 --- a/src/core/file_picker_controller.cpp +++ b/src/core/file_picker_controller.cpp @@ -39,6 +39,9 @@ #include "file_picker_controller.h" #include "type_conversion.h" +#if defined(OS_WIN) +#include "base/files/file_path.h" +#endif #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/browser/file_select_listener.h" @@ -69,12 +72,24 @@ void FilePickerController::accepted(const QStringList &files) for (const QString &urlString : files) { // We accept strings on both absolute-path and file-URL form: if (QDir::isAbsolutePath(urlString)) { - stringList.append(QDir::fromNativeSeparators(urlString)); + QString absolutePath = QDir::fromNativeSeparators(urlString); +#if defined(OS_WIN) + if (absolutePath.at(0).isLetter() && absolutePath.at(1) == QLatin1Char(':') && !base::FilePath::IsSeparator(absolutePath.at(2).toLatin1())) + qWarning("Ignoring invalid item in FilePickerController::accepted(QStringList): %s", qPrintable(urlString)); + else +#endif + stringList.append(absolutePath); } else { QUrl url(urlString, QUrl::StrictMode); - if (url.isLocalFile() && QDir::isAbsolutePath(url.toLocalFile())) - stringList.append(url.toLocalFile()); - else + if (url.isLocalFile() && QDir::isAbsolutePath(url.toLocalFile())) { + QString absolutePath = url.toLocalFile(); +#if defined(OS_WIN) + if (absolutePath.at(0).isLetter() && absolutePath.at(1) == QLatin1Char(':') && !base::FilePath::IsSeparator(absolutePath.at(2).toLatin1())) + qWarning("Ignoring invalid item in FilePickerController::accepted(QStringList): %s", qPrintable(urlString)); + else +#endif + stringList.append(absolutePath); + } else qWarning("Ignoring invalid item in FilePickerController::accepted(QStringList): %s", qPrintable(urlString)); } } diff --git a/tests/auto/quick/qmltests/data/tst_filePicker.qml b/tests/auto/quick/qmltests/data/tst_filePicker.qml index d2815e3a8..fad81273c 100644 --- a/tests/auto/quick/qmltests/data/tst_filePicker.qml +++ b/tests/auto/quick/qmltests/data/tst_filePicker.qml @@ -36,6 +36,12 @@ TestWebEngineView { width: 400 height: 300 + function driveLetter() { + if (Qt.platform.os !== "windows") + return ""; + return "C:/"; + } + SignalSpy { id: titleSpy target: webEngineView @@ -72,15 +78,15 @@ TestWebEngineView { function test_acceptSingleFileSelection_data() { return [ - { tag: "/test.txt", input: "/test.txt", expected: "test.txt" }, - { tag: "test.txt", input: "test.txt", expected: "Failed to Upload" }, - { tag: "/tést.txt", input: "/tést.txt", expected: "tést.txt" }, - { tag: "/t%65st.txt", input: "/t%65st.txt", expected: "t%65st.txt" }, - { tag: "file:///test.txt", input: "file:///test.txt", expected: "test.txt" }, - { tag: "file:///tést.txt", input: "file:///tést.txt", expected: "tést.txt" }, - { tag: "file:///t%65st.txt", input: "file:///t%65st.txt", expected: "test.txt" }, - { tag: "file://test.txt", input: "file://test.txt", expected: "test.txt" }, - { tag: "file:/test.txt", input: "file:/test.txt", expected: "test.txt"}, + { tag: driveLetter() + "/test.txt", input: driveLetter() + "/test.txt", expected: "test.txt" }, + { tag: driveLetter() + "test.txt", input: driveLetter() + "test.txt", expected: "Failed to Upload" }, + { tag: driveLetter() + "/tést.txt", input: driveLetter() + "/tést.txt", expected: "tést.txt" }, + { tag: driveLetter() + "/t%65st.txt", input: driveLetter() + "/t%65st.txt", expected: "t%65st.txt" }, + { tag: "file:///" + driveLetter() + "test.txt", input: "file:///" + driveLetter() + "test.txt", expected: "test.txt" }, + { tag: "file:///" + driveLetter() + "tést.txt", input: "file:///" + driveLetter() + "tést.txt", expected: "tést.txt" }, + { tag: "file:///" + driveLetter() + "t%65st.txt", input: "file:///" + driveLetter() + "t%65st.txt", expected: "test.txt" }, + { tag: "file://" + driveLetter() + "test.txt", input: "file://" + driveLetter() + "test.txt", expected: "test.txt" }, + { tag: "file:/" + driveLetter() + "test.txt", input: "file:/" + driveLetter() + "test.txt", expected: "test.txt"}, { tag: "file:test//test.txt", input: "file:test//test.txt", expected: "Failed to Upload" }, { tag: "http://test.txt", input: "http://test.txt", expected: "Failed to Upload" }, { tag: "qrc:/test.txt", input: "qrc:/test.txt", expected: "Failed to Upload" }, @@ -159,9 +165,9 @@ TestWebEngineView { function test_acceptMultipleFilesWithCustomDialog_data() { return [ - { tag: "path", input: ["/test1.txt", "/test2.txt"], expectedValue: "test1.txt,test2.txt" }, - { tag: "file", input: ["file:///test1.txt", "file:/test2.txt"], expectedValue: "test1.txt,test2.txt" }, - { tag: "mixed", input: ["file:///test1.txt", "/test2.txt"], expectedValue: "test1.txt,test2.txt" }, + { tag: "path", input: [driveLetter() + "/test1.txt", driveLetter() + "/test2.txt"], expectedValue: "test1.txt,test2.txt" }, + { tag: "file", input: ["file:///" + driveLetter() + "test1.txt", "file:/" + driveLetter() + "test2.txt"], expectedValue: "test1.txt,test2.txt" }, + { tag: "mixed", input: ["file:///" + driveLetter() + "test1.txt", driveLetter() + "/test2.txt"], expectedValue: "test1.txt,test2.txt" }, ]; } @@ -196,5 +202,63 @@ TestWebEngineView { tryCompare(webEngineView, "title", row.expectedValue); webEngineView.fileDialogRequested.disconnect(acceptedFileHandler); } + + function test_acceptFileOnWindows_data() { + return [ + { tag: "C:test.txt", input: "C:test.txt", expected: "Failed to Upload"}, + { tag: "C:test:txt", input: "C:test:txt", expected: "Failed to Upload"}, + { tag: "C:/test.txt", input: "C:/test.txt", expected: "test.txt"}, + { tag: "C:\\test.txt", input: "C:\\test.txt", expected: "test.txt"}, + { tag: "C:\\Documents and Settings\\test\\test.txt", input: "C:\\Documents and Settings\\test\\test.txt", expected: "test.txt"}, + { tag: "\\\\applib\\products\\a%2Db\\ abc%5F9\\t.est\\test.txt", input: "file://applib/products/a%2Db/ abc%5F9/4148.920a/media/test.txt", expected: "test.txt"}, + { tag: "file://applib/products/a%2Db/ abc%5F9/t.est/test.txt", input: "file://applib/products/a%2Db/ abc%5F9/4148.920a/media/test.txt", expected: "test.txt"}, + { tag: "file://applib/products/a-b/abc_1/t.est/test.txt", input: "file://applib/products/a-b/abc_1/t.est/test.txt", expected: "test.txt"}, + { tag: "file:\\\\applib\\products\\a-b\\abc_1\\t:est\\test.txt", input: "file:\\\\applib\\products\\a-b\\abc_1\\t:est\\test.txt", expected: "test.txt"}, + { tag: "file:C:/test.txt", input: "file:C:/test.txt", expected: "Failed to Upload"}, + { tag: "file:/C:/test.txt", input: "file:/C:/test.txt", expected: "Failed to Upload"}, + { tag: "file://C:/test.txt", input: "file://C:/test.txt", expected: "Failed to Upload"}, + { tag: "file:///C:test.txt", input: "file:///C:test.txt", expected: "Failed to Upload"}, + { tag: "file:///C:/test.txt", input: "file:///C:/test.txt", expected: "test.txt"}, + { tag: "file:///C:\\test.txt", input: "file:///C:\\test.txt", expected: "test.txt"}, + { tag: "file:\\//C:/test.txt", input: "file:\\//C:/test.txt", expected: "test.txt"}, + { tag: "file:\\\\/C:\\test.txt", input: "file:\\\\/C:\\test.txt", expected: "test.txt"}, + { tag: "\\\\?\\C:/test.txt", input: "\\\\?\\C:/test.txt", expected: "Failed to Upload"}, + ]; + } + + function test_acceptFileOnWindows(row) { + if (Qt.platform.os !== "windows") + skip("Windows-only test"); + + // Default dialog + webEngineView.url = Qt.resolvedUrl("singlefileupload.html"); + verify(webEngineView.waitForLoadSucceeded()); + + FilePickerParams.selectFiles = true; + FilePickerParams.selectedFilesUrl.push(row.input); + + keyClick(Qt.Key_Enter); // Focus is on the button. Open FileDialog. + tryCompare(FilePickerParams, "filePickerOpened", true); + tryCompare(webEngineView, "title", row.expected); + + + // Custom dialog + var finished = false; + + function acceptedFileHandler(request) { + request.accepted = true; + request.dialogAccept(row.input); + finished = true; + } + + webEngineView.fileDialogRequested.connect(acceptedFileHandler); + webEngineView.url = Qt.resolvedUrl("singlefileupload.html"); + verify(webEngineView.waitForLoadSucceeded()); + + keyClick(Qt.Key_Enter); // Focus is on the button. Open FileDialog. + tryVerify(function() { return finished; }); + tryCompare(webEngineView, "title", row.expected); + webEngineView.fileDialogRequested.disconnect(acceptedFileHandler); + } } } -- cgit v1.2.3 From b21d5123408a70496fb6e574fcbaace8453dea96 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 25 Jul 2019 10:23:54 +0200 Subject: Update Chromium Pulls in following changes: * c5c158eb [Backport] Security bug 958689 * a33c416a [Backport] Security bug 959193 1/2 * e339bd3a [Backport] Security bug 959193 2/2 * 44d5ec60 [Backport] Security bug 961597 * 33647d6f [Backport] Security bug 939644 * dd0c0a92 [Backport] Security bug 948228 Task-number: QTBUG-76207 Change-Id: I4ba94d0ee4fac31ea36688dcfa5d12905c9ec5f2 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 0a0221c48..c5c158ebe 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 0a0221c488ec808b850b66c849af1659d5ee2163 +Subproject commit c5c158ebe7553b461ea92225524bc2c18cef33f8 -- cgit v1.2.3 From 252c0a71c572aa0d33bdb0c159b9c25255836e82 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 25 Jul 2019 10:27:42 +0200 Subject: Update Chromium Pulls in following changes: * 7a9ec163 [Backport] Security bug 962083 * 7242b69e [Backport] Security bug 948944 * a0218a0c [Backport] Security bug 952849 * 3d7891fd [Backport] Security bug 956625 * 7b993cc6 [Backport] Security bug 958457 Task-number: QTBUG-76207 Change-Id: I5753e64d396098a481da8d06a47560e4ba46bfb1 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index c5c158ebe..7a9ec1633 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit c5c158ebe7553b461ea92225524bc2c18cef33f8 +Subproject commit 7a9ec16330860e9baac40b9895d13e33b3bbc0b1 -- cgit v1.2.3 From a2c365cb1f22431845380159c29048da76c2b2a9 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 25 Jul 2019 14:47:39 +0200 Subject: Update Chromium Pulls in following changes: * f7765bc8 [Backport] Security bug 959518 * 3b775d71 [Backport] CVE-2019-5842 * 05e857bc [Backport] Security bug 934161 * a57309fa [Backport] Security bug 950005 * b0859392 [Backport] Security bug 948172 Task-number: QTBUG-76207 Change-Id: I54fb67a97564b24f34c58b93b048b347f01dc306 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 7a9ec1633..f7765bc85 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 7a9ec16330860e9baac40b9895d13e33b3bbc0b1 +Subproject commit f7765bc85318b9f7cb8090b85d268238fa5a4cfa -- cgit v1.2.3 From 3531476f515a7ddfd73a2dbd31d71ae8d9da3d67 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 5 Aug 2019 19:53:07 +0200 Subject: Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pulls in following changes: * 35913278 Unify check for InputMethodAuraLinux * 989a5679 [Backport] Critical security issue 977057 * 687e6c44 [Backport] CVE-2019-5851 * bf972a73 [Backport] CVE-2019-5855 * aa6c4f95 [Backport] CVE-2019-5854 * 7ca59fb6 [Backport] CVE-2019-5857 * d5af7c80 [Backport] CVE-2019-5852 * 56013319 [Backport] CVE-2019-5861 * bfbde31f [Backport] CVE-2019-5856 * c8757fe0 [Backport] CVE-2019-5860 * 57865260 Backport fix for building ICU with VS2019 Fixes: QTBUG-77304 Task-number: QTBUG-77266 Change-Id: Ib03403030da4accd435a3e5ee7182e05dc8a2cf9 Reviewed-by: Jüri Valdmann --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 96dfb9878..79d32f4cf 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 96dfb9878e90486353d994ca016c27c7c1f1b6b9 +Subproject commit 79d32f4cf1d730fdf623a6bec2bca8e63efdca86 -- cgit v1.2.3 From 0caabd54a24ffa3a2d2de5cb6f1fce2af3588eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Fri, 9 Aug 2019 16:18:58 +0200 Subject: Update Chromium This pulls in the following changes: debc89cea4a [Backport] Security bug 983938 7484a0e17c5 [Backport] Security bug 976050 e09d1685cf8 [Backport] Security bug 983850 9c5334f1f28 [Backport] Security bug 973893 ca5bf18a297 [Backport] Security bug 962572 584f32bc179 [Backport] Security bug 958717 e12bb8bc570 [Backport] Security bug 960785 c154632fe57 [Backport] Security bug 981602 eef31f32a0f [Backport] CVE-2019-5862 1/3 d21bb66a280 [Backport] CVE-2019-5862 2/3 d464ddd6145 [Backport] CVE-2019-5862 3/3 eff881a3db6 [Backport] CVE-2019-5865 bf87ae53c67 [Backport] Security bug 974627 ea463a17641 [Backport] Security bug 961674 65c74dd3316 [Backport] Security bug 964002 Change-Id: I747053373e105d6fe9bfe05f449e18ed6902ca70 Reviewed-by: Michal Klocek --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 79d32f4cf..65c74dd33 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 79d32f4cf1d730fdf623a6bec2bca8e63efdca86 +Subproject commit 65c74dd3316c12a4457a6fd202f9b4437186898c -- cgit v1.2.3 From b1bdb599a397d3f8d068b8619d32061c20e13e7c Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 6 Aug 2019 13:30:47 +0200 Subject: Skip qtwebengine for -no-gui build (also in the configure system) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This amends 26ac59af2306 and cb265ff630fd. Task-number: QTQAINFRA-2576 Task-number: QTBUG-75465 Change-Id: I2953222d2094f4f7a8570844b29426314e8f6279 Reviewed-by: Tony Sarajärvi Reviewed-by: Kai Koehne --- src/webengine/configure.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/webengine/configure.json b/src/webengine/configure.json index ec5ad34d9..ca0e5c2fd 100644 --- a/src/webengine/configure.json +++ b/src/webengine/configure.json @@ -3,6 +3,7 @@ "depends": [ "webenginecore-private" ], + "condition": "module.webenginecore", "features": { "webengine-ui-delegates": { "label": "UI Delegates", -- cgit v1.2.3 From d0725820c3f55aea3789489a64c63cc0b79325ff Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 16 Aug 2019 15:40:32 +0200 Subject: Doc: Mention QML API for client certificates WebEngineView.selectClientCertificate is new API in Qt 5.13. Add a link to the signal in the 'Client Certificate' section of the 'Qt WebEngine Features' page. Change-Id: Ie347973d8f9657870e975adde089e3d9d0abd6d4 Reviewed-by: Allan Sandfeld Jensen --- src/webengine/doc/src/qtwebengine-features.qdoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webengine/doc/src/qtwebengine-features.qdoc b/src/webengine/doc/src/qtwebengine-features.qdoc index 08c189740..00b9cb496 100644 --- a/src/webengine/doc/src/qtwebengine-features.qdoc +++ b/src/webengine/doc/src/qtwebengine-features.qdoc @@ -126,7 +126,9 @@ so uniquely identifies the user and might violate privacy expectations. To activate support for client certificates, an application needs to listen to - the QWebEnginePage::selectClientCertificate signal and select one of the offered + the QWebEnginePage::selectClientCertificate or + \l{WebEnginePage::selectClientCertificate}{WebEnginePage.selectClientCertificate} + signals and select one of the offered certificates. For applications that can navigate to untrusted web sites, it is recommended to always give the user a choice before uniquely identifying them to a remote server. -- cgit v1.2.3 From e00041659a938b72e52c575338655264dc97b0bb Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 16 Aug 2019 11:24:15 +0200 Subject: Add changes file for Qt 5.13.1 Change-Id: I75c3c6c993b9cbdbc1fcb0e5bdbc99d346a3bff9 Reviewed-by: Leena Miettinen --- dist/changes-5.13.1 | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 dist/changes-5.13.1 diff --git a/dist/changes-5.13.1 b/dist/changes-5.13.1 new file mode 100644 index 000000000..9e3a49558 --- /dev/null +++ b/dist/changes-5.13.1 @@ -0,0 +1,91 @@ +Qt 5.13.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.13.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.13 series is binary compatible with the 5.12.x series. +Applications compiled for 5.12 will continue to run with 5.13. + +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. + +**************************************************************************** +* Qt 5.13.1 Changes * +**************************************************************************** + +General +------- + + - [QTBUG-62106] Fixed possible crash after rapid tapping. + - [QTBUG-76226] Fixed PDF viewer on URLs with percent-encoded characters. + - [QTBUG-76249] Fixed user-agent on some new windows. + - [QTBUG-76958] Fixed possible crash when loading in background. + + +Chromium +-------- + + - Security fixes from Chromium up to version 76.0.3809.87, including: + + - CVE-2019-5829 + - CVE-2019-5831 + - CVE-2019-5832 + - CVE-2019-5836 + - CVE-2019-5837 + - CVE-2019-5839 + - CVE-2019-5842 + - CVE-2019-5851 + - CVE-2019-5852 + - CVE-2019-5854 + - CVE-2019-5855 + - CVE-2019-5856 + - CVE-2019-5857 + - CVE-2019-5860 + - CVE-2019-5861 + - CVE-2019-5862 + - CVE-2019-5865 + - Critical security issue 977057 + - Security issue 934161 + - Security issue 939644 + - Security issue 948172 + - Security issue 948228 + - Security issue 948944 + - Security issue 950005 + - Security issue 952849 + - Security issue 954762 + - Security issue 956625 + - Security issue 958717 + - Security issue 958457 + - Security issue 958689 + - Security issue 959192 + - Security issue 959193 + - Security issue 959518 + - Security issue 960785 + - Security issue 961597 + - Security issue 961674 + - Security issue 962083 + - Security issue 962572 + - Security issue 964002 + - Security issue 964795 + - Security issue 964928 + - Security issue 973893 + - Security issue 974627 + - Security issue 976050 + - Security issue 981602 + - Security issue 983850 + - Security issue 983938 + + +Qt WebEngine Core +----------------- + + - [QTBUG-60203] QWebEngineUrlRequestInterceptor can now set referer header. + -- cgit v1.2.3 From 1c33a4a6ae07106513a8105ebbc2d0c65363b333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Mon, 29 Jul 2019 13:10:14 +0200 Subject: Fix QWebEnginePage visibility state Calling view.show(); view.load(...); view.hide(); results in a WebContents in visible state because the first call to show() is delayed via a timer and never canceled so it takes effect after the hide(). Also, the page's visibility state is not updated when changing views, so that a visible QWebEngineView can be set to display a hidden QWebEnginePage. Fixes: QTBUG-77209 Change-Id: I0243c659f4039a35c36e04ea55c5972666170fd0 Reviewed-by: Allan Sandfeld Jensen --- src/webenginewidgets/api/qwebenginepage.cpp | 4 ++- src/webenginewidgets/api/qwebengineview.cpp | 3 ++ .../widgets/qwebengineview/tst_qwebengineview.cpp | 34 ++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index f252137ae..8451bab1a 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -175,7 +175,6 @@ QWebEnginePagePrivate::QWebEnginePagePrivate(QWebEngineProfile *_profile) wasShownTimer.setSingleShot(true); QObject::connect(&wasShownTimer, &QTimer::timeout, [this](){ ensureInitialized(); - wasShown(); }); profile->d_ptr->addWebContentsAdapterClient(this); @@ -215,6 +214,9 @@ void QWebEnginePagePrivate::initializationFinished() if (!qFuzzyCompare(adapter->currentZoomFactor(), defaultZoomFactor)) adapter->setZoomFactor(defaultZoomFactor); + if (view && view->isVisible()) + adapter->wasShown(); + scriptCollection.d->initializationFinished(adapter); m_isBeingAdopted = false; diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp index 6c08df343..6e1138522 100644 --- a/src/webenginewidgets/api/qwebengineview.cpp +++ b/src/webenginewidgets/api/qwebengineview.cpp @@ -61,6 +61,7 @@ void QWebEngineViewPrivate::pageChanged(QWebEnginePage *oldPage, QWebEnginePage Q_Q(QWebEngineView); if (oldPage) { + oldPage->d_ptr->wasHidden(); oldPage->disconnect(q); } @@ -74,6 +75,8 @@ void QWebEngineViewPrivate::pageChanged(QWebEnginePage *oldPage, QWebEnginePage QObject::connect(newPage, &QWebEnginePage::loadFinished, q, &QWebEngineView::loadFinished); QObject::connect(newPage, &QWebEnginePage::selectionChanged, q, &QWebEngineView::selectionChanged); QObject::connect(newPage, &QWebEnginePage::renderProcessTerminated, q, &QWebEngineView::renderProcessTerminated); + if (q->isVisible()) + newPage->d_ptr->wasShown(); } auto oldUrl = oldPage ? oldPage->url() : QUrl(); diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp index a7ff05f55..1bb65d7df 100644 --- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp +++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp @@ -192,6 +192,8 @@ private Q_SLOTS: void webUIURLs_data(); void webUIURLs(); void visibilityState(); + void visibilityState2(); + void visibilityState3(); void jsKeyboardEvent(); void deletePage(); void closeOpenerTab(); @@ -3106,6 +3108,38 @@ void tst_QWebEngineView::visibilityState() QCOMPARE(evaluateJavaScriptSync(view.page(), "document.visibilityState").toString(), QStringLiteral("visible")); } +void tst_QWebEngineView::visibilityState2() +{ + QWebEngineView view; + QSignalSpy spy(&view, &QWebEngineView::loadFinished); + view.show(); + view.load(QStringLiteral("about:blank")); + view.hide(); + QVERIFY(spy.count() || spy.wait()); + QVERIFY(spy.takeFirst().takeFirst().toBool()); + QCOMPARE(evaluateJavaScriptSync(view.page(), "document.visibilityState").toString(), QStringLiteral("hidden")); +} + +void tst_QWebEngineView::visibilityState3() +{ + QWebEnginePage page1; + QWebEnginePage page2; + QSignalSpy spy1(&page1, &QWebEnginePage::loadFinished); + QSignalSpy spy2(&page2, &QWebEnginePage::loadFinished); + page1.load(QStringLiteral("about:blank")); + page2.load(QStringLiteral("about:blank")); + QVERIFY(spy1.count() || spy1.wait()); + QVERIFY(spy2.count() || spy2.wait()); + QWebEngineView view; + view.setPage(&page1); + view.show(); + QCOMPARE(evaluateJavaScriptSync(&page1, "document.visibilityState").toString(), QStringLiteral("visible")); + QCOMPARE(evaluateJavaScriptSync(&page2, "document.visibilityState").toString(), QStringLiteral("hidden")); + view.setPage(&page2); + QCOMPARE(evaluateJavaScriptSync(&page1, "document.visibilityState").toString(), QStringLiteral("hidden")); + QCOMPARE(evaluateJavaScriptSync(&page2, "document.visibilityState").toString(), QStringLiteral("visible")); +} + void tst_QWebEngineView::jsKeyboardEvent() { QWebEngineView view; -- cgit v1.2.3 From 5c579b95c81388c9b596b209380a1a061718f5c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Wed, 21 Aug 2019 16:12:52 +0200 Subject: Update Chromium This pulls in the following changes: a90e18d2d30 [Backport] Security bug 983938 0699308555b [Backport] Security bug 976050 852040586ec [Backport] Security bug 983850 a9f2f201ec6 [Backport] Security bug 973893 4bc95ce8486 [Backport] Security bug 958717 456aa9409ea [Backport] CVE-2019-5856 8ad3193acea [Backport] CVE-2019-5852 c1a19035306 [Backport] CVE-2019-5854 de78692c035 [Backport] CVE-2019-5855 ac7d5d7df5a [Backport] CVE-2019-5851 81417ff67b7 [Backport] Critical security issue 977057 ffbd836a7c8 [Backport] CVE-2019-5857 6693cf14341 [Backport] CVE-2019-5860 134a78ac91b [Backport] Security bug 981602 e981e2326a8 [Backport] CVE-2019-5865 b814b7b7d71 [Backport] CVE-2019-5862 1/4 dbb531a8212 [Backport] CVE-2019-5862 2/4 8502a1f7be2 [Backport] CVE-2019-5862 3/4 b71efe4a834 [Backport] CVE-2019-5862 4/4 d377f182ec3 [Backport] CVE-2019-5861 1/2 e13a9847f21 [Backport] CVE-2019-5861 2/2 4d84676d74a [Backport] Security bug 974627 d0d509db8c7 [Backport] Security bug 961674 691d632f7af [Backport] Security bug 960785 bdb7acb5afd [Backport] Security bug 964002 6e2562dd1ef Fix build with recent linux kernel. 7a779d01607 Fix skcms build with avx Fixes: QTBUG-77402 Change-Id: Ib9fe63c806149c299714bb1f76e4adf2877389d5 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index f7765bc85..7a779d016 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit f7765bc85318b9f7cb8090b85d268238fa5a4cfa +Subproject commit 7a779d0160771dcf6b4a644bc11137753c25982c -- cgit v1.2.3 From 299993a4f60325fc5e70deff7b7734cf6bb0ede5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Mon, 26 Aug 2019 15:09:28 +0200 Subject: Update Chromium This pulls in the following changes: 74e69da92d0 Fix build with recent linux kernel. 32e459f495d Restore -fno-delete-null-pointer-checks Fixes: QTBUG-77671 Change-Id: I91987ac792179b77ffa312a9d6d40767b6fdbd57 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 65c74dd33..32e459f49 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 65c74dd3316c12a4457a6fd202f9b4437186898c +Subproject commit 32e459f495dc0475cdc1703514a257b45ccd3d84 -- cgit v1.2.3 From c75c3670e44bb848b043918fb742a86e5fba780d Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Fri, 12 Jul 2019 13:14:13 +0200 Subject: Fix WebEngineView.findText with a callback doc parameter description Change-Id: I6415ccd9486433d6c449ea0d18b65f354e4bcd42 Reviewed-by: Leena Miettinen Reviewed-by: Peter Varga --- src/webengine/doc/src/webengineview_lgpl.qdoc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/webengine/doc/src/webengineview_lgpl.qdoc b/src/webengine/doc/src/webengineview_lgpl.qdoc index 6194a800e..a4f07ddd9 100644 --- a/src/webengine/doc/src/webengineview_lgpl.qdoc +++ b/src/webengine/doc/src/webengineview_lgpl.qdoc @@ -438,14 +438,13 @@ To clear the search highlight, just pass an empty string. - The \a resultCallback must take a boolean parameter. It will be called with - a value of true if the \a subString was found; otherwise the callback value - will be false. + The \a resultCallback must take an integer parameter. It will be called with + the number of found occurrences of the \a subString. \code - findText("Qt", WebEngineView.FindCaseSensitively, function(success) { - if (success) - console.log("Qt was found!"); + findText("Qt", WebEngineView.FindCaseSensitively, function(matchCount) { + if (matchCount > 0) + console.log("'Qt' tokens found:", matchCount); }); \endcode */ -- cgit v1.2.3 From dbc0d09be2bbc3dce01ace956f534c4012402fba Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Tue, 20 Aug 2019 13:16:25 +0300 Subject: Add changes file for Qt 5.12.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I68aae7202d853802bd67bd11c41a037de93554b9 Reviewed-by: Jüri Valdmann --- dist/changes-5.12.5 | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 dist/changes-5.12.5 diff --git a/dist/changes-5.12.5 b/dist/changes-5.12.5 new file mode 100644 index 000000000..15f0bcde6 --- /dev/null +++ b/dist/changes-5.12.5 @@ -0,0 +1,80 @@ +Qt 5.12.5 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.4. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +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. + +**************************************************************************** +* Qt 5.12.5 Changes * +**************************************************************************** + +General +------- + + - [QTBUG-62106] Fixed possible crash after rapid tapping. + - [QTBUG-75884] Fixed crash on setHttpUserAgent. + - [QTBUG-76249] Fixed user-agent on some new windows. + - [QTBUG-76268] Fixed tab key send on minimize. + - [QTBUG-76347] Fixed duplicate events being send from tablets. + - [QTBUG-76828] Clear shared context on exit. + - [QTBUG-76958] Fixed possible crash when loading in background. + +Chromium +-------- + + - Security fixes from Chromium up to version 76.0.3809.87, including: + + - CVE-2019-5829 + - CVE-2019-5831 + - CVE-2019-5832 + - CVE-2019-5837 + - CVE-2019-5839 + - CVE-2019-5842 + - CVE-2019-5851 + - CVE-2019-5852 + - CVE-2019-5854 + - CVE-2019-5855 + - CVE-2019-5856 + - CVE-2019-5857 + - CVE-2019-5860 + - CVE-2019-5861 + - CVE-2019-5862 + - CVE-2019-5865 + - Critical security issue 977057 + - Security bug 934161 + - Security bug 939644 + - Security bug 948172 + - Security bug 948228 + - Security bug 948944 + - Security bug 950005 + - Security bug 952849 + - Security bug 956625 + - Security bug 958457 + - Security bug 958689 + - Security bug 959193 + - Security bug 959518 + - Security bug 958717 + - Security bug 960785 + - Security bug 961674 + - Security bug 961597 + - Security bug 962083 + - Security bug 964002 + - Security bug 973893 + - Security bug 974627 + - Security bug 976050 + - Security bug 981602 + - Security bug 983850 + - Security bug 983938 -- cgit v1.2.3 From 759085eb6ae57bc9c2bc35095798501824482da3 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 18 Jul 2019 12:43:02 +0200 Subject: Fix snippet in notification example QDoc couldn't find the lines asked for. Also switch example to Qt coding style for good measure. Change-Id: I8798d4e85011cb1f46ea9a051f205dc2f650eccb Reviewed-by: Leena Miettinen Reviewed-by: Kirill Burtsev Reviewed-by: Allan Sandfeld Jensen --- .../notifications/doc/src/notifications.qdoc | 28 +++++++++++----------- examples/webenginewidgets/notifications/main.cpp | 19 ++++++++------- .../notifications/notificationpopup.h | 15 ++++++++---- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/examples/webenginewidgets/notifications/doc/src/notifications.qdoc b/examples/webenginewidgets/notifications/doc/src/notifications.qdoc index 2c999e7e1..ec932f90c 100644 --- a/examples/webenginewidgets/notifications/doc/src/notifications.qdoc +++ b/examples/webenginewidgets/notifications/doc/src/notifications.qdoc @@ -44,22 +44,22 @@ In this example, we create an internal HTML page that is added through a resource collection file (.qrc). The page displays buttons for requesting - permissions and creating a notification. In addition, it contains JavaScript - logic for triggering these actions. + permissions and contains necessary JavaScript code to trigger this request: \quotefromfile webenginewidgets/notifications/data/index.html \skipto Notification.requestPermission \printline requestPermission - \dots - \skipto if - \printuntil createNotification() - \printline /^})$/ + \skipuntil resetPermission + \printuntil /\}\)$/ + + Also page contains a button for creating a notification. The following + JavaScript constructions are executed on the press event: \quotefromfile webenginewidgets/notifications/data/index.html \skipto createNotification() - \printuntil Notification - \dots - \printline /^})$/ + \printuntil new Notification + \skipuntil Notification was created + \printline } \section1 Main Function @@ -127,7 +127,8 @@ \skipto QWebEngineNotification::closed \printuntil QTimer - \printline /^\}/ + \skipto /\}/ + \printline /\}/ \section2 Closing Active Notification @@ -138,9 +139,7 @@ destroy the notification object through the \c std::unique_ptr::reset() method. \skipto onClosed - \dots - \skipto hide() - \printuntil reset + \printuntil } \section2 Implementing User Interaction @@ -152,5 +151,6 @@ \skipto mouseReleaseEvent \printuntil onClosed - \printuntil /^\}/ + \printline /\}$/ + \printline /\}$/ */ diff --git a/examples/webenginewidgets/notifications/main.cpp b/examples/webenginewidgets/notifications/main.cpp index 661b82ff5..c3039b9e0 100644 --- a/examples/webenginewidgets/notifications/main.cpp +++ b/examples/webenginewidgets/notifications/main.cpp @@ -56,11 +56,13 @@ #include #include -class WebEnginePage : public QWebEnginePage { +class WebEnginePage : public QWebEnginePage +{ public: WebEnginePage(QWidget *parent) : QWebEnginePage(parent) { } - bool acceptNavigationRequest(const QUrl &url, NavigationType, bool) override { + bool acceptNavigationRequest(const QUrl &url, NavigationType, bool) override + { if (url.scheme() != "https") return true; QDesktopServices::openUrl(url); @@ -81,16 +83,15 @@ int main(int argc, char *argv[]) QObject::connect(view.page(), &QWebEnginePage::featurePermissionRequested, [&] (const QUrl &origin, QWebEnginePage::Feature feature) { - if (feature != QWebEnginePage::Notifications) - return; - view.page()->setFeaturePermission(origin, feature, QWebEnginePage::PermissionGrantedByUser); - }); + if (feature != QWebEnginePage::Notifications) + return; + view.page()->setFeaturePermission(origin, feature, QWebEnginePage::PermissionGrantedByUser); + }); auto profile = view.page()->profile(); auto popup = new NotificationPopup(&view); - profile->setNotificationPresenter([&] (std::unique_ptr notification) { - popup->present(notification); - }); + profile->setNotificationPresenter([&] (std::unique_ptr notification) + { popup->present(notification); }); view.resize(640, 480); view.show(); diff --git a/examples/webenginewidgets/notifications/notificationpopup.h b/examples/webenginewidgets/notifications/notificationpopup.h index fcbb003b9..d211c7996 100644 --- a/examples/webenginewidgets/notifications/notificationpopup.h +++ b/examples/webenginewidgets/notifications/notificationpopup.h @@ -61,14 +61,16 @@ #include -class NotificationPopup : public QWidget { +class NotificationPopup : public QWidget +{ Q_OBJECT QLabel m_icon, m_title, m_message; std::unique_ptr notification; public: - NotificationPopup(QWidget *parent) : QWidget(parent) { + NotificationPopup(QWidget *parent) : QWidget(parent) + { setWindowFlags(Qt::ToolTip); auto rootLayout = new QHBoxLayout(this); @@ -91,7 +93,8 @@ public: adjustSize(); } - void present(std::unique_ptr &newNotification) { + void present(std::unique_ptr &newNotification) + { if (notification) { notification->close(); notification.reset(); @@ -114,14 +117,16 @@ public: } protected slots: - void onClosed() { + void onClosed() + { hide(); notification->close(); notification.reset(); } protected: - void mouseReleaseEvent(QMouseEvent *event) override { + void mouseReleaseEvent(QMouseEvent *event) override + { QWidget::mouseReleaseEvent(event); if (notification && event->button() == Qt::LeftButton) { notification->click(); -- cgit v1.2.3 From ec3c4c7ed8101d14cafd114cb5396f2d586df047 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Fri, 9 Aug 2019 17:11:55 +0200 Subject: Add missing doc for WebEngineNotification QML type Change-Id: I3090b7cbbb9b913f147aaba8f39cefcd41e30d46 Reviewed-by: Leena Miettinen --- src/core/api/qwebenginenotification.cpp | 77 +++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 4 deletions(-) diff --git a/src/core/api/qwebenginenotification.cpp b/src/core/api/qwebenginenotification.cpp index f91eabd25..5cc4bc7b4 100644 --- a/src/core/api/qwebenginenotification.cpp +++ b/src/core/api/qwebenginenotification.cpp @@ -47,6 +47,19 @@ QT_BEGIN_NAMESPACE using QtWebEngineCore::UserNotificationController; +/*! + \qmltype WebEngineNotification + \instantiates QWebEngineNotification + \inqmlmodule QtWebEngine + \since QtWebEngine 1.9 + \brief Encapsulates the data of an HTML5 web notification. + + This type contains the information and API for HTML5 desktop and push notifications. + + Web engine notifications are passed to the user in the + \l WebEngineProfile::presentNotification() signal. +*/ + /*! \class QWebEngineNotification \brief The QWebEngineNotification class encapsulates the data of an HTML5 web notification. @@ -56,10 +69,8 @@ using QtWebEngineCore::UserNotificationController; This class contains the information and API for HTML5 desktop and push notifications. - Web engine notifications are passed to the user in the - \l QWebEngineProfile::setNotificationPresenter() and - \l QQuickWebEngineProfile::presentNotification() calls and the - \l WebEngineProfile::presentNotification() signal. + Web engine notifications are passed to the user through the custom handler + provided with the \l QWebEngineProfile::setNotificationPresenter() call. */ class QWebEngineNotificationPrivate : public UserNotificationController::Client { @@ -114,6 +125,10 @@ bool QWebEngineNotification::matches(const QWebEngineNotification *other) const return tag() == other->tag() && origin() == other->origin(); } +/*! + \qmlproperty bool WebEngineNotification::title + \brief The title of the notification. +*/ /*! \property QWebEngineNotification::title \brief The title of the notification. @@ -125,6 +140,10 @@ QString QWebEngineNotification::title() const return d ? d->controller->title() : QString(); } +/*! + \qmlproperty string WebEngineNotification::message + \brief The body of the notification message. +*/ /*! \property QWebEngineNotification::message \brief The body of the notification message. @@ -137,6 +156,13 @@ QString QWebEngineNotification::message() const return d ? d->controller->body() : QString(); } +/*! + \qmlproperty string WebEngineNotification::tag + \brief The tag of the notification message. + + New notifications that have the same tag and origin URL as an existing + one should replace or update the old notification with the same tag. +*/ /*! \property QWebEngineNotification::tag \brief The tag of the notification message. @@ -152,6 +178,10 @@ QString QWebEngineNotification::tag() const return d ? d->controller->tag() : QString(); } +/*! + \qmlproperty url WebEngineNotification::origin + \brief The URL of the page sending the notification. +*/ /*! \property QWebEngineNotification::origin \brief The URL of the page sending the notification. @@ -174,6 +204,12 @@ QImage QWebEngineNotification::icon() const return d ? d->controller->icon() : QImage(); } +/*! + \qmlproperty string WebEngineNotification::language + \brief The primary language for the notification's title and body. + + Its value is a valid BCP 47 language tag, or the empty string. +*/ /*! \property QWebEngineNotification::language \brief The primary language for the notification's title and body. @@ -188,6 +224,14 @@ QString QWebEngineNotification::language() const return d ? d->controller->language() : QString(); } +/*! + \qmlproperty enumeration WebEngineNotification::direction + \brief The text direction for the notification's title and body. + + \value Qt.LeftToRight Items are laid out from left to right. + \value Qt.RightToLeft Items are laid out from right to left. + \value Qt.LayoutDirectionAuto The direction to lay out items is determined automatically. +*/ /*! \property QWebEngineNotification::direction \brief The text direction for the notification's title and body. @@ -199,6 +243,12 @@ Qt::LayoutDirection QWebEngineNotification::direction() const return d ? d->controller->direction() : Qt::LayoutDirectionAuto; } +/*! + \qmlmethod void WebEngineNotification::show() + Creates and dispatches a JavaScript \e {show event} on notification. + + Should be called by the notification platform when the notification has been shown to user. +*/ /*! Creates and dispatches a JavaScript \e {show event} on notification. @@ -211,6 +261,12 @@ void QWebEngineNotification::show() const d->controller->notificationDisplayed(); } +/*! + \qmlmethod void WebEngineNotification::click() + Creates and dispatches a JavaScript \e {click event} on notification. + + Should be called by the notification platform when the notification is activated by the user. +*/ /*! Creates and dispatches a JavaScript \e {click event} on notification. @@ -223,6 +279,13 @@ void QWebEngineNotification::click() const d->controller->notificationClicked(); } +/*! + \qmlmethod void WebEngineNotification::close() + Creates and dispatches a JavaScript \e {close event} on notification. + + Should be called by the notification platform when the notification is closed, + either by the underlying platform or by the user. +*/ /*! Creates and dispatches a JavaScript \e {close event} on notification. @@ -236,6 +299,12 @@ void QWebEngineNotification::close() const d->controller->notificationClosed(); } +/*! + \qmlsignal WebEngineNotification::closed() + + This signal is emitted when the web page calls close steps for the notification, + and it no longer needs to be shown. +*/ /*! \fn void QWebEngineNotification::closed() -- cgit v1.2.3 From 81d103b44d620c4c170c7a80e06149b5011753fb Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Fri, 9 Aug 2019 17:13:33 +0200 Subject: Add doc's cross-references for web notification example and api methods Change-Id: If5a2d6a15a282a83e47e2bfb3d7e1a2a7c9a50fa Reviewed-by: Leena Miettinen --- src/core/api/qwebenginenotification.cpp | 6 ++++++ src/webengine/api/qquickwebengineprofile.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/api/qwebenginenotification.cpp b/src/core/api/qwebenginenotification.cpp index 5cc4bc7b4..abc63fed2 100644 --- a/src/core/api/qwebenginenotification.cpp +++ b/src/core/api/qwebenginenotification.cpp @@ -58,6 +58,9 @@ using QtWebEngineCore::UserNotificationController; Web engine notifications are passed to the user in the \l WebEngineProfile::presentNotification() signal. + + For more information about how to handle web notification, see the + \l{WebEngine Notifications Example}{Notification Example}. */ /*! @@ -71,6 +74,9 @@ using QtWebEngineCore::UserNotificationController; Web engine notifications are passed to the user through the custom handler provided with the \l QWebEngineProfile::setNotificationPresenter() call. + + For more information about how to handle web notification, see the + \l{WebEngine Notifications Example}{Notification Example}. */ class QWebEngineNotificationPrivate : public UserNotificationController::Client { diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index 4832ba303..7630587fe 100644 --- a/src/webengine/api/qquickwebengineprofile.cpp +++ b/src/webengine/api/qquickwebengineprofile.cpp @@ -155,7 +155,10 @@ ASSERT_ENUMS_MATCH(QQuickWebEngineDownloadItem::MimeHtmlSaveFormat, QtWebEngineC \fn QQuickWebEngineProfile::presentNotification(QWebEngineNotification *notification) This signal is emitted whenever there is a newly created user notification. - The \a notification argument holds the notification instance to query data and interact with. + The \a notification argument holds the \l {QWebEngineNotification} instance + to query data and interact with. + + \sa WebEngineProfile::presentNotification */ QQuickWebEngineProfilePrivate::QQuickWebEngineProfilePrivate(ProfileAdapter *profileAdapter) @@ -391,7 +394,8 @@ void QQuickWebEngineProfilePrivate::userScripts_clear(QQmlListProperty Date: Wed, 14 Aug 2019 18:37:35 +0200 Subject: Fix reporting overridable flag for QML WebEngineCertificateError type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also remove confusion inside CertificateErrorController constructor and overridable method by matching documentation for AllowCertificateError method of ContentBrowserClient api. Change-Id: I7e10ef71a4429dcf5acc4b714a8a45f67a2ec684 Reviewed-by: Jüri Valdmann --- src/core/certificate_error_controller.cpp | 6 +++--- src/core/certificate_error_controller_p.h | 4 ++-- src/core/content_browser_client_qt.cpp | 2 +- src/webenginewidgets/api/qwebenginepage.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/certificate_error_controller.cpp b/src/core/certificate_error_controller.cpp index a747451df..3309db8f1 100644 --- a/src/core/certificate_error_controller.cpp +++ b/src/core/certificate_error_controller.cpp @@ -79,14 +79,14 @@ CertificateErrorControllerPrivate::CertificateErrorControllerPrivate(int cert_er const net::SSLInfo& ssl_info, const GURL &request_url, content::ResourceType resource_type, - bool _overridable, + bool fatal_error, bool strict_enforcement, const base::Callback& cb ) : certError(CertificateErrorController::CertificateError(cert_error)) , requestUrl(toQt(request_url)) , resourceType(CertificateErrorController::ResourceType(resource_type)) - , overridable(_overridable) + , fatalError(fatal_error) , strictEnforcement(strict_enforcement) , callback(cb) { @@ -118,7 +118,7 @@ QUrl CertificateErrorController::url() const bool CertificateErrorController::overridable() const { - return d->overridable; + return !d->fatalError && !d->strictEnforcement; } bool CertificateErrorController::strictEnforcement() const diff --git a/src/core/certificate_error_controller_p.h b/src/core/certificate_error_controller_p.h index abde9a7d5..3b4d0f3bf 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, content::ResourceType resource_type, bool overridable, bool strict_enforcement, const base::Callback& callback); + CertificateErrorControllerPrivate(int cert_error, const net::SSLInfo& ssl_info, const GURL& request_url, content::ResourceType resource_type, bool fatal_error, bool strict_enforcement, const base::Callback& callback); void accept(bool accepted); @@ -68,7 +68,7 @@ public: QDateTime validStart; QDateTime validExpiry; CertificateErrorController::ResourceType resourceType; - bool overridable; + bool fatalError; bool strictEnforcement; const base::Callback callback; }; diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 0a51cc261..acd652b15 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -355,7 +355,7 @@ void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webCont ssl_info, request_url, resource_type, - !IsCertErrorFatal(cert_error), + IsCertErrorFatal(cert_error), strict_enforcement, callback))); contentsDelegate->allowCertificateError(errorController); diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 35fe542e8..d7f65c23b 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -1787,7 +1787,7 @@ void QWebEnginePagePrivate::allowCertificateError(const QSharedPointererror(), controller->url(), controller->overridable() && !controller->strictEnforcement(), controller->errorString()); + QWebEngineCertificateError error(controller->error(), controller->url(), controller->overridable(), controller->errorString()); accepted = q->certificateError(error); if (error.isOverridable()) -- cgit v1.2.3 From d5d0cd81cc770d696b19305717cc827ec1a89bd4 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Wed, 14 Aug 2019 18:45:36 +0200 Subject: Reject certificate error for non-overridable errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On certificate validation error page load is just halted meaning that no progress or load result are reported and no default error page for certificate errors is shown. Even though documentation states that 'By default, an invalid certificate will be automatically rejected' and that aligns with default implementation of certificateError method within Page and non-deferred errors in quick View, page or view silently stays in an intermediate state for non-overridable errors. Fix this inconsistent behavior by automatically rejecting certificate for every invalid case (non-overridable error, not deferred or not implemented overridable method). Change-Id: Id1cee2ee5cc45bdcb5f262a6c99c84274e6ca374 Reviewed-by: Jüri Valdmann --- src/webengine/api/qquickwebengineview.cpp | 2 +- src/webenginewidgets/api/qwebenginepage.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index c8ba64f49..8097689ad 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -294,7 +294,7 @@ void QQuickWebEngineViewPrivate::allowCertificateError(const QSharedPointernewQObject(quickController); Q_EMIT q->certificateError(quickController); - if (!quickController->deferred() && !quickController->answered()) + if (!quickController->overridable() || (!quickController->deferred() && !quickController->answered())) quickController->rejectCertificate(); else m_certificateErrorControllers.append(errorController); diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index d7f65c23b..aeed6ce85 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -1789,9 +1789,7 @@ void QWebEnginePagePrivate::allowCertificateError(const QSharedPointererror(), controller->url(), controller->overridable(), controller->errorString()); accepted = q->certificateError(error); - - if (error.isOverridable()) - controller->accept(accepted); + controller->accept(error.isOverridable() && accepted); } void QWebEnginePagePrivate::selectClientCert(const QSharedPointer &controller) -- cgit v1.2.3 From 5ff6ecf1cabcc93700d7997c2e22e14a84743d33 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 26 Aug 2019 15:28:33 +0200 Subject: Fix broken jpeg includes In Chromium 67 use of system jpeg is by default. Fix our configure. Fixes: QTBUG-77827 Change-Id: I6319f0fab9983d63c733a9723847ad793141e073 Reviewed-by: Allan Sandfeld Jensen --- src/core/config/linux.pri | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri index c536b2555..22cb5991f 100644 --- a/src/core/config/linux.pri +++ b/src/core/config/linux.pri @@ -163,9 +163,21 @@ host_build { gn_args += use_system_libpng=true qtConfig(webengine-printing-and-pdf): gn_args += pdfium_use_system_libpng=true } - qtConfig(webengine-system-jpeg): gn_args += use_system_libjpeg=true - qtConfig(webengine-system-freetype): gn_args += use_system_freetype=true - qtConfig(webengine-system-harfbuzz): gn_args += use_system_harfbuzz=true + qtConfig(webengine-system-jpeg) { + gn_args += use_system_libjpeg=true + } else { + gn_args += use_system_libjpeg=false + } + qtConfig(webengine-system-freetype) { + gn_args += use_system_freetype=true + } else { + gn_args += use_system_freetype=false + } + qtConfig(webengine-system-harfbuzz) { + gn_args += use_system_harfbuzz=true + } else { + gn_args += use_system_harfbuzz=false + } !qtConfig(webengine-system-glib): gn_args += use_glib=false qtConfig(webengine-pulseaudio) { gn_args += use_pulseaudio=true -- cgit v1.2.3 From 20555210e74c67de028dfcca1559e9839e626c76 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 3 Sep 2019 15:08:12 +0200 Subject: Fix invalid url on profile change If adapter is initialized use always active url. Fixes: QTBUG-77977 Change-Id: Ie8d4ec7d7c703322cef50d26931cce2b130dcf34 Reviewed-by: Allan Sandfeld Jensen --- src/webengine/api/qquickwebengineview.cpp | 4 +--- .../quick/qquickwebengineview/tst_qquickwebengineview.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index bb8428951..906eb4b75 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -1119,9 +1119,7 @@ void QQuickWebEngineViewPrivate::updateAdapter() adapter->setClient(this); if (wasInitialized) { if (!m_html.isEmpty()) - adapter->setContent(m_html.toUtf8(), defaultMimeType, m_url); - else if (m_url.isValid()) - adapter->load(m_url); + adapter->setContent(m_html.toUtf8(), defaultMimeType, activeUrl); else if (activeUrl.isValid()) adapter->load(activeUrl); else diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp index 74c04635f..5572515a1 100644 --- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp +++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp @@ -91,6 +91,7 @@ private Q_SLOTS: void userScripts(); void javascriptClipboard_data(); void javascriptClipboard(); + void setProfile(); private: inline QQuickWebEngineView *newWebEngineView(); @@ -1148,5 +1149,18 @@ void tst_QQuickWebEngineView::javascriptClipboard() QTRY_COMPARE(evaluateJavaScriptSync(view, "accessPrompt").toBool(), false); } +void tst_QQuickWebEngineView::setProfile() { + QSignalSpy loadSpy(webEngineView(), SIGNAL(loadingChanged(QQuickWebEngineLoadRequest*))); + webEngineView()->setUrl(urlFromTestPath("html/basic_page.html")); + QVERIFY(waitForLoadSucceeded(webEngineView())); + QCOMPARE(loadSpy.size(), 2); + webEngineView()->setUrl(urlFromTestPath("html/basic_page2.html")); + QVERIFY(waitForLoadSucceeded(webEngineView())); + QCOMPARE(loadSpy.size(), 4); + QQuickWebEngineProfile *profile = new QQuickWebEngineProfile(); + webEngineView()->setProfile(profile); + QTRY_COMPARE(webEngineView()->url() ,urlFromTestPath("html/basic_page2.html")); +} + QTEST_MAIN(tst_QQuickWebEngineView) #include "tst_qquickwebengineview.moc" -- cgit v1.2.3 From 15f34fb479567dc728fedf3ab2d13a86bf421c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 4 Sep 2019 17:17:05 +0200 Subject: Update Chromium This pulls in the following change: ca4dd6567c0 Fix iterating when erasing last element from task queue 0240cfc1a59 [macOS] Rename Chromium bootstrap name to prevent collisions Change-Id: I201516009705580ce232c8948ff0861f50860a67 Fixes: QTBUG-77938 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 32e459f49..0240cfc1a 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 32e459f495dc0475cdc1703514a257b45ccd3d84 +Subproject commit 0240cfc1a59deb5b612923d47ccef72f10504fe1 -- cgit v1.2.3 From 3d1e71549b61db00ac06a4621d787e9454bcd4c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Mon, 9 Sep 2019 11:18:54 +0200 Subject: Fix doc of QQuickWebEngineSettings::fullScreenSupportEnabled Fixes: QTBUG-78091 Change-Id: I65c8c39625955782c157b6360f92aa3a7e1c8c1b Reviewed-by: Leena Miettinen --- src/webengine/api/qquickwebenginesettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp index 93a3668ed..9a102a504 100644 --- a/src/webengine/api/qquickwebenginesettings.cpp +++ b/src/webengine/api/qquickwebenginesettings.cpp @@ -250,7 +250,7 @@ bool QQuickWebEngineSettings::pluginsEnabled() const Tells the web engine whether fullscreen is supported in this application or not. - Enabled by default. + Disabled by default. */ bool QQuickWebEngineSettings::fullScreenSupportEnabled() const { -- cgit v1.2.3 From 99b27e9654bcaf6af0719e33989ba0c956af1c3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 4 Sep 2019 13:34:55 +0200 Subject: Update Chromium This pulls in the following change: 111349f18a4 Rename Chromium bootstrap name to prevent collisions Change-Id: I7003c35c5bad96f32b69900d507e637252a4950d Fixes: QTBUG-77938 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 7a779d016..111349f18 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 7a779d0160771dcf6b4a644bc11137753c25982c +Subproject commit 111349f18a4d352d40c1c106a6f8e98a9f843894 -- cgit v1.2.3 From 2f72083601fb6a4fcc66b6440222291fc334cb3f Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Fri, 6 Sep 2019 11:18:20 +0200 Subject: Fix WebEngineView flashing when closing popup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closing a popup (eg. HTML select element) might cause WebEngineView to flash on macOS. This seems to be related to the window's NSPanel destruction and seems to appear only if the Qt::ToolTip window flag is set. Fixes: QTBUG-77072 Fixes: QTBUG-78084 Change-Id: I72af67ee97304278870b312482f8f9058ecd1233 Reviewed-by: Jüri Valdmann --- src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp index c085aacd7..3648df3c1 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp @@ -48,7 +48,7 @@ RenderWidgetHostViewQtDelegateQuickWindow::RenderWidgetHostViewQtDelegateQuickWi : m_realDelegate(realDelegate) , m_virtualParent(nullptr) { - setFlags(Qt::ToolTip | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus); + setFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus); } RenderWidgetHostViewQtDelegateQuickWindow::~RenderWidgetHostViewQtDelegateQuickWindow() -- cgit v1.2.3 From c795c96eaa740d6743293af8c6b01bcc58cec64a Mon Sep 17 00:00:00 2001 From: Tamas Zakor Date: Mon, 26 Aug 2019 14:55:45 +0200 Subject: Add environment variable check for tst_ProxyPac::proxypac() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Yield error message if --proxy-pac-url argument is not passed. Change-Id: I9a5685982c0a9d8decc65ad9c728357c038ef0a0 Reviewed-by: Jüri Valdmann --- tests/auto/widgets/proxypac/tst_proxypac.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/widgets/proxypac/tst_proxypac.cpp b/tests/auto/widgets/proxypac/tst_proxypac.cpp index f9340341b..934e23fde 100644 --- a/tests/auto/widgets/proxypac/tst_proxypac.cpp +++ b/tests/auto/widgets/proxypac/tst_proxypac.cpp @@ -46,6 +46,10 @@ private slots: void tst_ProxyPac::proxypac() { + const QString fromEnv = QString::fromLocal8Bit(qgetenv("QTWEBENGINE_CHROMIUM_FLAGS")); + if (!fromEnv.contains("--proxy-pac-url")) + qFatal("--proxy-pac-url argument is not passed."); + ProxyServer proxyServer1; proxyServer1.setPort(5551); proxyServer1.run(); -- cgit v1.2.3 From 6017b1d0d39b351affd6c31643b5a1a5abc4c86e Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 12 Sep 2019 16:36:59 +0200 Subject: Doc: Add ATL to Qt WebEngine build requirements on Windows Fixes: QTBUG-66882 Change-Id: I879854fb35a4e34dd7ae4760f88de69fc061c23e Reviewed-by: Kai Koehne --- src/webengine/doc/src/qtwebengine-platform-notes.qdoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc index 5b7d750ff..5d32fa6c7 100644 --- a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc +++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc @@ -73,6 +73,8 @@ \list \li Visual Studio 2017 version 15.8 or later + \li Active Template Library (ATL), usually included in the Visual Studio + installation \li Windows 10 SDK \endlist -- cgit v1.2.3 From 891a1ee6d0e894e49cc79efbdf864dd2fded5501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Fri, 30 Aug 2019 13:13:24 +0200 Subject: Fix flaky tst_QWebEnginePage::runJavaScriptFromSlot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unfortunately, "load finished" doesn't mean "ready to execute JavaScript". Fixes: QTBUG-74718 Change-Id: I611e35cfbb530ff68745d86124679d60ab0b113e Reviewed-by: Michael Brüning --- tests/auto/widgets/qwebenginepage/BLACKLIST | 3 --- tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 10 ++++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/auto/widgets/qwebenginepage/BLACKLIST b/tests/auto/widgets/qwebenginepage/BLACKLIST index 2000b0260..af47c70f7 100644 --- a/tests/auto/widgets/qwebenginepage/BLACKLIST +++ b/tests/auto/widgets/qwebenginepage/BLACKLIST @@ -9,6 +9,3 @@ windows [getUserMediaRequestDesktopVideoManyRequests] windows - -[runJavaScriptFromSlot] -osx diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 0fa38f9ef..6373bf2d9 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -1698,24 +1698,22 @@ void tst_QWebEnginePage::runJavaScriptFromSlot() { QWebEngineProfile profile; QWebEnginePage page(&profile); - page.settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, true); QSignalSpy loadFinishedSpy(&page, &QWebEnginePage::loadFinished); page.setHtml("" " " ""); QTRY_COMPARE(loadFinishedSpy.count(), 1); - // Workaround for QTBUG-74718 - QTRY_VERIFY(page.action(QWebEnginePage::SelectAll)->isEnabled()); - QVariant result(-1); + bool done = false; connect(&page, &QWebEnginePage::selectionChanged, [&]() { - result = evaluateJavaScriptSync(&page, QStringLiteral("2+2")); + QTRY_COMPARE(evaluateJavaScriptSync(&page, QStringLiteral("2+2")), QVariant(4)); + done = true; }); evaluateJavaScriptSync(&page, QStringLiteral("const input = document.getElementById('input1');" "input.focus();" "input.select();")); - QTRY_COMPARE(result, QVariant(4)); + QTRY_VERIFY(done); } void tst_QWebEnginePage::fullScreenRequested() -- cgit v1.2.3 From d8fe250e542519012247952a034e78b0d492b730 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 6 Aug 2019 10:56:22 +0200 Subject: Add gold linker support for boot2qt builds Task-number: QTBUG-73216 Task-number: COIN-326 Change-Id: I1f5b83520f8ad241652b0a34726743a7ecca7307 Reviewed-by: Samuli Piippo --- src/core/core_common.pri | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/core/core_common.pri b/src/core/core_common.pri index c92278657..e548aefd1 100644 --- a/src/core/core_common.pri +++ b/src/core/core_common.pri @@ -17,6 +17,3 @@ CONFIG -= ltcg # Chromium requires C++14 CONFIG += c++14 -#QTBUG-73216 ci has to be updated with latest yocto -boot2qt: CONFIG -= use_gold_linker - -- cgit v1.2.3