summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2022-11-29 17:21:50 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2022-12-08 09:06:29 +0100
commit8fd7140082e3a752ca80882a29128ffc12d12fa4 (patch)
treeeb3e222649ae35b8e5f6ddc820a31b9c7a4845fd /src
parent6d1582b948448eb4ea257f930d31f0c0d852d0c4 (diff)
Deprecate Quota Permission Request API
Requesting host quota is no longer supported by Chromium. navigator.webkitPersistentStorage has became an alias for navigator.webkitTemporaryStorage after the Chromium 106 update. Requesting quota for temporary storage is needless because the allocation is automatic and storage can't be requested beyond the maximum limit. The logic of the persistent storage will be entirely removed in the next Chromium update so just deprecate the API and remove the corresponding implementations. [ChangeLog][QtWebEngineCore] Deprecate QWebEnginePage::quotaRequested() signal and QWebEngineQuotaRequest class. The signal is not emmitted anymore. [ChangeLog][QtWebEngineQuick] Deprecate QWebEngineView.quoataRequested() signal. The signal is not emitted anymore. Task-number: QTBUG-56354 Change-Id: Ie397598c416d9e811270ba56a97f8984948277f7 Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt3
-rw-r--r--src/core/api/qwebenginepage.cpp16
-rw-r--r--src/core/api/qwebenginepage.h6
-rw-r--r--src/core/api/qwebenginepage_p.h1
-rw-r--r--src/core/api/qwebenginequotarequest.cpp42
-rw-r--r--src/core/api/qwebenginequotarequest.h17
-rw-r--r--src/core/content_browser_client_qt.cpp6
-rw-r--r--src/core/content_browser_client_qt.h1
-rw-r--r--src/core/quota_permission_context_qt.cpp81
-rw-r--r--src/core/quota_permission_context_qt.h23
-rw-r--r--src/core/quota_request_controller.h26
-rw-r--r--src/core/quota_request_controller_impl.cpp36
-rw-r--r--src/core/quota_request_controller_impl.h32
-rw-r--r--src/core/web_contents_adapter_client.h2
-rw-r--r--src/core/web_engine_context.cpp7
-rw-r--r--src/webenginequick/api/qquickwebengineview.cpp7
-rw-r--r--src/webenginequick/api/qquickwebengineview_p.h6
-rw-r--r--src/webenginequick/api/qquickwebengineview_p_p.h1
-rw-r--r--src/webenginequick/doc/src/quota_request.qdoc24
-rw-r--r--src/webenginequick/doc/src/webengineview_lgpl.qdoc9
20 files changed, 39 insertions, 307 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 80cfb902c..cdbfb8e9b 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -159,9 +159,6 @@ foreach(arch ${archs})
profile_adapter_client.cpp profile_adapter_client.h
profile_io_data_qt.cpp profile_io_data_qt.h
profile_qt.cpp profile_qt.h
- quota_permission_context_qt.cpp quota_permission_context_qt.h
- quota_request_controller.h
- quota_request_controller_impl.cpp quota_request_controller_impl.h
render_view_context_menu_qt.cpp render_view_context_menu_qt.h
render_widget_host_view_qt.cpp render_widget_host_view_qt.h
render_widget_host_view_qt_delegate.h
diff --git a/src/core/api/qwebenginepage.cpp b/src/core/api/qwebenginepage.cpp
index 8bba5eaba..1b640c940 100644
--- a/src/core/api/qwebenginepage.cpp
+++ b/src/core/api/qwebenginepage.cpp
@@ -17,7 +17,6 @@
#include "qwebenginenewwindowrequest_p.h"
#include "qwebengineprofile.h"
#include "qwebengineprofile_p.h"
-#include "qwebenginequotarequest.h"
#include "qwebengineregisterprotocolhandlerrequest.h"
#include "qwebenginescript.h"
#include "qwebenginescriptcollection_p.h"
@@ -502,12 +501,6 @@ void QWebEnginePagePrivate::runMouseLockPermissionRequest(const QUrl &securityOr
Q_EMIT q->featurePermissionRequested(securityOrigin, QWebEnginePage::MouseLock);
}
-void QWebEnginePagePrivate::runQuotaRequest(QWebEngineQuotaRequest request)
-{
- Q_Q(QWebEnginePage);
- Q_EMIT q->quotaRequested(request);
-}
-
void QWebEnginePagePrivate::runRegisterProtocolHandlerRequest(QWebEngineRegisterProtocolHandlerRequest request)
{
Q_Q(QWebEnginePage);
@@ -742,12 +735,13 @@ QWebEnginePage::QWebEnginePage(QObject* parent)
/*!
\fn QWebEnginePage::quotaRequested(QWebEngineQuotaRequest quotaRequest)
\since 5.11
+ \deprecated [6.5] This signal is no longer emitted.
- This signal is emitted when the web page requests larger persistent storage
- than the application's current allocation in File System API. The default quota
- is 0 bytes.
+ Requesting host quota is no longer supported by Chromium.
+ The behavior of navigator.webkitPersistentStorage
+ is identical to navigator.webkitTemporaryStorage.
- The request object \a quotaRequest can be used to accept or reject the request.
+ For further details, see https://crbug.com/1233525
*/
/*!
diff --git a/src/core/api/qwebenginepage.h b/src/core/api/qwebenginepage.h
index f4cca0582..04272e7fa 100644
--- a/src/core/api/qwebenginepage.h
+++ b/src/core/api/qwebenginepage.h
@@ -7,6 +7,7 @@
#include <QtWebEngineCore/qtwebenginecoreglobal.h>
#include <QtWebEngineCore/qwebengineclientcertificateselection.h>
#include <QtWebEngineCore/qwebenginedownloadrequest.h>
+#include <QtWebEngineCore/qwebenginequotarequest.h>
#include <QtCore/qobject.h>
#include <QtCore/qurl.h>
@@ -35,7 +36,6 @@ class QWebEngineNavigationRequest;
class QWebEngineNewWindowRequest;
class QWebEnginePagePrivate;
class QWebEngineProfile;
-class QWebEngineQuotaRequest;
class QWebEngineRegisterProtocolHandlerRequest;
class QWebEngineScriptCollection;
class QWebEngineSettings;
@@ -309,7 +309,9 @@ Q_SIGNALS:
void featurePermissionRequested(const QUrl &securityOrigin, QWebEnginePage::Feature feature);
void featurePermissionRequestCanceled(const QUrl &securityOrigin, QWebEnginePage::Feature feature);
void fullScreenRequested(QWebEngineFullScreenRequest fullScreenRequest);
- void quotaRequested(QWebEngineQuotaRequest quotaRequest);
+#if QT_DEPRECATED_SINCE(6, 5)
+ QT_DEPRECATED void quotaRequested(QWebEngineQuotaRequest quotaRequest);
+#endif
void registerProtocolHandlerRequested(QWebEngineRegisterProtocolHandlerRequest request);
void fileSystemAccessRequested(QWebEngineFileSystemAccessRequest request);
void selectClientCertificate(QWebEngineClientCertificateSelection clientCertSelection);
diff --git a/src/core/api/qwebenginepage_p.h b/src/core/api/qwebenginepage_p.h
index fa5ee135d..a56494a32 100644
--- a/src/core/api/qwebenginepage_p.h
+++ b/src/core/api/qwebenginepage_p.h
@@ -140,7 +140,6 @@ public:
void runMediaAccessPermissionRequest(const QUrl &securityOrigin, MediaRequestFlags requestFlags) override;
void runFeaturePermissionRequest(QtWebEngineCore::ProfileAdapter::PermissionType permission, const QUrl &securityOrigin) override;
void runMouseLockPermissionRequest(const QUrl &securityOrigin) override;
- void runQuotaRequest(QWebEngineQuotaRequest) override;
void runRegisterProtocolHandlerRequest(QWebEngineRegisterProtocolHandlerRequest) override;
void runFileSystemAccessRequest(QWebEngineFileSystemAccessRequest) override;
QObject *accessibilityParentObject() override;
diff --git a/src/core/api/qwebenginequotarequest.cpp b/src/core/api/qwebenginequotarequest.cpp
index ca1289625..3c312216d 100644
--- a/src/core/api/qwebenginequotarequest.cpp
+++ b/src/core/api/qwebenginequotarequest.cpp
@@ -3,76 +3,54 @@
#include "qwebenginequotarequest.h"
-#include "quota_request_controller.h"
+#if QT_DEPRECATED_SINCE(6, 5)
QT_BEGIN_NAMESPACE
/*!
\class QWebEngineQuotaRequest
- \brief The QWebEngineQuotaRequest class enables accepting or rejecting
- requests for larger persistent storage than the application's current
- allocation in File System API.
-
\since 5.11
\inmodule QtWebEngineCore
+ \deprecated [6.5] Requesting host quota is no longer supported by Chromium.
+
+ The behavior of navigator.webkitPersistentStorage
+ is identical to navigator.webkitTemporaryStorage.
- This class is used by the QWebEnginePage::quotaRequested() signal to \l
- accept() or \l reject() a request for an increase in the persistent storage
- allocated to the application. The default quota is 0 bytes.
+ For further details, see https://crbug.com/1233525
*/
/*! \fn QWebEngineQuotaRequest::QWebEngineQuotaRequest()
\internal
*/
-/*! \internal */
-QWebEngineQuotaRequest::QWebEngineQuotaRequest(QSharedPointer<QtWebEngineCore::QuotaRequestController> controller)
- : d_ptr(controller)
-{}
-
-/*!
- Rejects a request for larger persistent storage.
-*/
void QWebEngineQuotaRequest::reject()
{
- d_ptr->reject();
}
-/*!
- Accepts a request for larger persistent storage.
-*/
void QWebEngineQuotaRequest::accept()
{
- d_ptr->accept();
}
/*!
\property QWebEngineQuotaRequest::origin
- \brief The URL of the web page that issued the quota request.
*/
QUrl QWebEngineQuotaRequest::origin() const
{
- return d_ptr->origin();
+ return QUrl();
}
/*!
\property QWebEngineQuotaRequest::requestedSize
- \brief Contains the size of the requested disk space in bytes.
*/
qint64 QWebEngineQuotaRequest::requestedSize() const
{
- return d_ptr->requestedSize();
+ return 0;
}
-/*! \fn bool QWebEngineQuotaRequest::operator==(const QWebEngineQuotaRequest &that) const
- Returns \c true if \a that points to the same object as this quota request.
-*/
+QT_END_NAMESPACE
-/*! \fn bool QWebEngineQuotaRequest::operator!=(const QWebEngineQuotaRequest &that) const
- Returns \c true if \a that points to a different object than this request.
-*/
+#endif // QT_DEPRECATED_SINCE(6, 5)
-QT_END_NAMESPACE
#include "moc_qwebenginequotarequest.cpp"
diff --git a/src/core/api/qwebenginequotarequest.h b/src/core/api/qwebenginequotarequest.h
index c10789360..846a75152 100644
--- a/src/core/api/qwebenginequotarequest.h
+++ b/src/core/api/qwebenginequotarequest.h
@@ -6,13 +6,9 @@
#include <QtWebEngineCore/qtwebenginecoreglobal.h>
-#include <QtCore/qsharedpointer.h>
#include <QtCore/qurl.h>
-namespace QtWebEngineCore {
-class QuotaPermissionContextQt;
-class QuotaRequestController;
-} // namespace QtWebEngineCore
+#if QT_DEPRECATED_SINCE(6, 5)
QT_BEGIN_NAMESPACE
@@ -27,15 +23,12 @@ public:
Q_INVOKABLE void reject();
QUrl origin() const;
qint64 requestedSize() const;
- bool operator==(const QWebEngineQuotaRequest &that) const { return d_ptr == that.d_ptr; }
- bool operator!=(const QWebEngineQuotaRequest &that) const { return d_ptr != that.d_ptr; }
-
-private:
- QWebEngineQuotaRequest(QSharedPointer<QtWebEngineCore::QuotaRequestController>);
- friend QtWebEngineCore::QuotaPermissionContextQt;
- QSharedPointer<QtWebEngineCore::QuotaRequestController> d_ptr;
+ bool operator==(const QWebEngineQuotaRequest &) const { return false; }
+ bool operator!=(const QWebEngineQuotaRequest &) const { return true; }
};
QT_END_NAMESPACE
+#endif // QT_DEPRECATED_SINCE(6, 5)
+
#endif // QWEBENGINEQUOTAREQUEST_H
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 1c1db445c..075530bdd 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -74,7 +74,6 @@
#include "platform_notification_service_qt.h"
#include "profile_qt.h"
#include "profile_io_data_qt.h"
-#include "quota_permission_context_qt.h"
#include "renderer_host/user_resource_controller_host.h"
#include "select_file_dialog_factory_qt.h"
#include "type_conversion.h"
@@ -288,11 +287,6 @@ void ContentBrowserClientQt::OverrideWebkitPrefs(content::WebContents *webConten
delegate->overrideWebPreferences(webContents, web_prefs);
}
-scoped_refptr<content::QuotaPermissionContext> ContentBrowserClientQt::CreateQuotaPermissionContext()
-{
- return new QuotaPermissionContextQt;
-}
-
void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webContents,
int cert_error,
const net::SSLInfo &ssl_info,
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index 6cf630581..cb0fbe46c 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -46,7 +46,6 @@ public:
void RenderProcessWillLaunch(content::RenderProcessHost *host) override;
gl::GLShareGroup* GetInProcessGpuShareGroup() override;
content::MediaObserver* GetMediaObserver() override;
- scoped_refptr<content::QuotaPermissionContext> CreateQuotaPermissionContext() override;
void OverrideWebkitPrefs(content::WebContents *web_contents,
blink::web_pref::WebPreferences *prefs) override;
void AllowCertificateError(content::WebContents *web_contents,
diff --git a/src/core/quota_permission_context_qt.cpp b/src/core/quota_permission_context_qt.cpp
deleted file mode 100644
index fe2a8433c..000000000
--- a/src/core/quota_permission_context_qt.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-
-#include "quota_permission_context_qt.h"
-
-#include "content/browser/web_contents/web_contents_impl.h"
-#include "content/public/browser/browser_task_traits.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/render_frame_host.h"
-#include "quota_request_controller_impl.h"
-#include "qwebenginequotarequest.h"
-#include "web_contents_delegate_qt.h"
-#include "web_contents_view_qt.h"
-
-using content::QuotaPermissionContext;
-using content::RenderFrameHost;
-using content::StorageQuotaParams;
-using content::WebContents;
-
-namespace QtWebEngineCore {
-
-void QuotaPermissionContextQt::RequestQuotaPermission(const StorageQuotaParams &params, int render_process_id, PermissionCallback callback)
-{
- if (params.storage_type != blink::mojom::StorageType::kPersistent) {
- // For now we only support requesting quota with this interface
- // for Persistent storage type.
- dispatchCallbackOnIOThread(std::move(callback), QUOTA_PERMISSION_RESPONSE_DISALLOW);
- return;
- }
-
- if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
- content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
- base::BindOnce(&QuotaPermissionContextQt::RequestQuotaPermission, this,
- params, render_process_id, std::move(callback)));
- return;
- }
-
- RenderFrameHost *renderFrameHost = RenderFrameHost::FromID(render_process_id, params.render_frame_id);
- if (!renderFrameHost) {
- LOG(WARNING) << "Attempt to request quota from frameless renderer: "
- << render_process_id << "," << params.render_frame_id;
- dispatchCallbackOnIOThread(std::move(callback), QUOTA_PERMISSION_RESPONSE_CANCELLED);
- return;
- }
-
- WebContents *webContents = WebContents::FromRenderFrameHost(renderFrameHost);
- if (!webContents) {
- LOG(ERROR) << "Attempt to request quota from frame missing webcontents";
- dispatchCallbackOnIOThread(std::move(callback), QUOTA_PERMISSION_RESPONSE_CANCELLED);
- return;
- }
-
- WebContentsAdapterClient *client = WebContentsViewQt::from(static_cast<content::WebContentsImpl *>(webContents)->GetView())->client();
- if (!client) {
- LOG(ERROR) << "Attempt to request quota from content missing webcontents client";
- dispatchCallbackOnIOThread(std::move(callback), QUOTA_PERMISSION_RESPONSE_CANCELLED);
- return;
- }
-
- QWebEngineQuotaRequest request(
- QSharedPointer<QuotaRequestControllerImpl>::create(this, params, std::move(callback)));
- client->runQuotaRequest(std::move(request));
-}
-
-void QuotaPermissionContextQt::dispatchCallbackOnIOThread(PermissionCallback callback,
- QuotaPermissionContext::QuotaPermissionResponse response)
-{
- if (callback.is_null())
- return;
-
- if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) {
- content::GetIOThreadTaskRunner({})->PostTask(FROM_HERE,
- base::BindOnce(&QuotaPermissionContextQt::dispatchCallbackOnIOThread,
- this, std::move(callback), response));
- return;
- }
-
- std::move(callback).Run(response);
-}
-
-} // namespace QtWebEngineCore
diff --git a/src/core/quota_permission_context_qt.h b/src/core/quota_permission_context_qt.h
deleted file mode 100644
index 665f046cd..000000000
--- a/src/core/quota_permission_context_qt.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-
-#ifndef QUOTA_PERMISSION_CONTEXT_QT_H
-#define QUOTA_PERMISSION_CONTEXT_QT_H
-
-#include "content/public/browser/quota_permission_context.h"
-
-namespace QtWebEngineCore {
-
-class QuotaPermissionContextQt : public content::QuotaPermissionContext {
-public:
- void RequestQuotaPermission(const content::StorageQuotaParams &params,
- int render_process_id,
- PermissionCallback callback) override;
-
- void dispatchCallbackOnIOThread(PermissionCallback callback,
- QuotaPermissionContext::QuotaPermissionResponse response);
-};
-
-} // namespace QtWebEngineCore
-
-#endif // QUOTA_PERMISSION_CONTEXT_QT_H
diff --git a/src/core/quota_request_controller.h b/src/core/quota_request_controller.h
deleted file mode 100644
index d39a209d3..000000000
--- a/src/core/quota_request_controller.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-
-#ifndef QUOTA_REQUEST_CONTROLLER_H
-#define QUOTA_REQUEST_CONTROLLER_H
-
-#include "request_controller.h"
-
-namespace QtWebEngineCore {
-
-class QuotaRequestController : public RequestController {
-public:
- QuotaRequestController(QUrl origin, qint64 requestedSize)
- : RequestController(std::move(origin))
- , m_requestedSize(requestedSize)
- {}
-
- qint64 requestedSize() const { return m_requestedSize; }
-
-private:
- qint64 m_requestedSize;
-};
-
-} // namespace QtWebEngineCore
-
-#endif // QUOTA_REQUEST_CONTROLLER_H
diff --git a/src/core/quota_request_controller_impl.cpp b/src/core/quota_request_controller_impl.cpp
deleted file mode 100644
index 32d7a6d63..000000000
--- a/src/core/quota_request_controller_impl.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-
-#include "quota_request_controller_impl.h"
-
-#include "type_conversion.h"
-
-namespace QtWebEngineCore {
-
-QuotaRequestControllerImpl::QuotaRequestControllerImpl(QuotaPermissionContextQt *context,
- const content::StorageQuotaParams &params,
- content::QuotaPermissionContext::PermissionCallback callback)
- : QuotaRequestController(
- toQt(params.origin_url),
- params.requested_size)
- , m_context(context)
- , m_callback(std::move(callback))
-{}
-
-QuotaRequestControllerImpl::~QuotaRequestControllerImpl()
-{
- if (m_callback)
- m_context->dispatchCallbackOnIOThread(std::move(m_callback), content::QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED);
-}
-
-void QuotaRequestControllerImpl::accepted()
-{
- m_context->dispatchCallbackOnIOThread(std::move(m_callback), content::QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_ALLOW);
-}
-
-void QuotaRequestControllerImpl::rejected()
-{
- m_context->dispatchCallbackOnIOThread(std::move(m_callback), content::QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_DISALLOW);
-}
-
-} // namespace QtWebEngineCore
diff --git a/src/core/quota_request_controller_impl.h b/src/core/quota_request_controller_impl.h
deleted file mode 100644
index a9a002380..000000000
--- a/src/core/quota_request_controller_impl.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (C) 2017 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
-
-#ifndef QUOTA_REQUEST_CONTROLLER_IMPL_H
-#define QUOTA_REQUEST_CONTROLLER_IMPL_H
-
-#include "quota_permission_context_qt.h"
-#include "quota_request_controller.h"
-
-namespace QtWebEngineCore {
-
-class QuotaRequestControllerImpl final : public QuotaRequestController {
-public:
- QuotaRequestControllerImpl(
- QuotaPermissionContextQt *context,
- const content::StorageQuotaParams &params,
- content::QuotaPermissionContext::PermissionCallback callback);
-
- ~QuotaRequestControllerImpl();
-
-protected:
- void accepted() override;
- void rejected() override;
-
-private:
- scoped_refptr<QuotaPermissionContextQt> m_context;
- content::QuotaPermissionContext::PermissionCallback m_callback;
-};
-
-} // namespace QtWebEngineCore
-
-#endif // QUOTA_REQUEST_CONTROLLER_IMPL_H
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
index 8d6ae5636..afbd2b5f2 100644
--- a/src/core/web_contents_adapter_client.h
+++ b/src/core/web_contents_adapter_client.h
@@ -30,7 +30,6 @@ QT_FORWARD_DECLARE_CLASS(QVariant)
QT_FORWARD_DECLARE_CLASS(QWebEngineFileSystemAccessRequest)
QT_FORWARD_DECLARE_CLASS(QWebEngineFindTextResult)
QT_FORWARD_DECLARE_CLASS(QWebEngineLoadingInfo)
-QT_FORWARD_DECLARE_CLASS(QWebEngineQuotaRequest)
QT_FORWARD_DECLARE_CLASS(QWebEngineRegisterProtocolHandlerRequest)
QT_FORWARD_DECLARE_CLASS(QWebEngineUrlRequestInfo)
QT_FORWARD_DECLARE_CLASS(QWebEngineUrlRequestInterceptor)
@@ -187,7 +186,6 @@ public:
virtual void runFeaturePermissionRequest(ProfileAdapter::PermissionType, const QUrl &securityOrigin) = 0;
virtual void runMediaAccessPermissionRequest(const QUrl &securityOrigin, MediaRequestFlags requestFlags) = 0;
virtual void runMouseLockPermissionRequest(const QUrl &securityOrigin) = 0;
- virtual void runQuotaRequest(QWebEngineQuotaRequest) = 0;
virtual void runRegisterProtocolHandlerRequest(QWebEngineRegisterProtocolHandlerRequest) = 0;
virtual void runFileSystemAccessRequest(QWebEngineFileSystemAccessRequest) = 0;
virtual QWebEngineSettings *webEngineSettings() const = 0;
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 49d626b3a..29189bc72 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -677,13 +677,6 @@ WebEngineContext::WebEngineContext()
disableFeatures.push_back(features::kWebUsb.name);
disableFeatures.push_back(media::kPictureInPicture.name);
- // Disable webkitPersistentStorage alias to webkitTemporaryStorage.
- // Persistent quota is depreceted and this flag will be removed:
- // https://chromium-review.googlesource.com/c/chromium/src/+/3888541
- // TODO: Implement support for webkitTemporaryStorage.
- // Also see: https://bugs.chromium.org/p/chromium/issues/detail?id=1233525
- disableFeatures.push_back(blink::features::kPersistentQuotaIsTemporaryQuota.name);
-
if (useEmbeddedSwitches) {
// embedded switches are based on the switches for Android, see content/browser/android/content_startup_flags.cc
enableFeatures.push_back(features::kOverlayScrollbar.name);
diff --git a/src/webenginequick/api/qquickwebengineview.cpp b/src/webenginequick/api/qquickwebengineview.cpp
index deb68c6d3..7a264104c 100644
--- a/src/webenginequick/api/qquickwebengineview.cpp
+++ b/src/webenginequick/api/qquickwebengineview.cpp
@@ -37,7 +37,6 @@
#include <QtWebEngineCore/qwebenginefullscreenrequest.h>
#include <QtWebEngineCore/qwebengineloadinginfo.h>
#include <QtWebEngineCore/qwebenginenavigationrequest.h>
-#include <QtWebEngineCore/qwebenginequotarequest.h>
#include <QtWebEngineCore/qwebengineregisterprotocolhandlerrequest.h>
#include <QtWebEngineCore/qwebenginescriptcollection.h>
#include <QtWebEngineCore/private/qwebenginecontextmenurequest_p.h>
@@ -651,12 +650,6 @@ void QQuickWebEngineViewPrivate::runMouseLockPermissionRequest(const QUrl &secur
adapter->grantMouseLockPermission(securityOrigin, false);
}
-void QQuickWebEngineViewPrivate::runQuotaRequest(QWebEngineQuotaRequest request)
-{
- Q_Q(QQuickWebEngineView);
- Q_EMIT q->quotaRequested(request);
-}
-
void QQuickWebEngineViewPrivate::runRegisterProtocolHandlerRequest(QWebEngineRegisterProtocolHandlerRequest request)
{
Q_Q(QQuickWebEngineView);
diff --git a/src/webenginequick/api/qquickwebengineview_p.h b/src/webenginequick/api/qquickwebengineview_p.h
index 00c6f3018..4c61680d7 100644
--- a/src/webenginequick/api/qquickwebengineview_p.h
+++ b/src/webenginequick/api/qquickwebengineview_p.h
@@ -16,6 +16,7 @@
//
#include <QtWebEngineCore/qtwebenginecoreglobal.h>
+#include <QtWebEngineCore/qwebenginequotarequest.h>
#include <QtWebEngineQuick/private/qtwebenginequickglobal_p.h>
#include <QtGui/qcolor.h>
#include <QtQml/qqmlregistration.h>
@@ -46,7 +47,6 @@ class QWebEngineHistory;
class QWebEngineLoadingInfo;
class QWebEngineNavigationRequest;
class QWebEngineNewWindowRequest;
-class QWebEngineQuotaRequest;
class QWebEngineRegisterProtocolHandlerRequest;
class QQuickWebEngineScriptCollection;
class QQuickWebEngineTouchSelectionMenuRequest;
@@ -516,7 +516,9 @@ Q_SIGNALS:
Q_REVISION(1,4) void colorDialogRequested(QQuickWebEngineColorDialogRequest *request);
Q_REVISION(1,4) void fileDialogRequested(QQuickWebEngineFileDialogRequest *request);
Q_REVISION(1,5) void pdfPrintingFinished(const QString &filePath, bool success);
- Q_REVISION(1,7) void quotaRequested(const QWebEngineQuotaRequest &request);
+#if QT_DEPRECATED_SINCE(6, 5)
+ Q_REVISION(1,7) QT_DEPRECATED void quotaRequested(const QWebEngineQuotaRequest &request);
+#endif
Q_REVISION(1,7) void geometryChangeRequested(const QRect &geometry, const QRect &frameGeometry);
Q_REVISION(1,7) void inspectedViewChanged();
Q_REVISION(1,7) void devToolsViewChanged();
diff --git a/src/webenginequick/api/qquickwebengineview_p_p.h b/src/webenginequick/api/qquickwebengineview_p_p.h
index 2d28a89af..4be848441 100644
--- a/src/webenginequick/api/qquickwebengineview_p_p.h
+++ b/src/webenginequick/api/qquickwebengineview_p_p.h
@@ -103,7 +103,6 @@ public:
void authenticationRequired(QSharedPointer<QtWebEngineCore::AuthenticationDialogController>) override;
void runMediaAccessPermissionRequest(const QUrl &securityOrigin, MediaRequestFlags requestFlags) override;
void runMouseLockPermissionRequest(const QUrl &securityOrigin) override;
- void runQuotaRequest(QWebEngineQuotaRequest) override;
void runRegisterProtocolHandlerRequest(QWebEngineRegisterProtocolHandlerRequest) override;
void runFileSystemAccessRequest(QWebEngineFileSystemAccessRequest) override;
QObject *accessibilityParentObject() override;
diff --git a/src/webenginequick/doc/src/quota_request.qdoc b/src/webenginequick/doc/src/quota_request.qdoc
index 579d78008..01f4ec286 100644
--- a/src/webenginequick/doc/src/quota_request.qdoc
+++ b/src/webenginequick/doc/src/quota_request.qdoc
@@ -6,8 +6,12 @@
\instantiates QWebEngineQuotaRequest
\inqmlmodule QtWebEngine
\since QtWebEngine 1.7
+ \deprecated [6.5] Requesting host quota is no longer supported by Chromium.
- \brief A utility type for the WebEngineView::quotaRequested() signal.
+ The behavior of navigator.webkitPersistentStorage
+ is identical to navigator.webkitTemporaryStorage.
+
+ For further details, see https://crbug.com/1233525
\sa WebEngineView::quotaRequested()
*/
@@ -15,36 +19,18 @@
/*!
\qmlproperty url QuotaRequest::origin
\readonly
-
- The URL of the web page that issued the quota request.
*/
/*!
\qmlproperty qint64 QuotaRequest::requestedSize
\readonly
-
- Contains the size of the requested disk space in bytes.
*/
/*!
\qmlmethod void QuotaRequest::accept()
-
- Accepts the quota request.
-
- \qml
- WebEngineView {
- onQuotaRequested: function(request) {
- if (request.requestedSize <= 5 * 1024 * 1024)
- request.accept();
- else
- request.reject();
- }
- }
- \endqml
*/
/*!
\qmlmethod void QuotaRequest::reject()
- Rejects the quota request.
*/
diff --git a/src/webenginequick/doc/src/webengineview_lgpl.qdoc b/src/webenginequick/doc/src/webengineview_lgpl.qdoc
index 6534518e7..8848b03e8 100644
--- a/src/webenginequick/doc/src/webengineview_lgpl.qdoc
+++ b/src/webenginequick/doc/src/webengineview_lgpl.qdoc
@@ -1230,10 +1230,13 @@
/*!
\qmlsignal WebEngineView::quotaRequested(QuotaRequest request)
\since QtWebEngine 1.7
+ \deprecated [6.5] This signal is no longer emitted.
- This signal is emitted when the web page issues a \a request for a larger persistent storage
- than the application's current allocation in File System API. The default quota
- is 0 bytes.
+ Requesting host quota is no longer supported by Chromium.
+ The behavior of navigator.webkitPersistentStorage
+ is identical to navigator.webkitTemporaryStorage.
+
+ For further details, see https://crbug.com/1233525
\sa QuotaRequest
*/