diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-12-04 15:41:19 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-12-04 15:41:19 +0100 |
commit | ca08e3ab5dd250581911f2a58185443aed91ee92 (patch) | |
tree | c6480688db34f2806b90afe3f696782bfdb34ef9 /src | |
parent | cc2b1d2b66806a67f13996cbb8631d5ea8cdf71a (diff) | |
parent | d366f1d5d37ce6f1833ac67c7ebda540b16690f2 (diff) |
Merge remote-tracking branch 'origin/5.14.0' into 5.14
Change-Id: I4f73d4b11bee795185d4eaae718d4cfdb3112100
Diffstat (limited to 'src')
m--------- | src/3rdparty | 0 | ||||
-rw-r--r-- | src/buildtools/config/linux.pri | 1 | ||||
-rw-r--r-- | src/core/content_client_qt.cpp | 14 | ||||
-rw-r--r-- | src/core/download_manager_delegate_qt.cpp | 2 | ||||
-rw-r--r-- | src/core/find_text_helper.cpp | 1 | ||||
-rw-r--r-- | src/core/media_capture_devices_dispatcher.cpp | 2 | ||||
-rw-r--r-- | src/core/profile_adapter.cpp | 7 | ||||
-rw-r--r-- | src/core/profile_adapter.h | 1 | ||||
-rw-r--r-- | src/core/profile_adapter_client.h | 2 | ||||
-rw-r--r-- | src/core/render_widget_host_view_qt.cpp | 14 | ||||
-rw-r--r-- | src/core/render_widget_host_view_qt.h | 5 | ||||
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 11 | ||||
-rw-r--r-- | src/webengine/api/qquickwebenginedownloaditem.cpp | 6 | ||||
-rw-r--r-- | src/webengine/api/qquickwebenginedownloaditem_p_p.h | 1 | ||||
-rw-r--r-- | src/webengine/api/qquickwebengineprofile.cpp | 1 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginedownloaditem.cpp | 6 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginedownloaditem_p.h | 1 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebengineprofile.cpp | 1 |
18 files changed, 34 insertions, 42 deletions
diff --git a/src/3rdparty b/src/3rdparty -Subproject 040ccbbef2dbecdb33041a8c444467a72ad5ea4 +Subproject 939daf833fff3a9901afb6fd65d02e0f057a494 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/content_client_qt.cpp b/src/core/content_client_qt.cpp index 554ee3e12..22f3f548f 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"; @@ -286,11 +287,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; @@ -320,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 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/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/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. 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/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<RenderWidgetHostViewQt> @@ -176,10 +175,6 @@ public: void DidStopFlinging() override; std::unique_ptr<content::SyntheticGestureTarget> 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/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; |