summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.cmake6
-rw-r--r--examples/webenginequick/quicknanobrowser/BrowserWindow.qml17
m---------src/3rdparty0
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/core/api/qt_cmdline.cmake2
-rw-r--r--src/core/api/qwebengineclienthints.h5
-rw-r--r--src/core/api/qwebengineextensioninfo.h3
-rw-r--r--src/core/api/qwebengineextensionmanager.h4
-rw-r--r--src/core/custom_handlers/protocol_handler_registry_delegate_qt.cpp1
-rw-r--r--src/core/custom_handlers/protocol_handler_registry_delegate_qt.h1
-rw-r--r--src/core/custom_handlers/protocol_handler_registry_factory.cpp1
-rw-r--r--src/core/custom_handlers/protocol_handler_registry_factory.h1
-rw-r--r--src/core/custom_handlers/register_protocol_handler_request_controller.h1
-rw-r--r--src/core/custom_handlers/register_protocol_handler_request_controller_impl.cpp2
-rw-r--r--src/core/custom_handlers/register_protocol_handler_request_controller_impl.h1
-rw-r--r--src/core/printing/pdf_document_helper_client_qt.cpp1
-rw-r--r--src/core/printing/pdf_document_helper_client_qt.h1
-rw-r--r--src/core/printing/pdf_stream_delegate_qt.cpp1
-rw-r--r--src/core/printing/pdf_stream_delegate_qt.h1
-rw-r--r--src/core/printing/pdfium_document_wrapper_qt.cpp1
-rw-r--r--src/core/printing/pdfium_document_wrapper_qt.h1
-rw-r--r--src/core/printing/print_view_manager_base_qt.cpp1
-rw-r--r--src/core/printing/print_view_manager_base_qt.h1
-rw-r--r--src/core/printing/print_view_manager_qt.cpp1
-rw-r--r--src/core/printing/print_view_manager_qt.h1
-rw-r--r--src/core/printing/printer_worker.cpp1
-rw-r--r--src/core/printing/printer_worker.h1
-rw-r--r--src/core/tools/qwebengine_convert_dict/main.cpp1
-rw-r--r--src/webenginequick/api/qquickwebengineforeigntypes_p.h34
-rw-r--r--src/webenginequick/api/qquickwebenginescriptcollection.cpp18
-rw-r--r--tests/auto/core/qwebengineurlrequestjob/tst_qwebengineurlrequestjob.cpp2
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp21
32 files changed, 99 insertions, 38 deletions
diff --git a/configure.cmake b/configure.cmake
index 32b152c02..102d5f680 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -70,7 +70,6 @@ if(PkgConfig_FOUND)
pkg_check_modules(GLIB glib-2.0>=${QT_CONFIGURE_CHECK_glib_version})
pkg_check_modules(HARFBUZZ harfbuzz>=${QT_CONFIGURE_CHECK_harfbuzz_version} harfbuzz-subset>=${QT_CONFIGURE_CHECK_harfbuzz_version})
pkg_check_modules(JPEG libjpeg IMPORTED_TARGET)
- pkg_check_modules(LIBEVENT libevent)
pkg_check_modules(MINIZIP minizip)
pkg_check_modules(PNG libpng>=${QT_CONFIGURE_CHECK_libpng_version})
pkg_check_modules(TIFF libtiff-4>=${QT_CONFIGURE_CHECK_libtiff_version})
@@ -655,10 +654,6 @@ qt_feature("webengine-system-minizip" PRIVATE
LABEL "minizip"
CONDITION UNIX AND MINIZIP_FOUND
)
-qt_feature("webengine-system-libevent" PRIVATE
- LABEL "libevent"
- CONDITION UNIX AND LIBEVENT_FOUND
-)
qt_feature("webengine-system-libxml" PRIVATE
LABEL "libxml2 and libxslt"
CONDITION UNIX AND LIBXML2_FOUND
@@ -774,7 +769,6 @@ if(UNIX)
qt_configure_add_summary_entry(ARGS "webengine-system-glib")
qt_configure_add_summary_entry(ARGS "webengine-system-zlib")
qt_configure_add_summary_entry(ARGS "webengine-system-minizip")
- qt_configure_add_summary_entry(ARGS "webengine-system-libevent")
qt_configure_add_summary_entry(ARGS "webengine-system-libxml")
qt_configure_add_summary_entry(ARGS "webengine-system-lcms2")
qt_configure_add_summary_entry(ARGS "webengine-system-libpng")
diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index a6cdc9012..968456556 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -49,6 +49,8 @@ ApplicationWindow {
property alias devToolsEnabled: devToolsEnabled.checked
property alias pdfViewerEnabled: pdfViewerEnabled.checked
property int imageAnimationPolicy: WebEngineSettings.ImageAnimationPolicy.Allow
+ property alias javascriptCanAccessClipboard: javascriptCanAccessClipboard.checked
+ property alias javascriptCanPaste: javascriptCanPaste.checked
}
Action {
@@ -380,7 +382,6 @@ ApplicationWindow {
checkable: true
checked: WebEngine.settings.pdfViewerEnabled
}
-
Menu {
id: imageAnimationPolicy
title: "Image Animation Policy"
@@ -419,6 +420,18 @@ ApplicationWindow {
}
}
+ MenuItem {
+ id: javascriptCanAccessClipboard
+ text: "JavaScript can access clipboard"
+ checkable: true
+ checked: WebEngine.settings.javascriptCanAccessClipboard
+ }
+ MenuItem {
+ id: javascriptCanPaste
+ text: "JavaScript can paste"
+ checkable: true
+ checked: WebEngine.settings.javascriptCanPaste
+ }
}
}
}
@@ -581,6 +594,8 @@ ApplicationWindow {
settings.pdfViewerEnabled: appSettings.pdfViewerEnabled
settings.imageAnimationPolicy: appSettings.imageAnimationPolicy
settings.screenCaptureEnabled: true
+ settings.javascriptCanAccessClipboard: appSettings.javascriptCanAccessClipboard
+ settings.javascriptCanPaste: appSettings.javascriptCanPaste
onWindowCloseRequested: function() {
tabBar.removeView(webEngineView.index);
diff --git a/src/3rdparty b/src/3rdparty
-Subproject 40948d1690e3a124e45ac562c58d3e6887a3f4f
+Subproject b5f55adaf3d2479cc4f866e0f1a616b67e09311
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index ff8c958cb..f5435509c 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -466,7 +466,7 @@ foreach(arch ${archs})
list(APPEND gnArgArg
angle_enable_gl=true
use_gtk=false # GTK toolkit bindings
- use_qt=false # Qt5 toolkit bindings
+ use_qt5=false # Qt5 toolkit bindings
use_gio=false
use_bundled_fontconfig=false
use_glib=false
@@ -479,7 +479,7 @@ foreach(arch ${archs})
ozone_platform="qt"
ozone_extra_path="${CMAKE_CURRENT_LIST_DIR}/ozone/ozone_extra.gni"
)
- set(systemLibs libjpeg libpng freetype harfbuzz libevent libwebp libxml
+ set(systemLibs libjpeg libpng freetype harfbuzz libwebp libxml
opus snappy icu ffmpeg re2 lcms2 libopenjpeg2 libvpx
)
foreach(slib ${systemLibs})
diff --git a/src/core/api/qt_cmdline.cmake b/src/core/api/qt_cmdline.cmake
index fe7092b8c..3c5b779c3 100644
--- a/src/core/api/qt_cmdline.cmake
+++ b/src/core/api/qt_cmdline.cmake
@@ -27,7 +27,7 @@ function(qt_commandline_jumbo arg val nextok)
endif()
endfunction()
-set(systemLibs alsa ffmpeg freetype harfbuzz icu lcms2 libevent libjpeg
+set(systemLibs alsa ffmpeg freetype harfbuzz icu lcms2 libjpeg
libpng libvpx libxml libwebp minizip opus pulseaudio re2 snappy zlib)
foreach(slib ${systemLibs})
qt_commandline_option(webengine-${slib} TYPE enum NAME webengine-system-${slib} VALUES yes no system)
diff --git a/src/core/api/qwebengineclienthints.h b/src/core/api/qwebengineclienthints.h
index ef9c59ed9..15be5acef 100644
--- a/src/core/api/qwebengineclienthints.h
+++ b/src/core/api/qwebengineclienthints.h
@@ -10,7 +10,6 @@
#include <QtCore/qobject.h>
#include <QtCore/qpointer.h>
#include <QtCore/qvariantmap.h>
-#include <QtQml/qqmlregistration.h>
namespace QtWebEngineCore {
class ProfileAdapter;
@@ -35,10 +34,6 @@ class Q_WEBENGINECORE_EXPORT QWebEngineClientHints : public QObject
Q_PROPERTY(bool isAllClientHintsEnabled READ isAllClientHintsEnabled WRITE setAllClientHintsEnabled FINAL)
public:
- QML_NAMED_ELEMENT(WebEngineClientHints)
- QML_UNCREATABLE("")
- QML_ADDED_IN_VERSION(6, 8)
-
~QWebEngineClientHints();
QString arch() const;
diff --git a/src/core/api/qwebengineextensioninfo.h b/src/core/api/qwebengineextensioninfo.h
index 1c242dcb2..413f29477 100644
--- a/src/core/api/qwebengineextensioninfo.h
+++ b/src/core/api/qwebengineextensioninfo.h
@@ -36,9 +36,6 @@ class QWebEngineExtensionInfo
Q_PROPERTY(bool isInstalled READ isInstalled FINAL)
public:
- QML_VALUE_TYPE(webEngineExtension)
- QML_ADDED_IN_VERSION(6, 10)
-
Q_WEBENGINECORE_EXPORT QWebEngineExtensionInfo();
Q_WEBENGINECORE_EXPORT
diff --git a/src/core/api/qwebengineextensionmanager.h b/src/core/api/qwebengineextensionmanager.h
index 15919605d..0fc6d3e01 100644
--- a/src/core/api/qwebengineextensionmanager.h
+++ b/src/core/api/qwebengineextensionmanager.h
@@ -27,10 +27,6 @@ class Q_WEBENGINECORE_EXPORT QWebEngineExtensionManager : public QObject
Q_PROPERTY(QString installPath READ installPath FINAL)
Q_PROPERTY(QList<QWebEngineExtensionInfo> extensions READ extensions FINAL)
public:
- QML_NAMED_ELEMENT(WebEngineExtensionManager)
- QML_UNCREATABLE("")
- QML_ADDED_IN_VERSION(6, 10)
-
~QWebEngineExtensionManager() override;
Q_INVOKABLE void loadExtension(const QString &path);
Q_INVOKABLE void installExtension(const QString &path);
diff --git a/src/core/custom_handlers/protocol_handler_registry_delegate_qt.cpp b/src/core/custom_handlers/protocol_handler_registry_delegate_qt.cpp
index a5074fb88..70264ccf4 100644
--- a/src/core/custom_handlers/protocol_handler_registry_delegate_qt.cpp
+++ b/src/core/custom_handlers/protocol_handler_registry_delegate_qt.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2022 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
+// Qt-Security score:significant reason:default
// based on chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.cc:
// Copyright 2021 The Chromium Authors. All rights reserved.
diff --git a/src/core/custom_handlers/protocol_handler_registry_delegate_qt.h b/src/core/custom_handlers/protocol_handler_registry_delegate_qt.h
index 6a0753d22..11ecd4102 100644
--- a/src/core/custom_handlers/protocol_handler_registry_delegate_qt.h
+++ b/src/core/custom_handlers/protocol_handler_registry_delegate_qt.h
@@ -1,5 +1,6 @@
// Copyright (C) 2022 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
+// Qt-Security score:significant reason:default
// based on chrome/browser/custom_handlers/chrome_protocol_handler_registry_delegate.h:
// Copyright 2021 The Chromium Authors. All rights reserved.
diff --git a/src/core/custom_handlers/protocol_handler_registry_factory.cpp b/src/core/custom_handlers/protocol_handler_registry_factory.cpp
index efd5cb406..7caf78e3b 100644
--- a/src/core/custom_handlers/protocol_handler_registry_factory.cpp
+++ b/src/core/custom_handlers/protocol_handler_registry_factory.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2022 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
+// Qt-Security score:significant reason:default
// based on chrome/browser/custom_handlers/protocol_handler_registry_factory.cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
diff --git a/src/core/custom_handlers/protocol_handler_registry_factory.h b/src/core/custom_handlers/protocol_handler_registry_factory.h
index aa9bea3a6..71c3dd772 100644
--- a/src/core/custom_handlers/protocol_handler_registry_factory.h
+++ b/src/core/custom_handlers/protocol_handler_registry_factory.h
@@ -1,5 +1,6 @@
// Copyright (C) 2022 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
+// Qt-Security score:significant reason:default
// based on chrome/browser/custom_handlers/protocol_handler_registry_factory.h:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
diff --git a/src/core/custom_handlers/register_protocol_handler_request_controller.h b/src/core/custom_handlers/register_protocol_handler_request_controller.h
index 6305ce5b7..d28f46ed3 100644
--- a/src/core/custom_handlers/register_protocol_handler_request_controller.h
+++ b/src/core/custom_handlers/register_protocol_handler_request_controller.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 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
+// Qt-Security score:significant reason:default
#ifndef REGISTER_PROTOCOL_HANDLER_REQUEST_CONTROLLER_H
#define REGISTER_PROTOCOL_HANDLER_REQUEST_CONTROLLER_H
diff --git a/src/core/custom_handlers/register_protocol_handler_request_controller_impl.cpp b/src/core/custom_handlers/register_protocol_handler_request_controller_impl.cpp
index efaf54cd2..33bb2e586 100644
--- a/src/core/custom_handlers/register_protocol_handler_request_controller_impl.cpp
+++ b/src/core/custom_handlers/register_protocol_handler_request_controller_impl.cpp
@@ -1,5 +1,7 @@
// Copyright (C) 2018 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
+// Qt-Security score:significant reason:default
+
#include "custom_handlers/register_protocol_handler_request_controller_impl.h"
#include "components/custom_handlers/protocol_handler_registry.h"
diff --git a/src/core/custom_handlers/register_protocol_handler_request_controller_impl.h b/src/core/custom_handlers/register_protocol_handler_request_controller_impl.h
index 073ca9bf8..526e5e5e6 100644
--- a/src/core/custom_handlers/register_protocol_handler_request_controller_impl.h
+++ b/src/core/custom_handlers/register_protocol_handler_request_controller_impl.h
@@ -1,5 +1,6 @@
// Copyright (C) 2018 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
+// Qt-Security score:significant reason:default
#ifndef REGISTER_PROTOCOL_HANDLER_REQUEST_CONTROLLER_IMPL_H
#define REGISTER_PROTOCOL_HANDLER_REQUEST_CONTROLLER_IMPL_H
diff --git a/src/core/printing/pdf_document_helper_client_qt.cpp b/src/core/printing/pdf_document_helper_client_qt.cpp
index acf2ef7e0..a82c68e54 100644
--- a/src/core/printing/pdf_document_helper_client_qt.cpp
+++ b/src/core/printing/pdf_document_helper_client_qt.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2022 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
+// Qt-Security score:significant reason:default
// based on chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc:
diff --git a/src/core/printing/pdf_document_helper_client_qt.h b/src/core/printing/pdf_document_helper_client_qt.h
index 3c848dfe3..1bfdc1db0 100644
--- a/src/core/printing/pdf_document_helper_client_qt.h
+++ b/src/core/printing/pdf_document_helper_client_qt.h
@@ -1,5 +1,6 @@
// Copyright (C) 2022 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
+// Qt-Security score:significant reason:default
#ifndef PDF_DOCUMENT_HELPER_CLIENT_QT_H
#define PDF_DOCUMENT_HELPER_CLIENT_QT_H
diff --git a/src/core/printing/pdf_stream_delegate_qt.cpp b/src/core/printing/pdf_stream_delegate_qt.cpp
index bb82c3302..352a7bdd4 100644
--- a/src/core/printing/pdf_stream_delegate_qt.cpp
+++ b/src/core/printing/pdf_stream_delegate_qt.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2022 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
+// Qt-Security score:significant reason:default
// based on chrome/browser/pdf/chrome_pdf_stream_delegate.cc:
diff --git a/src/core/printing/pdf_stream_delegate_qt.h b/src/core/printing/pdf_stream_delegate_qt.h
index 61ceed777..42271aba3 100644
--- a/src/core/printing/pdf_stream_delegate_qt.h
+++ b/src/core/printing/pdf_stream_delegate_qt.h
@@ -1,5 +1,6 @@
// Copyright (C) 2022 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
+// Qt-Security score:significant reason:default
#ifndef PDF_STREAM_DELEGATE_QT_H
#define PDF_STREAM_DELEGATE_QT_H
diff --git a/src/core/printing/pdfium_document_wrapper_qt.cpp b/src/core/printing/pdfium_document_wrapper_qt.cpp
index 56588620d..a9a79140f 100644
--- a/src/core/printing/pdfium_document_wrapper_qt.cpp
+++ b/src/core/printing/pdfium_document_wrapper_qt.cpp
@@ -1,5 +1,6 @@
// 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
+// Qt-Security score:significant reason:default
#include "pdfium_document_wrapper_qt.h"
#include <QtCore/qhash.h>
diff --git a/src/core/printing/pdfium_document_wrapper_qt.h b/src/core/printing/pdfium_document_wrapper_qt.h
index feb34e36a..e390acc48 100644
--- a/src/core/printing/pdfium_document_wrapper_qt.h
+++ b/src/core/printing/pdfium_document_wrapper_qt.h
@@ -1,5 +1,6 @@
// 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
+// Qt-Security score:significant reason:default
//
// W A R N I N G
diff --git a/src/core/printing/print_view_manager_base_qt.cpp b/src/core/printing/print_view_manager_base_qt.cpp
index f36767aac..54ca48d70 100644
--- a/src/core/printing/print_view_manager_base_qt.cpp
+++ b/src/core/printing/print_view_manager_base_qt.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 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
+// Qt-Security score:significant reason:default
// This is based on chrome/browser/printing/print_view_manager_base.cc:
// Copyright 2013 The Chromium Authors. All rights reserved.
diff --git a/src/core/printing/print_view_manager_base_qt.h b/src/core/printing/print_view_manager_base_qt.h
index f2d4149ab..57cb24bf1 100644
--- a/src/core/printing/print_view_manager_base_qt.h
+++ b/src/core/printing/print_view_manager_base_qt.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 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
+// Qt-Security score:significant reason:default
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
diff --git a/src/core/printing/print_view_manager_qt.cpp b/src/core/printing/print_view_manager_qt.cpp
index 364253887..fd6539d95 100644
--- a/src/core/printing/print_view_manager_qt.cpp
+++ b/src/core/printing/print_view_manager_qt.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2016 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
+// Qt-Security score:significant reason:default
// Loosely based on print_view_manager.cc and print_preview_message_handler.cc
// Copyright 2013 The Chromium Authors. All rights reserved.
diff --git a/src/core/printing/print_view_manager_qt.h b/src/core/printing/print_view_manager_qt.h
index 6d90e1061..1e4a65790 100644
--- a/src/core/printing/print_view_manager_qt.h
+++ b/src/core/printing/print_view_manager_qt.h
@@ -1,5 +1,6 @@
// Copyright (C) 2016 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
+// Qt-Security score:significant reason:default
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
diff --git a/src/core/printing/printer_worker.cpp b/src/core/printing/printer_worker.cpp
index 64c30ac2d..3d1c1f4ec 100644
--- a/src/core/printing/printer_worker.cpp
+++ b/src/core/printing/printer_worker.cpp
@@ -1,5 +1,6 @@
// Copyright (C) 2018 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
+// Qt-Security score:significant reason:default
#include "printer_worker.h"
diff --git a/src/core/printing/printer_worker.h b/src/core/printing/printer_worker.h
index 0d2454fa0..e4d4ead99 100644
--- a/src/core/printing/printer_worker.h
+++ b/src/core/printing/printer_worker.h
@@ -1,5 +1,6 @@
// Copyright (C) 2022 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
+// Qt-Security score:significant reason:default
//
// W A R N I N G
diff --git a/src/core/tools/qwebengine_convert_dict/main.cpp b/src/core/tools/qwebengine_convert_dict/main.cpp
index 3264e4c13..5978b0a11 100644
--- a/src/core/tools/qwebengine_convert_dict/main.cpp
+++ b/src/core/tools/qwebengine_convert_dict/main.cpp
@@ -8,6 +8,7 @@
** Copyright (C) 2016 The Qt Company Ltd.
**
** SPDX-License-Identifier: BSD-3-Clause
+** Qt-Security score:critical reason:data-parser
**
** This tool converts Hunspell .aff/.dic pairs to a combined binary dictionary
** format (.bdic). This format is more compact, and can be more efficiently
diff --git a/src/webenginequick/api/qquickwebengineforeigntypes_p.h b/src/webenginequick/api/qquickwebengineforeigntypes_p.h
index 72f6d05d6..c2892d33c 100644
--- a/src/webenginequick/api/qquickwebengineforeigntypes_p.h
+++ b/src/webenginequick/api/qquickwebengineforeigntypes_p.h
@@ -34,6 +34,12 @@
#include <QtWebEngineCore/qwebenginewebauthuxrequest.h>
#include <QtWebEngineCore/qwebenginepermission.h>
#include <QtWebEngineCore/qwebenginedesktopmediarequest.h>
+#include <QtWebEngineCore/qwebengineclienthints.h>
+
+#if QT_CONFIG(webengine_extensions)
+#include <QtWebEngineCore/qwebengineextensioninfo.h>
+#include <QtWebEngineCore/qwebengineextensionmanager.h>
+#endif
QT_BEGIN_NAMESPACE
@@ -274,6 +280,34 @@ struct ForeignWebEngineDesktopMediaRequest
QML_ADDED_IN_VERSION(6, 10)
};
+struct ForeignWebEngineClientHints : public QObject
+{
+ Q_OBJECT
+ QML_FOREIGN(QWebEngineClientHints)
+ QML_NAMED_ELEMENT(WebEngineClientHints)
+ QML_ADDED_IN_VERSION(6, 8)
+ QML_UNCREATABLE("")
+};
+
+#if QT_CONFIG(webengine_extensions)
+struct ForeignWebEngineExtensionInfo
+{
+ Q_GADGET
+ QML_VALUE_TYPE(webEngineExtension)
+ QML_FOREIGN(QWebEngineExtensionInfo)
+ QML_ADDED_IN_VERSION(6, 10)
+};
+
+struct ForeignWebEngineExtensionManager
+{
+ Q_GADGET
+ QML_NAMED_ELEMENT(WebEngineExtensionManager)
+ QML_FOREIGN(QWebEngineExtensionManager)
+ QML_ADDED_IN_VERSION(6, 10)
+ QML_UNCREATABLE("")
+};
+#endif
+
QT_END_NAMESPACE
#endif // QQUICKWEBENGINEFOREIGNTYPES_H
diff --git a/src/webenginequick/api/qquickwebenginescriptcollection.cpp b/src/webenginequick/api/qquickwebenginescriptcollection.cpp
index 09a8d181e..546633fb1 100644
--- a/src/webenginequick/api/qquickwebenginescriptcollection.cpp
+++ b/src/webenginequick/api/qquickwebenginescriptcollection.cpp
@@ -59,7 +59,7 @@
webEngineView.userScripts.insert(list)
\endcode
\endlist
- \sa WebEngineScript WebEngineScriptCollection
+ \sa webEngineScript WebEngineScriptCollection
*/
@@ -115,7 +115,7 @@ QQuickWebEngineScriptCollection::QQuickWebEngineScriptCollection(QQuickWebEngine
QQuickWebEngineScriptCollection::~QQuickWebEngineScriptCollection() { }
/*!
- \qmlmethod bool WebEngineScriptCollection::contains(WebEngineScript script)
+ \qmlmethod bool WebEngineScriptCollection::contains(webEngineScript script)
\since QtWebEngine 6.2
Returns \c true if the specified \a script is in the collection, \c false
otherwise.
@@ -128,7 +128,7 @@ bool QQuickWebEngineScriptCollection::contains(const QWebEngineScript &value) co
}
/*!
- \qmlmethod list<WebEngineScript> WebEngineScriptCollection::find(string name)
+ \qmlmethod list<webEngineScript> WebEngineScriptCollection::find(string name)
\since QtWebEngine 6.2
Returns a list of all user script objects with the given \a name.
\sa contains()
@@ -139,7 +139,7 @@ QList<QWebEngineScript> QQuickWebEngineScriptCollection::find(const QString &nam
}
/*!
- \qmlmethod void WebEngineScriptCollection::insert(WebEngineScript script)
+ \qmlmethod void WebEngineScriptCollection::insert(webEngineScript script)
\since QtWebEngine 6.2
Inserts a single \a script into the collection.
\sa remove()
@@ -150,9 +150,9 @@ void QQuickWebEngineScriptCollection::insert(const QWebEngineScript &s)
}
/*!
- \qmlmethod void WebEngineScriptCollection::insert(list<WebEngineScript> list)
+ \qmlmethod void WebEngineScriptCollection::insert(list<webEngineScript> list)
\since QtWebEngine 6.2
- Inserts a \a list of WebEngineScript values into the user script collection.
+ Inserts a \a list of webEngineScript values into the user script collection.
\sa remove()
*/
void QQuickWebEngineScriptCollection::insert(const QList<QWebEngineScript> &list)
@@ -161,7 +161,7 @@ void QQuickWebEngineScriptCollection::insert(const QList<QWebEngineScript> &list
}
/*!
- \qmlmethod bool WebEngineScriptCollection::remove(WebEngineScript script)
+ \qmlmethod bool WebEngineScriptCollection::remove(webEngineScript script)
\since QtWebEngine 6.2
Returns \c true if a given \a script is removed from the collection.
\sa insert()
@@ -182,11 +182,11 @@ void QQuickWebEngineScriptCollection::clear()
}
/*!
- \qmlproperty list<WebEngineScript> WebEngineScriptCollection::collection
+ \qmlproperty list<webEngineScript> WebEngineScriptCollection::collection
\since QtWebEngine 6.2
This property holds a JavaScript array of user script objects. The array can
- take WebEngineScript basic type or a JavaScript dictionary as values.
+ take webEngineScript basic type or a JavaScript dictionary as values.
*/
QJSValue QQuickWebEngineScriptCollection::collection() const
{
diff --git a/tests/auto/core/qwebengineurlrequestjob/tst_qwebengineurlrequestjob.cpp b/tests/auto/core/qwebengineurlrequestjob/tst_qwebengineurlrequestjob.cpp
index 8552ba441..b4d419a3f 100644
--- a/tests/auto/core/qwebengineurlrequestjob/tst_qwebengineurlrequestjob.cpp
+++ b/tests/auto/core/qwebengineurlrequestjob/tst_qwebengineurlrequestjob.cpp
@@ -114,8 +114,8 @@ public:
QBuffer *buf = new QBuffer(job);
QVERIFY2(buf->open(QBuffer::ReadWrite), qPrintable(buf->errorString()));
buf->write(requestBody);
- job->reply(QByteArrayLiteral("text/plain"), buf);
buf->close();
+ job->reply(QByteArrayLiteral("text/plain"), buf);
}
static void registerUrlScheme()
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 2654b8b93..6df52dc61 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -92,6 +92,11 @@ static void removeRecursive(const QString& dirname)
QDir().rmdir(dirname);
}
+bool fuzzyEqual(float a, float b, float epsilon = 1e-4f)
+{
+ return std::fabs(a - b) <= epsilon;
+}
+
struct TestBasePage : QWebEnginePage
{
explicit TestBasePage(QWebEngineProfile *profile, QObject *parent = nullptr) : QWebEnginePage(profile, parent) { }
@@ -2584,13 +2589,16 @@ void tst_QWebEnginePage::scrollPosition()
// try to set the scroll offset programmatically
view.page()->runJavaScript("window.scrollTo(23, 29);");
- QTRY_COMPARE(view.page()->scrollPosition().x(), 23);
- QCOMPARE(view.page()->scrollPosition().y(), 29);
+ double dpr = view.windowHandle()->devicePixelRatio();
+ float expectedX = qFloor(23 * dpr) / dpr;
+ float expectedY = qFloor(29 * dpr) / dpr;
+ QTRY_VERIFY(fuzzyEqual(view.page()->scrollPosition().x(), expectedX));
+ QVERIFY(fuzzyEqual(view.page()->scrollPosition().y(), expectedY));
- int x = evaluateJavaScriptSync(view.page(), "window.scrollX").toInt();
- int y = evaluateJavaScriptSync(view.page(), "window.scrollY").toInt();
- QCOMPARE(x, 23);
- QCOMPARE(y, 29);
+ float x = evaluateJavaScriptSync(view.page(), "window.scrollX").toFloat();
+ float y = evaluateJavaScriptSync(view.page(), "window.scrollY").toFloat();
+ QVERIFY(fuzzyEqual(x, expectedX));
+ QVERIFY(fuzzyEqual(y, expectedY));
}
void tst_QWebEnginePage::scrollbarsOff()
@@ -3319,6 +3327,7 @@ void tst_QWebEnginePage::mouseMovementProperties()
view.resize(640, 480);
QTest::mouseMove(&view, QPoint(10, 10));
view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
view.window()->windowHandle()->requestActivate();
QVERIFY(QTest::qWaitForWindowActive(&view));