From f38fdec3a651ef2384f244018eac0a7260c45e37 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 14 Nov 2019 12:43:36 +0100 Subject: Re-enable X11 WebRTC support for desktop sharing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With corresponding fixes in chromium, we should now again be able to support WebRTC desktop sharing with X11. Fixes: QTBUG-80055 Change-Id: If1ce50fe8e83d2c5086c6735d205bc4ca424746d Reviewed-by: Jüri Valdmann --- src/buildtools/config/linux.pri | 1 + src/core/media_capture_devices_dispatcher.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri index f3c4fc953..ee08f81bc 100644 --- a/src/buildtools/config/linux.pri +++ b/src/buildtools/config/linux.pri @@ -195,6 +195,7 @@ host_build { qtConfig(webengine-ozone-x11) { gn_args += ozone_platform_x11=true packagesExist(xscrnsaver): gn_args += use_xscrnsaver=true + qtConfig(webengine-webrtc): gn_args += rtc_use_x11=true } qtConfig(webengine-system-libevent): gn_args += use_system_libevent=true diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp index c94ff7eee..7bf499917 100644 --- a/src/core/media_capture_devices_dispatcher.cpp +++ b/src/core/media_capture_devices_dispatcher.cpp @@ -126,7 +126,7 @@ content::DesktopMediaID getDefaultScreenId() // // [1]: webrtc::InProcessVideoCaptureDeviceLauncher::DoStartDesktopCaptureOnDeviceThread -#if QT_CONFIG(webengine_webrtc) && !defined(USE_X11) +#if QT_CONFIG(webengine_webrtc) && !defined(WEBRTC_USE_X11) // Source id patterns are different across platforms. // On Linux, the hardcoded value "0" is used. // On Windows, the screens are enumerated consecutively in increasing order from 0. -- cgit v1.2.3 From 63ba67b174e740d36af65d20fd9a8c924456acbf Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 20 Nov 2019 09:28:22 +0100 Subject: Update Chromium MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pulls in following changes: * 1d9d75d072e Fix '/Zc:twoPahse' unknown compiler option warning * 55c0556c1ca [Backport] Security Bug 1003313 * d5f6e269885 [Backport] CVE-2019-13721 * c1fd5c47504 [Backport] Security bug 1011551 * e9b6a6d0cf9 [Backport] Security bug 1006544 * 8a477bb16f9 [Backport] Security bug 997401 * 6ed410d94fc [Backport] Security bug 995591 * ccde4d23e60 [Backport] Security bug 993266 * 8564d6c04aa [Backport] Security bug 989909 Task-number: QTBUG-79465 Change-Id: I54841d9116c65fdab62eba5199382686297e960a Reviewed-by: Michael Brüning --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 040ccbbef..8564d6c04 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 040ccbbef2dbecdb33041a8c444467a72ad5ea4a +Subproject commit 8564d6c04aa34b6aed75348012028e6b02e97fbc -- cgit v1.2.3 From 214bd8aa1e15bc5a35aed3e0b0d3e3d92f6115cf Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Mon, 25 Nov 2019 18:02:27 +0100 Subject: Update Chormium Pulls in following patchs: * 77c86be6077 BASELINE: Update Chromium to 77.0.3865.129 * cbc9c4a3c8d Merge remote-tracking branch 'origin/upstream-master' into 77-based * 6f690b4418f Merge "Merge remote-tracking branch 'origin/upstream-master' into 77-based" into 77-based * d61464c1e69 Fix is_main_frame in intercept_navigation_throttle * 41d6b0b2f16 [Backport] Secuirty bug 1014607 * e751f134d6b [Backport] Security bug 1016450 * 5b40e1d793e [Backport] Security bug 1018406 Task-number: QTBUG-79465 Change-Id: I0fd5c5bbdeb5d3478d9646540bca0550f0eb3819 Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 8564d6c04..5b40e1d79 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 8564d6c04aa34b6aed75348012028e6b02e97fbc +Subproject commit 5b40e1d793e06cb66474cba952598bb154a55365 -- cgit v1.2.3 From 38b35fbe4afd9c5476b067dd66684dba7ac948f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 26 Nov 2019 17:39:30 +0100 Subject: [macOS] Update widevine search paths to new Chrome bundle layout Re-enables using proprietary codecs used by many popular platforms for streaming video. Fixes: QTBUG-80352 Change-Id: Id1730576a98cfc4b23b523e61c1d8168414e3a48 Reviewed-by: Allan Sandfeld Jensen --- src/core/content_client_qt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index 554ee3e12..0f8c7ac3a 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -286,11 +286,11 @@ static bool IsWidevineAvailable(base::FilePath *cdm_path, pluginPaths << ppapiPluginsPath() + QStringLiteral("/") + QString::fromLatin1(kWidevineCdmFileName); #endif #if defined(Q_OS_OSX) - QDir potentialWidevineDir("/Applications/Google Chrome.app/Contents/Versions"); + QDir potentialWidevineDir("/Applications/Google Chrome.app/Contents/Frameworks"); if (potentialWidevineDir.exists()) { QFileInfoList widevineVersionDirs = potentialWidevineDir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed); - const QString library = QLatin1String("/Google Chrome Framework.framework/Versions/A/Libraries/" + const QString library = QLatin1String("/Versions/Current/Libraries/" "WidevineCdm/_platform_specific/mac_x64/libwidevinecdm.dylib"); for (const QFileInfo &info : widevineVersionDirs) pluginPaths << info.absoluteFilePath() + library; -- cgit v1.2.3 From e72fd5136c5a7a848d9156334cf8f067eb1a1a10 Mon Sep 17 00:00:00 2001 From: Tamas Zakor Date: Mon, 4 Nov 2019 16:32:23 +0100 Subject: Fix pepper flash plugin permission Fixes: QTBUG-78280 Change-Id: Ic202314bb7935741791fa8c747e255b10dc7dc61 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Florian Bruhin --- src/core/content_client_qt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index 0f8c7ac3a..952122052 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -129,7 +129,8 @@ static QString getLocalAppDataDir() static const int32_t kPepperFlashPermissions = ppapi::PERMISSION_DEV | ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_BYPASS_USER_GESTURE | - ppapi::PERMISSION_FLASH; + ppapi::PERMISSION_FLASH | + ppapi::PERMISSION_SOCKET; namespace switches { const char kPpapiFlashPath[] = "ppapi-flash-path"; -- cgit v1.2.3 From 9d325441635c2dd7383973f2a82c5d2e575445d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Tue, 19 Nov 2019 13:00:00 +0100 Subject: Fix renderProcessTerminated signal With the adaptations for Chromium 76, RenderWidgetHostViewQt was changed to become a RenderProcessHostObserver with the renderProcessTerminated signal being emitted from the override of RenderProcessHostObserver::RenderProcessExited. The problem with this can be seen by setting a breakpoint on the RenderProcessGone override in RenderWidgetHostViewQt. We then get the trace: QtWebEngineCore::RenderWidgetHostViewQt::RenderProcessGone content::RenderWidgetHostImpl::RendererExited() content::RenderViewHostImpl::RenderProcessExited content::RenderProcessHostImpl::ProcessDied ProcessDied iterates over all the observers and calls RenderProcessExited. Both the RenderViewHostImpl and our RWHVQt are observers, but the RVHImpl comes first. The RVHImpl then calls RendererExited, which calls our RenderProcessGone, which does a 'delete this'. Now our RenderProcessExited override can never be called because we have already deleted our observer. Fix by moving the RenderProcessGone code to WebContentsDelegateQt and getting the exit code from WebContents::GetCrashedErrorCode. Also add test. Task-number: QTBUG-80085 Change-Id: I434744286df97a37b64722d7c15a1d4ee11c8af6 Reviewed-by: Allan Sandfeld Jensen --- src/core/render_widget_host_view_qt.cpp | 14 -------------- src/core/render_widget_host_view_qt.h | 5 ----- src/core/web_contents_delegate_qt.cpp | 11 +++++++++-- .../widgets/qwebenginepage/tst_qwebenginepage.cpp | 21 +++++++++++++++++++++ 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index e2fd074ae..15cc5174e 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -340,7 +340,6 @@ RenderWidgetHostViewQt::RenderWidgetHostViewQt(content::RenderWidgetHost *widget // May call SetNeedsBeginFrames host()->SetView(this); - host()->GetProcess()->AddObserver(this); } RenderWidgetHostViewQt::~RenderWidgetHostViewQt() @@ -354,7 +353,6 @@ RenderWidgetHostViewQt::~RenderWidgetHostViewQt() if (text_input_manager_) text_input_manager_->RemoveObserver(this); - host()->GetProcess()->RemoveObserver(this); m_touchSelectionController.reset(); m_touchSelectionControllerClient.reset(); @@ -704,18 +702,6 @@ void RenderWidgetHostViewQt::ImeCompositionRangeChanged(const gfx::Range&, const QT_NOT_YET_IMPLEMENTED } -void RenderWidgetHostViewQt::RenderProcessExited(content::RenderProcessHost *host, - const content::ChildProcessTerminationInfo &info) -{ - Q_UNUSED(host); - // RenderProcessHost::FastShutdownIfPossible results in TERMINATION_STATUS_STILL_RUNNING - if (m_adapterClient && info.status != base::TERMINATION_STATUS_STILL_RUNNING) { - m_adapterClient->renderProcessTerminated( - m_adapterClient->renderProcessExitStatus(info.status), - info.exit_code); - } -} - void RenderWidgetHostViewQt::RenderProcessGone() { Destroy(); diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h index 76807b37a..0e9d54b19 100644 --- a/src/core/render_widget_host_view_qt.h +++ b/src/core/render_widget_host_view_qt.h @@ -102,7 +102,6 @@ struct MultipleMouseClickHelper class RenderWidgetHostViewQt : public content::RenderWidgetHostViewBase - , public content::RenderProcessHostObserver , public ui::GestureProviderClient , public RenderWidgetHostViewQtDelegateClient , public base::SupportsWeakPtr @@ -176,10 +175,6 @@ public: void DidStopFlinging() override; std::unique_ptr CreateSyntheticGestureTarget() override; - // RenderProcessHostObserver implementation. - void RenderProcessExited(content::RenderProcessHost *host, - const content::ChildProcessTerminationInfo &info) override; - // Overridden from ui::GestureProviderClient. void OnGestureEvent(const ui::GestureEventData& gesture) override; diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index 255ff0034..2a89556cf 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -286,10 +286,17 @@ void WebContentsDelegateQt::RenderFrameDeleted(content::RenderFrameHost *render_ void WebContentsDelegateQt::RenderProcessGone(base::TerminationStatus status) { + // RenderProcessHost::FastShutdownIfPossible results in TERMINATION_STATUS_STILL_RUNNING + if (status != base::TERMINATION_STATUS_STILL_RUNNING) { + m_viewClient->renderProcessTerminated( + m_viewClient->renderProcessExitStatus(status), + web_contents()->GetCrashedErrorCode()); + } + // Based one TabLoadTracker::RenderProcessGone - if (status == base::TerminationStatus::TERMINATION_STATUS_NORMAL_TERMINATION - || status == base::TerminationStatus::TERMINATION_STATUS_STILL_RUNNING) { + if (status == base::TERMINATION_STATUS_NORMAL_TERMINATION + || status == base::TERMINATION_STATUS_STILL_RUNNING) { return; } diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 27aa7a1f7..88cdcbb96 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -225,6 +225,7 @@ private Q_SLOTS: void editActionsWithoutSelection(); void customUserAgentInNewTab(); + void renderProcessCrashed(); private: static QPoint elementCenter(QWebEnginePage *page, const QString &id); @@ -4410,6 +4411,26 @@ void tst_QWebEnginePage::customUserAgentInNewTab() QCOMPARE(lastUserAgent, profile2.httpUserAgent().toUtf8()); } +void tst_QWebEnginePage::renderProcessCrashed() +{ + using Status = QWebEnginePage::RenderProcessTerminationStatus; + QWebEngineProfile profile; + QWebEnginePage page(&profile); + bool done = false; + Status status; + connect(&page, &QWebEnginePage::renderProcessTerminated, [&](Status newStatus) { + status = newStatus; + done = true; + }); + page.load(QUrl("chrome://crash")); + QTRY_VERIFY_WITH_TIMEOUT(done, 20000); + // The status depends on whether stack traces are enabled. With + // --disable-in-process-stack-traces we get an AbnormalTerminationStatus, + // otherwise a CrashedTerminationStatus. + QVERIFY(status == QWebEnginePage::CrashedTerminationStatus || + status == QWebEnginePage::AbnormalTerminationStatus); +} + static QByteArrayList params = {QByteArrayLiteral("--use-fake-device-for-media-stream")}; W_QTEST_MAIN(tst_QWebEnginePage, params) -- cgit v1.2.3 From c79f01398a5e7d2cc4249e25fc07cd4df5999030 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 27 Nov 2019 23:23:11 +0100 Subject: Update Chromium Pulls in following changes: * 7d2876b9557 Fix url_utils for QtWebEngine * bfea09e6e17 FIXUP: Add net::URLRequest::first_party_url() * 0d4406b3688 [Backport] Security bug 961614 1/8 * b1a56dab182 [Backport] Security bug 961614 2/8 * b9718cd4aa0 [Backport] Security bug 961614 3/8 * 821f375089e [Backport] Security bug 961614 4/8 * ee18fd483a7 [Backport] Security bug 961614 5/8 * 105f1e578c3 [Backport] Security bug 961614 6/8 * 09050e17c6a [Backport] Security bug 961614 7/8 * 634aff72b47 [Backport] Security bug 961614 8/8 * c5eb4cfff7f [Backport] Security bug 775511 * 120ccb55b5c [Backport] Security bug 1015945 * 939daf833ff [Backport] Security bug 955191 Task-number: QTBUG-79465 Change-Id: Ic9585b656477fae364ab17631db7487e8a00d46c Reviewed-by: Allan Sandfeld Jensen --- src/3rdparty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty b/src/3rdparty index 5b40e1d79..939daf833 160000 --- a/src/3rdparty +++ b/src/3rdparty @@ -1 +1 @@ -Subproject commit 5b40e1d793e06cb66474cba952598bb154a55365 +Subproject commit 939daf833fff3a9901afb6fd65d02e0f057a494a -- cgit v1.2.3 From 2c8113eb5b68d3678fd68bdde32fc6dca726c983 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Tue, 26 Nov 2019 15:52:43 +0100 Subject: Example 'LifeCycle': fix import statement and shared context warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Amends import fix f4fa4d3d34 after api review Task-number: QTBUG-80249 Change-Id: If4b2cb65e94de8c648b2c234490a6d6325615ba6 Reviewed-by: Jüri Valdmann --- examples/webengine/lifecycle/WebTab.qml | 2 +- examples/webengine/lifecycle/WebTabButton.qml | 2 +- examples/webengine/lifecycle/main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/webengine/lifecycle/WebTab.qml b/examples/webengine/lifecycle/WebTab.qml index 645758104..8649da3cb 100644 --- a/examples/webengine/lifecycle/WebTab.qml +++ b/examples/webengine/lifecycle/WebTab.qml @@ -53,7 +53,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 import QtQuick.Layouts 1.12 -import QtWebEngine 1.11 +import QtWebEngine 1.10 ColumnLayout { id: root diff --git a/examples/webengine/lifecycle/WebTabButton.qml b/examples/webengine/lifecycle/WebTabButton.qml index 815e2fb09..68057412b 100644 --- a/examples/webengine/lifecycle/WebTabButton.qml +++ b/examples/webengine/lifecycle/WebTabButton.qml @@ -52,7 +52,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Controls.Material 2.12 import QtQuick.Layouts 1.12 -import QtWebEngine 1.11 +import QtWebEngine 1.10 TabButton { id: root diff --git a/examples/webengine/lifecycle/main.cpp b/examples/webengine/lifecycle/main.cpp index 83907cbaf..bb93d64a7 100644 --- a/examples/webengine/lifecycle/main.cpp +++ b/examples/webengine/lifecycle/main.cpp @@ -58,8 +58,8 @@ int main(int argc, char *argv[]) { QCoreApplication::setOrganizationName("QtExamples"); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QGuiApplication app(argc, argv); QtWebEngine::initialize(); + QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/WebBrowser.qml"))); return app.exec(); -- cgit v1.2.3 From 9d2521084dbec9403ab68ea5e95b8a77313af11f Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Wed, 20 Nov 2019 09:31:20 +0100 Subject: Update find request id when a new search interrupts an ongoing search If the new test became flaky it might happen because the first text search finished before the second findText() call. This is very unlikely, but in this case the test should be modified to not to check if the first find failed. The point is to check we get the correct amount of signals and the second search doesn't assert. If the callbacks will be removed in Qt6, it should be re-considered to remove the "unfinished find" workaround and trigger the first successful findTextFinished() signal even if it happens in the middle of another search. Fixes: QTBUG-80086 Change-Id: I9c1ce20fc43fd81e8af784385a00ac2e7f7603b7 Reviewed-by: Kirill Burtsev --- src/core/find_text_helper.cpp | 1 + tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/core/find_text_helper.cpp b/src/core/find_text_helper.cpp index 065fed38f..da9d7f352 100644 --- a/src/core/find_text_helper.cpp +++ b/src/core/find_text_helper.cpp @@ -108,6 +108,7 @@ void FindTextHelper::startFinding(const QString &findText, bool caseSensitively, // waiting for it forever. // Assume that any unfinished find has been unsuccessful when a new one is started // to cover that case. + m_lastCompletedFindRequestId = m_currentFindRequestId; m_viewClient->findTextFinished(QWebEngineFindTextResult()); invokeResultCallback(m_currentFindRequestId, 0); } diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 88cdcbb96..d8c1a5360 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -992,6 +992,19 @@ void tst_QWebEnginePage::findText() QTRY_COMPARE(signalSpy.count(), 1); QTRY_COMPARE(m_view->selectedText(), QString("foo")); } + + // Invoking startFinding operation for the same text twice. Without any wait, the second one + // should interrupt the first one. + { + QSignalSpy signalSpy(m_view->page(), &QWebEnginePage::findTextFinished); + m_view->findText("foo", 0); + m_view->findText("foo", 0); + QTRY_COMPARE(signalSpy.count(), 2); + QTRY_VERIFY(m_view->selectedText().isEmpty()); + + QCOMPARE(signalSpy.at(0).value(0).value().numberOfMatches(), 0); + QCOMPARE(signalSpy.at(1).value(0).value().numberOfMatches(), 1); + } } void tst_QWebEnginePage::findTextResult() -- cgit v1.2.3 From 7e653262ec32a3cfa8280df9e1e7d214d333d2f8 Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Wed, 20 Nov 2019 18:46:25 +0100 Subject: Favicon touchIconWithSameURL test: fix waiting on wrong spy Amends fc0dbde734 timeouts adjust for slower CI Change-Id: I77bacfb973cfe8e2c259a31d58f439ffcae7b87f Reviewed-by: Michal Klocek --- tests/auto/widgets/faviconmanager/tst_faviconmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/widgets/faviconmanager/tst_faviconmanager.cpp b/tests/auto/widgets/faviconmanager/tst_faviconmanager.cpp index 1469ddb15..46038cdc6 100644 --- a/tests/auto/widgets/faviconmanager/tst_faviconmanager.cpp +++ b/tests/auto/widgets/faviconmanager/tst_faviconmanager.cpp @@ -522,10 +522,10 @@ void tst_FaviconManager::touchIconWithSameURL() "" "" ""); - QTRY_COMPARE(loadFinishedSpy.count(), 1); + QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 30000); // The default favicon has to be loaded even if its URL is also set as a touch icon while touch icons are disabled. - QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.count(), 1, 30000); + QTRY_COMPARE(iconUrlChangedSpy.count(), 1); QCOMPARE(m_page->iconUrl().toString(), icon); QTRY_COMPARE(iconChangedSpy.count(), 1); -- cgit v1.2.3 From 468c2d9a6d7b95b7dacc5372726860e7ccf14fb4 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Thu, 21 Nov 2019 11:19:34 +0100 Subject: Fix build of simplebrowser against 5.12 Change-Id: Ifbcf7f70ddbed7768e5e7b7231661a69d6d9f1a1 Reviewed-by: Allan Sandfeld Jensen --- examples/webenginewidgets/simplebrowser/browserwindow.cpp | 13 +++++++++++++ examples/webenginewidgets/simplebrowser/browserwindow.h | 2 ++ .../simplebrowser/downloadmanagerwidget.cpp | 8 ++++++++ examples/webenginewidgets/simplebrowser/downloadwidget.cpp | 4 ++++ examples/webenginewidgets/simplebrowser/main.cpp | 2 ++ examples/webenginewidgets/simplebrowser/tabwidget.cpp | 2 ++ examples/webenginewidgets/simplebrowser/tabwidget.h | 2 ++ examples/webenginewidgets/simplebrowser/webpage.cpp | 12 ++++++++++++ 8 files changed, 45 insertions(+) diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.cpp b/examples/webenginewidgets/simplebrowser/browserwindow.cpp index c1d0ea359..12a1e6844 100644 --- a/examples/webenginewidgets/simplebrowser/browserwindow.cpp +++ b/examples/webenginewidgets/simplebrowser/browserwindow.cpp @@ -66,7 +66,9 @@ #include #include #include +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) #include +#endif #include BrowserWindow::BrowserWindow(Browser *browser, QWebEngineProfile *profile, bool forDevTools) @@ -130,7 +132,9 @@ BrowserWindow::BrowserWindow(Browser *browser, QWebEngineProfile *profile, bool connect(m_urlLineEdit, &QLineEdit::returnPressed, [this]() { m_tabWidget->setUrl(QUrl::fromUserInput(m_urlLineEdit->text())); }); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) connect(m_tabWidget, &TabWidget::findTextFinished, this, &BrowserWindow::handleFindTextFinished); +#endif QAction *focusUrlLineEditAction = new QAction(this); addAction(focusUrlLineEditAction); @@ -462,7 +466,14 @@ void BrowserWindow::handleFindActionTriggered() m_lastSearch, &ok); if (ok && !search.isEmpty()) { m_lastSearch = search; +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) currentTab()->findText(m_lastSearch); +#else + currentTab()->findText(m_lastSearch, 0, [this](bool found) { + if (!found) + statusBar()->showMessage(tr("\"%1\" not found.").arg(m_lastSearch)); + }); +#endif } } @@ -526,6 +537,7 @@ void BrowserWindow::handleDevToolsRequested(QWebEnginePage *source) source->triggerAction(QWebEnginePage::InspectElement); } +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) void BrowserWindow::handleFindTextFinished(const QWebEngineFindTextResult &result) { if (result.numberOfMatches() == 0) { @@ -536,3 +548,4 @@ void BrowserWindow::handleFindTextFinished(const QWebEngineFindTextResult &resul QString::number(result.numberOfMatches()))); } } +#endif diff --git a/examples/webenginewidgets/simplebrowser/browserwindow.h b/examples/webenginewidgets/simplebrowser/browserwindow.h index 11a655469..ea12ad9df 100644 --- a/examples/webenginewidgets/simplebrowser/browserwindow.h +++ b/examples/webenginewidgets/simplebrowser/browserwindow.h @@ -88,7 +88,9 @@ private slots: void handleWebViewTitleChanged(const QString &title); void handleWebActionEnabledChanged(QWebEnginePage::WebAction action, bool enabled); void handleDevToolsRequested(QWebEnginePage *source); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) void handleFindTextFinished(const QWebEngineFindTextResult &result); +#endif private: QMenu *createFileMenu(TabWidget *tabWidget); diff --git a/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.cpp b/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.cpp index b6f9e9c13..2c8831429 100644 --- a/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.cpp +++ b/examples/webenginewidgets/simplebrowser/downloadmanagerwidget.cpp @@ -69,12 +69,20 @@ void DownloadManagerWidget::downloadRequested(QWebEngineDownloadItem *download) { Q_ASSERT(download && download->state() == QWebEngineDownloadItem::DownloadRequested); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QString path = QFileDialog::getSaveFileName(this, tr("Save as"), QDir(download->downloadDirectory()).filePath(download->downloadFileName())); +#else + QString path = QFileDialog::getSaveFileName(this, tr("Save as"), download->path()); +#endif if (path.isEmpty()) return; +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) download->setDownloadDirectory(QFileInfo(path).path()); download->setDownloadFileName(QFileInfo(path).fileName()); +#else + download->setPath(path); +#endif download->accept(); add(new DownloadWidget(download)); diff --git a/examples/webenginewidgets/simplebrowser/downloadwidget.cpp b/examples/webenginewidgets/simplebrowser/downloadwidget.cpp index ddddc5e5d..c4e3cd805 100644 --- a/examples/webenginewidgets/simplebrowser/downloadwidget.cpp +++ b/examples/webenginewidgets/simplebrowser/downloadwidget.cpp @@ -61,7 +61,11 @@ DownloadWidget::DownloadWidget(QWebEngineDownloadItem *download, QWidget *parent { m_timeAdded.start(); setupUi(this); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) m_dstName->setText(m_download->downloadFileName()); +#else + m_dstName->setText(QFileInfo(m_download->path()).fileName()); +#endif m_srcUrl->setText(m_download->url().toDisplayString()); connect(m_cancelButton, &QPushButton::clicked, diff --git a/examples/webenginewidgets/simplebrowser/main.cpp b/examples/webenginewidgets/simplebrowser/main.cpp index 7b77a4bd2..ddc8b4d01 100644 --- a/examples/webenginewidgets/simplebrowser/main.cpp +++ b/examples/webenginewidgets/simplebrowser/main.cpp @@ -75,8 +75,10 @@ int main(int argc, char **argv) app.setWindowIcon(QIcon(QStringLiteral(":AppLogoColor.png"))); QWebEngineSettings::defaultSettings()->setAttribute(QWebEngineSettings::PluginsEnabled, true); +#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) QWebEngineSettings::defaultSettings()->setAttribute(QWebEngineSettings::DnsPrefetchEnabled, true); QWebEngineProfile::defaultProfile()->setUseForGlobalCertificateVerification(); +#endif QUrl url = commandLineUrlArgument(); diff --git a/examples/webenginewidgets/simplebrowser/tabwidget.cpp b/examples/webenginewidgets/simplebrowser/tabwidget.cpp index 3b6d84ebe..d7a69e61f 100644 --- a/examples/webenginewidgets/simplebrowser/tabwidget.cpp +++ b/examples/webenginewidgets/simplebrowser/tabwidget.cpp @@ -200,10 +200,12 @@ void TabWidget::setupView(WebView *webView) closeTab(index); }); connect(webView, &WebView::devToolsRequested, this, &TabWidget::devToolsRequested); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) connect(webPage, &QWebEnginePage::findTextFinished, [this, webView](const QWebEngineFindTextResult &result) { if (currentIndex() == indexOf(webView)) emit findTextFinished(result); }); +#endif } WebView *TabWidget::createTab() diff --git a/examples/webenginewidgets/simplebrowser/tabwidget.h b/examples/webenginewidgets/simplebrowser/tabwidget.h index fba61d44f..bf65c9505 100644 --- a/examples/webenginewidgets/simplebrowser/tabwidget.h +++ b/examples/webenginewidgets/simplebrowser/tabwidget.h @@ -78,7 +78,9 @@ signals: void favIconChanged(const QIcon &icon); void webActionEnabledChanged(QWebEnginePage::WebAction action, bool enabled); void devToolsRequested(QWebEnginePage *source); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) void findTextFinished(const QWebEngineFindTextResult &result); +#endif public slots: // current tab/page slots diff --git a/examples/webenginewidgets/simplebrowser/webpage.cpp b/examples/webenginewidgets/simplebrowser/webpage.cpp index 2e49f651f..9f7038cdb 100644 --- a/examples/webenginewidgets/simplebrowser/webpage.cpp +++ b/examples/webenginewidgets/simplebrowser/webpage.cpp @@ -76,6 +76,7 @@ bool WebPage::certificateError(const QWebEngineCertificateError &error) { QWidget *mainWindow = view()->window(); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QWebEngineCertificateError deferredError = error; deferredError.defer(); @@ -83,6 +84,9 @@ bool WebPage::certificateError(const QWebEngineCertificateError &error) if (!error.deferred()) { QMessageBox::critical(mainWindow, tr("Certificate Error"), error.errorDescription()); } else { +#else + if (error.isOverridable()) { +#endif QDialog dialog(mainWindow); dialog.setModal(true); dialog.setWindowFlags(dialog.windowFlags() & ~Qt::WindowContextHelpButtonHint); @@ -95,6 +99,7 @@ bool WebPage::certificateError(const QWebEngineCertificateError &error) certificateDialog.m_errorLabel->setText(error.errorDescription()); dialog.setWindowTitle(tr("Certificate Error")); +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) if (dialog.exec() == QDialog::Accepted) error.ignoreCertificateError(); else @@ -102,6 +107,13 @@ bool WebPage::certificateError(const QWebEngineCertificateError &error) } }); return true; +#else + return dialog.exec() == QDialog::Accepted; + } + + QMessageBox::critical(mainWindow, tr("Certificate Error"), error.errorDescription()); + return false; +#endif } void WebPage::handleAuthenticationRequired(const QUrl &requestUrl, QAuthenticator *auth) -- cgit v1.2.3 From c24cc3014d750a406523629eff94f4f5f87e92cb Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Thu, 28 Nov 2019 19:10:23 +0100 Subject: Fix 'setDownloadDirectory' for download item on 'SavePage' action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Chromium's DownloadManager doesn't create its download items before path for saving page is confirmed. So assert inside updateDownloadPath was not correct. Moreover, the name is confusing because it's not really updating anything. Remove it and use ProfileAdapterClient::DownloadInfo timestamp to determine updated filename after directory change. Ammends recent new api for changing download directory 0884fab3b1. Fixes: QTBUG-80372 Change-Id: If9efb52979deb3cf21fc4e12989173c85e04e090 Reviewed-by: Jüri Valdmann --- src/core/download_manager_delegate_qt.cpp | 2 +- src/core/profile_adapter.cpp | 7 ----- src/core/profile_adapter.h | 1 - src/core/profile_adapter_client.h | 2 +- src/webengine/api/qquickwebenginedownloaditem.cpp | 6 ++--- .../api/qquickwebenginedownloaditem_p_p.h | 1 + src/webengine/api/qquickwebengineprofile.cpp | 1 + .../api/qwebenginedownloaditem.cpp | 6 ++--- .../api/qwebenginedownloaditem_p.h | 1 + src/webenginewidgets/api/qwebengineprofile.cpp | 1 + .../tst_qwebenginedownloaditem.cpp | 31 ++++++++++++++++------ 11 files changed, 35 insertions(+), 24 deletions(-) diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp index 34e290317..7049b8273 100644 --- a/src/core/download_manager_delegate_qt.cpp +++ b/src/core/download_manager_delegate_qt.cpp @@ -298,7 +298,7 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content ProfileAdapterClient::NoReason, adapterClient, QFileInfo(suggestedFilePath).fileName(), - time_t(QDateTime::currentMSecsSinceEpoch()) + QDateTime::currentMSecsSinceEpoch() }; for (ProfileAdapterClient *client : qAsConst(clients)) { diff --git a/src/core/profile_adapter.cpp b/src/core/profile_adapter.cpp index d421edf00..bccdf1ada 100644 --- a/src/core/profile_adapter.cpp +++ b/src/core/profile_adapter.cpp @@ -715,13 +715,6 @@ QString ProfileAdapter::determineDownloadPath(const QString &downloadDirectory, return suggestedFilePath; } -QString ProfileAdapter::updateDownloadPath(int downloadId, const QString &directory, const QString &fileName) -{ - download::DownloadItem *download = m_downloadManagerDelegate->findDownloadById(downloadId); - Q_ASSERT(download); - return determineDownloadPath(directory, fileName, download->GetStartTime().ToTimeT()); -} - #if QT_CONFIG(ssl) QWebEngineClientCertificateStore *ProfileAdapter::clientCertificateStore() { diff --git a/src/core/profile_adapter.h b/src/core/profile_adapter.h index 01477d0d9..1b89a8004 100644 --- a/src/core/profile_adapter.h +++ b/src/core/profile_adapter.h @@ -214,7 +214,6 @@ public: { return m_persistentNotifications; } QString determineDownloadPath(const QString &downloadDirectory, const QString &suggestedFilename, const time_t &startTime); - QString updateDownloadPath(int downloadId, const QString &directory, const QString &filename); private: void updateCustomUrlSchemeHandlers(); diff --git a/src/core/profile_adapter_client.h b/src/core/profile_adapter_client.h index dc0f508a1..394f92270 100644 --- a/src/core/profile_adapter_client.h +++ b/src/core/profile_adapter_client.h @@ -140,7 +140,7 @@ public: int downloadInterruptReason; WebContentsAdapterClient *page; QString suggestedFileName; - time_t startTime; + qint64 startTime; }; virtual ~ProfileAdapterClient() { } diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp index 878dddadb..6abd89910 100644 --- a/src/webengine/api/qquickwebenginedownloaditem.cpp +++ b/src/webengine/api/qquickwebenginedownloaditem.cpp @@ -521,9 +521,9 @@ void QQuickWebEngineDownloadItem::setDownloadDirectory(const QString &directory) Q_EMIT downloadDirectoryChanged(); } - QString newFileName = QFileInfo(d->profile->d_ptr->profileAdapter()->updateDownloadPath(d->downloadId, - d->downloadDirectory, - d->suggestedFileName)).fileName(); + QString newFileName = QFileInfo(d->profile->d_ptr->profileAdapter()->determineDownloadPath(d->downloadDirectory, + d->suggestedFileName, + d->startTime)).fileName(); if (d->downloadFileName != newFileName) { d->downloadFileName = newFileName; Q_EMIT pathChanged(); diff --git a/src/webengine/api/qquickwebenginedownloaditem_p_p.h b/src/webengine/api/qquickwebenginedownloaditem_p_p.h index 51deee18b..1be6434ec 100644 --- a/src/webengine/api/qquickwebenginedownloaditem_p_p.h +++ b/src/webengine/api/qquickwebenginedownloaditem_p_p.h @@ -71,6 +71,7 @@ public: ~QQuickWebEngineDownloadItemPrivate(); quint32 downloadId; + qint64 startTime; QQuickWebEngineDownloadItem::DownloadState downloadState; QQuickWebEngineDownloadItem::SavePageFormat savePageFormat; QQuickWebEngineDownloadItem::DownloadType type; diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index edad7ec44..834bb6a05 100644 --- a/src/webengine/api/qquickwebengineprofile.cpp +++ b/src/webengine/api/qquickwebengineprofile.cpp @@ -245,6 +245,7 @@ void QQuickWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info) QQuickWebEngineDownloadItemPrivate *itemPrivate = new QQuickWebEngineDownloadItemPrivate(q, info.url); itemPrivate->downloadId = info.id; itemPrivate->downloadState = QQuickWebEngineDownloadItem::DownloadRequested; + itemPrivate->startTime = info.startTime; itemPrivate->totalBytes = info.totalBytes; itemPrivate->mimeType = info.mimeType; itemPrivate->downloadDirectory = QFileInfo(info.path).path(); diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp index 724249208..fd7d90704 100644 --- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp +++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp @@ -599,9 +599,9 @@ void QWebEngineDownloadItem::setDownloadDirectory(const QString &directory) if (!directory.isEmpty() && d->downloadDirectory != directory) d->downloadDirectory = directory; - d->downloadFileName = QFileInfo(d->profile->profileAdapter()->updateDownloadPath(d->downloadId, - d->downloadDirectory, - d->suggestedFileName)).fileName(); + d->downloadFileName = QFileInfo(d->profile->profileAdapter()->determineDownloadPath(d->downloadDirectory, + d->suggestedFileName, + d->startTime)).fileName(); } /*! diff --git a/src/webenginewidgets/api/qwebenginedownloaditem_p.h b/src/webenginewidgets/api/qwebenginedownloaditem_p.h index 08e478736..034684a00 100644 --- a/src/webenginewidgets/api/qwebenginedownloaditem_p.h +++ b/src/webenginewidgets/api/qwebenginedownloaditem_p.h @@ -70,6 +70,7 @@ public: bool downloadFinished; quint32 downloadId; + qint64 startTime; QWebEngineDownloadItem::DownloadState downloadState; QWebEngineDownloadItem::SavePageFormat savePageFormat; QWebEngineDownloadItem::DownloadType type; diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index 09f5ce2fd..470babf8f 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -227,6 +227,7 @@ void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info) itemPrivate->downloadId = info.id; itemPrivate->downloadState = info.accepted ? QWebEngineDownloadItem::DownloadInProgress : QWebEngineDownloadItem::DownloadRequested; + itemPrivate->startTime = info.startTime; itemPrivate->downloadDirectory = QFileInfo(info.path).path(); itemPrivate->downloadFileName = QFileInfo(info.path).fileName(); itemPrivate->suggestedFileName = info.suggestedFileName; diff --git a/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp b/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp index d34e3cefe..bbcef2226 100644 --- a/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp +++ b/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp @@ -622,14 +622,17 @@ void tst_QWebEngineDownloadItem::downloadTwoLinks() void tst_QWebEngineDownloadItem::downloadPage_data() { + QTest::addColumn("saveWithPageAction"); QTest::addColumn("savePageFormat"); - QTest::newRow("SingleHtmlSaveFormat") << QWebEngineDownloadItem::SingleHtmlSaveFormat; - QTest::newRow("CompleteHtmlSaveFormat") << QWebEngineDownloadItem::CompleteHtmlSaveFormat; - QTest::newRow("MimeHtmlSaveFormat") << QWebEngineDownloadItem::MimeHtmlSaveFormat; + QTest::newRow("SingleHtmlSaveFormat") << false << QWebEngineDownloadItem::SingleHtmlSaveFormat; + QTest::newRow("CompleteHtmlSaveFormat") << false << QWebEngineDownloadItem::CompleteHtmlSaveFormat; + QTest::newRow("MimeHtmlSaveFormat") << false << QWebEngineDownloadItem::MimeHtmlSaveFormat; + QTest::newRow("SavePageAction") << true << QWebEngineDownloadItem::MimeHtmlSaveFormat; } void tst_QWebEngineDownloadItem::downloadPage() { + QFETCH(bool, saveWithPageAction); QFETCH(QWebEngineDownloadItem::SavePageFormat, savePageFormat); // Set up HTTP server @@ -649,12 +652,12 @@ void tst_QWebEngineDownloadItem::downloadPage() // Set up profile and download handler QTemporaryDir tmpDir; QVERIFY(tmpDir.isValid()); - QString downloadPath = tmpDir.path() + QStringLiteral("/test.html"); + QString downloadFileName("test.html"), downloadPath = tmpDir.filePath(downloadFileName); QUrl downloadUrl = m_server->url("/"); int acceptedCount = 0; int finishedCount = 0; ScopedConnection sc2 = connect(m_profile, &QWebEngineProfile::downloadRequested, [&](QWebEngineDownloadItem *item) { - QCOMPARE(item->state(), QWebEngineDownloadItem::DownloadInProgress); + QCOMPARE(item->state(), saveWithPageAction ? QWebEngineDownloadItem::DownloadRequested : QWebEngineDownloadItem::DownloadInProgress); QCOMPARE(item->isFinished(), false); QCOMPARE(item->totalBytes(), -1); QCOMPARE(item->receivedBytes(), 0); @@ -663,11 +666,19 @@ void tst_QWebEngineDownloadItem::downloadPage() QCOMPARE(item->isSavePageDownload(), true); // FIXME(juvaldma): why is mimeType always the same? QCOMPARE(item->mimeType(), QStringLiteral("application/x-mimearchive")); - QCOMPARE(QDir(item->downloadDirectory()).filePath(item->downloadFileName()), downloadPath); QCOMPARE(item->savePageFormat(), savePageFormat); QCOMPARE(item->url(), downloadUrl); QCOMPARE(item->page(), m_page); - // no need to call item->accept() + + if (saveWithPageAction) { + QVERIFY(!item->downloadDirectory().isEmpty()); + QVERIFY(!item->downloadFileName().isEmpty()); + item->setDownloadDirectory(tmpDir.path()); + item->setDownloadFileName(downloadFileName); + item->accept(); + } // save with explicit path accepts download automatically + + QCOMPARE(QDir(item->downloadDirectory()).filePath(item->downloadFileName()), downloadPath); connect(item, &QWebEngineDownloadItem::finished, [&, item]() { QCOMPARE(item->state(), QWebEngineDownloadItem::DownloadCompleted); @@ -697,7 +708,11 @@ void tst_QWebEngineDownloadItem::downloadPage() QCOMPARE(indexRequestCount, 1); // Save some HTML - m_page->save(downloadPath, savePageFormat); + if (saveWithPageAction) + m_page->triggerAction(QWebEnginePage::SavePage); + else + m_page->save(downloadPath, savePageFormat); + QTRY_COMPARE(acceptedCount, 1); QTRY_COMPARE(finishedCount, 1); QFile file(downloadPath); -- cgit v1.2.3 From 779a4cc9ce5a3c2f62b0b3d68b632df6f2ce90ad Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 28 Nov 2019 22:18:42 +0100 Subject: Update Widevine path for Linux support of CDM videos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes regression with Amazon Prime and Netflix. Change-Id: Ic96b4fa94fd06bfb9f7d75ca36e7eeddcda81218 Reviewed-by: Michael Brüning --- src/core/content_client_qt.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp index 952122052..22f3f548f 100644 --- a/src/core/content_client_qt.cpp +++ b/src/core/content_client_qt.cpp @@ -321,7 +321,12 @@ static bool IsWidevineAvailable(base::FilePath *cdm_path, } } #elif defined(Q_OS_LINUX) - pluginPaths << QStringLiteral("/opt/google/chrome/libwidevinecdm.so") // Google Chrome + pluginPaths << QStringLiteral("/opt/google/chrome/libwidevinecdm.so") // Old Google Chrome +#if Q_PROCESSOR_WORDSIZE == 8 + << QStringLiteral("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so") +#else + << QStringLiteral("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x86/libwidevinecdm.so") +#endif << QStringLiteral("/usr/lib/chromium/libwidevinecdm.so") // Arch << QStringLiteral("/usr/lib/chromium-browser/libwidevinecdm.so") // Ubuntu/neon << QStringLiteral("/usr/lib64/chromium/libwidevinecdm.so"); // OpenSUSE style -- cgit v1.2.3 From d366f1d5d37ce6f1833ac67c7ebda540b16690f2 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 2 Dec 2019 10:46:02 +0100 Subject: Add changes file for Qt 5.14.0 Change-Id: If15b7d4110a9d8deb10c15363e63043d83ef2a35 Reviewed-by: Leena Miettinen --- dist/changes-5.14.0 | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 dist/changes-5.14.0 diff --git a/dist/changes-5.14.0 b/dist/changes-5.14.0 new file mode 100644 index 000000000..b7df882ad --- /dev/null +++ b/dist/changes-5.14.0 @@ -0,0 +1,88 @@ +Qt 5.14 introduces many new features and improvements as well as bugfixes +over the 5.13.x series. 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.14 series is binary compatible with the 5.13.x series. +Applications compiled for 5.13 will continue to run with 5.14. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* General * +**************************************************************************** + +Chromium Snapshot +----------------- + + - Updated the Chromium version to 77.0.3865.129 + - Applied security fixes from Chrome up to version 78.0.3904.108 + +General +------- + + - [QTBUG-71885] Qt WebEngine will now use the Viz Display Compositor by + default when multithreaded OpenGL is available. Can be turned off using + the command line flag --disable-viz-display-compositor. + - [QTBUG-68448] WebRTC devices now have persistent IDs. + - [QTBUG-76173] Support qrc protocol in UrlPattern. + - [QTBUG-78280] Fixed permissions preventing Flash from showing. + - [QTBUG-79319] Fixed loading script as modules over custom schemes. + - [QTBUG-80352] Updated paths to look for Chrome's Widevine plugin. + +Platforms +--------- + + - [QTBUG-78911] Fixed building with newer system ICU. Minimum is now 64. + - [QTBUG-79347] Fixed support for prefers-color-scheme CSS query. + - [QTBUG-80055] Re-enabled X11 WebRTC support for desktop sharing. + - [QTBUG-77072,QTBUG-78084] Fixed flashing when closing popup on macOS. + + +**************************************************************************** +* Libraries * +**************************************************************************** + +QtWebEngineCore +---------------- + + - [QTBUG-75651] Added the QWebEngineUrlScheme::CorsEnabled flag for enabling + cross-origin resource sharing with custom schemes. + + +QtWebEngine + QtWebEngineWidgets +-------------------------------- + + - [QTBUG-55079,QTBUG-74166] Added lifecycle API to WebEngineView and + QWebEnginePage that can be used to reduce CPU and memory consumption + of non-visible views. + - [QTBUG-56978] Added functions and property to get the suggested download + file name. + - [QTBUG-56978] Added functions and property to change the download + directory and file name in QWebEngineDownloadItem and + QQuickWebEngineDownloadItem and deprecate the path() and setPath(). + - [QTBUG-74490] Redirects now have a separate navigation type. + + +Qt WebEngine (QML) +------------------ + + - [QTBUG-50420] Introduced findTextFinished signal and FindTextResult + type to provide extra information about the result of a text search. + + +Qt WebEngineWidgets +------------------- + + - QWebEngineCertificateError: + * [QTBUG-51176] New method to get the peer's chain of digital certificates. + * [QTBUG-55110] New methods for asynchronous decision on certificate error + during load. + - [QTBUG-78998] Store favicon URL when serializing QWebEngineHistory. -- cgit v1.2.3