From ec7016de004ec03f6410b6eae9221d0c0775577a Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Wed, 19 Mar 2025 14:26:42 +0100
Subject: [PATCH 001/100] Add auto tests for the extension manager API

Test QWebEngineExtension and QWebEngineExtenisonManager APIs.

Task-number: QTBUG-61676
Change-Id: Ib697bdca2ec1d7f9e86ab9ea88e210dfeb2e1780
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 242b37218c382e2bdc73347c0aff5d6dd68ce9bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 REUSE.toml                                    |   1 +
 src/core/api/qwebengineextensioninfo.cpp      |   3 +-
 .../unpacked_extension_installer.cpp          |  52 ++-
 tests/auto/widgets/CMakeLists.txt             |   3 +
 tests/auto/widgets/extensions/CMakeLists.txt  |  23 ++
 .../resources/action_popup_ext/manifest.json  |   8 +
 .../action_popup_ext/popup_page.html          |   5 +
 .../content_script_ext/manifest.json          |  15 +
 .../resources/content_script_ext/script.js    |   4 +
 .../widgets/extensions/resources/index.html   |   5 +
 .../invalid_manifest_ext/manifest.json        |   5 +
 .../resources/invalid_manifest_ext_packed.zip | Bin 0 -> 229 bytes
 .../extensions/resources/packed_ext.zip       | Bin 0 -> 230 bytes
 .../resources/unpacked_ext/manifest.json      |   5 +
 .../extensions/tst_qwebengineextension.cpp    | 360 ++++++++++++++++++
 15 files changed, 487 insertions(+), 2 deletions(-)
 create mode 100644 tests/auto/widgets/extensions/CMakeLists.txt
 create mode 100644 tests/auto/widgets/extensions/resources/action_popup_ext/manifest.json
 create mode 100644 tests/auto/widgets/extensions/resources/action_popup_ext/popup_page.html
 create mode 100644 tests/auto/widgets/extensions/resources/content_script_ext/manifest.json
 create mode 100644 tests/auto/widgets/extensions/resources/content_script_ext/script.js
 create mode 100644 tests/auto/widgets/extensions/resources/index.html
 create mode 100644 tests/auto/widgets/extensions/resources/invalid_manifest_ext/manifest.json
 create mode 100644 tests/auto/widgets/extensions/resources/invalid_manifest_ext_packed.zip
 create mode 100644 tests/auto/widgets/extensions/resources/packed_ext.zip
 create mode 100644 tests/auto/widgets/extensions/resources/unpacked_ext/manifest.json
 create mode 100644 tests/auto/widgets/extensions/tst_qwebengineextension.cpp

diff --git a/REUSE.toml b/REUSE.toml
index 386f0741fc3..d7733c639e2 100644
--- a/REUSE.toml
+++ b/REUSE.toml
@@ -54,6 +54,7 @@ path = ["tests/auto/widgets/qwebenginepage/resources/*",
         "tests/auto/quick/qquickwebenginedefaultsurfaceformat/html/basic_page.html",
         "tests/auto/quick/qtbug-70248/test.qml",
         "tests/auto/widgets/defaultsurfaceformat/resources/index.html",
+        "tests/auto/widgets/extensions/resources/**",
         "tests/auto/widgets/offscreen/test.html",
         "tests/auto/widgets/printing/resources/basic_printing_page.html",
         "tests/auto/widgets/proxypac/proxy.pac",
diff --git a/src/core/api/qwebengineextensioninfo.cpp b/src/core/api/qwebengineextensioninfo.cpp
index 33af3d3cc33..6ea24d658d6 100644
--- a/src/core/api/qwebengineextensioninfo.cpp
+++ b/src/core/api/qwebengineextensioninfo.cpp
@@ -5,6 +5,7 @@
 #include "qwebengineextensioninfo_p.h"
 
 #if QT_CONFIG(webengine_extensions)
+#include <QtCore/qdir.h>
 #include <QtCore/qfileinfo.h>
 
 #include "extensions/extension_manager.h"
@@ -87,7 +88,7 @@ bool QWebEngineExtensionInfoPrivate::isLoaded() const
 
 bool QWebEngineExtensionInfoPrivate::isInstalled() const
 {
-    return QFileInfo(m_data.path).path() == m_manager->installDirectory();
+    return QFileInfo(m_data.path).dir() == QDir(m_manager->installDirectory());
 }
 
 QWebEngineExtensionInfo::QWebEngineExtensionInfo() : d_ptr(nullptr) { }
diff --git a/src/core/extensions/unpacked_extension_installer.cpp b/src/core/extensions/unpacked_extension_installer.cpp
index 9a5eeafdc4f..fc4a40e63db 100644
--- a/src/core/extensions/unpacked_extension_installer.cpp
+++ b/src/core/extensions/unpacked_extension_installer.cpp
@@ -4,8 +4,58 @@
 #include "unpacked_extension_installer.h"
 
 #include "base/files/file_util.h"
+#include "base/rand_util.h"
+#include "base/threading/scoped_blocking_call.h"
+
+#include <algorithm>
+#include <random>
 
 namespace QtWebEngineCore {
+namespace {
+static constexpr const char *kCharSet =
+        "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+std::string generateRandomString(size_t length)
+{
+    std::string str = std::string(kCharSet);
+
+    while (length > str.length())
+        str += str;
+
+    auto rng = std::default_random_engine{};
+    std::shuffle(str.begin(), str.end(), rng);
+    return str.substr(0, length);
+}
+
+bool generateDirNameOnFileThread(const base::FilePath &baseDir,
+                                 base::FilePath::StringPieceType prefix, base::FilePath *out)
+{
+    base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::MAY_BLOCK);
+    base::FilePath outPath;
+
+    for (int count = 0; count < 50; ++count) {
+        base::FilePath::StringType newName;
+        newName.assign(prefix);
+#if BUILDFLAG(IS_WIN)
+        // based on 'CreateTemporaryDirInDir' in chromium/base/file_util_win.cc
+        newName.append(base::AsWString(base::NumberToString16(base::GetCurrentProcId())));
+        newName.push_back('_');
+        newName.append(base::AsWString(
+                base::NumberToString16(base::RandInt(0, std::numeric_limits<int32_t>::max()))));
+#else
+        // based on 'CreateTemporaryDirInDir' in chromium/base/file_util_posix.cc
+        newName.append(generateRandomString(6));
+#endif
+        outPath = baseDir.Append(newName);
+        if (!base::PathExists(outPath)) {
+            *out = outPath;
+            return true;
+        }
+    }
+    return false;
+}
+} // namespace
+
 UnpackedExtensionInstaller::UnpackedExtensionInstaller(
         const scoped_refptr<base::SequencedTaskRunner> &taskRunner, DoneCallback doneCallback)
     : m_taskRunner(taskRunner), m_doneCallback(std::move(doneCallback))
@@ -38,7 +88,7 @@ UnpackedExtensionInstaller::installUnpackedExtensionOnFileThread(const base::Fil
     // mktemp() logic to match the output format of the zip installer.
     base::FilePath extensionInstallPath;
     base::FilePath::StringType dirName = src.BaseName().value() + FILE_PATH_LITERAL("_");
-    if (!base::CreateTemporaryDirInDir(installDir, dirName, &extensionInstallPath)) {
+    if (!generateDirNameOnFileThread(installDir, dirName, &extensionInstallPath)) {
         installInfo.error = "Failed to create install directory for extension";
         return installInfo;
     }
diff --git a/tests/auto/widgets/CMakeLists.txt b/tests/auto/widgets/CMakeLists.txt
index dbf409385c9..e31ff217018 100644
--- a/tests/auto/widgets/CMakeLists.txt
+++ b/tests/auto/widgets/CMakeLists.txt
@@ -31,3 +31,6 @@ endif()
 if(QT_FEATURE_webengine_spellchecker AND NOT CMAKE_CROSSCOMPILING AND NOT QT_FEATURE_webengine_native_spellchecker)
     add_subdirectory(spellchecking)
 endif()
+if(QT_FEATURE_webengine_extensions)
+    add_subdirectory(extensions)
+endif()
diff --git a/tests/auto/widgets/extensions/CMakeLists.txt b/tests/auto/widgets/extensions/CMakeLists.txt
new file mode 100644
index 00000000000..4c99fa623a4
--- /dev/null
+++ b/tests/auto/widgets/extensions/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+include(../../util/util.cmake)
+
+qt_internal_add_test(tst_qwebengineextension
+    SOURCES
+        tst_qwebengineextension.cpp
+    LIBRARIES
+        Qt::WebEngineWidgets
+        Test::Util
+)
+
+set(tst_qwebengineextension_resource_files
+    "resources/index.html"
+)
+
+qt_internal_add_resource(tst_qwebengineextension "tst_qwebengineextension"
+    PREFIX
+        "/"
+    FILES
+        ${tst_qwebengineextension_resource_files}
+)
diff --git a/tests/auto/widgets/extensions/resources/action_popup_ext/manifest.json b/tests/auto/widgets/extensions/resources/action_popup_ext/manifest.json
new file mode 100644
index 00000000000..ffdba8b14f5
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/action_popup_ext/manifest.json
@@ -0,0 +1,8 @@
+{
+    "name": "Extension",
+    "version": "1.0",
+    "manifest_version": 3,
+    "action": {
+        "default_popup": "popup_page.html"
+    }
+}
diff --git a/tests/auto/widgets/extensions/resources/action_popup_ext/popup_page.html b/tests/auto/widgets/extensions/resources/action_popup_ext/popup_page.html
new file mode 100644
index 00000000000..dfe8c3577dd
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/action_popup_ext/popup_page.html
@@ -0,0 +1,5 @@
+<html>
+  <body>
+    Popup page
+  </body>
+</html>
diff --git a/tests/auto/widgets/extensions/resources/content_script_ext/manifest.json b/tests/auto/widgets/extensions/resources/content_script_ext/manifest.json
new file mode 100644
index 00000000000..9c20c27a423
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/content_script_ext/manifest.json
@@ -0,0 +1,15 @@
+{
+    "name": "content script",
+    "version": "1.0",
+    "manifest_version": 3,
+    "content_scripts": [
+        {
+            "js": [
+                "script.js"
+            ],
+            "matches": [
+                "<all_urls>"
+            ]
+        }
+    ]
+}
diff --git a/tests/auto/widgets/extensions/resources/content_script_ext/script.js b/tests/auto/widgets/extensions/resources/content_script_ext/script.js
new file mode 100644
index 00000000000..b7b2abd42b2
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/content_script_ext/script.js
@@ -0,0 +1,4 @@
+let testNode = document.createElement("div")
+testNode.innerText = "Hello"
+testNode.id = "testNode"
+document.body.appendChild(testNode)
diff --git a/tests/auto/widgets/extensions/resources/index.html b/tests/auto/widgets/extensions/resources/index.html
new file mode 100644
index 00000000000..d1d41176c92
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/index.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+  <body>
+  </body>
+</html>
diff --git a/tests/auto/widgets/extensions/resources/invalid_manifest_ext/manifest.json b/tests/auto/widgets/extensions/resources/invalid_manifest_ext/manifest.json
new file mode 100644
index 00000000000..5cb976c79be
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/invalid_manifest_ext/manifest.json
@@ -0,0 +1,5 @@
+{
+    "name": "manifest v2",
+    "version": "1.0",
+    "manifest_version": 2
+}
diff --git a/tests/auto/widgets/extensions/resources/invalid_manifest_ext_packed.zip b/tests/auto/widgets/extensions/resources/invalid_manifest_ext_packed.zip
new file mode 100644
index 0000000000000000000000000000000000000000..c64866b03706d2f5ef969db26cba1330d9718307
GIT binary patch
diff --git a/tests/auto/widgets/extensions/resources/packed_ext.zip b/tests/auto/widgets/extensions/resources/packed_ext.zip
new file mode 100644
index 0000000000000000000000000000000000000000..63e0cee23fba73192b8546b1916a0a9ee198e1d0
GIT binary patch
diff --git a/tests/auto/widgets/extensions/resources/unpacked_ext/manifest.json b/tests/auto/widgets/extensions/resources/unpacked_ext/manifest.json
new file mode 100644
index 00000000000..09f8bbace17
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/unpacked_ext/manifest.json
@@ -0,0 +1,5 @@
+{
+    "name": "Extension",
+    "version": "1.0",
+    "manifest_version": 3
+}
diff --git a/tests/auto/widgets/extensions/tst_qwebengineextension.cpp b/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
new file mode 100644
index 00000000000..0027c95f9e1
--- /dev/null
+++ b/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
@@ -0,0 +1,360 @@
+// Copyright (C) 2025 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include <util.h>
+#include <QtTest/QtTest>
+#include <QTemporaryDir>
+#include <QtWebEngineCore/qwebengineprofile.h>
+#include <QtWebEngineCore/qwebenginepage.h>
+#include <QtWebEngineCore/qwebenginedownloadrequest.h>
+#include <QtWebEngineCore/qwebengineextensionmanager.h>
+#include <QtWebEngineCore/qwebengineextensioninfo.h>
+#include <QtWebEngineWidgets/qwebengineview.h>
+#include <QtWebEngineCore/qwebengineprofilebuilder.h>
+
+#include <QDir>
+
+using namespace Qt::StringLiterals;
+
+class tst_QWebEngineExtension : public QObject
+{
+    Q_OBJECT
+
+public Q_SLOTS:
+    void cleanup();
+    void cleanupTestCase();
+    void init();
+    void initTestCase();
+
+private Q_SLOTS:
+    void installExtension();
+    void uninstallExtension();
+    void loadExtension();
+    void unloadExtension();
+    void extensionSetEnabled();
+    void reloadExtension();
+    void installFailures();
+    void uninstallOutsideFromProfileDir();
+    void loadFailures();
+    void actionPopupUrl();
+    void loadInIncognito();
+    void installInIncognito();
+    void loadInstalledExtensions();
+
+private:
+    int installedFiles();
+    int extensionCount();
+    QWebEngineExtensionInfo loadExtensionSync(const QString &path);
+    void unloadExtensionSync(const QWebEngineExtensionInfo &extension);
+    QWebEngineExtensionInfo installExtensionSync(const QString &path);
+    void uninstallExtensionSync(const QWebEngineExtensionInfo &extension);
+    QString resourcesPath();
+    QDir extensionsInstallDir();
+
+    QWebEnginePage *m_page;
+    QWebEngineProfile *m_profile;
+    QWebEngineExtensionManager *m_manager;
+    QString m_resourcesPath;
+};
+
+int tst_QWebEngineExtension::installedFiles()
+{
+    return QDir(m_manager->installDirectory())
+            .entryInfoList(QDir::AllEntries | QDir::NoDot | QDir::NoDotDot)
+            .size();
+}
+
+int tst_QWebEngineExtension::extensionCount()
+{
+    return m_manager->extensions().size();
+}
+
+QWebEngineExtensionInfo tst_QWebEngineExtension::loadExtensionSync(const QString &path)
+{
+    QSignalSpy spy(m_manager, SIGNAL(extensionLoadFinished(QWebEngineExtensionInfo)));
+    m_manager->loadExtension(path);
+    spy.wait();
+    if (spy.size() != 1) {
+        qWarning("Did not receive loadFinished signal!");
+        return {};
+    }
+    return spy.takeFirst().at(0).value<QWebEngineExtensionInfo>();
+}
+
+void tst_QWebEngineExtension::unloadExtensionSync(const QWebEngineExtensionInfo &extension)
+{
+    QSignalSpy spy(m_manager, SIGNAL(extensionUnloadFinished(QWebEngineExtensionInfo)));
+    m_manager->unloadExtension(extension);
+    QTRY_COMPARE(spy.size(), 1);
+}
+
+QWebEngineExtensionInfo tst_QWebEngineExtension::installExtensionSync(const QString &path)
+{
+    QSignalSpy spy(m_manager, SIGNAL(extensionInstallFinished(QWebEngineExtensionInfo)));
+    m_manager->installExtension(path);
+    spy.wait();
+    if (spy.size() != 1) {
+        qWarning("Did not receive installFinished signal!");
+        return {};
+    }
+    return spy.takeFirst().at(0).value<QWebEngineExtensionInfo>();
+}
+
+void tst_QWebEngineExtension::uninstallExtensionSync(const QWebEngineExtensionInfo &extension)
+{
+    QSignalSpy spy(m_manager, SIGNAL(extensionUninstallFinished(QWebEngineExtensionInfo)));
+    m_manager->uninstallExtension(extension);
+    QTRY_COMPARE(spy.size(), 1);
+}
+
+QString tst_QWebEngineExtension::resourcesPath()
+{
+    return m_resourcesPath;
+}
+
+QDir tst_QWebEngineExtension::extensionsInstallDir()
+{
+    QString path = m_manager->installDirectory();
+    return QDir(path);
+}
+
+void tst_QWebEngineExtension::cleanup()
+{
+    QVERIFY(QDir(m_manager->installDirectory()).removeRecursively());
+    QCOMPARE(installedFiles(), 0);
+    for (auto extension : m_manager->extensions())
+        m_manager->unloadExtension(extension);
+}
+
+void tst_QWebEngineExtension::cleanupTestCase()
+{
+    delete m_page;
+}
+
+void tst_QWebEngineExtension::init() { }
+
+void tst_QWebEngineExtension::initTestCase()
+{
+    QTemporaryDir tempDir(QDir::tempPath() + u"tst_QWebEngineExtension-XXXXXX");
+    QWebEngineProfileBuilder profileBuilder;
+    profileBuilder.setPersistentStoragePath(tempDir.path());
+    m_profile = profileBuilder.createProfile("Test");
+    m_page = new QWebEnginePage(m_profile);
+    m_manager = m_profile->extensionManager();
+
+    m_resourcesPath = QDir(QT_TESTCASE_SOURCEDIR).canonicalPath()
+            + u"/resources/"_s;
+}
+
+void tst_QWebEngineExtension::installExtension()
+{
+    int lastExtensionCount = extensionCount();
+    QWebEngineExtensionInfo packedExtension =
+            installExtensionSync(resourcesPath() + u"packed_ext.zip");
+    QVERIFY2(packedExtension.isLoaded(), qPrintable(packedExtension.error()));
+    QVERIFY2(packedExtension.isInstalled(), qPrintable(packedExtension.error()));
+    QCOMPARE(installedFiles(), 1);
+    QCOMPARE(extensionCount(), ++lastExtensionCount);
+
+    QWebEngineExtensionInfo unpackedExtension =
+            installExtensionSync(resourcesPath() + u"unpacked_ext");
+    QVERIFY2(unpackedExtension.isLoaded(), qPrintable(unpackedExtension.error()));
+    QVERIFY2(unpackedExtension.isInstalled(), qPrintable(unpackedExtension.error()));
+    QCOMPARE(installedFiles(), 2);
+    QCOMPARE(extensionCount(), ++lastExtensionCount);
+}
+
+void tst_QWebEngineExtension::uninstallExtension()
+{
+    QCOMPARE(installedFiles(), 0);
+    int lastExtensionCount = extensionCount();
+    QWebEngineExtensionInfo packedExtension =
+            installExtensionSync(resourcesPath() + u"packed_ext.zip");
+    uninstallExtensionSync(packedExtension);
+    QCOMPARE(installedFiles(), 0);
+    QCOMPARE(extensionCount(), lastExtensionCount);
+
+    QWebEngineExtensionInfo unpackedExtension =
+            installExtensionSync(resourcesPath() + u"unpacked_ext");
+    uninstallExtensionSync(unpackedExtension);
+    QCOMPARE(installedFiles(), 0);
+    QCOMPARE(extensionCount(), lastExtensionCount);
+}
+
+void tst_QWebEngineExtension::loadExtension()
+{
+    int lastExtensionCount = extensionCount();
+    QWebEngineExtensionInfo extension = loadExtensionSync(resourcesPath() + u"unpacked_ext");
+    QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
+    QVERIFY(!extension.isInstalled());
+    QCOMPARE(extensionCount(), ++lastExtensionCount);
+    QCOMPARE(installedFiles(), 0);
+}
+
+void tst_QWebEngineExtension::unloadExtension()
+{
+    int lastExtensionCount = extensionCount();
+    QWebEngineExtensionInfo extension = loadExtensionSync(resourcesPath() + u"unpacked_ext");
+    QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
+    unloadExtensionSync(extension);
+    QCOMPARE(extensionCount(), lastExtensionCount);
+}
+
+void tst_QWebEngineExtension::reloadExtension()
+{
+    QString path = resourcesPath() + u"unpacked_ext";
+    int lastExtensionCount = extensionCount();
+    QWebEngineExtensionInfo extension = loadExtensionSync(path);
+    QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
+    QCOMPARE(extensionCount(), ++lastExtensionCount);
+    extension = loadExtensionSync(path);
+    QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
+    // Loading from the same path acts as a reload
+    QCOMPARE(extensionCount(), lastExtensionCount);
+}
+
+void tst_QWebEngineExtension::extensionSetEnabled()
+{
+    QString contentScript = resourcesPath() + u"content_script_ext";
+    QWebEngineExtensionInfo extension = loadExtensionSync(contentScript);
+    QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
+    QVERIFY(!extension.isEnabled());
+
+    QSignalSpy loadSpy(m_page, SIGNAL(loadFinished(bool)));
+    m_page->load(QUrl("qrc:///resources/index.html"));
+    QTRY_COMPARE(loadSpy.size(), 1);
+    QCOMPARE(evaluateJavaScriptSync(m_page, "document.body.childElementCount"), 0);
+    m_manager->setExtensionEnabled(extension, true);
+    QVERIFY(extension.isEnabled());
+    m_page->triggerAction(QWebEnginePage::Reload);
+    QTRY_COMPARE(loadSpy.size(), 2);
+    QCOMPARE(evaluateJavaScriptSync(m_page, "document.body.childElementCount"), 1);
+
+    m_manager->setExtensionEnabled(extension, false);
+    QVERIFY(!extension.isEnabled());
+    m_page->triggerAction(QWebEnginePage::Reload);
+    QTRY_COMPARE(loadSpy.size(), 3);
+    QCOMPARE(evaluateJavaScriptSync(m_page, "document.body.childElementCount"), 0);
+}
+
+void tst_QWebEngineExtension::installFailures()
+{
+    QCOMPARE(installedFiles(), 0);
+    QWebEngineExtensionInfo extension =
+            installExtensionSync(resourcesPath() + u"invalid_manifest_packed.zip");
+    QVERIFY(!extension.isLoaded());
+    QVERIFY(!extension.error().isEmpty());
+    QTRY_COMPARE(installedFiles(), 0);
+
+    extension = installExtensionSync(u"invalid_path"_s);
+    QVERIFY(!extension.isLoaded());
+    QVERIFY(!extension.error().isEmpty());
+    QTRY_COMPARE(installedFiles(), 0);
+
+    extension = installExtensionSync(resourcesPath() + u"non_existent.zip");
+    QVERIFY(!extension.isLoaded());
+    QVERIFY(!extension.error().isEmpty());
+    QTRY_COMPARE(installedFiles(), 0);
+
+    extension = installExtensionSync(resourcesPath() + u"invalid_manifest_ext");
+    QVERIFY(!extension.isLoaded());
+    QVERIFY(!extension.error().isEmpty());
+    QTRY_COMPARE(installedFiles(), 0);
+}
+
+void tst_QWebEngineExtension::uninstallOutsideFromProfileDir()
+{
+    QString path = resourcesPath() + u"unpacked_ext";
+    QVERIFY(QDir(path).exists());
+    QWebEngineExtensionInfo extension = loadExtensionSync(path);
+    QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
+    QVERIFY(extension.error().isEmpty());
+    QObject::connect(
+            m_manager, &QWebEngineExtensionManager::extensionUninstallFinished,
+            [](QWebEngineExtensionInfo extension) { QVERIFY(!extension.error().isEmpty()); });
+    uninstallExtensionSync(extension);
+    QVERIFY(QDir(path).exists());
+}
+
+void tst_QWebEngineExtension::loadFailures()
+{
+    int lastExtensionCount = extensionCount();
+    QWebEngineExtensionInfo extension = loadExtensionSync(u"invalid_path"_s);
+    QVERIFY(!extension.isLoaded());
+    QVERIFY(!extension.error().isEmpty());
+    QCOMPARE(extensionCount(), lastExtensionCount);
+
+    extension = loadExtensionSync(resourcesPath());
+    QVERIFY(!extension.isLoaded());
+    QVERIFY(!extension.error().isEmpty());
+    QCOMPARE(extensionCount(), lastExtensionCount);
+
+    extension = loadExtensionSync(resourcesPath() + u"invalud_manifest");
+    QVERIFY(!extension.isLoaded());
+    QVERIFY(!extension.error().isEmpty());
+    QCOMPARE(extensionCount(), lastExtensionCount);
+}
+
+void tst_QWebEngineExtension::actionPopupUrl()
+{
+    QWebEngineExtensionInfo extension = loadExtensionSync(resourcesPath() + u"unpacked_ext");
+    QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
+    QVERIFY(extension.actionPopupUrl().isEmpty());
+
+    extension = loadExtensionSync(resourcesPath() + u"action_popup_ext");
+    QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
+    QVERIFY(!extension.actionPopupUrl().isEmpty());
+}
+
+void tst_QWebEngineExtension::loadInIncognito()
+{
+    QWebEngineProfile profile;
+    QWebEnginePage page(&profile);
+    QWebEngineExtensionManager *manager = profile.extensionManager();
+    QSignalSpy spy(manager, SIGNAL(extensionLoadFinished(QWebEngineExtensionInfo)));
+    manager->loadExtension(resourcesPath() + u"content_script_ext");
+    QTRY_COMPARE(spy.size(), 1);
+    auto extension = spy.takeFirst().at(0).value<QWebEngineExtensionInfo>();
+    QVERIFY(!extension.isLoaded());
+    QVERIFY(!extension.error().isEmpty());
+}
+
+void tst_QWebEngineExtension::installInIncognito()
+{
+    QWebEngineProfile profile;
+    QWebEnginePage page(&profile);
+    QWebEngineExtensionManager *manager = profile.extensionManager();
+    QSignalSpy spy(manager, SIGNAL(extensionInstallFinished(QWebEngineExtensionInfo)));
+    manager->installExtension(resourcesPath() + u"packed_ext.zip");
+    QTRY_COMPARE(spy.size(), 1);
+    auto extension = spy.takeFirst().at(0).value<QWebEngineExtensionInfo>();
+    QVERIFY(!extension.isLoaded());
+    QVERIFY(!extension.isInstalled());
+    QVERIFY(!extension.error().isEmpty());
+}
+
+void tst_QWebEngineExtension::loadInstalledExtensions()
+{
+    QTemporaryDir tempDir;
+    QWebEngineProfileBuilder profileBuilder;
+    profileBuilder.setPersistentStoragePath(tempDir.path());
+    QWebEngineProfile *profile = profileBuilder.createProfile("Test");
+    QWebEngineExtensionManager *manager = profile->extensionManager();
+
+    QSignalSpy spy(manager, SIGNAL(extensionInstallFinished(QWebEngineExtensionInfo)));
+    manager->installExtension(resourcesPath() + u"packed_ext.zip");
+    QTRY_COMPARE(spy.size(), 1);
+    auto extension = spy.takeFirst().at(0).value<QWebEngineExtensionInfo>();
+    QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
+
+    int extensionCount = manager->extensions().size();
+
+    // recreate the profile to verify installed extensions are loaded at start
+    delete profile;
+    profile = profileBuilder.createProfile("Test");
+    auto manager2 = profile->extensionManager();
+    QTRY_COMPARE(manager2->extensions().size(), extensionCount);
+}
+
+QTEST_MAIN(tst_QWebEngineExtension)
+#include "tst_qwebengineextension.moc"

From 8bc191ff6e879cb01ae4f2a2fc719f5b9b3eed4e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 11 Sep 2024 08:04:23 -0700
Subject: [PATCH 002/100] Fix narrowing conversions seen on 32bit arm
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This issue is seen with clang-19 when compiling for arm32
make clang-19 happier with -Wc++11-narrowing

Fixes
native_skia_output_device_opengl.cpp:292:47: error: non-constant-expression cannot be narrowed from type '
   ↪ uint32_t' (aka 'unsigned int') to 'EGLAttrib' (aka 'int') in initializer list [-Wc++11-narrowing]
     292 |                 EGL_DMA_BUF_PLANE0_PITCH_EXT, nativePixmap->GetDmaBufPitch(0),

Pick-to: 6.9 6.8
Change-Id: I95ba1ab0a37218b6d05324df563efba6d5c39ba2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit f94d2a539c3189b086615749cfde65ca2058e04c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/compositor/native_skia_output_device_opengl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/compositor/native_skia_output_device_opengl.cpp b/src/core/compositor/native_skia_output_device_opengl.cpp
index 7cfc390d8a2..e72052512cb 100644
--- a/src/core/compositor/native_skia_output_device_opengl.cpp
+++ b/src/core/compositor/native_skia_output_device_opengl.cpp
@@ -248,7 +248,7 @@ QSGTexture *NativeSkiaOutputDeviceOpenGL::texture(QQuickWindow *win, uint32_t te
                 EGL_LINUX_DRM_FOURCC_EXT, drmFormat,
                 EGL_DMA_BUF_PLANE0_FD_EXT, scopedFd.get(),
                 EGL_DMA_BUF_PLANE0_OFFSET_EXT, static_cast<EGLAttrib>(nativePixmap->GetDmaBufOffset(0)),
-                EGL_DMA_BUF_PLANE0_PITCH_EXT, nativePixmap->GetDmaBufPitch(0),
+                EGL_DMA_BUF_PLANE0_PITCH_EXT, static_cast<EGLAttrib>(nativePixmap->GetDmaBufPitch(0)),
                 EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, static_cast<EGLAttrib>(modifier & 0xffffffff),
                 EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, static_cast<EGLAttrib>(modifier >> 32),
                 EGL_NONE

From d4afe521cc07009f070300025c1e225813192e3b Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Tue, 3 Jun 2025 15:39:59 +0200
Subject: [PATCH 003/100] Update Chromium

Submodule src/3rdparty c003ec64..059a95d6:
* [Backport] CVE-2025-5283: Use after free in libvpx
* [Backport] CVE-2025-5281: Inappropriate implementation in BFCache
* [Backport] CVE-2025-5280: Out of bounds write in V8
* [Backport] CVE-2025-5064: Inappropriate implementation in Background Fetch
* [Backport] CVE-2025-5065: Inappropriate implementation in FileSystemAccess API
* [Backport] CVE-2025-5063: Use after free in Compositing
* [Backport] Don't apply /*FALLTHROUGH*/ edit to gperf 3.2 output

Pick-to: 6.9
Change-Id: Ic5ec5af17ef9bbab2da77fbdb469318722b7a93e
Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
(cherry picked from commit 5dec931f91b4a923358841d6872f49567f910b87)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/3rdparty | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/3rdparty b/src/3rdparty
index c003ec6441d..059a95d6de7 160000
--- a/src/3rdparty
+++ b/src/3rdparty
@@ -1 +1 @@
-Subproject commit c003ec6441da9772b0f8508401a2c9b4834c5c8c
+Subproject commit 059a95d6de7aa67975c4f52ea48549e56f35c058

From 1dc81a71bc24176113ad37c6e4c08200c172a8c6 Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@qt.io>
Date: Tue, 3 Jun 2025 22:30:32 +0200
Subject: [PATCH 004/100] Normalize signal/slot signatures 2025

This is the result of running util/normalize on the code base. The
following manual edits were needed:

(none)

Pick-to: 6.9 6.8 6.5
Change-Id: Ia59174aaf154559f7445e13d059723a282f75aae
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 4a96df5e60aeff0bfd3f7aadea5a941d9abc90c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/api/qwebengineprofile.cpp            |  2 +-
 ...nder_widget_host_view_qt_delegate_item.cpp |  2 +-
 .../api/qquickwebengineprofile.cpp            |  2 +-
 .../doc/src/qtwebkitportingguide.qdoc         |  4 +--
 .../tst_qwebenginecookiestore.cpp             | 26 +++++++++----------
 .../qwebengineframe/tst_qwebengineframe.cpp   |  4 +--
 .../tst_qquickwebengineview.cpp               |  2 +-
 .../tst_qwebenginehistory.cpp                 |  4 +--
 .../tst_qwebengineprofile.cpp                 |  2 +-
 9 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/core/api/qwebengineprofile.cpp b/src/core/api/qwebengineprofile.cpp
index 6683d51c1d8..dbd629b3369 100644
--- a/src/core/api/qwebengineprofile.cpp
+++ b/src/core/api/qwebengineprofile.cpp
@@ -221,7 +221,7 @@ void QWebEngineProfilePrivate::downloadRequested(const DownloadItemInfo &info)
 {
     Q_Q(QWebEngineProfile);
 
-    if (!q->receivers(SIGNAL(downloadRequested(QWebEngineDownloadRequest *)))) {
+    if (!q->receivers(SIGNAL(downloadRequested(QWebEngineDownloadRequest*)))) {
         m_profileAdapter->acceptDownload(info.id, info.accepted, info.useDownloadTargetCallback, info.path,
                                          info.savePageFormat);
         return;
diff --git a/src/core/render_widget_host_view_qt_delegate_item.cpp b/src/core/render_widget_host_view_qt_delegate_item.cpp
index 0c38f0f7a02..e82dabb5fff 100644
--- a/src/core/render_widget_host_view_qt_delegate_item.cpp
+++ b/src/core/render_widget_host_view_qt_delegate_item.cpp
@@ -348,7 +348,7 @@ void RenderWidgetHostViewQtDelegateItem::itemChange(ItemChange change, const Ite
                             &RenderWidgetHostViewQtDelegateItem::releaseTextureResources,
                             Qt::DirectConnection));
             if (!m_isPopup)
-                m_windowConnections.append(connect(value.window, SIGNAL(closing(QQuickCloseEvent *)), SLOT(onHide())));
+                m_windowConnections.append(connect(value.window, SIGNAL(closing(QQuickCloseEvent*)), SLOT(onHide())));
         }
         m_client->visualPropertiesChanged();
     } else if (change == QQuickItem::ItemVisibleHasChanged) {
diff --git a/src/webenginequick/api/qquickwebengineprofile.cpp b/src/webenginequick/api/qquickwebengineprofile.cpp
index f3be4e6dff1..6aebc18a1a7 100644
--- a/src/webenginequick/api/qquickwebengineprofile.cpp
+++ b/src/webenginequick/api/qquickwebengineprofile.cpp
@@ -251,7 +251,7 @@ void QQuickWebEngineProfilePrivate::downloadRequested(const DownloadItemInfo &in
 {
     Q_Q(QQuickWebEngineProfile);
 
-    if (!q->receivers(SIGNAL(downloadRequested(QQuickWebEngineDownloadRequest *)))) {
+    if (!q->receivers(SIGNAL(downloadRequested(QQuickWebEngineDownloadRequest*)))) {
         m_profileAdapter->acceptDownload(info.id, info.accepted, info.useDownloadTargetCallback, info.path,
                                          info.savePageFormat);
         return;
diff --git a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
index 37b73c010cc..f3ac9fa555f 100644
--- a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
@@ -92,13 +92,13 @@
     \b {Qt \WebKit}
     \code
         QWebPage page;
-        connect(page.mainFrame(), SIGNAL(urlChanged(const QUrl&)), SLOT(mySlotName()));
+        connect(page.mainFrame(), SIGNAL(urlChanged(QUrl)), SLOT(mySlotName()));
         page.mainFrame()->load(url);
     \endcode
     \b {\QWE}
     \code
         QWebEnginePage page;
-        connect(&page, SIGNAL(urlChanged(const QUrl&)), SLOT(mySlotName()));
+        connect(&page, SIGNAL(urlChanged(QUrl)), SLOT(mySlotName()));
         page.load(url);
     \endcode
 
diff --git a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp b/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp
index a75002ae51c..e0db542c827 100644
--- a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp
+++ b/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp
@@ -79,8 +79,8 @@ void tst_QWebEngineCookieStore::cookieSignals()
     QWebEngineCookieStore *client = m_profile->cookieStore();
 
     QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
-    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(const QNetworkCookie &)));
-    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(const QNetworkCookie &)));
+    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(QNetworkCookie)));
+    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(QNetworkCookie)));
 
     page.load(QUrl("qrc:///resources/index.html"));
 
@@ -108,8 +108,8 @@ void tst_QWebEngineCookieStore::setAndDeleteCookie()
     QWebEngineCookieStore *client = m_profile->cookieStore();
 
     QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
-    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(const QNetworkCookie &)));
-    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(const QNetworkCookie &)));
+    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(QNetworkCookie)));
+    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(QNetworkCookie)));
 
     QNetworkCookie cookie1(QNetworkCookie::parseCookies(QByteArrayLiteral("khaos=I9GX8CWI; Domain=.example.com; Path=/docs")).first());
     QNetworkCookie cookie2(QNetworkCookie::parseCookies(QByteArrayLiteral("Test%20Cookie=foobar; domain=example.com; Path=/")).first());
@@ -155,8 +155,8 @@ void tst_QWebEngineCookieStore::setInvalidCookie()
     QWebEngineCookieStore *client = m_profile->cookieStore();
 
     QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
-    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(const QNetworkCookie &)));
-    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(const QNetworkCookie &)));
+    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(QNetworkCookie)));
+    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(QNetworkCookie)));
 
     QNetworkCookie goodCookie(
             QNetworkCookie::parseCookies(
@@ -186,8 +186,8 @@ void tst_QWebEngineCookieStore::batchCookieTasks()
     QWebEngineCookieStore *client = m_profile->cookieStore();
 
     QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
-    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(const QNetworkCookie &)));
-    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(const QNetworkCookie &)));
+    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(QNetworkCookie)));
+    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(QNetworkCookie)));
 
     QNetworkCookie cookie1(QNetworkCookie::parseCookies(QByteArrayLiteral("khaos=I9GX8CWI; Domain=.example.com; Path=/docs")).first());
     QNetworkCookie cookie2(QNetworkCookie::parseCookies(QByteArrayLiteral("Test%20Cookie=foobar; domain=example.com; Path=/")).first());
@@ -230,8 +230,8 @@ void tst_QWebEngineCookieStore::basicFilter()
     client->setCookieFilter([&](const QWebEngineCookieStore::FilterRequest &){ ++accessTested; return true;});
 
     QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
-    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(const QNetworkCookie &)));
-    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(const QNetworkCookie &)));
+    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(QNetworkCookie)));
+    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(QNetworkCookie)));
 
     page.load(QUrl("qrc:///resources/index.html"));
 
@@ -284,9 +284,9 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP()
     });
 
     QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
-    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(const QNetworkCookie &)));
-    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(const QNetworkCookie &)));
-    QSignalSpy serverSpy(&httpServer, SIGNAL(newRequest(HttpReqRep *)));
+    QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(QNetworkCookie)));
+    QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(QNetworkCookie)));
+    QSignalSpy serverSpy(&httpServer, SIGNAL(newRequest(HttpReqRep*)));
 
     QUrl firstPartyUrl = httpServer.url("/test.html");
     page.load(firstPartyUrl);
diff --git a/tests/auto/core/qwebengineframe/tst_qwebengineframe.cpp b/tests/auto/core/qwebengineframe/tst_qwebengineframe.cpp
index 0e036ac7449..fdfefea20c5 100644
--- a/tests/auto/core/qwebengineframe/tst_qwebengineframe.cpp
+++ b/tests/auto/core/qwebengineframe/tst_qwebengineframe.cpp
@@ -244,7 +244,7 @@ void tst_QWebEngineFrame::printToPdfFile()
     QVERIFY(maybeInnerFrame);
     auto innerFrame = *maybeInnerFrame;
 
-    QSignalSpy savePdfSpy{ &page, SIGNAL(pdfPrintingFinished(QString, bool)) };
+    QSignalSpy savePdfSpy{ &page, SIGNAL(pdfPrintingFinished(QString,bool)) };
 
     QString outerPath = tempDir.path() + "/outer.pdf";
     outerFrame.printToPdf(outerPath);
@@ -284,7 +284,7 @@ void tst_QWebEngineFrame::printToPdfFileFailures()
     QVERIFY(maybeInnerFrame);
     auto innerFrame = *maybeInnerFrame;
 
-    QSignalSpy savePdfSpy{ &page, SIGNAL(pdfPrintingFinished(QString, bool)) };
+    QSignalSpy savePdfSpy{ &page, SIGNAL(pdfPrintingFinished(QString,bool)) };
 
 #if !defined(Q_OS_WIN)
     auto badPath = tempDir.path() + "/print_//2_failed.pdf";
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index 791103d9658..797696c9833 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -848,7 +848,7 @@ void tst_QQuickWebEngineView::printToPdf()
     view->setUrl(urlFromTestPath("html/basic_page.html"));
     QVERIFY(waitForLoadSucceeded(view));
 
-    QSignalSpy savePdfSpy(view, SIGNAL(pdfPrintingFinished(const QString&, bool)));
+    QSignalSpy savePdfSpy(view, SIGNAL(pdfPrintingFinished(QString,bool)));
     QString path = tempDir.path() + "/print_success.pdf";
     view->printToPdf(path, QQuickWebEngineView::A4, QQuickWebEngineView::Portrait);
     QTRY_VERIFY2(savePdfSpy.size() == 1, "Printing to PDF file failed without signal");
diff --git a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp
index ad66e972c61..b4084a22d56 100644
--- a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp
+++ b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp
@@ -145,7 +145,7 @@ void tst_QWebEngineHistory::count()
   */
 void tst_QWebEngineHistory::back()
 {
-    QSignalSpy titleChangedSpy(page, SIGNAL(titleChanged(const QString&)));
+    QSignalSpy titleChangedSpy(page, SIGNAL(titleChanged(QString)));
 
     for (int i = histsize;i > 1;i--) {
         QTRY_COMPARE(toPlainTextSync(page), QString("page") + QString::number(i));
@@ -171,7 +171,7 @@ void tst_QWebEngineHistory::forward()
         QTRY_COMPARE(loadFinishedSpy->size(), histBackCount);
     }
 
-    QSignalSpy titleChangedSpy(page, SIGNAL(titleChanged(const QString&)));
+    QSignalSpy titleChangedSpy(page, SIGNAL(titleChanged(QString)));
     for (int i = 1;i < histsize;i++) {
         QTRY_COMPARE(toPlainTextSync(page), QString("page") + QString::number(i));
         hist->forward();
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
index 97e5bd6017f..eefb418638f 100644
--- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
+++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp
@@ -862,7 +862,7 @@ void tst_QWebEngineProfile::downloadItem()
     qRegisterMetaType<QWebEngineDownloadRequest *>();
     QWebEngineProfile testProfile;
     QWebEnginePage page(&testProfile);
-    QSignalSpy downloadSpy(&testProfile, SIGNAL(downloadRequested(QWebEngineDownloadRequest *)));
+    QSignalSpy downloadSpy(&testProfile, SIGNAL(downloadRequested(QWebEngineDownloadRequest*)));
     page.load(QUrl::fromLocalFile(QCoreApplication::applicationFilePath()));
     QTRY_COMPARE(downloadSpy.size(), 1);
 }

From f100a417703e44140c4cf45a14ed2cf7b0f08ffd Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Tue, 13 May 2025 16:51:29 +0200
Subject: [PATCH 005/100] Add GBM information to context log

Change-Id: Ia2c07b887be65da0b45febc29c339e6a3b1e46bc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 6aaa46bfbe4cca3a0effa064c7b7d6dff96436b8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/web_engine_context.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index efe32a12e0c..65f0263d91d 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -447,6 +447,7 @@ static void logContext(const std::string &glType, base::CommandLine *cmd)
 #if BUILDFLAG(IS_OZONE)
         log += "Using GLX: "_L1 + (OzoneUtilQt::usingGLX() ? "yes"_L1 : "no"_L1) + u'\n';
         log += "Using EGL: "_L1 + (OzoneUtilQt::usingEGL() ? "yes"_L1 : "no"_L1) + u'\n';
+        log += "Using GBM: "_L1 + (WebEngineContext::isGbmSupported() ? "yes"_L1 : "no"_L1) + u'\n';
 #endif // BUILDFLAG(IS_OZONE)
         log += "Using Shared GL: "_L1 + (QOpenGLContext::globalShareContext() ? "yes"_L1 : "no"_L1)
                 + u'\n';

From fa826cd7d6d16dc7e98cbd441e41f9c6c8d000b0 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Wed, 14 May 2025 13:08:16 +0200
Subject: [PATCH 006/100] Remove --enable-webgl-software-rendering

Most probably it is useless with the new default ANGLE backend.
The original code has been trimmed and now it is just equivalent with
passing the following command line arguments:
--webEngineArgs --disable-gpu-rasterization --ignore-gpu-blocklist

As a drive-by, change WebEngineContext::initCommandLine() parameter to
pointer instead of reference to make it clear on the caller side it will
not use but it is expected to change the parameter's value.

Change-Id: Ic118fa55071c5d8ac0730db2f640c3132375db8b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 86f6ce74c8745939955fad218b2d96f1ea601c9f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/web_engine_context.cpp | 22 +++++-----------------
 src/core/web_engine_context.h   |  3 +--
 2 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 65f0263d91d..2c01f8721b1 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -814,10 +814,8 @@ WebEngineContext::WebEngineContext()
     // Allow us to inject javascript like any webview toolkit.
     content::RenderFrameHost::AllowInjectingJavaScript();
 
-    bool useEmbeddedSwitches = false;
-    bool enableGLSoftwareRendering = false;
-    base::CommandLine *parsedCommandLine =
-            initCommandLine(useEmbeddedSwitches, enableGLSoftwareRendering);
+    bool useEmbeddedSwitches;
+    base::CommandLine *parsedCommandLine = initCommandLine(&useEmbeddedSwitches);
 
     setupProxyPac(parsedCommandLine);
     parsedCommandLine->AppendSwitchPath(switches::kBrowserSubprocessPath, WebEngineLibraryInfo::getPath(content::CHILD_PROCESS_EXE));
@@ -947,10 +945,6 @@ WebEngineContext::WebEngineContext()
 
     initializeFeatureList(parsedCommandLine, enableFeatures, disableFeatures);
 
-    // If user requested GL support instead of using Skia rendering to
-    // bitmaps, use software rendering via software OpenGL. This might be less
-    // performant, but at least provides WebGL support.
-    // TODO(miklocek), check if this still works with latest chromium
     const bool disableGpu = parsedCommandLine->HasSwitch(switches::kDisableGpu);
     std::string glType;
     if (parsedCommandLine->HasSwitch(switches::kUseGL))
@@ -963,10 +957,6 @@ WebEngineContext::WebEngineContext()
     parsedCommandLine->AppendSwitch(switches::kInProcessGPU);
 
     if (glType != gl::kGLImplementationDisabledName) {
-        if (enableGLSoftwareRendering) {
-            parsedCommandLine->AppendSwitch(switches::kDisableGpuRasterization);
-            parsedCommandLine->AppendSwitch(switches::kIgnoreGpuBlocklist);
-        }
         if (glType != gl::kGLImplementationANGLEName) {
             qWarning("Only --use-gl=angle is supported on this platform.");
         }
@@ -1068,8 +1058,7 @@ printing::PrintJobManager* WebEngineContext::getPrintJobManager()
 }
 #endif
 
-base::CommandLine *WebEngineContext::initCommandLine(bool &useEmbeddedSwitches,
-                                                     bool &enableGLSoftwareRendering)
+base::CommandLine *WebEngineContext::initCommandLine(bool *useEmbeddedSwitches)
 {
     if (!base::CommandLine::CreateEmpty())
         qFatal("base::CommandLine has been initialized unexpectedly.");
@@ -1096,11 +1085,10 @@ base::CommandLine *WebEngineContext::initCommandLine(bool &useEmbeddedSwitches,
         }
     }
 #if defined(QTWEBENGINE_EMBEDDED_SWITCHES)
-    useEmbeddedSwitches = !appArgs.contains("--disable-embedded-switches"_L1);
+    *useEmbeddedSwitches = !appArgs.contains("--disable-embedded-switches"_L1);
 #else
-    useEmbeddedSwitches = appArgs.contains("--enable-embedded-switches"_L1);
+    *useEmbeddedSwitches = appArgs.contains("--enable-embedded-switches"_L1);
 #endif
-    enableGLSoftwareRendering = appArgs.removeAll("--enable-webgl-software-rendering"_L1);
     appArgs.removeAll("--disable-embedded-switches"_L1);
     appArgs.removeAll("--enable-embedded-switches"_L1);
 
diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h
index 6f2bf04c4b1..f95f5824873 100644
--- a/src/core/web_engine_context.h
+++ b/src/core/web_engine_context.h
@@ -80,8 +80,7 @@ class WebEngineContext : public base::RefCounted<WebEngineContext> {
     void removeProfileAdapter(ProfileAdapter *profileAdapter);
     bool profileExistOnPath(const QString &dataPath);
     void destroy();
-    static base::CommandLine *initCommandLine(bool &useEmbeddedSwitches,
-                                              bool &enableGLSoftwareRendering);
+    static base::CommandLine *initCommandLine(bool *useEmbeddedSwitches);
 
 private:
     friend class base::RefCounted<WebEngineContext>;

From b5aa8ab41a3649d439720911983179c760eef199 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Wed, 14 May 2025 12:53:34 +0200
Subject: [PATCH 007/100] Clean up GL and Vulkan type detection

Change-Id: I7add950538fb8782257de0eff45d8ee1b2010a9a
Reviewed-by: Moss Heim <moss.heim@qt.io>
(cherry picked from commit b9f7d543ace88a613534c943c7f89a3532a20f47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/web_engine_context.cpp | 205 +++++++++++++++++++-------------
 1 file changed, 122 insertions(+), 83 deletions(-)

diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 2c01f8721b1..83f4df32c67 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -354,6 +354,22 @@ class GPUInfo
     QString m_adapterLuid;
 };
 
+static bool isFeatureEnabled(const std::string &feature, const base::CommandLine &commandLine)
+{
+    auto isInFeatureList = [&feature, commandLine](const std::string_view featuresSwitch) -> bool {
+        if (!commandLine.HasSwitch(featuresSwitch))
+            return false;
+
+        std::string featuresString = commandLine.GetSwitchValueASCII(featuresSwitch);
+        std::vector<std::string> features = base::SplitString(
+                featuresString, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);
+        return std::find(features.begin(), features.end(), feature) != features.end();
+    };
+
+    return !isInFeatureList(switches::kDisableFeatures)
+            && isInFeatureList(switches::kEnableFeatures);
+}
+
 static bool usingSupportedSGBackend()
 {
     if (QQuickWindow::graphicsApi() != QSGRendererInterface::OpenGL
@@ -382,37 +398,45 @@ static bool usingSupportedSGBackend()
     return device.isEmpty() || device == "rhi"_L1;
 }
 
-static std::string getGLType(bool disableGpu)
+static std::string getGLType(const base::CommandLine &cmd)
 {
-    if (disableGpu || !usingSupportedSGBackend())
+    if (cmd.HasSwitch(switches::kUseGL))
+        return cmd.GetSwitchValueASCII(switches::kUseGL);
+
+    if (!usingSupportedSGBackend() || cmd.HasSwitch(switches::kDisableGpu))
         return gl::kGLImplementationDisabledName;
 
     return gl::kGLImplementationANGLEName;
 }
 
-static std::string getVulkanType(base::CommandLine *cmd)
+static bool isGLTypeSupported(const std::string &glType)
+{
+    if (glType == gl::kGLImplementationANGLEName || glType == gl::kGLImplementationDisabledName)
+        return true;
+
+    return false;
+}
+
+static std::string getVulkanType(const base::CommandLine &cmd)
 {
 #if QT_CONFIG(webengine_vulkan)
-    if (cmd->HasSwitch(switches::kUseVulkan))
-        return cmd->GetSwitchValueASCII(switches::kUseVulkan);
+    if (isFeatureEnabled(features::kVulkan.name, cmd)) {
+        if (cmd.HasSwitch(switches::kUseVulkan))
+            return cmd.GetSwitchValueASCII(switches::kUseVulkan);
+        return switches::kVulkanImplementationNameNative;
+    }
 #endif
 
     return "disabled";
 }
 
-static std::string getAngleType(const std::string &glType, base::CommandLine *cmd)
+static std::string getANGLEType(const base::CommandLine &cmd)
 {
-    if (glType == gl::kGLImplementationANGLEName) {
-        if (cmd->HasSwitch(switches::kUseANGLE))
-            return cmd->GetSwitchValueASCII(switches::kUseANGLE);
+    if (getGLType(cmd) == gl::kGLImplementationANGLEName) {
+        if (cmd.HasSwitch(switches::kUseANGLE))
+            return cmd.GetSwitchValueASCII(switches::kUseANGLE);
 
-#if defined(Q_OS_WIN)
-        return gl::kANGLEImplementationD3D11Name;
-#elif defined(Q_OS_MACOS)
-        return gl::kANGLEImplementationMetalName;
-#else
         return gl::kANGLEImplementationDefaultName;
-#endif
     }
 
     return "disabled";
@@ -424,14 +448,14 @@ void dummyGetPluginCallback(const std::vector<content::WebPluginInfo>&)
 }
 #endif
 
-static void logContext(const std::string &glType, base::CommandLine *cmd)
+static void logContext(const base::CommandLine &cmd)
 {
     if (Q_UNLIKELY(webEngineContextLog().isDebugEnabled())) {
         QString log;
         log += u'\n';
 
-        log += "Chromium GL Backend: "_L1 + QLatin1StringView(glType) + "\n"_L1;
-        log += "Chromium ANGLE Backend: "_L1 + QLatin1StringView(getAngleType(glType, cmd)) + u'\n';
+        log += "Chromium GL Backend: "_L1 + QLatin1StringView(getGLType(cmd)) + u'\n';
+        log += "Chromium ANGLE Backend: "_L1 + QLatin1StringView(getANGLEType(cmd)) + u'\n';
         log += "Chromium Vulkan Backend: "_L1 + QLatin1StringView(getVulkanType(cmd)) + u'\n';
         log += u'\n';
 
@@ -455,7 +479,7 @@ static void logContext(const std::string &glType, base::CommandLine *cmd)
 #endif // QT_CONFIG(opengl)
 
         log += "Init Parameters:\n"_L1;
-        const base::CommandLine::SwitchMap switchMap = cmd->GetSwitches();
+        const base::CommandLine::SwitchMap switchMap = cmd.GetSwitches();
         for (const auto &pair : switchMap)
             log += " *  "_L1 + toQt(pair.first) + u' ' + toQt(pair.second) + u'\n';
 
@@ -465,10 +489,10 @@ static void logContext(const std::string &glType, base::CommandLine *cmd)
 
 extern std::unique_ptr<base::MessagePump> messagePumpFactory();
 
-static void setupProxyPac(base::CommandLine *commandLine)
+static void setupProxyPac(base::CommandLine &commandLine)
 {
-    if (commandLine->HasSwitch(switches::kProxyPacUrl)) {
-        QUrl pac_url(toQt(commandLine->GetSwitchValueASCII(switches::kProxyPacUrl)));
+    if (commandLine.HasSwitch(switches::kProxyPacUrl)) {
+        QUrl pac_url(toQt(commandLine.GetSwitchValueASCII(switches::kProxyPacUrl)));
         if (pac_url.isValid()
             && (pac_url.isLocalFile()
                 || !pac_url.scheme().compare("qrc"_L1, Qt::CaseInsensitive))) {
@@ -479,9 +503,12 @@ static void setupProxyPac(base::CommandLine *commandLine)
                 file.setFileName(pac_url.path().prepend(QLatin1Char(':')));
             if (file.exists() && file.open(QIODevice::ReadOnly | QIODevice::Text)) {
                 const QByteArray ba = file.readAll();
-                commandLine->RemoveSwitch(switches::kProxyPacUrl);
-                commandLine->AppendSwitchASCII(switches::kProxyPacUrl,
-                        ba.toBase64().prepend("data:application/x-javascript-config;base64,").toStdString());
+                commandLine.RemoveSwitch(switches::kProxyPacUrl);
+                commandLine.AppendSwitchASCII(
+                        switches::kProxyPacUrl,
+                        ba.toBase64()
+                                .prepend("data:application/x-javascript-config;base64,")
+                                .toStdString());
             }
         }
     }
@@ -742,11 +769,14 @@ ProxyAuthentication WebEngineContext::qProxyNetworkAuthentication(QString host,
 const static char kChromiumFlagsEnv[] = "QTWEBENGINE_CHROMIUM_FLAGS";
 const static char kDisableSandboxEnv[] = "QTWEBENGINE_DISABLE_SANDBOX";
 
-static void initializeFeatureList(base::CommandLine *commandLine, std::vector<std::string> enableFeatures, std::vector<std::string> disableFeatures)
+static void initializeFeatureList(base::CommandLine &commandLine,
+                                  std::vector<std::string> enableFeatures,
+                                  std::vector<std::string> disableFeatures)
 {
     std::string enableFeaturesString = base::JoinString(enableFeatures, ",");
-    if (commandLine->HasSwitch(switches::kEnableFeatures)) {
-        std::string commandLineEnableFeatures = commandLine->GetSwitchValueASCII(switches::kEnableFeatures);
+    if (commandLine.HasSwitch(switches::kEnableFeatures)) {
+        std::string commandLineEnableFeatures =
+                commandLine.GetSwitchValueASCII(switches::kEnableFeatures);
 
         for (const std::string &enableFeature : base::SplitString(commandLineEnableFeatures, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY)) {
             auto it = std::find(disableFeatures.begin(), disableFeatures.end(), enableFeature);
@@ -765,8 +795,9 @@ static void initializeFeatureList(base::CommandLine *commandLine, std::vector<st
     }
 
     std::string disableFeaturesString = base::JoinString(disableFeatures, ",");
-    if (commandLine->HasSwitch(switches::kDisableFeatures)) {
-        std::string commandLineDisableFeatures = commandLine->GetSwitchValueASCII(switches::kDisableFeatures);
+    if (commandLine.HasSwitch(switches::kDisableFeatures)) {
+        std::string commandLineDisableFeatures =
+                commandLine.GetSwitchValueASCII(switches::kDisableFeatures);
 
         for (const std::string &disableFeature : base::SplitString(commandLineDisableFeatures, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY)) {
             auto it = std::find(enableFeatures.begin(), enableFeatures.end(), disableFeature);
@@ -780,8 +811,8 @@ static void initializeFeatureList(base::CommandLine *commandLine, std::vector<st
         disableFeaturesString = disableFeaturesString + "," + commandLineDisableFeatures;
     }
 
-    commandLine->AppendSwitchASCII(switches::kEnableFeatures, enableFeaturesString);
-    commandLine->AppendSwitchASCII(switches::kDisableFeatures, disableFeaturesString);
+    commandLine.AppendSwitchASCII(switches::kEnableFeatures, enableFeaturesString);
+    commandLine.AppendSwitchASCII(switches::kDisableFeatures, disableFeaturesString);
     base::FeatureList::InitInstance(enableFeaturesString, disableFeaturesString);
 }
 
@@ -815,26 +846,29 @@ WebEngineContext::WebEngineContext()
     content::RenderFrameHost::AllowInjectingJavaScript();
 
     bool useEmbeddedSwitches;
-    base::CommandLine *parsedCommandLine = initCommandLine(&useEmbeddedSwitches);
+    base::CommandLine &parsedCommandLine = *initCommandLine(&useEmbeddedSwitches);
 
     setupProxyPac(parsedCommandLine);
-    parsedCommandLine->AppendSwitchPath(switches::kBrowserSubprocessPath, WebEngineLibraryInfo::getPath(content::CHILD_PROCESS_EXE));
+    parsedCommandLine.AppendSwitchPath(switches::kBrowserSubprocessPath,
+                                       WebEngineLibraryInfo::getPath(content::CHILD_PROCESS_EXE));
 
-    parsedCommandLine->AppendSwitchASCII(switches::kApplicationName, QCoreApplication::applicationName().toUtf8().toPercentEncoding().toStdString());
+    parsedCommandLine.AppendSwitchASCII(
+            switches::kApplicationName,
+            QCoreApplication::applicationName().toUtf8().toPercentEncoding().toStdString());
 
     // Enable sandboxing on OS X and Linux (Desktop / Embedded) by default.
     bool disable_sandbox = qEnvironmentVariableIsSet(kDisableSandboxEnv);
     if (!disable_sandbox) {
 #if defined(Q_OS_LINUX)
-        parsedCommandLine->AppendSwitch(sandbox::policy::switches::kDisableSetuidSandbox);
+        parsedCommandLine.AppendSwitch(sandbox::policy::switches::kDisableSetuidSandbox);
 #endif
     } else {
-        parsedCommandLine->AppendSwitch(sandbox::policy::switches::kNoSandbox);
+        parsedCommandLine.AppendSwitch(sandbox::policy::switches::kNoSandbox);
         qInfo("Sandboxing disabled by user.");
     }
 
     // Do not advertise a feature we have removed at compile time
-    parsedCommandLine->AppendSwitch(switches::kDisableSpeechAPI);
+    parsedCommandLine.AppendSwitch(switches::kDisableSpeechAPI);
 
     std::vector<std::string> disableFeatures;
     std::vector<std::string> enableFeatures;
@@ -848,19 +882,19 @@ WebEngineContext::WebEngineContext()
 
     // By default the Touch Events API support (presence of 'ontouchstart' in 'window' object)
     // will be determined based on the availability of touch screen devices.
-    if (!parsedCommandLine->HasSwitch(switches::kTouchEventFeatureDetection))
-        parsedCommandLine->AppendSwitchASCII(switches::kTouchEventFeatureDetection,
-                                             switches::kTouchEventFeatureDetectionAuto);
+    if (!parsedCommandLine.HasSwitch(switches::kTouchEventFeatureDetection))
+        parsedCommandLine.AppendSwitchASCII(switches::kTouchEventFeatureDetection,
+                                            switches::kTouchEventFeatureDetectionAuto);
 
     // Not implemented but it overrides the devtools eyedropper
     // Should be sync with kEyeDropper base::Feature
-    parsedCommandLine->AppendSwitchASCII(switches::kDisableBlinkFeatures, "EyeDropperAPI");
+    parsedCommandLine.AppendSwitchASCII(switches::kDisableBlinkFeatures, "EyeDropperAPI");
     disableFeatures.push_back(features::kEyeDropper.name);
 
     // Explicitly tell Chromium about default-on features we do not support
     disableFeatures.push_back(features::kBackgroundFetch.name);
     disableFeatures.push_back(features::kInstalledApp.name);
-    parsedCommandLine->AppendSwitchASCII(switches::kDisableBlinkFeatures, "WebOTP");
+    parsedCommandLine.AppendSwitchASCII(switches::kDisableBlinkFeatures, "WebOTP");
     disableFeatures.push_back(features::kWebOTP.name);
     disableFeatures.push_back(features::kWebPayments.name);
     disableFeatures.push_back(features::kWebUsb.name);
@@ -872,38 +906,59 @@ WebEngineContext::WebEngineContext()
     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);
-        parsedCommandLine->AppendSwitch(switches::kEnableViewport);
-        parsedCommandLine->AppendSwitch(input::switches::kValidateInputEventStream);
-        parsedCommandLine->AppendSwitch(cc::switches::kDisableCompositedAntialiasing);
+        parsedCommandLine.AppendSwitch(switches::kEnableViewport);
+        parsedCommandLine.AppendSwitch(input::switches::kValidateInputEventStream);
+        parsedCommandLine.AppendSwitch(cc::switches::kDisableCompositedAntialiasing);
     }
 
 #if BUILDFLAG(IS_OZONE)
     if (!isGbmSupported()) {
         disableFeatures.push_back(media::kVaapiVideoDecodeLinux.name);
-        parsedCommandLine->AppendSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
+        parsedCommandLine.AppendSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
     }
+#endif
+
+    // Init GPU switches.
+    parsedCommandLine.AppendSwitch(switches::kInProcessGPU);
+
+    std::string glType = getGLType(parsedCommandLine);
+    // Always set --use-gl.
+    if (!parsedCommandLine.HasSwitch(switches::kUseGL))
+        parsedCommandLine.AppendSwitchASCII(switches::kUseGL, glType);
+
+    if (glType == gl::kGLImplementationDisabledName) {
+        // Always set --disable-gpu to avoid unexpected GL contexts, see QTBUG-128784.
+        if (!parsedCommandLine.HasSwitch(switches::kDisableGpu))
+            parsedCommandLine.AppendSwitch(switches::kDisableGpu);
+    } else {
+        // Warn on custom --use-gl if hardware rendering is disabled.
+        if (!usingSupportedSGBackend())
+            qWarning("--use-gl=%s is set with unsupported SceneGraph Backend. Expect troubles!",
+                     glType.c_str());
 
-    bool usingANGLE = true;
-    // ANGLE is the default but it can be overridden from command line.
-    if (parsedCommandLine->HasSwitch(switches::kUseGL)) {
-        usingANGLE = (parsedCommandLine->GetSwitchValueASCII(switches::kUseGL)
-                      == gl::kGLImplementationANGLEName);
+        if (parsedCommandLine.HasSwitch(switches::kDisableGpu))
+            qWarning("--use-gl=%s is set with --disable-gpu. Expect troubles!", glType.c_str());
     }
 
-#if QT_CONFIG(webengine_vulkan)
+#if BUILDFLAG(IS_OZONE) && QT_CONFIG(webengine_vulkan)
     if (QQuickWindow::graphicsApi() == QSGRendererInterface::OpenGL && usingSupportedSGBackend()) {
-        if (usingANGLE && !isGbmSupported()) {
+        const bool disableGpu = parsedCommandLine.HasSwitch(switches::kDisableGpu);
+        const bool usingVulkan = isFeatureEnabled(features::kVulkan.name, parsedCommandLine);
+        if (!disableGpu && !usingVulkan && !isGbmSupported()) {
             qWarning("GBM is not supported with the current configuration. "
                      "Fallback to Vulkan rendering in Chromium.");
-            parsedCommandLine->AppendSwitchASCII(switches::kUseVulkan,
-                                                 switches::kVulkanImplementationNameNative);
+            parsedCommandLine.AppendSwitchASCII(switches::kUseVulkan,
+                                                switches::kVulkanImplementationNameNative);
             enableFeatures.push_back(features::kVulkan.name);
         }
     }
 
     if (QQuickWindow::graphicsApi() == QSGRendererInterface::Vulkan && usingSupportedSGBackend()) {
-        parsedCommandLine->AppendSwitchASCII(switches::kUseVulkan,
-                                             switches::kVulkanImplementationNameNative);
+        // TODO: Try not to force Chromium's Vulkan backend on Linux.
+        //       Currently we force it because OzoneImageBackingFactory does not support to create
+        //       SharedImage in RGBA8888 format under GLX.
+        parsedCommandLine.AppendSwitchASCII(switches::kUseVulkan,
+                                            switches::kVulkanImplementationNameNative);
         enableFeatures.push_back(features::kVulkan.name);
 
         const char deviceExtensionsVar[] = "QT_VULKAN_DEVICE_EXTENSIONS";
@@ -927,15 +982,14 @@ WebEngineContext::WebEngineContext()
             qputenv(deviceExtensionsVar, requiredDeviceExtensions.join(';'));
         }
     }
-#endif // QT_CONFIG(webengine_vulkan)
-#endif // BUILDFLAG(IS_OZONE)
+#endif // BUILDFLAG(IS_OZONE) && QT_CONFIG(webengine_vulkan)
 
 #if defined(Q_OS_WIN)
     if (QQuickWindow::graphicsApi() == QSGRendererInterface::Direct3D11
         || QQuickWindow::graphicsApi() == QSGRendererInterface::Vulkan) {
         const QString luid = GPUInfo::instance()->getAdapterLuid();
         if (!luid.isEmpty())
-            parsedCommandLine->AppendSwitchASCII(switches::kUseAdapterLuid, luid.toStdString());
+            parsedCommandLine.AppendSwitchASCII(switches::kUseAdapterLuid, luid.toStdString());
     }
 #endif
     // We need the FieldTrialList to make sure Chromium features are provided to child processes
@@ -945,26 +999,11 @@ WebEngineContext::WebEngineContext()
 
     initializeFeatureList(parsedCommandLine, enableFeatures, disableFeatures);
 
-    const bool disableGpu = parsedCommandLine->HasSwitch(switches::kDisableGpu);
-    std::string glType;
-    if (parsedCommandLine->HasSwitch(switches::kUseGL))
-        glType = parsedCommandLine->GetSwitchValueASCII(switches::kUseGL);
-    else {
-        glType = getGLType(disableGpu);
-        parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType);
-    }
-
-    parsedCommandLine->AppendSwitch(switches::kInProcessGPU);
-
-    if (glType != gl::kGLImplementationDisabledName) {
-        if (glType != gl::kGLImplementationANGLEName) {
-            qWarning("Only --use-gl=angle is supported on this platform.");
-        }
-    } else if (!disableGpu) {
-        parsedCommandLine->AppendSwitch(switches::kDisableGpu);
-    }
+    logContext(parsedCommandLine);
 
-    logContext(glType, parsedCommandLine);
+    // Early error on unsupported --use-gl settings.
+    if (!isGLTypeSupported(glType))
+        qFatal("--use-gl=%s is not supported with the current configuration.", glType.c_str());
 
     registerMainThreadFactories();
 
@@ -1069,7 +1108,7 @@ base::CommandLine *WebEngineContext::initCommandLine(bool *useEmbeddedSwitches)
                "base::CommandLine cannot be properly initialized.");
     }
 
-    base::CommandLine *parsedCommandLine = base::CommandLine::ForCurrentProcess();
+    base::CommandLine *commandLine = base::CommandLine::ForCurrentProcess();
     int index = appArgs.indexOf(QRegularExpression(u"--webEngineArgs"_s,
                                                    QRegularExpression::CaseInsensitiveOption));
     if (qEnvironmentVariableIsSet(kChromiumFlagsEnv)) {
@@ -1117,9 +1156,9 @@ base::CommandLine *WebEngineContext::initCommandLine(bool *useEmbeddedSwitches)
     for (int i = 0; i < appArgs.size(); ++i)
         argv[i] = appArgs[i].toStdString();
 #endif
-    parsedCommandLine->InitFromArgv(argv);
+    commandLine->InitFromArgv(argv);
 
-    return parsedCommandLine;
+    return commandLine;
 }
 
 bool WebEngineContext::closingDown()

From d45ef7035ec65e55c3eef139ae8dbc6006ecfef2 Mon Sep 17 00:00:00 2001
From: Tim Blechmann <tim.blechmann@qt.io>
Date: Tue, 3 Jun 2025 11:50:06 +0800
Subject: [PATCH 008/100] cmake: PdfWidgets/Quick - fix dependencies

PdfWidgets and QdfQuick should publicly depend on Qt::Pdf/Quick and only
privately on PdfPrivate / QuickPrivate
Amends 209778ed9a167c156b448689191d2a6a381a6880

Fixes: QTBUG-135974
Pick-to: 6.9
Change-Id: I9cdcc6d6fd6cd0a11691025580f2fd4a41325282
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 1dbe52965e034a24d13c71be7feea7447b1aa01a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/pdfquick/CMakeLists.txt                      | 8 +++++++-
 src/pdfwidgets/CMakeLists.txt                    | 3 ++-
 tests/auto/pdfquick/multipageview/CMakeLists.txt | 1 +
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/pdfquick/CMakeLists.txt b/src/pdfquick/CMakeLists.txt
index e52d26f4413..5da3d53f93e 100644
--- a/src/pdfquick/CMakeLists.txt
+++ b/src/pdfquick/CMakeLists.txt
@@ -34,11 +34,17 @@ qt_internal_add_qml_module(PdfQuick
         qtpdfquickglobal_p.h
     INCLUDE_DIRECTORIES
         ../3rdparty/chromium
-    PUBLIC_LIBRARIES
+    LIBRARIES
+        Qt::PdfPrivate
         Qt::QuickPrivate
+    PRIVATE_MODULE_INTERFACE
         Qt::PdfPrivate
+        Qt::QuickPrivate
+    PUBLIC_LIBRARIES
         Qt::Core
         Qt::Gui
+        Qt::Pdf
         Qt::Qml
+        Qt::Quick
     NO_GENERATE_CPP_EXPORTS
 )
diff --git a/src/pdfwidgets/CMakeLists.txt b/src/pdfwidgets/CMakeLists.txt
index 99287435450..c7a7780ea64 100644
--- a/src/pdfwidgets/CMakeLists.txt
+++ b/src/pdfwidgets/CMakeLists.txt
@@ -9,11 +9,12 @@ qt_internal_add_module(PdfWidgets
         qpdfview.cpp qpdfview.h qpdfview_p.h
         qtpdfwidgetsglobal.h
     LIBRARIES
+        Qt::PdfPrivate
         Qt::WidgetsPrivate
     PUBLIC_LIBRARIES
         Qt::Core
         Qt::Gui
+        Qt::Pdf
         Qt::Widgets
-        Qt::PdfPrivate
     NO_GENERATE_CPP_EXPORTS
 )
diff --git a/tests/auto/pdfquick/multipageview/CMakeLists.txt b/tests/auto/pdfquick/multipageview/CMakeLists.txt
index 50f7d7d8f51..010cefdb09a 100644
--- a/tests/auto/pdfquick/multipageview/CMakeLists.txt
+++ b/tests/auto/pdfquick/multipageview/CMakeLists.txt
@@ -11,6 +11,7 @@ qt_internal_add_test(tst_multipageview
     LIBRARIES
         Qt::Gui
         Qt::Quick
+        Qt::PdfPrivate
         Qt::PdfQuickPrivate
     TESTDATA ${test_data}
 )

From b865c422c3d1c1971841669ca3e0a2cdcdb8237d Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Wed, 30 Apr 2025 13:15:16 +0200
Subject: [PATCH 009/100] Support chrome.runtime API

Implement RuntimeAPIDelegate methods which are required by the runtime API.

Task-number: QTBUG-61676
Change-Id: Ic73f34bafc51abd69696a0affe5657f953391349
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 183573bc3f444be3503f493371c1604a380290b2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/CMakeLists.txt                       |   1 +
 src/core/configure/BUILD.root.gn.in           |   2 +
 .../api/runtime_api_delegate_qt.cpp           | 100 ++++++++++++++++++
 .../extensions/api/runtime_api_delegate_qt.h  |  42 ++++++++
 src/core/extensions/extension_loader.cpp      |   5 +
 src/core/extensions/extension_loader.h        |   1 +
 src/core/extensions/extension_manager.cpp     |   5 +
 src/core/extensions/extension_manager.h       |   1 +
 .../extensions_browser_client_qt.cpp          |   5 +-
 9 files changed, 159 insertions(+), 3 deletions(-)
 create mode 100644 src/core/extensions/api/runtime_api_delegate_qt.cpp
 create mode 100644 src/core/extensions/api/runtime_api_delegate_qt.h

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index b2ca491032b..e2594a09ba7 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -275,6 +275,7 @@ foreach(arch ${archs})
             SOURCES
                 common/extensions/extensions_api_provider_qt.cpp common/extensions/extensions_api_provider_qt.h
                 common/extensions/extensions_client_qt.cpp common/extensions/extensions_client_qt.h
+                extensions/api/runtime_api_delegate_qt.cpp extensions/api/runtime_api_delegate_qt.h
                 extensions/component_extension_resource_manager_qt.cpp extensions/component_extension_resource_manager_qt.h
                 extensions/extension_action_manager.cpp extensions/extension_action_manager.h
                 extensions/extension_host_delegate_qt.cpp extensions/extension_host_delegate_qt.h
diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in
index a17ecbb9c47..81fd8368f75 100644
--- a/src/core/configure/BUILD.root.gn.in
+++ b/src/core/configure/BUILD.root.gn.in
@@ -455,6 +455,8 @@ source_set("qtwebengine_sources") {
       "//chrome/common/extensions/permissions/chrome_permission_message_rules.h",
       "//extensions/browser/zipfile_installer.cc",
       "//extensions/browser/zipfile_installer.h",
+      "//components/update_client/update_query_params.cc",
+      "//components/update_client/update_query_params.h",
       "//components/services/unzip/unzipper_impl.cc",
       "//components/services/unzip/unzipper_impl.h",
       "//ui/webui/mojo_web_ui_controller.cc",
diff --git a/src/core/extensions/api/runtime_api_delegate_qt.cpp b/src/core/extensions/api/runtime_api_delegate_qt.cpp
new file mode 100644
index 00000000000..790d765763d
--- /dev/null
+++ b/src/core/extensions/api/runtime_api_delegate_qt.cpp
@@ -0,0 +1,100 @@
+// Copyright (C) 2025 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 "runtime_api_delegate_qt.h"
+
+#include "extensions/extension_manager.h"
+#include "extensions/extension_system_qt.h"
+
+#include "components/update_client/update_query_params.h"
+
+using extensions::api::runtime::PlatformInfo;
+
+namespace extensions {
+
+RuntimeAPIDelegateQt::RuntimeAPIDelegateQt(content::BrowserContext *browser_context)
+    : browser_context_(browser_context)
+{
+    DCHECK(browser_context_);
+}
+
+RuntimeAPIDelegateQt::~RuntimeAPIDelegateQt() = default;
+
+void RuntimeAPIDelegateQt::AddUpdateObserver(UpdateObserver *observer) { }
+
+void RuntimeAPIDelegateQt::RemoveUpdateObserver(UpdateObserver *observer) { }
+
+void RuntimeAPIDelegateQt::ReloadExtension(const ExtensionId &extension_id)
+{
+    auto *manager = static_cast<ExtensionSystemQt *>(ExtensionSystem::Get(browser_context_))
+                            ->extensionManager();
+    manager->reloadExtension(extension_id);
+}
+
+bool RuntimeAPIDelegateQt::CheckForUpdates(const ExtensionId &extension_id,
+                                           UpdateCheckCallback callback)
+{
+    return false;
+}
+
+void RuntimeAPIDelegateQt::OpenURL(const GURL &uninstall_url) { }
+
+bool RuntimeAPIDelegateQt::GetPlatformInfo(PlatformInfo *info)
+{
+    const char *os = update_client::UpdateQueryParams::GetOS();
+    if (strcmp(os, "mac") == 0) {
+        info->os = extensions::api::runtime::PlatformOs::kMac;
+    } else if (strcmp(os, "win") == 0) {
+        info->os = extensions::api::runtime::PlatformOs::kWin;
+    } else if (strcmp(os, "cros") == 0) {
+        info->os = extensions::api::runtime::PlatformOs::kCros;
+    } else if (strcmp(os, "linux") == 0) {
+        info->os = extensions::api::runtime::PlatformOs::kLinux;
+    } else if (strcmp(os, "openbsd") == 0) {
+        info->os = extensions::api::runtime::PlatformOs::kOpenbsd;
+    } else {
+        NOTREACHED() << "Platform not supported: " << os;
+    }
+
+    const char *arch = update_client::UpdateQueryParams::GetArch();
+    if (strcmp(arch, "arm") == 0) {
+        info->arch = extensions::api::runtime::PlatformArch::kArm;
+    } else if (strcmp(arch, "arm64") == 0) {
+        info->arch = extensions::api::runtime::PlatformArch::kArm64;
+    } else if (strcmp(arch, "x86") == 0) {
+        info->arch = extensions::api::runtime::PlatformArch::kX86_32;
+    } else if (strcmp(arch, "x64") == 0) {
+        info->arch = extensions::api::runtime::PlatformArch::kX86_64;
+    } else if (strcmp(arch, "mipsel") == 0) {
+        info->arch = extensions::api::runtime::PlatformArch::kMips;
+    } else if (strcmp(arch, "mips64el") == 0) {
+        info->arch = extensions::api::runtime::PlatformArch::kMips64;
+    } else {
+        NOTREACHED();
+    }
+
+    const char *nacl_arch = update_client::UpdateQueryParams::GetNaclArch();
+    if (strcmp(nacl_arch, "arm") == 0) {
+        info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kArm;
+    } else if (strcmp(nacl_arch, "x86-32") == 0) {
+        info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kX86_32;
+    } else if (strcmp(nacl_arch, "x86-64") == 0) {
+        info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kX86_64;
+    } else if (strcmp(nacl_arch, "mips32") == 0) {
+        info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kMips;
+    } else if (strcmp(nacl_arch, "mips64") == 0) {
+        info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kMips64;
+    } else {
+        NOTREACHED();
+    }
+
+    return true;
+}
+
+bool RuntimeAPIDelegateQt::RestartDevice(std::string *error_message)
+{
+    *error_message = "Restart is only supported on ChromeOS.";
+    return false;
+}
+
+} // namespace extensions
diff --git a/src/core/extensions/api/runtime_api_delegate_qt.h b/src/core/extensions/api/runtime_api_delegate_qt.h
new file mode 100644
index 00000000000..87adfd50673
--- /dev/null
+++ b/src/core/extensions/api/runtime_api_delegate_qt.h
@@ -0,0 +1,42 @@
+// Copyright (C) 2025 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 RUNTIME_API_DELEGATE_QT_
+#define RUNTIME_API_DELEGATE_QT_
+
+#include "base/memory/raw_ptr.h"
+#include "extensions/browser/api/runtime/runtime_api_delegate.h"
+#include "extensions/common/extension_id.h"
+
+namespace content {
+class BrowserContext;
+}
+
+namespace extensions {
+
+class RuntimeAPIDelegateQt : public RuntimeAPIDelegate
+{
+public:
+    explicit RuntimeAPIDelegateQt(content::BrowserContext *browser_context);
+
+    RuntimeAPIDelegateQt(const RuntimeAPIDelegateQt &) = delete;
+    RuntimeAPIDelegateQt &operator=(const RuntimeAPIDelegateQt &) = delete;
+
+    ~RuntimeAPIDelegateQt() override;
+
+    // RuntimeAPIDelegate implementation.
+    void AddUpdateObserver(UpdateObserver *observer) override;
+    void RemoveUpdateObserver(UpdateObserver *observer) override;
+    void ReloadExtension(const ExtensionId &extension_id) override;
+    bool CheckForUpdates(const ExtensionId &extension_id, UpdateCheckCallback callback) override;
+    void OpenURL(const GURL &uninstall_url) override;
+    bool GetPlatformInfo(api::runtime::PlatformInfo *info) override;
+    bool RestartDevice(std::string *error_message) override;
+
+private:
+    raw_ptr<content::BrowserContext> browser_context_;
+};
+
+} // namespace extensions
+
+#endif // RUNTIME_API_DELEGATE_QT_
diff --git a/src/core/extensions/extension_loader.cpp b/src/core/extensions/extension_loader.cpp
index d7f21ade85e..05c8544ed1d 100644
--- a/src/core/extensions/extension_loader.cpp
+++ b/src/core/extensions/extension_loader.cpp
@@ -82,6 +82,11 @@ void ExtensionLoader::addExtension(scoped_refptr<const Extension> extension)
         m_extensionRegistry->AddDisabled(extension);
 }
 
+void ExtensionLoader::reloadExtension(const std::string &id)
+{
+    m_extensionRegistrar.ReloadExtension(id, ExtensionRegistrar::LoadErrorBehavior::kQuiet);
+}
+
 void ExtensionLoader::loadExtensionFinished(const LoadingInfo &loadingInfo)
 {
     if (!loadingInfo.error.empty()) {
diff --git a/src/core/extensions/extension_loader.h b/src/core/extensions/extension_loader.h
index 2863f310d08..32de4f9aa83 100644
--- a/src/core/extensions/extension_loader.h
+++ b/src/core/extensions/extension_loader.h
@@ -43,6 +43,7 @@ class ExtensionLoader : public extensions::ExtensionRegistrar::Delegate
 
     void loadExtension(const base::FilePath &path);
     void unloadExtension(const std::string &id);
+    void reloadExtension(const std::string &id);
 
     void addExtension(scoped_refptr<const extensions::Extension> extension);
     extensions::ExtensionSet extensions() const;
diff --git a/src/core/extensions/extension_manager.cpp b/src/core/extensions/extension_manager.cpp
index 39748b87014..aa359b8cb78 100644
--- a/src/core/extensions/extension_manager.cpp
+++ b/src/core/extensions/extension_manager.cpp
@@ -104,6 +104,11 @@ void ExtensionManager::uninstallExtension(const std::string &id)
     }
 }
 
+void ExtensionManager::reloadExtension(const std::string &id)
+{
+    m_loader->reloadExtension(id);
+}
+
 bool ExtensionManager::isExtensionEnabled(const std::string &id) const
 {
     return m_loader->isExtensionEnabled(id);
diff --git a/src/core/extensions/extension_manager.h b/src/core/extensions/extension_manager.h
index b99209b7e48..75fc4eb34d1 100644
--- a/src/core/extensions/extension_manager.h
+++ b/src/core/extensions/extension_manager.h
@@ -45,6 +45,7 @@ class Q_WEBENGINECORE_EXPORT ExtensionManager
     void setExtensionEnabled(const std::string &id, bool enabled);
     void unloadExtension(const std::string &id);
     void uninstallExtension(const std::string &id);
+    void reloadExtension(const std::string &id);
 
     bool isExtensionEnabled(const std::string &id) const;
     bool isExtensionLoaded(const std::string &id) const;
diff --git a/src/core/extensions/extensions_browser_client_qt.cpp b/src/core/extensions/extensions_browser_client_qt.cpp
index bd95524f367..de943b2d3d2 100644
--- a/src/core/extensions/extensions_browser_client_qt.cpp
+++ b/src/core/extensions/extensions_browser_client_qt.cpp
@@ -37,6 +37,7 @@
 #include "third_party/zlib/google/compression_utils.h"
 #include "ui/base/resource/resource_bundle.h"
 
+#include "api/runtime_api_delegate_qt.h"
 #include "component_extension_resource_manager_qt.h"
 #include "extension_system_factory_qt.h"
 #include "extension_web_contents_observer_qt.h"
@@ -459,9 +460,7 @@ void ExtensionsBrowserClientQt::RegisterBrowserInterfaceBindersForFrame(
 
 std::unique_ptr<RuntimeAPIDelegate> ExtensionsBrowserClientQt::CreateRuntimeAPIDelegate(content::BrowserContext *context) const
 {
-    // TODO(extensions): Implement to support Apps.
-    NOTREACHED();
-    return std::unique_ptr<RuntimeAPIDelegate>();
+    return std::make_unique<RuntimeAPIDelegateQt>(context);
 }
 
 const ComponentExtensionResourceManager *ExtensionsBrowserClientQt::GetComponentExtensionResourceManager()

From 92fc1f6d599668442474e9094cf66315a2e83dd0 Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Thu, 20 Mar 2025 14:26:54 +0100
Subject: [PATCH 010/100] Support extension service workers

Extension service workers are core part of the ManfestV3,
replacing background scripts from ManifestV2.
Extension APIs (eg. chrome.tabs) are only available in these
script contexts.

This change implements the required methods to setup worker contexts.

* Forward the service worker events from the renderer to the
extension binding system. The binding system responsible for adding
the `chrome` object and other API objects to the context.

* Register the ServiceWorkerHost interface binder to enable ipc
between the browser process and service workers.

Task-number: QTBUG-61676
Change-Id: I68c539f5ce28b7a7293c325705248bb9eb53ddc0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 9d9780d444e8e7b1a2e066ae4b872a77d35f87bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/content_browser_client_qt.cpp        | 11 ++++++
 src/core/content_browser_client_qt.h          | 10 ++++++
 .../renderer/content_renderer_client_qt.cpp   | 34 +++++++++++++++++++
 .../renderer/content_renderer_client_qt.h     | 14 ++++++++
 .../service_worker_ext/content_script.js      |  7 ++++
 .../service_worker_ext/manifest.json          | 18 ++++++++++
 .../service_worker_ext/service_worker.js      |  5 +++
 .../extensions/tst_qwebengineextension.cpp    | 16 +++++++++
 8 files changed, 115 insertions(+)
 create mode 100644 tests/auto/widgets/extensions/resources/service_worker_ext/content_script.js
 create mode 100644 tests/auto/widgets/extensions/resources/service_worker_ext/manifest.json
 create mode 100644 tests/auto/widgets/extensions/resources/service_worker_ext/service_worker.js

diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 1bda59a752c..9a1de70af32 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -124,6 +124,7 @@
 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
 #include "extensions/browser/process_map.h"
+#include "extensions/browser/service_worker/service_worker_host.h"
 #include "extensions/browser/url_loader_factory_manager.h"
 #include "extensions/browser/view_type_utils.h"
 #include "extensions/common/constants.h"
@@ -546,6 +547,16 @@ void ContentBrowserClientQt::RegisterAssociatedInterfaceBindersForRenderFrameHos
 #endif
 }
 
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+void ContentBrowserClientQt::RegisterAssociatedInterfaceBindersForServiceWorker(
+        const content::ServiceWorkerVersionBaseInfo &service_worker_version_info,
+        blink::AssociatedInterfaceRegistry &associated_registry)
+{
+    associated_registry.AddInterface<extensions::mojom::ServiceWorkerHost>(base::BindRepeating(
+            &extensions::ServiceWorkerHost::BindReceiver, service_worker_version_info.process_id));
+}
+#endif
+
 bool ContentBrowserClientQt::CanCreateWindow(
         content::RenderFrameHost* opener,
         const GURL& opener_url,
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index 4e24012e46b..08ee2d1ab90 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -6,6 +6,11 @@
 
 #include "qtwebenginecoreglobal_p.h"
 #include "content/public/browser/content_browser_client.h"
+#include "extensions/buildflags/buildflags.h"
+
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+#include "content/public/browser/service_worker_version_base_info.h"
+#endif
 
 namespace content {
 class BrowserContext;
@@ -66,6 +71,11 @@ class ContentBrowserClientQt : public content::ContentBrowserClient
                                     content::RenderProcessHost *render_process_host) override;
     void RegisterAssociatedInterfaceBindersForRenderFrameHost(content::RenderFrameHost &render_frame_host,
                                                               blink::AssociatedInterfaceRegistry &associated_registry) override;
+#if BUILDFLAG(ENABLE_EXTENSIONS)
+    void RegisterAssociatedInterfaceBindersForServiceWorker(
+            const content::ServiceWorkerVersionBaseInfo &service_worker_version_info,
+            blink::AssociatedInterfaceRegistry &associated_registry) override;
+#endif
 
     bool CanCreateWindow(content::RenderFrameHost *opener,
                          const GURL &opener_url,
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index a88d407b4d7..f8f8623e600 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -61,6 +61,7 @@
 
 #include "extensions/common/constants.h"
 #include "extensions/renderer/api/core_extensions_renderer_api_provider.h"
+#include "extensions/renderer/dispatcher.h"
 #include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container_manager.h"
 #include "mojo/public/cpp/bindings/associated_remote.h"
 #include "services/service_manager/public/cpp/binder_registry.h"
@@ -475,6 +476,39 @@ chrome::WebRtcLoggingAgentImpl *ContentRendererClientQt::GetWebRtcLoggingAgent()
 }
 #endif // QT_CONFIG(webengine_webrtc) && QT_CONFIG(webengine_extensions)
 
+#if QT_CONFIG(webengine_extensions)
+void ContentRendererClientQt::WillEvaluateServiceWorkerOnWorkerThread(
+        blink::WebServiceWorkerContextProxy *context_proxy, v8::Local<v8::Context> v8_context,
+        int64_t service_worker_version_id, const GURL &service_worker_scope, const GURL &script_url,
+        const blink::ServiceWorkerToken &service_worker_token)
+{
+    ExtensionsRendererClientQt::GetInstance()
+            ->dispatcher()
+            ->WillEvaluateServiceWorkerOnWorkerThread(
+                    context_proxy, v8_context, service_worker_version_id, service_worker_scope,
+                    script_url, service_worker_token);
+}
+
+void ContentRendererClientQt::DidInitializeServiceWorkerContextOnWorkerThread(
+        blink::WebServiceWorkerContextProxy *context_proxy, const GURL &service_worker_scope,
+        const GURL &script_url)
+{
+    extensions::ExtensionsRendererClient::Get()
+            ->dispatcher()
+            ->DidInitializeServiceWorkerContextOnWorkerThread(context_proxy, service_worker_scope,
+                                                              script_url);
+}
+
+void ContentRendererClientQt::DidStartServiceWorkerContextOnWorkerThread(
+        int64_t service_worker_version_id, const GURL &service_worker_scope, const GURL &script_url)
+{
+    extensions::ExtensionsRendererClient::Get()
+            ->dispatcher()
+            ->DidStartServiceWorkerContextOnWorkerThread(service_worker_version_id,
+                                                         service_worker_scope, script_url);
+}
+#endif // QT_CONFIG(webengine_extensions)
+
 void ContentRendererClientQt::GetInterface(const std::string &interface_name, mojo::ScopedMessagePipeHandle interface_pipe)
 {
     content::RenderThread::Get()->BindHostReceiver(mojo::GenericPendingReceiver(interface_name, std::move(interface_pipe)));
diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h
index 36a2ffe0a4b..42939d89f92 100644
--- a/src/core/renderer/content_renderer_client_qt.h
+++ b/src/core/renderer/content_renderer_client_qt.h
@@ -94,6 +94,20 @@ class ContentRendererClientQt
     chrome::WebRtcLoggingAgentImpl *GetWebRtcLoggingAgent();
 #endif
 
+#if QT_CONFIG(webengine_extensions)
+    void WillEvaluateServiceWorkerOnWorkerThread(
+            blink::WebServiceWorkerContextProxy *context_proxy, v8::Local<v8::Context> v8_context,
+            int64_t service_worker_version_id, const GURL &service_worker_scope,
+            const GURL &script_url, const blink::ServiceWorkerToken &service_worker_token) override;
+
+    void DidInitializeServiceWorkerContextOnWorkerThread(
+            blink::WebServiceWorkerContextProxy *context_proxy, const GURL &service_worker_scope,
+            const GURL &script_url) override;
+
+    void DidStartServiceWorkerContextOnWorkerThread(int64_t service_worker_version_id,
+                                                    const GURL &service_worker_scope,
+                                                    const GURL &script_url) override;
+#endif
 
 private:
 #if QT_CONFIG(webengine_spellchecker)
diff --git a/tests/auto/widgets/extensions/resources/service_worker_ext/content_script.js b/tests/auto/widgets/extensions/resources/service_worker_ext/content_script.js
new file mode 100644
index 00000000000..d11a26d5bac
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/service_worker_ext/content_script.js
@@ -0,0 +1,7 @@
+chrome.runtime.sendMessage("ping", (response) => {
+    if (response === "pong") {
+        let testNode = document.createElement("div")
+        testNode.id = "testNode"
+        document.body.appendChild(testNode)
+    }
+})
diff --git a/tests/auto/widgets/extensions/resources/service_worker_ext/manifest.json b/tests/auto/widgets/extensions/resources/service_worker_ext/manifest.json
new file mode 100644
index 00000000000..ea19108c158
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/service_worker_ext/manifest.json
@@ -0,0 +1,18 @@
+{
+    "name": "service worker",
+    "version": "1.0",
+    "manifest_version": 3,
+    "background": {
+        "service_worker": "service_worker.js"
+    },
+    "content_scripts": [
+        {
+            "matches": [
+                "<all_urls>"
+            ],
+            "js": [
+                "content_script.js"
+            ]
+        }
+    ]
+}
diff --git a/tests/auto/widgets/extensions/resources/service_worker_ext/service_worker.js b/tests/auto/widgets/extensions/resources/service_worker_ext/service_worker.js
new file mode 100644
index 00000000000..f31e0e13f59
--- /dev/null
+++ b/tests/auto/widgets/extensions/resources/service_worker_ext/service_worker.js
@@ -0,0 +1,5 @@
+chrome.runtime.onMessage.addListener((message, _, sendResponse) => {
+    if (message === "ping")
+        sendResponse("pong")
+        return true;
+})
diff --git a/tests/auto/widgets/extensions/tst_qwebengineextension.cpp b/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
index 0027c95f9e1..b6e7cf81fa0 100644
--- a/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
+++ b/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
@@ -40,6 +40,7 @@ private Q_SLOTS:
     void loadInIncognito();
     void installInIncognito();
     void loadInstalledExtensions();
+    void serviceWorkerMessaging();
 
 private:
     int installedFiles();
@@ -356,5 +357,20 @@ void tst_QWebEngineExtension::loadInstalledExtensions()
     QTRY_COMPARE(manager2->extensions().size(), extensionCount);
 }
 
+void tst_QWebEngineExtension::serviceWorkerMessaging()
+{
+    int lastExtensionCount = extensionCount();
+    QWebEngineExtensionInfo extension = loadExtensionSync(resourcesPath() + u"service_worker_ext");
+    QVERIFY(extension.isLoaded());
+    m_manager->setExtensionEnabled(extension, true);
+    QCOMPARE(extensionCount(), ++lastExtensionCount);
+    QCOMPARE(installedFiles(), 0);
+
+    QSignalSpy loadSpy(m_page, SIGNAL(loadFinished(bool)));
+    m_page->load(QUrl("qrc:///resources/index.html"));
+    QTRY_COMPARE(loadSpy.size(), 1);
+    QTRY_COMPARE(evaluateJavaScriptSync(m_page, "document.body.childElementCount"), 1);
+}
+
 QTEST_MAIN(tst_QWebEngineExtension)
 #include "tst_qwebengineextension.moc"

From d2f562a75a89a86c60fff2851b73946f50d6a1da Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Fri, 30 May 2025 15:34:34 +0200
Subject: [PATCH 011/100] NativeSkiaOutputDevice: Set color type according to
 NativePixmap support

NativePixmapEGLX11Binding requires the BGRA_8888 color type, use it for
the check too. The GL graphics context doesn't necessarily mean that we
need BGRA.

Change-Id: I41a4f1f6da94c10f8e6843e6edfed913bb98fabd
Reviewed-by: Moss Heim <moss.heim@qt.io>
(cherry picked from commit 810e5871c6badfa8e44fc5b543bf923e933624ec)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../compositor/native_skia_output_device.cpp  | 15 +++++++++++
 .../native_skia_output_device_opengl.cpp      |  5 ++--
 src/core/ozone/gl_ozone_angle_qt.cpp          | 27 ++++++-------------
 src/core/ozone/gl_ozone_angle_qt.h            | 20 ++++++++++++++
 4 files changed, 46 insertions(+), 21 deletions(-)

diff --git a/src/core/compositor/native_skia_output_device.cpp b/src/core/compositor/native_skia_output_device.cpp
index f42b2b93341..948686be7ae 100644
--- a/src/core/compositor/native_skia_output_device.cpp
+++ b/src/core/compositor/native_skia_output_device.cpp
@@ -20,6 +20,8 @@
 #include "ui/gl/gl_fence.h"
 
 #if BUILDFLAG(IS_OZONE)
+#include "ozone/gl_ozone_angle_qt.h"
+
 #include "ui/ozone/public/ozone_platform.h"
 #endif
 
@@ -63,6 +65,19 @@ NativeSkiaOutputDevice::NativeSkiaOutputDevice(
                                         .supports_native_pixmaps;
     qCDebug(lcWebEngineCompositor, "Native Buffer Supported: %s",
             m_isNativeBufferSupported ? "yes" : "no");
+
+    auto typeToString = [](ui::NativePixmapSupportType type) -> const char * {
+        switch (type) {
+        case ui::NativePixmapSupportType::kDMABuf:
+            return "DMABuf";
+        case ui::NativePixmapSupportType::kX11Pixmap:
+            return "X11Pixmap";
+        default:
+            return "None";
+        }
+    };
+    qCDebug(lcWebEngineCompositor, "Native Pixmap Support Type: %s",
+            typeToString(ui::GLOzoneANGLEQt::getNativePixmapSupportType()));
 #endif
 }
 
diff --git a/src/core/compositor/native_skia_output_device_opengl.cpp b/src/core/compositor/native_skia_output_device_opengl.cpp
index e72052512cb..8f8413857e7 100644
--- a/src/core/compositor/native_skia_output_device_opengl.cpp
+++ b/src/core/compositor/native_skia_output_device_opengl.cpp
@@ -12,6 +12,7 @@
 
 #if BUILDFLAG(IS_OZONE)
 #include "ozone/gl_helper.h"
+#include "ozone/gl_ozone_angle_qt.h"
 #include "ozone/ozone_util_qt.h"
 
 #include "base/posix/eintr_wrapper.h"
@@ -62,8 +63,8 @@ NativeSkiaOutputDeviceOpenGL::NativeSkiaOutputDeviceOpenGL(
     qCDebug(lcWebEngineCompositor, "Native Skia Output Device: OpenGL");
 
     SkColorType skColorType = kRGBA_8888_SkColorType;
-#if BUILDFLAG(IS_OZONE_X11) && QT_CONFIG(xcb_glx_plugin)
-    if (OzoneUtilQt::usingGLX() && m_contextState->gr_context_type() == gpu::GrContextType::kGL)
+#if BUILDFLAG(IS_OZONE)
+    if (ui::GLOzoneANGLEQt::getNativePixmapSupportType() == ui::NativePixmapSupportType::kX11Pixmap)
         skColorType = kBGRA_8888_SkColorType;
 #endif
 
diff --git a/src/core/ozone/gl_ozone_angle_qt.cpp b/src/core/ozone/gl_ozone_angle_qt.cpp
index 359d04a4545..b5fa45cd894 100644
--- a/src/core/ozone/gl_ozone_angle_qt.cpp
+++ b/src/core/ozone/gl_ozone_angle_qt.cpp
@@ -6,6 +6,7 @@
 // found in the LICENSE file.
 
 #include "gl_ozone_angle_qt.h"
+#include "surface_factory_qt.h"
 
 #include "ui/base/ozone_buildflags.h"
 #include "ui/gl/gl_bindings.h"
@@ -26,23 +27,12 @@ extern __eglMustCastToProperFunctionPointerType EGL_GetProcAddress(const char *p
 }
 
 namespace ui {
-namespace {
-// Based on //ui/ozone/platform/x11/x11_surface_factory.cc
-enum class NativePixmapSupportType {
-    // Importing native pixmaps not supported.
-    kNone,
-
-    // Native pixmaps are imported directly into EGL using the
-    // EGL_EXT_image_dma_buf_import extension.
-    kDMABuf,
-
-    // Native pixmaps are first imported as X11 pixmaps using DRI3 and then into
-    // EGL.
-    kX11Pixmap,
-};
-
-NativePixmapSupportType GetNativePixmapSupportType()
+
+NativePixmapSupportType GLOzoneANGLEQt::getNativePixmapSupportType()
 {
+    if (!QtWebEngineCore::SurfaceFactoryQt::SupportsNativePixmaps())
+        return NativePixmapSupportType::kNone;
+
     if (gl::GLSurfaceEGL::GetGLDisplayEGL()->ext->b_EGL_EXT_image_dma_buf_import)
         return NativePixmapSupportType::kDMABuf;
 
@@ -53,7 +43,6 @@ NativePixmapSupportType GetNativePixmapSupportType()
 
     return NativePixmapSupportType::kNone;
 }
-} // namespace
 
 bool GLOzoneANGLEQt::LoadGLES2Bindings(const gl::GLImplementationParts & /*implementation*/)
 {
@@ -107,7 +96,7 @@ gl::EGLDisplayPlatform GLOzoneANGLEQt::GetNativeDisplay()
 
 bool GLOzoneANGLEQt::CanImportNativePixmap(gfx::BufferFormat format)
 {
-    switch (GetNativePixmapSupportType()) {
+    switch (getNativePixmapSupportType()) {
     case NativePixmapSupportType::kDMABuf:
         return NativePixmapEGLBinding::IsBufferFormatSupported(format);
 #if BUILDFLAG(IS_OZONE_X11)
@@ -125,7 +114,7 @@ GLOzoneANGLEQt::ImportNativePixmap(scoped_refptr<gfx::NativePixmap> pixmap,
                                    gfx::Size plane_size, const gfx::ColorSpace &color_space,
                                    GLenum target, GLuint texture_id)
 {
-    switch (GetNativePixmapSupportType()) {
+    switch (getNativePixmapSupportType()) {
     case NativePixmapSupportType::kDMABuf:
         return NativePixmapEGLBinding::Create(pixmap, plane_format, plane, plane_size, color_space,
                                               target, texture_id);
diff --git a/src/core/ozone/gl_ozone_angle_qt.h b/src/core/ozone/gl_ozone_angle_qt.h
index e8d7af6aa71..240fa98b6c2 100644
--- a/src/core/ozone/gl_ozone_angle_qt.h
+++ b/src/core/ozone/gl_ozone_angle_qt.h
@@ -1,6 +1,10 @@
 // Copyright (C) 2024 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
 
+// Copyright 2016 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
 #ifndef GL_OZONE_ANGLE_QT_H
 #define GL_OZONE_ANGLE_QT_H
 
@@ -8,9 +12,25 @@
 
 namespace ui {
 
+// Based on //ui/ozone/platform/x11/x11_surface_factory.cc
+enum class NativePixmapSupportType {
+    // Importing native pixmaps not supported.
+    kNone,
+
+    // Native pixmaps are imported directly into EGL using the
+    // EGL_EXT_image_dma_buf_import extension.
+    kDMABuf,
+
+    // Native pixmaps are first imported as X11 pixmaps using DRI3 and then into
+    // EGL.
+    kX11Pixmap,
+};
+
 class GLOzoneANGLEQt : public GLOzoneEGL
 {
 public:
+    static NativePixmapSupportType getNativePixmapSupportType();
+
     bool InitializeStaticGLBindings(const gl::GLImplementationParts &implementation) override;
     bool InitializeExtensionSettingsOneOffPlatform(gl::GLDisplay *display) override;
     scoped_refptr<gl::GLSurface> CreateViewGLSurface(gl::GLDisplay *display,

From bbaeadecfc455faf2e84cdf1b718bace73666828 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Wed, 14 May 2025 14:02:56 +0200
Subject: [PATCH 012/100] Make possible to use fake GL API with Vulkan

This configuration disables ANGLE but it still renders with Vulkan.

Enable it with:
--webEngineArgs --enable-features=Vulkan --use-vulkan=native
--use-gl=stub

WebGL is not expected to work with this configuration since it requires
real GL API.

Change-Id: I7bc292e0c131c2cebe345f70bd3163dd3e6b2972
Reviewed-by: Moss Heim <moss.heim@qt.io>
(cherry picked from commit 0d7f11ea2c9ed6f60a03ecbf2707f90c06e9b3b1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/compositor/display_overrides.cpp |  3 ---
 src/core/ozone/surface_factory_qt.cpp     |  1 +
 src/core/web_engine_context.cpp           | 11 +++++++++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/core/compositor/display_overrides.cpp b/src/core/compositor/display_overrides.cpp
index 32012f7cf3d..c33e79e54ef 100644
--- a/src/core/compositor/display_overrides.cpp
+++ b/src/core/compositor/display_overrides.cpp
@@ -40,9 +40,6 @@ viz::SkiaOutputSurfaceImplOnGpu::CreateOutputDevice()
 
 #if QT_CONFIG(opengl)
     if (graphicsApi == QSGRendererInterface::OpenGL) {
-        if (gl::GetGLImplementation() != gl::kGLImplementationEGLANGLE)
-            qFatal("OpenGL is only supported over ANGLE.");
-
         return std::make_unique<QtWebEngineCore::NativeSkiaOutputDeviceOpenGL>(
                 context_state_, renderer_settings_.requires_alpha_channel,
                 shared_gpu_deps_->memory_tracker(), dependency_.get(), shared_image_factory_.get(),
diff --git a/src/core/ozone/surface_factory_qt.cpp b/src/core/ozone/surface_factory_qt.cpp
index 95af160a723..05f5b43f7e4 100644
--- a/src/core/ozone/surface_factory_qt.cpp
+++ b/src/core/ozone/surface_factory_qt.cpp
@@ -39,6 +39,7 @@ SurfaceFactoryQt::SurfaceFactoryQt()
     m_impls.push_back({ gl::GLImplementationParts(gl::kGLImplementationEGLANGLE),
                         std::make_unique<ui::GLOzoneANGLEQt>() });
 #endif
+    m_impls.push_back({ gl::GLImplementationParts(gl::kGLImplementationStubGL), nullptr });
     m_impls.push_back({ gl::GLImplementationParts(gl::kGLImplementationDisabled), nullptr });
 }
 
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 83f4df32c67..6346819ec20 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -409,8 +409,15 @@ static std::string getGLType(const base::CommandLine &cmd)
     return gl::kGLImplementationANGLEName;
 }
 
-static bool isGLTypeSupported(const std::string &glType)
+static bool isGLTypeSupported(const std::string &glType, bool usingVulkan = false)
 {
+#if BUILDFLAG(IS_OZONE)
+    if (glType == gl::kGLImplementationStubName)
+        return usingVulkan;
+#else
+    Q_UNUSED(usingVulkan);
+#endif
+
     if (glType == gl::kGLImplementationANGLEName || glType == gl::kGLImplementationDisabledName)
         return true;
 
@@ -1002,7 +1009,7 @@ WebEngineContext::WebEngineContext()
     logContext(parsedCommandLine);
 
     // Early error on unsupported --use-gl settings.
-    if (!isGLTypeSupported(glType))
+    if (!isGLTypeSupported(glType, isFeatureEnabled(features::kVulkan.name, parsedCommandLine)))
         qFatal("--use-gl=%s is not supported with the current configuration.", glType.c_str());
 
     registerMainThreadFactories();

From 3d4af9b7f55f9d1c104ce4aa41ba3bf38a961445 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Thu, 15 May 2025 09:16:29 +0200
Subject: [PATCH 013/100] Make possible to use system EGL instead of ANGLE on
 Linux

This is not the same direct EGL rendering solution what we used to have
before QtWebEngine 6.9. With this configuration, the texture is accessed
via NativePixmap instead of using shared GL context. Thus this
implementation doesn't need adaptations in Chromium.

This configuration is meant to be used for identifying ANGLE specific
issues.

Enable it with:
--webEngineArgs --use-gl=egl

Change-Id: Ib8db5573b2001157eaee799c6b333f722ab87604
Reviewed-by: Moss Heim <moss.heim@qt.io>
(cherry picked from commit 18210c2516759d4089a835e384d1b3ef88755c38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/CMakeLists.txt                       |  2 +-
 .../compositor/native_skia_output_device.cpp  |  4 +-
 .../native_skia_output_device_opengl.cpp      | 10 +-
 ...{gl_ozone_angle_qt.cpp => gl_ozone_qt.cpp} | 96 +++++++++++++++----
 .../{gl_ozone_angle_qt.h => gl_ozone_qt.h}    | 29 ++++--
 src/core/ozone/surface_factory_qt.cpp         |  4 +-
 src/core/web_engine_context.cpp               |  3 +
 7 files changed, 119 insertions(+), 29 deletions(-)
 rename src/core/ozone/{gl_ozone_angle_qt.cpp => gl_ozone_qt.cpp} (56%)
 rename src/core/ozone/{gl_ozone_angle_qt.h => gl_ozone_qt.h} (79%)

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index e2594a09ba7..b1298482063 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -206,7 +206,7 @@ foreach(arch ${archs})
 
         extend_gn_target(${buildGn} CONDITION LINUX
             SOURCES
-                ozone/gl_ozone_angle_qt.cpp ozone/gl_ozone_angle_qt.h
+                ozone/gl_ozone_qt.cpp ozone/gl_ozone_qt.h
                 ozone/ozone_util_qt.cpp ozone/ozone_util_qt.h
                 ozone/platform_window_qt.cpp ozone/platform_window_qt.h
                 ozone/surface_factory_qt.cpp ozone/surface_factory_qt.h
diff --git a/src/core/compositor/native_skia_output_device.cpp b/src/core/compositor/native_skia_output_device.cpp
index 948686be7ae..bf8fd575ab5 100644
--- a/src/core/compositor/native_skia_output_device.cpp
+++ b/src/core/compositor/native_skia_output_device.cpp
@@ -20,7 +20,7 @@
 #include "ui/gl/gl_fence.h"
 
 #if BUILDFLAG(IS_OZONE)
-#include "ozone/gl_ozone_angle_qt.h"
+#include "ozone/gl_ozone_qt.h"
 
 #include "ui/ozone/public/ozone_platform.h"
 #endif
@@ -77,7 +77,7 @@ NativeSkiaOutputDevice::NativeSkiaOutputDevice(
         }
     };
     qCDebug(lcWebEngineCompositor, "Native Pixmap Support Type: %s",
-            typeToString(ui::GLOzoneANGLEQt::getNativePixmapSupportType()));
+            typeToString(ui::GLOzoneQt::getNativePixmapSupportType()));
 #endif
 }
 
diff --git a/src/core/compositor/native_skia_output_device_opengl.cpp b/src/core/compositor/native_skia_output_device_opengl.cpp
index 8f8413857e7..7421ea93312 100644
--- a/src/core/compositor/native_skia_output_device_opengl.cpp
+++ b/src/core/compositor/native_skia_output_device_opengl.cpp
@@ -12,7 +12,7 @@
 
 #if BUILDFLAG(IS_OZONE)
 #include "ozone/gl_helper.h"
-#include "ozone/gl_ozone_angle_qt.h"
+#include "ozone/gl_ozone_qt.h"
 #include "ozone/ozone_util_qt.h"
 
 #include "base/posix/eintr_wrapper.h"
@@ -64,8 +64,14 @@ NativeSkiaOutputDeviceOpenGL::NativeSkiaOutputDeviceOpenGL(
 
     SkColorType skColorType = kRGBA_8888_SkColorType;
 #if BUILDFLAG(IS_OZONE)
-    if (ui::GLOzoneANGLEQt::getNativePixmapSupportType() == ui::NativePixmapSupportType::kX11Pixmap)
+    ui::NativePixmapSupportType type = ui::GLOzoneQt::getNativePixmapSupportType();
+    if (type == ui::NativePixmapSupportType::kX11Pixmap)
         skColorType = kBGRA_8888_SkColorType;
+
+    if (type == ui::NativePixmapSupportType::kDMABuf && OzoneUtilQt::usingGLX()
+        && gl::GetGLImplementation() == gl::kGLImplementationEGLGLES2) {
+        skColorType = kBGRA_8888_SkColorType;
+    }
 #endif
 
     capabilities_.sk_color_type_map[viz::SinglePlaneFormat::kRGBA_8888] = skColorType;
diff --git a/src/core/ozone/gl_ozone_angle_qt.cpp b/src/core/ozone/gl_ozone_qt.cpp
similarity index 56%
rename from src/core/ozone/gl_ozone_angle_qt.cpp
rename to src/core/ozone/gl_ozone_qt.cpp
index b5fa45cd894..2a9bd18b7da 100644
--- a/src/core/ozone/gl_ozone_angle_qt.cpp
+++ b/src/core/ozone/gl_ozone_qt.cpp
@@ -5,8 +5,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "gl_ozone_angle_qt.h"
+#include "gl_ozone_qt.h"
 #include "surface_factory_qt.h"
+#include "ozone_util_qt.h"
+
+#include <QtCore/private/qconfig_p.h>
+#include <QtGui/qopenglcontext.h>
 
 #include "ui/base/ozone_buildflags.h"
 #include "ui/gl/gl_bindings.h"
@@ -21,6 +25,10 @@
 #include "ui/ozone/platform/x11/native_pixmap_egl_x11_binding.h"
 #endif
 
+#if QT_CONFIG(dlopen)
+#include <dlfcn.h>
+#endif
+
 extern "C" {
 typedef void (*__eglMustCastToProperFunctionPointerType)(void);
 extern __eglMustCastToProperFunctionPointerType EGL_GetProcAddress(const char *procname);
@@ -28,7 +36,7 @@ extern __eglMustCastToProperFunctionPointerType EGL_GetProcAddress(const char *p
 
 namespace ui {
 
-NativePixmapSupportType GLOzoneANGLEQt::getNativePixmapSupportType()
+NativePixmapSupportType GLOzoneQt::getNativePixmapSupportType()
 {
     if (!QtWebEngineCore::SurfaceFactoryQt::SupportsNativePixmaps())
         return NativePixmapSupportType::kNone;
@@ -44,32 +52,31 @@ NativePixmapSupportType GLOzoneANGLEQt::getNativePixmapSupportType()
     return NativePixmapSupportType::kNone;
 }
 
-bool GLOzoneANGLEQt::LoadGLES2Bindings(const gl::GLImplementationParts & /*implementation*/)
+bool GLOzoneQt::LoadGLES2Bindings(const gl::GLImplementationParts & /*implementation*/)
 {
-    gl::SetGLGetProcAddressProc(&EGL_GetProcAddress);
-    return true;
+    return false;
 }
 
-bool GLOzoneANGLEQt::InitializeStaticGLBindings(const gl::GLImplementationParts &implementation)
+bool GLOzoneQt::InitializeStaticGLBindings(const gl::GLImplementationParts &implementation)
 {
     return GLOzoneEGL::InitializeStaticGLBindings(implementation);
 }
 
-bool GLOzoneANGLEQt::InitializeExtensionSettingsOneOffPlatform(gl::GLDisplay *display)
+bool GLOzoneQt::InitializeExtensionSettingsOneOffPlatform(gl::GLDisplay *display)
 {
     return GLOzoneEGL::InitializeExtensionSettingsOneOffPlatform(
             static_cast<gl::GLDisplayEGL *>(display));
 }
 
-scoped_refptr<gl::GLSurface> GLOzoneANGLEQt::CreateViewGLSurface(gl::GLDisplay * /*display*/,
-                                                                 gfx::AcceleratedWidget /*window*/)
+scoped_refptr<gl::GLSurface> GLOzoneQt::CreateViewGLSurface(gl::GLDisplay * /*display*/,
+                                                            gfx::AcceleratedWidget /*window*/)
 {
     return nullptr;
 }
 
 // based on GLOzoneEGLX11::CreateOffscreenGLSurface() (x11_surface_factory.cc)
-scoped_refptr<gl::GLSurface> GLOzoneANGLEQt::CreateOffscreenGLSurface(gl::GLDisplay *display,
-                                                                      const gfx::Size &size)
+scoped_refptr<gl::GLSurface> GLOzoneQt::CreateOffscreenGLSurface(gl::GLDisplay *display,
+                                                                 const gfx::Size &size)
 {
     gl::GLDisplayEGL *eglDisplay = display->GetAs<gl::GLDisplayEGL>();
 
@@ -79,7 +86,7 @@ scoped_refptr<gl::GLSurface> GLOzoneANGLEQt::CreateOffscreenGLSurface(gl::GLDisp
     return InitializeGLSurface(new gl::PbufferGLSurfaceEGL(eglDisplay, size));
 }
 
-gl::EGLDisplayPlatform GLOzoneANGLEQt::GetNativeDisplay()
+gl::EGLDisplayPlatform GLOzoneQt::GetNativeDisplay()
 {
 #if BUILDFLAG(IS_OZONE_X11)
     static EGLNativeDisplayType nativeDisplay =
@@ -94,7 +101,7 @@ gl::EGLDisplayPlatform GLOzoneANGLEQt::GetNativeDisplay()
     return gl::EGLDisplayPlatform(EGL_DEFAULT_DISPLAY);
 }
 
-bool GLOzoneANGLEQt::CanImportNativePixmap(gfx::BufferFormat format)
+bool GLOzoneQt::CanImportNativePixmap(gfx::BufferFormat format)
 {
     switch (getNativePixmapSupportType()) {
     case NativePixmapSupportType::kDMABuf:
@@ -109,10 +116,10 @@ bool GLOzoneANGLEQt::CanImportNativePixmap(gfx::BufferFormat format)
 }
 
 std::unique_ptr<NativePixmapGLBinding>
-GLOzoneANGLEQt::ImportNativePixmap(scoped_refptr<gfx::NativePixmap> pixmap,
-                                   gfx::BufferFormat plane_format, gfx::BufferPlane plane,
-                                   gfx::Size plane_size, const gfx::ColorSpace &color_space,
-                                   GLenum target, GLuint texture_id)
+GLOzoneQt::ImportNativePixmap(scoped_refptr<gfx::NativePixmap> pixmap,
+                              gfx::BufferFormat plane_format, gfx::BufferPlane plane,
+                              gfx::Size plane_size, const gfx::ColorSpace &color_space,
+                              GLenum target, GLuint texture_id)
 {
     switch (getNativePixmapSupportType()) {
     case NativePixmapSupportType::kDMABuf:
@@ -129,4 +136,59 @@ GLOzoneANGLEQt::ImportNativePixmap(scoped_refptr<gfx::NativePixmap> pixmap,
     }
 }
 
+bool GLOzoneANGLEQt::LoadGLES2Bindings(const gl::GLImplementationParts & /*implementation*/)
+{
+    gl::SetGLGetProcAddressProc(&EGL_GetProcAddress);
+    return true;
+}
+
+void GLOzoneEGLQt::ShutdownGL(gl::GLDisplay *display)
+{
+    GLOzoneEGL::ShutdownGL(display);
+#if QT_CONFIG(dlopen)
+    if (m_nativeEGLHandle)
+        dlclose(m_nativeEGLHandle);
+#endif
+}
+
+bool GLOzoneEGLQt::LoadGLES2Bindings(const gl::GLImplementationParts & /*implementation*/)
+{
+    gl::GLGetProcAddressProc getProcAddressPtr = nullptr;
+
+    if (OzoneUtilQt::usingEGL()) {
+        QOpenGLContext *context = OzoneUtilQt::getQOpenGLContext();
+        getProcAddressPtr = reinterpret_cast<gl::GLGetProcAddressProc>(
+                context->getProcAddress("eglGetProcAddress"));
+    }
+
+#if QT_CONFIG(dlopen)
+    if (getProcAddressPtr == nullptr) {
+        const char *eglPath = "libEGL.so.1";
+        m_nativeEGLHandle = dlopen(eglPath, RTLD_NOW);
+        if (!m_nativeEGLHandle) {
+            qWarning("Failed to load EGL library %s: %s", eglPath, dlerror());
+            return false;
+        }
+
+        getProcAddressPtr = reinterpret_cast<gl::GLGetProcAddressProc>(
+                dlsym(m_nativeEGLHandle, "eglGetProcAddress"));
+    }
+#endif // QT_CONFIG(dlopen)
+
+    if (!getProcAddressPtr) {
+        char *error = nullptr;
+#if QT_CONFIG(dlopen)
+        error = dlerror();
+#endif
+        qWarning("Failed to get address of eglGetProcAddress: %s", error ? error : "no error.");
+        return false;
+    }
+
+    gl::SetGLGetProcAddressProc(getProcAddressPtr);
+    // TODO: Log EGL driver information.
+    //       Nvidia fails to make EGL context current if libEGL.so.1 is loaded directly. This could
+    //       be because of loading the wrong driver.
+    return true;
+}
+
 } // namespace ui
diff --git a/src/core/ozone/gl_ozone_angle_qt.h b/src/core/ozone/gl_ozone_qt.h
similarity index 79%
rename from src/core/ozone/gl_ozone_angle_qt.h
rename to src/core/ozone/gl_ozone_qt.h
index 240fa98b6c2..aba63cbb201 100644
--- a/src/core/ozone/gl_ozone_angle_qt.h
+++ b/src/core/ozone/gl_ozone_qt.h
@@ -1,12 +1,11 @@
-// Copyright (C) 2024 The Qt Company Ltd.
+// Copyright (C) 2025 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
 
 // Copyright 2016 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-
-#ifndef GL_OZONE_ANGLE_QT_H
-#define GL_OZONE_ANGLE_QT_H
+#ifndef GL_OZONE_QT_H
+#define GL_OZONE_QT_H
 
 #include "ui/ozone/common/gl_ozone_egl.h"
 
@@ -26,7 +25,7 @@ enum class NativePixmapSupportType {
     kX11Pixmap,
 };
 
-class GLOzoneANGLEQt : public GLOzoneEGL
+class GLOzoneQt : public GLOzoneEGL
 {
 public:
     static NativePixmapSupportType getNativePixmapSupportType();
@@ -53,6 +52,24 @@ class GLOzoneANGLEQt : public GLOzoneEGL
     bool LoadGLES2Bindings(const gl::GLImplementationParts &implementation) override;
 };
 
+class GLOzoneANGLEQt : public GLOzoneQt
+{
+protected:
+    bool LoadGLES2Bindings(const gl::GLImplementationParts &implementation) override;
+};
+
+class GLOzoneEGLQt : public GLOzoneQt
+{
+public:
+    void ShutdownGL(gl::GLDisplay *display) override;
+
+protected:
+    bool LoadGLES2Bindings(const gl::GLImplementationParts &implementation) override;
+
+private:
+    void *m_nativeEGLHandle = nullptr;
+};
+
 } // namespace ui
 
-#endif // GL_OZONE_ANGLE_QT_H
+#endif // GL_OZONE_QT_H
diff --git a/src/core/ozone/surface_factory_qt.cpp b/src/core/ozone/surface_factory_qt.cpp
index 05f5b43f7e4..bda4bfb8a6e 100644
--- a/src/core/ozone/surface_factory_qt.cpp
+++ b/src/core/ozone/surface_factory_qt.cpp
@@ -4,7 +4,7 @@
 #include "surface_factory_qt.h"
 
 #include "qtwebenginecoreglobal_p.h"
-#include "ozone/gl_ozone_angle_qt.h"
+#include "ozone/gl_ozone_qt.h"
 #include "ozone/ozone_util_qt.h"
 #include "qtwebenginecoreglobal_p.h"
 
@@ -38,6 +38,8 @@ SurfaceFactoryQt::SurfaceFactoryQt()
 #if QT_CONFIG(opengl)
     m_impls.push_back({ gl::GLImplementationParts(gl::kGLImplementationEGLANGLE),
                         std::make_unique<ui::GLOzoneANGLEQt>() });
+    m_impls.push_back({ gl::GLImplementationParts(gl::kGLImplementationEGLGLES2),
+                        std::make_unique<ui::GLOzoneEGLQt>() });
 #endif
     m_impls.push_back({ gl::GLImplementationParts(gl::kGLImplementationStubGL), nullptr });
     m_impls.push_back({ gl::GLImplementationParts(gl::kGLImplementationDisabled), nullptr });
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 6346819ec20..bdd212f6154 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -412,6 +412,9 @@ static std::string getGLType(const base::CommandLine &cmd)
 static bool isGLTypeSupported(const std::string &glType, bool usingVulkan = false)
 {
 #if BUILDFLAG(IS_OZONE)
+    if (glType == gl::kGLImplementationEGLName)
+        return true;
+
     if (glType == gl::kGLImplementationStubName)
         return usingVulkan;
 #else

From 28a5f419922e32c84e15395f28931d81a69339eb Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Thu, 5 Jun 2025 11:27:15 +0000
Subject: [PATCH 014/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I84ad3ac46b9f654ef87456be27bb786b9c1f83db
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 7a31653145d..87456d885cf 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: fa4568622cc19e5a876238d6cfca2e95936f8bdd
+    ref: c9e836c11cc67a1b2754077505458732d779c353
     required: true
   ../qtpositioning:
-    ref: 1521d9e91f617a60c3aa1f136bfcde5ee267a708
+    ref: cfd78e06228f5503da41e3d4e2756f000db881d6
     required: false
   ../qttools:
-    ref: 9b0e5531293d70e2bc19393174118e0950eb16f6
+    ref: f1c050b703b0b3e73ada17d2394f849f97374821
     required: false
   ../qtwebchannel:
-    ref: 1a06e5afedc8011d8dc91252b4f7bb3dc51baa20
+    ref: 3d94e0c500ff05d3827b437aaa3014e0ca0a9fbc
     required: false

From 2c64e69d67881bba5be3b95c6caa31756dbb3bf8 Mon Sep 17 00:00:00 2001
From: Szabolcs David <davidsz@inf.u-szeged.hu>
Date: Fri, 30 May 2025 15:49:47 +0200
Subject: [PATCH 015/100] Fix QWebEngineLoadingInfo::errorString()

When we try to deduce error messages from HTTP error codes,
the result of error_page::LocalizedError::GetErrorDetails() can
contain empty HTML placeholders for the host name or the full URL.
Replace these with proper URL information to get grammatically
correct error description.
Moreover, prevent filling errorString with misleading error
message when the load was actually successful.

Change-Id: I6ef589e6d31336a4916eb28b17ca14fac56c61a1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit b231ad7aa460b52a527ac04c4bc16abb54ff425e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/web_contents_delegate_qt.cpp         |  3 +-
 src/core/web_engine_error.cpp                 | 12 +++--
 src/core/web_engine_error.h                   |  3 +-
 .../tst_qwebengineloadinginfo.cpp             | 49 +++++++++++++++++++
 4 files changed, 61 insertions(+), 6 deletions(-)

diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 93c534b12e2..e518b5ae172 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -557,7 +557,8 @@ void WebContentsDelegateQt::DidFinishLoad(content::RenderFrameHost* render_frame
     m_loadingInfo.url = toQt(validated_url);
     m_loadingInfo.errorCode = http_statuscode;
     m_loadingInfo.errorDomain = WebEngineError::toQtErrorDomain(http_statuscode);
-    m_loadingInfo.errorDescription = WebEngineError::toQtErrorDescription(http_statuscode);
+    m_loadingInfo.errorDescription =
+            WebEngineError::toQtErrorDescription(http_statuscode, m_loadingInfo.url);
     m_loadingInfo.triggersErrorPage = triggersErrorPage;
 }
 
diff --git a/src/core/web_engine_error.cpp b/src/core/web_engine_error.cpp
index c18dfef8c67..b9b16a467ac 100644
--- a/src/core/web_engine_error.cpp
+++ b/src/core/web_engine_error.cpp
@@ -62,12 +62,16 @@ WebEngineError::ErrorDomain WebEngineError::toQtErrorDomain(int error_code)
         return WebEngineError::InternalErrorDomain;
 }
 
-QString WebEngineError::toQtErrorDescription(int errorCode)
+QString WebEngineError::toQtErrorDescription(int errorCode, const QUrl &url)
 {
     if (errorCode < 0)
         return toQt(net::ErrorToString(errorCode));
-    else if (errorCode > 0)
-        return toQt(error_page::LocalizedError::GetErrorDetails(
-            error_page::Error::kHttpErrorDomain, errorCode, false, false));
+    else if (errorCode >= 400) {
+        QString localizedError = toQt(error_page::LocalizedError::GetErrorDetails(
+                error_page::Error::kHttpErrorDomain, errorCode, false, false));
+        localizedError.replace("<strong jscontent=\"hostName\"></strong>", url.host());
+        localizedError.replace("<strong jscontent=\"failedUrl\"></strong>", url.toString());
+        return localizedError;
+    }
     return QString();
 }
diff --git a/src/core/web_engine_error.h b/src/core/web_engine_error.h
index b43678ad204..8f7bbccc860 100644
--- a/src/core/web_engine_error.h
+++ b/src/core/web_engine_error.h
@@ -16,6 +16,7 @@
 #define WEB_ENGINE_ERROR_H
 
 #include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h>
+#include <QUrl>
 
 class Q_WEBENGINECORE_EXPORT WebEngineError
 {
@@ -35,7 +36,7 @@ class Q_WEBENGINECORE_EXPORT WebEngineError
     static const int UserAbortedError;
 
     static ErrorDomain toQtErrorDomain(int error_code);
-    static QString toQtErrorDescription(int errorCode);
+    static QString toQtErrorDescription(int errorCode, const QUrl &url = QUrl());
 };
 
 #endif // WEB_ENGINE_ERROR_H
diff --git a/tests/auto/core/qwebengineloadinginfo/tst_qwebengineloadinginfo.cpp b/tests/auto/core/qwebengineloadinginfo/tst_qwebengineloadinginfo.cpp
index 010932ea093..773421b8c55 100644
--- a/tests/auto/core/qwebengineloadinginfo/tst_qwebengineloadinginfo.cpp
+++ b/tests/auto/core/qwebengineloadinginfo/tst_qwebengineloadinginfo.cpp
@@ -87,6 +87,55 @@ private Q_SLOTS:
         QTRY_VERIFY(spy.count() > 0);
         QVERIFY(httpServer.stop());
     }
+
+    void errorStrings_data()
+    {
+        QTest::addColumn<int>("responseCode");
+
+        QTest::newRow("HTTP 200") << 200;
+        QTest::newRow("HTTP 500") << 500;
+        QTest::newRow("HTTP 403") << 403;
+        QTest::newRow("HTTP 404") << 404;
+        QTest::newRow("HTTP 410") << 410;
+        QTest::newRow("HTTP 500") << 500;
+        QTest::newRow("HTTP 504") << 504;
+    }
+
+    void errorStrings()
+    {
+        QFETCH(int, responseCode);
+
+        HttpServer httpServer;
+        QObject::connect(&httpServer, &HttpServer::newRequest, this,
+                         [&](HttpReqRep *rr) { rr->sendResponse(responseCode); });
+        QVERIFY(httpServer.start());
+
+        QWebEngineProfile profile;
+        QWebEnginePage page(&profile);
+        page.settings()->setAttribute(QWebEngineSettings::ErrorPageEnabled, false);
+        QSignalSpy spy(&page, SIGNAL(loadFinished(bool)));
+        QObject::connect(
+                &page, &QWebEnginePage::loadingChanged, this,
+                [&](QWebEngineLoadingInfo loadingInfo) {
+                    if (loadingInfo.status() == QWebEngineLoadingInfo::LoadStartedStatus) {
+                        QVERIFY(loadingInfo.errorString().isEmpty());
+                        return;
+                    }
+                    QCOMPARE(loadingInfo.status() == QWebEngineLoadingInfo::LoadSucceededStatus,
+                             loadingInfo.errorString().isEmpty());
+                    QCOMPARE(loadingInfo.status() == QWebEngineLoadingInfo::LoadFailedStatus,
+                             !loadingInfo.errorString().isEmpty());
+                    // The errorString shouldn't contain placeholder HTML tags
+                    QVERIFY(!loadingInfo.errorString().contains("jscontent"));
+                    QVERIFY(!loadingInfo.errorString().contains("hostName"));
+                    QVERIFY(!loadingInfo.errorString().contains("failedUrl"));
+                });
+
+        QWebEngineHttpRequest request(httpServer.url("/somepage.html"));
+        page.load(request);
+        QTRY_VERIFY(spy.count() > 0);
+        QVERIFY(httpServer.stop());
+    }
 };
 
 QTEST_MAIN(tst_QWebEngineLoadingInfo)

From 95593639d124f7adf62418c2a628aacc5284ef74 Mon Sep 17 00:00:00 2001
From: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
Date: Fri, 9 May 2025 14:25:41 +0200
Subject: [PATCH 016/100] Fix accessibility for tables

This change modifies a few of the table-related methods inside
BrowserAccessibilityInterface to use corresponding specialty
methods from Chromium's a11y implementation, instead of relying
on manually extracted attributes. This fixes table contents
always being reported as 'blank' to screen readers.

The kRowHeader and kColumnHeader roles are now exposed as Cell
to Qt (and thus, to the system), which is consistent with what
Chromium does; exposing them to Qt as QAccessible::Row/ColumnHeader
causes some issues when navigating with VoiceOver on macOS.
The caption() method is now implemented as well.

macOS-only implementations of certain platform methods related
to tables have been copied over as well. This fixes some crashes
when iterating through children.

As a drive-by, this also fixes a rare a11y-related crash when in
the middle of deleting a page.

Pick-to: 6.9 6.8
Fixes: QTBUG-136622
Change-Id: I157bece10d3c2261722d7f70e2b879c1d462b137
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 80547b9d786ee4773cabe9c610a5ad60569cf61a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/browser_accessibility_qt.cpp         | 193 ++++++++++++++----
 src/core/render_widget_host_view_qt.cpp       |   4 +-
 .../accessibility/tst_accessibility.cpp       |  56 ++++-
 3 files changed, 210 insertions(+), 43 deletions(-)

diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index 54a15650da0..e7875577e7f 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -25,6 +25,16 @@ class BrowserAccessibilityQt : public ui::BrowserAccessibility
     BrowserAccessibilityQt(ui::BrowserAccessibilityManager *manager, ui::AXNode *node);
     ~BrowserAccessibilityQt();
 
+#if defined(Q_OS_MACOS)
+    // Mac-specific overrides to account for extra nodes
+    size_t PlatformChildCount() const override;
+    ui::BrowserAccessibility *PlatformGetChild(size_t child_index) const override;
+    ui::BrowserAccessibility *PlatformGetFirstChild() const override;
+    ui::BrowserAccessibility *PlatformGetLastChild() const override;
+    ui::BrowserAccessibility *PlatformGetNextSibling() const override;
+    ui::BrowserAccessibility *PlatformGetPreviousSibling() const override;
+#endif
+
     bool isReady() const;
 
     QtWebEngineCore::BrowserAccessibilityInterface *interface = nullptr;
@@ -152,6 +162,96 @@ bool BrowserAccessibilityQt::isReady() const
     return manager()->GetFromID(node()->id()) != nullptr;
 }
 
+#if defined(Q_OS_MACOS)
+
+// Mac-only logic based on ui/accessibility/platform/browser_accessibility_mac.mm:
+
+size_t BrowserAccessibilityQt::PlatformChildCount() const
+{
+    size_t child_count = BrowserAccessibility::PlatformChildCount();
+
+    // If this is a table, include the extra fake nodes generated by
+    // AXTableInfo, for the column nodes and the table header container, all of
+    // which are only important on macOS.
+    const std::vector<raw_ptr<ui::AXNode, VectorExperimental>>* extra_mac_nodes =
+        node()->GetExtraMacNodes();
+    if (!extra_mac_nodes)
+        return child_count;
+
+    return child_count + extra_mac_nodes->size();
+}
+
+ui::BrowserAccessibility* BrowserAccessibilityQt::PlatformGetChild(size_t child_index) const
+{
+    if (child_index < BrowserAccessibility::PlatformChildCount())
+        return BrowserAccessibility::PlatformGetChild(child_index);
+
+    if (child_index >= PlatformChildCount())
+        return nullptr;
+
+    // If this is a table, include the extra fake nodes generated by
+    // AXTableInfo, for the column nodes and the table header container, all of
+    // which are only important on macOS.
+    const std::vector<raw_ptr<ui::AXNode, VectorExperimental>>* extra_mac_nodes =
+        node()->GetExtraMacNodes();
+    if (!extra_mac_nodes || extra_mac_nodes->empty())
+        return nullptr;
+
+    child_index -= BrowserAccessibility::PlatformChildCount();
+    if (child_index < extra_mac_nodes->size())
+        return manager_->GetFromAXNode((*extra_mac_nodes)[child_index]);
+
+    return nullptr;
+}
+
+ui::BrowserAccessibility* BrowserAccessibilityQt::PlatformGetFirstChild() const
+{
+    return PlatformGetChild(0);
+}
+
+ui::BrowserAccessibility* BrowserAccessibilityQt::PlatformGetLastChild() const
+{
+    const std::vector<raw_ptr<ui::AXNode, VectorExperimental>>* extra_mac_nodes =
+      node()->GetExtraMacNodes();
+    if (extra_mac_nodes && !extra_mac_nodes->empty())
+        return manager_->GetFromAXNode(extra_mac_nodes->back());
+    return BrowserAccessibility::PlatformGetLastChild();
+}
+
+ui::BrowserAccessibility* BrowserAccessibilityQt::PlatformGetNextSibling() const
+{
+    BrowserAccessibility* parent = PlatformGetParent();
+    if (parent) {
+        size_t next_child_index = node()->GetUnignoredIndexInParent() + 1;
+        if (next_child_index >= parent->InternalChildCount()
+                && next_child_index < parent->PlatformChildCount()) {
+            // Get the extra_mac_node.
+            return parent->PlatformGetChild(next_child_index);
+        } else if (next_child_index >= parent->PlatformChildCount()) {
+            return nullptr;
+        }
+    }
+    return BrowserAccessibility::PlatformGetNextSibling();
+}
+
+ui::BrowserAccessibility* BrowserAccessibilityQt::PlatformGetPreviousSibling() const
+{
+    BrowserAccessibility* parent = PlatformGetParent();
+    if (parent) {
+        size_t child_index = node()->GetUnignoredIndexInParent();
+        if (child_index > parent->InternalChildCount()
+                && child_index <= parent->PlatformChildCount()) {
+            // Get the extra_mac_node.
+            return parent->PlatformGetChild(child_index - 1);
+        } else if (child_index == 0) {
+            return nullptr;
+        }
+    }
+    return BrowserAccessibility::PlatformGetPreviousSibling();
+}
+
+#endif // defined(Q_OS_MACOS)
+
 BrowserAccessibilityInterface::BrowserAccessibilityInterface(BrowserAccessibilityQt *chromiumInterface)
     : q(chromiumInterface)
 {
@@ -193,8 +293,7 @@ QAccessibleInterface *BrowserAccessibilityInterface::childAt(int x, int y) const
 {
     for (int i = 0; i < childCount(); ++i) {
         QAccessibleInterface *childIface = child(i);
-        Q_ASSERT(childIface);
-        if (childIface->rect().contains(x,y))
+        if (childIface && childIface->rect().contains(x,y))
             return childIface;
     }
     return nullptr;
@@ -262,8 +361,9 @@ QAccessibleInterface *BrowserAccessibilityInterface::focusChild() const
         return const_cast<BrowserAccessibilityInterface *>(this);
 
     for (int i = 0; i < childCount(); ++i) {
-        if (QAccessibleInterface *iface = child(i)->focusChild())
-            return iface;
+        if (QAccessibleInterface *c = child(i))
+            if (QAccessibleInterface *iface = c->focusChild())
+                return iface;
     }
 
     return nullptr;
@@ -370,7 +470,7 @@ QAccessible::Role BrowserAccessibilityInterface::role() const
     case ax::mojom::Role::kColumn:
         return QAccessible::Column;
     case ax::mojom::Role::kColumnHeader:
-        return QAccessible::ColumnHeader;
+        return QAccessible::Cell;  // QAccessible::ColumnHeader causes wrong navigations on macOS
     case ax::mojom::Role::kComboBoxGrouping:
     case ax::mojom::Role::kComboBoxMenuButton:
         return QAccessible::ComboBox;
@@ -629,7 +729,7 @@ QAccessible::Role BrowserAccessibilityInterface::role() const
     case ax::mojom::Role::kRowGroup:
         return QAccessible::Section;
     case ax::mojom::Role::kRowHeader:
-        return QAccessible::RowHeader;
+        return QAccessible::Cell; // QAccessible::RowHeader causes wrong navigations on macOS
     case ax::mojom::Role::kRuby:
         return QAccessible::Grouping;
     case ax::mojom::Role::kRubyAnnotation:
@@ -979,29 +1079,42 @@ QVariant BrowserAccessibilityInterface::minimumStepSize() const
 
 QAccessibleInterface *BrowserAccessibilityInterface::cellAt(int row, int column) const
 {
-    int columns = 0;
-    int rows = 0;
-    if (!q->GetIntAttribute(ax::mojom::IntAttribute::kTableColumnCount, &columns)
-        || !q->GetIntAttribute(ax::mojom::IntAttribute::kTableRowCount, &rows)
-        || columns <= 0
-        || rows <= 0) {
+    if (!isValid() || !q->node()->IsTable())
         return nullptr;
-    }
 
-    if (row < 0 || row >= rows || column < 0 || column >= columns)
-        return nullptr;
+    auto *node = q->node()->GetTableCellFromCoords(row, column);
+    ui::BrowserAccessibility *cell = q->manager()->GetFromAXNode(node);
+    if (cell) {
+        int extent = 1;
+
+        if (cell->GetIntAttribute(ax::mojom::IntAttribute::kTableCellColumnSpan, &extent), extent != 1) {
+            if (cell->GetTableCellColIndex() != column) {
+                // Cell has a column extent greater than 1. Calling code may get confused by
+                // the same cell object being returned by calls to cellAt() with different
+                // parameters, so we return nothing instead
+                return nullptr;
+            }
+        }
+
+        if (cell->GetIntAttribute(ax::mojom::IntAttribute::kTableCellRowSpan, &extent), extent != 1) {
+            if (cell->GetTableCellRowIndex() != row) {
+                // Cell has a row extent greater than 1. Calling code may get confused by
+                // the same cell object being returned by calls to cellAt() with different
+                // parameters, so we return nothing instead
+                return nullptr;
+            }
+        }
 
-    std::optional<int> cell_id = q->GetCellId(row, column);
-    ui::BrowserAccessibility *cell = cell_id ? q->manager()->GetFromID(*cell_id) : nullptr;
-    if (cell)
         return ui::toQAccessibleInterface(cell);
+    }
 
     return nullptr;
 }
 
 QAccessibleInterface *BrowserAccessibilityInterface::caption() const
 {
-    return nullptr;
+    auto *caption = q->manager()->GetFromAXNode(q->node()->GetTableCaption());
+    return caption ? ui::toQAccessibleInterface(caption) : nullptr;
 }
 
 QAccessibleInterface *BrowserAccessibilityInterface::summary() const
@@ -1021,18 +1134,20 @@ QString BrowserAccessibilityInterface::rowDescription(int row) const
 
 int BrowserAccessibilityInterface::columnCount() const
 {
-    int columns = 0;
-    if (q->GetIntAttribute(ax::mojom::IntAttribute::kTableColumnCount, &columns))
-        return columns;
-    return 0;
+    if (!isValid())
+        return 0;
+
+    auto count = q->node()->GetTableColCount();
+    return count ? count.value() : 0;
 }
 
 int BrowserAccessibilityInterface::rowCount() const
 {
-    int rows = 0;
-    if (q->GetIntAttribute(ax::mojom::IntAttribute::kTableRowCount, &rows))
-        return rows;
-    return 0;
+    if (!isValid())
+        return 0;
+
+    auto count = q->node()->GetTableRowCount();
+    return count ? count.value() : 0;
 }
 
 int BrowserAccessibilityInterface::selectedCellCount() const
@@ -1097,6 +1212,9 @@ bool BrowserAccessibilityInterface::unselectColumn(int /*column*/)
 
 int BrowserAccessibilityInterface::columnExtent() const
 {
+    int column = 0;
+    if (q->GetIntAttribute(ax::mojom::IntAttribute::kTableCellColumnSpan, &column))
+        return column;
     return 1;
 }
 
@@ -1107,14 +1225,15 @@ QList<QAccessibleInterface *> BrowserAccessibilityInterface::columnHeaderCells()
 
 int BrowserAccessibilityInterface::columnIndex() const
 {
-    int column = 0;
-    if (q->GetIntAttribute(ax::mojom::IntAttribute::kTableCellColumnIndex, &column))
-        return column;
-    return 0;
+    auto index = q->node()->GetTableCellColIndex();
+    return index ? index.value() : 0;
 }
 
 int BrowserAccessibilityInterface::rowExtent() const
 {
+    int row = 0;
+    if (q->GetIntAttribute(ax::mojom::IntAttribute::kTableCellRowSpan, &row))
+        return row;
     return 1;
 }
 
@@ -1125,10 +1244,8 @@ QList<QAccessibleInterface *> BrowserAccessibilityInterface::rowHeaderCells() co
 
 int BrowserAccessibilityInterface::rowIndex() const
 {
-    int row = 0;
-    if (q->GetIntAttribute(ax::mojom::IntAttribute::kTableCellRowIndex, &row))
-        return row;
-    return 0;
+    auto index = q->node()->GetTableCellRowIndex();
+    return index ? index.value() : 0;
 }
 
 bool BrowserAccessibilityInterface::isSelected() const
@@ -1138,11 +1255,7 @@ bool BrowserAccessibilityInterface::isSelected() const
 
 ui::BrowserAccessibility *BrowserAccessibilityInterface::findTable() const
 {
-    ui::BrowserAccessibility *parent = q->PlatformGetParent();
-    while (parent && parent->GetRole() != ax::mojom::Role::kTable)
-        parent = parent->PlatformGetParent();
-
-    return parent;
+    return q->manager()->GetFromAXNode(q->node()->GetTableAncestor());
 }
 
 QAccessibleInterface *BrowserAccessibilityInterface::table() const
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 0808b664332..0d3d9777514 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -308,7 +308,9 @@ void RenderWidgetHostViewQt::OnRendererWidgetCreated()
 
 QObject *WebContentsAccessibilityQt::accessibilityParentObject() const
 {
-    return m_rwhv->m_adapterClient->accessibilityParentObject();
+    if (m_rwhv && m_rwhv->m_adapterClient)
+        return m_rwhv->m_adapterClient->accessibilityParentObject();
+    return nullptr;
 }
 
 // Set focus to the associated View component.
diff --git a/tests/auto/widgets/accessibility/tst_accessibility.cpp b/tests/auto/widgets/accessibility/tst_accessibility.cpp
index 6c26f624c2b..9e69e313929 100644
--- a/tests/auto/widgets/accessibility/tst_accessibility.cpp
+++ b/tests/auto/widgets/accessibility/tst_accessibility.cpp
@@ -52,6 +52,7 @@ private Q_SLOTS:
     void objectName();
     void crossTreeParent();
     void tableCellInterface();
+    void tableInterface();
 };
 
 // This will be called before the first test function is executed.
@@ -358,7 +359,7 @@ void tst_Accessibility::roles_data()
     QTest::newRow("ax::mojom::Role::kCode") << QString("<code>a</code>") << 1 << QAccessible::StaticText;
     QTest::newRow("ax::mojom::Role::kColorWell") << QString("<input type='color'>a</input>") << 1 << QAccessible::ColorChooser;
     // QTest::newRow("ax::mojom::Role::kColumn"); // No mapping to ARIA role
-    QTest::newRow("ax::mojom::Role::kColumnHeader") << QString("<table role=table><tr><th>a</th></tr><tr><td>a</td></tr></table>") << 2 << QAccessible::ColumnHeader;
+    QTest::newRow("ax::mojom::Role::kColumnHeader") << QString("<table role=table><tr><th>a</th></tr><tr><td>a</td></tr></table>") << 2 << QAccessible::Cell;
     QTest::newRow("ax::mojom::Role::kComboBoxGrouping") << QString("<div role='combobox'><input></div>") << 0 << QAccessible::ComboBox;
     QTest::newRow("ax::mojom::Role::kComboBoxMenuButton") << QString("<div tabindex=0 role='combobox'>Select</div>") << 0 << QAccessible::ComboBox;
     // QTest::newRow("ax::mojom::Role::kComboBoxSelect"); // No mapping to ARIA role
@@ -562,7 +563,7 @@ void tst_Accessibility::roles_data()
             << QString("<section aria-label='section with name'/>") << 0 << QAccessible::Section;
     QTest::newRow("ax::mojom::Role::kRow") << QString("<table role=table><tr><td>a</td></tr></table>") << 1 << QAccessible::Row;
     QTest::newRow("ax::mojom::Role::kRowGroup") << QString("<table role=table><tbody role=rowgroup><tr><td>a</td></tr></tbody></table>") << 1 << QAccessible::Section;
-    QTest::newRow("ax::mojom::Role::kRowHeader") << QString("<table role=table><tr><th>a</td><td>b</td></tr></table>") << 2 << QAccessible::RowHeader;
+    QTest::newRow("ax::mojom::Role::kRowHeader") << QString("<table role=table><tr><th>a</td><td>b</td></tr></table>") << 2 << QAccessible::Cell;
     QTest::newRow("ax::mojom::Role::kRuby") << QString("<ruby>a</ruby>") << 1 << QAccessible::Grouping;
     //QTest::newRow("ax::mojom::Role::kRubyAnnotation") // No mapping to ARIA role (presents as property on enclosing ruby element)
     QTest::newRow("ax::mojom::Role::kScrollBar") << QString("<div role='scrollbar'>a</a>") << 0 << QAccessible::ScrollBar;
@@ -747,6 +748,57 @@ void tst_Accessibility::tableCellInterface()
     }
 }
 
+void tst_Accessibility::tableInterface()
+{
+    QWebEngineView webView;
+    webView.resize(400, 400);
+    webView.show();
+    QVERIFY(QTest::qWaitForWindowExposed(&webView));
+
+    QSignalSpy spyFinished(&webView, &QWebEngineView::loadFinished);
+    webView.setHtml(QLatin1String(
+            "<table>"
+            "  <caption>"
+            "    Table Autotest"
+            "  </caption>"
+            "  <thead>"
+            "    <tr>"
+            "      <th scope='col'>Column Header 1</th>"
+            "      <th scope='col'>Column Header 2</th>"
+            "    </tr>"
+            "  </thead>"
+            "  <tbody>"
+            "    <tr>"
+            "      <th scope='row'>Row Header</th>"
+            "      <td>Cell</td>"
+            "    </tr>"
+            "  </tbody>"
+            "</table>"));
+    QTRY_COMPARE(spyFinished.size(), 1);
+
+    QAccessibleInterface *view = QAccessible::queryAccessibleInterface(&webView);
+    QTRY_COMPARE_WITH_TIMEOUT(view->child(0)->childCount(), 1, 20000);
+    QAccessibleInterface *document = view->child(0);
+    QAccessibleInterface *table = document->child(0);
+
+    QAccessibleTableInterface *tableInterface = table->tableInterface();
+    QVERIFY(tableInterface);
+
+    // Check the caption
+    QAccessibleInterface *caption = tableInterface->caption();
+    QVERIFY(caption);
+    QAccessibleInterface *captionChild = caption->child(0); // get the StaticText child
+    QVERIFY(captionChild);
+    auto text = captionChild->text(QAccessible::Name);
+    QCOMPARE(text, QLatin1String("Table Autotest"));
+
+    // Check the table cells
+    QCOMPARE(tableInterface->cellAt(0, 0)->child(0)->text(QAccessible::Name), QLatin1String("Column Header 1"));
+    QCOMPARE(tableInterface->cellAt(0, 1)->child(0)->text(QAccessible::Name), QLatin1String("Column Header 2"));
+    QCOMPARE(tableInterface->cellAt(1, 0)->child(0)->text(QAccessible::Name), QLatin1String("Row Header"));
+    QCOMPARE(tableInterface->cellAt(1, 1)->child(0)->text(QAccessible::Name), QLatin1String("Cell"));
+}
+
 static QByteArrayList params = QByteArrayList()
     << "--force-renderer-accessibility"
     << "--enable-features=AccessibilityExposeARIAAnnotations"

From b9f0b916fded53764ce3d4600561805f5b4344f1 Mon Sep 17 00:00:00 2001
From: Topi Reinio <topi.reinio@qt.io>
Date: Mon, 19 May 2025 14:26:58 +0000
Subject: [PATCH 017/100] Doc: Enable automatic linking to sources on
 code.qt.io
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since 6.10, QDoc is capable of generating links to the declaration in
the source code for each documented C++ API entity in their `Detailed
description`.

Add the required configuration to enable this feature for modules in
qtwebengine.

Change-Id: Iab5a519f5d7bc15da0ca2d64dee374db72b245f1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 586fab582e1215012b9d9c7247a758654a3be206)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/doc/qtwebengine.qdocconf | 3 +++
 src/pdf/doc/qtpdf.qdocconf        | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/core/doc/qtwebengine.qdocconf b/src/core/doc/qtwebengine.qdocconf
index eb1e8173e18..644e5d1454e 100644
--- a/src/core/doc/qtwebengine.qdocconf
+++ b/src/core/doc/qtwebengine.qdocconf
@@ -85,6 +85,9 @@ exampledirs +=  ../../../examples \
                 ../../webenginequick/doc/snippets \
                 ../../webenginewidgets/doc/snippets
 
+# Path to the root of qtwebengine (for automatic linking to source code)
+url.sources.rootdir     = ../../..
+
 #exclude Qt PDF example directories
 excludedirs += ../../../examples/pdfwidgets \
                ../../../examples/pdf
diff --git a/src/pdf/doc/qtpdf.qdocconf b/src/pdf/doc/qtpdf.qdocconf
index 15151ae0936..571117fa70b 100644
--- a/src/pdf/doc/qtpdf.qdocconf
+++ b/src/pdf/doc/qtpdf.qdocconf
@@ -59,6 +59,9 @@ exampledirs += ../../../examples/pdfwidgets \
                ../../../examples/pdf \
                snippets/
 
+# Path to the root of qtwebengine (for automatic linking to source code)
+url.sources.rootdir     = ../../..
+
 # add a generic thumbnail for an example that has no \image in its doc
 manifestmeta.thumbnail.names = "QtPdf/PDF Viewer Example"
 

From 265718fe80b5cf67f63d55a9328b9d12d4a1ebcd Mon Sep 17 00:00:00 2001
From: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
Date: Fri, 16 May 2025 11:20:40 +0200
Subject: [PATCH 018/100] Fix accessibility for <p> tags with Windows Narrator

QAccessible::Paragraph maps to a Text control on Windows, which
causes Narrator to completely ignore its child nodes. Since even a
simple <p>Content</p> generates two nodes, a nameless parent
kParagraph and a named child kStaticText, the result is that
Narrator will see a Text node with no name, and simply read "text".

This change maps the kParagraph role to QAccessible::Grouping, which
allows Narrator to see its child nodes and read their contents aloud.

Fixes: QTBUG-134055
Pick-to: 6.9 6.8
Change-Id: I96d4262bd4149f1dec50d47491263d0b022d4b83
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 245e1dacc930f52e8d6f09178e3942c33e785b10)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/browser_accessibility_qt.cpp                  | 2 +-
 tests/auto/widgets/accessibility/tst_accessibility.cpp | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index e7875577e7f..ce6080716ba 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -703,7 +703,7 @@ QAccessible::Role BrowserAccessibilityInterface::role() const
     case ax::mojom::Role::kPane:
         return QAccessible::Pane;
     case ax::mojom::Role::kParagraph:
-        return QAccessible::Paragraph;
+        return QAccessible::Grouping; // QAccessible::Paragraph causes child nodes to be ignored by Windows Narrator
     case ax::mojom::Role::kPdfActionableHighlight:
         return QAccessible::Button;
     case ax::mojom::Role::kPdfRoot:
diff --git a/tests/auto/widgets/accessibility/tst_accessibility.cpp b/tests/auto/widgets/accessibility/tst_accessibility.cpp
index 9e69e313929..8db7d3314cf 100644
--- a/tests/auto/widgets/accessibility/tst_accessibility.cpp
+++ b/tests/auto/widgets/accessibility/tst_accessibility.cpp
@@ -548,7 +548,7 @@ void tst_Accessibility::roles_data()
     QTest::newRow("ax::mojom::Role::kNavigation") << QString("<nav>a</nav>") << 0 << QAccessible::Section;
     QTest::newRow("ax::mojom::Role::kNote") << QString("<div role='note'>a</div>") << 0 << QAccessible::Note;
     //QTest::newRow("ax::mojom::Role::kPane"); // No mapping to ARIA role
-    QTest::newRow("ax::mojom::Role::kParagraph") << QString("<p>a</p>") << 0 << QAccessible::Paragraph;
+    QTest::newRow("ax::mojom::Role::kParagraph") << QString("<p>a</p>") << 0 << QAccessible::Grouping;
     // QTest::newRow("ax::mojom::Role::kPdfActionableHighlight"); // No mapping to ARIA role
     // QTest::newRow("ax::mojom::Role::kPdfRoot"); // No mapping to ARIA role
     QTest::newRow("ax::mojom::Role::kPluginObject")
@@ -659,7 +659,7 @@ void tst_Accessibility::objectName()
     QAccessibleInterface *p = document->child(0);
     QVERIFY(p);
     QVERIFY(p->object());
-    QCOMPARE(p->role(), QAccessible::Paragraph);
+    QCOMPARE(p->role(), QAccessible::Grouping);
     QCOMPARE(p->object()->objectName(), QStringLiteral("my_id"));
 }
 
@@ -689,7 +689,7 @@ void tst_Accessibility::crossTreeParent()
     p = p->child(0);
     QVERIFY(p);
     QVERIFY(p->object());
-    QCOMPARE(p->role(), QAccessible::Paragraph);
+    QCOMPARE(p->role(), QAccessible::Grouping);
     QCOMPARE(p->parent(), subdocument);
     QCOMPARE(p->parent()->parent()->parent()->parent(), view->child(0));
     QCOMPARE(p->parent()->parent()->parent()->parent()->parent(), view);

From 28ecd9fa0c177246eab31426aee81a52d400840d Mon Sep 17 00:00:00 2001
From: Alexei Cazacov <alexei.cazacov@qt.io>
Date: Thu, 27 Mar 2025 15:26:24 +0200
Subject: [PATCH 019/100] Docs: Qt WebEngine documentation doesn't mention the
 module requirements

This commit adds a note with optional dependences.

Fixes: QTBUG-133608
Pick-to: 6.9 6.8
Change-Id: I9ac4971e2a8b0cbde754a249fb6115112a7fac96
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 5cfa442218c649b7bb7805bb0f90ed92c66cd402)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/doc/src/qtwebengine-index.qdoc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/core/doc/src/qtwebengine-index.qdoc b/src/core/doc/src/qtwebengine-index.qdoc
index b20a96dc1fe..b4243d9f824 100644
--- a/src/core/doc/src/qtwebengine-index.qdoc
+++ b/src/core/doc/src/qtwebengine-index.qdoc
@@ -9,6 +9,10 @@
 
     \QWE provides functionality for rendering regions of dynamic web content.
 
+    \note By default, Qt WebEngine depends on the \l {Qt Positioning} and
+    \l {Qt WebChannel} optional modules, but can be built without them. Be sure to
+    install these add-ons when using the online installer.
+
     The functionality in \QWE is divided into the following modules:
 
     \annotatedlist qtwebengine-modules
@@ -25,7 +29,6 @@
         \li \l{Porting from Qt WebKit to Qt WebEngine}
     \endlist
 
-
     \section1 Module Evolution
 
     \l{Changes to Qt WebEngine} lists important changes in the module API

From 1d6b6e71afa674b3372f3a520c74a552d4b447b6 Mon Sep 17 00:00:00 2001
From: Jerome Pasion <jerome.pasion@qt.io>
Date: Mon, 28 Apr 2025 16:03:49 +0200
Subject: [PATCH 020/100] Doc: Add Security Considerations page to Qt WebEngine

We need to give security related information to application developers.
For Qt WebEngine, a link to the Chromium and Qt security pages are
good resources for developers. There is a mention of important
web-related issues such as cross-site scripting and untrusted data.

Task-number: QTBUG-133086
Pick-to: 6.9
Change-Id: I90cbcaa801790910aa9880060b4d0d7f9a999dad
Reviewed-by: Moss Heim <moss.heim@qt.io>
(cherry picked from commit 9d38f39830a08c769cad429b793a97eedd40b35d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/doc/src/qtwebengine-index.qdoc    |  1 +
 src/core/doc/src/qtwebengine-security.qdoc | 68 ++++++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 src/core/doc/src/qtwebengine-security.qdoc

diff --git a/src/core/doc/src/qtwebengine-index.qdoc b/src/core/doc/src/qtwebengine-index.qdoc
index b4243d9f824..b34931d5ce0 100644
--- a/src/core/doc/src/qtwebengine-index.qdoc
+++ b/src/core/doc/src/qtwebengine-index.qdoc
@@ -27,6 +27,7 @@
         \li \l{Qt WebEngine Debugging and Profiling}
         \li \l{Deploying Qt WebEngine Applications}
         \li \l{Porting from Qt WebKit to Qt WebEngine}
+        \li \l{Qt WebEngine Security Considerations}
     \endlist
 
     \section1 Module Evolution
diff --git a/src/core/doc/src/qtwebengine-security.qdoc b/src/core/doc/src/qtwebengine-security.qdoc
new file mode 100644
index 00000000000..3ea57ad8326
--- /dev/null
+++ b/src/core/doc/src/qtwebengine-security.qdoc
@@ -0,0 +1,68 @@
+// Copyright (C) 2025 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+    \page qtwebengine-security.html
+    \title Qt WebEngine Security Considerations
+    \ingroup security-considerations
+    \brief Overview of security topics in Qt WebEngine
+
+    This page covers security issues for Qt WebEngine users. As part of Qt,
+    Qt WebEngine follows Qt's security policies. Refer to \l{Security in Qt}
+    for policy information.
+
+    \section1 Chromium Releases and Security Fixes
+
+    Qt WebEngine tracks the release schedule of Chromium. The latest Qt
+    WebEngine version includes the security fixes released in Chromium.
+    For the precise version numbers and released fixes, visit the wiki page
+    at \l{https://wiki.qt.io/QtWebEngine/ChromiumVersions}
+    {QtWebEngine/ChromiumVersions}.
+
+    For more information about how Qt WebEngine Core implements Chromium
+    features and specific versions, read the
+    \l{Qt WebEngine Core Module} section. It is also beneficial to be familiar
+    with Chromium's
+    \l{https://www.chromium.org/Home/chromium-security/}{Security Policy}.
+
+    \section1 Security Topics for Qt WebEngine Applications
+
+    Be aware of handling untrusted data and sensitive data within your
+    application. Data such as images, user information, and system
+    information can be loaded from remote resources, from within the
+    application, or locally on the system. Take care how you process untrusted
+    data in a secure way without degrading performance and exposing sensitive
+    information. Even revealing filenames and directory paths can expose
+    sensitive data such as system information and database structure.
+
+    Qt WebEngine and Chromium have mechanisms such as the
+    \e{same-origin policy} to minimize the risk of loading from unknown sources.
+    Many websites trick users with dialogues and by mimicking popular websites.
+    With \l{Qt WebEngine}, it is possible to simply load and show trusted data
+    to end-users and lock the interface to prevent unwanted input. Your user
+    interface should be robust to handle erroneous inputs and unexpected events.
+
+    A serious security issue for web applications is
+    \e{cross-site scripting} (XSS). The attack involves executing a piece of
+    code that can trick a web application to generate malicious HTML content to
+    gain the trust of your user. For example, your application unknowingly
+    takes malicious code to generate a dialog asking for user credentials.
+    Those credentials are then sent to an external service which can lead to
+    breached accounts. Because it is your application that generates the
+    dialog, users trust the malicious action. Be careful parsing URLs and make
+    sure that nobody can misuse your user interface.
+
+    Refer to \l{Handling Untrusted Data} for additional information about risks
+    and mitigation.
+
+    \section1 Configure Qt WebEngine Settings
+
+    It is good practice to enforce \e zero-trust policies that restrict access
+    by default. Configuring your Qt WebEngine deployment can help restrict user
+    and remote execution. \l QWebEngineSettings has attributes that can disable
+    JavaScript execution, disable auto-loading of images, or other mechanisms
+    to prevent unintended usage. For example, disabling
+    \l QWebEngineSettings::LocalContentCanAccessFileUrls can create a sandbox
+    environment similar to Chrome or Firefox.
+
+*/

From 997b62fabae7af834cb8ee1ffc25083baafceded Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Wed, 30 Apr 2025 13:36:55 +0200
Subject: [PATCH 021/100] Support chrome.system.display

Add simple wrapper for DisplayInfoProvider to make it default
constructable.

Task-number: QTBUG-61676
Change-Id: I3bcb37e7fc687e2226631d2b1a6875383e0bf469
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 542185386d4929cc2a9326f06b36f66f097fba16)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/CMakeLists.txt                           |  1 +
 .../extensions/api/display_info_provider_qt.cpp   |  6 ++++++
 .../extensions/api/display_info_provider_qt.h     | 15 +++++++++++++++
 src/core/extensions/extensions_api_client_qt.cpp  |  7 +++++++
 src/core/extensions/extensions_api_client_qt.h    |  2 ++
 5 files changed, 31 insertions(+)
 create mode 100644 src/core/extensions/api/display_info_provider_qt.cpp
 create mode 100644 src/core/extensions/api/display_info_provider_qt.h

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index b1298482063..d3ae5303c15 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -275,6 +275,7 @@ foreach(arch ${archs})
             SOURCES
                 common/extensions/extensions_api_provider_qt.cpp common/extensions/extensions_api_provider_qt.h
                 common/extensions/extensions_client_qt.cpp common/extensions/extensions_client_qt.h
+                extensions/api/display_info_provider_qt.cpp extensions/api/display_info_provider_qt.h
                 extensions/api/runtime_api_delegate_qt.cpp extensions/api/runtime_api_delegate_qt.h
                 extensions/component_extension_resource_manager_qt.cpp extensions/component_extension_resource_manager_qt.h
                 extensions/extension_action_manager.cpp extensions/extension_action_manager.h
diff --git a/src/core/extensions/api/display_info_provider_qt.cpp b/src/core/extensions/api/display_info_provider_qt.cpp
new file mode 100644
index 00000000000..2b9de29365e
--- /dev/null
+++ b/src/core/extensions/api/display_info_provider_qt.cpp
@@ -0,0 +1,6 @@
+// Copyright (C) 2025 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 "display_info_provider_qt.h"
+
+DisplayInfoProviderQt::DisplayInfoProviderQt() = default;
diff --git a/src/core/extensions/api/display_info_provider_qt.h b/src/core/extensions/api/display_info_provider_qt.h
new file mode 100644
index 00000000000..4df05b0a7e7
--- /dev/null
+++ b/src/core/extensions/api/display_info_provider_qt.h
@@ -0,0 +1,15 @@
+// Copyright (C) 2025 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 DISPLAY_INFO_PROVIDER_QT_H_
+#define DISPLAY_INFO_PROVIDER_QT_H_
+
+#include "extensions/browser/api/system_display/display_info_provider.h"
+
+class DisplayInfoProviderQt : public extensions::DisplayInfoProvider
+{
+public:
+    DisplayInfoProviderQt();
+};
+
+#endif // DISPLAY_INFO_PROVIDER_QT_H_
diff --git a/src/core/extensions/extensions_api_client_qt.cpp b/src/core/extensions/extensions_api_client_qt.cpp
index 678c252cc08..1cfbe11f791 100644
--- a/src/core/extensions/extensions_api_client_qt.cpp
+++ b/src/core/extensions/extensions_api_client_qt.cpp
@@ -7,6 +7,8 @@
 // found in the LICENSE file.
 
 #include "extensions_api_client_qt.h"
+
+#include "api/display_info_provider_qt.h"
 #include "file_system_delegate_qt.h"
 #include "messaging_delegate_qt.h"
 
@@ -69,4 +71,9 @@ MessagingDelegate *ExtensionsAPIClientQt::GetMessagingDelegate()
     return m_messagingDelegate.get();
 }
 
+std::unique_ptr<DisplayInfoProvider> ExtensionsAPIClientQt::CreateDisplayInfoProvider() const
+{
+    return std::make_unique<DisplayInfoProviderQt>();
+}
+
 } // namespace extensions
diff --git a/src/core/extensions/extensions_api_client_qt.h b/src/core/extensions/extensions_api_client_qt.h
index e7838138c74..64c01f475ec 100644
--- a/src/core/extensions/extensions_api_client_qt.h
+++ b/src/core/extensions/extensions_api_client_qt.h
@@ -13,6 +13,7 @@
 
 namespace extensions {
 
+class DisplayInfoProvider;
 class FileSystemDelegate;
 class MessagingDelegate;
 
@@ -30,6 +31,7 @@ class ExtensionsAPIClientQt : public ExtensionsAPIClient
     CreateMimeHandlerViewGuestDelegate(MimeHandlerViewGuest *guest) const override;
     void AttachWebContentsHelpers(content::WebContents *web_contents) const override;
     MessagingDelegate *GetMessagingDelegate() override;
+    std::unique_ptr<DisplayInfoProvider> CreateDisplayInfoProvider() const override;
 
 private:
     std::unique_ptr<FileSystemDelegate> m_fileSystemDelegate;

From 28ce908f34642167ebb23b1e300956923131790f Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Wed, 30 Apr 2025 16:00:54 +0200
Subject: [PATCH 022/100] Support chrome.system.storage API

Initialize the StorageMonitor at startup.

Task-number: QTBUG-61676
Change-Id: Ic10bd1d012f80c3f231105ea15d466716311cd5c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit ab5f3fab39abd4f61789a8461d98f54dcdb21c5e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/browser_main_parts_qt.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/core/browser_main_parts_qt.cpp b/src/core/browser_main_parts_qt.cpp
index 35407a62b0d..ee037d180a7 100644
--- a/src/core/browser_main_parts_qt.cpp
+++ b/src/core/browser_main_parts_qt.cpp
@@ -35,6 +35,7 @@
 #include "ui/display/screen.h"
 
 #if BUILDFLAG(ENABLE_EXTENSIONS)
+#include "components/storage_monitor/storage_monitor.h"
 #include "extensions/browser/api/messaging/message_service.h"
 #include "extensions/common/constants.h"
 #include "extensions/common/extensions_client.h"
@@ -235,6 +236,7 @@ int BrowserMainPartsQt::PreMainMessageLoopRun()
     extensions::ExtensionsClient::Set(new extensions::ExtensionsClientQt());
     extensions::ExtensionsBrowserClient::Set(new extensions::ExtensionsBrowserClientQt());
     extensions::ExtensionSystemFactoryQt::GetInstance();
+    storage_monitor::StorageMonitor::Create();
 
 #if BUILDFLAG(ENABLE_PLUGINS)
     content::PluginService *plugin_service = content::PluginService::GetInstance();

From 404a82ef3a671d38df94a90d4a49291fdef3ebc9 Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Wed, 30 Apr 2025 16:37:12 +0200
Subject: [PATCH 023/100] Allow V8 script extensions in extension service
 workers

Enable V8 builtin objects in service workers.
Fixes '[FATAL:safe_builtins.cc(163)] Check failed: value->IsObject(). Array'

Task-number: QTBUG-61676
Change-Id: I141cc5d778afd9aec37c6e057f6f9e486844a6bb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 808a5c33d166da50aa4bc6f880d6a5b4ceaa7c55)
---
 src/core/renderer/content_renderer_client_qt.cpp | 6 ++++++
 src/core/renderer/content_renderer_client_qt.h   | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index f8f8623e600..b04696fe5e6 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -507,6 +507,12 @@ void ContentRendererClientQt::DidStartServiceWorkerContextOnWorkerThread(
             ->DidStartServiceWorkerContextOnWorkerThread(service_worker_version_id,
                                                          service_worker_scope, script_url);
 }
+
+bool ContentRendererClientQt::AllowScriptExtensionForServiceWorker(const url::Origin &script_origin)
+{
+    return script_origin.scheme() == extensions::kExtensionScheme;
+}
+
 #endif // QT_CONFIG(webengine_extensions)
 
 void ContentRendererClientQt::GetInterface(const std::string &interface_name, mojo::ScopedMessagePipeHandle interface_pipe)
diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h
index 42939d89f92..874285fb007 100644
--- a/src/core/renderer/content_renderer_client_qt.h
+++ b/src/core/renderer/content_renderer_client_qt.h
@@ -107,6 +107,7 @@ class ContentRendererClientQt
     void DidStartServiceWorkerContextOnWorkerThread(int64_t service_worker_version_id,
                                                     const GURL &service_worker_scope,
                                                     const GURL &script_url) override;
+    bool AllowScriptExtensionForServiceWorker(const url::Origin &script_origin) override;
 #endif
 
 private:

From 985e28289749dd62c25b92fc3e8f18162d812c6c Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Tue, 3 Jun 2025 13:09:43 +0200
Subject: [PATCH 024/100] Release with bundled libtiff

As user system can have no libtiff, or a different major so version of libtiff installed make sure qt installer provides
binaries with bundled libtiff.

Pick-to: 6.9 6.8
Change-Id: Ia3e892b735f0f7facf215e23c538df12fd01581e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit fdc9650042f42a1c6e8a1acd27aec4a1ced0e952)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 coin/module_config.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index 7b3c557f38e..7563d04f54a 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -57,7 +57,7 @@ instructions:
         contains_value: "windows-11_24H2-msvc2022-arm64"
     - type: AppendToEnvironmentVariable
       variableName: COMMON_NON_QTBASE_CMAKE_ARGS
-      variableValue: " -DFEATURE_webengine_system_libxml=OFF"
+      variableValue: " -DFEATURE_webengine_system_libxml=OFF -DFEATURE_webengine_system_libtiff=OFF"
       enable_if:
         condition: property
         property: features

From fa6cdd7584d4b10265aa23de39a24085331704d7 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Mon, 9 Jun 2025 16:37:49 +0000
Subject: [PATCH 025/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: If98ce004d11c1223986a26c0287312796a320ae8
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 87456d885cf..59c16cd9c0c 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: c9e836c11cc67a1b2754077505458732d779c353
+    ref: 270843e08c61f27433486bd0bf05020e92f91e6d
     required: true
   ../qtpositioning:
-    ref: cfd78e06228f5503da41e3d4e2756f000db881d6
+    ref: 1e46cadc6ee5bf69eab4db50ff6915fd8394d9d5
     required: false
   ../qttools:
-    ref: f1c050b703b0b3e73ada17d2394f849f97374821
+    ref: 686bb6f0e53a7ccbe4d52a36d96bfde3e166cb12
     required: false
   ../qtwebchannel:
-    ref: 3d94e0c500ff05d3827b437aaa3014e0ca0a9fbc
+    ref: 2fa0950f98f1d96ab0b20227217ead0ca964e427
     required: false

From fe4209f44eb91e6f1d4c2f3c4d5ec89d0e4a9386 Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Wed, 30 Apr 2025 15:47:29 +0200
Subject: [PATCH 026/100] Support chrome.management API

Implement ManagementAPIDelegate.
Add ManagementPolicy to the extension system.

Task-number: QTBUG-61676
Change-Id: If05aa7cb0ebfe860954e88eb794dd06aa6ae973a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 6ee84477aed17f07f394b19d4d7d608bbbe7fdd9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/CMakeLists.txt                       |   1 +
 .../api/management_api_delegate_qt.cpp        | 130 ++++++++++++++++++
 .../api/management_api_delegate_qt.h          |  76 ++++++++++
 src/core/extensions/extension_manager.cpp     |   6 +
 src/core/extensions/extension_manager.h       |   1 +
 src/core/extensions/extension_system_qt.cpp   |   4 +-
 src/core/extensions/extension_system_qt.h     |   2 +
 .../extensions/extensions_api_client_qt.cpp   |   6 +
 .../extensions/extensions_api_client_qt.h     |   1 +
 9 files changed, 226 insertions(+), 1 deletion(-)
 create mode 100644 src/core/extensions/api/management_api_delegate_qt.cpp
 create mode 100644 src/core/extensions/api/management_api_delegate_qt.h

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index d3ae5303c15..dedd1dbe777 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -277,6 +277,7 @@ foreach(arch ${archs})
                 common/extensions/extensions_client_qt.cpp common/extensions/extensions_client_qt.h
                 extensions/api/display_info_provider_qt.cpp extensions/api/display_info_provider_qt.h
                 extensions/api/runtime_api_delegate_qt.cpp extensions/api/runtime_api_delegate_qt.h
+                extensions/api/management_api_delegate_qt.cpp extensions/api/management_api_delegate_qt.h
                 extensions/component_extension_resource_manager_qt.cpp extensions/component_extension_resource_manager_qt.h
                 extensions/extension_action_manager.cpp extensions/extension_action_manager.h
                 extensions/extension_host_delegate_qt.cpp extensions/extension_host_delegate_qt.h
diff --git a/src/core/extensions/api/management_api_delegate_qt.cpp b/src/core/extensions/api/management_api_delegate_qt.cpp
new file mode 100644
index 00000000000..6e887918627
--- /dev/null
+++ b/src/core/extensions/api/management_api_delegate_qt.cpp
@@ -0,0 +1,130 @@
+// Copyright (C) 2025 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 "management_api_delegate_qt.h"
+
+#include "extensions/extension_manager.h"
+#include "extensions/extension_system_qt.h"
+
+namespace extensions {
+
+ManagementAPIDelegateQt::ManagementAPIDelegateQt() { }
+
+ManagementAPIDelegateQt::~ManagementAPIDelegateQt() { }
+
+bool ManagementAPIDelegateQt::LaunchAppFunctionDelegate(const Extension *extension,
+                                                        content::BrowserContext *context) const
+{
+    return false;
+}
+
+GURL ManagementAPIDelegateQt::GetFullLaunchURL(const Extension *extension) const
+{
+    return GURL();
+}
+
+LaunchType ManagementAPIDelegateQt::GetLaunchType(const ExtensionPrefs *prefs,
+                                                  const Extension *extension) const
+{
+    return LaunchType::LAUNCH_TYPE_DEFAULT;
+}
+
+std::unique_ptr<InstallPromptDelegate> ManagementAPIDelegateQt::SetEnabledFunctionDelegate(
+        content::WebContents *web_contents, content::BrowserContext *browser_context,
+        const Extension *extension, base::OnceCallback<void(bool)> callback) const
+{
+    return std::make_unique<InstallPromptDelegate>();
+}
+
+std::unique_ptr<UninstallDialogDelegate>
+ManagementAPIDelegateQt::UninstallFunctionDelegate(ManagementUninstallFunctionBase *function,
+                                                   const Extension *target_extension,
+                                                   bool show_programmatic_uninstall_ui) const
+{
+    return std::make_unique<UninstallDialogDelegate>();
+}
+
+bool ManagementAPIDelegateQt::CreateAppShortcutFunctionDelegate(
+        ManagementCreateAppShortcutFunction *function, const Extension *extension,
+        std::string *error) const
+{
+    return false;
+}
+
+std::unique_ptr<AppForLinkDelegate> ManagementAPIDelegateQt::GenerateAppForLinkFunctionDelegate(
+        ManagementGenerateAppForLinkFunction *function, content::BrowserContext *context,
+        const std::string &title, const GURL &launch_url) const
+{
+    return std::make_unique<AppForLinkDelegateQt>();
+}
+
+bool ManagementAPIDelegateQt::CanContextInstallWebApps(content::BrowserContext *context) const
+{
+    return false;
+}
+
+void ManagementAPIDelegateQt::InstallOrLaunchReplacementWebApp(
+        content::BrowserContext *context, const GURL &web_app_url,
+        ManagementAPIDelegate::InstallOrLaunchWebAppCallback callback) const
+{
+}
+
+void ManagementAPIDelegateQt::EnableExtension(content::BrowserContext *context,
+                                              const ExtensionId &extension_id) const
+{
+    auto *manager =
+            static_cast<ExtensionSystemQt *>(ExtensionSystem::Get(context))->extensionManager();
+    manager->setExtensionEnabled(extension_id, true);
+}
+
+void ManagementAPIDelegateQt::DisableExtension(content::BrowserContext *context,
+                                               const Extension *source_extension,
+                                               const ExtensionId &extension_id,
+                                               disable_reason::DisableReason disable_reason) const
+{
+    auto *manager =
+            static_cast<ExtensionSystemQt *>(ExtensionSystem::Get(context))->extensionManager();
+    manager->setExtensionEnabled(extension_id, false);
+}
+
+bool ManagementAPIDelegateQt::UninstallExtension(content::BrowserContext *context,
+                                                 const ExtensionId &transient_extension_id,
+                                                 UninstallReason reason,
+                                                 std::u16string *error) const
+{
+    auto *manager =
+            static_cast<ExtensionSystemQt *>(ExtensionSystem::Get(context))->extensionManager();
+    if (!manager->isExtensionInstalled(transient_extension_id)) {
+        *error = u"This extension was not installed";
+        return false;
+    }
+
+    manager->uninstallExtension(transient_extension_id);
+    return true;
+}
+
+void ManagementAPIDelegateQt::SetLaunchType(content::BrowserContext *context,
+                                            const ExtensionId &extension_id,
+                                            LaunchType launch_type) const
+{
+}
+
+GURL ManagementAPIDelegateQt::GetIconURL(const Extension *extension, int icon_size,
+                                         ExtensionIconSet::Match match, bool grayscale) const
+{
+    return GURL();
+}
+
+GURL ManagementAPIDelegateQt::GetEffectiveUpdateURL(const Extension &extension,
+                                                    content::BrowserContext *context) const
+{
+    return GURL();
+}
+
+void ManagementAPIDelegateQt::ShowMv2DeprecationReEnableDialog(
+        content::BrowserContext *context, content::WebContents *web_contents,
+        const Extension &extension, base::OnceCallback<void(bool)> done_callback) const
+{
+}
+
+} // namespace extensions
diff --git a/src/core/extensions/api/management_api_delegate_qt.h b/src/core/extensions/api/management_api_delegate_qt.h
new file mode 100644
index 00000000000..9d6b6311e0f
--- /dev/null
+++ b/src/core/extensions/api/management_api_delegate_qt.h
@@ -0,0 +1,76 @@
+// Copyright (C) 2025 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 MANAGEMENT_API_DELEGATE_QT_
+#define MANAGEMENT_API_DELEGATE_QT_
+
+#include "extensions/browser/api/management/management_api_delegate.h"
+
+namespace extensions {
+
+class AppForLinkDelegateQt : public AppForLinkDelegate
+{
+public:
+    ~AppForLinkDelegateQt() override { }
+
+    api::management::ExtensionInfo
+    CreateExtensionInfoFromWebApp(const std::string &app_id,
+                                  content::BrowserContext *context) override
+    {
+        return {};
+    }
+};
+
+class ManagementAPIDelegateQt : public ManagementAPIDelegate
+{
+public:
+    ManagementAPIDelegateQt();
+    ~ManagementAPIDelegateQt() override;
+
+    // ManagementAPIDelegate.
+    bool LaunchAppFunctionDelegate(const Extension *extension,
+                                   content::BrowserContext *context) const override;
+    GURL GetFullLaunchURL(const Extension *extension) const override;
+    LaunchType GetLaunchType(const ExtensionPrefs *prefs,
+                             const Extension *extension) const override;
+    std::unique_ptr<InstallPromptDelegate>
+    SetEnabledFunctionDelegate(content::WebContents *web_contents,
+                               content::BrowserContext *browser_context, const Extension *extension,
+                               base::OnceCallback<void(bool)> callback) const override;
+    std::unique_ptr<UninstallDialogDelegate>
+    UninstallFunctionDelegate(ManagementUninstallFunctionBase *function,
+                              const Extension *target_extension,
+                              bool show_programmatic_uninstall_ui) const override;
+    bool CreateAppShortcutFunctionDelegate(ManagementCreateAppShortcutFunction *function,
+                                           const Extension *extension,
+                                           std::string *error) const override;
+    std::unique_ptr<AppForLinkDelegate>
+    GenerateAppForLinkFunctionDelegate(ManagementGenerateAppForLinkFunction *function,
+                                       content::BrowserContext *context, const std::string &title,
+                                       const GURL &launch_url) const override;
+    bool CanContextInstallWebApps(content::BrowserContext *context) const override;
+    void InstallOrLaunchReplacementWebApp(
+            content::BrowserContext *context, const GURL &web_app_url,
+            ManagementAPIDelegate::InstallOrLaunchWebAppCallback callback) const override;
+    void EnableExtension(content::BrowserContext *context,
+                         const ExtensionId &extension_id) const override;
+    void DisableExtension(content::BrowserContext *context, const Extension *source_extension,
+                          const ExtensionId &extension_id,
+                          disable_reason::DisableReason disable_reason) const override;
+    bool UninstallExtension(content::BrowserContext *context,
+                            const ExtensionId &transient_extension_id, UninstallReason reason,
+                            std::u16string *error) const override;
+    void SetLaunchType(content::BrowserContext *context, const ExtensionId &extension_id,
+                       LaunchType launch_type) const override;
+    GURL GetIconURL(const Extension *extension, int icon_size, ExtensionIconSet::Match match,
+                    bool grayscale) const override;
+    GURL GetEffectiveUpdateURL(const Extension &extension,
+                               content::BrowserContext *context) const override;
+    void
+    ShowMv2DeprecationReEnableDialog(content::BrowserContext *context,
+                                     content::WebContents *web_contents, const Extension &extension,
+                                     base::OnceCallback<void(bool)> done_callback) const override;
+};
+
+} // namespace extensions
+#endif // MANAGEMENT_API_DELEGATE_QT_
diff --git a/src/core/extensions/extension_manager.cpp b/src/core/extensions/extension_manager.cpp
index aa359b8cb78..1a7ceb4e371 100644
--- a/src/core/extensions/extension_manager.cpp
+++ b/src/core/extensions/extension_manager.cpp
@@ -119,6 +119,12 @@ bool ExtensionManager::isExtensionLoaded(const std::string &id) const
     return m_loader->isExtensionLoaded(id);
 }
 
+bool ExtensionManager::isExtensionInstalled(const std::string &id) const
+{
+    scoped_refptr<const Extension> extension = m_loader->getExtensionById(id);
+    return QFileInfo(toQt(extension->path())).dir() == QDir(installDirectory());
+}
+
 QUrl ExtensionManager::actionPopupUrl(const std::string &id) const
 {
     scoped_refptr<const Extension> extension = m_loader->getExtensionById(id);
diff --git a/src/core/extensions/extension_manager.h b/src/core/extensions/extension_manager.h
index 75fc4eb34d1..5be245748f1 100644
--- a/src/core/extensions/extension_manager.h
+++ b/src/core/extensions/extension_manager.h
@@ -49,6 +49,7 @@ class Q_WEBENGINECORE_EXPORT ExtensionManager
 
     bool isExtensionEnabled(const std::string &id) const;
     bool isExtensionLoaded(const std::string &id) const;
+    bool isExtensionInstalled(const std::string &id) const;
     QUrl actionPopupUrl(const std::string &id) const;
     QString installDirectory() const;
     QList<QWebEngineExtensionInfo> extensions();
diff --git a/src/core/extensions/extension_system_qt.cpp b/src/core/extensions/extension_system_qt.cpp
index 529bbaf4f91..de129167cc5 100644
--- a/src/core/extensions/extension_system_qt.cpp
+++ b/src/core/extensions/extension_system_qt.cpp
@@ -44,6 +44,7 @@
 #include "extensions/browser/extension_pref_value_map_factory.h"
 #include "extensions/browser/extension_prefs.h"
 #include "extensions/browser/extension_registry.h"
+#include "extensions/browser/management_policy.h"
 #include "extensions/browser/quota_service.h"
 #include "extensions/browser/renderer_startup_helper.h"
 #include "extensions/browser/service_worker_manager.h"
@@ -227,7 +228,7 @@ ExtensionService *ExtensionSystemQt::extension_service()
 
 ManagementPolicy *ExtensionSystemQt::management_policy()
 {
-    return nullptr;
+    return management_policy_.get();
 }
 
 UserScriptManager *ExtensionSystemQt::user_script_manager()
@@ -298,6 +299,7 @@ void ExtensionSystemQt::Init(bool extensions_enabled)
     user_script_manager_ = std::make_unique<UserScriptManager>(browser_context_);
     quota_service_ = std::make_unique<QuotaService>();
     extension_manager_ = std::make_unique<QtWebEngineCore::ExtensionManager>(browser_context_);
+    management_policy_ = std::make_unique<ManagementPolicy>();
 
     // Make the chrome://extension-icon/ resource available.
     // content::URLDataSource::Add(browser_context_, new ExtensionIconSource(browser_context_));
diff --git a/src/core/extensions/extension_system_qt.h b/src/core/extensions/extension_system_qt.h
index 9445a655a61..66499e946de 100644
--- a/src/core/extensions/extension_system_qt.h
+++ b/src/core/extensions/extension_system_qt.h
@@ -31,6 +31,7 @@ namespace extensions {
 
 class ExtensionRegistry;
 class InfoMap;
+class ManagementPolicy;
 class RendererStartupHelper;
 class ServiceWorkerManager;
 class StateStoreNotificationObserver;
@@ -87,6 +88,7 @@ class ExtensionSystemQt : public ExtensionSystem
     std::unique_ptr<ServiceWorkerManager> service_worker_manager_;
     std::unique_ptr<QuotaService> quota_service_;
     std::unique_ptr<UserScriptManager> user_script_manager_;
+    std::unique_ptr<ManagementPolicy> management_policy_;
 
     // For verifying the contents of extensions read from disk.
     scoped_refptr<ContentVerifier> content_verifier_;
diff --git a/src/core/extensions/extensions_api_client_qt.cpp b/src/core/extensions/extensions_api_client_qt.cpp
index 1cfbe11f791..b9528aeabd1 100644
--- a/src/core/extensions/extensions_api_client_qt.cpp
+++ b/src/core/extensions/extensions_api_client_qt.cpp
@@ -9,6 +9,7 @@
 #include "extensions_api_client_qt.h"
 
 #include "api/display_info_provider_qt.h"
+#include "api/management_api_delegate_qt.h"
 #include "file_system_delegate_qt.h"
 #include "messaging_delegate_qt.h"
 
@@ -76,4 +77,9 @@ std::unique_ptr<DisplayInfoProvider> ExtensionsAPIClientQt::CreateDisplayInfoPro
     return std::make_unique<DisplayInfoProviderQt>();
 }
 
+ManagementAPIDelegate *ExtensionsAPIClientQt::CreateManagementAPIDelegate() const
+{
+    return new ManagementAPIDelegateQt;
+}
+
 } // namespace extensions
diff --git a/src/core/extensions/extensions_api_client_qt.h b/src/core/extensions/extensions_api_client_qt.h
index 64c01f475ec..49023d0af01 100644
--- a/src/core/extensions/extensions_api_client_qt.h
+++ b/src/core/extensions/extensions_api_client_qt.h
@@ -32,6 +32,7 @@ class ExtensionsAPIClientQt : public ExtensionsAPIClient
     void AttachWebContentsHelpers(content::WebContents *web_contents) const override;
     MessagingDelegate *GetMessagingDelegate() override;
     std::unique_ptr<DisplayInfoProvider> CreateDisplayInfoProvider() const override;
+    ManagementAPIDelegate *CreateManagementAPIDelegate() const override;
 
 private:
     std::unique_ptr<FileSystemDelegate> m_fileSystemDelegate;

From 2e40949d7bdd4f8204646bbfa335b30a8d09ef7c Mon Sep 17 00:00:00 2001
From: Moss Heim <moss.heim@qt.io>
Date: Tue, 10 Jun 2025 13:41:12 +0200
Subject: [PATCH 027/100] tests: fix failing uidelegates tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On Ubuntu it seems the application is not guaranteed to have focus just
from showing the window. Take a solution from qtdeclarative tests (e.g.
tst_qquicktext, tst_qquickmenu) where we also call requestActivate() and
qWaitForWindowActive() rather than waiting on a focusObject to exist.

Note that this will not change anything on Wayland where window
activation is not supported by default/design. We should probably
skip there; this is also consistent with qtdeclarative tests.

Pick-to: 6.9
Fixes: QTBUG-137447
Change-Id: Ie19f6dcc0c2b9d1d45805cba8e63e5007f87c115
Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
(cherry picked from commit 552f7c92f89511c1c92516e173ba3f807e016591)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../quick/uidelegates/tst_uidelegates.cpp     | 24 ++++++++++++++-----
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/tests/auto/quick/uidelegates/tst_uidelegates.cpp b/tests/auto/quick/uidelegates/tst_uidelegates.cpp
index 419f2f877fb..5918d72a704 100644
--- a/tests/auto/quick/uidelegates/tst_uidelegates.cpp
+++ b/tests/auto/quick/uidelegates/tst_uidelegates.cpp
@@ -111,7 +111,9 @@ void tst_UIDelegates::javaScriptDialog()
     QFETCH(QString, expectedObjectName);
 
     m_window->show();
-    QTRY_VERIFY(qApp->focusObject());
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
+    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -125,7 +127,9 @@ void tst_UIDelegates::javaScriptDialog()
 void tst_UIDelegates::fileDialog()
 {
     m_window->show();
-    QTRY_VERIFY(qApp->focusObject());
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
+    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -141,7 +145,9 @@ void tst_UIDelegates::fileDialog()
 void tst_UIDelegates::contextMenu()
 {
     m_window->show();
-    QTRY_VERIFY(qApp->focusObject());
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
+    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -155,7 +161,9 @@ void tst_UIDelegates::contextMenu()
 void tst_UIDelegates::tooltip()
 {
     m_window->show();
-    QTRY_VERIFY(qApp->focusObject());
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
+    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -178,7 +186,9 @@ void tst_UIDelegates::tooltip()
 void tst_UIDelegates::colorDialog()
 {
     m_window->show();
-    QTRY_VERIFY(qApp->focusObject());
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
+    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -218,7 +228,9 @@ void tst_UIDelegates::authenticationDialog()
     QVERIFY(server.start());
 
     m_window->show();
-    QTRY_VERIFY(qApp->focusObject());
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
+    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
     view->loadHtml("<html><body>"
                    "</body></html>");

From 3273bd607675d2c7701bfb8dede73955098a7be9 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Tue, 10 Jun 2025 15:23:54 +0200
Subject: [PATCH 028/100] Update Chromium

Submodule src/3rdparty 059a95d6..cc9ba81d:
* [backport] Security bug 408294914
* [backport] Security bug 325123679
* [backport] Security bug 407898107 (3/3)
* [backport] Security bug 407898107 (2/3)
* [backport] Security bug 407898107 (1/3)
* Add new functionalities to the Extension WebUI

Fixes: QTBUG-137362
Change-Id: I4194f1554a413be9409237c7619122eff07c402b
Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
(cherry picked from commit b315f629ea75ab07c0845bacfaa76ff6bd5f7435)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 CHROMIUM_VERSION                | 2 +-
 src/3rdparty                    | 2 +-
 src/core/web_engine_context.cpp | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION
index 6ffbd94987f..56ab23d041e 100644
--- a/CHROMIUM_VERSION
+++ b/CHROMIUM_VERSION
@@ -1,3 +1,3 @@
 
 Based on Chromium version:                                      130.0.6723.192
-Patched with security patches up to Chromium version:           136.0.7103.114
+Patched with security patches up to Chromium version:           137.0.7151.55
diff --git a/src/3rdparty b/src/3rdparty
index 059a95d6de7..cc9ba81d6b5 160000
--- a/src/3rdparty
+++ b/src/3rdparty
@@ -1 +1 @@
-Subproject commit 059a95d6de7aa67975c4f52ea48549e56f35c058
+Subproject commit cc9ba81d6b53af42f5a54130996e57cbc10144aa
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index bdd212f6154..f68ab4dd095 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -1243,7 +1243,7 @@ const char *qWebEngineChromiumVersion() noexcept
 
 const char *qWebEngineChromiumSecurityPatchVersion() noexcept
 {
-    return "136.0.7103.114"; // FIXME: Remember to update
+    return "137.0.7151.55"; // FIXME: Remember to update
 }
 
 QT_END_NAMESPACE

From 08e0cfb09c199a74b8d0105b9e97f2b1ba82c8b3 Mon Sep 17 00:00:00 2001
From: Anu Aliyas <anu.aliyas@qt.io>
Date: Mon, 2 Jun 2025 12:01:59 +0200
Subject: [PATCH 029/100] Update Extension WebUI page handler to support new
 functionalities

Updated Extenion WebUI page handler to support thh efollowing
functionalities.
- Install extension
- Unload and Uninstall extension
- Disable extension

Change-Id: Ib47f2fe7cf562aa4c4148942e8f67e22d9c76455
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit bdc61630cd4eaee8c9b23bbfbd5b8fb29fe35062)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../webui/extensions_ui_page_handler_qt.cpp   | 118 ++++++++++++++++--
 .../webui/extensions_ui_page_handler_qt.h     |   8 ++
 2 files changed, 114 insertions(+), 12 deletions(-)

diff --git a/src/core/extensions/webui/extensions_ui_page_handler_qt.cpp b/src/core/extensions/webui/extensions_ui_page_handler_qt.cpp
index 2e88c393c0c..57691f84530 100644
--- a/src/core/extensions/webui/extensions_ui_page_handler_qt.cpp
+++ b/src/core/extensions/webui/extensions_ui_page_handler_qt.cpp
@@ -8,6 +8,7 @@
 
 #include "extensions/browser/extension_registry.h"
 #include "extensions/extension_manager.h"
+#include "extensions/extension_loader.h"
 #include "api/qwebengineextensionmanager.h"
 #include "profile_adapter.h"
 #include "profile_qt.h"
@@ -26,24 +27,22 @@ ExtensionsUIPageHandlerQt::~ExtensionsUIPageHandlerQt() { }
 void ExtensionsUIPageHandlerQt::GetAllExtensionInfo(GetAllExtensionInfoCallback callback)
 {
     std::vector<qtwebengine::mojom::ExtensionInfoPtr> extensionsInfo;
-
-    auto add_to_list = [&extensionsInfo](const extensions::ExtensionSet &extensions,
-                                         bool is_enabled) {
+    auto add_to_list = [&extensionsInfo](QList<QWebEngineExtensionInfo> extensions) {
         for (auto extension : extensions) {
             auto info = qtwebengine::mojom::ExtensionInfo::New();
-            info->name = extension->name();
-            info->description = extension->description();
-            info->version = extension->VersionString();
-            info->id = extension->id();
-            info->isEnabled = is_enabled;
+            info->name = extension.name().toStdString();
+            info->description = extension.description().toStdString();
+            info->id = extension.id().toStdString();
+            info->isEnabled = extension.isEnabled();
+            info->isInstalled = extension.isInstalled();
+            info->isLoaded = extension.isLoaded();
             extensionsInfo.push_back(std::move(info));
         }
     };
 
-    extensions::ExtensionRegistry *registry = extensions::ExtensionRegistry::Get(profile_);
-    add_to_list(registry->enabled_extensions(), true);
-    add_to_list(registry->disabled_extensions(), false);
-
+    auto profileAdapter = static_cast<QtWebEngineCore::ProfileQt *>(profile_)->profileAdapter();
+    QWebEngineExtensionManager *manager = profileAdapter->extensionManager();
+    add_to_list(manager->extensions());
     std::move(callback).Run(std::move(extensionsInfo));
 }
 
@@ -54,6 +53,13 @@ void ExtensionsUIPageHandlerQt::LoadExtension()
             base::FilePath(), webui_->GetWebContents());
 }
 
+void ExtensionsUIPageHandlerQt::InstallExtension()
+{
+    SelectFileDialog::Show(base::BindOnce(&ExtensionsUIPageHandlerQt::InnerInstallExtension,
+                                          base::Unretained(this)),
+                           base::FilePath(), webui_->GetWebContents());
+}
+
 void ExtensionsUIPageHandlerQt::InnerLoadExtension(const base::FilePath &path)
 {
     auto profileAdapter = static_cast<QtWebEngineCore::ProfileQt *>(profile_)->profileAdapter();
@@ -68,3 +74,91 @@ void ExtensionsUIPageHandlerQt::InnerLoadExtension(const base::FilePath &path)
                                    });
     manager->loadExtension(QtWebEngineCore::toQt(path));
 }
+
+void ExtensionsUIPageHandlerQt::InnerInstallExtension(const base::FilePath &path)
+{
+    auto profileAdapter = static_cast<QtWebEngineCore::ProfileQt *>(profile_)->profileAdapter();
+    QWebEngineExtensionManager *manager = profileAdapter->extensionManager();
+
+    QMetaObject::Connection *const connection = new QMetaObject::Connection;
+    *connection = QObject::connect(manager, &QWebEngineExtensionManager::extensionInstallFinished,
+                                   [this, connection]() {
+                                       page_->ReloadPage();
+                                       QObject::disconnect(*connection);
+                                       delete connection;
+                                   });
+    manager->installExtension(QtWebEngineCore::toQt(path));
+}
+
+void ExtensionsUIPageHandlerQt::UninstallExtension(const std::string &id,
+                                                   UninstallExtensionCallback callback)
+{
+    auto profileAdapter = static_cast<QtWebEngineCore::ProfileQt *>(profile_)->profileAdapter();
+    QWebEngineExtensionManager *manager = profileAdapter->extensionManager();
+
+    QWebEngineExtensionInfo extensionInfo;
+    if (!FindExtensionById(id, extensionInfo)) {
+        std::move(callback).Run("Unable to find extension with Id " + id);
+        return;
+    }
+
+    QMetaObject::Connection *const connection = new QMetaObject::Connection;
+    *connection = QObject::connect(manager, &QWebEngineExtensionManager::extensionUninstallFinished,
+                                   [connection, cb = std::move(callback)](
+                                           const QWebEngineExtensionInfo &extension) mutable {
+                                       std::move(cb).Run(extension.error().toStdString());
+                                       QObject::disconnect(*connection);
+                                       delete connection;
+                                   });
+
+    manager->uninstallExtension(extensionInfo);
+}
+
+void ExtensionsUIPageHandlerQt::UnloadExtension(const std::string &id,
+                                                UnloadExtensionCallback callback)
+{
+    auto profileAdapter = static_cast<QtWebEngineCore::ProfileQt *>(profile_)->profileAdapter();
+    QWebEngineExtensionManager *manager = profileAdapter->extensionManager();
+
+    QWebEngineExtensionInfo extensionInfo;
+    if (!FindExtensionById(id, extensionInfo)) {
+        std::move(callback).Run("Unable to find extension with Id " + id);
+        return;
+    }
+
+    QMetaObject::Connection *const connection = new QMetaObject::Connection;
+    *connection = QObject::connect(manager, &QWebEngineExtensionManager::extensionUnloadFinished,
+                                   [connection, cb = std::move(callback)](
+                                           const QWebEngineExtensionInfo &extension) mutable {
+                                       std::move(cb).Run(extension.error().toStdString());
+                                       QObject::disconnect(*connection);
+                                       delete connection;
+                                   });
+
+    manager->unloadExtension(extensionInfo);
+}
+
+void ExtensionsUIPageHandlerQt::SetExtensionEnabled(const std::string &id, bool isEnabled,
+                                                    SetExtensionEnabledCallback callback)
+{
+    static_cast<extensions::ExtensionSystemQt *>(extensions::ExtensionSystem::Get(profile_))
+            ->extensionManager()
+            ->setExtensionEnabled(id, isEnabled);
+    std::move(callback).Run();
+}
+
+bool ExtensionsUIPageHandlerQt::FindExtensionById(const std::string &id,
+                                                  QWebEngineExtensionInfo &extensionInfo)
+{
+    auto profileAdapter = static_cast<QtWebEngineCore::ProfileQt *>(profile_)->profileAdapter();
+    QWebEngineExtensionManager *manager = profileAdapter->extensionManager();
+
+    QList<QWebEngineExtensionInfo> extensions = manager->extensions();
+    for (auto extension : extensions) {
+        if (extension.id() == id) {
+            extensionInfo = extension;
+            return true;
+        }
+    }
+    return false;
+}
diff --git a/src/core/extensions/webui/extensions_ui_page_handler_qt.h b/src/core/extensions/webui/extensions_ui_page_handler_qt.h
index 236c7df1bf8..e366356b9f0 100644
--- a/src/core/extensions/webui/extensions_ui_page_handler_qt.h
+++ b/src/core/extensions/webui/extensions_ui_page_handler_qt.h
@@ -11,6 +11,7 @@
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "qtwebengine/browser/extensions/webui/extensions_ui_qt.mojom.h"
+#include "api/qwebengineextensioninfo.h"
 
 class ExtensionsUIPageHandlerQt : public qtwebengine::mojom::PageHandler
 {
@@ -26,9 +27,16 @@ class ExtensionsUIPageHandlerQt : public qtwebengine::mojom::PageHandler
 
     void GetAllExtensionInfo(GetAllExtensionInfoCallback callback) override;
     void LoadExtension() override;
+    void InstallExtension() override;
+    void UninstallExtension(const std::string &id, UninstallExtensionCallback callback) override;
+    void UnloadExtension(const std::string &id, UnloadExtensionCallback callback) override;
+    void SetExtensionEnabled(const std::string &id, bool isEnabled,
+                             SetExtensionEnabledCallback callback) override;
 
 private:
+    bool FindExtensionById(const std::string &id, QWebEngineExtensionInfo &extensionInfo);
     void InnerLoadExtension(const base::FilePath &path);
+    void InnerInstallExtension(const base::FilePath &path);
 
     mojo::Receiver<qtwebengine::mojom::PageHandler> receiver_;
     mojo::Remote<qtwebengine::mojom::Page> page_;

From 9a42b281e60ae3efdcaf62d80891c90d967a83ab Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Tue, 10 Jun 2025 15:29:49 +0200
Subject: [PATCH 030/100] Update Chromium

Submodule src/3rdparty cc9ba81d..d55e428c:
* [Backport] Security bug 420637585
* [backport] CVE-2025-5068 (2/2)
* [backport] CVE-2025-5068 (1/2)
* [backport] CVE-2025-5419

Fixes: QTBUG-137383
Change-Id: Iab29ac0cc8117b519485d2a9683ee0babc1d2d59
Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
(cherry picked from commit d0445ac41e199bc1ffffc9d9912a7bc2927997cc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 CHROMIUM_VERSION                | 2 +-
 src/3rdparty                    | 2 +-
 src/core/web_engine_context.cpp | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION
index 56ab23d041e..4855e4bfd0b 100644
--- a/CHROMIUM_VERSION
+++ b/CHROMIUM_VERSION
@@ -1,3 +1,3 @@
 
 Based on Chromium version:                                      130.0.6723.192
-Patched with security patches up to Chromium version:           137.0.7151.55
+Patched with security patches up to Chromium version:           137.0.7151.68
diff --git a/src/3rdparty b/src/3rdparty
index cc9ba81d6b5..d55e428cf65 160000
--- a/src/3rdparty
+++ b/src/3rdparty
@@ -1 +1 @@
-Subproject commit cc9ba81d6b53af42f5a54130996e57cbc10144aa
+Subproject commit d55e428cf65c2fffceef1e1eb95803d3395415f8
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index f68ab4dd095..d04016845a3 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -1243,7 +1243,7 @@ const char *qWebEngineChromiumVersion() noexcept
 
 const char *qWebEngineChromiumSecurityPatchVersion() noexcept
 {
-    return "137.0.7151.55"; // FIXME: Remember to update
+    return "137.0.7151.68"; // FIXME: Remember to update
 }
 
 QT_END_NAMESPACE

From 5246905441c29479cd0bf02a3fe804c00b31bd59 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Tue, 17 Jun 2025 20:54:15 +0000
Subject: [PATCH 031/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I8f48f7e17d6ff2af9fd08370a8da2671ed4467e4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 59c16cd9c0c..ed86b2c9b58 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: 270843e08c61f27433486bd0bf05020e92f91e6d
+    ref: f1b6d8b8fa0a37a98661dd303668934ea5330d40
     required: true
   ../qtpositioning:
-    ref: 1e46cadc6ee5bf69eab4db50ff6915fd8394d9d5
+    ref: fe9716be1f325c8cb762cd10d14b4eb2d24370a5
     required: false
   ../qttools:
-    ref: 686bb6f0e53a7ccbe4d52a36d96bfde3e166cb12
+    ref: c5f808f9f2b018ba741dc541c9fdc1d1ee710b37
     required: false
   ../qtwebchannel:
-    ref: 2fa0950f98f1d96ab0b20227217ead0ca964e427
+    ref: 21b087c4916774e6717c361c757da71f432d6641
     required: false

From d921cce40f2a5444233f55835f08e3063879767c Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Wed, 18 Jun 2025 10:18:16 +0200
Subject: [PATCH 032/100] Fix build with QtDeclarative 6.11

getV4Engine() was removed, and never needed in Qt6.

Fixes: QTBUG-137854
Change-Id: I50f168bd7dae2523632705a0612450345dff5117
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 763eabe070d627c4534891d72ec518fda9a9c9d9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/webenginequick/api/qquickwebenginescriptcollection.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/webenginequick/api/qquickwebenginescriptcollection.cpp b/src/webenginequick/api/qquickwebenginescriptcollection.cpp
index f5328a134e4..7a3e894a656 100644
--- a/src/webenginequick/api/qquickwebenginescriptcollection.cpp
+++ b/src/webenginequick/api/qquickwebenginescriptcollection.cpp
@@ -198,7 +198,7 @@ QJSValue QQuickWebEngineScriptCollection::collection() const
     }
 
     const QList<QWebEngineScript> &list = d->toList();
-    QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(d->m_qmlEngine);
+    QV4::ExecutionEngine *v4 = d->m_qmlEngine->handle();
     QV4::Scope scope(v4);
     QV4::Scoped<QV4::ArrayObject> scriptArray(scope, v4->newArrayObject(list.size()));
     int i = 0;

From fcccf547e099fe8b1f20b124987b3b959594f5b5 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Mon, 23 Jun 2025 02:32:33 +0000
Subject: [PATCH 033/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I75e28c8985e09e21957e9f7e9310d21dbf991e57
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index ed86b2c9b58..0bb796050c7 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: f1b6d8b8fa0a37a98661dd303668934ea5330d40
+    ref: 74e98d23f0e9bc094c7633852dd92ba0535aaefa
     required: true
   ../qtpositioning:
-    ref: fe9716be1f325c8cb762cd10d14b4eb2d24370a5
+    ref: f2d308d728700ff23182d052c446b5c39fc41d4f
     required: false
   ../qttools:
-    ref: c5f808f9f2b018ba741dc541c9fdc1d1ee710b37
+    ref: 2ce2efd5fa383cfd204dcbf5c8ec82e6064a2885
     required: false
   ../qtwebchannel:
-    ref: 21b087c4916774e6717c361c757da71f432d6641
+    ref: acd12265788d2e195798573ded4e84128c09d382
     required: false

From d690c8d7283545120de105f9ae2405b939bd84ab Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Mon, 23 Jun 2025 16:24:40 +0200
Subject: [PATCH 034/100] Forward mold linker option to chromium

446cd85 has added support to link with mold,
however 'use_mold' was never passed to chromium.

This change fixes:
`error adding symbols: archive has no index;`
linker errors when configured with clang + mold.

Change-Id: I12c6d4751153f301dcd8241593e8bb5d8e7e3e40
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 77b6ee9fd785ba4265ec2353baf2d5b006cc5cc6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 cmake/QtToolchainHelpers.cmake | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cmake/QtToolchainHelpers.cmake b/cmake/QtToolchainHelpers.cmake
index a34c0d06efa..839650b7a1f 100644
--- a/cmake/QtToolchainHelpers.cmake
+++ b/cmake/QtToolchainHelpers.cmake
@@ -504,6 +504,10 @@ macro(append_compiler_linker_sdk_setup)
         ARGS use_lld
         CONDITION QT_FEATURE_use_lld_linker OR (MSVC AND CLANG)
     )
+    extend_gn_list(gnArgArg
+        ARGS use_mold
+        CONDITION QT_FEATURE_use_mold_linker
+    )
     unset(cpu)
 endmacro()
 

From 609a790db9a263f671c414de71f135732968d00e Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Wed, 25 Jun 2025 19:39:08 +0000
Subject: [PATCH 035/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I18ae0350f03dacb92d3be28fa5be5f82a0f8f463
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 0bb796050c7..d3ee3fcbcbf 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: 74e98d23f0e9bc094c7633852dd92ba0535aaefa
+    ref: dd55c524076c3de145c70eb31b3bc5d5b5b76def
     required: true
   ../qtpositioning:
-    ref: f2d308d728700ff23182d052c446b5c39fc41d4f
+    ref: a97f8ee5bfd58529fb23aec950c57abc5b36c31b
     required: false
   ../qttools:
-    ref: 2ce2efd5fa383cfd204dcbf5c8ec82e6064a2885
+    ref: 48a304896a12d746e42d879ec7f285436c337818
     required: false
   ../qtwebchannel:
-    ref: acd12265788d2e195798573ded4e84128c09d382
+    ref: 9f3d6665b7a51dd5aa367e14348ec08e8b596c0f
     required: false

From 77392d93cd39fb5640537181972c46694387d58b Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Thu, 26 Jun 2025 19:05:46 +0200
Subject: [PATCH 036/100] Fix longer integration times

Use COMMON_NON_QTBASE_TARGET_CMAKE_ARGS for
windows-11_24H2-msvc2022-arm64, as this works as expected
in case of cross-compilation.

Note this platform is still being rolled out, but the provisioning
is not completed, therefore should be skipped.

This amends d6bb55bf83efef942503cd4bd4e6874f8ecdc8c6.

Change-Id: Icbd900790d4bc052498c590ccfa32d9be17bb607
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit dfcf53bf9c0951146e7c7b06b05581fa222e874b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 coin/module_config.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index 7563d04f54a..b812baa43c1 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -49,7 +49,7 @@ instructions:
         env_var: COIN_PLATFORM_ID
         contains_value: "windows-11_22h2-arm64-msvc2022"
     - type: AppendToEnvironmentVariable
-      variableName: COMMON_NON_QTBASE_CMAKE_ARGS
+      variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
       variableValue: " -DFEATURE_qtwebengine_build=OFF"
       enable_if:
         condition: runtime

From d8aa7133bdf7a628cd13c4ac0ba9e519fa57a937 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Mon, 30 Jun 2025 07:02:40 +0000
Subject: [PATCH 037/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: If8608cadeea1f4348facf58048015d106ce52015
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index d3ee3fcbcbf..a9f81ca74e9 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: dd55c524076c3de145c70eb31b3bc5d5b5b76def
+    ref: 0330e9d354249c0e15d9794acddf067db870bfbb
     required: true
   ../qtpositioning:
-    ref: a97f8ee5bfd58529fb23aec950c57abc5b36c31b
+    ref: 8c8dacd10e0b9bd6d9e5dca820e81657af26efce
     required: false
   ../qttools:
-    ref: 48a304896a12d746e42d879ec7f285436c337818
+    ref: 1a541ae7015dc3fe97a8c03ea2c95970275f2606
     required: false
   ../qtwebchannel:
-    ref: 9f3d6665b7a51dd5aa367e14348ec08e8b596c0f
+    ref: 37e030213fc04677de5729c41cf37bf56ed84c28
     required: false

From 81e3704400d1579660cee8501ef462b9c5bef24b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kai=20K=C3=B6hne?= <kai.koehne@qt.io>
Date: Mon, 30 Jun 2025 10:12:44 +0200
Subject: [PATCH 038/100] Remove remainings of Conan support

We stopped the Conan initiative already in 2022. The existing conan
files are not used, and most likely don't work anymore.

  https://www.qt.io/blog/conan-package-manager-pilot-to-end-in-december

Change-Id: Iff394e768f0bffb58863c404f7b498be61e06cbd
Reviewed-by: Moss Heim <moss.heim@qt.io>
(cherry picked from commit c991e3f2ad7ad3b1bbb7bb74466547c5e2237003)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 conanfile.py | 89 ----------------------------------------------------
 1 file changed, 89 deletions(-)
 delete mode 100644 conanfile.py

diff --git a/conanfile.py b/conanfile.py
deleted file mode 100644
index 137285c08e7..00000000000
--- a/conanfile.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# Copyright (C) 2021 The Qt Company Ltd.
-# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-
-from conans import ConanFile
-import re
-from pathlib import Path
-from typing import Dict, Any
-
-_qtwebengine_features = [
-    "qtpdf-build",
-    "qtpdf-quick-build",
-    "qtpdf-widgets-build",
-    "qtwebengine-build",
-    "qtwebengine-core-build",
-    "qtwebengine-quick-build",
-    "qtwebengine-widgets-build",
-    "webengine-developer-build",
-    "webengine-embedded-build",
-    "webengine-extensions",
-    "webengine-full-debug-info",
-    "webengine-jumbo-build",
-    "webengine-kerberos",
-    "webengine-native-spellchecker",
-    "webengine-pepper-plugins",
-    "webengine-printing-and-pdf",
-    "webengine-proprietary-codecs",
-    "webengine-sanitizer",
-    "webengine-spellchecker",
-    "webengine-webchannel",
-    "webengine-webrtc",
-    "webengine-webrtc-pipewire",
-    "system-webengine-ffmpeg",
-    "system-webengine-icu",
-]
-
-
-def _parse_qt_version_by_key(key: str) -> str:
-    with open(Path(__file__).parent.resolve() / ".cmake.conf") as f:
-        m = re.search(fr'{key} .*"(.*)"', f.read())
-    return m.group(1) if m else ""
-
-
-def _get_qt_minor_version() -> str:
-    return ".".join(_parse_qt_version_by_key("QT_REPO_MODULE_VERSION").split(".")[:2])
-
-
-class QtWebEngine(ConanFile):
-    name = "qtwebengine"
-    license = "LGPL-3.0-only, Commercial Qt License Agreement"
-    author = "The Qt Company <https://www.qt.io/contact-us>"
-    url = "https://code.qt.io/cgit/qt/qtwebengine.git"
-    description = (
-        "Qt WebEngine integrates Chromium's fast moving web capabilities into Qt. "
-        "The integration with Qt focuses on an API that is easy to use, yet extensible. "
-        "We also make no compromise on the graphics integration, integrating the layer "
-        "rendering of Chromium directly into the OpenGL scene graph of Qt Quick."
-    )
-    topics = "qt", "qt6", "qtwebengine", "WebEngine", "Chromium"
-    settings = "os", "compiler", "arch", "build_type"
-    # for referencing the version number and prerelease tag and dependencies info
-    exports = ".cmake.conf", "dependencies.yaml"
-    exports_sources = "*", "!conan*.*"
-    python_requires = f"qt-conan-common/{_get_qt_minor_version()}@qt/everywhere"
-    python_requires_extend = "qt-conan-common.QtLeafModule"
-
-    def get_qt_leaf_module_options(self) -> Dict[str, Any]:
-        """Implements abstractmethod from qt-conan-common.QtLeafModule"""
-        return self._shared.convert_qt_features_to_conan_options(_qtwebengine_features)
-
-    def get_qt_leaf_module_default_options(self) -> Dict[str, Any]:
-        """Implements abstractmethod from qt-conan-common.QtLeafModule"""
-        return self._shared.convert_qt_features_to_default_conan_options(_qtwebengine_features)
-
-    def package_env_info(self) -> Dict[str, Any]:
-        """Implements abstractmethod from qt-conan-common.QtLeafModule"""
-        # this will be called only after a successful build
-        _f = lambda p: True
-        if tools.os_info.is_windows:
-            ptrn = "**/QtWebEngineProcess.exe"
-        elif tools.os_info.is_macos:
-            ptrn = "**/QtWebEngineProcess.app/**/QtWebEngineProcess"
-            _f = lambda p: not any(".dSYM" in item for item in p.parts)
-        else:
-            ptrn = "**/QtWebEngineProcess"
-        ret = [str(p) for p in Path(self.package_folder).rglob(ptrn) if p.is_file() and _f(p)]
-        if len(ret) != 1:
-            print("Expected to find one 'QtWebEngineProcess'. Found: {0}".format(ret))
-        return {"QTWEBENGINEPROCESS_PATH": ret.pop() if ret else ""}
-

From 63346ff5ffffe80789bb308a921cba9e5f55c2c3 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Tue, 1 Jul 2025 10:31:06 +0200
Subject: [PATCH 039/100] Disable build on WoA 11 23h2

Note 'in_values' syntax seems not to work with strings

Task-number: QTQAINFRA-6973
Pick-to: 6.9
Change-Id: I1856316664a557a9a097217ea5cb649903580a1c
Reviewed-by: Tero Heikkinen <tero.heikkinen@qt.io>
(cherry picked from commit ae8e4964c50fe134c2d45c3c1f78944158e94806)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 coin.nodes              |  1 +
 coin/module_config.yaml | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/coin.nodes b/coin.nodes
index e002b0c3560..d577e48805b 100644
--- a/coin.nodes
+++ b/coin.nodes
@@ -36,6 +36,7 @@ webassembly-linux-thread-asyncify             OFF             OFF
 windows-10_22h2-msvc2022                      ON              ON
 windows-10_22h2-mingw13                       OFF             ON
 windows-11_22h2-arm64-msvc2022                OFF             ON
+windows-11_23h2-arm64-msvc2022                OFF             ON
 windows-11_23H2-llvm                          OFF             ON
 windows-11_23H2-msvc2022-arm64                ON              ON
 windows-11_23H2-msvc2022                      ON              ON
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index b812baa43c1..e892a210091 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -45,9 +45,14 @@ instructions:
       variableName: COMMON_NON_QTBASE_CMAKE_ARGS
       variableValue: " -DFEATURE_qtwebengine_build=OFF"
       enable_if:
-        condition: runtime
-        env_var: COIN_PLATFORM_ID
-        contains_value: "windows-11_22h2-arm64-msvc2022"
+        condition: or
+        conditions:
+          - condition: runtime
+            env_var: COIN_PLATFORM_ID
+            contains_value: "windows-11_22h2-arm64-msvc2022"
+          - condition: runtime
+            env_var: COIN_PLATFORM_ID
+            contains_value: "windows-11_23h2-arm64-msvc2022"
     - type: AppendToEnvironmentVariable
       variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
       variableValue: " -DFEATURE_qtwebengine_build=OFF"

From 8bed1d79d14259cedd14c51bf7dc94d99ba94616 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Wed, 2 Jul 2025 13:31:29 +0200
Subject: [PATCH 040/100] Fix -no-opengl build

Amends 18210c251 Make possible to use system EGL instead of ANGLE on Linux

Change-Id: I67e83f46072d5984ceb140ac4d9cf786b057ee20
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 76781b0172fda1cf35d978a5953756d5af88be88)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/ozone/gl_ozone_qt.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/core/ozone/gl_ozone_qt.cpp b/src/core/ozone/gl_ozone_qt.cpp
index 2a9bd18b7da..bde6071508e 100644
--- a/src/core/ozone/gl_ozone_qt.cpp
+++ b/src/core/ozone/gl_ozone_qt.cpp
@@ -155,11 +155,13 @@ bool GLOzoneEGLQt::LoadGLES2Bindings(const gl::GLImplementationParts & /*impleme
 {
     gl::GLGetProcAddressProc getProcAddressPtr = nullptr;
 
+#if QT_CONFIG(opengl) && QT_CONFIG(egl)
     if (OzoneUtilQt::usingEGL()) {
         QOpenGLContext *context = OzoneUtilQt::getQOpenGLContext();
         getProcAddressPtr = reinterpret_cast<gl::GLGetProcAddressProc>(
                 context->getProcAddress("eglGetProcAddress"));
     }
+#endif
 
 #if QT_CONFIG(dlopen)
     if (getProcAddressPtr == nullptr) {

From 9c633c01b54de7cddde1741ccd6134062ad59704 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Wed, 2 Jul 2025 20:51:02 +0000
Subject: [PATCH 041/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I9f3446dde270d7d80e12976e71202d57d6fa05de
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index a9f81ca74e9..1af4a056277 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: 0330e9d354249c0e15d9794acddf067db870bfbb
+    ref: 9b936c9d8c0de508cba92f8a6c9247253ef2c324
     required: true
   ../qtpositioning:
-    ref: 8c8dacd10e0b9bd6d9e5dca820e81657af26efce
+    ref: 6c648fb4fbe41df576b17d51400fa83c875852f1
     required: false
   ../qttools:
-    ref: 1a541ae7015dc3fe97a8c03ea2c95970275f2606
+    ref: bf462711e62e6fdd97ab3b19b98e3c706f96434a
     required: false
   ../qtwebchannel:
-    ref: 37e030213fc04677de5729c41cf37bf56ed84c28
+    ref: fe85ed22d426a0066c01ca3708b00493e5c2e91c
     required: false

From 1dabfd90ae8889cd2aac046f0bf7015c77735e72 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Thu, 3 Jul 2025 09:42:53 +0200
Subject: [PATCH 042/100] Fix crash if ui delegates are not deployed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

In case delegate for touch handle can not be loaded
bail out and simply return nullptr as TouchHandleDrawableQt
works fine without delegate (guards against nullptr).

Note all other dialog already bailout in case default delegate
can not be loaded.

Tested on bookworm with 6.8.3

Fixes: QTBUG-111907
Pick-to: 6.9 6.8
Change-Id: Ib509b63010888fa718f23148c06d973382cad428
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
(cherry picked from commit e86aa68ac75da4e20b55c2bca91d3f98a1e53090)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/webenginequick/api/qquickwebengineview.cpp | 8 ++++++--
 src/webenginequick/ui_delegates_manager.cpp    | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/webenginequick/api/qquickwebengineview.cpp b/src/webenginequick/api/qquickwebengineview.cpp
index dae4a375399..ade8b451c4a 100644
--- a/src/webenginequick/api/qquickwebengineview.cpp
+++ b/src/webenginequick/api/qquickwebengineview.cpp
@@ -1450,8 +1450,9 @@ QQuickWebEngineViewPrivate::createTouchHandleDelegate(const QMap<int, QImage> &i
 {
     Q_Q(QQuickWebEngineView);
     // lifecycle managed by Chromium's TouchHandleDrawable
-    QQuickWebEngineTouchHandle *handle = new QQuickWebEngineTouchHandle();
+    QQuickWebEngineTouchHandle *handle(nullptr);
     if (m_touchHandleDelegate) {
+        handle = new QQuickWebEngineTouchHandle();
         QQmlContext *qmlContext = QQmlEngine::contextForObject(q);
         QQmlContext *context = new QQmlContext(qmlContext, handle);
         context->setContextObject(handle);
@@ -1462,7 +1463,9 @@ QQuickWebEngineViewPrivate::createTouchHandleDelegate(const QMap<int, QImage> &i
         handle->setItem(item, false);
     } else {
         QQuickItem *item = ui()->createTouchHandle();
-        Q_ASSERT(item);
+        if (!item) {
+            return nullptr;
+        }
         QQmlEngine *engine = qmlEngine(item);
         Q_ASSERT(engine);
         QQuickWebEngineTouchHandleProvider *touchHandleProvider =
@@ -1470,6 +1473,7 @@ QQuickWebEngineViewPrivate::createTouchHandleDelegate(const QMap<int, QImage> &i
                         engine->imageProvider(QQuickWebEngineTouchHandleProvider::identifier()));
         Q_ASSERT(touchHandleProvider);
         touchHandleProvider->init(images);
+        handle = new QQuickWebEngineTouchHandle();
         handle->setItem(item, true);
     }
     return handle;
diff --git a/src/webenginequick/ui_delegates_manager.cpp b/src/webenginequick/ui_delegates_manager.cpp
index f2488a7c285..93ac634227e 100644
--- a/src/webenginequick/ui_delegates_manager.cpp
+++ b/src/webenginequick/ui_delegates_manager.cpp
@@ -154,6 +154,7 @@ bool UIDelegatesManager::ensureComponentLoaded(ComponentType type)
         }
         return true;
     }
+    qWarning("Default ui delegate %s can not be found.", qPrintable(fileName));
     return false;
 }
 

From dbe5e829c820ce11570e48d93f77e1c5690db7f2 Mon Sep 17 00:00:00 2001
From: Elias Toivola <elias.toivola@qt.io>
Date: Fri, 23 May 2025 11:43:31 +0300
Subject: [PATCH 043/100] Re-enable windows-11_24H2-msvc2022-arm64

This reverts d6bb55bf83efef942503cd4bd4e6874f8ecdc8c6

Task-number: QTQAINFRA-6734
Change-Id: Ia881a309051f28d9f274ca3a484054eb55246b67
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit 43d874d3d03e16448378b70f3a4b68f13a251af5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 coin/module_config.yaml | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index e892a210091..b30b231fb00 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -53,13 +53,6 @@ instructions:
           - condition: runtime
             env_var: COIN_PLATFORM_ID
             contains_value: "windows-11_23h2-arm64-msvc2022"
-    - type: AppendToEnvironmentVariable
-      variableName: COMMON_NON_QTBASE_TARGET_CMAKE_ARGS
-      variableValue: " -DFEATURE_qtwebengine_build=OFF"
-      enable_if:
-        condition: runtime
-        env_var: COIN_PLATFORM_ID
-        contains_value: "windows-11_24H2-msvc2022-arm64"
     - type: AppendToEnvironmentVariable
       variableName: COMMON_NON_QTBASE_CMAKE_ARGS
       variableValue: " -DFEATURE_webengine_system_libxml=OFF -DFEATURE_webengine_system_libtiff=OFF"

From 64f49d142e922923bf09019b4f43f49359e32793 Mon Sep 17 00:00:00 2001
From: Moss Heim <moss.heim@qt.io>
Date: Mon, 30 Jun 2025 15:28:53 +0200
Subject: [PATCH 044/100] [sbom] Provide more info during SBOM generation

Currently we silence any output from sbom.py unless it fails. But we
should at least echo the warnings/errors since they may be unique to the
platform/configuration and difficult to find otherwise.

* Add support for the environment variable
  QT_WEBENGINE_VERBOSE_SBOM_OUTPUT to control more
  info during SBOM gen.
* When sbom.py produces output, provide that output to the user.

Change-Id: I3b0eda96ae63ab17ac35d9b67af9344a2e320215
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 2539f88791e6615ef35df70e78316ca9b14a67e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 cmake/QtGnSbom.cmake | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/cmake/QtGnSbom.cmake b/cmake/QtGnSbom.cmake
index 905efed1370..eb5187df8e1 100644
--- a/cmake/QtGnSbom.cmake
+++ b/cmake/QtGnSbom.cmake
@@ -31,6 +31,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
 
 find_package(Gn ${QT_REPO_MODULE_VERSION} EXACT MODULE REQUIRED)
 
+if(DEFINED ENV{QT_WEBENGINE_VERBOSE_SBOM_OUTPUT})
+    set(SCRIPT_VERBOSE "--verbose")
+else()
+    set(SCRIPT_VERBOSE "")
+endif()
+
 execute_process(
     COMMAND "${Python3_EXECUTABLE}" "${SCRIPT_PATH}"
         --gn-binary "${Gn_EXECUTABLE}"
@@ -39,6 +45,7 @@ execute_process(
         --gn-version ${Gn_VERSION}
         --package-id ${PACKAGE_ID}
         --namespace "${DOC_NAMESPACE}"
+        ${SCRIPT_VERBOSE}
         "${OUTPUT}"
     RESULT_VARIABLE gn_result
     OUTPUT_VARIABLE gn_output
@@ -46,8 +53,12 @@ execute_process(
     TIMEOUT 600
 )
 
+string(REGEX REPLACE "\n$" "" gn_output "${gn_output}")
+string(REGEX REPLACE "\n$" "" gn_error "${gn_error}")
 if(NOT gn_result EQUAL 0)
-    string(REGEX REPLACE "\n$" "" gn_output "${gn_output}")
-    string(REGEX REPLACE "\n$" "" gn_error "${gn_error}")
     message(FATAL_ERROR "\n-- SBOM generation FAILED\n${gn_output}\n${gn_error}\n-- Exit code: ${gn_result}\n")
+elseif(DEFINED ENV{QT_WEBENGINE_VERBOSE_SBOM_OUTPUT})
+    message(STATUS "SBOM generation successful\n-- stdout: ${gn_output}\n-- stderr: ${gn_error}")
+elseif(NOT (gn_output STREQUAL "" AND gn_error STREQUAL ""))
+    message(STATUS "SBOM generation successful but did not run cleanly:\n-- stdout: ${gn_output}\n-- stderr: ${gn_error}")
 endif()

From 96b4b85b30afc0513c2cdb9896d9dfb8b0046b1a Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Mon, 7 Jul 2025 12:40:35 +0000
Subject: [PATCH 045/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: If8ca0bea7a7a9f41160da440a6e8034b300b6a17
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 1af4a056277..affc1724715 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: 9b936c9d8c0de508cba92f8a6c9247253ef2c324
+    ref: 5ab1597476669fc4e7cc3a4b3242982e40a3f969
     required: true
   ../qtpositioning:
-    ref: 6c648fb4fbe41df576b17d51400fa83c875852f1
+    ref: 45cd1794142d89ed04b87ed5a4c714ced5c18974
     required: false
   ../qttools:
-    ref: bf462711e62e6fdd97ab3b19b98e3c706f96434a
+    ref: 90552cfadd9c39956fb23096a8a451e7de27fcdb
     required: false
   ../qtwebchannel:
-    ref: fe85ed22d426a0066c01ca3708b00493e5c2e91c
+    ref: 65c3f0d8500842f0f6c0b9dc04c7adef5de0ef26
     required: false

From 2fd6f6edbbb82cbdc36cdb35501e29af5da48b18 Mon Sep 17 00:00:00 2001
From: Anu Aliyas <anu.aliyas@qt.io>
Date: Wed, 9 Jul 2025 15:27:29 +0200
Subject: [PATCH 046/100] [Lifecycle]Modernize CMakeLists.txt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Modified CMake file to use qt_add_qml_module() to add QML files,
instead of using the Qt 5 way of including QML files via .qrc.

Fixes: QTBUG-138190
Pick-to: 6.9
Change-Id: I0779aaa986050d6fae0f185ca36136c23fd4db80
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
(cherry picked from commit 1c177f9aa481daf28c76ab7f195425f192f6eb40)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../webenginequick/lifecycle/CMakeLists.txt   | 20 ++++++++++++-------
 examples/webenginequick/lifecycle/main.cpp    |  2 +-
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/examples/webenginequick/lifecycle/CMakeLists.txt b/examples/webenginequick/lifecycle/CMakeLists.txt
index 46478b622cf..2da4246c07b 100644
--- a/examples/webenginequick/lifecycle/CMakeLists.txt
+++ b/examples/webenginequick/lifecycle/CMakeLists.txt
@@ -30,14 +30,20 @@ target_link_libraries(lifecycle PUBLIC
     Qt::WebEngineQuick
 )
 
-# Resources:
+qt_add_qml_module(lifecycle
+    URI LifecycleUtils
+    VERSION 1.0
+    QML_FILES
+        "WebBrowser.qml"
+        "WebTab.qml"
+        "WebTabBar.qml"
+        "WebTabButton.qml"
+        "WebTabStack.qml"
+        "WebToolButton.qml"
+    RESOURCE_PREFIX /
+)
+
 set(resources_resource_files
-    "WebBrowser.qml"
-    "WebTab.qml"
-    "WebTabBar.qml"
-    "WebTabButton.qml"
-    "WebTabStack.qml"
-    "WebToolButton.qml"
     "qtquickcontrols2.conf"
 )
 
diff --git a/examples/webenginequick/lifecycle/main.cpp b/examples/webenginequick/lifecycle/main.cpp
index 1f45ad0ee03..185dc460c9b 100644
--- a/examples/webenginequick/lifecycle/main.cpp
+++ b/examples/webenginequick/lifecycle/main.cpp
@@ -16,6 +16,6 @@ int main(int argc, char *argv[])
     QQmlApplicationEngine engine;
     Utils utils;
     engine.rootContext()->setContextProperty("utils", &utils);
-    engine.load(QUrl(QStringLiteral("qrc:/WebBrowser.qml")));
+    engine.load(QUrl(QStringLiteral("qrc:/LifecycleUtils/WebBrowser.qml")));
     return app.exec();
 }

From 947fc88867ae40ffb783bfd7e9d73db1e90fb3d8 Mon Sep 17 00:00:00 2001
From: Anu Aliyas <anu.aliyas@qt.io>
Date: Wed, 9 Jul 2025 15:20:36 +0200
Subject: [PATCH 047/100] [QuickNanoBrowser]Modernize CMakeLists.txt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Modified CMake File to use qt_add_qml_module() to add QML files,
instead of using  the Qt 5 way of including QML files via .qrc.

Fixes: QTBUG-138190
Pick-to: 6.9
Change-Id: I108c1306b76b6c736805bc1529511519985f506f
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
(cherry picked from commit 5a97036b848c360d74cf1f118c35226186be9531)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../quicknanobrowser/CMakeLists.txt           | 26 ++++++-------------
 .../webenginequick/quicknanobrowser/main.cpp  |  2 +-
 2 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/CMakeLists.txt b/examples/webenginequick/quicknanobrowser/CMakeLists.txt
index 7efb6112761..058f345d75e 100644
--- a/examples/webenginequick/quicknanobrowser/CMakeLists.txt
+++ b/examples/webenginequick/quicknanobrowser/CMakeLists.txt
@@ -43,27 +43,17 @@ target_link_libraries(quicknanobrowser PUBLIC
 qt_add_qml_module(quicknanobrowser
     URI BrowserUtils
     VERSION 1.0
+    QML_FILES
+        "ApplicationRoot.qml"
+        "BrowserDialog.qml"
+        "BrowserWindow.qml"
+        "DownloadView.qml"
+        "FindBar.qml"
+        "FullScreenNotification.qml"
+        "WebAuthDialog.qml"
     RESOURCE_PREFIX /
 )
 
-# Resources:
-set(resources_resource_files
-    "ApplicationRoot.qml"
-    "BrowserDialog.qml"
-    "BrowserWindow.qml"
-    "DownloadView.qml"
-    "FindBar.qml"
-    "FullScreenNotification.qml"
-    "WebAuthDialog.qml"
-)
-
-qt_add_resources(quicknanobrowser "resources"
-    PREFIX
-        "/"
-    FILES
-        ${resources_resource_files}
-)
-
 set(resources1_resource_files
     "icons/3rdparty/go-next.png"
     "icons/3rdparty/go-previous.png"
diff --git a/examples/webenginequick/quicknanobrowser/main.cpp b/examples/webenginequick/quicknanobrowser/main.cpp
index 1e693cbcd26..1267986a4f9 100644
--- a/examples/webenginequick/quicknanobrowser/main.cpp
+++ b/examples/webenginequick/quicknanobrowser/main.cpp
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
     parser.process(app);
 
     QQmlApplicationEngine appEngine;
-    appEngine.load(QUrl("qrc:/ApplicationRoot.qml"));
+    appEngine.load(QUrl("qrc:/BrowserUtils/ApplicationRoot.qml"));
     if (appEngine.rootObjects().isEmpty())
         qFatal("Failed to load sources");
 

From afedc58ac4cde31221e9ce716db9a5fc77036ba8 Mon Sep 17 00:00:00 2001
From: Dheerendra Purohit <dheerendra@pthinks.com>
Date: Mon, 16 Jun 2025 15:08:15 +0530
Subject: [PATCH 048/100] Doc: Clarify the C++20 requirement for Qt WebEngine

Added a clarification to qtwebengine-platform-notes.qdoc.in
stating that Qt WebEngine requires a C++20-compatible
compiler due to its Chromium dependency.

Pick-to: 6.9
Fixes: QTBUG-136231
Change-Id: If4557dbf1c6e18eae1f070a3089fc4d6d4ccd450
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit 498c56654e4d4c68db30c620317f55caacd88d0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 configure.cmake                                     | 2 ++
 src/core/doc/src/qtwebengine-platform-notes.qdoc.in | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/configure.cmake b/configure.cmake
index 9cdd898bfbd..6b3b5f7705e 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -265,7 +265,9 @@ qt_webengine_configure_check("compiler-cxx20"
     MODULES QtWebEngine QtPdf
     CONDITION TEST_cxx20
     MESSAGE "Missing C++20 compiler support."
+
     DOCUMENTATION "C++20 compiler support"
+
 )
 
 qt_webengine_configure_check("cmake"
diff --git a/src/core/doc/src/qtwebengine-platform-notes.qdoc.in b/src/core/doc/src/qtwebengine-platform-notes.qdoc.in
index b9c191c299f..c21274102f9 100644
--- a/src/core/doc/src/qtwebengine-platform-notes.qdoc.in
+++ b/src/core/doc/src/qtwebengine-platform-notes.qdoc.in
@@ -31,6 +31,10 @@
 
     \section2 All Platforms
 
+    \note Qt WebEngine requires a C++20-compatible compiler on all platforms, due to its
+    dependency on the Chromium project.
+    While Qt as a whole only requires C++17, Qt WebEngine is an exception.
+
     On all platforms, the following tools are required at build time:
 
     \list

From 04d63bea0c53fadf87107bf6eebabbabeee4f7fe Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Wed, 5 Mar 2025 11:41:26 +0100
Subject: [PATCH 049/100] Adaptations for Chromium 132

Change-Id: Id2d09604201b2c007c76328f92bb4e0c0d802cae
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit eef8bbdbff100242602bc4cde91014484ef2cd1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 cmake/QtToolchainHelpers.cmake                |  3 ++
 src/core/CMakeLists.txt                       |  1 +
 ...thenticator_request_client_delegate_qt.cpp | 21 +++------
 ...authenticator_request_client_delegate_qt.h |  5 +--
 ...uthenticator_request_dialog_controller.cpp | 29 +++++++++---
 .../authenticator_request_dialog_controller.h |  6 ++-
 ...uthenticator_request_dialog_controller_p.h |  8 +++-
 src/core/autofill_client_qt.cpp               |  5 +++
 src/core/autofill_client_qt.h                 |  2 +
 src/core/chromium_overrides.cpp               |  4 +-
 src/core/client_hints.cpp                     |  5 ---
 src/core/client_hints.h                       |  2 -
 .../compositor/native_skia_output_device.cpp  |  1 -
 .../native_skia_output_device_opengl.cpp      |  2 +-
 .../native_skia_output_device_vulkan.cpp      |  2 +-
 src/core/configure/BUILD.root.gn.in           |  7 +--
 src/core/content_browser_client_qt.cpp        | 10 +++--
 src/core/content_browser_client_qt.h          |  5 ++-
 .../extensions_browser_client_qt.cpp          |  6 +--
 .../extensions/extensions_browser_client_qt.h |  6 +--
 src/core/file_picker_controller.cpp           | 20 +++++++--
 src/core/file_picker_controller.h             |  3 +-
 ...le_system_access_permission_context_qt.cpp | 44 ++++++++++---------
 ...file_system_access_permission_context_qt.h | 18 ++++----
 ...file_system_access_permission_grant_qt.cpp |  6 +--
 .../file_system_access_permission_grant_qt.h  | 10 +++--
 ...tem_access_permission_request_controller.h |  3 ++
 ...ess_permission_request_controller_impl.cpp |  3 +-
 ...m_access_permission_request_manager_qt.cpp |  9 +++-
 ...tem_access_permission_request_manager_qt.h |  2 +-
 src/core/permission_manager_qt.cpp            |  1 -
 .../pdf_document_helper_client_qt.cpp         |  3 ++
 .../printing/pdf_document_helper_client_qt.h  |  1 +
 src/core/printing/print_view_manager_qt.cpp   | 21 ++-------
 src/core/render_widget_host_view_qt.cpp       |  9 ++--
 .../renderer/content_renderer_client_qt.cpp   |  2 +-
 .../renderer/web_engine_page_render_frame.cpp |  6 ++-
 .../touch_selection_controller_client_qt.cpp  | 12 ++---
 src/core/web_contents_delegate_qt.cpp         | 19 +++++++-
 src/core/web_contents_view_qt.h               |  1 +
 src/core/web_engine_context.cpp               |  4 +-
 src/pdf/CMakeLists.txt                        |  2 +-
 .../api/qquickwebenginedialogrequests.cpp     |  3 +-
 src/webenginewidgets/api/qwebengineview.cpp   |  2 +
 44 files changed, 200 insertions(+), 134 deletions(-)

diff --git a/cmake/QtToolchainHelpers.cmake b/cmake/QtToolchainHelpers.cmake
index 839650b7a1f..a2ed89c7e49 100644
--- a/cmake/QtToolchainHelpers.cmake
+++ b/cmake/QtToolchainHelpers.cmake
@@ -256,8 +256,11 @@ macro(append_build_type_setup)
         use_partition_alloc=true
         use_partition_alloc_as_malloc=false
         use_custom_libcxx=false
+        use_custom_libcxx_for_host=false
         enable_rust=false # We do not yet support rust
         enable_chromium_prelude=false
+        enable_rust_png=false
+        pdf_enable_fontations=false
         assert_cpp20=false
     )
     if(${config} STREQUAL "Debug")
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index dedd1dbe777..043555ed9ad 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -337,6 +337,7 @@ foreach(arch ${archs})
             qtwebengine_target="${buildDir}/${config}/${arch}:QtWebEngineCore"
             build_dawn_tests=false
             build_with_tflite_lib=false
+            webnn_use_tflite=false
             is_qtwebengine=true
             is_qtpdf=false
             chrome_pgo_phase=0
diff --git a/src/core/authenticator_request_client_delegate_qt.cpp b/src/core/authenticator_request_client_delegate_qt.cpp
index 5d01df536e1..086ee510590 100644
--- a/src/core/authenticator_request_client_delegate_qt.cpp
+++ b/src/core/authenticator_request_client_delegate_qt.cpp
@@ -47,7 +47,7 @@ void AuthenticatorRequestClientDelegateQt::SetRelyingPartyId(const std::string &
 bool AuthenticatorRequestClientDelegateQt::DoesBlockRequestOnFailure(
         InterestingFailureReason reason)
 {
-    if (!IsWebAuthnUIEnabled())
+    if (m_isUiDisabled)
         return false;
 
     switch (reason) {
@@ -132,7 +132,7 @@ void AuthenticatorRequestClientDelegateQt::SelectAccount(
         return;
     }
 
-    if (m_isConditionalRequest) {
+    if (m_dialogController->uiPresentation() == UIPresentation::kAutofill) {
         return;
     }
 
@@ -154,19 +154,10 @@ void AuthenticatorRequestClientDelegateQt::SelectAccount(
     m_dialogController->selectAccount(userList);
 }
 
-void AuthenticatorRequestClientDelegateQt::DisableUI()
+void AuthenticatorRequestClientDelegateQt::SetUIPresentation(UIPresentation ui_presentation)
 {
-    m_isUiDisabled = true;
-}
-
-bool AuthenticatorRequestClientDelegateQt::IsWebAuthnUIEnabled()
-{
-    return !m_isUiDisabled;
-}
-
-void AuthenticatorRequestClientDelegateQt::SetConditionalRequest(bool is_conditional)
-{
-    m_isConditionalRequest = is_conditional;
+    m_isUiDisabled = (ui_presentation == UIPresentation::kDisabled);
+    m_dialogController->setUiPresentation(ui_presentation);
 }
 
 // This method will not be invoked until the observer is set.
@@ -182,7 +173,7 @@ void AuthenticatorRequestClientDelegateQt::OnTransportAvailabilityEnumerated(
     // Start WebAuth UX
     // we may need to pass data as well. for SelectAccount and SupportPin it is not required,
     // skipping that for the timebeing.
-    m_dialogController->startRequest(m_isConditionalRequest);
+    m_dialogController->startRequest();
 }
 
 bool AuthenticatorRequestClientDelegateQt::SupportsPIN() const
diff --git a/src/core/authenticator_request_client_delegate_qt.h b/src/core/authenticator_request_client_delegate_qt.h
index 8c8089f04d3..1b6c292db1e 100644
--- a/src/core/authenticator_request_client_delegate_qt.h
+++ b/src/core/authenticator_request_client_delegate_qt.h
@@ -46,9 +46,7 @@ class AuthenticatorRequestClientDelegateQt : public content::AuthenticatorReques
     void SelectAccount(
             std::vector<device::AuthenticatorGetAssertionResponse> responses,
             base::OnceCallback<void(device::AuthenticatorGetAssertionResponse)> callback) override;
-    void DisableUI() override;
-    bool IsWebAuthnUIEnabled() override;
-    void SetConditionalRequest(bool is_conditional) override;
+    void SetUIPresentation(UIPresentation ui_presentation) override;
 
     // device::FidoRequestHandlerBase::Observer overrides:
     // This method will not be invoked until the observer is set.
@@ -69,7 +67,6 @@ class AuthenticatorRequestClientDelegateQt : public content::AuthenticatorReques
 private:
     content::RenderFrameHost *m_renderFrameHost;
     bool m_isUiDisabled = false;
-    bool m_isConditionalRequest = false;
 
     base::OnceClosure m_cancelCallback;
     base::RepeatingClosure m_startOverCallback;
diff --git a/src/core/authenticator_request_dialog_controller.cpp b/src/core/authenticator_request_dialog_controller.cpp
index 73fb4e7f374..e0ae5d9fa9f 100644
--- a/src/core/authenticator_request_dialog_controller.cpp
+++ b/src/core/authenticator_request_dialog_controller.cpp
@@ -112,7 +112,7 @@ void AuthenticatorRequestDialogControllerPrivate::setCurrentState(
 
     m_currentState = uxState;
 
-    if (m_isConditionalRequest)
+    if (m_uiPresentation == content::AuthenticatorRequestClientDelegate::UIPresentation ::kAutofill)
         return;
 
     if (!m_isDialogCreated) {
@@ -159,12 +159,31 @@ AuthenticatorRequestDialogControllerPrivate::state() const
     return m_currentState;
 }
 
-void AuthenticatorRequestDialogControllerPrivate::startRequest(bool isConditionalRequest)
+void AuthenticatorRequestDialogController::setUiPresentation(content::AuthenticatorRequestClientDelegate::UIPresentation modality)
+{
+    d_ptr->setUiPresentation(modality);
+}
+
+content::AuthenticatorRequestClientDelegate::UIPresentation AuthenticatorRequestDialogController::uiPresentation() const
+{
+    return d_ptr->uiPresentation();
+}
+
+void AuthenticatorRequestDialogControllerPrivate::setUiPresentation(content::AuthenticatorRequestClientDelegate::UIPresentation modality)
+{
+    m_uiPresentation = modality;
+}
+
+content::AuthenticatorRequestClientDelegate::UIPresentation AuthenticatorRequestDialogControllerPrivate::uiPresentation() const
+{
+    return m_uiPresentation;
+}
+
+void AuthenticatorRequestDialogControllerPrivate::startRequest()
 {
     DCHECK(!m_isStarted);
 
     m_isStarted = true;
-    m_isConditionalRequest = isConditionalRequest;
 
     if (m_pendingState) {
         setCurrentState(*m_pendingState);
@@ -263,9 +282,9 @@ QWebEngineWebAuthUxRequest::WebAuthUxState AuthenticatorRequestDialogController:
     return d_ptr->state();
 }
 
-void AuthenticatorRequestDialogController::startRequest(bool bIsConditionalRequest)
+void AuthenticatorRequestDialogController::startRequest()
 {
-    d_ptr->startRequest(bIsConditionalRequest);
+    d_ptr->startRequest();
 }
 
 void AuthenticatorRequestDialogController::setRelyingPartyId(const std::string &rpId)
diff --git a/src/core/authenticator_request_dialog_controller.h b/src/core/authenticator_request_dialog_controller.h
index 98e8dcf901e..031f6454fdb 100644
--- a/src/core/authenticator_request_dialog_controller.h
+++ b/src/core/authenticator_request_dialog_controller.h
@@ -7,6 +7,7 @@
 #include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h>
 #include <QtCore/qobject.h>
 #include "qwebenginewebauthuxrequest.h"
+#include "content/public/browser/authenticator_request_client_delegate.h"
 
 namespace content {
 class WebContents;
@@ -33,6 +34,9 @@ class Q_WEBENGINECORE_EXPORT AuthenticatorRequestDialogController : public QObje
     void retryRequest();
     QWebEngineWebAuthUxRequest::RequestFailureReason requestFailureReason() const;
 
+    content::AuthenticatorRequestClientDelegate::UIPresentation uiPresentation() const;
+    void setUiPresentation(content::AuthenticatorRequestClientDelegate::UIPresentation modality);
+
 Q_SIGNALS:
     void stateChanged(QWebEngineWebAuthUxRequest::WebAuthUxState state);
 
@@ -40,7 +44,7 @@ class Q_WEBENGINECORE_EXPORT AuthenticatorRequestDialogController : public QObje
     void selectAccount(const QStringList &userList);
     void collectPin(QWebEngineWebAuthPinRequest pinRequest);
     void finishCollectToken();
-    void startRequest(bool bIsConditionalRequest);
+    void startRequest();
     void finishRequest();
     void setRelyingPartyId(const std::string &rpId);
     void handleRequestFailure(QWebEngineWebAuthUxRequest::RequestFailureReason reason);
diff --git a/src/core/authenticator_request_dialog_controller_p.h b/src/core/authenticator_request_dialog_controller_p.h
index 46dfc76e249..175d13901b9 100644
--- a/src/core/authenticator_request_dialog_controller_p.h
+++ b/src/core/authenticator_request_dialog_controller_p.h
@@ -34,6 +34,9 @@ class AuthenticatorRequestDialogControllerPrivate
     void setCurrentState(QWebEngineWebAuthUxRequest::WebAuthUxState uxState);
     void setRelyingPartyId(const QString &rpId);
 
+    content::AuthenticatorRequestClientDelegate::UIPresentation uiPresentation() const;
+    void setUiPresentation(content::AuthenticatorRequestClientDelegate::UIPresentation modality);
+
     // Support pin functionality
     void collectPin(QWebEngineWebAuthPinRequest pinRequestInfo);
     void finishCollectToken();
@@ -46,7 +49,7 @@ class AuthenticatorRequestDialogControllerPrivate
     // cancel request
     void cancelRequest();
     void retryRequest();
-    void startRequest(bool isConditionalRequest);
+    void startRequest();
 
     AuthenticatorRequestDialogController *q_ptr;
 
@@ -57,7 +60,8 @@ class AuthenticatorRequestDialogControllerPrivate
     QString m_relyingPartyId;
 
     bool m_isStarted = false;
-    bool m_isConditionalRequest = false;
+    content::AuthenticatorRequestClientDelegate::UIPresentation m_uiPresentation =
+            content::AuthenticatorRequestClientDelegate::UIPresentation::kModal;
     QWebEngineWebAuthUxRequest::WebAuthUxState m_currentState =
             QWebEngineWebAuthUxRequest::WebAuthUxState::NotStarted;
     base::WeakPtr<AuthenticatorRequestClientDelegateQt> m_authenticatorRequestDelegate;
diff --git a/src/core/autofill_client_qt.cpp b/src/core/autofill_client_qt.cpp
index b0e846844ef..19d3ac24e1f 100644
--- a/src/core/autofill_client_qt.cpp
+++ b/src/core/autofill_client_qt.cpp
@@ -131,4 +131,9 @@ WebContentsAdapterClient *AutofillClientQt::adapterClient()
             ->client();
 }
 
+base::WeakPtr<autofill::AutofillClient> AutofillClientQt::GetWeakPtr()
+{
+    return weak_ptr_factory_.GetWeakPtr();
+}
+
 } // namespace QtWebEngineCore
diff --git a/src/core/autofill_client_qt.h b/src/core/autofill_client_qt.h
index 2f97e005ba5..b42e4f67eb5 100644
--- a/src/core/autofill_client_qt.h
+++ b/src/core/autofill_client_qt.h
@@ -58,6 +58,7 @@ class AutofillClientQt : public autofill::ContentAutofillClient,
     bool IsOffTheRecord() const override;
     scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
     std::unique_ptr<autofill::AutofillManager> CreateManager(base::PassKey<autofill::ContentAutofillDriver>, autofill::ContentAutofillDriver&) override;
+    base::WeakPtr<autofill::AutofillClient> GetWeakPtr() override;
 
 private:
     explicit AutofillClientQt(content::WebContents *webContents);
@@ -65,6 +66,7 @@ class AutofillClientQt : public autofill::ContentAutofillClient,
     WebContentsAdapterClient *adapterClient();
 
     QScopedPointer<AutofillPopupController> m_popupController;
+    base::WeakPtrFactory<AutofillClientQt> weak_ptr_factory_{this};
 };
 
 } // namespace QtWebEngineCore
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index 68b54674944..44803b5bcc0 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -77,7 +77,7 @@ base::FilePath getSandboxPath()
 #endif
 } // namespace content
 
-#if defined(USE_AURA) || BUILDFLAG(IS_OZONE)
+#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_OZONE)
 namespace content {
 
 // content/common/font_list.h
@@ -96,7 +96,7 @@ base::Value::List GetFontList_SlowBlocking()
 }
 
 } // namespace content
-#endif // defined(USE_AURA) || BUILDFLAG(IS_OZONE)
+#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_OZONE)
 
 #if BUILDFLAG(ENABLE_VULKAN)
 namespace gpu {
diff --git a/src/core/client_hints.cpp b/src/core/client_hints.cpp
index 9fa7531da18..af485767f03 100644
--- a/src/core/client_hints.cpp
+++ b/src/core/client_hints.cpp
@@ -155,11 +155,6 @@ bool ClientHints::IsJavaScriptAllowed(const GURL &url, content::RenderFrameHost
     return true;
 }
 
-bool ClientHints::AreThirdPartyCookiesBlocked(const GURL &url, content::RenderFrameHost *rfh)
-{
-    return false; // we probably can not report anything more specific
-}
-
 blink::UserAgentMetadata ClientHints::GetUserAgentMetadata()
 {
     return static_cast<ProfileQt *>(context_)->userAgentMetadata();
diff --git a/src/core/client_hints.h b/src/core/client_hints.h
index 193982d1600..c3bcf7556ab 100644
--- a/src/core/client_hints.h
+++ b/src/core/client_hints.h
@@ -58,8 +58,6 @@ class ClientHints : public KeyedService, public content::ClientHintsControllerDe
 
     bool IsJavaScriptAllowed(const GURL &url, content::RenderFrameHost *parent_rfh) override;
 
-    bool AreThirdPartyCookiesBlocked(const GURL &url, content::RenderFrameHost *rfh) override;
-
     blink::UserAgentMetadata GetUserAgentMetadata() override;
 
     void PersistClientHints(const url::Origin &primary_origin,
diff --git a/src/core/compositor/native_skia_output_device.cpp b/src/core/compositor/native_skia_output_device.cpp
index bf8fd575ab5..1bad6c5b34a 100644
--- a/src/core/compositor/native_skia_output_device.cpp
+++ b/src/core/compositor/native_skia_output_device.cpp
@@ -13,7 +13,6 @@
 #include "gpu/command_buffer/service/shared_image/shared_image_factory.h"
 #include "gpu/command_buffer/service/shared_image/shared_image_representation.h"
 #include "gpu/command_buffer/service/skia_utils.h"
-#include "third_party/skia/include/gpu/GrDirectContext.h"
 #include "third_party/skia/include/core/SkSurfaceProps.h"
 #include "ui/gfx/native_pixmap.h"
 #include "ui/gfx/gpu_fence.h"
diff --git a/src/core/compositor/native_skia_output_device_opengl.cpp b/src/core/compositor/native_skia_output_device_opengl.cpp
index 7421ea93312..46e4cef8ecc 100644
--- a/src/core/compositor/native_skia_output_device_opengl.cpp
+++ b/src/core/compositor/native_skia_output_device_opengl.cpp
@@ -39,7 +39,7 @@
 
 #include "components/viz/common/gpu/vulkan_context_provider.h"
 #include "gpu/vulkan/vulkan_device_queue.h"
-#include "third_party/skia/include/gpu/vk/GrVkTypes.h"
+#include "third_party/skia/include/gpu/ganesh/vk/GrVkTypes.h"
 #include "third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h"
 #endif // BUILDFLAG(ENABLE_VULKAN)
 #endif // BUILDFLAG(IS_OZONE)
diff --git a/src/core/compositor/native_skia_output_device_vulkan.cpp b/src/core/compositor/native_skia_output_device_vulkan.cpp
index 5f410621bf5..e820825d2bd 100644
--- a/src/core/compositor/native_skia_output_device_vulkan.cpp
+++ b/src/core/compositor/native_skia_output_device_vulkan.cpp
@@ -21,7 +21,7 @@
 #include "gpu/vulkan/vulkan_function_pointers.h"
 #include "components/viz/common/gpu/vulkan_context_provider.h"
 #include "gpu/vulkan/vulkan_device_queue.h"
-#include "third_party/skia/include/gpu/vk/GrVkTypes.h"
+#include "third_party/skia/include/gpu/ganesh/vk/GrVkTypes.h"
 #include "third_party/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h"
 #endif // BUILDFLAG(IS_OZONE)
 
diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in
index 81fd8368f75..910d68ad311 100644
--- a/src/core/configure/BUILD.root.gn.in
+++ b/src/core/configure/BUILD.root.gn.in
@@ -285,7 +285,6 @@ source_set("qtwebengine_sources") {
     ":devtools_sources",
     "//build:branding_buildflags",
     "//build/config/chromebox_for_meetings:buildflags",
-    "//chrome/browser:dev_ui_browser_resources_grit",
     "//chrome/browser/resources/accessibility:resources",
     "//chrome/browser/resources/net_internals:resources",
     "//chrome/browser/signin:identity_manager_provider",
@@ -606,7 +605,6 @@ repack("qtwebengine_repack_resources") {
     "$root_gen_dir/qtwebengine/qt_webengine_resources.pak",
     "$root_gen_dir/chrome/accessibility_resources.pak",
     "$root_gen_dir/chrome/common_resources.pak",
-    "$root_gen_dir/chrome/dev_ui_browser_resources.pak",
     "$root_gen_dir/chrome/device_log_resources.pak",
     "$root_gen_dir/chrome/net_internals_resources.pak",
     "$root_gen_dir/components/components_resources.pak",
@@ -626,7 +624,7 @@ repack("qtwebengine_repack_resources") {
     "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
     "$root_gen_dir/net/net_resources.pak",
     "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
-    "$root_gen_dir/ui/resources/webui_resources.pak",
+    "$root_gen_dir/ui/webui/resources/webui_resources.pak",
   ]
   if (!is_debug) {
     output = "$root_out_dir/qtwebengine_resources.pak"
@@ -636,7 +634,6 @@ repack("qtwebengine_repack_resources") {
 
   deps = [
      "//qtwebengine/browser:qt_webengine_resources",
-     "//chrome/browser:dev_ui_browser_resources_grit",
      "//chrome/browser/resources/accessibility:resources",
      "//chrome/browser/resources/net_internals:resources",
      "//chrome/common:resources_grit",
@@ -658,7 +655,7 @@ repack("qtwebengine_repack_resources") {
      "//mojo/public/js:resources",
      "//net:net_resources_grit",
      "//third_party/blink/public:resources_grit",
-     "//ui/resources:webui_resources_grd",
+     "//ui/webui/resources",
   ]
   if (enable_extensions) {
     sources += [
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 9a1de70af32..e85143d51d5 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -12,6 +12,7 @@
 #include "components/error_page/common/localized_error.h"
 #include "components/navigation_interception/intercept_navigation_throttle.h"
 #include "components/network_hints/browser/simple_network_hints_handler_impl.h"
+#include "components/performance_manager/embedder/binders.h"
 #include "components/performance_manager/embedder/performance_manager_lifetime.h"
 #include "components/performance_manager/embedder/performance_manager_registry.h"
 #include "components/performance_manager/public/performance_manager.h"
@@ -480,8 +481,10 @@ void ContentBrowserClientQt::ExposeInterfacesToRenderer(service_manager::BinderR
                                                         blink::AssociatedInterfaceRegistry *associated_registry,
                                                         content::RenderProcessHost *render_process_host)
 {
-    if (auto *manager = performance_manager::PerformanceManagerRegistry::GetInstance())
-        manager->CreateProcessNodeAndExposeInterfacesToRendererProcess(registry, render_process_host);
+    if (auto *manager = performance_manager::PerformanceManagerRegistry::GetInstance()) {
+        manager->CreateProcessNode(render_process_host);
+        manager->GetBinders().ExposeInterfacesToRendererProcess(registry, render_process_host);
+    }
 #if BUILDFLAG(ENABLE_EXTENSIONS)
     associated_registry->AddInterface<extensions::mojom::EventRouter>(base::BindRepeating(
             &extensions::EventRouter::BindForRenderer, render_process_host->GetID()));
@@ -733,6 +736,7 @@ bool ContentBrowserClientQt::HandleExternalProtocol(
         network::mojom::WebSandboxFlags sandbox_flags, ui::PageTransition page_transition,
         bool has_user_gesture, const std::optional<url::Origin> &initiating_origin,
         content::RenderFrameHost *initiator_document,
+        const net::IsolationInfo &isolation_info,
         mojo::PendingRemote<network::mojom::URLLoaderFactory> *out_factory)
 {
     Q_UNUSED(frame_tree_node_id);
@@ -921,7 +925,7 @@ bool ContentBrowserClientQt::HasErrorPage(int httpStatusCode, content::WebConten
 std::unique_ptr<content::LoginDelegate> ContentBrowserClientQt::CreateLoginDelegate(
         const net::AuthChallengeInfo &authInfo, content::WebContents *web_contents,
         content::BrowserContext *browser_context, const content::GlobalRequestID & /*request_id*/,
-        bool /*is_main_frame*/, const GURL &url,
+        bool /*is_main_frame*/, bool /*is_request_for_navigation*/, const GURL &url,
         scoped_refptr<net::HttpResponseHeaders> /*response_headers*/, bool first_auth_attempt,
         LoginAuthRequiredCallback auth_required_callback)
 {
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index 08ee2d1ab90..93358d545b3 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -154,7 +154,9 @@ class ContentBrowserClientQt : public content::ContentBrowserClient
     std::unique_ptr<content::LoginDelegate>
     CreateLoginDelegate(const net::AuthChallengeInfo &auth_info, content::WebContents *web_contents,
                         content::BrowserContext *browser_context,
-                        const content::GlobalRequestID &request_id, bool is_request_for_main_frame,
+                        const content::GlobalRequestID &request_id,
+                        bool is_request_for_main_frame,
+                        bool is_request_for_navigation,
                         const GURL &url, scoped_refptr<net::HttpResponseHeaders> response_headers,
                         bool first_auth_attempt,
                         LoginAuthRequiredCallback auth_required_callback) override;
@@ -166,6 +168,7 @@ class ContentBrowserClientQt : public content::ContentBrowserClient
             network::mojom::WebSandboxFlags sandbox_flags, ui::PageTransition page_transition,
             bool has_user_gesture, const std::optional<url::Origin> &initiating_origin,
             content::RenderFrameHost *initiator_document,
+            const net::IsolationInfo &isolation_info,
             mojo::PendingRemote<network::mojom::URLLoaderFactory> *out_factory) override;
 
     std::vector<std::unique_ptr<blink::URLLoaderThrottle>>
diff --git a/src/core/extensions/extensions_browser_client_qt.cpp b/src/core/extensions/extensions_browser_client_qt.cpp
index de943b2d3d2..099843c527c 100644
--- a/src/core/extensions/extensions_browser_client_qt.cpp
+++ b/src/core/extensions/extensions_browser_client_qt.cpp
@@ -292,19 +292,19 @@ BrowserContext *ExtensionsBrowserClientQt::GetOriginalContext(BrowserContext *co
     return context;
 }
 
-content::BrowserContext* ExtensionsBrowserClientQt::GetContextRedirectedToOriginal(content::BrowserContext *context, bool)
+content::BrowserContext* ExtensionsBrowserClientQt::GetContextRedirectedToOriginal(content::BrowserContext *context)
 {
     // like in ShellExtensionsBrowserClient:
     return context;
 }
 
-content::BrowserContext* ExtensionsBrowserClientQt::GetContextOwnInstance(content::BrowserContext *context, bool)
+content::BrowserContext* ExtensionsBrowserClientQt::GetContextOwnInstance(content::BrowserContext *context)
 {
     // like in ShellExtensionsBrowserClient:
     return context;
 }
 
-content::BrowserContext* ExtensionsBrowserClientQt::GetContextForOriginalOnly(content::BrowserContext *context, bool)
+content::BrowserContext* ExtensionsBrowserClientQt::GetContextForOriginalOnly(content::BrowserContext *context)
 {
     // like in ShellExtensionsBrowserClient:
     return context;
diff --git a/src/core/extensions/extensions_browser_client_qt.h b/src/core/extensions/extensions_browser_client_qt.h
index d0ffb4b9760..9aaf56d0c2f 100644
--- a/src/core/extensions/extensions_browser_client_qt.h
+++ b/src/core/extensions/extensions_browser_client_qt.h
@@ -35,9 +35,9 @@ class ExtensionsBrowserClientQt : public ExtensionsBrowserClient
     bool HasOffTheRecordContext(content::BrowserContext *context) override;
     content::BrowserContext *GetOffTheRecordContext(content::BrowserContext *context) override;
     content::BrowserContext *GetOriginalContext(content::BrowserContext *context) override;
-    content::BrowserContext *GetContextRedirectedToOriginal(content::BrowserContext*, bool) override;
-    content::BrowserContext *GetContextOwnInstance(content::BrowserContext*, bool) override;
-    content::BrowserContext *GetContextForOriginalOnly(content::BrowserContext*, bool) override;
+    content::BrowserContext *GetContextRedirectedToOriginal(content::BrowserContext*) override;
+    content::BrowserContext *GetContextOwnInstance(content::BrowserContext*) override;
+    content::BrowserContext *GetContextForOriginalOnly(content::BrowserContext*) override;
     bool IsGuestSession(content::BrowserContext *context) const override;
     bool IsExtensionIncognitoEnabled(const std::string &extension_id, content::BrowserContext *context) const override;
     bool CanExtensionCrossIncognito(const Extension *extension, content::BrowserContext *context) const override;
diff --git a/src/core/file_picker_controller.cpp b/src/core/file_picker_controller.cpp
index 550ae0da026..dd941f963a0 100644
--- a/src/core/file_picker_controller.cpp
+++ b/src/core/file_picker_controller.cpp
@@ -182,7 +182,21 @@ static QStringList listRecursively(const QDir &dir)
 ASSERT_ENUMS_MATCH(FilePickerController::Open, blink::mojom::FileChooserParams_Mode::kOpen)
 ASSERT_ENUMS_MATCH(FilePickerController::OpenMultiple, blink::mojom::FileChooserParams_Mode::kOpenMultiple)
 ASSERT_ENUMS_MATCH(FilePickerController::UploadFolder, blink::mojom::FileChooserParams_Mode::kUploadFolder)
-ASSERT_ENUMS_MATCH(FilePickerController::Save, blink::mojom::FileChooserParams_Mode::kSave)
+
+blink::mojom::FileChooserParams_Mode toFileChooserParams(FilePickerController::FileChooserMode mode)
+{
+    switch (mode) {
+    case FilePickerController::Open:
+    case FilePickerController::OpenMultiple:
+    case FilePickerController::UploadFolder:
+        break;
+    case FilePickerController::OpenDirectory:
+        return blink::mojom::FileChooserParams_Mode::kOpenDirectory;
+    case FilePickerController::Save:
+        return blink::mojom::FileChooserParams_Mode::kSave;
+    }
+    return static_cast<blink::mojom::FileChooserParams_Mode>(mode);
+}
 
 void FilePickerController::filesSelectedInChooser(const QStringList &filesList)
 {
@@ -203,7 +217,7 @@ void FilePickerController::filesSelectedInChooser(const QStringList &filesList)
         std::vector<blink::mojom::FileChooserFileInfoPtr> chooser_files;
         for (const auto &file : std::as_const(files)) {
             chooser_files.push_back(blink::mojom::FileChooserFileInfo::NewNativeFile(
-                    blink::mojom::NativeFileInfo::New(toFilePath(file), std::u16string())));
+                    blink::mojom::NativeFileInfo::New(toFilePath(file), std::u16string(), std::vector<std::u16string>{})));
         }
 
         if (files.isEmpty())
@@ -211,7 +225,7 @@ void FilePickerController::filesSelectedInChooser(const QStringList &filesList)
         else
             d_ptr->fileDialogListener->FileSelected(
                     std::move(chooser_files), baseDir,
-                    static_cast<blink::mojom::FileChooserParams::Mode>(d_ptr->mode));
+                    toFileChooserParams(d_ptr->mode));
 
         // release the fileSelectListener manually because it blocks fullscreen requests in chromium
         // see QTBUG-106975
diff --git a/src/core/file_picker_controller.h b/src/core/file_picker_controller.h
index 42ffd6a2dc6..be5bcfe35b3 100644
--- a/src/core/file_picker_controller.h
+++ b/src/core/file_picker_controller.h
@@ -29,7 +29,8 @@ class Q_WEBENGINECORE_EXPORT FilePickerController : public QObject {
         Open,
         OpenMultiple,
         UploadFolder,
-        Save
+        Save,
+        OpenDirectory,
     };
 
     FilePickerController(FilePickerControllerPrivate *priv, QObject *parent = nullptr);
diff --git a/src/core/file_system_access/file_system_access_permission_context_qt.cpp b/src/core/file_system_access/file_system_access_permission_context_qt.cpp
index 207a3e2d962..d6412416566 100644
--- a/src/core/file_system_access/file_system_access_permission_context_qt.cpp
+++ b/src/core/file_system_access/file_system_access_permission_context_qt.cpp
@@ -200,12 +200,12 @@ FileSystemAccessPermissionContextQt::~FileSystemAccessPermissionContextQt() = de
 
 scoped_refptr<content::FileSystemAccessPermissionGrant>
 FileSystemAccessPermissionContextQt::GetReadPermissionGrant(const url::Origin &origin,
-                                                            const base::FilePath &path,
+                                                            const content::PathInfo &path_info,
                                                             HandleType handle_type,
                                                             UserAction user_action)
 {
     auto &origin_state = m_origins[origin];
-    auto *&existing_grant = origin_state.read_grants[path];
+    auto *&existing_grant = origin_state.read_grants[path_info.path];
     scoped_refptr<FileSystemAccessPermissionGrantQt> new_grant;
 
     if (existing_grant && existing_grant->handleType() != handle_type) {
@@ -218,12 +218,12 @@ FileSystemAccessPermissionContextQt::GetReadPermissionGrant(const url::Origin &o
 
     if (!existing_grant) {
         new_grant = base::MakeRefCounted<FileSystemAccessPermissionGrantQt>(
-                m_weakFactory.GetWeakPtr(), origin, path, handle_type, GrantType::kRead);
+                m_weakFactory.GetWeakPtr(), origin, path_info, handle_type, GrantType::kRead);
         existing_grant = new_grant.get();
     }
 
     // If a parent directory is already readable this new grant should also be readable.
-    if (new_grant && AncestorHasActivePermission(origin, path, GrantType::kRead)) {
+    if (new_grant && AncestorHasActivePermission(origin, path_info.path, GrantType::kRead)) {
         existing_grant->SetStatus(blink::mojom::PermissionStatus::GRANTED);
         return existing_grant;
     }
@@ -250,12 +250,12 @@ FileSystemAccessPermissionContextQt::GetReadPermissionGrant(const url::Origin &o
 
 scoped_refptr<content::FileSystemAccessPermissionGrant>
 FileSystemAccessPermissionContextQt::GetWritePermissionGrant(const url::Origin &origin,
-                                                             const base::FilePath &path,
+                                                             const content::PathInfo &path_info,
                                                              HandleType handle_type,
                                                              UserAction user_action)
 {
     auto &origin_state = m_origins[origin];
-    auto *&existing_grant = origin_state.write_grants[path];
+    auto *&existing_grant = origin_state.write_grants[path_info.path];
     scoped_refptr<FileSystemAccessPermissionGrantQt> new_grant;
 
     if (existing_grant && existing_grant->handleType() != handle_type) {
@@ -268,12 +268,12 @@ FileSystemAccessPermissionContextQt::GetWritePermissionGrant(const url::Origin &
 
     if (!existing_grant) {
         new_grant = base::MakeRefCounted<FileSystemAccessPermissionGrantQt>(
-                m_weakFactory.GetWeakPtr(), origin, path, handle_type, GrantType::kWrite);
+                m_weakFactory.GetWeakPtr(), origin, path_info, handle_type, GrantType::kWrite);
         existing_grant = new_grant.get();
     }
 
     // If a parent directory is already writable this new grant should also be writable.
-    if (new_grant && AncestorHasActivePermission(origin, path, GrantType::kWrite)) {
+    if (new_grant && AncestorHasActivePermission(origin, path_info.path, GrantType::kWrite)) {
         existing_grant->SetStatus(blink::mojom::PermissionStatus::GRANTED);
         return existing_grant;
     }
@@ -295,21 +295,21 @@ FileSystemAccessPermissionContextQt::GetWritePermissionGrant(const url::Origin &
 }
 
 void FileSystemAccessPermissionContextQt::ConfirmSensitiveEntryAccess(
-        const url::Origin &origin, PathType path_type, const base::FilePath &path,
+        const url::Origin &origin, const content::PathInfo &info,
         HandleType handle_type, UserAction user_action,
         content::GlobalRenderFrameHostId frame_id,
         base::OnceCallback<void(SensitiveEntryResult)> callback)
 {
-    if (path_type == PathType::kExternal) {
+    if (info.type == content::PathType::kExternal) {
         std::move(callback).Run(SensitiveEntryResult::kAllowed);
         return;
     }
 
     base::ThreadPool::PostTaskAndReplyWithResult(
             FROM_HERE, { base::MayBlock(), base::TaskPriority::USER_VISIBLE },
-            base::BindOnce(&ShouldBlockAccessToPath, path, handle_type),
+            base::BindOnce(&ShouldBlockAccessToPath, info.path, handle_type),
             base::BindOnce(&FileSystemAccessPermissionContextQt::DidConfirmSensitiveDirectoryAccess,
-                           m_weakFactory.GetWeakPtr(), origin, path, handle_type, user_action, frame_id,
+                           m_weakFactory.GetWeakPtr(), origin, info.path, handle_type, user_action, frame_id,
                            std::move(callback)));
 }
 
@@ -337,18 +337,14 @@ bool FileSystemAccessPermissionContextQt::CanObtainWritePermission(const url::Or
 
 void FileSystemAccessPermissionContextQt::SetLastPickedDirectory(const url::Origin &origin,
                                                                  const std::string &id,
-                                                                 const base::FilePath &path,
-                                                                 const PathType type)
+                                                                 const content::PathInfo &info)
 {
     Q_UNUSED(origin);
 
-    FileSystemAccessPermissionContextQt::PathInfo info;
-    info.path = path;
-    info.type = type;
     m_lastPickedDirectories.insert({ id, info });
 }
 
-FileSystemAccessPermissionContextQt::PathInfo
+content::PathInfo
 FileSystemAccessPermissionContextQt::GetLastPickedDirectory(const url::Origin &origin,
                                                             const std::string &id)
 {
@@ -356,7 +352,7 @@ FileSystemAccessPermissionContextQt::GetLastPickedDirectory(const url::Origin &o
 
     return m_lastPickedDirectories.find(id) != m_lastPickedDirectories.end()
             ? m_lastPickedDirectories[id]
-            : FileSystemAccessPermissionContextQt::PathInfo();
+            : content::PathInfo();
 }
 
 base::FilePath FileSystemAccessPermissionContextQt::GetWellKnownDirectoryPath(
@@ -472,12 +468,18 @@ void FileSystemAccessPermissionContextQt::PermissionGrantDestroyed(
         grants.erase(grant_it);
 }
 
-void FileSystemAccessPermissionContextQt::NotifyEntryMoved(const url::Origin &, const base::FilePath &, const base::FilePath &)
+void FileSystemAccessPermissionContextQt::NotifyEntryMoved(const url::Origin &, const content::PathInfo &, const content::PathInfo &)
 {
 }
 
+base::expected<void, std::string> FileSystemAccessPermissionContextQt::CanShowFilePicker(content::RenderFrameHost*)
+{
+    // Matching AwFileSystemAccessPermissionContext::CanShowFilePicker()
+    return base::ok();
+}
+
 void FileSystemAccessPermissionContextQt::CheckPathsAgainstEnterprisePolicy(
-        std::vector<PathInfo> entries, content::GlobalRenderFrameHostId,
+        std::vector<content::PathInfo> entries, content::GlobalRenderFrameHostId,
         EntriesAllowedByEnterprisePolicyCallback callback)
 {
     std::move(callback).Run(std::move(entries));
diff --git a/src/core/file_system_access/file_system_access_permission_context_qt.h b/src/core/file_system_access/file_system_access_permission_context_qt.h
index 8d34da1f13d..8f84333561f 100644
--- a/src/core/file_system_access/file_system_access_permission_context_qt.h
+++ b/src/core/file_system_access/file_system_access_permission_context_qt.h
@@ -31,13 +31,13 @@ class FileSystemAccessPermissionContextQt : public content::FileSystemAccessPerm
 
     // content::FileSystemAccessPermissionContext:
     scoped_refptr<content::FileSystemAccessPermissionGrant>
-    GetReadPermissionGrant(const url::Origin &origin, const base::FilePath &path,
+    GetReadPermissionGrant(const url::Origin &origin, const content::PathInfo &path_info,
                            HandleType handle_type, UserAction user_action) override;
     scoped_refptr<content::FileSystemAccessPermissionGrant>
-    GetWritePermissionGrant(const url::Origin &origin, const base::FilePath &path,
+    GetWritePermissionGrant(const url::Origin &origin, const content::PathInfo &path_info,
                             HandleType handle_type, UserAction user_action) override;
     void ConfirmSensitiveEntryAccess(
-            const url::Origin &origin, PathType path_type, const base::FilePath &path,
+            const url::Origin &origin, const content::PathInfo &path_info,
             HandleType handle_type, UserAction user_action,
             content::GlobalRenderFrameHostId frame_id,
             base::OnceCallback<void(SensitiveEntryResult)> callback) override;
@@ -47,17 +47,19 @@ class FileSystemAccessPermissionContextQt : public content::FileSystemAccessPerm
     bool CanObtainReadPermission(const url::Origin &origin) override;
     bool CanObtainWritePermission(const url::Origin &origin) override;
     void SetLastPickedDirectory(const url::Origin &origin, const std::string &id,
-                                const base::FilePath &path, const PathType type) override;
-    FileSystemAccessPermissionContextQt::PathInfo
+                                const content::PathInfo &path_info) override;
+    content::PathInfo
     GetLastPickedDirectory(const url::Origin &origin, const std::string &id) override;
     base::FilePath GetWellKnownDirectoryPath(blink::mojom::WellKnownDirectory directory, const url::Origin &origin) override;
     std::u16string GetPickerTitle(const blink::mojom::FilePickerOptionsPtr &) override;
-    void NotifyEntryMoved(const url::Origin &, const base::FilePath &, const base::FilePath &) override;
+    void NotifyEntryMoved(const url::Origin &, const content::PathInfo &, const content::PathInfo &) override;
     void OnFileCreatedFromShowSaveFilePicker(const GURL &file_picker_binding_context,
                                              const storage::FileSystemURL &url) override {};
-    void CheckPathsAgainstEnterprisePolicy(std::vector<PathInfo>, content::GlobalRenderFrameHostId,
+    void CheckPathsAgainstEnterprisePolicy(std::vector<content::PathInfo>, content::GlobalRenderFrameHostId,
                                            EntriesAllowedByEnterprisePolicyCallback) override;
 
+    base::expected<void, std::string> CanShowFilePicker(content::RenderFrameHost*) override;
+
     void NavigatedAwayFromOrigin(const url::Origin &origin);
     content::BrowserContext *profile() const { return m_profile; }
 
@@ -80,7 +82,7 @@ class FileSystemAccessPermissionContextQt : public content::FileSystemAccessPerm
     struct OriginState;
     std::map<url::Origin, OriginState> m_origins;
 
-    std::map<std::string, FileSystemAccessPermissionContextQt::PathInfo> m_lastPickedDirectories;
+    std::map<std::string, content::PathInfo> m_lastPickedDirectories;
 
     base::WeakPtrFactory<FileSystemAccessPermissionContextQt> m_weakFactory { this };
 };
diff --git a/src/core/file_system_access/file_system_access_permission_grant_qt.cpp b/src/core/file_system_access/file_system_access_permission_grant_qt.cpp
index dc26a415ee8..66e1f9dfc95 100644
--- a/src/core/file_system_access/file_system_access_permission_grant_qt.cpp
+++ b/src/core/file_system_access/file_system_access_permission_grant_qt.cpp
@@ -23,8 +23,8 @@ namespace QtWebEngineCore {
 
 FileSystemAccessPermissionGrantQt::FileSystemAccessPermissionGrantQt(
         base::WeakPtr<FileSystemAccessPermissionContextQt> context, const url::Origin &origin,
-        const base::FilePath &path, HandleType handle_type, GrantType type)
-    : m_context(context), m_origin(origin), m_path(path), m_handleType(handle_type), m_type(type)
+        const content::PathInfo &pathInfo, HandleType handle_type, GrantType type)
+    : m_context(context), m_origin(origin), m_pathInfo(pathInfo), m_handleType(handle_type), m_type(type)
 {
 }
 FileSystemAccessPermissionGrantQt::~FileSystemAccessPermissionGrantQt()
@@ -111,7 +111,7 @@ void FileSystemAccessPermissionGrantQt::RequestPermission(
     // code does not have to have any way to request Access::kReadWrite.
 
     request_manager->AddRequest(
-            { m_origin, m_path, m_handleType, access },
+            { m_origin, m_pathInfo, m_handleType, access },
             base::BindOnce(&FileSystemAccessPermissionGrantQt::OnPermissionRequestResult, this,
                            std::move(callback)),
             std::move(fullscreen_block));
diff --git a/src/core/file_system_access/file_system_access_permission_grant_qt.h b/src/core/file_system_access/file_system_access_permission_grant_qt.h
index 829d2b88912..4b3b0ea0379 100644
--- a/src/core/file_system_access/file_system_access_permission_grant_qt.h
+++ b/src/core/file_system_access/file_system_access_permission_grant_qt.h
@@ -19,19 +19,21 @@ class FileSystemAccessPermissionGrantQt : public content::FileSystemAccessPermis
 {
 public:
     FileSystemAccessPermissionGrantQt(base::WeakPtr<FileSystemAccessPermissionContextQt> context,
-                                      const url::Origin &origin, const base::FilePath &path,
+                                      const url::Origin &origin,
+                                      const content::PathInfo &path_info,
                                       HandleType handle_type, GrantType type);
 
     // content::FileSystemAccessPermissionGrant:
     blink::mojom::PermissionStatus GetStatus() override { return m_status; }
-    base::FilePath GetPath() override { return m_path; }
+    base::FilePath GetPath() override { return m_pathInfo.path; }
+    std::string GetDisplayName() override { return m_pathInfo.display_name; }
     void RequestPermission(content::GlobalRenderFrameHostId frame_id,
                            UserActivationState user_activation_state,
                            base::OnceCallback<void(PermissionRequestOutcome)> callback) override;
 
     const url::Origin &origin() const { return m_origin; }
     HandleType handleType() const { return m_handleType; }
-    const base::FilePath &path() const { return m_path; }
+    const base::FilePath &path() const { return m_pathInfo.path; }
     GrantType type() const { return m_type; }
 
     void SetStatus(blink::mojom::PermissionStatus status);
@@ -45,7 +47,7 @@ class FileSystemAccessPermissionGrantQt : public content::FileSystemAccessPermis
 
     base::WeakPtr<FileSystemAccessPermissionContextQt> const m_context;
     const url::Origin m_origin;
-    const base::FilePath m_path;
+    const content::PathInfo m_pathInfo;
     const HandleType m_handleType;
     const GrantType m_type;
 
diff --git a/src/core/file_system_access/file_system_access_permission_request_controller.h b/src/core/file_system_access/file_system_access_permission_request_controller.h
index e659f81a770..282f41f4253 100644
--- a/src/core/file_system_access/file_system_access_permission_request_controller.h
+++ b/src/core/file_system_access/file_system_access_permission_request_controller.h
@@ -16,6 +16,7 @@ class FileSystemAccessPermissionRequestController : public RequestController
 {
 public:
     FileSystemAccessPermissionRequestController(const QUrl &origin, const QUrl &filePath,
+                                                const QString &displayName,
                                                 HandleType handleType, AccessFlags accessType)
         : RequestController(origin)
         , m_filePath(filePath)
@@ -25,11 +26,13 @@ class FileSystemAccessPermissionRequestController : public RequestController
     }
 
     QUrl filePath() const { return m_filePath; }
+    QString displayName() const { return m_displayName; }
     HandleType handleType() const { return m_handleType; }
     AccessFlags accessFlags() const { return m_accessType; }
 
 private:
     QUrl m_filePath;
+    QString m_displayName;
     HandleType m_handleType;
     AccessFlags m_accessType;
 };
diff --git a/src/core/file_system_access/file_system_access_permission_request_controller_impl.cpp b/src/core/file_system_access/file_system_access_permission_request_controller_impl.cpp
index f77c974d0b6..67447928b7f 100644
--- a/src/core/file_system_access/file_system_access_permission_request_controller_impl.cpp
+++ b/src/core/file_system_access/file_system_access_permission_request_controller_impl.cpp
@@ -23,7 +23,8 @@ FileSystemAccessPermissionRequestControllerImpl::FileSystemAccessPermissionReque
         const FileSystemAccessPermissionRequestManagerQt::RequestData &request,
         base::OnceCallback<void(permissions::PermissionAction result)> callback)
     : FileSystemAccessPermissionRequestController(
-            toQt(request.origin.GetURL()), QUrl::fromLocalFile(toQt(request.path.value())),
+            toQt(request.origin.GetURL()), QUrl::fromLocalFile(toQt(request.pathInfo.path.value())),
+            QString::fromStdString(request.pathInfo.display_name),
             (HandleType)request.handle_type, AccessFlags((int)request.access))
     , m_callback(std::move(callback))
 {
diff --git a/src/core/file_system_access/file_system_access_permission_request_manager_qt.cpp b/src/core/file_system_access/file_system_access_permission_request_manager_qt.cpp
index c384dc7b3ea..a3f5b2ed2a6 100644
--- a/src/core/file_system_access/file_system_access_permission_request_manager_qt.cpp
+++ b/src/core/file_system_access/file_system_access_permission_request_manager_qt.cpp
@@ -17,17 +17,22 @@
 
 namespace QtWebEngineCore {
 
+// Based on chrome/browser/file_system_access/file_system_access_permission_request_manager.cc
+// Copyright 2019 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
 bool RequestsAreIdentical(const FileSystemAccessPermissionRequestManagerQt::RequestData &a,
                           const FileSystemAccessPermissionRequestManagerQt::RequestData &b)
 {
-    return a.origin == b.origin && a.path == b.path && a.handle_type == b.handle_type
+    return a.origin == b.origin && a.pathInfo.path == b.pathInfo.path && a.handle_type == b.handle_type
             && a.access == b.access;
 }
 
 bool RequestsAreForSamePath(const FileSystemAccessPermissionRequestManagerQt::RequestData &a,
                             const FileSystemAccessPermissionRequestManagerQt::RequestData &b)
 {
-    return a.origin == b.origin && a.path == b.path && a.handle_type == b.handle_type;
+    return a.origin == b.origin && a.pathInfo.path == b.pathInfo.path && a.handle_type == b.handle_type;
 }
 
 struct FileSystemAccessPermissionRequestManagerQt::Request
diff --git a/src/core/file_system_access/file_system_access_permission_request_manager_qt.h b/src/core/file_system_access/file_system_access_permission_request_manager_qt.h
index 84085491153..aba5ceebef1 100644
--- a/src/core/file_system_access/file_system_access_permission_request_manager_qt.h
+++ b/src/core/file_system_access/file_system_access_permission_request_manager_qt.h
@@ -38,7 +38,7 @@ class FileSystemAccessPermissionRequestManagerQt
     struct RequestData
     {
         url::Origin origin;
-        base::FilePath path;
+        content::PathInfo pathInfo;
         content::FileSystemAccessPermissionContext::HandleType handle_type;
         Access access;
     };
diff --git a/src/core/permission_manager_qt.cpp b/src/core/permission_manager_qt.cpp
index e57e12e3d0e..5258f15cf8d 100644
--- a/src/core/permission_manager_qt.cpp
+++ b/src/core/permission_manager_qt.cpp
@@ -52,7 +52,6 @@ static QWebEnginePermission::PermissionType toQt(blink::PermissionType type)
         return QWebEnginePermission::PermissionType::LocalFontsAccess;
     case blink::PermissionType::POINTER_LOCK:
         return QWebEnginePermission::PermissionType::MouseLock;
-    case blink::PermissionType::ACCESSIBILITY_EVENTS:
     case blink::PermissionType::CAMERA_PAN_TILT_ZOOM:
     case blink::PermissionType::WINDOW_MANAGEMENT:
     case blink::PermissionType::BACKGROUND_SYNC:
diff --git a/src/core/printing/pdf_document_helper_client_qt.cpp b/src/core/printing/pdf_document_helper_client_qt.cpp
index 275f6701316..66252d212a5 100644
--- a/src/core/printing/pdf_document_helper_client_qt.cpp
+++ b/src/core/printing/pdf_document_helper_client_qt.cpp
@@ -20,3 +20,6 @@ void PDFDocumentHelperClientQt::SetPluginCanSave(content::RenderFrameHost *rende
 void PDFDocumentHelperClientQt::UpdateContentRestrictions(content::RenderFrameHost *, int)
 {
 }
+void PDFDocumentHelperClientQt::OnSearchifyStateChange(bool, content::WebContents *)
+{
+}
diff --git a/src/core/printing/pdf_document_helper_client_qt.h b/src/core/printing/pdf_document_helper_client_qt.h
index 4bdc3d6b371..43a4726d36a 100644
--- a/src/core/printing/pdf_document_helper_client_qt.h
+++ b/src/core/printing/pdf_document_helper_client_qt.h
@@ -21,6 +21,7 @@ class PDFDocumentHelperClientQt : public pdf::PDFDocumentHelperClient // FIXME:
     void OnSaveURL(content::WebContents *contents) override {}
     void SetPluginCanSave(content::RenderFrameHost *render_frame_host, bool can_save) override;
     void UpdateContentRestrictions(content::RenderFrameHost *, int) override;
+    void OnSearchifyStateChange(bool, content::WebContents *) override;
 };
 
 #endif // PDF_DOCUMENT_HELPER_CLIENT_QT_H
diff --git a/src/core/printing/print_view_manager_qt.cpp b/src/core/printing/print_view_manager_qt.cpp
index b0f1788fdd3..364253887b6 100644
--- a/src/core/printing/print_view_manager_qt.cpp
+++ b/src/core/printing/print_view_manager_qt.cpp
@@ -52,27 +52,15 @@ static QSharedPointer<QByteArray> GetStdVectorFromHandle(const base::ReadOnlySha
     return QSharedPointer<QByteArray>(new QByteArray(data, map.size()));
 }
 
-static scoped_refptr<base::RefCountedBytes>
-GetBytesFromHandle(const base::ReadOnlySharedMemoryRegion &handle)
-{
-    base::ReadOnlySharedMemoryMapping map = handle.Map();
-    if (!map.IsValid())
-        return nullptr;
-
-    const unsigned char* data = static_cast<const unsigned char*>(map.memory());
-    std::vector<unsigned char> dataVector(data, data + map.size());
-    return base::RefCountedBytes::TakeVector(&dataVector);
-}
-
 // Write the PDF file to disk.
-static void SavePdfFile(scoped_refptr<base::RefCountedBytes> data,
+static void SavePdfFile(scoped_refptr<base::RefCountedSharedMemoryMapping> data,
                         const base::FilePath &path,
                         QtWebEngineCore::PrintViewManagerQt::PrintToPDFFileCallback saveCallback)
 {
     DCHECK_GT(data->size(), 0U);
 
     printing::MetafileSkia metafile;
-    metafile.InitFromData(base::as_bytes(base::make_span(data->front(), data->size())));
+    metafile.InitFromData(*data);
 
     base::File file(path,
                     base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE);
@@ -100,7 +88,6 @@ static base::Value::Dict createPrintSettings()
     printSettings.Set(printing::kSettingCopies, 1);
     printSettings.Set(printing::kSettingPagesPerSheet, 1);
     printSettings.Set(printing::kSettingCollate, false);
-//    printSettings->SetBoolean(printing::kSettingGenerateDraftData, false);
     printSettings.Set(printing::kSettingPreviewModifiable, false);
 
     printSettings.Set(printing::kSettingShouldPrintSelectionOnly, base::Value(false));
@@ -432,9 +419,9 @@ void PrintViewManagerQt::MetafileReadyForPrinting(printing::mojom::DidPreviewDoc
         content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
                        base::BindOnce(std::move(pdf_print_callback), data_array));
     } else {
-        scoped_refptr<base::RefCountedBytes> data_bytes = GetBytesFromHandle(params->content->metafile_data_region);
+        auto data_bytes = base::RefCountedSharedMemoryMapping::CreateFromWholeRegion(params->content->metafile_data_region);
         base::ThreadPool::PostTask(FROM_HERE, { base::MayBlock() },
-                                   base::BindOnce(&SavePdfFile, data_bytes, pdfOutputPath, std::move(pdf_save_callback)));
+                                   base::BindOnce(&SavePdfFile, std::move(data_bytes), pdfOutputPath, std::move(pdf_save_callback)));
     }
 }
 
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 0d3d9777514..978f00675ed 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -13,7 +13,9 @@
 #include "web_event_factory.h"
 
 #include "components/input/cursor_manager.h"
+#include "components/input/events_helper.h"
 #include "components/input/render_widget_host_input_event_router.h"
+#include "components/input/switches.h"
 #include "components/viz/common/features.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/surfaces/frame_sink_id_allocator.h"
@@ -27,7 +29,6 @@
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/common/content_switches_internal.h"
 #include "content/common/cursors/webcursor.h"
-#include "content/common/input/events_helper.h"
 #include "content/common/input/synthetic_gesture_target.h"
 #include "content/public/browser/web_contents.h"
 #include "third_party/skia/include/core/SkColor.h"
@@ -646,7 +647,7 @@ bool RenderWidgetHostViewQt::TransformPointToCoordSpaceForView(const gfx::PointF
         return true;
     }
 
-    return target_view->TransformPointToLocalCoordSpace(point, GetCurrentSurfaceId(), transformed_point);
+    return target_view->TransformPointToLocalCoordSpace(point, GetFrameSinkId(), transformed_point);
 }
 
 void RenderWidgetHostViewQt::Destroy()
@@ -766,7 +767,7 @@ void RenderWidgetHostViewQt::OnGestureEvent(const ui::GestureEventData& gesture)
     if ((gesture.type() == ui::EventType::kGesturePinchBegin
          || gesture.type() == ui::EventType::kGesturePinchUpdate
          || gesture.type() == ui::EventType::kGesturePinchEnd)
-        && !content::IsPinchToZoomEnabled()) {
+        && !input::switches::IsPinchToZoomEnabled()) {
         return;
     }
 
@@ -848,7 +849,7 @@ void RenderWidgetHostViewQt::notifyHidden()
 void RenderWidgetHostViewQt::ProcessAckedTouchEvent(const input::TouchEventWithLatencyInfo &touch, blink::mojom::InputEventResultState ack_result)
 {
     const bool eventConsumed = (ack_result == blink::mojom::InputEventResultState::kConsumed);
-    const bool isSetBlocking = content::InputEventResultStateIsSetBlocking(ack_result);
+    const bool isSetBlocking = input::InputEventResultStateIsSetBlocking(ack_result);
     m_gestureProvider.OnTouchEventAck(touch.event.unique_touch_event_id, eventConsumed, isSetBlocking);
 }
 
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index b04696fe5e6..0368ba3d813 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -204,7 +204,7 @@ void ContentRendererClientQt::RenderFrameCreated(content::RenderFrame *render_fr
 #endif
 
     auto password_autofill_agent =
-            std::make_unique<autofill::PasswordAutofillAgent>(render_frame, associated_interfaces, autofill::PasswordAutofillAgent::EnableHeavyFormDataScraping(false));
+            std::make_unique<autofill::PasswordAutofillAgent>(render_frame, associated_interfaces);
     auto password_generation_agent =
             std::make_unique<autofill::PasswordGenerationAgent>(render_frame, password_autofill_agent.get(), associated_interfaces);
 
diff --git a/src/core/renderer/web_engine_page_render_frame.cpp b/src/core/renderer/web_engine_page_render_frame.cpp
index 31477564fd0..fbdef74b29e 100644
--- a/src/core/renderer/web_engine_page_render_frame.cpp
+++ b/src/core/renderer/web_engine_page_render_frame.cpp
@@ -2,16 +2,20 @@
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
 
 #include "renderer/web_engine_page_render_frame.h"
+
 #include "content/public/renderer/render_frame.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
-
 #include "third_party/blink/public/common/metrics/document_update_reason.h"
 #include "third_party/blink/public/platform/web_string.h"
 #include "third_party/blink/public/web/web_frame_content_dumper.h"
 #include "third_party/blink/public/web/web_local_frame.h"
 #include "third_party/blink/public/web/web_view.h"
+
+// Pretend we are part of blink to access non public blink headers:
+#define INSIDE_BLINK 1
 #include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
 #include "third_party/blink/renderer/platform/heap/thread_state.h"
+#undef INSIDE_BLINK
 
 namespace {
 // Forces layouting of document and it's subtree.
diff --git a/src/core/touch_selection_controller_client_qt.cpp b/src/core/touch_selection_controller_client_qt.cpp
index befee6aaf4f..804e943350e 100644
--- a/src/core/touch_selection_controller_client_qt.cpp
+++ b/src/core/touch_selection_controller_client_qt.cpp
@@ -37,17 +37,17 @@ TouchSelectionControllerClientQt::~TouchSelectionControllerClientQt()
 
 bool TouchSelectionControllerClientQt::handleContextMenu(const content::ContextMenuParams& params)
 {
-    if ((params.source_type == ui::MENU_SOURCE_LONG_PRESS ||
-         params.source_type == ui::MENU_SOURCE_LONG_TAP) &&
+    if ((params.source_type == ui::mojom::MenuSourceType::kLongPress ||
+         params.source_type == ui::mojom::MenuSourceType::kLongTap) &&
         params.is_editable && params.selection_text.empty()) {
         m_menuRequested = true;
         updateMenu();
         return true;
     }
 
-    const bool from_touch = params.source_type == ui::MENU_SOURCE_LONG_PRESS ||
-                            params.source_type == ui::MENU_SOURCE_LONG_TAP ||
-                            params.source_type == ui::MENU_SOURCE_TOUCH;
+    const bool from_touch = params.source_type == ui::mojom::MenuSourceType::kLongPress ||
+                            params.source_type == ui::mojom::MenuSourceType::kLongTap ||
+                            params.source_type == ui::mojom::MenuSourceType::kTouch;
     if (from_touch && !params.selection_text.empty())
         return true;
 
@@ -132,7 +132,7 @@ void TouchSelectionControllerClientQt::RunContextMenu()
 
     content::RenderWidgetHostImpl *host = m_rwhv->host();
     host->ShowContextMenuAtPoint(gfx::ToRoundedPoint(anchorPoint),
-                                 ui::MENU_SOURCE_TOUCH_EDIT_MENU);
+                                 ui::mojom::MenuSourceType::kTouchEditMenu);
 
     // Hide selection handles after getting rect-between-bounds from touch
     // selection controller; otherwise, rect would be empty and the above
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index e518b5ae172..3f209c7e0c5 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -606,10 +606,25 @@ bool WebContentsDelegateQt::IsFullscreenForTabOrPending(const content::WebConten
 ASSERT_ENUMS_MATCH(FilePickerController::Open, blink::mojom::FileChooserParams::Mode::kOpen)
 ASSERT_ENUMS_MATCH(FilePickerController::OpenMultiple, blink::mojom::FileChooserParams::Mode::kOpenMultiple)
 ASSERT_ENUMS_MATCH(FilePickerController::UploadFolder, blink::mojom::FileChooserParams::Mode::kUploadFolder)
-ASSERT_ENUMS_MATCH(FilePickerController::Save, blink::mojom::FileChooserParams::Mode::kSave)
+// ASSERT_ENUMS_MATCH(FilePickerController::Save, blink::mojom::FileChooserParams::Mode::kSave)
 
 extern FilePickerController *createFilePickerController(FilePickerController::FileChooserMode mode, scoped_refptr<content::FileSelectListener> listener, const QString &defaultFileName, const QStringList &acceptedMimeTypes, QObject *parent = nullptr);
 
+FilePickerController::FileChooserMode toFileChooserMode(blink::mojom::FileChooserParams_Mode mode)
+{
+    switch (mode) {
+    case blink::mojom::FileChooserParams_Mode::kOpen:
+    case blink::mojom::FileChooserParams_Mode::kOpenMultiple:
+    case blink::mojom::FileChooserParams_Mode::kUploadFolder:
+        break;
+    case blink::mojom::FileChooserParams_Mode::kOpenDirectory:
+        return FilePickerController::OpenDirectory;
+    case blink::mojom::FileChooserParams_Mode::kSave:
+        return FilePickerController::Save;
+    }
+    return static_cast<FilePickerController::FileChooserMode>(mode);
+}
+
 void WebContentsDelegateQt::RunFileChooser(content::RenderFrameHost * /*frameHost*/,
                                            scoped_refptr<content::FileSelectListener> listener,
                                            const blink::mojom::FileChooserParams& params)
@@ -619,7 +634,7 @@ void WebContentsDelegateQt::RunFileChooser(content::RenderFrameHost * /*frameHos
     for (std::vector<std::u16string>::const_iterator it = params.accept_types.begin(); it < params.accept_types.end(); ++it)
         acceptedMimeTypes.append(toQt(*it));
 
-    m_filePickerController.reset(createFilePickerController(static_cast<FilePickerController::FileChooserMode>(params.mode),
+    m_filePickerController.reset(createFilePickerController(toFileChooserMode(params.mode),
                                                             listener, toQt(params.default_file_name.value()), acceptedMimeTypes));
 
     // Defer the call to not block base::MessageLoop::RunTask with modal dialogs.
diff --git a/src/core/web_contents_view_qt.h b/src/core/web_contents_view_qt.h
index d04a4924f47..6f789ebe836 100644
--- a/src/core/web_contents_view_qt.h
+++ b/src/core/web_contents_view_qt.h
@@ -96,6 +96,7 @@ class WebContentsViewQt
     void GotFocus(content::RenderWidgetHostImpl *render_widget_host) override;
     void LostFocus(content::RenderWidgetHostImpl *render_widget_host) override;
     void TakeFocus(bool reverse) override;
+    void DestroyBackForwardTransitionAnimationManager() override {}
 
 private:
     static void update(QWebEngineContextMenuRequest *request,
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index d04016845a3..939fc647c97 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -918,12 +918,12 @@ WebEngineContext::WebEngineContext()
         enableFeatures.push_back(features::kOverlayScrollbar.name);
         parsedCommandLine.AppendSwitch(switches::kEnableViewport);
         parsedCommandLine.AppendSwitch(input::switches::kValidateInputEventStream);
-        parsedCommandLine.AppendSwitch(cc::switches::kDisableCompositedAntialiasing);
+        parsedCommandLine.AppendSwitch(switches::kDisableCompositedAntialiasing);
     }
 
 #if BUILDFLAG(IS_OZONE)
     if (!isGbmSupported()) {
-        disableFeatures.push_back(media::kVaapiVideoDecodeLinux.name);
+        disableFeatures.push_back(media::kAcceleratedVideoDecodeLinux.name);
         parsedCommandLine.AppendSwitch(switches::kDisableGpuMemoryBufferVideoFrames);
     }
 #endif
diff --git a/src/pdf/CMakeLists.txt b/src/pdf/CMakeLists.txt
index 9f7ef7d0e99..423d9883d97 100644
--- a/src/pdf/CMakeLists.txt
+++ b/src/pdf/CMakeLists.txt
@@ -126,7 +126,6 @@ foreach(arch ${archs})
           enable_swiftshader_vulkan=false
           angle_enable_swiftshader=false
           dawn_use_swiftshader=false
-          pdf_enable_fontations=false
           use_cups=false
           use_dawn=false
           build_dawn_tests=false
@@ -141,6 +140,7 @@ foreach(arch ${archs})
           v8_enable_webassembly=false
           use_v8_context_snapshot=false
           v8_use_external_startup_data=false
+          webnn_use_tflite=false
   )
 
         if(LINUX OR ANDROID)
diff --git a/src/webenginequick/api/qquickwebenginedialogrequests.cpp b/src/webenginequick/api/qquickwebenginedialogrequests.cpp
index 9d6b5ed7000..9f08e1781f3 100644
--- a/src/webenginequick/api/qquickwebenginedialogrequests.cpp
+++ b/src/webenginequick/api/qquickwebenginedialogrequests.cpp
@@ -622,7 +622,8 @@ QString QQuickWebEngineFileDialogRequest::defaultFileName() const
 
 QQuickWebEngineFileDialogRequest::FileMode QQuickWebEngineFileDialogRequest::mode() const
 {
-    return m_mode;
+    // map opendirectory to openmultiple
+    return m_mode > FileMode::FileModeSave ? FileMode::FileModeOpenMultiple : m_mode;
 }
 
 /*!
diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
index ed768d8500b..888ed88655c 100644
--- a/src/webenginewidgets/api/qwebengineview.cpp
+++ b/src/webenginewidgets/api/qwebengineview.cpp
@@ -507,6 +507,8 @@ QStringList QWebEngineViewPrivate::chooseFiles(QWebEnginePage::FileSelectionMode
     QStringList ret;
     QString str;
     switch (static_cast<QtWebEngineCore::FilePickerController::FileChooserMode>(mode)) {
+    case QtWebEngineCore::FilePickerController::OpenDirectory:
+        Q_FALLTHROUGH();
     case QtWebEngineCore::FilePickerController::OpenMultiple:
         ret = QFileDialog::getOpenFileNames(q, QString(), QString(),
                                             filter.join(QStringLiteral(";;")), nullptr,

From 27ff7e12ca154d06ca5674631972f0716ad0af9e Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Mon, 14 Apr 2025 11:07:35 +0200
Subject: [PATCH 050/100] Adaptations for Chromium 134

Change-Id: I9615f0a095843fdf295e454a93476cf349f7fc76
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit daab0b4ed7c49627045a12500df197b16128fa19)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 CHROMIUM_VERSION                              |  5 +-
 configure.cmake                               |  2 +-
 src/3rdparty                                  |  2 +-
 src/core/api/CMakeLists.txt                   |  1 +
 ...authenticator_request_client_delegate_qt.h |  1 +
 src/core/autofill_client_qt.cpp               | 39 +++++++++------
 src/core/autofill_client_qt.h                 | 13 +++--
 src/core/autofill_popup_controller.cpp        |  2 +-
 src/core/autofill_popup_controller_p.h        |  2 +-
 src/core/client_cert_select_controller.cpp    |  4 +-
 src/core/client_hints.cpp                     |  4 +-
 src/core/client_hints.h                       |  2 +-
 src/core/clipboard_qt.cpp                     |  2 +
 src/core/clipboard_qt.h                       |  1 +
 src/core/clipboard_util_win.cpp               | 18 +++----
 .../native_skia_output_device_direct3d11.cpp  |  4 +-
 .../native_skia_output_device_opengl.cpp      |  4 +-
 .../native_skia_output_device_vulkan.cpp      |  4 +-
 src/core/configure/BUILD.root.gn.in           |  7 ++-
 src/core/content_browser_client_qt.cpp        | 32 ++++++++-----
 src/core/content_browser_client_qt.h          |  6 ++-
 .../protocol_handler_registry_factory.cpp     |  7 ++-
 .../protocol_handler_registry_factory.h       |  2 +-
 .../extensions/extension_host_delegate_qt.cpp |  5 --
 .../extensions/extension_host_delegate_qt.h   |  1 -
 src/core/extensions/extension_loader.h        | 25 ++++++----
 .../extension_system_factory_qt.cpp           |  4 +-
 .../extensions/extension_system_factory_qt.h  |  2 +-
 .../extension_web_contents_observer_qt.cpp    |  2 +-
 .../extensions_browser_client_qt.cpp          |  7 ---
 .../extensions/extensions_browser_client_qt.h |  3 --
 .../pdf_iframe_navigation_throttle_qt.cpp     |  2 +-
 .../extensions/webui/extensions_ui_qt.cpp     |  5 +-
 src/core/favicon_service_factory_qt.cpp       | 11 ++---
 src/core/favicon_service_factory_qt.h         |  4 +-
 ...m_access_permission_context_factory_qt.cpp |  6 +--
 ...tem_access_permission_context_factory_qt.h |  2 +-
 ...le_system_access_permission_context_qt.cpp |  6 +++
 ...file_system_access_permission_context_qt.h |  1 +
 src/core/media_capture_devices_dispatcher.cpp |  4 +-
 src/core/net/client_cert_store_data.cpp       |  5 +-
 src/core/net/custom_url_loader_factory.cpp    |  2 -
 ...sponse_interceptor_url_loader_throttle.cpp |  2 +-
 .../proxying_restricted_cookie_manager_qt.cpp | 15 ++++--
 .../proxying_restricted_cookie_manager_qt.h   |  5 ++
 .../net/proxying_url_loader_factory_qt.cpp    | 16 +------
 src/core/net/resource_request_body_qt.cpp     |  2 +-
 src/core/ozone/ozone_platform_qt.cpp          |  3 +-
 .../pdf_document_helper_client_qt.cpp         |  2 +-
 .../printing/pdf_document_helper_client_qt.h  |  3 +-
 .../printing/print_view_manager_base_qt.cpp   |  4 +-
 src/core/profile_io_data_qt.cpp               |  3 +-
 src/core/profile_qt.cpp                       | 30 ++++--------
 src/core/render_widget_host_view_qt.cpp       | 33 ++-----------
 src/core/render_widget_host_view_qt.h         |  4 +-
 ...nder_widget_host_view_qt_delegate_item.cpp |  2 +
 .../renderer/content_renderer_client_qt.cpp   | 43 ++++++-----------
 .../web_channel_ipc_transport_host.cpp        |  2 +-
 src/core/touch_handle_drawable_qt.cpp         | 26 +++++-----
 src/core/touch_handle_drawable_qt.h           |  4 +-
 .../touch_selection_controller_client_qt.cpp  | 11 ++++-
 src/core/web_contents_adapter.cpp             | 16 ++++---
 src/core/web_contents_delegate_qt.cpp         |  2 +
 src/core/web_engine_context.cpp               |  3 +-
 src/core/web_engine_settings.cpp              | 10 ++--
 src/pdf/CMakeLists.txt                        |  3 +-
 src/webenginewidgets/api/qwebengineview.cpp   |  1 -
 .../tst_qquickwebengineview.cpp               | 13 -----
 .../qwebenginepage/tst_qwebenginepage.cpp     | 48 -------------------
 .../qwebengineview/tst_qwebengineview.cpp     | 13 -----
 tests/manual/widgets/webrtc/index.html        | 31 ------------
 tests/manual/widgets/webrtc/main.cpp          |  4 +-
 tools/scripts/version_resolver.py             |  4 +-
 73 files changed, 252 insertions(+), 367 deletions(-)

diff --git a/CHROMIUM_VERSION b/CHROMIUM_VERSION
index 4855e4bfd0b..08826803a58 100644
--- a/CHROMIUM_VERSION
+++ b/CHROMIUM_VERSION
@@ -1,3 +1,2 @@
-
-Based on Chromium version:                                      130.0.6723.192
-Patched with security patches up to Chromium version:           137.0.7151.68
+Based on Chromium version:                                      134.0.6998.208
+Patched with security patches up to Chromium version:           134.0.6998.208
diff --git a/configure.cmake b/configure.cmake
index 6b3b5f7705e..f37910d7cf3 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -17,7 +17,7 @@ qt_webengine_set_version(glib 2.32.0)
 qt_webengine_set_version(glibc 2.16)
 qt_webengine_set_version(harfbuzz 4.3.0)
 qt_webengine_set_version(libpng 1.6.0)
-qt_webengine_set_version(libtiff 4.2.0)
+qt_webengine_set_version(libtiff 4.5.0)
 qt_webengine_set_version(re2 11.0.0)
 qt_webengine_set_version(icu 70)
 qt_webengine_set_version(opus 1.3.1)
diff --git a/src/3rdparty b/src/3rdparty
index d55e428cf65..40948d1690e 160000
--- a/src/3rdparty
+++ b/src/3rdparty
@@ -1 +1 @@
-Subproject commit d55e428cf65c2fffceef1e1eb95803d3395415f8
+Subproject commit 40948d1690e3a124e45ac562c58d3e6887a3f4fe
diff --git a/src/core/api/CMakeLists.txt b/src/core/api/CMakeLists.txt
index b13aa026026..970c071fd61 100644
--- a/src/core/api/CMakeLists.txt
+++ b/src/core/api/CMakeLists.txt
@@ -53,6 +53,7 @@ qt_internal_add_module(WebEngineCore
         ../
         ../../3rdparty/chromium
         ../../3rdparty/chromium/third_party/abseil-cpp
+        ../../3rdparty/chromium/third_party/icu/source/common
         ../../3rdparty/chromium/third_party/perfetto/include
         ../../3rdparty/chromium/third_party/boringssl/src/include
         ../../3rdparty/chromium/base/allocator/partition_allocator/src
diff --git a/src/core/authenticator_request_client_delegate_qt.h b/src/core/authenticator_request_client_delegate_qt.h
index 1b6c292db1e..1c04351e86e 100644
--- a/src/core/authenticator_request_client_delegate_qt.h
+++ b/src/core/authenticator_request_client_delegate_qt.h
@@ -6,6 +6,7 @@
 
 #include "qtwebenginecoreglobal_p.h"
 #include "content/public/browser/authenticator_request_client_delegate.h"
+#include "content/public/browser/web_authentication_delegate.h"
 #include <unordered_map>
 #include <QSharedPointer>
 
diff --git a/src/core/autofill_client_qt.cpp b/src/core/autofill_client_qt.cpp
index 19d3ac24e1f..27834498001 100644
--- a/src/core/autofill_client_qt.cpp
+++ b/src/core/autofill_client_qt.cpp
@@ -12,7 +12,7 @@
 
 #include "chrome/browser/profiles/profile.h"
 #include "components/autofill/content/browser/content_autofill_driver.h"
-#include "components/autofill/core/browser/browser_autofill_manager.h"
+#include "components/autofill/core/browser/foundations/browser_autofill_manager.h"
 #include "components/autofill/core/common/autofill_prefs.h"
 #include "content/browser/web_contents/web_contents_impl.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
@@ -35,11 +35,6 @@ AutofillClientQt::AutofillClientQt(content::WebContents *webContents)
 
 AutofillClientQt::~AutofillClientQt() { }
 
-autofill::PersonalDataManager *AutofillClientQt::GetPersonalDataManager()
-{
-    return nullptr;
-}
-
 autofill::AutocompleteHistoryManager *AutofillClientQt::GetAutocompleteHistoryManager()
 {
     return nullptr;
@@ -47,7 +42,7 @@ autofill::AutocompleteHistoryManager *AutofillClientQt::GetAutocompleteHistoryMa
 
 std::unique_ptr<autofill::AutofillManager> AutofillClientQt::CreateManager(base::PassKey<autofill::ContentAutofillDriver>, autofill::ContentAutofillDriver &driver)
 {
-    return base::WrapUnique(new autofill::BrowserAutofillManager(&driver, std::string()));
+    return base::WrapUnique(new autofill::BrowserAutofillManager(&driver));
 }
 
 PrefService *AutofillClientQt::GetPrefs()
@@ -85,12 +80,6 @@ void AutofillClientQt::UpdateAutofillDataListValues(
         HideAutofillSuggestions(autofill::SuggestionHidingReason::kNoSuggestions);
 }
 
-void AutofillClientQt::PinAutofillSuggestions()
-{
-    // Called by password_manager component only.
-    NOTIMPLEMENTED();
-}
-
 
 base::span<const autofill::Suggestion> AutofillClientQt::GetAutofillSuggestions() const
 {
@@ -104,16 +93,38 @@ void AutofillClientQt::HideAutofillSuggestions(autofill::SuggestionHidingReason)
     adapterClient()->hideAutofillPopup();
 }
 
+bool AutofillClientQt::IsAutofillEnabled() const
+{
+    // Returns false, this is not required to be enabled for <datalist>.
+    return IsAutofillProfileEnabled() || IsAutofillPaymentMethodsEnabled();
+}
+
+bool AutofillClientQt::IsAutofillProfileEnabled() const
+{
+    return autofill::prefs::IsAutofillProfileEnabled(GetPrefs());
+}
+
+bool AutofillClientQt::IsAutofillPaymentMethodsEnabled() const
+{
+    return autofill::prefs::IsAutofillPaymentMethodsEnabled(GetPrefs());
+}
+
 bool AutofillClientQt::IsAutocompleteEnabled() const
 {
     return autofill::prefs::IsAutocompleteEnabled(GetPrefs());
 }
 
-bool AutofillClientQt::IsPasswordManagerEnabled()
+bool AutofillClientQt::IsPasswordManagerEnabled() const
 {
     return false;
 }
 
+const std::string& AutofillClientQt::GetAppLocale() const
+{
+    static const std::string empty;
+    return empty;
+}
+
 bool AutofillClientQt::IsOffTheRecord() const
 {
     return web_contents()->GetBrowserContext()->IsOffTheRecord();
diff --git a/src/core/autofill_client_qt.h b/src/core/autofill_client_qt.h
index b42e4f67eb5..f701f0b12f7 100644
--- a/src/core/autofill_client_qt.h
+++ b/src/core/autofill_client_qt.h
@@ -21,7 +21,7 @@
 #include "base/memory/weak_ptr.h"
 #include "base/containers/span.h"
 #include "components/autofill/content/browser/content_autofill_client.h"
-#include "components/autofill/core/browser/autofill_manager.h"
+#include "components/autofill/core/browser/foundations/autofill_manager.h"
 #include "content/public/browser/web_contents_observer.h"
 
 #include <QScopedPointer>
@@ -40,7 +40,6 @@ class AutofillClientQt : public autofill::ContentAutofillClient,
     static void CreateForWebContents(content::WebContents *contents);
 
     // autofill::AutofillClient overrides:
-    autofill::PersonalDataManager *GetPersonalDataManager() override;
     autofill::AutocompleteHistoryManager *GetAutocompleteHistoryManager() override;
     PrefService *GetPrefs() override;
     const PrefService *GetPrefs() const override;
@@ -50,16 +49,22 @@ class AutofillClientQt : public autofill::ContentAutofillClient,
                             base::WeakPtr<autofill::AutofillSuggestionDelegate> delegate) override;
     void UpdateAutofillDataListValues(
             base::span<const autofill::SelectOption> datalist) override;
-    void PinAutofillSuggestions() override;
     base::span<const autofill::Suggestion> GetAutofillSuggestions() const override;
     void HideAutofillSuggestions(autofill::SuggestionHidingReason reason) override;
+
+    bool IsAutofillEnabled() const override;
+    bool IsAutofillProfileEnabled() const override;
+    bool IsAutofillPaymentMethodsEnabled() const override;
     bool IsAutocompleteEnabled() const override;
-    bool IsPasswordManagerEnabled() override;
+    bool IsPasswordManagerEnabled() const override;
+
     bool IsOffTheRecord() const override;
     scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
     std::unique_ptr<autofill::AutofillManager> CreateManager(base::PassKey<autofill::ContentAutofillDriver>, autofill::ContentAutofillDriver&) override;
     base::WeakPtr<autofill::AutofillClient> GetWeakPtr() override;
 
+    const std::string& GetAppLocale() const override;
+
 private:
     explicit AutofillClientQt(content::WebContents *webContents);
 
diff --git a/src/core/autofill_popup_controller.cpp b/src/core/autofill_popup_controller.cpp
index 99eb09f379c..94ea39f5de0 100644
--- a/src/core/autofill_popup_controller.cpp
+++ b/src/core/autofill_popup_controller.cpp
@@ -5,7 +5,7 @@
 #include "autofill_popup_controller_p.h"
 
 #include "components/autofill/core/browser/ui/autofill_suggestion_delegate.h"
-#include "components/autofill/core/browser/ui/suggestion.h"
+#include "components/autofill/core/browser/suggestions/suggestion.h"
 
 namespace QtWebEngineCore {
 
diff --git a/src/core/autofill_popup_controller_p.h b/src/core/autofill_popup_controller_p.h
index 6c51d26bfc0..30de88de23c 100644
--- a/src/core/autofill_popup_controller_p.h
+++ b/src/core/autofill_popup_controller_p.h
@@ -18,7 +18,7 @@
 #include <vector>
 
 #include "base/memory/weak_ptr.h"
-#include "components/autofill/core/browser/ui/suggestion.h"
+#include "components/autofill/core/browser/suggestions/suggestion.h"
 
 namespace autofill {
 class AutofillSuggestionDelegate;
diff --git a/src/core/client_cert_select_controller.cpp b/src/core/client_cert_select_controller.cpp
index e898da618ae..45f69b80d7d 100644
--- a/src/core/client_cert_select_controller.cpp
+++ b/src/core/client_cert_select_controller.cpp
@@ -77,8 +77,8 @@ void ClientCertSelectController::select(const QSslCertificate &certificate)
     }
     const QByteArray derCertificate = certificate.toDer();
     scoped_refptr<net::X509Certificate> selectedCert =
-            net::X509Certificate::CreateFromBytes(base::make_span((const unsigned char *)derCertificate.constData(),
-                                                                  (long unsigned)derCertificate.length()));
+            net::X509Certificate::CreateFromBytes(base::span<const unsigned char>((const unsigned char *)derCertificate.constData(),
+                                                                                  (long unsigned)derCertificate.length()));
     for (auto &certInfo : m_clientCerts) {
         scoped_refptr<net::X509Certificate> cert = certInfo->certificate();
         if (cert->EqualsExcludingChain(selectedCert.get())) {
diff --git a/src/core/client_hints.cpp b/src/core/client_hints.cpp
index af485767f03..4c41b626ae1 100644
--- a/src/core/client_hints.cpp
+++ b/src/core/client_hints.cpp
@@ -44,9 +44,9 @@ ClientHintsFactory::ClientHintsFactory()
 
 ClientHintsFactory::~ClientHintsFactory() = default;
 
-KeyedService *ClientHintsFactory::BuildServiceInstanceFor(content::BrowserContext *context) const
+std::unique_ptr<KeyedService> ClientHintsFactory::BuildServiceInstanceForBrowserContext(content::BrowserContext *profile) const
 {
-    return new ClientHints(context);
+    return std::make_unique<ClientHints>(profile);
 }
 
 content::BrowserContext *ClientHintsFactory::GetBrowserContextToUse(content::BrowserContext *context) const
diff --git a/src/core/client_hints.h b/src/core/client_hints.h
index c3bcf7556ab..ceb07a1d683 100644
--- a/src/core/client_hints.h
+++ b/src/core/client_hints.h
@@ -37,7 +37,7 @@ class ClientHintsFactory : public BrowserContextKeyedServiceFactory
     ~ClientHintsFactory() override;
 
     // BrowserContextKeyedServiceFactory methods:
-    KeyedService *BuildServiceInstanceFor(content::BrowserContext *profile) const override;
+    std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(content::BrowserContext *profile) const override;
     content::BrowserContext *GetBrowserContextToUse(content::BrowserContext *context) const override;
 };
 
diff --git a/src/core/clipboard_qt.cpp b/src/core/clipboard_qt.cpp
index 1560d581594..91d0d8637ed 100644
--- a/src/core/clipboard_qt.cpp
+++ b/src/core/clipboard_qt.cpp
@@ -97,6 +97,7 @@ extern void CFHtmlExtractMetadata(const std::string &cf_html, std::string *base_
 
 void ClipboardQt::WritePortableAndPlatformRepresentations(ui::ClipboardBuffer type,
                                                           const ObjectMap &objects,
+                                                          const std::vector<RawData> &raw_objects,
                                                           std::vector<ui::Clipboard::PlatformRepresentation> platform_representations,
                                                           std::unique_ptr<ui::DataTransferEndpoint> data_src, uint32_t val)
 {
@@ -120,6 +121,7 @@ void ClipboardQt::WritePortableAndPlatformRepresentations(ui::ClipboardBuffer ty
             // Copy text and SourceTag to the selection clipboard.
             WritePortableAndPlatformRepresentations(ui::ClipboardBuffer::kSelection,
                                                     ObjectMap(text_iter, ++text_iter),
+                                                    raw_objects,
                                                     {},
                                                     nullptr, val);
         }
diff --git a/src/core/clipboard_qt.h b/src/core/clipboard_qt.h
index 077251fc7d1..a51ba6ff08e 100644
--- a/src/core/clipboard_qt.h
+++ b/src/core/clipboard_qt.h
@@ -46,6 +46,7 @@ class ClipboardQt : public ui::Clipboard
 protected:
     void WritePortableAndPlatformRepresentations(ui::ClipboardBuffer buffer,
                                                  const ObjectMap &objects,
+                                                 const std::vector<RawData> &raw_objects,
                                                  std::vector<PlatformRepresentation> platform_representations,
                                                  std::unique_ptr<ui::DataTransferEndpoint> data_src,
                                                  uint32_t) override;
diff --git a/src/core/clipboard_util_win.cpp b/src/core/clipboard_util_win.cpp
index f3ae7e730b8..263ecd9594d 100644
--- a/src/core/clipboard_util_win.cpp
+++ b/src/core/clipboard_util_win.cpp
@@ -26,15 +26,15 @@ std::string HtmlToCFHtml(const std::string &html, const std::string &base_url)
 #define MAKE_NUMBER_FORMAT_2(digits) "%0" #digits "u"
 #define NUMBER_FORMAT MAKE_NUMBER_FORMAT_1(MAX_DIGITS)
 
-    static const char *header = "Version:0.9\r\n"
-                                "StartHTML:" NUMBER_FORMAT "\r\n"
-                                "EndHTML:" NUMBER_FORMAT "\r\n"
-                                "StartFragment:" NUMBER_FORMAT "\r\n"
-                                "EndFragment:" NUMBER_FORMAT "\r\n";
-    static const char *source_url_prefix = "SourceURL:";
+    static constexpr char header[] = "Version:0.9\r\n"
+                                     "StartHTML:" NUMBER_FORMAT "\r\n"
+                                     "EndHTML:" NUMBER_FORMAT "\r\n"
+                                     "StartFragment:" NUMBER_FORMAT "\r\n"
+                                     "EndFragment:" NUMBER_FORMAT "\r\n";
+    static constexpr char source_url_prefix[] = "SourceURL:";
 
-    static const char *start_markup = "<html>\r\n<body>\r\n<!--StartFragment-->";
-    static const char *end_markup = "<!--EndFragment-->\r\n</body>\r\n</html>";
+    static constexpr char start_markup[] = "<html>\r\n<body>\r\n<!--StartFragment-->";
+    static constexpr char end_markup[] = "<!--EndFragment-->\r\n</body>\r\n</html>";
 
     // Calculate offsets
     size_t start_html_offset = strlen(header) - strlen(NUMBER_FORMAT) * 4 + MAX_DIGITS * 4;
@@ -45,7 +45,7 @@ std::string HtmlToCFHtml(const std::string &html, const std::string &base_url)
     size_t end_fragment_offset = start_fragment_offset + html.length();
     size_t end_html_offset = end_fragment_offset + strlen(end_markup);
 
-    std::string result = base::StringPrintfNonConstexpr(header, start_html_offset, end_html_offset,
+    std::string result = base::StringPrintf(header, start_html_offset, end_html_offset,
                                             start_fragment_offset, end_fragment_offset);
     if (!base_url.empty()) {
         result += source_url_prefix;
diff --git a/src/core/compositor/native_skia_output_device_direct3d11.cpp b/src/core/compositor/native_skia_output_device_direct3d11.cpp
index 12ddecdbe7e..4454e500446 100644
--- a/src/core/compositor/native_skia_output_device_direct3d11.cpp
+++ b/src/core/compositor/native_skia_output_device_direct3d11.cpp
@@ -45,8 +45,8 @@ QSGTexture *NativeSkiaOutputDeviceDirect3D11::texture(QQuickWindow *win, uint32_
 
     qCDebug(lcWebEngineCompositor, "D3D: Importing DXGI Resource into D3D11 Texture.");
 
-    Q_ASSERT(overlayImage->type() == gl::DCLayerOverlayType::kNV12Texture);
-    Microsoft::WRL::ComPtr<ID3D11Texture2D> chromeTexture = overlayImage->nv12_texture();
+    Q_ASSERT(overlayImage->type() == gl::DCLayerOverlayType::kD3D11Texture);
+    Microsoft::WRL::ComPtr<ID3D11Texture2D> chromeTexture = overlayImage->d3d11_video_texture();
     if (!chromeTexture) {
         qWarning("D3D: No D3D texture.");
         return nullptr;
diff --git a/src/core/compositor/native_skia_output_device_opengl.cpp b/src/core/compositor/native_skia_output_device_opengl.cpp
index 46e4cef8ecc..7e1511c16a0 100644
--- a/src/core/compositor/native_skia_output_device_opengl.cpp
+++ b/src/core/compositor/native_skia_output_device_opengl.cpp
@@ -344,8 +344,8 @@ QSGTexture *NativeSkiaOutputDeviceOpenGL::texture(QQuickWindow *win, uint32_t te
     qCDebug(lcWebEngineCompositor, "WGL: Importing DXGI Resource into GL Texture.");
     Q_ASSERT(m_contextState->gr_context_type() == gpu::GrContextType::kGL);
 
-    Q_ASSERT(overlayImage->type() == gl::DCLayerOverlayType::kNV12Texture);
-    Microsoft::WRL::ComPtr<ID3D11Texture2D> chromeTexture = overlayImage->nv12_texture();
+    Q_ASSERT(overlayImage->type() == gl::DCLayerOverlayType::kD3D11Texture);
+    Microsoft::WRL::ComPtr<ID3D11Texture2D> chromeTexture = overlayImage->d3d11_video_texture();
     if (!chromeTexture) {
         qWarning("WGL: No D3D texture.");
         return nullptr;
diff --git a/src/core/compositor/native_skia_output_device_vulkan.cpp b/src/core/compositor/native_skia_output_device_vulkan.cpp
index e820825d2bd..123be531b25 100644
--- a/src/core/compositor/native_skia_output_device_vulkan.cpp
+++ b/src/core/compositor/native_skia_output_device_vulkan.cpp
@@ -186,8 +186,8 @@ QSGTexture *NativeSkiaOutputDeviceVulkan::texture(QQuickWindow *win, uint32_t te
     qCDebug(lcWebEngineCompositor, "VULKAN: Importing DXGI Resource into VkImage.");
     externalMemoryImageCreateInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT;
 
-    Q_ASSERT(overlayImage->type() == gl::DCLayerOverlayType::kNV12Texture);
-    Microsoft::WRL::ComPtr<ID3D11Texture2D> chromeTexture = overlayImage->nv12_texture();
+    Q_ASSERT(overlayImage->type() == gl::DCLayerOverlayType::kD3D11Texture);
+    Microsoft::WRL::ComPtr<ID3D11Texture2D> chromeTexture = overlayImage->d3d11_video_texture();
     if (!chromeTexture) {
         qWarning("VULKAN: No D3D texture.");
         return nullptr;
diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in
index 910d68ad311..0a4a6bfea29 100644
--- a/src/core/configure/BUILD.root.gn.in
+++ b/src/core/configure/BUILD.root.gn.in
@@ -162,6 +162,7 @@ shared_library("QtWebEngineCore") {
     "//third_party/blink/public:blink",
     "//ui/accessibility",
     "//ui/gl",
+    "//ui/touch_selection/vector_icons",
     "//qtwebengine/browser:interfaces",
     "//qtwebengine/userscript",
     "//qtwebengine/common:mojo_bindings",
@@ -380,8 +381,6 @@ source_set("qtwebengine_sources") {
     "//chrome/browser/ui/webui/user_actions/user_actions_ui.h",
     "//chrome/browser/ui/webui/user_actions/user_actions_ui_handler.cc",
     "//chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h",
-    "//chrome/browser/ui/webui/webui_util.cc",
-    "//chrome/browser/ui/webui/webui_util.h",
     "//chrome/common/chrome_switches.cc",
     "//chrome/common/chrome_switches.h",
     "//chrome/common/pref_names.h",
@@ -390,6 +389,8 @@ source_set("qtwebengine_sources") {
     "//chrome/common/webui_url_constants.h",
     "//components/embedder_support/user_agent_utils.cc",
     "//components/embedder_support/user_agent_utils.h",
+    "//ui/webui/webui_util.cc",
+    "//ui/webui/webui_util.h",
   ]
   if (use_ozone) {
     deps += [
@@ -625,6 +626,7 @@ repack("qtwebengine_repack_resources") {
     "$root_gen_dir/net/net_resources.pak",
     "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
     "$root_gen_dir/ui/webui/resources/webui_resources.pak",
+    "$root_gen_dir/components/user_actions_ui_resources.pak",
   ]
   if (!is_debug) {
     output = "$root_out_dir/qtwebengine_resources.pak"
@@ -641,6 +643,7 @@ repack("qtwebengine_repack_resources") {
      "//components/resources:components_resources_grit",
      "//components/resources:dev_ui_components_resources_grit",
      "//components/ukm/debug:resources",
+     "//components/webui/user_actions/resources",
      "//content/browser/resources/attribution_reporting:resources",
      "//content/browser/resources/gpu:resources",
      "//content/browser/resources/histograms:resources_grit",
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index e85143d51d5..8486f903817 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -224,7 +224,7 @@ std::unique_ptr<content::BrowserMainParts> ContentBrowserClientQt::CreateBrowser
 
 void ContentBrowserClientQt::RenderProcessWillLaunch(content::RenderProcessHost *host)
 {
-    const int id = host->GetID();
+    const int id = host->GetDeprecatedID();
     Profile *profile = Profile::FromBrowserContext(host->GetBrowserContext());
 
 #if QT_CONFIG(webengine_spellchecker)
@@ -256,8 +256,11 @@ content::MediaObserver *ContentBrowserClientQt::GetMediaObserver()
     return MediaCaptureDevicesDispatcher::GetInstance();
 }
 
-void ContentBrowserClientQt::OverrideWebkitPrefs(content::WebContents *webContents, blink::web_pref::WebPreferences *web_prefs)
+void ContentBrowserClientQt::OverrideWebPreferences(content::WebContents *webContents,
+                                                    content::SiteInstance &mainFrameSite,
+                                                    blink::web_pref::WebPreferences *webPrefs)
 {
+    Q_UNUSED(mainFrameSite);
 #if BUILDFLAG(ENABLE_EXTENSIONS)
     if (guest_view::GuestViewBase::IsGuest(webContents))
         return;
@@ -268,7 +271,7 @@ void ContentBrowserClientQt::OverrideWebkitPrefs(content::WebContents *webConten
 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
     WebContentsDelegateQt* delegate = static_cast<WebContentsDelegateQt*>(webContents->GetDelegate());
     if (delegate)
-        delegate->overrideWebPreferences(webContents, web_prefs);
+        delegate->overrideWebPreferences(webContents, webPrefs);
 }
 
 void ContentBrowserClientQt::AllowCertificateError(content::WebContents *webContents,
@@ -391,7 +394,7 @@ void ContentBrowserClientQt::BindHostReceiverForRenderer(content::RenderProcessH
 {
 #if QT_CONFIG(webengine_spellchecker)
     if (auto host_receiver = receiver.As<spellcheck::mojom::SpellCheckInitializationHost>()) {
-        SpellCheckInitializationHostImpl::Create(render_process_host->GetID(),
+        SpellCheckInitializationHostImpl::Create(render_process_host->GetDeprecatedID(),
                                                  std::move(host_receiver));
         return;
     }
@@ -449,7 +452,7 @@ void ContentBrowserClientQt::RegisterBrowserInterfaceBindersForFrame(
     map->Add<spellcheck::mojom::SpellCheckHost>(base::BindRepeating(
             [](content::RenderFrameHost *frame_host,
                mojo::PendingReceiver<spellcheck::mojom::SpellCheckHost> receiver) {
-                SpellCheckHostChromeImpl::Create(frame_host->GetProcess()->GetID(),
+                SpellCheckHostChromeImpl::Create(frame_host->GetProcess()->GetDeprecatedID(),
                                                  std::move(receiver));
             }));
 #endif
@@ -487,7 +490,7 @@ void ContentBrowserClientQt::ExposeInterfacesToRenderer(service_manager::BinderR
     }
 #if BUILDFLAG(ENABLE_EXTENSIONS)
     associated_registry->AddInterface<extensions::mojom::EventRouter>(base::BindRepeating(
-            &extensions::EventRouter::BindForRenderer, render_process_host->GetID()));
+            &extensions::EventRouter::BindForRenderer, render_process_host->GetDeprecatedID()));
 #else
     Q_UNUSED(associated_registry);
 #endif
@@ -840,22 +843,25 @@ WebContentsAdapterClient::NavigationType pageTransitionToNavigationType(ui::Page
     }
 }
 
-static bool navigationThrottleCallback(content::NavigationHandle *handle)
+static void navigationThrottleCallback(content::NavigationHandle *handle,
+                                       bool should_run_async,
+                                       navigation_interception::InterceptNavigationThrottle::ResultCallback result_callback)
 {
+    Q_ASSERT(!should_run_async);
     // We call navigationRequested later in launchExternalUrl for external protocols.
     // The is_external_protocol parameter here is not fully accurate though,
     // and doesn't know about profile specific custom URL schemes.
     content::WebContents *source = handle->GetWebContents();
     ProfileQt *profile = static_cast<ProfileQt *>(source->GetBrowserContext());
     if (handle->IsExternalProtocol() && !profile->profileAdapter()->urlSchemeHandler(toQByteArray(handle->GetURL().scheme())))
-        return false;
+        return std::move(result_callback).Run(false);
 
     bool navigationAccepted = true;
 
     WebContentsAdapterClient *client =
         WebContentsViewQt::from(static_cast<content::WebContentsImpl *>(source)->GetView())->client();
     if (!client)
-        return false;
+        return std::move(result_callback).Run(false);
 
     // Redirects might not be reflected in transition_type at this point (see also chrome/.../web_navigation_api_helpers.cc)
     auto transition_type = handle->GetPageTransition();
@@ -867,7 +873,7 @@ static bool navigationThrottleCallback(content::NavigationHandle *handle)
                                 navigationAccepted,
                                 handle->IsInPrimaryMainFrame(),
                                 handle->IsFormSubmission());
-    return !navigationAccepted;
+    std::move(result_callback).Run(!navigationAccepted);
 }
 
 std::vector<std::unique_ptr<content::NavigationThrottle>> ContentBrowserClientQt::CreateThrottlesForNavigation(
@@ -877,7 +883,8 @@ std::vector<std::unique_ptr<content::NavigationThrottle>> ContentBrowserClientQt
     throttles.push_back(std::make_unique<navigation_interception::InterceptNavigationThrottle>(
                             navigation_handle,
                             base::BindRepeating(&navigationThrottleCallback),
-                            navigation_interception::SynchronyMode::kSync));
+                            navigation_interception::SynchronyMode::kSync,
+                            std::nullopt /* async callback */));
 
 #if BUILDFLAG(ENABLE_PDF) && BUILDFLAG(ENABLE_EXTENSIONS)
     MaybeAddThrottle(
@@ -927,6 +934,7 @@ std::unique_ptr<content::LoginDelegate> ContentBrowserClientQt::CreateLoginDeleg
         content::BrowserContext *browser_context, const content::GlobalRequestID & /*request_id*/,
         bool /*is_main_frame*/, bool /*is_request_for_navigation*/, const GURL &url,
         scoped_refptr<net::HttpResponseHeaders> /*response_headers*/, bool first_auth_attempt,
+        content::GuestPageHolder * /*guest_page_holder*/,
         LoginAuthRequiredCallback auth_required_callback)
 {
     auto loginDelegate = std::make_unique<LoginDelegateQt>(authInfo, web_contents, url, first_auth_attempt, std::move(auth_required_callback));
@@ -1381,7 +1389,7 @@ void ContentBrowserClientQt::SiteInstanceGotProcessAndSite(content::SiteInstance
         return;
 
     extensions::ProcessMap *processMap = extensions::ProcessMap::Get(context);
-    processMap->Insert(extension->id(), site_instance->GetProcess()->GetID());
+    processMap->Insert(extension->id(), site_instance->GetProcess()->GetDeprecatedID());
 #endif
 }
 
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index 93358d545b3..a6d0649cda1 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -34,8 +34,9 @@ class ContentBrowserClientQt : public content::ContentBrowserClient
     std::unique_ptr<content::BrowserMainParts> CreateBrowserMainParts(bool is_integration_test) override;
     void RenderProcessWillLaunch(content::RenderProcessHost *host) override;
     content::MediaObserver* GetMediaObserver() override;
-    void OverrideWebkitPrefs(content::WebContents *web_contents,
-                             blink::web_pref::WebPreferences *prefs) override;
+    void OverrideWebPreferences(content::WebContents *,
+                                content::SiteInstance &,
+                                blink::web_pref::WebPreferences *) override;
     void AllowCertificateError(content::WebContents *web_contents,
                                int cert_error,
                                const net::SSLInfo &ssl_info,
@@ -159,6 +160,7 @@ class ContentBrowserClientQt : public content::ContentBrowserClient
                         bool is_request_for_navigation,
                         const GURL &url, scoped_refptr<net::HttpResponseHeaders> response_headers,
                         bool first_auth_attempt,
+                        content::GuestPageHolder *guest_page_holder,
                         LoginAuthRequiredCallback auth_required_callback) override;
 
     bool HandleExternalProtocol(
diff --git a/src/core/custom_handlers/protocol_handler_registry_factory.cpp b/src/core/custom_handlers/protocol_handler_registry_factory.cpp
index 50b17006ba8..efd5cb40663 100644
--- a/src/core/custom_handlers/protocol_handler_registry_factory.cpp
+++ b/src/core/custom_handlers/protocol_handler_registry_factory.cpp
@@ -60,11 +60,10 @@ bool ProtocolHandlerRegistryFactory::ServiceIsNULLWhileTesting() const
     return true;
 }
 
-KeyedService *ProtocolHandlerRegistryFactory::BuildServiceInstanceFor(content::BrowserContext *context) const
+std::unique_ptr<KeyedService> ProtocolHandlerRegistryFactory::BuildServiceInstanceForBrowserContext(content::BrowserContext *profile) const
 {
-    custom_handlers::ProtocolHandlerRegistry *registry =
-        new custom_handlers::ProtocolHandlerRegistry(/*prefs*/ nullptr,
-                                                     std::make_unique<ProtocolHandlerRegistryDelegateQt>());
+    auto registry = std::make_unique<custom_handlers::ProtocolHandlerRegistry>(/*prefs*/ nullptr,
+                                                                               std::make_unique<ProtocolHandlerRegistryDelegateQt>());
 
     // Must be called as a part of the creation process.
     registry->InitProtocolSettings();
diff --git a/src/core/custom_handlers/protocol_handler_registry_factory.h b/src/core/custom_handlers/protocol_handler_registry_factory.h
index 6559addc064..aa9bea3a610 100644
--- a/src/core/custom_handlers/protocol_handler_registry_factory.h
+++ b/src/core/custom_handlers/protocol_handler_registry_factory.h
@@ -49,7 +49,7 @@ class ProtocolHandlerRegistryFactory : public BrowserContextKeyedServiceFactory
     ~ProtocolHandlerRegistryFactory() override;
 
     // BrowserContextKeyedServiceFactory implementation.
-    KeyedService *BuildServiceInstanceFor(content::BrowserContext *profile) const override;
+    std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(content::BrowserContext *profile) const override;
 };
 
 } // namespace QtWebEngineCore
diff --git a/src/core/extensions/extension_host_delegate_qt.cpp b/src/core/extensions/extension_host_delegate_qt.cpp
index b460cd6ce91..9ffe5f766bd 100644
--- a/src/core/extensions/extension_host_delegate_qt.cpp
+++ b/src/core/extensions/extension_host_delegate_qt.cpp
@@ -34,11 +34,6 @@ void ExtensionHostDelegateQt::OnMainFrameCreatedForBackgroundPage(ExtensionHost
     Q_UNUSED(host);
 }
 
-content::JavaScriptDialogManager *ExtensionHostDelegateQt::GetJavaScriptDialogManager()
-{
-    Q_UNREACHABLE_RETURN(nullptr);
-}
-
 void ExtensionHostDelegateQt::CreateTab(std::unique_ptr<content::WebContents> web_contents,
                                         const std::string &extension_id,
                                         WindowOpenDisposition disposition,
diff --git a/src/core/extensions/extension_host_delegate_qt.h b/src/core/extensions/extension_host_delegate_qt.h
index 38b5d4a2fd1..d209dd0789f 100644
--- a/src/core/extensions/extension_host_delegate_qt.h
+++ b/src/core/extensions/extension_host_delegate_qt.h
@@ -16,7 +16,6 @@ class ExtensionHostDelegateQt : public ExtensionHostDelegate
     // EtensionHostDelegate implementation.
     void OnExtensionHostCreated(content::WebContents *web_contents) override;
     void OnMainFrameCreatedForBackgroundPage(ExtensionHost *host) override;
-    content::JavaScriptDialogManager *GetJavaScriptDialogManager() override;
     void CreateTab(std::unique_ptr<content::WebContents> web_contents,
                    const std::string &extension_id,
                    WindowOpenDisposition disposition,
diff --git a/src/core/extensions/extension_loader.h b/src/core/extensions/extension_loader.h
index 32de4f9aa83..e1207dd3b47 100644
--- a/src/core/extensions/extension_loader.h
+++ b/src/core/extensions/extension_loader.h
@@ -59,15 +59,22 @@ class ExtensionLoader : public extensions::ExtensionRegistrar::Delegate
 
     // ExtensionRegistrar::Delegate:
     void PreAddExtension(const extensions::Extension *extension,
-                         const extensions::Extension *old_extension) override { };
-    void PostActivateExtension(scoped_refptr<const extensions::Extension> extension) override { };
-    void PostDeactivateExtension(scoped_refptr<const extensions::Extension> extension) override { };
-    void LoadExtensionForReload(
-            const extensions::ExtensionId &extension_id, const base::FilePath &path,
-            extensions::ExtensionRegistrar::LoadErrorBehavior load_error_behavior) override { };
-    bool CanEnableExtension(const extensions::Extension *extension) override { return true; };
-    bool CanDisableExtension(const extensions::Extension *extension) override { return true; };
-    bool ShouldBlockExtension(const extensions::Extension *extension) override { return false; };
+                         const extensions::Extension *old_extension) override { }
+    void PostActivateExtension(scoped_refptr<const extensions::Extension> extension) override { }
+    void PostDeactivateExtension(scoped_refptr<const extensions::Extension> extension) override { }
+    void PreUninstallExtension(scoped_refptr<const extensions::Extension> extension) override { }
+    void PostUninstallExtension(scoped_refptr<const extensions::Extension> extension, base::OnceClosure done_callback) override
+    { std::move(done_callback).Run(); }
+    void PostNotifyUninstallExtension(scoped_refptr<const extensions::Extension> extension) override { }
+    void LoadExtensionForReload(const extensions::ExtensionId &extension_id,
+                                const base::FilePath &path,
+                                extensions::ExtensionRegistrar::LoadErrorBehavior load_error_behavior) override { }
+    void ShowExtensionDisabledError(const extensions::Extension *extension, bool is_remote_install) override { }
+    void FinishDelayedInstallationsIfAny() override { }
+    bool CanAddExtension(const extensions::Extension *extension) override { return true; }
+    bool CanEnableExtension(const extensions::Extension *extension) override { return true; }
+    bool CanDisableExtension(const extensions::Extension *extension) override { return true; }
+    bool ShouldBlockExtension(const extensions::Extension *extension) override { return false; }
 
     raw_ptr<content::BrowserContext> m_browserContext;
     extensions::ExtensionRegistrar m_extensionRegistrar;
diff --git a/src/core/extensions/extension_system_factory_qt.cpp b/src/core/extensions/extension_system_factory_qt.cpp
index fe6d1df6ceb..2db892e9ea1 100644
--- a/src/core/extensions/extension_system_factory_qt.cpp
+++ b/src/core/extensions/extension_system_factory_qt.cpp
@@ -43,9 +43,9 @@ ExtensionSystemFactoryQt::~ExtensionSystemFactoryQt()
 {
 }
 
-KeyedService *ExtensionSystemFactoryQt::BuildServiceInstanceFor(content::BrowserContext *context) const
+std::unique_ptr<KeyedService> ExtensionSystemFactoryQt::BuildServiceInstanceForBrowserContext(content::BrowserContext *context) const
 {
-    return new ExtensionSystemQt(context);
+    return std::make_unique<ExtensionSystemQt>(context);
 }
 
 content::BrowserContext *ExtensionSystemFactoryQt::GetBrowserContextToUse(content::BrowserContext *context) const
diff --git a/src/core/extensions/extension_system_factory_qt.h b/src/core/extensions/extension_system_factory_qt.h
index b6f6acc5dde..ddd5d6c4f21 100644
--- a/src/core/extensions/extension_system_factory_qt.h
+++ b/src/core/extensions/extension_system_factory_qt.h
@@ -33,7 +33,7 @@ class ExtensionSystemFactoryQt : public ExtensionSystemProvider
     ~ExtensionSystemFactoryQt() override;
 
     // BrowserContextKeyedServiceFactory implementation:
-    KeyedService *BuildServiceInstanceFor(content::BrowserContext *context) const override;
+    std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(content::BrowserContext *context) const override;
     content::BrowserContext *GetBrowserContextToUse(content::BrowserContext *context) const override;
     bool ServiceIsCreatedWithBrowserContext() const override;
 };
diff --git a/src/core/extensions/extension_web_contents_observer_qt.cpp b/src/core/extensions/extension_web_contents_observer_qt.cpp
index a33954a20dc..2fd75d91e31 100644
--- a/src/core/extensions/extension_web_contents_observer_qt.cpp
+++ b/src/core/extensions/extension_web_contents_observer_qt.cpp
@@ -48,7 +48,7 @@ void ExtensionWebContentsObserverQt::RenderFrameCreated(content::RenderFrameHost
     if (!extension)
         return;
 
-    int process_id = render_frame_host->GetProcess()->GetID();
+    const int process_id = render_frame_host->GetProcess()->GetDeprecatedID();
     auto *policy = content::ChildProcessSecurityPolicy::GetInstance();
 
     if (extension->is_extension() && Manifest::IsComponentLocation(extension->location()))
diff --git a/src/core/extensions/extensions_browser_client_qt.cpp b/src/core/extensions/extensions_browser_client_qt.cpp
index 099843c527c..8653a7700a5 100644
--- a/src/core/extensions/extensions_browser_client_qt.cpp
+++ b/src/core/extensions/extensions_browser_client_qt.cpp
@@ -114,8 +114,6 @@ class ResourceBundleFileLoader : public network::mojom::URLLoader
     // Current implementation reads all resource data at start of resource
     // load, so priority, and pausing is not currently implemented.
     void SetPriority(net::RequestPriority priority, int32_t intra_priority_value) override {}
-    void PauseReadingBodyFromNet() override {}
-    void ResumeReadingBodyFromNet() override {}
 
 private:
     ResourceBundleFileLoader(scoped_refptr<net::HttpResponseHeaders> headers)
@@ -496,11 +494,6 @@ bool ExtensionsBrowserClientQt::IsMinBrowserVersionSupported(const std::string &
     return true;
 }
 
-bool ExtensionsBrowserClientQt::IsLockScreenContext(content::BrowserContext *context)
-{
-    return false;
-}
-
 // Returns the locale used by the application.
 std::string ExtensionsBrowserClientQt::GetApplicationLocale()
 {
diff --git a/src/core/extensions/extensions_browser_client_qt.h b/src/core/extensions/extensions_browser_client_qt.h
index 9aaf56d0c2f..456a502a2f5 100644
--- a/src/core/extensions/extensions_browser_client_qt.h
+++ b/src/core/extensions/extensions_browser_client_qt.h
@@ -77,9 +77,6 @@ class ExtensionsBrowserClientQt : public ExtensionsBrowserClient
     ExtensionWebContentsObserver *GetExtensionWebContentsObserver(content::WebContents *web_contents) override;
     KioskDelegate *GetKioskDelegate() override;
 
-    // Whether the browser context is associated with Chrome OS lock screen.
-    bool IsLockScreenContext(content::BrowserContext *context) override;
-
     bool IsAppModeForcedForApp(const ExtensionId &id) override;
     bool IsInDemoMode() override;
 
diff --git a/src/core/extensions/pdf_iframe_navigation_throttle_qt.cpp b/src/core/extensions/pdf_iframe_navigation_throttle_qt.cpp
index 7fe4324ccbd..be05cbed1f5 100644
--- a/src/core/extensions/pdf_iframe_navigation_throttle_qt.cpp
+++ b/src/core/extensions/pdf_iframe_navigation_throttle_qt.cpp
@@ -68,7 +68,7 @@ bool IsPDFPluginEnabled(content::NavigationHandle *navigation_handle, bool *is_s
     if (web_contents->IsInnerWebContentsForGuest())
         web_contents = web_contents->GetOuterWebContents();
 
-    int process_id = web_contents->GetPrimaryMainFrame()->GetProcess()->GetID();
+    int process_id = web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID();
     int routing_id = web_contents->GetPrimaryMainFrame()->GetRoutingID();
     content::WebPluginInfo plugin_info;
     // Will check WebEngineSettings by PluginServiceFilterQt
diff --git a/src/core/extensions/webui/extensions_ui_qt.cpp b/src/core/extensions/webui/extensions_ui_qt.cpp
index d72be5164bf..c323f71690e 100644
--- a/src/core/extensions/webui/extensions_ui_qt.cpp
+++ b/src/core/extensions/webui/extensions_ui_qt.cpp
@@ -3,13 +3,14 @@
 
 #include "extensions_ui_qt.h"
 
+#include "base/containers/span.h"
 #include "chrome/common/url_constants.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_ui_data_source.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/webui/webui_util.h"
 #include "qtwebengine/browser/extensions/resources/grit/extensions_ui_qt_resources.h"
 #include "qtwebengine/browser/extensions/resources/grit/extensions_ui_qt_resources_map.h"
+#include "ui/webui/webui_util.h"
 
 #include "extensions_ui_page_handler_qt.h"
 
@@ -19,7 +20,7 @@ ExtensionsUIQt::ExtensionsUIQt(content::WebUI *web_ui) : ui::MojoWebUIController
             web_ui->GetWebContents()->GetBrowserContext(), chrome::kChromeUIExtensionsHost);
 
     webui::SetupWebUIDataSource(
-            source, base::make_span(kExtensionsUiQtResources, kExtensionsUiQtResourcesSize),
+            source, base::span(kExtensionsUiQtResources, kExtensionsUiQtResourcesSize),
             IDR_EXTENSIONS_UI_QT_EXTENSIONS_UI_QT_HTML);
 
     source->OverrideContentSecurityPolicy(network::mojom::CSPDirectiveName::TrustedTypes,
diff --git a/src/core/favicon_service_factory_qt.cpp b/src/core/favicon_service_factory_qt.cpp
index c60ed885fb8..e94f6cf4aa6 100644
--- a/src/core/favicon_service_factory_qt.cpp
+++ b/src/core/favicon_service_factory_qt.cpp
@@ -88,8 +88,7 @@ HistoryServiceFactoryQt::GetBrowserContextToUse(content::BrowserContext *context
     return context;
 }
 
-KeyedService *
-HistoryServiceFactoryQt::BuildServiceInstanceFor(content::BrowserContext *context) const
+std::unique_ptr<KeyedService> HistoryServiceFactoryQt::BuildServiceInstanceForBrowserContext(content::BrowserContext *context) const
 {
     Q_ASSERT(!context->IsOffTheRecord());
 
@@ -98,7 +97,7 @@ HistoryServiceFactoryQt::BuildServiceInstanceFor(content::BrowserContext *contex
     if (!historyService->Init(history::HistoryDatabaseParamsForPath(context->GetPath(), version_info::Channel::DEFAULT))) {
         return nullptr;
     }
-    return historyService.release();
+    return historyService;
 }
 
 bool FaviconClientQt::IsNativeApplicationURL(const GURL &url)
@@ -164,12 +163,12 @@ FaviconServiceFactoryQt::GetBrowserContextToUse(content::BrowserContext *context
     return context;
 }
 
-KeyedService *
-FaviconServiceFactoryQt::BuildServiceInstanceFor(content::BrowserContext *context) const
+std::unique_ptr<KeyedService>
+FaviconServiceFactoryQt::BuildServiceInstanceForBrowserContext(content::BrowserContext *context) const
 {
     history::HistoryService *historyService = static_cast<history::HistoryService *>(
             HistoryServiceFactoryQt::GetInstance()->GetForBrowserContext(context));
-    return new favicon::FaviconServiceImpl(std::make_unique<FaviconClientQt>(), historyService);
+    return std::make_unique<favicon::FaviconServiceImpl>(std::make_unique<FaviconClientQt>(), historyService);
 }
 
 } // namespace QtWebEngineCore
diff --git a/src/core/favicon_service_factory_qt.h b/src/core/favicon_service_factory_qt.h
index b9667018c46..8ff54d6f4ef 100644
--- a/src/core/favicon_service_factory_qt.h
+++ b/src/core/favicon_service_factory_qt.h
@@ -70,7 +70,7 @@ class HistoryServiceFactoryQt : public BrowserContextKeyedServiceFactory
     // BrowserContextKeyedServiceFactory:
     content::BrowserContext *
     GetBrowserContextToUse(content::BrowserContext *context) const override;
-    KeyedService *BuildServiceInstanceFor(content::BrowserContext *context) const override;
+    std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(content::BrowserContext *context) const override;
 };
 
 class FaviconClientQt : public favicon::FaviconClient
@@ -105,7 +105,7 @@ class FaviconServiceFactoryQt : public BrowserContextKeyedServiceFactory
     // BrowserContextKeyedServiceFactory:
     content::BrowserContext *
     GetBrowserContextToUse(content::BrowserContext *context) const override;
-    KeyedService *BuildServiceInstanceFor(content::BrowserContext *context) const override;
+    std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(content::BrowserContext *context) const override;
 };
 
 } // namespace QtWebEngineCore
diff --git a/src/core/file_system_access/file_system_access_permission_context_factory_qt.cpp b/src/core/file_system_access/file_system_access_permission_context_factory_qt.cpp
index 6d1e8084afc..a4b0a472e32 100644
--- a/src/core/file_system_access/file_system_access_permission_context_factory_qt.cpp
+++ b/src/core/file_system_access/file_system_access_permission_context_factory_qt.cpp
@@ -5,6 +5,7 @@
 
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
 
+#include <memory>
 #include <QtGlobal>
 
 namespace QtWebEngineCore {
@@ -46,10 +47,9 @@ content::BrowserContext *FileSystemAccessPermissionContextFactoryQt::GetBrowserC
     return context;
 }
 
-KeyedService *FileSystemAccessPermissionContextFactoryQt::BuildServiceInstanceFor(
-        content::BrowserContext *context) const
+std::unique_ptr<KeyedService> FileSystemAccessPermissionContextFactoryQt::BuildServiceInstanceForBrowserContext(content::BrowserContext *context) const
 {
-    return new FileSystemAccessPermissionContextQt(context);
+    return std::make_unique<FileSystemAccessPermissionContextQt>(context);
 }
 
 } // namespace QtWebEngineCore
diff --git a/src/core/file_system_access/file_system_access_permission_context_factory_qt.h b/src/core/file_system_access/file_system_access_permission_context_factory_qt.h
index 8589a37132d..0d3585a8e7a 100644
--- a/src/core/file_system_access/file_system_access_permission_context_factory_qt.h
+++ b/src/core/file_system_access/file_system_access_permission_context_factory_qt.h
@@ -28,7 +28,7 @@ class FileSystemAccessPermissionContextFactoryQt : public BrowserContextKeyedSer
     // BrowserContextKeyedServiceFactory
     content::BrowserContext *
     GetBrowserContextToUse(content::BrowserContext *context) const override;
-    KeyedService *BuildServiceInstanceFor(content::BrowserContext *profile) const override;
+    std::unique_ptr<KeyedService> BuildServiceInstanceForBrowserContext(content::BrowserContext *context) const override;
 };
 
 } // namespace QtWebEngineCore
diff --git a/src/core/file_system_access/file_system_access_permission_context_qt.cpp b/src/core/file_system_access/file_system_access_permission_context_qt.cpp
index d6412416566..f6b160e79fa 100644
--- a/src/core/file_system_access/file_system_access_permission_context_qt.cpp
+++ b/src/core/file_system_access/file_system_access_permission_context_qt.cpp
@@ -478,6 +478,12 @@ base::expected<void, std::string> FileSystemAccessPermissionContextQt::CanShowFi
     return base::ok();
 }
 
+bool FileSystemAccessPermissionContextQt::IsFileTypeDangerous(const base::FilePath &path, const url::Origin &origin)
+{
+    // Matching AwFileSystemAccessPermissionContext::IsFileTypeDangerous()
+    return false;
+}
+
 void FileSystemAccessPermissionContextQt::CheckPathsAgainstEnterprisePolicy(
         std::vector<content::PathInfo> entries, content::GlobalRenderFrameHostId,
         EntriesAllowedByEnterprisePolicyCallback callback)
diff --git a/src/core/file_system_access/file_system_access_permission_context_qt.h b/src/core/file_system_access/file_system_access_permission_context_qt.h
index 8f84333561f..57f99fef93f 100644
--- a/src/core/file_system_access/file_system_access_permission_context_qt.h
+++ b/src/core/file_system_access/file_system_access_permission_context_qt.h
@@ -59,6 +59,7 @@ class FileSystemAccessPermissionContextQt : public content::FileSystemAccessPerm
                                            EntriesAllowedByEnterprisePolicyCallback) override;
 
     base::expected<void, std::string> CanShowFilePicker(content::RenderFrameHost*) override;
+    bool IsFileTypeDangerous(const base::FilePath &path, const url::Origin &origin) override;
 
     void NavigatedAwayFromOrigin(const url::Origin &origin);
     content::BrowserContext *profile() const { return m_profile; }
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp
index 56df02412bd..848a929863f 100644
--- a/src/core/media_capture_devices_dispatcher.cpp
+++ b/src/core/media_capture_devices_dispatcher.cpp
@@ -187,7 +187,7 @@ std::string DeviceNamePrefix(content::WebContents *web_contents,
     // dialog for DISPLAY_VIDEO_CAPTURE_THIS_TAB could still return something
     // other than the current tab - be it a screen, window, or another tab.
     if (media_id.type == content::DesktopMediaID::TYPE_WEB_CONTENTS &&
-            web_contents->GetPrimaryMainFrame()->GetProcess()->GetID() ==
+            web_contents->GetPrimaryMainFrame()->GetProcess()->GetDeprecatedID() ==
                 media_id.web_contents_id.render_process_id &&
             web_contents->GetPrimaryMainFrame()->GetRoutingID() ==
                 media_id.web_contents_id.main_render_frame_id) {
@@ -509,7 +509,7 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content::
     if (main_frame) {
         // Resolve DesktopMediaID for the specified device id.
         mediaId = content::DesktopStreamsRegistry::GetInstance()->RequestMediaForStreamId(
-                request.requested_video_device_ids.front(), main_frame->GetProcess()->GetID(),
+                request.requested_video_device_ids.front(), main_frame->GetProcess()->GetDeprecatedID(),
                 main_frame->GetRoutingID(), url::Origin::Create(request.security_origin),
                 content::kRegistryStreamTypeDesktop);
     }
diff --git a/src/core/net/client_cert_store_data.cpp b/src/core/net/client_cert_store_data.cpp
index 5f9c8243af9..357d7bacf2e 100644
--- a/src/core/net/client_cert_store_data.cpp
+++ b/src/core/net/client_cert_store_data.cpp
@@ -4,6 +4,7 @@
 #include "net/client_cert_store_data.h"
 
 #if QT_CONFIG(ssl)
+#include "base/containers/span.h"
 #include "net/base/net_errors.h"
 #include "net/cert/x509_certificate.h"
 #include "net/ssl/ssl_platform_key_util.h"
@@ -97,8 +98,8 @@ void ClientCertificateStoreData::add(const QSslCertificate &certificate, const Q
 
     Entry *data = new Entry;
     data->keyPtr = wrapOpenSSLPrivateKey(sslKeyInBytes);
-    data->certPtr = net::X509Certificate::CreateFromBytes(base::make_span((const unsigned char *)certInBytes.data(),
-                                                                          (unsigned long)certInBytes.length()));
+    data->certPtr = net::X509Certificate::CreateFromBytes(base::span<const unsigned char>((const unsigned char *)certInBytes.data(),
+                                                                                          (unsigned long)certInBytes.length()));
     data->key = privateKey;
     data->certificate = certificate;
     extraCerts.append(data);
diff --git a/src/core/net/custom_url_loader_factory.cpp b/src/core/net/custom_url_loader_factory.cpp
index eec3c5f7e1b..4b444480148 100644
--- a/src/core/net/custom_url_loader_factory.cpp
+++ b/src/core/net/custom_url_loader_factory.cpp
@@ -84,8 +84,6 @@ class CustomURLLoader : public network::mojom::URLLoader
         Start();
     }
     void SetPriority(net::RequestPriority priority, int32_t intra_priority_value) override { }
-    void PauseReadingBodyFromNet() override { }
-    void ResumeReadingBodyFromNet() override { }
 
 private:
     CustomURLLoader(const network::ResourceRequest &request,
diff --git a/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp b/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
index bd2714dcb5b..acf4872d048 100644
--- a/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
+++ b/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
@@ -150,7 +150,7 @@ void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse(const GURL
     size_t len = payload.size();
     CHECK_EQ(MOJO_RESULT_OK,
                 producer_handle->WriteData(
-                     base::make_span(reinterpret_cast<const uint8_t*>(payload.data()), len),
+                     base::span<const uint8_t>(reinterpret_cast<const uint8_t*>(payload.data()), len),
                      MOJO_WRITE_DATA_FLAG_ALL_OR_NONE, len));
 
     network::URLLoaderCompletionStatus status(net::OK);
diff --git a/src/core/net/proxying_restricted_cookie_manager_qt.cpp b/src/core/net/proxying_restricted_cookie_manager_qt.cpp
index b07e239f2f1..c4530614cce 100644
--- a/src/core/net/proxying_restricted_cookie_manager_qt.cpp
+++ b/src/core/net/proxying_restricted_cookie_manager_qt.cpp
@@ -69,6 +69,7 @@ void ProxyingRestrictedCookieManagerQt::GetAllForUrl(const GURL &url,
                                                      net::StorageAccessApiStatus storage_access_api_status,
                                                      network::mojom::CookieManagerGetOptionsPtr options,
                                                      bool is_ad_tagged,
+                                                     bool apply_devtools_overrides,
                                                      bool force_disable_third_party_cookies,
                                                      GetAllForUrlCallback callback)
 {
@@ -76,7 +77,8 @@ void ProxyingRestrictedCookieManagerQt::GetAllForUrl(const GURL &url,
 
     if (allowCookies(url, site_for_cookies)) {
         underlying_restricted_cookie_manager_->GetAllForUrl(url, site_for_cookies, top_frame_origin, storage_access_api_status,
-                                                            std::move(options), is_ad_tagged, force_disable_third_party_cookies, std::move(callback));
+                                                            std::move(options), is_ad_tagged, apply_devtools_overrides,
+                                                            force_disable_third_party_cookies, std::move(callback));
     } else {
         std::move(callback).Run(std::vector<net::CookieWithAccessResult>());
     }
@@ -88,13 +90,15 @@ void ProxyingRestrictedCookieManagerQt::SetCanonicalCookie(const net::CanonicalC
                                                            const url::Origin &top_frame_origin,
                                                            net::StorageAccessApiStatus storage_access_api_status,
                                                            net::CookieInclusionStatus status,
+                                                           bool apply_devtools_overrides,
                                                            SetCanonicalCookieCallback callback)
 {
     DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
 
     if (allowCookies(url, site_for_cookies)) {
         underlying_restricted_cookie_manager_->SetCanonicalCookie(cookie, url, site_for_cookies, top_frame_origin,
-                                                                  storage_access_api_status, status, std::move(callback));
+                                                                  storage_access_api_status, status,
+                                                                  apply_devtools_overrides, std::move(callback));
     } else {
         std::move(callback).Run(false);
     }
@@ -116,6 +120,7 @@ void ProxyingRestrictedCookieManagerQt::SetCookieFromString(const GURL &url,
                                                             const net::SiteForCookies &site_for_cookies,
                                                             const url::Origin &top_frame_origin,
                                                             net::StorageAccessApiStatus storage_access_api_status,
+                                                            bool apply_devtools_overrides,
                                                             const std::string &cookie,
                                                             SetCookieFromStringCallback callback)
 {
@@ -123,7 +128,7 @@ void ProxyingRestrictedCookieManagerQt::SetCookieFromString(const GURL &url,
 
     if (allowCookies(url, site_for_cookies)) {
         underlying_restricted_cookie_manager_->SetCookieFromString(url, site_for_cookies, top_frame_origin, storage_access_api_status,
-                                                                   cookie, std::move(callback));
+                                                                   apply_devtools_overrides, cookie, std::move(callback));
     } else {
         std::move(callback).Run();
     }
@@ -135,6 +140,7 @@ void ProxyingRestrictedCookieManagerQt::GetCookiesString(const GURL &url,
                                                          net::StorageAccessApiStatus storage_access_api_status,
                                                          bool get_version_shared_memory,
                                                          bool is_ad_tagged,
+                                                         bool apply_devtools_overrides,
                                                          bool force_disable_third_party_cookies,
                                                          GetCookiesStringCallback callback)
 {
@@ -143,7 +149,7 @@ void ProxyingRestrictedCookieManagerQt::GetCookiesString(const GURL &url,
     if (allowCookies(url, site_for_cookies)) {
         underlying_restricted_cookie_manager_->GetCookiesString(url, site_for_cookies, top_frame_origin,
                                                                 storage_access_api_status, get_version_shared_memory,
-                                                                is_ad_tagged, force_disable_third_party_cookies,
+                                                                is_ad_tagged, apply_devtools_overrides, force_disable_third_party_cookies,
                                                                 std::move(callback));
     } else {
         std::move(callback).Run(network::mojom::kInvalidCookieVersion, base::ReadOnlySharedMemoryRegion(), "");
@@ -154,6 +160,7 @@ void ProxyingRestrictedCookieManagerQt::CookiesEnabledFor(const GURL &url,
                                                           const net::SiteForCookies &site_for_cookies,
                                                           const url::Origin & /*top_frame_origin*/,
                                                           net::StorageAccessApiStatus /*storage_access_api_status*/,
+                                                          bool apply_devtools_overrides,
                                                           CookiesEnabledForCallback callback)
 {
     DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
diff --git a/src/core/net/proxying_restricted_cookie_manager_qt.h b/src/core/net/proxying_restricted_cookie_manager_qt.h
index 658a09d5d6d..214822d1265 100644
--- a/src/core/net/proxying_restricted_cookie_manager_qt.h
+++ b/src/core/net/proxying_restricted_cookie_manager_qt.h
@@ -30,6 +30,7 @@ class ProxyingRestrictedCookieManagerQt : public network::mojom::RestrictedCooki
                       net::StorageAccessApiStatus storage_access_api_status,
                       network::mojom::CookieManagerGetOptionsPtr options,
                       bool is_ad_tagged,
+                      bool apply_devtools_overrides,
                       bool force_disable_third_party_cookies,
                       GetAllForUrlCallback callback) override;
 
@@ -39,6 +40,7 @@ class ProxyingRestrictedCookieManagerQt : public network::mojom::RestrictedCooki
                             const url::Origin &top_frame_origin,
                             net::StorageAccessApiStatus storage_access_api_status,
                             net::CookieInclusionStatus status,
+                            bool apply_devtools_overrides,
                             SetCanonicalCookieCallback callback) override;
     void AddChangeListener(const GURL &url,
                            const net::SiteForCookies &site_for_cookies,
@@ -50,6 +52,7 @@ class ProxyingRestrictedCookieManagerQt : public network::mojom::RestrictedCooki
                              const net::SiteForCookies &site_for_cookies,
                              const url::Origin &top_frame_origin,
                              net::StorageAccessApiStatus storage_access_api_status,
+                             bool apply_devtools_overrides,
                              const std::string &cookie,
                              SetCookieFromStringCallback callback) override;
     void GetCookiesString(const GURL &url,
@@ -58,12 +61,14 @@ class ProxyingRestrictedCookieManagerQt : public network::mojom::RestrictedCooki
                           net::StorageAccessApiStatus storage_access_api_status,
                           bool get_version_shared_memory,
                           bool is_ad_tagged,
+                          bool apply_devtools_overrides,
                           bool force_disable_third_party_cookies,
                           GetCookiesStringCallback callback) override;
     void CookiesEnabledFor(const GURL &url,
                            const net::SiteForCookies &site_for_cookies,
                            const url::Origin &top_frame_origin,
                            net::StorageAccessApiStatus storage_access_api_status,
+                           bool apply_devtools_overrides,
                            CookiesEnabledForCallback callback) override;
 
     // Internal:
diff --git a/src/core/net/proxying_url_loader_factory_qt.cpp b/src/core/net/proxying_url_loader_factory_qt.cpp
index 67b40f7dbcc..6b78b71f764 100644
--- a/src/core/net/proxying_url_loader_factory_qt.cpp
+++ b/src/core/net/proxying_url_loader_factory_qt.cpp
@@ -126,8 +126,6 @@ class InterceptedRequest : public network::mojom::URLLoader
                         const net::HttpRequestHeaders &modified_cors_exempt_headers,
                         const std::optional<GURL> &new_url) override;
     void SetPriority(net::RequestPriority priority, int32_t intra_priority_value) override;
-    void PauseReadingBodyFromNet() override;
-    void ResumeReadingBodyFromNet() override;
 
 private:
     void InterceptOnUIThread();
@@ -298,7 +296,7 @@ void InterceptedRequest::Restart()
     if (!allow_local_ && local_access_) {
         // Check for specifically granted file access:
         if (auto *frame_tree = content::FrameTreeNode::GloballyFindByID(frame_tree_node_id_)) {
-            const int renderer_id = frame_tree->current_frame_host()->GetProcess()->GetID();
+            const int renderer_id = frame_tree->current_frame_host()->GetProcess()->GetDeprecatedID();
             base::FilePath file_path;
             if (net::FileURLToFilePath(request_.url, &file_path)) {
                 if (content::ChildProcessSecurityPolicy::GetInstance()->CanReadFile(renderer_id, file_path))
@@ -482,18 +480,6 @@ void InterceptedRequest::SetPriority(net::RequestPriority priority, int32_t intr
         target_loader_->SetPriority(priority, intra_priority_value);
 }
 
-void InterceptedRequest::PauseReadingBodyFromNet()
-{
-    if (target_loader_)
-        target_loader_->PauseReadingBodyFromNet();
-}
-
-void InterceptedRequest::ResumeReadingBodyFromNet()
-{
-    if (target_loader_)
-        target_loader_->ResumeReadingBodyFromNet();
-}
-
 void InterceptedRequest::OnURLLoaderClientError()
 {
     // We set |wait_for_loader_error| to true because if the loader did have a
diff --git a/src/core/net/resource_request_body_qt.cpp b/src/core/net/resource_request_body_qt.cpp
index a82d01aae85..bc2e93ca6ee 100644
--- a/src/core/net/resource_request_body_qt.cpp
+++ b/src/core/net/resource_request_body_qt.cpp
@@ -157,7 +157,7 @@ void ResourceRequestBody::readDataElementPipe(
     MojoResult result;
     do {
         size_t bytesToRead = 1;
-        base::span<uint8_t> buffer = base::make_span(reinterpret_cast<uint8_t*>(*data), reinterpret_cast<uint8_t*>(*data) + maxSize);
+        base::span<uint8_t> buffer(reinterpret_cast<uint8_t*>(*data), static_cast<size_t>(maxSize));
         result = consumerHandle->ReadData(MOJO_READ_DATA_FLAG_NONE, buffer, bytesToRead);
 
         if (result == MOJO_RESULT_OK) {
diff --git a/src/core/ozone/ozone_platform_qt.cpp b/src/core/ozone/ozone_platform_qt.cpp
index 417254f42d5..acea40c16ad 100644
--- a/src/core/ozone/ozone_platform_qt.cpp
+++ b/src/core/ozone/ozone_platform_qt.cpp
@@ -20,6 +20,7 @@
 #include "ui/ozone/public/input_controller.h"
 #include "ui/ozone/public/ozone_platform.h"
 #include "ui/ozone/public/platform_screen.h"
+#include "ui/ozone/public/stub_input_controller.h"
 #include "ui/ozone/public/system_input_injector.h"
 #include "ui/ozone/platform/wayland/gpu/wayland_gl_egl_utility.h"
 #include "ui/platform_window/platform_window_delegate.h"
@@ -225,7 +226,7 @@ bool OzonePlatformQt::InitializeUI(const ui::OzonePlatform::InitParams &)
     KeyboardLayoutEngineManager::SetKeyboardLayoutEngine(m_keyboardLayoutEngine.get());
 
     overlay_manager_.reset(new StubOverlayManager());
-    input_controller_ = CreateStubInputController();
+    input_controller_.reset(new StubInputController());
     cursor_factory_.reset(new BitmapCursorFactory());
     gpu_platform_support_host_.reset(ui::CreateStubGpuPlatformSupportHost());
     m_supportsNativePixmaps = QtWebEngineCore::SurfaceFactoryQt::SupportsNativePixmaps();
diff --git a/src/core/printing/pdf_document_helper_client_qt.cpp b/src/core/printing/pdf_document_helper_client_qt.cpp
index 66252d212a5..acf2ef7e055 100644
--- a/src/core/printing/pdf_document_helper_client_qt.cpp
+++ b/src/core/printing/pdf_document_helper_client_qt.cpp
@@ -20,6 +20,6 @@ void PDFDocumentHelperClientQt::SetPluginCanSave(content::RenderFrameHost *rende
 void PDFDocumentHelperClientQt::UpdateContentRestrictions(content::RenderFrameHost *, int)
 {
 }
-void PDFDocumentHelperClientQt::OnSearchifyStateChange(bool, content::WebContents *)
+void PDFDocumentHelperClientQt::OnSearchifyStarted(content::WebContents *)
 {
 }
diff --git a/src/core/printing/pdf_document_helper_client_qt.h b/src/core/printing/pdf_document_helper_client_qt.h
index 43a4726d36a..3c848dfe300 100644
--- a/src/core/printing/pdf_document_helper_client_qt.h
+++ b/src/core/printing/pdf_document_helper_client_qt.h
@@ -17,11 +17,10 @@ class PDFDocumentHelperClientQt : public pdf::PDFDocumentHelperClient // FIXME:
 
 private:
     // pdf::PDFDocumentHelperClient:
-    void OnPDFHasUnsupportedFeature(content::WebContents *contents) override {}
     void OnSaveURL(content::WebContents *contents) override {}
     void SetPluginCanSave(content::RenderFrameHost *render_frame_host, bool can_save) override;
     void UpdateContentRestrictions(content::RenderFrameHost *, int) override;
-    void OnSearchifyStateChange(bool, content::WebContents *) override;
+    void OnSearchifyStarted(content::WebContents *) override;
 };
 
 #endif // PDF_DOCUMENT_HELPER_CLIENT_QT_H
diff --git a/src/core/printing/print_view_manager_base_qt.cpp b/src/core/printing/print_view_manager_base_qt.cpp
index 742862a53ef..f36767aac26 100644
--- a/src/core/printing/print_view_manager_base_qt.cpp
+++ b/src/core/printing/print_view_manager_base_qt.cpp
@@ -281,7 +281,7 @@ void PrintViewManagerBaseQt::ScriptedPrint(printing::mojom::ScriptedPrintParamsP
 
     auto callback_wrapper = base::BindOnce(
         &PrintViewManagerBaseQt::ScriptedPrintReply, weak_ptr_factory_.GetWeakPtr(),
-        std::move(callback), render_process_host->GetID());
+        std::move(callback), render_process_host->GetDeprecatedID());
 
     std::unique_ptr<printing::PrinterQuery> printer_query =
          m_printerQueriesQueue->PopPrinterQuery(params->cookie);
@@ -585,7 +585,7 @@ void PrintViewManagerBaseQt::UpdatePrintSettings(base::Value::Dict job_settings,
                     std::move(job_settings),
                     base::BindOnce(&OnDidUpdatePrintSettings,
                                    m_printerQueriesQueue, std::move(printer_query), std::move(callback),
-                                   render_frame_host->GetProcess()->GetID(), render_frame_host->GetRoutingID()));
+                                   render_frame_host->GetProcess()->GetDeprecatedID(), render_frame_host->GetRoutingID()));
 }
 
 } // namespace QtWebEngineCore
diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp
index 30568a716fb..567403a7cf5 100644
--- a/src/core/profile_io_data_qt.cpp
+++ b/src/core/profile_io_data_qt.cpp
@@ -206,8 +206,7 @@ void ProfileIODataQt::ConfigureNetworkContextParams(bool in_memory,
     network_context_params->enable_referrers = true;
     // Encrypted cookies requires os_crypt, which currently has issues for us on Linux.
     network_context_params->enable_encrypted_cookies = false;
-    network_context_params->enable_zstd =
-            base::FeatureList::IsEnabled(net::features::kZstdContentEncoding);
+    network_context_params->enable_zstd = true;
 
     network_context_params->http_cache_enabled = m_httpCacheType != ProfileAdapter::NoCache;
     network_context_params->http_cache_max_size = m_httpCacheMaxSize;
diff --git a/src/core/profile_qt.cpp b/src/core/profile_qt.cpp
index b0069aac7ed..cbc2e86e67b 100644
--- a/src/core/profile_qt.cpp
+++ b/src/core/profile_qt.cpp
@@ -305,30 +305,16 @@ const PrefServiceAdapter &ProfileQt::prefServiceAdapter() const
 void ProfileQt::initUserAgentMetadata()
 {
     m_userAgentMetadata = embedder_support::GetUserAgentMetadata();
-    m_userAgentMetadata.brand_version_list.clear();
-    m_userAgentMetadata.brand_full_version_list.clear();
-
-    // Chromium version
-    m_userAgentMetadata.brand_version_list.emplace_back(
-            blink::UserAgentBrandVersion("Chromium", version_info::GetMajorVersionNumber()));
-    m_userAgentMetadata.brand_full_version_list.emplace_back(blink::UserAgentBrandVersion(
-            "Chromium", std::string(version_info::GetVersionNumber())));
-
     // We keep the brand lists identical throughout the lifetime of each major version of Chromium.
     int seed = version_info::GetMajorVersionNumberAsInt();
-    // Generate a greasey version
-    const std::vector<std::vector<int>> orders{ { 0, 1, 2 }, { 0, 2, 1 }, { 1, 0, 2 },
-                                                { 1, 2, 0 }, { 2, 0, 1 }, { 2, 1, 0 } };
-    const std::vector<int> order = orders[seed % 6];
-    m_userAgentMetadata.brand_version_list.emplace_back(
-            embedder_support::GetGreasedUserAgentBrandVersion(
-                    order, seed, std::nullopt, std::nullopt, true,
-                    blink::UserAgentBrandVersionType::kMajorVersion));
-
-    m_userAgentMetadata.brand_full_version_list.emplace_back(
-            embedder_support::GetGreasedUserAgentBrandVersion(
-                    order, seed, std::nullopt, std::nullopt, true,
-                    blink::UserAgentBrandVersionType::kFullVersion));
+    std::string version = version_info::GetMajorVersionNumber();
+    m_userAgentMetadata.brand_version_list =
+            embedder_support::GenerateBrandVersionList(seed, {}, version,
+                                                       blink::UserAgentBrandVersionType::kMajorVersion);
+    version = version_info::GetVersionNumber();
+    m_userAgentMetadata.brand_full_version_list =
+            embedder_support::GenerateBrandVersionList(seed, {}, version,
+                                                       blink::UserAgentBrandVersionType::kFullVersion);
 }
 
 const blink::UserAgentMetadata &ProfileQt::userAgentMetadata()
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 978f00675ed..3b7ba67dd4f 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -228,7 +228,8 @@ void RenderWidgetHostViewQt::setAdapterClient(WebContentsAdapterClient *adapterC
                                                             m_adapterClient = nullptr; });
 }
 
-void RenderWidgetHostViewQt::OnInputEventAck(blink::mojom::InputEventResultSource,
+void RenderWidgetHostViewQt::OnInputEventAck(const content::RenderWidgetHost &,
+                                             blink::mojom::InputEventResultSource,
                                              blink::mojom::InputEventResultState state,
                                              const blink::WebInputEvent &event)
 {
@@ -386,8 +387,6 @@ void RenderWidgetHostViewQt::UpdateBackgroundColor()
 
     m_delegate->setClearColor(toQt(color));
 
-    bool opaque = SkColorGetA(color) == SK_AlphaOPAQUE;
-    m_rootLayer->SetFillsBoundsOpaquely(opaque);
     m_rootLayer->SetColor(color);
     m_uiCompositor->SetBackgroundColor(color);
 
@@ -439,32 +438,8 @@ bool RenderWidgetHostViewQt::updateCursorFromResource(ui::mojom::CursorType type
     hotX = hotspot.x();
     hotY = hotspot.y();
 #elif defined(Q_OS_MACOS)
-    // See chromium/content/common/cursors/webcursor_mac.mm
-    switch (type) {
-    case ui::mojom::CursorType::kVerticalText:
-        // TODO: [NSCursor IBeamCursorForVerticalLayout]
-        return false;
-    case ui::mojom::CursorType::kCell:
-        resourceId = IDR_CELL_CURSOR;
-        hotX = 7;
-        hotY = 7;
-        break;
-    case ui::mojom::CursorType::kContextMenu:
-        // TODO: [NSCursor contextualMenuCursor]
-        return false;
-    case ui::mojom::CursorType::kZoomIn:
-        resourceId = IDR_ZOOMIN_CURSOR;
-        hotX = 7;
-        hotY = 7;
-        break;
-    case ui::mojom::CursorType::kZoomOut:
-        resourceId = IDR_ZOOMOUT_CURSOR;
-        hotX = 7;
-        hotY = 7;
-        break;
-    default:
-        Q_UNREACHABLE_RETURN(false);
-    }
+    // FIXME: find a way to reimplement
+    return false;
 #else
     Q_UNREACHABLE_RETURN(false);
 #endif
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index 64c19acdbb2..4a47b5c3415 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -153,8 +153,8 @@ class RenderWidgetHostViewQt
     void OnLocalSurfaceIdChanged(const cc::RenderFrameMetadata &) override {}
 
     // Overridden from content::RenderWidgetHost::InputEventObserver
-    void OnInputEvent(const blink::WebInputEvent &) override { }
-    void OnInputEventAck(blink::mojom::InputEventResultSource,
+    void OnInputEventAck(const content::RenderWidgetHost &,
+                         blink::mojom::InputEventResultSource,
                          blink::mojom::InputEventResultState state,
                          const blink::WebInputEvent &event) override;
 
diff --git a/src/core/render_widget_host_view_qt_delegate_item.cpp b/src/core/render_widget_host_view_qt_delegate_item.cpp
index e82dabb5fff..77adb843ceb 100644
--- a/src/core/render_widget_host_view_qt_delegate_item.cpp
+++ b/src/core/render_widget_host_view_qt_delegate_item.cpp
@@ -355,6 +355,8 @@ void RenderWidgetHostViewQtDelegateItem::itemChange(ItemChange change, const Ite
         if (value.boolValue) {
             m_client->notifyShown();
         } else {
+            if (!m_widgetDelegate)
+                return;
             m_client->notifyHidden();
             if (!m_isPopup)
                 onHide();
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index 0368ba3d813..2052ba8d709 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -45,8 +45,8 @@
 #if QT_CONFIG(webengine_printing_and_pdf)
 #include "renderer/print_web_view_helper_delegate_qt.h"
 
+#include "chrome/common/webui_url_constants.h"
 #include "components/pdf/renderer/internal_plugin_renderer_helpers.h"
-#include "components/pdf/renderer/pdf_internal_plugin_delegate.h"
 #include "components/printing/renderer/print_render_frame_helper.h"
 #endif
 
@@ -210,11 +210,6 @@ void ContentRendererClientQt::RenderFrameCreated(content::RenderFrame *render_fr
 
     new autofill::AutofillAgent(
             render_frame,
-            {
-              autofill::AutofillAgent::ExtractAllDatalists(false), autofill::AutofillAgent::FocusRequiresScroll(true),
-              autofill::AutofillAgent::QueryPasswordSuggestions(false), autofill::AutofillAgent::SecureContextRequired(false),
-              autofill::AutofillAgent::UserGestureRequired(true), autofill::AutofillAgent::UsesKeyboardAccessoryForSuggestions(false)
-            },
             std::move(password_autofill_agent), std::move(password_generation_agent),
             associated_interfaces);
 }
@@ -307,7 +302,11 @@ void ContentRendererClientQt::GetNavigationErrorStringsInternal(content::RenderF
                 error_page::LocalizedError::GetPageState(
                         error.reason(), error.domain(), error.url(), isPost, false,
                         error.stale_copy_in_cache(), false,
-                        RenderConfiguration::is_incognito_process(), false, false, false, locale, false, &error_page_params);
+                        RenderConfiguration::is_incognito_process(),
+                        false, false,
+                        locale,
+                        false,
+                        &error_page_params);
 
         resourceId = IDR_NET_ERROR_HTML;
 
@@ -348,15 +347,15 @@ bool IsPdfExtensionOrigin(const url::Origin &origin)
 
 #if BUILDFLAG(ENABLE_PLUGINS)
 void AppendParams(const std::vector<content::WebPluginMimeType::Param> &additional_params,
-                  blink::WebVector<blink::WebString> *existing_names,
-                  blink::WebVector<blink::WebString> *existing_values)
+                  std::vector<blink::WebString> *existing_names,
+                  std::vector<blink::WebString> *existing_values)
 {
     DCHECK(existing_names->size() == existing_values->size());
     size_t existing_size = existing_names->size();
     size_t total_size = existing_size + additional_params.size();
 
-    blink::WebVector<blink::WebString> names(total_size);
-    blink::WebVector<blink::WebString> values(total_size);
+    std::vector<blink::WebString> names(total_size);
+    std::vector<blink::WebString> values(total_size);
 
     for (size_t i = 0; i < existing_size; ++i) {
         names[i] = (*existing_names)[i];
@@ -374,23 +373,9 @@ void AppendParams(const std::vector<content::WebPluginMimeType::Param> &addition
 #endif  // BUILDFLAG(ENABLE_PLUGINS)
 
 #if QT_CONFIG(webengine_printing_and_pdf)
-// based on chrome/renderer/pdf/chrome_pdf_internal_plugin_delegate.cc:
-class PdfInternalPluginDelegateQt final
-    : public pdf::PdfInternalPluginDelegate
+std::vector<url::Origin> GetAdditionalPdfInternalPluginAllowedOrigins()
 {
-public:
-    PdfInternalPluginDelegateQt() = default;
-    PdfInternalPluginDelegateQt(const PdfInternalPluginDelegateQt &) = delete;
-    PdfInternalPluginDelegateQt& operator=(const PdfInternalPluginDelegateQt &) = delete;
-    ~PdfInternalPluginDelegateQt() override = default;
-
-    // `pdf::PdfInternalPluginDelegate`:
-    bool IsAllowedOrigin(const url::Origin &origin) const override;
-};
-
-bool PdfInternalPluginDelegateQt::IsAllowedOrigin(const url::Origin &origin) const
-{
-    return IsPdfExtensionOrigin(origin);
+    return {url::Origin::Create(GURL(chrome::kChromeUIPrintURL))};
 }
 #endif
 } // namespace
@@ -442,6 +427,7 @@ bool ContentRendererClientQt::OverrideCreatePlugin(content::RenderFrame *render_
         *plugin = LoadablePluginPlaceholderQt::CreateLoadableMissingPlugin(render_frame, params)->plugin();
         return true;
     }
+#if QT_CONFIG(webengine_printing_and_pdf)
     if (info.name == u"Chromium PDF Viewer") {
         blink::WebPluginParams new_params(params);
         for (const auto& mime_type : info.mime_types) {
@@ -452,9 +438,10 @@ bool ContentRendererClientQt::OverrideCreatePlugin(content::RenderFrame *render_
           }
         }
 
-        *plugin = pdf::CreateInternalPlugin(std::move(new_params), render_frame, std::make_unique<PdfInternalPluginDelegateQt>());
+        *plugin = pdf::CreateInternalPlugin(std::move(new_params), render_frame, GetAdditionalPdfInternalPluginAllowedOrigins());
         return true;
     }
+#endif
     *plugin = render_frame->CreatePlugin(info, params);
 #endif // BUILDFLAG(ENABLE_PLUGINS)
     return true;
diff --git a/src/core/renderer_host/web_channel_ipc_transport_host.cpp b/src/core/renderer_host/web_channel_ipc_transport_host.cpp
index 0cc24014fa5..d69d543de3e 100644
--- a/src/core/renderer_host/web_channel_ipc_transport_host.cpp
+++ b/src/core/renderer_host/web_channel_ipc_transport_host.cpp
@@ -22,7 +22,7 @@ Q_WEBENGINE_LOGGING_CATEGORY(log, "qt.webengine.webchanneltransport")
 
 inline QDebug operator<<(QDebug stream, content::RenderFrameHost *frame)
 {
-    return stream << "frame " << frame->GetRoutingID() << " in process " << frame->GetProcess()->GetID();
+    return stream << "frame " << frame->GetRoutingID() << " in process " << frame->GetProcess()->GetDeprecatedID();
 }
 
 WebChannelIPCTransportHost::WebChannelIPCTransportHost(content::WebContents *contents, uint worldId, QObject *parent)
diff --git a/src/core/touch_handle_drawable_qt.cpp b/src/core/touch_handle_drawable_qt.cpp
index 1e979fa03d7..9dded431b83 100644
--- a/src/core/touch_handle_drawable_qt.cpp
+++ b/src/core/touch_handle_drawable_qt.cpp
@@ -13,8 +13,10 @@
 #include "type_conversion.h"
 #include "web_contents_adapter_client.h"
 
+#include "ui/base/models/image_model.h"
 #include "ui/base/resource/resource_bundle.h"
 #include "ui/resources/grit/ui_resources.h"
+#include "ui/touch_selection/vector_icons/vector_icons.h"
 
 namespace QtWebEngineCore {
 
@@ -89,11 +91,12 @@ void TouchHandleDrawableQt::SetOrientation(ui::TouchHandleOrientation orientatio
     if (m_orientation == orientation)
         return;
     m_orientation = orientation;
-    gfx::Image* image = GetHandleImage(orientation);
+
+    ui::ImageModel imageModel = GetHandleVectorIcon(orientation);
     m_delegate->setImage(static_cast<int>(orientation));
 
     // Calculate the relative bounds.
-    gfx::Size image_size = image->Size();
+    gfx::Size image_size = imageModel.Size();
     int window_width = image_size.width() + 2 * kSelectionHandlePadding;
     int window_height = image_size.height() + 2 * kSelectionHandlePadding;
     m_relativeBounds =
@@ -142,25 +145,24 @@ float TouchHandleDrawableQt::GetDrawableHorizontalPaddingRatio() const
     return 0.0;
 }
 
-// Returns the appropriate handle image based on the handle orientation.
-gfx::Image *TouchHandleDrawableQt::GetHandleImage(ui::TouchHandleOrientation orientation)
-{
-    int resource_id = 0;
+// [static] Returns the appropriate handle vector icon based on the handle orientation.
+ui::ImageModel TouchHandleDrawableQt::GetHandleVectorIcon(ui::TouchHandleOrientation orientation) {
+    const gfx::VectorIcon* icon = nullptr;
     switch (orientation) {
     case ui::TouchHandleOrientation::LEFT:
-        resource_id = IDR_TEXT_SELECTION_HANDLE_LEFT;
+        icon = &ui::kTextSelectionHandleLeftIcon;
         break;
     case ui::TouchHandleOrientation::CENTER:
-        resource_id = IDR_TEXT_SELECTION_HANDLE_CENTER;
+        icon = &ui::kTextSelectionHandleCenterIcon;
         break;
     case ui::TouchHandleOrientation::RIGHT:
-        resource_id = IDR_TEXT_SELECTION_HANDLE_RIGHT;
+        icon = &ui::kTextSelectionHandleRightIcon;
         break;
     case ui::TouchHandleOrientation::UNDEFINED:
         NOTREACHED() << "Invalid touch handle bound type.";
-        return nullptr;
-    };
-    return &ui::ResourceBundle::GetSharedInstance().GetImageNamed(resource_id);
+    }
+    return ui::ImageModel::FromVectorIcon(*icon,
+                                          /*color_id=*/ui::kColorSysPrimary);
 }
 
 } // namespace QtWebEngineCore
diff --git a/src/core/touch_handle_drawable_qt.h b/src/core/touch_handle_drawable_qt.h
index 1738e68e980..f8ae4661bb7 100644
--- a/src/core/touch_handle_drawable_qt.h
+++ b/src/core/touch_handle_drawable_qt.h
@@ -6,7 +6,7 @@
 
 #include "ui/touch_selection/touch_handle.h"
 #include "ui/touch_selection/touch_handle_orientation.h"
-#include "ui/gfx/image/image.h"
+#include "ui/base/models/image_model.h"
 
 #include <QtCore/QScopedPointer>
 
@@ -19,7 +19,7 @@ class TouchHandleDrawableQt : public ui::TouchHandleDrawable
 public:
     explicit TouchHandleDrawableQt(TouchHandleDrawableDelegate *delegate);
     ~TouchHandleDrawableQt() override;
-    static gfx::Image *GetHandleImage(ui::TouchHandleOrientation orientation);
+    static ui::ImageModel GetHandleVectorIcon(ui::TouchHandleOrientation orientation);
 
 private:
     void UpdateBounds();
diff --git a/src/core/touch_selection_controller_client_qt.cpp b/src/core/touch_selection_controller_client_qt.cpp
index 804e943350e..3c365b98f36 100644
--- a/src/core/touch_selection_controller_client_qt.cpp
+++ b/src/core/touch_selection_controller_client_qt.cpp
@@ -13,6 +13,9 @@
 #include "content/browser/renderer_host/render_frame_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "ui/gfx/geometry/size_conversions.h"
+#include "ui/color/color_provider.h"
+#include "ui/color/color_provider_manager.h"
+#include "ui/native_theme/native_theme.h"
 
 #include <QClipboard>
 #include <QGuiApplication>
@@ -260,12 +263,16 @@ std::unique_ptr<ui::TouchHandleDrawable> TouchSelectionControllerClientQt::Creat
 {
     Q_ASSERT(m_rwhv);
     Q_ASSERT(m_rwhv->adapterClient());
+
+    auto color_provider = ui::ColorProviderManager::Get().GetColorProviderFor(
+            ui::NativeTheme::GetInstanceForNativeUi()->GetColorProviderKey(nullptr));
     QMap<int, QImage> images;
     for (int orientation = 0; orientation < static_cast<int>(ui::TouchHandleOrientation::UNDEFINED);
          ++orientation) {
-        gfx::Image *image = TouchHandleDrawableQt::GetHandleImage(
+        ui::ImageModel imageModel = TouchHandleDrawableQt::GetHandleVectorIcon(
                 static_cast<ui::TouchHandleOrientation>(orientation));
-        images.insert(orientation, toQImage(image->AsBitmap()));
+        gfx::ImageSkia image = imageModel.Rasterize(color_provider);
+        images.insert(orientation, toQImage(*image.bitmap()));
     }
     auto delegate = m_rwhv->adapterClient()->createTouchHandleDelegate(images);
     return std::unique_ptr<ui::TouchHandleDrawable>(new TouchHandleDrawableQt(delegate));
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 67f9362d1a9..8c4d01e58e3 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -33,7 +33,7 @@
 #include "base/task/sequence_manager/thread_controller_with_message_pump_impl.h"
 #include "base/values.h"
 #include "chrome/browser/tab_contents/form_interaction_tab_helper.h"
-#include "components/autofill/core/browser/autofill_manager.h"
+#include "components/autofill/core/browser/foundations/autofill_manager.h"
 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
 #include "components/embedder_support/user_agent_utils.h"
 #include "components/favicon/core/favicon_service.h"
@@ -535,13 +535,13 @@ void WebContentsAdapter::initializeRenderPrefs()
     base::CommandLine* commandLine = base::CommandLine::ForCurrentProcess();
     if (commandLine->HasSwitch(switches::kForceWebRtcIPHandlingPolicy))
         rendererPrefs->webrtc_ip_handling_policy =
-                commandLine->GetSwitchValueASCII(switches::kForceWebRtcIPHandlingPolicy);
+                blink::ToWebRTCIPHandlingPolicy(commandLine->GetSwitchValueASCII(switches::kForceWebRtcIPHandlingPolicy));
     else
         rendererPrefs->webrtc_ip_handling_policy =
                 m_adapterClient->webEngineSettings()->testAttribute(
                         QWebEngineSettings::WebRTCPublicInterfacesOnly)
-                ? blink::kWebRTCIPHandlingDefaultPublicInterfaceOnly
-                : blink::kWebRTCIPHandlingDefault;
+                ? blink::mojom::WebRtcIpHandlingPolicy::kDefaultPublicInterfaceOnly
+                : blink::mojom::WebRtcIpHandlingPolicy::kDefault;
 #endif
     rendererPrefs->can_accept_load_drops = m_adapterClient->webEngineSettings()->testAttribute(QWebEngineSettings::NavigateOnDropEnabled);
 
@@ -693,9 +693,11 @@ void WebContentsAdapter::load(const QWebEngineHttpRequest &request)
                         net::ERR_DISALLOWED_URL_SCHEME));
             return;
         }
-        params.post_data = network::ResourceRequestBody::CreateFromBytes(
-                    (const char*)request.postData().constData(),
-                    request.postData().length());
+        {
+            std::vector<uint8_t> data(request.postData().length());
+            memcpy(data.data(), request.postData().constData(), data.size());
+            params.post_data = network::ResourceRequestBody::CreateFromBytes(std::move(data));
+        }
         break;
     }
 
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 3f209c7e0c5..4100daa9d52 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -89,6 +89,8 @@ WebContentsDelegateQt::~WebContentsDelegateQt()
     // The destruction of this object should take place before
     // WebContents destruction since WebContentsAdapterClient
     // might be already deleted.
+
+    GetJavaScriptDialogManager(web_contents())->CancelDialogs(web_contents(), false);
 }
 
 content::WebContents *WebContentsDelegateQt::OpenURLFromTab(content::WebContents *source, const content::OpenURLParams &params,
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 939fc647c97..72fd4c3a885 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -1045,7 +1045,6 @@ WebEngineContext::WebEngineContext()
     }
     m_mainDelegate->PostEarlyInitialization({});
     content::StartBrowserThreadPool();
-    content::BrowserTaskExecutor::PostFeatureListSetup();
     tracing::InitTracingPostThreadPoolStartAndFeatureList(false);
     base::PowerMonitor::GetInstance()->Initialize(MakePowerMonitorDeviceSource());
     content::ProcessVisibilityTracker::GetInstance();
@@ -1243,7 +1242,7 @@ const char *qWebEngineChromiumVersion() noexcept
 
 const char *qWebEngineChromiumSecurityPatchVersion() noexcept
 {
-    return "137.0.7151.68"; // FIXME: Remember to update
+    return "134.0.6998.208"; // FIXME: Remember to update
 }
 
 QT_END_NAMESPACE
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index 4f5de0cc440..8d789c5bd3a 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -465,12 +465,14 @@ void WebEngineSettings::applySettingsToWebPreferences(blink::web_pref::WebPrefer
 bool WebEngineSettings::applySettingsToRendererPreferences(blink::RendererPreferences *prefs)
 {
     bool changed = false;
+    prefs->uses_platform_autofill = false;
 #if QT_CONFIG(webengine_webrtc)
     if (!base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kForceWebRtcIPHandlingPolicy)) {
-        std::string webrtc_ip_handling_policy =
-                testAttribute(QWebEngineSettings::WebRTCPublicInterfacesOnly)
-                ? blink::kWebRTCIPHandlingDefaultPublicInterfaceOnly
-                : blink::kWebRTCIPHandlingDefault;
+        auto webrtc_ip_handling_policy =
+                blink::ToWebRTCIPHandlingPolicy(
+                    testAttribute(QWebEngineSettings::WebRTCPublicInterfacesOnly)
+                    ? blink::kWebRTCIPHandlingDefaultPublicInterfaceOnly
+                    : blink::kWebRTCIPHandlingDefault);
         if (prefs->webrtc_ip_handling_policy != webrtc_ip_handling_policy) {
             prefs->webrtc_ip_handling_policy = webrtc_ip_handling_policy;
             changed = true;
diff --git a/src/pdf/CMakeLists.txt b/src/pdf/CMakeLists.txt
index 423d9883d97..a318051eaed 100644
--- a/src/pdf/CMakeLists.txt
+++ b/src/pdf/CMakeLists.txt
@@ -140,8 +140,9 @@ foreach(arch ${archs})
           v8_enable_webassembly=false
           use_v8_context_snapshot=false
           v8_use_external_startup_data=false
+          build_with_tflite_lib=false
           webnn_use_tflite=false
-  )
+        )
 
         if(LINUX OR ANDROID)
             list(APPEND gnArgArg
diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
index 888ed88655c..53fcc46285a 100644
--- a/src/webenginewidgets/api/qwebengineview.cpp
+++ b/src/webenginewidgets/api/qwebengineview.cpp
@@ -1705,7 +1705,6 @@ void QWebEngineViewPrivate::hideTouchSelectionMenu()
 void QWebEngineViewPrivate::showTouchSelectionMenu(
         QtWebEngineCore::TouchSelectionMenuController *controller, const QRect &selectionBounds)
 {
-    Q_ASSERT(m_touchSelectionMenu == nullptr);
     Q_Q(QWebEngineView);
 
     // Do not show outside of view
diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index 797696c9833..25c8df628c2 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -1045,19 +1045,6 @@ void tst_QQuickWebEngineView::changeLocale()
     QTRY_VERIFY(!evaluateJavaScriptSync(viewEN.data(), "document.body.innerText").isNull());
     errorLines = evaluateJavaScriptSync(viewEN.data(), "document.body.innerText").toString().split(QRegularExpression("[\r\n]"), Qt::SkipEmptyParts);
     QCOMPARE(errorLines.first().toUtf8(), QByteArrayLiteral("This site can\xE2\x80\x99t be reached"));
-
-    // Reset error page
-    viewDE->setUrl(QUrl("about:blank"));
-    QVERIFY(waitForLoadSucceeded(viewDE.data()));
-
-    // Check whether an existing QWebEngineView keeps the language settings after changing the default locale
-    viewDE->setUrl(url);
-    QVERIFY(waitForLoadFailed(viewDE.data()));
-
-    QTRY_VERIFY(!evaluateJavaScriptSync(viewDE.data(), "document.body").isNull());
-    QTRY_VERIFY(!evaluateJavaScriptSync(viewDE.data(), "document.body.innerText").isNull());
-    errorLines = evaluateJavaScriptSync(viewDE.data(), "document.body.innerText").toString().split(QRegularExpression("[\r\n]"), Qt::SkipEmptyParts);
-    QCOMPARE(errorLines.first().toUtf8(), QByteArrayLiteral("Die Website ist nicht erreichbar"));
 }
 
 void tst_QQuickWebEngineView::userScripts()
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index c9354a9bef5..b12a29f2bc7 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -286,7 +286,6 @@ private Q_SLOTS:
     void openLinkInNewPageWithWebWindowType_data();
     void openLinkInNewPageWithWebWindowType();
     void keepInterceptorAfterNewWindowRequested();
-    void chooseDesktopMedia();
     void backForwardCache();
 
 private:
@@ -5802,53 +5801,6 @@ void tst_QWebEnginePage::keepInterceptorAfterNewWindowRequested()
     QVERIFY(interceptor.ran);
 }
 
-void tst_QWebEnginePage::chooseDesktopMedia()
-{
-#if QT_CONFIG(webengine_extensions) && QT_CONFIG(webengine_webrtc)
-    HttpServer server;
-    server.setHostDomain("localhost");
-    connect(&server, &HttpServer::newRequest, &server, [&] (HttpReqRep *r) {
-        if (r->requestMethod() == "GET")
-                r->setResponseBody("<html></html>");
-    });
-    QVERIFY(server.start());
-
-    QWebEnginePage page;
-    QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
-    page.settings()->setAttribute(QWebEngineSettings::ScreenCaptureEnabled, true);
-    page.profile()->setPersistentPermissionsPolicy(QWebEngineProfile::PersistentPermissionsPolicy::AskEveryTime);
-
-    bool desktopMediaRequested = false;
-    bool emptyDesktopMediaRequested = false;
-    bool permissionRequested = false;
-
-    connect(&page, &QWebEnginePage::desktopMediaRequested,
-            [&](const QWebEngineDesktopMediaRequest &request) {
-                desktopMediaRequested = true;
-                emptyDesktopMediaRequested = request.screensModel()->rowCount() == 0;
-            });
-
-    connect(&page, &QWebEnginePage::permissionRequested,
-            [&](QWebEnginePermission permission) {
-                permissionRequested = true;
-                // Handle permission to 'complete' the media request
-                permission.grant();
-            });
-
-    page.load(QUrl(server.url()));
-    QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpy.size(), 1, 20000);
-
-    const QString extensionId("nkeimhogjdpnpccoofpliimaahmaaome");
-    page.runJavaScript(QString("(() => {"
-                               "  let port = chrome.runtime.connect(\"%1\", {name: \"chooseDesktopMedia\"});"
-                               "  port.postMessage({method: \"chooseDesktopMedia\"});"
-                               "})()").arg(extensionId));
-
-    QTRY_VERIFY(desktopMediaRequested);
-    QTRY_VERIFY(permissionRequested || emptyDesktopMediaRequested);
-#endif // QT_CONFIG(webengine_extensions) && QT_CONFIG(webengine_webrtc)
-}
-
 void tst_QWebEnginePage::backForwardCache()
 {
     QWebEngineView view;
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
index 7dc71dd922f..b1636f87eac 100644
--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
+++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
@@ -1367,19 +1367,6 @@ void tst_QWebEngineView::changeLocale()
     QTRY_VERIFY(!toPlainTextSync(viewEN.page()).isEmpty());
     errorLines = toPlainTextSync(viewEN.page()).split(QRegularExpression("[\r\n]"), Qt::SkipEmptyParts);
     QCOMPARE(errorLines.first().toUtf8(), QByteArrayLiteral("This site can\xE2\x80\x99t be reached"));
-
-    // Reset error page
-    viewDE.load(QUrl("about:blank"));
-    QVERIFY(loadFinishedSpyDE.wait());
-    loadFinishedSpyDE.clear();
-
-    // Check whether an existing QWebEngineView keeps the language settings after changing the default locale
-    viewDE.load(url);
-    QTRY_COMPARE_WITH_TIMEOUT(loadFinishedSpyDE.size(), 1, 20000);
-
-    QTRY_VERIFY(!toPlainTextSync(viewDE.page()).isEmpty());
-    errorLines = toPlainTextSync(viewDE.page()).split(QRegularExpression("[\r\n]"), Qt::SkipEmptyParts);
-    QCOMPARE(errorLines.first().toUtf8(), QByteArrayLiteral("Die Website ist nicht erreichbar"));
 }
 
 void tst_QWebEngineView::mixLangLocale_data()
diff --git a/tests/manual/widgets/webrtc/index.html b/tests/manual/widgets/webrtc/index.html
index 433d643c3ce..ee813d306c1 100644
--- a/tests/manual/widgets/webrtc/index.html
+++ b/tests/manual/widgets/webrtc/index.html
@@ -17,13 +17,11 @@
     <body>
         <div id="buttons" >
             <input value ="getDisplayMedia" onclick="getDisplayMedia(true, true);" type="button">
-            <input value = "chooseDesktopMedia" onclick="chooseDesktopMedia();" type="button">
             <input value ="Stop" onclick="stop();" type="button">
         </div>
         <div id="content"></div>
     </body>
     <script>
-        const EXTENSION_ID = "nkeimhogjdpnpccoofpliimaahmaaome"; // hangout services extension
         const content = document.getElementById("content");
         const video = document.createElement("video");
         video.setAttribute("width", 640);
@@ -40,35 +38,6 @@
             console.error(error);
             });
         }
-
-        function chooseDesktopMedia() {
-            stop();
-            // Connect to the 'chooseDesktopMedia' listener within the hangout services extension.
-            let port = chrome.runtime.connect(EXTENSION_ID, {name: "chooseDesktopMedia"})
-
-            // The 'chooseDesktopMedia' api returns a streamId that
-            // identifies a media source in the constraints of 'getUserMedia'
-            // (see chromeMediaSourceId)
-            port.onMessage.addListener(result => {
-                navigator.mediaDevices.getUserMedia({
-                    video: {
-                        mandatory: {
-                            chromeMediaSource: "desktop",
-                            chromeMediaSourceId: result.value.streamId
-                        },
-                    }
-                }).then(stream => {
-                    start(stream);
-                }, error => {
-                    console.error(error);
-                })
-            })
-
-            // Trigger the listener on the other side,
-            // we should see the picker dialog after this call.
-            port.postMessage({method: "chooseDesktopMedia"})
-        }
-
         function stop() {
             if (video.srcObject)
                 for (const track of video.srcObject.getTracks())
diff --git a/tests/manual/widgets/webrtc/main.cpp b/tests/manual/widgets/webrtc/main.cpp
index e788f3a2936..93f9c683e2c 100644
--- a/tests/manual/widgets/webrtc/main.cpp
+++ b/tests/manual/widgets/webrtc/main.cpp
@@ -17,8 +17,8 @@
 #include "ui_mediaPicker.h"
 #include <QWebEngineDesktopMediaRequest>
 
-// Test the screen/window selection and capturing APIs using QWebEngineDesktopMediaRequest,
-// getDisplayMedia (js) and chooseDesktopMedia (hangouts)
+// Test the screen/window selection and capturing APIs using QWebEngineDesktopMediaRequest
+// and getDisplayMedia
 
 // Note: Wayland compositors require Pipewire support in QWE
 
diff --git a/tools/scripts/version_resolver.py b/tools/scripts/version_resolver.py
index aa3dfd088ec..1c3bcb82983 100644
--- a/tools/scripts/version_resolver.py
+++ b/tools/scripts/version_resolver.py
@@ -43,8 +43,8 @@ def get_recursedeps(self):
         return self.local_scope["recursedeps"]
 
 
-chromium_version = '130.0.6723.192'
-chromium_branch = '6723'
+chromium_version = '134.0.6998.208'
+chromium_branch = '6998'
 
 json_url = 'http://omahaproxy.appspot.com/all.json'
 

From b00ea0c7c5a773fdc83a1860dcda8a671d8e320c Mon Sep 17 00:00:00 2001
From: Dheerendra Purohit <dheerendra@pthinks.com>
Date: Wed, 25 Jun 2025 17:33:37 +0530
Subject: [PATCH 051/100] Doc: Update WebEngine build docs to use
 qt-configure-module

The documentation previously suggested using qmake to build Qt
WebEngine, which is outdated for Qt 6. The recommended approach is to
use qt-configure-module followed by standard CMake build and install
steps.

Pick-to: 6.9
Fixes: QTBUG-138009
Change-Id: I7591e677ec1172640dfb11116dc9dc9673e451a3
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit abe26794521e79e6aa633a14a7e85ba0ee30d67b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/doc/src/qtwebengine-platform-notes.qdoc.in | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/core/doc/src/qtwebengine-platform-notes.qdoc.in b/src/core/doc/src/qtwebengine-platform-notes.qdoc.in
index c21274102f9..320a8a4c97e 100644
--- a/src/core/doc/src/qtwebengine-platform-notes.qdoc.in
+++ b/src/core/doc/src/qtwebengine-platform-notes.qdoc.in
@@ -93,9 +93,17 @@
     \list 1
         \li Download the qtwebengine sources.
         \li From the earlier Qt version, run
-            \c {qmake && make (&& make install)}.
+            \code
+            ../qtbase/bin/qt-configure-module .
+            cmake --build . --parallel
+            cmake --install .
+            \endcode
     \endlist
 
+    \note You may also use \c qmake with \c make and \c make install,
+    but this method is considered legacy and not recommended for
+    Qt 6 and later.
+
     \section1 Mac App Store Compatibility
 
     Applications using \QWE are not compatible with the Mac App Store, because:

From 7afb76cdf037359a199945930c3be97bffb880d6 Mon Sep 17 00:00:00 2001
From: Moss Heim <moss.heim@qt.io>
Date: Fri, 11 Jul 2025 15:28:19 +0200
Subject: [PATCH 052/100] Tests: fortify window activation tests

Some tests require window activation so they can interact and query
objects with active focus. For those, merely exposing the window is not
enough because Ubuntu's default WM settings do not guarantee activation
for new windows. We request that explicitly and wait on activation.

We also need to disable those tests on platforms that don't support
QWindow::requestActivate(), add a new header with a macro based on
qtdeclarative tests to support that.

Pick-to: 6.9 6.8
Change-Id: I7d80310e2318f9001b2dd5c581209e75b0c599fe
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit cb4854ed6abd3a39bedc6b09509f778d29099085)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../tst_qquickwebengineview.cpp               | 20 +++++++--
 .../quick/uidelegates/tst_uidelegates.cpp     | 19 ++++++---
 tests/auto/util/visualutil.h                  | 19 +++++++++
 .../qwebenginedownloadrequest/CMakeLists.txt  |  1 +
 .../tst_qwebenginedownloadrequest.cpp         |  8 ++++
 .../qwebenginepage/tst_qwebenginepage.cpp     |  6 ++-
 .../qwebengineview/tst_qwebengineview.cpp     | 41 +++++++++++++++----
 7 files changed, 95 insertions(+), 19 deletions(-)
 create mode 100644 tests/auto/util/visualutil.h

diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
index 25c8df628c2..b0d6544559b 100644
--- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
+++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp
@@ -5,6 +5,7 @@
 #include "testwindow.h"
 #include "quickutil.h"
 #include "util.h"
+#include "visualutil.h"
 
 #include <QScopedPointer>
 #include <QtCore/qelapsedtimer.h>
@@ -448,7 +449,11 @@ void tst_QQuickWebEngineView::transparentWebEngineViews()
 
 void tst_QQuickWebEngineView::inputMethod()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     m_window->show();
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
     QQuickItem *input;
 
     QQuickWebEngineView *view = webEngineView();
@@ -550,8 +555,11 @@ void tst_QQuickWebEngineView::interruptImeTextComposition_data()
 
 void tst_QQuickWebEngineView::interruptImeTextComposition()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     m_window->show();
-    QTRY_VERIFY(qApp->focusObject());
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
     QQuickItem *input;
 
     QQuickWebEngineView *view = webEngineView();
@@ -600,8 +608,11 @@ void tst_QQuickWebEngineView::interruptImeTextComposition()
 
 void tst_QQuickWebEngineView::inputContextQueryInput()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     m_window->show();
-    QTRY_VERIFY(qApp->focusObject());
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
     TestInputContext testContext;
 
     QQuickWebEngineView *view = webEngineView();
@@ -745,8 +756,11 @@ void tst_QQuickWebEngineView::inputContextQueryInput()
 
 void tst_QQuickWebEngineView::inputMethodHints()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     m_window->show();
-    QTRY_VERIFY(qApp->focusObject());
+    m_window->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
     QQuickItem *input;
 
     QQuickWebEngineView *view = webEngineView();
diff --git a/tests/auto/quick/uidelegates/tst_uidelegates.cpp b/tests/auto/quick/uidelegates/tst_uidelegates.cpp
index 5918d72a704..25702f4b870 100644
--- a/tests/auto/quick/uidelegates/tst_uidelegates.cpp
+++ b/tests/auto/quick/uidelegates/tst_uidelegates.cpp
@@ -3,6 +3,7 @@
 
 #include "testwindow.h"
 #include "quickutil.h"
+#include "visualutil.h"
 
 #include <QScopedPointer>
 #include <QtQml/QQmlEngine>
@@ -107,13 +108,14 @@ void tst_UIDelegates::javaScriptDialog_data()
 
 void tst_UIDelegates::javaScriptDialog()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     QFETCH(QString, javaScriptCode);
     QFETCH(QString, expectedObjectName);
 
     m_window->show();
     m_window->requestActivate();
     QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
-    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -126,10 +128,11 @@ void tst_UIDelegates::javaScriptDialog()
 
 void tst_UIDelegates::fileDialog()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     m_window->show();
     m_window->requestActivate();
     QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
-    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -144,10 +147,11 @@ void tst_UIDelegates::fileDialog()
 
 void tst_UIDelegates::contextMenu()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     m_window->show();
     m_window->requestActivate();
     QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
-    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -160,10 +164,11 @@ void tst_UIDelegates::contextMenu()
 
 void tst_UIDelegates::tooltip()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     m_window->show();
     m_window->requestActivate();
     QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
-    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -185,10 +190,11 @@ void tst_UIDelegates::tooltip()
 
 void tst_UIDelegates::colorDialog()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     m_window->show();
     m_window->requestActivate();
     QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
-    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
 
     view->loadHtml("<html><body>"
@@ -219,6 +225,8 @@ void tst_UIDelegates::authenticationDialog_data()
 
 void tst_UIDelegates::authenticationDialog()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     QFETCH(QUrl, url);
     QFETCH(QByteArray, response);
 
@@ -230,7 +238,6 @@ void tst_UIDelegates::authenticationDialog()
     m_window->show();
     m_window->requestActivate();
     QVERIFY(QTest::qWaitForWindowActive(m_window.get()));
-    QVERIFY(qApp->focusObject());
     QQuickWebEngineView *view = webEngineView();
     view->loadHtml("<html><body>"
                    "</body></html>");
diff --git a/tests/auto/util/visualutil.h b/tests/auto/util/visualutil.h
new file mode 100644
index 00000000000..ca967e71dda
--- /dev/null
+++ b/tests/auto/util/visualutil.h
@@ -0,0 +1,19 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#ifndef VISUALUTIL_H
+#define VISUALUTIL_H
+
+// Separate utils that require linking with GuiPrivate
+
+#include <QtTest/QtTest>
+#include <QtGui/private/qguiapplication_p.h>
+#include <QtGui/qpa/qplatformintegration.h>
+
+#define SKIP_IF_NO_WINDOW_ACTIVATION() \
+do { \
+    if (!(QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))) \
+        QSKIP("Window activation is not supported on this platform"); \
+} while (false)
+
+#endif /* VISUALUTIL_H */
diff --git a/tests/auto/widgets/qwebenginedownloadrequest/CMakeLists.txt b/tests/auto/widgets/qwebenginedownloadrequest/CMakeLists.txt
index 5b76909b159..13b86a95666 100644
--- a/tests/auto/widgets/qwebenginedownloadrequest/CMakeLists.txt
+++ b/tests/auto/widgets/qwebenginedownloadrequest/CMakeLists.txt
@@ -9,6 +9,7 @@ qt_internal_add_test(tst_qwebenginedownloadrequest
         tst_qwebenginedownloadrequest.cpp
     LIBRARIES
         Qt::WebEngineWidgets
+        Qt::GuiPrivate
         Test::HttpServer
         Test::Util
 )
diff --git a/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp b/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
index b01d7b8c933..15e96bc0dcd 100644
--- a/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
+++ b/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
@@ -2,6 +2,7 @@
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
 
 #include <util.h>
+#include <visualutil.h>
 
 #include <QCoreApplication>
 #include <QSignalSpy>
@@ -131,6 +132,7 @@ void tst_QWebEngineDownloadRequest::initTestCase()
     m_view->setPage(m_page);
     m_view->resize(640, 480);
     m_view->show();
+    m_view->window()->windowHandle()->requestActivate();
 }
 
 void tst_QWebEngineDownloadRequest::init()
@@ -392,6 +394,8 @@ void tst_QWebEngineDownloadRequest::downloadLink_data()
 
 void tst_QWebEngineDownloadRequest::downloadLink()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     QFETCH(UserAction, userAction);
     QFETCH(bool, anchorHasDownloadAttribute);
     QFETCH(QByteArray, fileName);
@@ -529,6 +533,8 @@ void tst_QWebEngineDownloadRequest::downloadTwoLinks_data()
 
 void tst_QWebEngineDownloadRequest::downloadTwoLinks()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     QFETCH(UserAction, action1);
     QFETCH(UserAction, action2);
 
@@ -1348,6 +1354,8 @@ void tst_QWebEngineDownloadRequest::downloadDataUrls_data()
 
 void tst_QWebEngineDownloadRequest::downloadDataUrls()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     QFETCH(QByteArray, htmlData);
     QFETCH(QString, expectedFileName);
     // Set up HTTP server
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index b12a29f2bc7..2654b8b93eb 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -20,6 +20,7 @@
 */
 
 #include <widgetutil.h>
+#include <visualutil.h>
 #include <QtNetwork/private/qtnetworkglobal_p.h>
 #include <QtWebEngineCore/qtwebenginecore-config.h>
 #include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h>
@@ -3307,6 +3308,8 @@ void tst_QWebEnginePage::mouseButtonTranslation()
 
 void tst_QWebEnginePage::mouseMovementProperties()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
         QSKIP("Wayland: Can't manipulating the mouse cursor in auto test.");
 
@@ -3316,7 +3319,8 @@ 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));
 
     QSignalSpy loadFinishedSpy(&page, SIGNAL(loadFinished(bool)));
     page.setHtml(QStringLiteral(
diff --git a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
index b1636f87eac..311b183d9d8 100644
--- a/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
+++ b/tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp
@@ -22,6 +22,7 @@
 #include <QtWebEngineCore/private/qtwebenginecore-config_p.h>
 #include <qtest.h>
 #include <util.h>
+#include <visualutil.h>
 #include <private/qinputmethod_p.h>
 #include <qpainter.h>
 #include <qpagelayout.h>
@@ -1239,6 +1240,8 @@ void tst_QWebEngineView::focusOnNavigation()
 
 void tst_QWebEngineView::focusInternalRenderWidgetHostViewQuickItem()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     // Create a container widget, that will hold a line edit that has initial focus, and a web
     // engine view.
     QScopedPointer<QWidget> containerWidget(new QWidget);
@@ -1260,7 +1263,8 @@ void tst_QWebEngineView::focusInternalRenderWidgetHostViewQuickItem()
     containerWidget->resize(300, 200);
     containerWidget->setLayout(layout);
     containerWidget->show();
-    QVERIFY(QTest::qWaitForWindowExposed(containerWidget.data()));
+    containerWidget->window()->windowHandle()->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(containerWidget.data()));
 
     // Load the content, and check that focus is not set.
     QSignalSpy loadSpy(webView, SIGNAL(loadFinished(bool)));
@@ -1593,6 +1597,8 @@ class WebViewWithUrlBar : public QWidget {
 
 void tst_QWebEngineView::keyboardFocusAfterPopup()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     const QString html = QStringLiteral(
         "<html>"
         "  <body onload=\"document.getElementById('input1').focus()\">"
@@ -1604,7 +1610,8 @@ void tst_QWebEngineView::keyboardFocusAfterPopup()
     connect(window.lineEdit, &QLineEdit::editingFinished, [&] { window.webView->setHtml(html); });
     window.webView->settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, true);
     window.show();
-    QVERIFY(QTest::qWaitForWindowExposed(&window));
+    window.window()->windowHandle()->requestActivate();
+    QVERIFY(QTest::qWaitForWindowActive(&window));
 
     // Focus will initially go to the QLineEdit.
     QTRY_COMPARE(QApplication::focusWidget(), window.lineEdit);
@@ -1828,6 +1835,8 @@ void tst_QWebEngineView::postData()
 
 void tst_QWebEngineView::inputFieldOverridesShortcuts()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(
                 QPlatformIntegration::WindowActivation))
         QSKIP("Cannot test on platforms without window activation capability");
@@ -1847,6 +1856,7 @@ void tst_QWebEngineView::inputFieldOverridesShortcuts()
     QVERIFY(loadFinishedSpy.wait());
 
     view.show();
+    view.window()->windowHandle()->requestActivate();
     QVERIFY(QTest::qWaitForWindowActive(&view));
 
     auto inputFieldValue = [&view] () -> QString {
@@ -2040,9 +2050,12 @@ void tst_QWebEngineView::softwareInputPanel()
 
 void tst_QWebEngineView::inputContextQueryInput()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     QWebEngineView view;
     view.resize(640, 480);
     view.show();
+    view.window()->windowHandle()->requestActivate();
 
     // testContext will be destroyed before the view, so no events are sent accidentally
     // when the view is destroyed.
@@ -2054,8 +2067,7 @@ void tst_QWebEngineView::inputContextQueryInput()
                  "  <input type='text' id='input1' value='' size='50'/>"
                  "</body></html>");
     QTRY_COMPARE(loadFinishedSpy.size(), 1);
-    QVERIFY(QTest::qWaitForWindowExposed(&view));
-    QTRY_VERIFY(qApp->focusObject());
+    QVERIFY(QTest::qWaitForWindowActive(&view));
     QCOMPARE(testContext.infos.size(), 0);
 
     // Set focus on an input field.
@@ -2548,10 +2560,13 @@ void tst_QWebEngineView::emptyInputMethodEvent()
 
 void tst_QWebEngineView::imeComposition()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     QWebEngineView view;
     view.settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, true);
     view.resize(640, 480);
     view.show();
+    view.window()->windowHandle()->requestActivate();
 
     QSignalSpy selectionChangedSpy(&view, SIGNAL(selectionChanged()));
     QSignalSpy loadFinishedSpy(&view, SIGNAL(loadFinished(bool)));
@@ -2559,7 +2574,7 @@ void tst_QWebEngineView::imeComposition()
                  "  <input type='text' id='input1' value='QtWebEngine inputMethod'/>"
                  "</body></html>");
     QVERIFY(loadFinishedSpy.wait());
-    QVERIFY(QTest::qWaitForWindowExposed(&view));
+    QVERIFY(QTest::qWaitForWindowActive(&view));
 
     evaluateJavaScriptSync(view.page(), "var inputEle = document.getElementById('input1'); inputEle.focus(); inputEle.select();");
     QTRY_COMPARE(selectionChangedSpy.size(), 1);
@@ -2767,17 +2782,20 @@ void tst_QWebEngineView::imeComposition()
 
 void tst_QWebEngineView::newlineInTextarea()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     QWebEngineView view;
     view.settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, true);
     view.resize(640, 480);
     view.show();
+    view.window()->windowHandle()->requestActivate();
 
     QSignalSpy loadFinishedSpy(&view, SIGNAL(loadFinished(bool)));
     view.page()->setHtml("<html><body>"
                          "  <textarea rows='5' cols='1' id='input1'></textarea>"
                          "</body></html>");
     QVERIFY(loadFinishedSpy.wait());
-    QVERIFY(QTest::qWaitForWindowExposed(&view));
+    QVERIFY(QTest::qWaitForWindowActive(&view));
 
     evaluateJavaScriptSync(view.page(), "var inputEle = document.getElementById('input1'); inputEle.focus(); inputEle.select();");
     QTRY_VERIFY(evaluateJavaScriptSync(view.page(), "document.getElementById('input1').value").toString().isEmpty());
@@ -3014,18 +3032,21 @@ void tst_QWebEngineView::imeCompositionQueryEvent_data()
 
 void tst_QWebEngineView::imeCompositionQueryEvent()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     QWebEngineView view;
     view.resize(640, 480);
     view.settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, true);
 
     view.show();
+    view.window()->windowHandle()->requestActivate();
 
     QSignalSpy loadFinishedSpy(&view, SIGNAL(loadFinished(bool)));
     view.setHtml("<html><body>"
                  "  <input type='text' id='input1' />"
                  "</body></html>");
     QVERIFY(loadFinishedSpy.wait());
-    QVERIFY(QTest::qWaitForWindowExposed(&view));
+    QVERIFY(QTest::qWaitForWindowActive(&view));
 
     evaluateJavaScriptSync(view.page(), "document.getElementById('input1').focus()");
     QTRY_COMPARE(evaluateJavaScriptSync(view.page(), "document.activeElement.id").toString(), QStringLiteral("input1"));
@@ -4020,6 +4041,8 @@ void tst_QWebEngineView::deferredDelete()
 // QTBUG-111927
 void tst_QWebEngineView::setCursorOnEmbeddedView()
 {
+    SKIP_IF_NO_WINDOW_ACTIVATION();
+
     if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
         QSKIP("Wayland: Can't manipulate the mouse cursor in auto test.");
 
@@ -4044,9 +4067,9 @@ void tst_QWebEngineView::setCursorOnEmbeddedView()
     view.setHtml(html);
     parentWidget.show();
     view.show();
+    parentWidget.window()->windowHandle()->requestActivate();
 
-    QVERIFY(QTest::qWaitForWindowExposed(&parentWidget));
-    QVERIFY(QTest::qWaitForWindowExposed(&view));
+    QVERIFY(QTest::qWaitForWindowActive(&parentWidget));
 
     QTRY_VERIFY(firstPaintSpy.size());
 

From 88c34dd6951dad5fb155f7e5a1fcefa104353577 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Wed, 16 Jul 2025 14:00:16 +0000
Subject: [PATCH 053/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I4c7777f2d3c1538b387b4d0a70b222887f96b983
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index affc1724715..8717c04030b 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: 5ab1597476669fc4e7cc3a4b3242982e40a3f969
+    ref: d7b7266f627cd53e0473661c4403ac74a2b1d79f
     required: true
   ../qtpositioning:
-    ref: 45cd1794142d89ed04b87ed5a4c714ced5c18974
+    ref: e0326d2e08c41382f3715a66537ecb8cf4bc9770
     required: false
   ../qttools:
-    ref: 90552cfadd9c39956fb23096a8a451e7de27fcdb
+    ref: b211a4d952e386c69c3cabca6825cdfd730b9f53
     required: false
   ../qtwebchannel:
-    ref: 65c3f0d8500842f0f6c0b9dc04c7adef5de0ef26
+    ref: 84293f02fca58f754c3c39528f2fcf243b56ace9
     required: false

From 48b5da6ef565d40ec247548a460bdd2e264c2d20 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Tue, 22 Jul 2025 19:05:59 +0000
Subject: [PATCH 054/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I5d46de59ee5aa6123938d6b579f19fbdb5e1ade1
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 8717c04030b..9265ebfdec4 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: d7b7266f627cd53e0473661c4403ac74a2b1d79f
+    ref: 99b7174493ca1586213cb6c04582e828540d7549
     required: true
   ../qtpositioning:
-    ref: e0326d2e08c41382f3715a66537ecb8cf4bc9770
+    ref: 519398e64d27be76a9b49a2a98f019c689ae8106
     required: false
   ../qttools:
-    ref: b211a4d952e386c69c3cabca6825cdfd730b9f53
+    ref: 6bfa100ad9d083752bc315136c13f1fcdc645573
     required: false
   ../qtwebchannel:
-    ref: 84293f02fca58f754c3c39528f2fcf243b56ace9
+    ref: f6453cd0ffc1793312489f14f25c813247a946ec
     required: false

From 26ed651acfe6a902737407ac48ee33ce68d3f8c8 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Fri, 25 Jul 2025 11:22:01 +0200
Subject: [PATCH 055/100] Remove FINAL marker on new property

Not allowed any more. API review

Task-number: QTBUG-137478
Change-Id: I4559e3d00af0be46ec90bdcfff81a7b39d984bb8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit cd5173e13cbbcf6ba2df311c23d08f9ce3eab30e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/webenginequick/api/qquickwebengineprofile.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/webenginequick/api/qquickwebengineprofile.h b/src/webenginequick/api/qquickwebengineprofile.h
index b52db9182a7..9a21852baf6 100644
--- a/src/webenginequick/api/qquickwebengineprofile.h
+++ b/src/webenginequick/api/qquickwebengineprofile.h
@@ -44,8 +44,7 @@ class Q_WEBENGINEQUICK_EXPORT QQuickWebEngineProfile : public QObject {
     Q_PROPERTY(bool isPushServiceEnabled READ isPushServiceEnabled WRITE setPushServiceEnabled NOTIFY pushServiceEnabledChanged FINAL REVISION(6,5))
     Q_PROPERTY(QWebEngineClientHints *clientHints READ clientHints FINAL REVISION(6,8))
 #if QT_CONFIG(webengine_extensions)
-    Q_PROPERTY(QWebEngineExtensionManager *extensionManager READ extensionManager FINAL
-                       REVISION(6, 10))
+    Q_PROPERTY(QWebEngineExtensionManager *extensionManager READ extensionManager REVISION(6, 10))
 #endif
     QML_NAMED_ELEMENT(WebEngineProfile)
     QML_ADDED_IN_VERSION(1, 1)

From e8c29bac98766d2ff6b3d6030fe6cfa37e96f5bb Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Wed, 23 Jul 2025 11:12:33 +0200
Subject: [PATCH 056/100] Add missing notifier for extension service workers

Forward 'WillDestroyServiceWorkerContextOnWorkerThread' event
to the browser which will release the browser side resources
of the service worker.
Fixes "FATAL:api_event_handler.cc(44)] Check failed: emitters.empty().
|emitters| should have been cleared by InvalidateContext()"

Amends 9d9780d444e8e7b1a2e066ae4b872a77d35f87bf

Task-number: QTBUG-61676
Change-Id: Ic7d127e979036873646324d17d351bfc30f78950
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit f1effe055f77ae1fa8ae9fb6c0e149cbba7cc15a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/renderer/content_renderer_client_qt.cpp | 10 ++++++++++
 src/core/renderer/content_renderer_client_qt.h   |  5 +++++
 2 files changed, 15 insertions(+)

diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index 2052ba8d709..3e02ff124bd 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -495,6 +495,16 @@ void ContentRendererClientQt::DidStartServiceWorkerContextOnWorkerThread(
                                                          service_worker_scope, script_url);
 }
 
+void ContentRendererClientQt::WillDestroyServiceWorkerContextOnWorkerThread(
+        v8::Local<v8::Context> context, int64_t service_worker_version_id,
+        const GURL &service_worker_scope, const GURL &script_url)
+{
+    extensions::ExtensionsRendererClient::Get()
+            ->dispatcher()
+            ->WillDestroyServiceWorkerContextOnWorkerThread(context, service_worker_version_id,
+                                                            service_worker_scope, script_url);
+}
+
 bool ContentRendererClientQt::AllowScriptExtensionForServiceWorker(const url::Origin &script_origin)
 {
     return script_origin.scheme() == extensions::kExtensionScheme;
diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h
index 874285fb007..714652420ce 100644
--- a/src/core/renderer/content_renderer_client_qt.h
+++ b/src/core/renderer/content_renderer_client_qt.h
@@ -100,6 +100,11 @@ class ContentRendererClientQt
             int64_t service_worker_version_id, const GURL &service_worker_scope,
             const GURL &script_url, const blink::ServiceWorkerToken &service_worker_token) override;
 
+    void WillDestroyServiceWorkerContextOnWorkerThread(v8::Local<v8::Context> context,
+                                                       int64_t service_worker_version_id,
+                                                       const GURL &service_worker_scope,
+                                                       const GURL &script_url) override;
+
     void DidInitializeServiceWorkerContextOnWorkerThread(
             blink::WebServiceWorkerContextProxy *context_proxy, const GURL &service_worker_scope,
             const GURL &script_url) override;

From 45caa2eee643fb6290330f07d6de17eeb1d3b111 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Tue, 29 Jul 2025 11:35:17 +0000
Subject: [PATCH 057/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I234137a35aec353b621f1408c935e4225bb1a887
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 9265ebfdec4..4856e4ad71f 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: 99b7174493ca1586213cb6c04582e828540d7549
+    ref: ab3d579bdbc4b4f7d3fa928f1f80988cdce4e920
     required: true
   ../qtpositioning:
-    ref: 519398e64d27be76a9b49a2a98f019c689ae8106
+    ref: a9120d10160f34362a27f5db341d594569d68903
     required: false
   ../qttools:
-    ref: 6bfa100ad9d083752bc315136c13f1fcdc645573
+    ref: 71c5e98ac8d3404814612203d5da613fd521b75b
     required: false
   ../qtwebchannel:
-    ref: f6453cd0ffc1793312489f14f25c813247a946ec
+    ref: 0616892c25e89da796a1f3fc438f956168fc4579
     required: false

From 4a1d5228700ff8a75dc5c3bfbfa9bbe53b1da0b1 Mon Sep 17 00:00:00 2001
From: Safiyyah Moosa <safiyyah.moosa@qt.io>
Date: Wed, 4 Jun 2025 12:37:28 +0200
Subject: [PATCH 058/100] Doc: Add missing info to Qt PDF docs

Neither QtWebEngine nor QtPDF can currently be compiled with MinGW.

Fixes: QTBUG-135100
Pick-to: 6.9 6.8
Change-Id: I93d5bcdd80d91cf0c2ef5e9e334d9f6be439ea83
Reviewed-by: Moss Heim <moss.heim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 9ce7db649cff649a01215af0872d3d7ef0ee46da)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/doc/src/qtwebengine-platform-notes.qdoc.in | 2 ++
 src/pdf/doc/src/qtpdf-platformnotes.qdoc            | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/core/doc/src/qtwebengine-platform-notes.qdoc.in b/src/core/doc/src/qtwebengine-platform-notes.qdoc.in
index 320a8a4c97e..2bbbea65ead 100644
--- a/src/core/doc/src/qtwebengine-platform-notes.qdoc.in
+++ b/src/core/doc/src/qtwebengine-platform-notes.qdoc.in
@@ -51,6 +51,8 @@
 
     \note It is not recommended to use tools from  \c msys2 or \c cygwin to build \QWE as it may result in build errors.
 
+    \note Currently, Qt WebEngine does not compile with MinGW.
+
     \section2 Linux
 
     On Linux, Clang or GCC version 9 or later is required.
diff --git a/src/pdf/doc/src/qtpdf-platformnotes.qdoc b/src/pdf/doc/src/qtpdf-platformnotes.qdoc
index f50be120dca..490eea6578b 100644
--- a/src/pdf/doc/src/qtpdf-platformnotes.qdoc
+++ b/src/pdf/doc/src/qtpdf-platformnotes.qdoc
@@ -7,5 +7,7 @@
 
     Building Qt PDF for Android is currently
     \l{https://bugreports.qt.io/browse/QTBUG-83459} {not supported} on Windows host platforms.
+
+    Currently, it is not possible to build Qt PDF using MinGW.
 */
 

From b64aa551d7b2a939710b5f45ff221172e5085d96 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Wed, 30 Jul 2025 21:34:29 +0000
Subject: [PATCH 059/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I52d49eba9642149326f1f4870af8d671be02a47c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 4856e4ad71f..3165b921574 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: ab3d579bdbc4b4f7d3fa928f1f80988cdce4e920
+    ref: 1d383021d299031277bbfcc020727626293f5ba6
     required: true
   ../qtpositioning:
-    ref: a9120d10160f34362a27f5db341d594569d68903
+    ref: caad86072e0db9e5d46e5c7dd7e18e64c6dbce87
     required: false
   ../qttools:
-    ref: 71c5e98ac8d3404814612203d5da613fd521b75b
+    ref: 1575866313c4913a3c2142a93bc628e334b13b7c
     required: false
   ../qtwebchannel:
-    ref: 0616892c25e89da796a1f3fc438f956168fc4579
+    ref: ffe74c635a31499f5fdc2a56dd90f9e6ce5ad92c
     required: false

From 57ed69776f1c8bf6691299a4500402aac8994bb3 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Thu, 3 Jul 2025 16:00:30 +0200
Subject: [PATCH 060/100] Workaround assemble failure when cross-building armv7
 with GCC 15.1

Change-Id: Id61d284ded8a47d825ba57c3311fe9de1ac825eb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit a4b379352e6b8b8396a15ea79232ec5b324b1599)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 043555ed9ad..2a2d28b74f5 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -55,6 +55,8 @@ foreach(arch ${archs})
 
         set(gnCxxCompileOptions "")
         if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+            get_gn_arch(cpu ${TEST_architecture_arch})
+
             # Silence warning in boringssl headers.
             list(APPEND gnCxxCompileOptions -Wno-ignored-qualifiers)
 
@@ -63,6 +65,12 @@ foreach(arch ${archs})
                 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100796
                 list(APPEND gnCxxCompileOptions -no-integrated-cpp)
             endif()
+
+            if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "15.1.0" AND cpu STREQUAL "arm")
+                # GCC 15.1 workaround for invalid use of NEON registers,
+                # see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120351
+                list(APPEND gnCxxCompileOptions -fno-late-combine-instructions)
+            endif()
         endif()
 
         extend_gn_target(${buildGn}

From 2291bde101e661bb495a7b420f356ae606fc3976 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Wed, 30 Jul 2025 15:06:16 +0200
Subject: [PATCH 061/100] Fix race condition in basicFilterOverHTTP

Fav icon service is not bound to overall navigation status
meaning, page can be loaded, but fav service can be
still fetching icons. Moreover if new fav icon request comes
to favicon service and the previous failed request did not manage
to set WasUnableToDownloadFavicon the new request is fired.
This means that tests which are handcrafted and count http
request can suffer from race condition as there is currently
no way to check it fav icon service has completed all the
processing.

To workaround the issue simply add fav.png to basicFilterOverHTTP
test case and wait for iconUrlChanged signal, this way
we can be sure the fav icon http fetches are done.

Note, the change however requires updating of number of
fired calls in spies, as before the change fav icon was considered
not downloadable (unless it was run on windows due to mentioned race
condition), now we have fav icon so any reload will trigger new fetch.

This should not have effect on overall logic if the test.

Fixes: QTBUG-138736
Change-Id: Icdd4652becd39ba52dd392901907399817b9ae18
Reviewed-by: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 734fd31a47340123026b4c018322e29ba514d10a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../core/qwebenginecookiestore/CMakeLists.txt |   1 +
 .../qwebenginecookiestore/resources/fav.png   | Bin 0 -> 878 bytes
 .../tst_qwebenginecookiestore.cpp             |  18 ++++++++++++------
 3 files changed, 13 insertions(+), 6 deletions(-)
 create mode 100644 tests/auto/core/qwebenginecookiestore/resources/fav.png

diff --git a/tests/auto/core/qwebenginecookiestore/CMakeLists.txt b/tests/auto/core/qwebenginecookiestore/CMakeLists.txt
index cc14940f1ea..01773044b8f 100644
--- a/tests/auto/core/qwebenginecookiestore/CMakeLists.txt
+++ b/tests/auto/core/qwebenginecookiestore/CMakeLists.txt
@@ -16,6 +16,7 @@ qt_internal_add_test(tst_qwebenginecookiestore
 set(tst_qwebenginecookiestore_resource_files
     "resources/content.html"
     "resources/index.html"
+    "resources/fav.png"
 )
 
 qt_internal_add_resource(tst_qwebenginecookiestore "tst_qwebenginecookiestore"
diff --git a/tests/auto/core/qwebenginecookiestore/resources/fav.png b/tests/auto/core/qwebenginecookiestore/resources/fav.png
new file mode 100644
index 0000000000000000000000000000000000000000..8cf9a50a4299c8863d35604688f18fa0a3f7055b
GIT binary patch
diff --git a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp b/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp
index e0db542c827..06da356101c 100644
--- a/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp
+++ b/tests/auto/core/qwebenginecookiestore/tst_qwebenginecookiestore.cpp
@@ -268,6 +268,7 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP()
 
     HttpServer httpServer;
     httpServer.setHostDomain(QString("sub.test.localhost"));
+    httpServer.setResourceDirs({ ":/resources" });
     QVERIFY(httpServer.start());
 
     QByteArray cookieRequestHeader;
@@ -276,7 +277,7 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP()
             cookieRequestHeader = rr->requestHeader(QByteArrayLiteral("Cookie"));
             if (cookieRequestHeader.isEmpty())
                 rr->setResponseHeader(QByteArrayLiteral("Set-Cookie"), QByteArrayLiteral("Test=test"));
-            rr->setResponseBody("<head><link rel='icon' type='image/png' href='resources/Fav.png'/>"
+            rr->setResponseBody("<head><link rel='icon' type='image/png' href='fav.png'/>"
                                 "<title>Page with a favicon and an icon</title></head>"
                                 "<body><img src='resources/Img.ico'></body>");
             rr->sendResponse();
@@ -284,6 +285,7 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP()
     });
 
     QSignalSpy loadSpy(&page, SIGNAL(loadFinished(bool)));
+    QSignalSpy iconUrlChangedSpy(&page, SIGNAL(iconUrlChanged(QUrl)));
     QSignalSpy cookieAddedSpy(client, SIGNAL(cookieAdded(QNetworkCookie)));
     QSignalSpy cookieRemovedSpy(client, SIGNAL(cookieRemoved(QNetworkCookie)));
     QSignalSpy serverSpy(&httpServer, SIGNAL(newRequest(HttpReqRep*)));
@@ -292,6 +294,7 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP()
     page.load(firstPartyUrl);
 
     QWE_TRY_COMPARE(loadSpy.size(), 1);
+    QWE_TRY_COMPARE(iconUrlChangedSpy.size(), 1);
     QVERIFY(loadSpy.takeFirst().takeFirst().toBool());
     QWE_TRY_COMPARE(cookieAddedSpy.size(), 1);
     QWE_TRY_COMPARE(accessTested.loadAcquire(), 4);
@@ -301,12 +304,13 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP()
 
     page.triggerAction(QWebEnginePage::Reload);
     QWE_TRY_COMPARE(loadSpy.size(), 1);
+    QWE_TRY_COMPARE(iconUrlChangedSpy.size(), 3);
     QVERIFY(loadSpy.takeFirst().takeFirst().toBool());
     QVERIFY(!cookieRequestHeader.isEmpty());
     QWE_TRY_COMPARE(cookieAddedSpy.size(), 1);
-    QWE_TRY_COMPARE(accessTested.loadAcquire(), 6);
+    QWE_TRY_COMPARE(accessTested.loadAcquire(), 7);
 
-    QWE_TRY_COMPARE(serverSpy.size(), 5);
+    QWE_TRY_COMPARE(serverSpy.size(), 6);
 
     client->deleteAllCookies();
     QWE_TRY_COMPARE(cookieRemovedSpy.size(), 1);
@@ -319,22 +323,24 @@ void tst_QWebEngineCookieStore::basicFilterOverHTTP()
     page.triggerAction(QWebEnginePage::ReloadAndBypassCache);
     QWE_TRY_COMPARE(loadSpy.size(), 1);
     QVERIFY(loadSpy.takeFirst().takeFirst().toBool());
+    QWE_TRY_COMPARE(iconUrlChangedSpy.size(), 5);
     QVERIFY(cookieRequestHeader.isEmpty());
     // Test cookies are NOT added:
     QTest::qWait(100);
     QCOMPARE(cookieAddedSpy.size(), 1);
-    QWE_TRY_COMPARE(accessTested.loadAcquire(), 9);
+    QWE_TRY_COMPARE(accessTested.loadAcquire(), 11);
 
-    QWE_TRY_COMPARE(serverSpy.size(), 7);
+    QWE_TRY_COMPARE(serverSpy.size(), 9);
 
     page.triggerAction(QWebEnginePage::Reload);
     QWE_TRY_COMPARE(loadSpy.size(), 1);
     QVERIFY(loadSpy.takeFirst().takeFirst().toBool());
     QVERIFY(cookieRequestHeader.isEmpty());
+    QWE_TRY_COMPARE(iconUrlChangedSpy.size(), 7);
     QCOMPARE(cookieAddedSpy.size(), 1);
 
     // Wait for last GET /favicon.ico
-    QWE_TRY_COMPARE(serverSpy.size(), 9);
+    QWE_TRY_COMPARE(serverSpy.size(), 12);
     (void) httpServer.stop();
 
     QCOMPARE(resourceFirstParty.size(), accessTested.loadAcquire());

From 4de77b0c6d6b9ab8425e87af19d5d0579829d587 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Mon, 21 Jul 2025 12:42:36 +0200
Subject: [PATCH 062/100] CMake: Make sure headers are synced on doing sandbox
 build on windows

Fix build race condition, as file sandbox_win.cpp includes global header, make sure headers are in sync before trying to build static sandbox lib.

Build log error on bug report.

This amends e372bb3dad121465d61cc15de18c06c85f938072.

Fixes: QTBUG-138159
Pick-to: 6.9 6.8
Change-Id: Iab5be9082a31b56aece926a0267e0a7378635996
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 73a8a4ee569515c094cce0d13d0c82f463eae1a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 2a2d28b74f5..aa32b6ef5cd 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -669,6 +669,7 @@ if(WIN32)
             TARGET QtWebEngineCoreSandbox
             OUTPUT QtWebEngineCoreSandbox.lib
             BUILDDIR ${buildDir}/${config}/${arch}
+            DEPENDS WebEngineCore_sync_headers
             MODULE core
         )
         qt_webengine_add_gn_target_to_sbom(QtWebEngineCoreSandbox ${buildDir}/${config}/${arch})

From 76a01f5cecde4e93c5a410b4a242cacb25d2c674 Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Tue, 29 Jul 2025 16:22:36 +0200
Subject: [PATCH 063/100] QWebEngineExtensionInfo: fix move ctor

* Make the move ctor inline
* Do not export the inlined move ctor based on:
46d1e664f2d100355dfcf2438d775189c4d8c0f7

Found in API-review.

Change-Id: Ibb31c5b86886a2e29a1a2fb25eeafc433e7bc699
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b8d45c6b9ff0f4a0085ddb8f15d359e85d7828cd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/api/qwebengineextensioninfo.cpp | 2 --
 src/core/api/qwebengineextensioninfo.h   | 3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/core/api/qwebengineextensioninfo.cpp b/src/core/api/qwebengineextensioninfo.cpp
index 6ea24d658d6..0a1525a072d 100644
--- a/src/core/api/qwebengineextensioninfo.cpp
+++ b/src/core/api/qwebengineextensioninfo.cpp
@@ -97,8 +97,6 @@ QWebEngineExtensionInfo::QWebEngineExtensionInfo(QWebEngineExtensionInfoPrivate
 
 QWebEngineExtensionInfo::QWebEngineExtensionInfo(const QWebEngineExtensionInfo &other) noexcept =
         default;
-QWebEngineExtensionInfo::QWebEngineExtensionInfo(QWebEngineExtensionInfo &&other) noexcept =
-        default;
 QWebEngineExtensionInfo &
 QWebEngineExtensionInfo::operator=(const QWebEngineExtensionInfo &other) noexcept = default;
 
diff --git a/src/core/api/qwebengineextensioninfo.h b/src/core/api/qwebengineextensioninfo.h
index 3d4c1996dc1..2bb3218a7e9 100644
--- a/src/core/api/qwebengineextensioninfo.h
+++ b/src/core/api/qwebengineextensioninfo.h
@@ -42,8 +42,7 @@ class QWebEngineExtensionInfo
 
     Q_WEBENGINECORE_EXPORT
     QWebEngineExtensionInfo(const QWebEngineExtensionInfo &other) noexcept;
-    Q_WEBENGINECORE_EXPORT
-    QWebEngineExtensionInfo(QWebEngineExtensionInfo &&other) noexcept;
+    QWebEngineExtensionInfo(QWebEngineExtensionInfo &&other) noexcept = default;
     Q_WEBENGINECORE_EXPORT
     QWebEngineExtensionInfo &operator=(const QWebEngineExtensionInfo &other) noexcept;
     Q_WEBENGINECORE_EXPORT ~QWebEngineExtensionInfo();

From a22a75344a792d8802ca276e21b550992e319d19 Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Tue, 29 Jul 2025 16:35:48 +0200
Subject: [PATCH 064/100] QWebEngineExtensionManager: rename installDir to
 installPath

Rename installDirectory() to be consistent with QWebEngineProfile.
Update tests accordingly.

Found in API-review.

Change-Id: I8e9c9760950c0bf65a75292a22a1abc1f7deba91
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit af03730316ba2e0df1ca53f15b9669413e6b1c42)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/api/qwebengineextensionmanager.cpp          | 12 ++++++------
 src/core/api/qwebengineextensionmanager.h            |  4 ++--
 tests/auto/quick/publicapi/tst_publicapi.cpp         |  2 +-
 .../widgets/extensions/tst_qwebengineextension.cpp   |  6 +++---
 tests/manual/widgets/extensions/main.cpp             |  2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/core/api/qwebengineextensionmanager.cpp b/src/core/api/qwebengineextensionmanager.cpp
index 0d27482dd13..043a5dbd0f5 100644
--- a/src/core/api/qwebengineextensionmanager.cpp
+++ b/src/core/api/qwebengineextensionmanager.cpp
@@ -74,7 +74,7 @@ void QWebEngineExtensionManager::loadExtension(const QString &path)
 
     Extensions are loaded in disabled state after the install succeded.
     Installed extensions are automatically loaded at every starutup in disabled state.
-    The install directory can be queried with \l installDirectory().
+    The install path can be queried with \l installPath().
 
     The installer is capable of installing zipped or unpacked extensions.
     The \a path parameter should point to a directory or a zip file containing the extension's
@@ -84,7 +84,7 @@ void QWebEngineExtensionManager::loadExtension(const QString &path)
     Installing an already loaded or installed extension from the same path will install a new
     extension.
 
-    \sa QWebEngineExtensionInfo::isInstalled(), QWebEngineExtensionInfo::error(), installDirectory()
+    \sa QWebEngineExtensionInfo::isInstalled(), QWebEngineExtensionInfo::error(), installPath()
 */
 void QWebEngineExtensionManager::installExtension(const QString &path)
 {
@@ -112,12 +112,12 @@ void QWebEngineExtensionManager::unloadExtension(const QWebEngineExtensionInfo &
 /*!
     Uninstalls the \a extension
 
-    Removes the extension's files from the install directory and unloads
+    Removes the extension's files from the install path and unloads
     the extension.
     The \l QWebEngineExtensionManager::extensionUninstallFinished signal is emitted
     after the process finished.
 
-    \sa QWebEngineExtensionManager::installDirectory(), QWebEngineExtensionInfo::isInstalled(),
+    \sa QWebEngineExtensionManager::installPath(), QWebEngineExtensionInfo::isInstalled(),
     QWebEngineExtensionInfo::error()
 */
 void QWebEngineExtensionManager::uninstallExtension(const QWebEngineExtensionInfo &extension)
@@ -140,13 +140,13 @@ void QWebEngineExtensionManager::setExtensionEnabled(const QWebEngineExtensionIn
 }
 
 /*!
-    \property QWebEngineExtensionManager::installDirectory
+    \property QWebEngineExtensionManager::installPath
     \brief Returns the directory's path where the extensions are installed.
 
     \sa installExtension(), QWebEngineExtensionInfo::isInstalled()
 */
 
-QString QWebEngineExtensionManager::installDirectory()
+QString QWebEngineExtensionManager::installPath()
 {
     return d_ptr->installDirectory();
 }
diff --git a/src/core/api/qwebengineextensionmanager.h b/src/core/api/qwebengineextensionmanager.h
index 4bff8c30443..badc1976a47 100644
--- a/src/core/api/qwebengineextensionmanager.h
+++ b/src/core/api/qwebengineextensionmanager.h
@@ -23,7 +23,7 @@ QT_BEGIN_NAMESPACE
 class Q_WEBENGINECORE_EXPORT QWebEngineExtensionManager : public QObject
 {
     Q_OBJECT
-    Q_PROPERTY(QString installDirectory READ installDirectory FINAL)
+    Q_PROPERTY(QString installPath READ installPath FINAL)
     Q_PROPERTY(QList<QWebEngineExtensionInfo> extensions READ extensions FINAL)
 public:
     QML_NAMED_ELEMENT(WebEngineExtensionManager)
@@ -37,7 +37,7 @@ class Q_WEBENGINECORE_EXPORT QWebEngineExtensionManager : public QObject
     Q_INVOKABLE void uninstallExtension(const QWebEngineExtensionInfo &extension);
     Q_INVOKABLE void setExtensionEnabled(const QWebEngineExtensionInfo &extension, bool enabled);
 
-    QString installDirectory();
+    QString installPath();
     QList<QWebEngineExtensionInfo> extensions();
 
 Q_SIGNALS:
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index 55f32e15d0d..6f71c35892b 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -325,7 +325,7 @@ static const QStringList expectedAPI = QStringList()
     << "QWebEngineExtensionManager.unloadExtension(QWebEngineExtensionInfo) --> void"
     << "QWebEngineExtensionManager.uninstallExtension(QWebEngineExtensionInfo) --> void"
     << "QWebEngineExtensionManager.setExtensionEnabled(QWebEngineExtensionInfo,bool) --> void"
-    << "QWebEngineExtensionManager.installDirectory --> QString"
+    << "QWebEngineExtensionManager.installPath --> QString"
     << "QWebEngineExtensionManager.extensionLoadFinished(QWebEngineExtensionInfo) --> void"
     << "QWebEngineExtensionManager.extensionUnloadFinished(QWebEngineExtensionInfo) --> void"
     << "QWebEngineExtensionManager.extensionInstallFinished(QWebEngineExtensionInfo) --> void"
diff --git a/tests/auto/widgets/extensions/tst_qwebengineextension.cpp b/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
index b6e7cf81fa0..92508b75973 100644
--- a/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
+++ b/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
@@ -60,7 +60,7 @@ private Q_SLOTS:
 
 int tst_QWebEngineExtension::installedFiles()
 {
-    return QDir(m_manager->installDirectory())
+    return QDir(m_manager->installPath())
             .entryInfoList(QDir::AllEntries | QDir::NoDot | QDir::NoDotDot)
             .size();
 }
@@ -115,13 +115,13 @@ QString tst_QWebEngineExtension::resourcesPath()
 
 QDir tst_QWebEngineExtension::extensionsInstallDir()
 {
-    QString path = m_manager->installDirectory();
+    QString path = m_manager->installPath();
     return QDir(path);
 }
 
 void tst_QWebEngineExtension::cleanup()
 {
-    QVERIFY(QDir(m_manager->installDirectory()).removeRecursively());
+    QVERIFY(QDir(m_manager->installPath()).removeRecursively());
     QCOMPARE(installedFiles(), 0);
     for (auto extension : m_manager->extensions())
         m_manager->unloadExtension(extension);
diff --git a/tests/manual/widgets/extensions/main.cpp b/tests/manual/widgets/extensions/main.cpp
index 938bf1fabb0..ad20aa65a1b 100644
--- a/tests/manual/widgets/extensions/main.cpp
+++ b/tests/manual/widgets/extensions/main.cpp
@@ -271,7 +271,7 @@ int main(int argc, char *argv[])
     QWebEngineProfile *profile = profileBuilder.createProfile("ExtensionsManualTest");
 
     auto *extensionManager = profile->extensionManager();
-    qDebug() << "installDir" << extensionManager->installDirectory();
+    qDebug() << "installPath" << extensionManager->installPath();
 
     QWebEngineView view(profile);
     view.setUrl(QUrl(QStringLiteral("https://www.google.com")));

From 8937136fd33e026937c72994ed75b65581bce7eb Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Tue, 29 Jul 2025 16:48:29 +0200
Subject: [PATCH 065/100] QWebEngineExtensionManager: make signal names simpler

Update tests accordingly.

Found in API-review.

Change-Id: Ife361cf95db6953413fe34392caf6fce3296c42a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit dfd0544c69de9d4e028c34a2539340944bb37848)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/api/qwebengineextensionmanager.cpp      |  8 ++++----
 src/core/api/qwebengineextensionmanager.h        |  8 ++++----
 src/core/extensions/extension_manager.cpp        | 16 ++++++++--------
 .../webui/extensions_ui_page_handler_qt.cpp      |  8 ++++----
 tests/auto/quick/publicapi/tst_publicapi.cpp     |  8 ++++----
 .../extensions/tst_qwebengineextension.cpp       | 16 ++++++++--------
 tests/manual/widgets/extensions/main.cpp         |  8 ++++----
 7 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/core/api/qwebengineextensionmanager.cpp b/src/core/api/qwebengineextensionmanager.cpp
index 043a5dbd0f5..e08b212cf91 100644
--- a/src/core/api/qwebengineextensionmanager.cpp
+++ b/src/core/api/qwebengineextensionmanager.cpp
@@ -49,7 +49,7 @@ QWebEngineExtensionManager::~QWebEngineExtensionManager() { }
 /*!
     Loads an unpacked extension from \a path
 
-    The \l QWebEngineExtensionManager::extensionLoadFinished signal is emitted when an extension
+    The \l QWebEngineExtensionManager::loadFinished signal is emitted when an extension
     is loaded or the load failed. If the load succeeded \l QWebEngineExtensionInfo::isLoaded() will
     return true otherwise \l QWebEngineExtensionInfo::error() will contain information where the
     loading process failed.
@@ -67,7 +67,7 @@ void QWebEngineExtensionManager::loadExtension(const QString &path)
 /*!
     Installs an extension from \a path to the profile's directory and loads it
 
-    The \l QWebEngineExtensionManager::extensionInstallFinished signal is emitted after an
+    The \l QWebEngineExtensionManager::installFinished signal is emitted after an
     extension is installed or the install failed. If the install succeeded \l
     QWebEngineExtensionInfo::isInstalled() will return true, otherwise \l
     QWebEngineExtensionInfo::error() will contain information how the install process failed.
@@ -96,7 +96,7 @@ void QWebEngineExtensionManager::installExtension(const QString &path)
 
     Removes all the extension's data from memory.
 
-    The \l QWebEngineExtensionManager::extensionUnloadFinished signal is emitted after the unload
+    The \l QWebEngineExtensionManager::unloadFinished signal is emitted after the unload
     process finished.
 
     \note It is also possible to unload internal extensions like Hangouts and PDF,
@@ -114,7 +114,7 @@ void QWebEngineExtensionManager::unloadExtension(const QWebEngineExtensionInfo &
 
     Removes the extension's files from the install path and unloads
     the extension.
-    The \l QWebEngineExtensionManager::extensionUninstallFinished signal is emitted
+    The \l QWebEngineExtensionManager::uninstallFinished signal is emitted
     after the process finished.
 
     \sa QWebEngineExtensionManager::installPath(), QWebEngineExtensionInfo::isInstalled(),
diff --git a/src/core/api/qwebengineextensionmanager.h b/src/core/api/qwebengineextensionmanager.h
index badc1976a47..487bd1e44fe 100644
--- a/src/core/api/qwebengineextensionmanager.h
+++ b/src/core/api/qwebengineextensionmanager.h
@@ -41,10 +41,10 @@ class Q_WEBENGINECORE_EXPORT QWebEngineExtensionManager : public QObject
     QList<QWebEngineExtensionInfo> extensions();
 
 Q_SIGNALS:
-    void extensionLoadFinished(const QWebEngineExtensionInfo &extension);
-    void extensionInstallFinished(const QWebEngineExtensionInfo &extension);
-    void extensionUnloadFinished(const QWebEngineExtensionInfo &extension);
-    void extensionUninstallFinished(const QWebEngineExtensionInfo &extension);
+    void loadFinished(const QWebEngineExtensionInfo &extension);
+    void installFinished(const QWebEngineExtensionInfo &extension);
+    void unloadFinished(const QWebEngineExtensionInfo &extension);
+    void uninstallFinished(const QWebEngineExtensionInfo &extension);
 
 private:
     friend class QtWebEngineCore::ProfileAdapter;
diff --git a/src/core/extensions/extension_manager.cpp b/src/core/extensions/extension_manager.cpp
index 1a7ceb4e371..ed554595581 100644
--- a/src/core/extensions/extension_manager.cpp
+++ b/src/core/extensions/extension_manager.cpp
@@ -88,7 +88,7 @@ void ExtensionManager::unloadExtension(const std::string &id)
     m_actionManager->removeExtensionAction(extension->id());
     m_loader->unloadExtension(extension->id());
     Q_Q(QWebEngineExtensionManager);
-    Q_EMIT q->extensionUnloadFinished(
+    Q_EMIT q->unloadFinished(
             QWebEngineExtensionInfo(createWebEngineExtensionData(this, extension)));
 }
 
@@ -99,7 +99,7 @@ void ExtensionManager::uninstallExtension(const std::string &id)
         m_installer->uninstallExtension(extension);
     } else {
         Q_Q(QWebEngineExtensionManager);
-        Q_EMIT q->extensionUninstallFinished(QWebEngineExtensionInfo(
+        Q_EMIT q->uninstallFinished(QWebEngineExtensionInfo(
                 createWebEngineExtensionData(this, extension, "This extension was not installed")));
     }
 }
@@ -150,14 +150,14 @@ QList<QWebEngineExtensionInfo> ExtensionManager::extensions()
 void ExtensionManager::onExtensionLoaded(const Extension *extension)
 {
     Q_Q(QWebEngineExtensionManager);
-    Q_EMIT q->extensionLoadFinished(
+    Q_EMIT q->loadFinished(
             QWebEngineExtensionInfo(createWebEngineExtensionData(this, extension)));
 }
 
 void ExtensionManager::onExtensionLoadError(const QString &path, const std::string &error)
 {
     Q_Q(QWebEngineExtensionManager);
-    Q_EMIT q->extensionLoadFinished(
+    Q_EMIT q->loadFinished(
             QWebEngineExtensionInfo(createWebEngineExtensionData(this, path, error)));
 }
 
@@ -165,7 +165,7 @@ void ExtensionManager::onExtensionInstalled(const Extension *extension)
 {
     m_loader->addExtension(extension);
     Q_Q(QWebEngineExtensionManager);
-    Q_EMIT q->extensionInstallFinished(
+    Q_EMIT q->installFinished(
             QWebEngineExtensionInfo(createWebEngineExtensionData(this, extension)));
 }
 
@@ -176,14 +176,14 @@ void ExtensionManager::onExtensionUninstalled(const std::string &id)
     m_loader->unloadExtension(extension->id());
 
     Q_Q(QWebEngineExtensionManager);
-    Q_EMIT q->extensionUninstallFinished(
+    Q_EMIT q->uninstallFinished(
             QWebEngineExtensionInfo(createWebEngineExtensionData(this, extension)));
 }
 
 void ExtensionManager::onExtensionInstallError(const QString &path, const std::string &error)
 {
     Q_Q(QWebEngineExtensionManager);
-    Q_EMIT q->extensionInstallFinished(
+    Q_EMIT q->installFinished(
             QWebEngineExtensionInfo(createWebEngineExtensionData(this, path, error)));
 }
 
@@ -191,7 +191,7 @@ void ExtensionManager::onExtensionUninstallError(const std::string &id, const st
 {
     scoped_refptr<const Extension> extension = m_loader->getExtensionById(id);
     Q_Q(QWebEngineExtensionManager);
-    Q_EMIT q->extensionInstallFinished(
+    Q_EMIT q->installFinished(
             QWebEngineExtensionInfo(createWebEngineExtensionData(this, extension, error)));
 }
 
diff --git a/src/core/extensions/webui/extensions_ui_page_handler_qt.cpp b/src/core/extensions/webui/extensions_ui_page_handler_qt.cpp
index 57691f84530..c6fe604ae5d 100644
--- a/src/core/extensions/webui/extensions_ui_page_handler_qt.cpp
+++ b/src/core/extensions/webui/extensions_ui_page_handler_qt.cpp
@@ -66,7 +66,7 @@ void ExtensionsUIPageHandlerQt::InnerLoadExtension(const base::FilePath &path)
     QWebEngineExtensionManager *manager = profileAdapter->extensionManager();
 
     QMetaObject::Connection *const connection = new QMetaObject::Connection;
-    *connection = QObject::connect(manager, &QWebEngineExtensionManager::extensionLoadFinished,
+    *connection = QObject::connect(manager, &QWebEngineExtensionManager::loadFinished,
                                    [this, connection]() {
                                        page_->ReloadPage();
                                        QObject::disconnect(*connection);
@@ -81,7 +81,7 @@ void ExtensionsUIPageHandlerQt::InnerInstallExtension(const base::FilePath &path
     QWebEngineExtensionManager *manager = profileAdapter->extensionManager();
 
     QMetaObject::Connection *const connection = new QMetaObject::Connection;
-    *connection = QObject::connect(manager, &QWebEngineExtensionManager::extensionInstallFinished,
+    *connection = QObject::connect(manager, &QWebEngineExtensionManager::installFinished,
                                    [this, connection]() {
                                        page_->ReloadPage();
                                        QObject::disconnect(*connection);
@@ -103,7 +103,7 @@ void ExtensionsUIPageHandlerQt::UninstallExtension(const std::string &id,
     }
 
     QMetaObject::Connection *const connection = new QMetaObject::Connection;
-    *connection = QObject::connect(manager, &QWebEngineExtensionManager::extensionUninstallFinished,
+    *connection = QObject::connect(manager, &QWebEngineExtensionManager::uninstallFinished,
                                    [connection, cb = std::move(callback)](
                                            const QWebEngineExtensionInfo &extension) mutable {
                                        std::move(cb).Run(extension.error().toStdString());
@@ -127,7 +127,7 @@ void ExtensionsUIPageHandlerQt::UnloadExtension(const std::string &id,
     }
 
     QMetaObject::Connection *const connection = new QMetaObject::Connection;
-    *connection = QObject::connect(manager, &QWebEngineExtensionManager::extensionUnloadFinished,
+    *connection = QObject::connect(manager, &QWebEngineExtensionManager::unloadFinished,
                                    [connection, cb = std::move(callback)](
                                            const QWebEngineExtensionInfo &extension) mutable {
                                        std::move(cb).Run(extension.error().toStdString());
diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp
index 6f71c35892b..a1d2dc4e6d4 100644
--- a/tests/auto/quick/publicapi/tst_publicapi.cpp
+++ b/tests/auto/quick/publicapi/tst_publicapi.cpp
@@ -326,10 +326,10 @@ static const QStringList expectedAPI = QStringList()
     << "QWebEngineExtensionManager.uninstallExtension(QWebEngineExtensionInfo) --> void"
     << "QWebEngineExtensionManager.setExtensionEnabled(QWebEngineExtensionInfo,bool) --> void"
     << "QWebEngineExtensionManager.installPath --> QString"
-    << "QWebEngineExtensionManager.extensionLoadFinished(QWebEngineExtensionInfo) --> void"
-    << "QWebEngineExtensionManager.extensionUnloadFinished(QWebEngineExtensionInfo) --> void"
-    << "QWebEngineExtensionManager.extensionInstallFinished(QWebEngineExtensionInfo) --> void"
-    << "QWebEngineExtensionManager.extensionUninstallFinished(QWebEngineExtensionInfo) --> void"
+    << "QWebEngineExtensionManager.loadFinished(QWebEngineExtensionInfo) --> void"
+    << "QWebEngineExtensionManager.unloadFinished(QWebEngineExtensionInfo) --> void"
+    << "QWebEngineExtensionManager.installFinished(QWebEngineExtensionInfo) --> void"
+    << "QWebEngineExtensionManager.uninstallFinished(QWebEngineExtensionInfo) --> void"
 #endif
     << "QWebEngineFullScreenRequest.accept() --> void"
     << "QWebEngineFullScreenRequest.origin --> QUrl"
diff --git a/tests/auto/widgets/extensions/tst_qwebengineextension.cpp b/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
index 92508b75973..4e3c5c88e40 100644
--- a/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
+++ b/tests/auto/widgets/extensions/tst_qwebengineextension.cpp
@@ -72,7 +72,7 @@ int tst_QWebEngineExtension::extensionCount()
 
 QWebEngineExtensionInfo tst_QWebEngineExtension::loadExtensionSync(const QString &path)
 {
-    QSignalSpy spy(m_manager, SIGNAL(extensionLoadFinished(QWebEngineExtensionInfo)));
+    QSignalSpy spy(m_manager, SIGNAL(loadFinished(QWebEngineExtensionInfo)));
     m_manager->loadExtension(path);
     spy.wait();
     if (spy.size() != 1) {
@@ -84,14 +84,14 @@ QWebEngineExtensionInfo tst_QWebEngineExtension::loadExtensionSync(const QString
 
 void tst_QWebEngineExtension::unloadExtensionSync(const QWebEngineExtensionInfo &extension)
 {
-    QSignalSpy spy(m_manager, SIGNAL(extensionUnloadFinished(QWebEngineExtensionInfo)));
+    QSignalSpy spy(m_manager, SIGNAL(unloadFinished(QWebEngineExtensionInfo)));
     m_manager->unloadExtension(extension);
     QTRY_COMPARE(spy.size(), 1);
 }
 
 QWebEngineExtensionInfo tst_QWebEngineExtension::installExtensionSync(const QString &path)
 {
-    QSignalSpy spy(m_manager, SIGNAL(extensionInstallFinished(QWebEngineExtensionInfo)));
+    QSignalSpy spy(m_manager, SIGNAL(installFinished(QWebEngineExtensionInfo)));
     m_manager->installExtension(path);
     spy.wait();
     if (spy.size() != 1) {
@@ -103,7 +103,7 @@ QWebEngineExtensionInfo tst_QWebEngineExtension::installExtensionSync(const QStr
 
 void tst_QWebEngineExtension::uninstallExtensionSync(const QWebEngineExtensionInfo &extension)
 {
-    QSignalSpy spy(m_manager, SIGNAL(extensionUninstallFinished(QWebEngineExtensionInfo)));
+    QSignalSpy spy(m_manager, SIGNAL(uninstallFinished(QWebEngineExtensionInfo)));
     m_manager->uninstallExtension(extension);
     QTRY_COMPARE(spy.size(), 1);
 }
@@ -271,7 +271,7 @@ void tst_QWebEngineExtension::uninstallOutsideFromProfileDir()
     QVERIFY2(extension.isLoaded(), qPrintable(extension.error()));
     QVERIFY(extension.error().isEmpty());
     QObject::connect(
-            m_manager, &QWebEngineExtensionManager::extensionUninstallFinished,
+            m_manager, &QWebEngineExtensionManager::uninstallFinished,
             [](QWebEngineExtensionInfo extension) { QVERIFY(!extension.error().isEmpty()); });
     uninstallExtensionSync(extension);
     QVERIFY(QDir(path).exists());
@@ -312,7 +312,7 @@ void tst_QWebEngineExtension::loadInIncognito()
     QWebEngineProfile profile;
     QWebEnginePage page(&profile);
     QWebEngineExtensionManager *manager = profile.extensionManager();
-    QSignalSpy spy(manager, SIGNAL(extensionLoadFinished(QWebEngineExtensionInfo)));
+    QSignalSpy spy(manager, SIGNAL(loadFinished(QWebEngineExtensionInfo)));
     manager->loadExtension(resourcesPath() + u"content_script_ext");
     QTRY_COMPARE(spy.size(), 1);
     auto extension = spy.takeFirst().at(0).value<QWebEngineExtensionInfo>();
@@ -325,7 +325,7 @@ void tst_QWebEngineExtension::installInIncognito()
     QWebEngineProfile profile;
     QWebEnginePage page(&profile);
     QWebEngineExtensionManager *manager = profile.extensionManager();
-    QSignalSpy spy(manager, SIGNAL(extensionInstallFinished(QWebEngineExtensionInfo)));
+    QSignalSpy spy(manager, SIGNAL(installFinished(QWebEngineExtensionInfo)));
     manager->installExtension(resourcesPath() + u"packed_ext.zip");
     QTRY_COMPARE(spy.size(), 1);
     auto extension = spy.takeFirst().at(0).value<QWebEngineExtensionInfo>();
@@ -342,7 +342,7 @@ void tst_QWebEngineExtension::loadInstalledExtensions()
     QWebEngineProfile *profile = profileBuilder.createProfile("Test");
     QWebEngineExtensionManager *manager = profile->extensionManager();
 
-    QSignalSpy spy(manager, SIGNAL(extensionInstallFinished(QWebEngineExtensionInfo)));
+    QSignalSpy spy(manager, SIGNAL(installFinished(QWebEngineExtensionInfo)));
     manager->installExtension(resourcesPath() + u"packed_ext.zip");
     QTRY_COMPARE(spy.size(), 1);
     auto extension = spy.takeFirst().at(0).value<QWebEngineExtensionInfo>();
diff --git a/tests/manual/widgets/extensions/main.cpp b/tests/manual/widgets/extensions/main.cpp
index ad20aa65a1b..bc711f62733 100644
--- a/tests/manual/widgets/extensions/main.cpp
+++ b/tests/manual/widgets/extensions/main.cpp
@@ -109,7 +109,7 @@ class ExtensionsWidget : public QWidget
         QObject::connect(uninstallBtn, &QPushButton::clicked, this, &ExtensionsWidget::uninstall);
         layout()->addWidget(uninstallBtn);
 
-        QObject::connect(m_extensionManager, &QWebEngineExtensionManager::extensionLoadFinished,
+        QObject::connect(m_extensionManager, &QWebEngineExtensionManager::loadFinished,
                          [this](QWebEngineExtensionInfo extension) {
                              if (!extension.isLoaded()) {
                                  showInfoDialog("Failed to load extension\n\nFile:"
@@ -123,7 +123,7 @@ class ExtensionsWidget : public QWidget
                              update();
                          });
 
-        QObject::connect(m_extensionManager, &QWebEngineExtensionManager::extensionInstallFinished,
+        QObject::connect(m_extensionManager, &QWebEngineExtensionManager::,
                          [this](QWebEngineExtensionInfo extension) {
                              if (!extension.isInstalled()) {
                                  showInfoDialog("Failed to install extension\n\nFile: "
@@ -136,7 +136,7 @@ class ExtensionsWidget : public QWidget
                              m_extensionManager->setExtensionEnabled(extension, true);
                              update();
                          });
-        QObject::connect(m_extensionManager, &QWebEngineExtensionManager::extensionUnloadFinished,
+        QObject::connect(m_extensionManager, &QWebEngineExtensionManager::unloadFinished,
                          [this](QWebEngineExtensionInfo extension) {
                              if (!extension.error().isEmpty()) {
                                  showInfoDialog("Failed to unload " + extension.name()
@@ -149,7 +149,7 @@ class ExtensionsWidget : public QWidget
                              update();
                          });
         QObject::connect(
-                m_extensionManager, &QWebEngineExtensionManager::extensionUninstallFinished,
+                m_extensionManager, &QWebEngineExtensionManager::uninstallFinished,
                 [this](QWebEngineExtensionInfo extension) {
                     if (!extension.error().isEmpty()) {
                         showInfoDialog("Failed to uninstall " + extension.name() + "\n\nFile: "

From d7bfd4c2bc2803c216f26fce13e6ed15f1fa4841 Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Tue, 29 Jul 2025 17:03:54 +0200
Subject: [PATCH 066/100] QWebEngineExtensionManager: make installPath() and
 extensions() const

Found in API-review.

Change-Id: Iac02f5a840a0a76c7fdb084f0c4d11e1f7d789d9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 51567d907769426a3518d580b7eeb60b7b7dc79f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/api/qwebengineextensionmanager.cpp | 4 ++--
 src/core/api/qwebengineextensionmanager.h   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/core/api/qwebengineextensionmanager.cpp b/src/core/api/qwebengineextensionmanager.cpp
index e08b212cf91..ed83df5e848 100644
--- a/src/core/api/qwebengineextensionmanager.cpp
+++ b/src/core/api/qwebengineextensionmanager.cpp
@@ -146,7 +146,7 @@ void QWebEngineExtensionManager::setExtensionEnabled(const QWebEngineExtensionIn
     \sa installExtension(), QWebEngineExtensionInfo::isInstalled()
 */
 
-QString QWebEngineExtensionManager::installPath()
+QString QWebEngineExtensionManager::installPath() const
 {
     return d_ptr->installDirectory();
 }
@@ -157,7 +157,7 @@ QString QWebEngineExtensionManager::installPath()
 
     \sa QWebEngineExtensionInfo
 */
-QList<QWebEngineExtensionInfo> QWebEngineExtensionManager::extensions()
+QList<QWebEngineExtensionInfo> QWebEngineExtensionManager::extensions() const
 {
     return d_ptr->extensions();
 }
diff --git a/src/core/api/qwebengineextensionmanager.h b/src/core/api/qwebengineextensionmanager.h
index 487bd1e44fe..ec806f6b2c4 100644
--- a/src/core/api/qwebengineextensionmanager.h
+++ b/src/core/api/qwebengineextensionmanager.h
@@ -37,8 +37,8 @@ class Q_WEBENGINECORE_EXPORT QWebEngineExtensionManager : public QObject
     Q_INVOKABLE void uninstallExtension(const QWebEngineExtensionInfo &extension);
     Q_INVOKABLE void setExtensionEnabled(const QWebEngineExtensionInfo &extension, bool enabled);
 
-    QString installPath();
-    QList<QWebEngineExtensionInfo> extensions();
+    QString installPath() const;
+    QList<QWebEngineExtensionInfo> extensions() const;
 
 Q_SIGNALS:
     void loadFinished(const QWebEngineExtensionInfo &extension);

From c52a957da1825e63bde9f4b208593505d06d0260 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Fri, 18 Jul 2025 14:48:33 +0200
Subject: [PATCH 067/100] Example: Fix qmllint warnings for the pdf single page
 example

-Use modern CMake api for QML modules and policies
-Use loadFromModule
-Keep support for qmake by adding/updating qmldir/qrc files
-Update resource paths to /qt/qml/<module> in accordance with QTP0001
-Qualify lookups
-Set ids in Components to be Bound
-Use Layout.preferredWith instead of width inside a Layout

With this, we can now set the maximum allowed number of qmllint warnings
to 0 in preparation of them being enforced in the CI.

Change-Id: I4d89e23f175c46b0dd565bf089db93baebea7b0c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 3aaf87afe74f769ed40137aa7884bdf3643b7da3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 examples/pdf/singlepage/.qmllint.ini          |  2 +
 examples/pdf/singlepage/CMakeLists.txt        | 63 +++++++++----------
 .../pdf/singlepage/{viewer.qml => Viewer.qml} | 35 ++++++-----
 .../pdf/singlepage/doc/src/singlepage.qdoc    |  2 +-
 examples/pdf/singlepage/main.cpp              |  8 +--
 examples/pdf/singlepage/qmldir                |  3 +
 examples/pdf/singlepage/singlepage.pro        |  2 +-
 examples/pdf/singlepage/viewer.qrc            |  5 +-
 8 files changed, 61 insertions(+), 59 deletions(-)
 create mode 100644 examples/pdf/singlepage/.qmllint.ini
 rename examples/pdf/singlepage/{viewer.qml => Viewer.qml} (87%)
 create mode 100644 examples/pdf/singlepage/qmldir

diff --git a/examples/pdf/singlepage/.qmllint.ini b/examples/pdf/singlepage/.qmllint.ini
new file mode 100644
index 00000000000..d1d97839013
--- /dev/null
+++ b/examples/pdf/singlepage/.qmllint.ini
@@ -0,0 +1,2 @@
+[General]
+MaxWarnings=0
diff --git a/examples/pdf/singlepage/CMakeLists.txt b/examples/pdf/singlepage/CMakeLists.txt
index 647a30f8d4d..41261d8dca4 100644
--- a/examples/pdf/singlepage/CMakeLists.txt
+++ b/examples/pdf/singlepage/CMakeLists.txt
@@ -4,8 +4,6 @@
 cmake_minimum_required(VERSION 3.16)
 project(singlepage LANGUAGES CXX)
 
-set(CMAKE_AUTOMOC ON)
-
 if(NOT DEFINED INSTALL_EXAMPLESDIR)
     set(INSTALL_EXAMPLESDIR "examples")
 endif()
@@ -17,48 +15,47 @@ if(NOT TARGET Qt::Svg)
     message(WARNING "QtSvg is required as runtime dependency for qtpdfquick examples.")
 endif()
 
-qt_add_executable(pdfviewerquick
+qt_standard_project_setup(REQUIRES 6.8)
+
+qt_add_executable(singlepage
     main.cpp
 )
 
-set_target_properties(pdfviewerquick PROPERTIES
+qt_add_qml_module(singlepage
+    URI SinglePage
+    QML_FILES
+        Viewer.qml
+    RESOURCES
+        resources/document-open.svg
+        resources/edit-clear.svg
+        resources/edit-copy.svg
+        resources/edit-select-all.svg
+        resources/go-down-search.svg
+        resources/go-next-view-page.svg
+        resources/go-previous-view-page.svg
+        resources/go-up-search.svg
+        resources/rotate-left.svg
+        resources/rotate-right.svg
+        resources/zoom-fit-best.svg
+        resources/zoom-fit-width.svg
+        resources/zoom-in.svg
+        resources/zoom-original.svg
+        resources/zoom-out.svg
+
+        resources/test.pdf
+)
+
+set_target_properties(singlepage PROPERTIES
     WIN32_EXECUTABLE TRUE
     MACOSX_BUNDLE TRUE
 )
 
-target_link_libraries(pdfviewerquick PUBLIC
+target_link_libraries(singlepage PUBLIC
     Qt::Gui
     Qt::Qml
 )
 
-set(viewer_resource_files
-    "resources/document-open.svg"
-    "resources/edit-clear.svg"
-    "resources/edit-copy.svg"
-    "resources/edit-select-all.svg"
-    "resources/go-down-search.svg"
-    "resources/go-next-view-page.svg"
-    "resources/go-previous-view-page.svg"
-    "resources/go-up-search.svg"
-    "resources/rotate-left.svg"
-    "resources/rotate-right.svg"
-    "resources/test.pdf"
-    "resources/zoom-fit-best.svg"
-    "resources/zoom-fit-width.svg"
-    "resources/zoom-in.svg"
-    "resources/zoom-original.svg"
-    "resources/zoom-out.svg"
-    "viewer.qml"
-)
-
-qt_add_resources(pdfviewerquick "viewer"
-    PREFIX
-        "/singlepage"
-    FILES
-        ${viewer_resource_files}
-)
-
-install(TARGETS pdfviewerquick
+install(TARGETS singlepage
     RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
     BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
     LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/pdf/singlepage/viewer.qml b/examples/pdf/singlepage/Viewer.qml
similarity index 87%
rename from examples/pdf/singlepage/viewer.qml
rename to examples/pdf/singlepage/Viewer.qml
index 9b6668a3a48..901bba7e8cb 100644
--- a/examples/pdf/singlepage/viewer.qml
+++ b/examples/pdf/singlepage/Viewer.qml
@@ -1,5 +1,8 @@
 // Copyright (C) 2022 The Qt Company Ltd.
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma ComponentBehavior: Bound
+
 import QtQuick
 import QtQuick.Controls
 import QtQuick.Dialogs
@@ -23,7 +26,7 @@ ApplicationWindow {
             ToolButton {
                 action: Action {
                     shortcut: StandardKey.Open
-                    icon.source: "qrc:/singlepage/resources/document-open.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/document-open.svg"
                     onTriggered: fileDialog.open()
                 }
             }
@@ -31,7 +34,7 @@ ApplicationWindow {
                 action: Action {
                     shortcut: StandardKey.ZoomIn
                     enabled: view.sourceSize.width < 10000
-                    icon.source: "qrc:/singlepage/resources/zoom-in.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/zoom-in.svg"
                     onTriggered: view.renderScale *= root.scaleStep
                 }
             }
@@ -39,46 +42,46 @@ ApplicationWindow {
                 action: Action {
                     shortcut: StandardKey.ZoomOut
                     enabled: view.sourceSize.width > 50
-                    icon.source: "qrc:/singlepage/resources/zoom-out.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/zoom-out.svg"
                     onTriggered: view.renderScale /= root.scaleStep
                 }
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/singlepage/resources/zoom-fit-width.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/zoom-fit-width.svg"
                     onTriggered: view.scaleToWidth(root.contentItem.width, root.contentItem.height)
                 }
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/singlepage/resources/zoom-fit-best.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/zoom-fit-best.svg"
                     onTriggered: view.scaleToPage(root.contentItem.width, root.contentItem.height)
                 }
             }
             ToolButton {
                 action: Action {
                     shortcut: "Ctrl+0"
-                    icon.source: "qrc:/singlepage/resources/zoom-original.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/zoom-original.svg"
                     onTriggered: view.resetScale()
                 }
             }
             ToolButton {
                 action: Action {
                     shortcut: "Ctrl+L"
-                    icon.source: "qrc:/singlepage/resources/rotate-left.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/rotate-left.svg"
                     onTriggered: view.pageRotation -= 90
                 }
             }
             ToolButton {
                 action: Action {
                     shortcut: "Ctrl+R"
-                    icon.source: "qrc:/singlepage/resources/rotate-right.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/rotate-right.svg"
                     onTriggered: view.pageRotation += 90
                 }
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/singlepage/resources/go-previous-view-page.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/go-previous-view-page.svg"
                     enabled: view.backEnabled
                     onTriggered: view.back()
                 }
@@ -104,7 +107,7 @@ ApplicationWindow {
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/singlepage/resources/go-next-view-page.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/go-next-view-page.svg"
                     enabled: view.forwardEnabled
                     onTriggered: view.forward()
                 }
@@ -115,14 +118,14 @@ ApplicationWindow {
             ToolButton {
                 action: Action {
                     shortcut: StandardKey.SelectAll
-                    icon.source: "qrc:/singlepage/resources/edit-select-all.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/edit-select-all.svg"
                     onTriggered: view.selectAll()
                 }
             }
             ToolButton {
                 action: Action {
                     shortcut: StandardKey.Copy
-                    icon.source: "qrc:/singlepage/resources/edit-copy.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/edit-copy.svg"
                     enabled: view.selectedText !== ""
                     onTriggered: view.copySelectionToClipboard()
                 }
@@ -235,7 +238,7 @@ ApplicationWindow {
                     Label {
                         font.bold: true
                         text: view.searchString
-                        width: implicitWidth
+                        Layout.preferredWidth: implicitWidth
                     }
                     Label {
                         text: resultDelegate.contextAfter
@@ -257,7 +260,7 @@ ApplicationWindow {
             anchors.fill: parent
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/singlepage/resources/go-up-search.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/go-up-search.svg"
                     shortcut: StandardKey.FindPrevious
                     enabled: view.searchModel.count > 0
                     onTriggered: view.searchBack()
@@ -275,7 +278,7 @@ ApplicationWindow {
                 onAccepted: searchDrawer.open()
                 Image {
                     visible: searchField.text !== ""
-                    source: "qrc:/singlepage/resources/edit-clear.svg"
+                    source: "qrc:/qt/qml/SinglePage/resources/edit-clear.svg"
                     anchors {
                         right: parent.right
                         top: parent.top
@@ -290,7 +293,7 @@ ApplicationWindow {
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/singlepage/resources/go-down-search.svg"
+                    icon.source: "qrc:/qt/qml/SinglePage/resources/go-down-search.svg"
                     shortcut: StandardKey.FindNext
                     enabled: view.searchModel.count > 0
                     onTriggered: view.searchForward()
diff --git a/examples/pdf/singlepage/doc/src/singlepage.qdoc b/examples/pdf/singlepage/doc/src/singlepage.qdoc
index 773f9acaedb..355d9e1ff24 100644
--- a/examples/pdf/singlepage/doc/src/singlepage.qdoc
+++ b/examples/pdf/singlepage/doc/src/singlepage.qdoc
@@ -22,7 +22,7 @@
     Instantiate an \l ApplicationWindow, bind its title to the title of the
     PDF document, and create a toolbar:
 
-    \quotefromfile singlepage/viewer.qml
+    \quotefromfile singlepage/Viewer.qml
     \skipto ApplicationWindow
     \printuntil rightMargin
 
diff --git a/examples/pdf/singlepage/main.cpp b/examples/pdf/singlepage/main.cpp
index be5c8f73c82..858cb581250 100644
--- a/examples/pdf/singlepage/main.cpp
+++ b/examples/pdf/singlepage/main.cpp
@@ -23,15 +23,11 @@ int main(int argc, char* argv[])
 
     QQmlApplicationEngine engine;
 
-    QUrl toLoad = QUrl("qrc:/singlepage/resources/test.pdf");
+    QUrl toLoad = QUrl("qrc:/qt/qml/SinglePage/resources/test.pdf");
     if (!parser.positionalArguments().isEmpty())
         toLoad = QUrl::fromLocalFile(parser.positionalArguments().constFirst());
 
     engine.setInitialProperties({{"source", toLoad}});
-
-    engine.load(QUrl(QStringLiteral("qrc:///singlepage/viewer.qml")));
-    if (engine.rootObjects().isEmpty())
-        return -1;
-
+    engine.loadFromModule("SinglePage", "Viewer");
     return app.exec();
 }
diff --git a/examples/pdf/singlepage/qmldir b/examples/pdf/singlepage/qmldir
new file mode 100644
index 00000000000..5522cc74356
--- /dev/null
+++ b/examples/pdf/singlepage/qmldir
@@ -0,0 +1,3 @@
+module SinglePage
+prefer :/qt/qml/SinglePage/
+Viewer 254.0 Viewer.qml
diff --git a/examples/pdf/singlepage/singlepage.pro b/examples/pdf/singlepage/singlepage.pro
index 3b9f6399db7..18560dfec91 100644
--- a/examples/pdf/singlepage/singlepage.pro
+++ b/examples/pdf/singlepage/singlepage.pro
@@ -7,7 +7,7 @@ SOURCES += main.cpp
 RESOURCES += \
     viewer.qrc
 EXAMPLE_FILES = \
-    viewer.qml
+    Viewer.qml
 
 target.path = $$[QT_INSTALL_EXAMPLES]/pdf/singlepage
 INSTALLS += target
diff --git a/examples/pdf/singlepage/viewer.qrc b/examples/pdf/singlepage/viewer.qrc
index 6f8af53ac94..96807f4ed54 100644
--- a/examples/pdf/singlepage/viewer.qrc
+++ b/examples/pdf/singlepage/viewer.qrc
@@ -1,6 +1,7 @@
 <RCC>
-    <qresource prefix="/singlepage">
-        <file>viewer.qml</file>
+    <qresource prefix="/qt/qml/SinglePage">
+        <file>Viewer.qml</file>
+        <file>qmldir</file>
         <file>resources/document-open.svg</file>
         <file>resources/edit-clear.svg</file>
         <file>resources/edit-copy.svg</file>

From 4f7d769c0dc818ea922c74a7565a86bfbe14eb3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Mon, 21 Jul 2025 10:48:50 +0200
Subject: [PATCH 068/100] Example: Fix qmllint warnings for the pdf multipage
 example

-Use modern CMake api for QML modules and policies
-Use loadFromModule
-Keep support for qmake by adding/updating qmldir/qrc files
-Update resource paths to /qt/qml/<module> in accordance with QTP0001
-Qualify lookups
-Set ids in Components to be Bound
-Use Layout.preferredWith instead of width inside a Layout

With this, we can now set the maximum allowed number of qmllint warnings
to 0 in preparation of them being enforced in the CI.

Change-Id: Ia3ebab364274ead4f1506bb3e2fcdac99ec404b2
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 70c32ebcda7dc581ade404b1def756be3315c3c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 examples/pdf/multipage/.qmllint.ini           |  2 +
 examples/pdf/multipage/CMakeLists.txt         | 59 +++++++++----------
 .../pdf/multipage/{viewer.qml => Viewer.qml}  | 56 ++++++++++--------
 examples/pdf/multipage/doc/src/multipage.qdoc |  2 +-
 examples/pdf/multipage/main.cpp               |  2 +-
 examples/pdf/multipage/multipage.pro          |  2 +-
 examples/pdf/multipage/qmldir                 |  4 ++
 examples/pdf/multipage/viewer.qrc             |  5 +-
 8 files changed, 71 insertions(+), 61 deletions(-)
 create mode 100644 examples/pdf/multipage/.qmllint.ini
 rename examples/pdf/multipage/{viewer.qml => Viewer.qml} (87%)
 create mode 100644 examples/pdf/multipage/qmldir

diff --git a/examples/pdf/multipage/.qmllint.ini b/examples/pdf/multipage/.qmllint.ini
new file mode 100644
index 00000000000..d1d97839013
--- /dev/null
+++ b/examples/pdf/multipage/.qmllint.ini
@@ -0,0 +1,2 @@
+[General]
+MaxWarnings=0
diff --git a/examples/pdf/multipage/CMakeLists.txt b/examples/pdf/multipage/CMakeLists.txt
index fb4e449fd7a..27990e3cf89 100644
--- a/examples/pdf/multipage/CMakeLists.txt
+++ b/examples/pdf/multipage/CMakeLists.txt
@@ -4,8 +4,6 @@
 cmake_minimum_required(VERSION 3.16)
 project(multipage LANGUAGES CXX)
 
-set(CMAKE_AUTOMOC ON)
-
 if(NOT DEFINED INSTALL_EXAMPLESDIR)
     set(INSTALL_EXAMPLESDIR "examples")
 endif()
@@ -17,12 +15,40 @@ if(NOT TARGET Qt::Svg)
     message(WARNING "QtSvg is required as runtime dependency for qtpdfquick examples.")
 endif()
 
+qt_standard_project_setup(REQUIRES 6.8)
+
 qt_add_executable(multipage
     main.cpp
     pdfapplication.h
     pdfapplication.cpp
 )
 
+qt_add_qml_module(multipage
+    URI MultiPage
+    QML_FILES
+        Viewer.qml
+    RESOURCES
+        resources/document-open.svg
+        resources/edit-clear.svg
+        resources/edit-copy.svg
+        resources/edit-select-all.svg
+        resources/go-down-search.svg
+        resources/go-next-view-page.svg
+        resources/go-previous-view-page.svg
+        resources/go-up-search.svg
+        resources/rotate-left.svg
+        resources/rotate-right.svg
+        resources/sidebar-collapse-left.svg
+        resources/sidebar-expand-left.svg
+        resources/zoom-fit-best.svg
+        resources/zoom-fit-width.svg
+        resources/zoom-in.svg
+        resources/zoom-original.svg
+        resources/zoom-out.svg
+
+        resources/test.pdf
+)
+
 if (APPLE AND NOT IOS)
     set(MACOSX_BUNDLE_ICON_FILE multipage.icns)
     set(app_icon_macos "${CMAKE_CURRENT_SOURCE_DIR}/resources/multipage.icns")
@@ -42,35 +68,6 @@ target_link_libraries(multipage PUBLIC
     Qt::Qml
 )
 
-set(viewer_resource_files
-    "resources/document-open.svg"
-    "resources/edit-clear.svg"
-    "resources/edit-copy.svg"
-    "resources/edit-select-all.svg"
-    "resources/go-down-search.svg"
-    "resources/go-next-view-page.svg"
-    "resources/go-previous-view-page.svg"
-    "resources/go-up-search.svg"
-    "resources/rotate-left.svg"
-    "resources/rotate-right.svg"
-    "resources/sidebar-collapse-left.svg"
-    "resources/sidebar-expand-left.svg"
-    "resources/test.pdf"
-    "resources/zoom-fit-best.svg"
-    "resources/zoom-fit-width.svg"
-    "resources/zoom-in.svg"
-    "resources/zoom-original.svg"
-    "resources/zoom-out.svg"
-    "viewer.qml"
-)
-
-qt_add_resources(multipage "viewer"
-    PREFIX
-        "/multipage"
-    FILES
-        ${viewer_resource_files}
-)
-
 install(TARGETS multipage
     RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
     BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/pdf/multipage/viewer.qml b/examples/pdf/multipage/Viewer.qml
similarity index 87%
rename from examples/pdf/multipage/viewer.qml
rename to examples/pdf/multipage/Viewer.qml
index 55ca2994a2a..d3ac6123036 100644
--- a/examples/pdf/multipage/viewer.qml
+++ b/examples/pdf/multipage/Viewer.qml
@@ -1,5 +1,8 @@
 // Copyright (C) 2022 The Qt Company Ltd.
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma ComponentBehavior: Bound
+
 import QtQuick
 import QtQuick.Controls
 import QtQuick.Dialogs
@@ -22,7 +25,7 @@ ApplicationWindow {
             ToolButton {
                 action: Action {
                     shortcut: StandardKey.Open
-                    icon.source: "qrc:/multipage/resources/document-open.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/document-open.svg"
                     onTriggered: fileDialog.open()
                 }
             }
@@ -30,7 +33,7 @@ ApplicationWindow {
                 action: Action {
                     shortcut: StandardKey.ZoomIn
                     enabled: view.renderScale < 10
-                    icon.source: "qrc:/multipage/resources/zoom-in.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/zoom-in.svg"
                     onTriggered: view.renderScale *= Math.sqrt(2)
                 }
             }
@@ -38,46 +41,46 @@ ApplicationWindow {
                 action: Action {
                     shortcut: StandardKey.ZoomOut
                     enabled: view.renderScale > 0.1
-                    icon.source: "qrc:/multipage/resources/zoom-out.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/zoom-out.svg"
                     onTriggered: view.renderScale /= Math.sqrt(2)
                 }
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/multipage/resources/zoom-fit-width.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/zoom-fit-width.svg"
                     onTriggered: view.scaleToWidth(root.contentItem.width, root.contentItem.height)
                 }
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/multipage/resources/zoom-fit-best.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/zoom-fit-best.svg"
                     onTriggered: view.scaleToPage(root.contentItem.width, root.contentItem.height)
                 }
             }
             ToolButton {
                 action: Action {
                     shortcut: "Ctrl+0"
-                    icon.source: "qrc:/multipage/resources/zoom-original.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/zoom-original.svg"
                     onTriggered: view.resetScale()
                 }
             }
             ToolButton {
                 action: Action {
                     shortcut: "Ctrl+L"
-                    icon.source: "qrc:/multipage/resources/rotate-left.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/rotate-left.svg"
                     onTriggered: view.pageRotation -= 90
                 }
             }
             ToolButton {
                 action: Action {
                     shortcut: "Ctrl+R"
-                    icon.source: "qrc:/multipage/resources/rotate-right.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/rotate-right.svg"
                     onTriggered: view.pageRotation += 90
                 }
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/multipage/resources/go-previous-view-page.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/go-previous-view-page.svg"
                     enabled: view.backEnabled
                     onTriggered: view.back()
                 }
@@ -102,7 +105,7 @@ ApplicationWindow {
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/multipage/resources/go-next-view-page.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/go-next-view-page.svg"
                     enabled: view.forwardEnabled
                     onTriggered: view.forward()
                 }
@@ -113,14 +116,14 @@ ApplicationWindow {
             ToolButton {
                 action: Action {
                     shortcut: StandardKey.SelectAll
-                    icon.source: "qrc:/multipage/resources/edit-select-all.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/edit-select-all.svg"
                     onTriggered: view.selectAll()
                 }
             }
             ToolButton {
                 action: Action {
                     shortcut: StandardKey.Copy
-                    icon.source: "qrc:/multipage/resources/edit-copy.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/edit-copy.svg"
                     enabled: view.selectedText !== ""
                     onTriggered: view.copySelectionToClipboard()
                 }
@@ -248,14 +251,14 @@ ApplicationWindow {
                 anchors.fill: parent
                 currentIndex: sidebarTabs.currentIndex
                 component InfoField: TextInput {
-                    width: parent.width
+                    Layout.preferredWidth: parent.width
                     selectByMouse: true
                     readOnly: true
                     wrapMode: Text.WordWrap
                 }
                 Column {
                     spacing: 6
-                    width: parent.width - 6
+                    Layout.preferredWidth: parent.width - 6
                     Label { font.bold: true; text: qsTr("Title") }
                     InfoField { text: doc.title }
                     Label { font.bold: true; text: qsTr("Author") }
@@ -302,7 +305,7 @@ ApplicationWindow {
                             Label {
                                 font.bold: true
                                 text: view.searchString
-                                width: implicitWidth
+                                Layout.preferredWidth: implicitWidth
                             }
                             Label {
                                 text: resultDelegate.contextAfter
@@ -339,6 +342,7 @@ ApplicationWindow {
                     cellWidth: width / 2
                     cellHeight: cellWidth + 10
                     delegate: Item {
+                        id: del
                         required property int index
                         required property string label
                         required property size pointSize
@@ -353,13 +357,13 @@ ApplicationWindow {
                             PdfPageImage {
                                 id: image
                                 document: doc
-                                currentFrame: index
+                                currentFrame: del.index
                                 asynchronous: true
                                 fillMode: Image.PreserveAspectFit
-                                property bool landscape: pointSize.width > pointSize.height
+                                property bool landscape: del.pointSize.width > del.pointSize.height
                                 width: landscape ? thumbnailsView.cellWidth - 6
-                                                 : height * pointSize.width / pointSize.height
-                                height: landscape ? width * pointSize.height / pointSize.width
+                                                 : height * del.pointSize.width / del.pointSize.height
+                                height: landscape ? width * del.pointSize.height / del.pointSize.width
                                                   : thumbnailsView.cellHeight - 14
                                 sourceSize.width: width
                                 sourceSize.height: height
@@ -369,10 +373,10 @@ ApplicationWindow {
                             id: pageNumber
                             anchors.bottom: parent.bottom
                             anchors.horizontalCenter: parent.horizontalCenter
-                            text: label
+                            text: del.label
                         }
                         TapHandler {
-                            onTapped: view.goToPage(index)
+                            onTapped: view.goToPage(del.index)
                         }
                     }
                 }
@@ -390,7 +394,9 @@ ApplicationWindow {
                     id: sidebarOpenAction
                     checkable: true
                     checked: sidebar.opened
-                    icon.source: checked ? "qrc:/multipage/resources/sidebar-collapse-left.svg" : "qrc:/multipage/resources/sidebar-expand-left.svg"
+                    icon.source: checked
+                                 ? "qrc:/qt/qml/MultiPage/resources/sidebar-collapse-left.svg"
+                                 : "qrc:/qt/qml/MultiPage/resources/sidebar-expand-left.svg"
                     onTriggered: sidebar.open()
                 }
                 ToolTip.visible: enabled && hovered
@@ -399,7 +405,7 @@ ApplicationWindow {
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/multipage/resources/go-up-search.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/go-up-search.svg"
                     shortcut: StandardKey.FindPrevious
                     enabled: view.searchModel.count > 0
                     onTriggered: view.searchBack()
@@ -420,7 +426,7 @@ ApplicationWindow {
                 }
                 Image {
                     visible: searchField.text !== ""
-                    source: "qrc:/multipage/resources/edit-clear.svg"
+                    source: "qrc:/qt/qml/MultiPage/resources/edit-clear.svg"
                     sourceSize.height: searchField.height - 6
                     anchors {
                         right: parent.right
@@ -434,7 +440,7 @@ ApplicationWindow {
             }
             ToolButton {
                 action: Action {
-                    icon.source: "qrc:/multipage/resources/go-down-search.svg"
+                    icon.source: "qrc:/qt/qml/MultiPage/resources/go-down-search.svg"
                     shortcut: StandardKey.FindNext
                     enabled: view.searchModel.count > 0
                     onTriggered: view.searchForward()
diff --git a/examples/pdf/multipage/doc/src/multipage.qdoc b/examples/pdf/multipage/doc/src/multipage.qdoc
index 7ce4b4a8b6e..ff751b952bc 100644
--- a/examples/pdf/multipage/doc/src/multipage.qdoc
+++ b/examples/pdf/multipage/doc/src/multipage.qdoc
@@ -22,7 +22,7 @@
     Instantiate an \l ApplicationWindow, bind its title to the title of the
     PDF document, and create a toolbar:
 
-    \quotefromfile multipage/viewer.qml
+    \quotefromfile multipage/Viewer.qml
     \skipto ApplicationWindow
     \printuntil rightMargin
 
diff --git a/examples/pdf/multipage/main.cpp b/examples/pdf/multipage/main.cpp
index b9c31c7f81b..14c1aa9511b 100644
--- a/examples/pdf/multipage/main.cpp
+++ b/examples/pdf/multipage/main.cpp
@@ -13,7 +13,7 @@ int main(int argc, char* argv[])
     PdfApplication app(argc, argv);
 
     QQmlApplicationEngine engine;
-    engine.load(QUrl(QStringLiteral("qrc:///multipage/viewer.qml")));
+    engine.loadFromModule("MultiPage", "Viewer");
     app.setFileOpener(engine.rootObjects().constFirst());
     if (app.arguments().count() > 1) {
         // alternatively, use QUrl::fromLocalFile(): network loading is not supported yet
diff --git a/examples/pdf/multipage/multipage.pro b/examples/pdf/multipage/multipage.pro
index c1265133579..9e5c8cb43b5 100644
--- a/examples/pdf/multipage/multipage.pro
+++ b/examples/pdf/multipage/multipage.pro
@@ -7,7 +7,7 @@ SOURCES += main.cpp pdfapplication.cpp
 RESOURCES += \
     viewer.qrc
 EXAMPLE_FILES = \
-    viewer.qml
+    Viewer.qml
 
 target.path = $$[QT_INSTALL_EXAMPLES]/pdf/multipage
 INSTALLS += target
diff --git a/examples/pdf/multipage/qmldir b/examples/pdf/multipage/qmldir
new file mode 100644
index 00000000000..80b5ee1c4a7
--- /dev/null
+++ b/examples/pdf/multipage/qmldir
@@ -0,0 +1,4 @@
+module MultiPage
+typeinfo multipage.qmltypes
+prefer :/qt/qml/MultiPage/
+Viewer 254.0 Viewer.qml
diff --git a/examples/pdf/multipage/viewer.qrc b/examples/pdf/multipage/viewer.qrc
index b8ec1c8c68e..69ddd90c289 100644
--- a/examples/pdf/multipage/viewer.qrc
+++ b/examples/pdf/multipage/viewer.qrc
@@ -1,6 +1,7 @@
 <RCC>
-    <qresource prefix="/multipage">
-        <file>viewer.qml</file>
+    <qresource prefix="/qt/qml/MultiPage">
+        <file>Viewer.qml</file>
+        <file>qmldir</file>
         <file>resources/document-open.svg</file>
         <file>resources/edit-clear.svg</file>
         <file>resources/edit-copy.svg</file>

From 223149cc6a06577d2414d35b51f4f3ce9f61dbae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Mon, 21 Jul 2025 14:00:25 +0200
Subject: [PATCH 069/100] Examples: Move quicknanobrowser to qt_add_qml_module
 and loadFromModule

There is also no need to check for loadFromModule failing to load the
module as we explicitly added it from CMake.

Task-number: QTBUG-138589
Change-Id: Iddc1aae0c66ff6f4fc3ddaa43b8e066c16952b0c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 39e02f94d084d5d6dcc3d0e390c3cae589319b69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../quicknanobrowser/BrowserWindow.qml        |  8 ++--
 .../quicknanobrowser/CMakeLists.txt           | 44 +++++++------------
 .../quicknanobrowser/DownloadView.qml         |  2 +-
 .../webenginequick/quicknanobrowser/main.cpp  |  4 +-
 4 files changed, 23 insertions(+), 35 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index 365d77d217b..1e89625d1be 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -197,21 +197,23 @@ ApplicationWindow {
 
             ToolButton {
                 id: backButton
-                icon.source: "qrc:/icons/go-previous.png"
+                icon.source: "icons/3rdparty/go-previous.png"
                 onClicked: currentWebView.goBack()
                 enabled: currentWebView && currentWebView.canGoBack
                 activeFocusOnTab: !browserWindow.platformIsMac
             }
             ToolButton {
                 id: forwardButton
-                icon.source: "qrc:/icons/go-next.png"
+                icon.source: "icons/3rdparty/go-next.png"
                 onClicked: currentWebView.goForward()
                 enabled: currentWebView && currentWebView.canGoForward
                 activeFocusOnTab: !browserWindow.platformIsMac
             }
             ToolButton {
                 id: reloadButton
-                icon.source: currentWebView && currentWebView.loading ? "qrc:/icons/process-stop.png" : "qrc:/icons/view-refresh.png"
+                icon.source: currentWebView && currentWebView.loading
+                             ? "icons/3rdparty/process-stop.png"
+                             : "icons/3rdparty/view-refresh.png"
                 onClicked: currentWebView && currentWebView.loading ? currentWebView.stop() : currentWebView.reload()
                 activeFocusOnTab: !browserWindow.platformIsMac
             }
diff --git a/examples/webenginequick/quicknanobrowser/CMakeLists.txt b/examples/webenginequick/quicknanobrowser/CMakeLists.txt
index 058f345d75e..4b81d8dd9cf 100644
--- a/examples/webenginequick/quicknanobrowser/CMakeLists.txt
+++ b/examples/webenginequick/quicknanobrowser/CMakeLists.txt
@@ -4,8 +4,6 @@
 cmake_minimum_required(VERSION 3.16)
 project(quicknanobrowser LANGUAGES CXX)
 
-set(CMAKE_AUTOMOC ON)
-
 if(NOT DEFINED INSTALL_EXAMPLESDIR)
     set(INSTALL_EXAMPLESDIR "examples")
 endif()
@@ -14,9 +12,10 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/webenginequick/quicknanobrowser")
 
 find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick WebEngineQuick)
 
+qt_standard_project_setup(REQUIRES 6.8)
+
 qt_add_executable(quicknanobrowser
     main.cpp
-    utils.h
 )
 
 if(WIN32)
@@ -42,32 +41,21 @@ target_link_libraries(quicknanobrowser PUBLIC
 
 qt_add_qml_module(quicknanobrowser
     URI BrowserUtils
-    VERSION 1.0
     QML_FILES
-        "ApplicationRoot.qml"
-        "BrowserDialog.qml"
-        "BrowserWindow.qml"
-        "DownloadView.qml"
-        "FindBar.qml"
-        "FullScreenNotification.qml"
-        "WebAuthDialog.qml"
-    RESOURCE_PREFIX /
-)
-
-set(resources1_resource_files
-    "icons/3rdparty/go-next.png"
-    "icons/3rdparty/go-previous.png"
-    "icons/3rdparty/process-stop.png"
-    "icons/3rdparty/view-refresh.png"
-)
-
-qt_add_resources(quicknanobrowser "resources1"
-    PREFIX
-        "/icons"
-    BASE
-        "icons/3rdparty"
-    FILES
-        ${resources1_resource_files}
+        ApplicationRoot.qml
+        BrowserDialog.qml
+        BrowserWindow.qml
+        DownloadView.qml
+        FindBar.qml
+        FullScreenNotification.qml
+        WebAuthDialog.qml
+    SOURCES
+        utils.h
+    RESOURCES
+        icons/3rdparty/go-next.png
+        icons/3rdparty/go-previous.png
+        icons/3rdparty/process-stop.png
+        icons/3rdparty/view-refresh.png
 )
 
 if(TARGET Qt::Widgets)
diff --git a/examples/webenginequick/quicknanobrowser/DownloadView.qml b/examples/webenginequick/quicknanobrowser/DownloadView.qml
index b116ab86734..baac8704790 100644
--- a/examples/webenginequick/quicknanobrowser/DownloadView.qml
+++ b/examples/webenginequick/quicknanobrowser/DownloadView.qml
@@ -64,7 +64,7 @@ Rectangle {
                 Button {
                     id: cancelButton
                     anchors.right: parent.right
-                    icon.source: "qrc:/icons/process-stop.png"
+                    icon.source: "icons/3rdparty/process-stop.png"
                     onClicked: {
                         var download = downloadModel.downloads[index];
 
diff --git a/examples/webenginequick/quicknanobrowser/main.cpp b/examples/webenginequick/quicknanobrowser/main.cpp
index 1267986a4f9..f11b73d5e7b 100644
--- a/examples/webenginequick/quicknanobrowser/main.cpp
+++ b/examples/webenginequick/quicknanobrowser/main.cpp
@@ -41,9 +41,7 @@ int main(int argc, char **argv)
     parser.process(app);
 
     QQmlApplicationEngine appEngine;
-    appEngine.load(QUrl("qrc:/BrowserUtils/ApplicationRoot.qml"));
-    if (appEngine.rootObjects().isEmpty())
-        qFatal("Failed to load sources");
+    appEngine.loadFromModule("BrowserUtils", "ApplicationRoot");
 
     const QUrl url = startupUrl(parser);
     QMetaObject::invokeMethod(appEngine.rootObjects().constFirst(),

From 6ce080b3641f3065a74fd0ffda909721c6fa5f84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Mon, 21 Jul 2025 15:05:03 +0200
Subject: [PATCH 070/100] Examples: Fix quicknanobrowser qmllint warnings:
 ApplicationRoot.qml

Task-number: QTBUG-138589
Change-Id: I4f05186032f9c074391aafb55001801c99a54eab
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 486fe53ef7ec89e27f3b09b556401adcba53555f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../quicknanobrowser/ApplicationRoot.qml         | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/ApplicationRoot.qml b/examples/webenginequick/quicknanobrowser/ApplicationRoot.qml
index f362498020e..ec571620731 100644
--- a/examples/webenginequick/quicknanobrowser/ApplicationRoot.qml
+++ b/examples/webenginequick/quicknanobrowser/ApplicationRoot.qml
@@ -1,22 +1,24 @@
 // Copyright (C) 2022 The Qt Company Ltd.
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
 
+pragma ComponentBehavior: Bound
+
 import QtQuick
 import QtWebEngine
 
 QtObject {
     id: root
 
-    property QtObject defaultProfilePrototype : WebEngineProfilePrototype {
+    property WebEngineProfilePrototype defaultProfilePrototype : WebEngineProfilePrototype {
         storageName: "Profile"
         Component.onCompleted: {
-            let fullVersionList = defaultProfilePrototype.instance().clientHints.fullVersionList;
+            let fullVersionList = root.defaultProfilePrototype.instance().clientHints.fullVersionList;
             fullVersionList["QuickNanoBrowser"] = "1.0";
-            defaultProfilePrototype.instance().clientHints.fullVersionList = fullVersionList;
+            root.defaultProfilePrototype.instance().clientHints.fullVersionList = fullVersionList;
         }
     }
 
-    property QtObject otrPrototype : WebEngineProfilePrototype {
+    property WebEngineProfilePrototype otrPrototype : WebEngineProfilePrototype {
     }
 
     property Component browserWindowComponent: BrowserWindow {
@@ -26,18 +28,18 @@ QtObject {
         onClosing: destroy()
     }
     function createWindow(profile) {
-        var newWindow = browserWindowComponent.createObject(root);
+        var newWindow = browserWindowComponent.createObject(root) as BrowserWindow;
         newWindow.currentWebView.profile = profile;
         profile.downloadRequested.connect(newWindow.onDownloadRequested);
         return newWindow;
     }
     function createDialog(profile) {
-        var newDialog = browserDialogComponent.createObject(root);
+        var newDialog = browserDialogComponent.createObject(root) as BrowserDialog;
         newDialog.currentWebView.profile = profile;
         return newDialog;
     }
     function load(url) {
-        var browserWindow = createWindow(defaultProfilePrototype.instance());
+        var browserWindow = createWindow(root.defaultProfilePrototype.instance());
         browserWindow.currentWebView.url = url;
     }
 }

From b171cafe634ee18ea758dc61ee335cf98b50f3fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Mon, 21 Jul 2025 15:13:05 +0200
Subject: [PATCH 071/100] Examples: Rename browserWindow id to win

It needs to be used all over the place and is too long. Shorten it for
readability.

Task-number: QTBUG-138589
Change-Id: I170e2ec554944ad2a712778d1508ad08d71fa796
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit fd6e9ff44f90e0fbd1d73eb8c533774d0774dceb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../quicknanobrowser/BrowserWindow.qml        | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index 1e89625d1be..0983c79db07 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -12,7 +12,7 @@ import QtWebEngine
 import BrowserUtils
 
 ApplicationWindow {
-    id: browserWindow
+    id: win
     property QtObject applicationRoot
     property Item currentWebView: tabBar.currentIndex < tabBar.count ? tabLayout.children[tabBar.currentIndex] : null
     property int previousVisibility: Window.Windowed
@@ -85,13 +85,13 @@ ApplicationWindow {
     }
     Action {
         shortcut: StandardKey.Quit
-        onTriggered: browserWindow.close()
+        onTriggered: win.close()
     }
     Action {
         shortcut: "Escape"
         onTriggered: {
             if (currentWebView.state == "FullScreen") {
-                browserWindow.visibility = browserWindow.previousVisibility;
+                win.visibility = win.previousVisibility;
                 fullScreenNotification.hide();
                 currentWebView.triggerWebAction(WebEngineView.ExitFullScreen);
             }
@@ -200,14 +200,14 @@ ApplicationWindow {
                 icon.source: "icons/3rdparty/go-previous.png"
                 onClicked: currentWebView.goBack()
                 enabled: currentWebView && currentWebView.canGoBack
-                activeFocusOnTab: !browserWindow.platformIsMac
+                activeFocusOnTab: !win.platformIsMac
             }
             ToolButton {
                 id: forwardButton
                 icon.source: "icons/3rdparty/go-next.png"
                 onClicked: currentWebView.goForward()
                 enabled: currentWebView && currentWebView.canGoForward
-                activeFocusOnTab: !browserWindow.platformIsMac
+                activeFocusOnTab: !win.platformIsMac
             }
             ToolButton {
                 id: reloadButton
@@ -215,7 +215,7 @@ ApplicationWindow {
                              ? "icons/3rdparty/process-stop.png"
                              : "icons/3rdparty/view-refresh.png"
                 onClicked: currentWebView && currentWebView.loading ? currentWebView.stop() : currentWebView.reload()
-                activeFocusOnTab: !browserWindow.platformIsMac
+                activeFocusOnTab: !win.platformIsMac
             }
             TextField {
                 id: addressBar
@@ -518,7 +518,7 @@ ApplicationWindow {
                 tabBar.removeItem(tabBar.itemAt(index));
                 tabLayout.children[index].destroy();
             } else {
-                browserWindow.close();
+                win.close();
             }
         }
 
@@ -597,12 +597,12 @@ ApplicationWindow {
                 onFullScreenRequested: function(request) {
                     if (request.toggleOn) {
                         webEngineView.state = "FullScreen";
-                        browserWindow.previousVisibility = browserWindow.visibility;
-                        browserWindow.showFullScreen();
+                        win.previousVisibility = win.visibility;
+                        win.showFullScreen();
                         fullScreenNotification.show();
                     } else {
                         webEngineView.state = "";
-                        browserWindow.visibility = browserWindow.previousVisibility;
+                        win.visibility = win.previousVisibility;
                         fullScreenNotification.hide();
                     }
                     request.accept();
@@ -746,7 +746,7 @@ ApplicationWindow {
     Dialog {
         id: permissionDialog
         anchors.centerIn: parent
-        width: Math.min(browserWindow.width, browserWindow.height) / 3 * 2
+        width: Math.min(win.width, win.height) / 3 * 2
         contentWidth: mainTextForPermissionDialog.width
         contentHeight: mainTextForPermissionDialog.height
         standardButtons: Dialog.No | Dialog.Yes

From d1725948d37e47a7f30809c54165a9031890b63f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Mon, 21 Jul 2025 15:18:59 +0200
Subject: [PATCH 072/100] Examples: Fix issues with currentWebView in
 quicknanobrowser

Qualify lookups to it, set its actual type, set pragma
ComponentBehavior.

Task-number: QTBUG-138589
Change-Id: Ic6b7cc6f16af1677ac4e2b2bcd57aa00a686ca6f
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 031e3ec100643987b9eafac09f0f67f4718aa79f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../quicknanobrowser/BrowserWindow.qml        | 104 +++++++++---------
 1 file changed, 53 insertions(+), 51 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index 0983c79db07..7dbb6b2938d 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -1,6 +1,8 @@
 // Copyright (C) 2022 The Qt Company Ltd.
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
 
+pragma ComponentBehavior: Bound
+
 import QtCore
 import QtQml
 import QtQuick
@@ -14,14 +16,14 @@ import BrowserUtils
 ApplicationWindow {
     id: win
     property QtObject applicationRoot
-    property Item currentWebView: tabBar.currentIndex < tabBar.count ? tabLayout.children[tabBar.currentIndex] : null
+    property WebEngineView currentWebView: tabBar.currentIndex < tabBar.count ? tabLayout.children[tabBar.currentIndex] : null
     property int previousVisibility: Window.Windowed
     property int createdTabs: 0
 
     width: 1300
     height: 900
     visible: true
-    title: currentWebView && currentWebView.title
+    title: win.currentWebView && win.currentWebView.title
 
     // Make sure the Qt.WindowFullscreenButtonHint is set on OS X.
     Component.onCompleted: flags = flags | Qt.WindowFullscreenButtonHint
@@ -65,14 +67,14 @@ ApplicationWindow {
     Action {
         shortcut: StandardKey.Refresh
         onTriggered: {
-            if (currentWebView)
-                currentWebView.reload();
+            if (win.currentWebView)
+                win.currentWebView.reload();
         }
     }
     Action {
         shortcut: StandardKey.AddTab
         onTriggered: {
-            tabBar.createTab(tabBar.count != 0 ? currentWebView.profile : defaultProfilePrototype.instance());
+            tabBar.createTab(tabBar.count != 0 ? win.currentWebView.profile : defaultProfilePrototype.instance());
             addressBar.forceActiveFocus();
             addressBar.selectAll();
         }
@@ -80,7 +82,7 @@ ApplicationWindow {
     Action {
         shortcut: StandardKey.Close
         onTriggered: {
-            currentWebView.triggerWebAction(WebEngineView.RequestClose);
+            win.currentWebView.triggerWebAction(WebEngineView.RequestClose);
         }
     }
     Action {
@@ -90,10 +92,10 @@ ApplicationWindow {
     Action {
         shortcut: "Escape"
         onTriggered: {
-            if (currentWebView.state == "FullScreen") {
+            if (win.currentWebView.state == "FullScreen") {
                 win.visibility = win.previousVisibility;
                 fullScreenNotification.hide();
-                currentWebView.triggerWebAction(WebEngineView.ExitFullScreen);
+                win.currentWebView.triggerWebAction(WebEngineView.ExitFullScreen);
             }
 
             if (findBar.visible)
@@ -102,52 +104,52 @@ ApplicationWindow {
     }
     Action {
         shortcut: "Ctrl+0"
-        onTriggered: currentWebView.zoomFactor = 1.0
+        onTriggered: win.currentWebView.zoomFactor = 1.0
     }
     Action {
         shortcut: StandardKey.ZoomOut
-        onTriggered: currentWebView.zoomFactor -= 0.1
+        onTriggered: win.currentWebView.zoomFactor -= 0.1
     }
     Action {
         shortcut: StandardKey.ZoomIn
-        onTriggered: currentWebView.zoomFactor += 0.1
+        onTriggered: win.currentWebView.zoomFactor += 0.1
     }
 
     Action {
         shortcut: StandardKey.Copy
-        onTriggered: currentWebView.triggerWebAction(WebEngineView.Copy)
+        onTriggered: win.currentWebView.triggerWebAction(WebEngineView.Copy)
     }
     Action {
         shortcut: StandardKey.Cut
-        onTriggered: currentWebView.triggerWebAction(WebEngineView.Cut)
+        onTriggered: win.currentWebView.triggerWebAction(WebEngineView.Cut)
     }
     Action {
         shortcut: StandardKey.Paste
-        onTriggered: currentWebView.triggerWebAction(WebEngineView.Paste)
+        onTriggered: win.currentWebView.triggerWebAction(WebEngineView.Paste)
     }
     Action {
         shortcut: "Shift+"+StandardKey.Paste
-        onTriggered: currentWebView.triggerWebAction(WebEngineView.PasteAndMatchStyle)
+        onTriggered: win.currentWebView.triggerWebAction(WebEngineView.PasteAndMatchStyle)
     }
     Action {
         shortcut: StandardKey.SelectAll
-        onTriggered: currentWebView.triggerWebAction(WebEngineView.SelectAll)
+        onTriggered: win.currentWebView.triggerWebAction(WebEngineView.SelectAll)
     }
     Action {
         shortcut: StandardKey.Undo
-        onTriggered: currentWebView.triggerWebAction(WebEngineView.Undo)
+        onTriggered: win.currentWebView.triggerWebAction(WebEngineView.Undo)
     }
     Action {
         shortcut: StandardKey.Redo
-        onTriggered: currentWebView.triggerWebAction(WebEngineView.Redo)
+        onTriggered: win.currentWebView.triggerWebAction(WebEngineView.Redo)
     }
     Action {
         shortcut: StandardKey.Back
-        onTriggered: currentWebView.triggerWebAction(WebEngineView.Back)
+        onTriggered: win.currentWebView.triggerWebAction(WebEngineView.Back)
     }
     Action {
         shortcut: StandardKey.Forward
-        onTriggered: currentWebView.triggerWebAction(WebEngineView.Forward)
+        onTriggered: win.currentWebView.triggerWebAction(WebEngineView.Forward)
     }
     Action {
         shortcut: StandardKey.Find
@@ -170,16 +172,16 @@ ApplicationWindow {
         RowLayout {
             anchors.fill: parent
             ToolButton {
-                enabled: currentWebView && (currentWebView.canGoBack || currentWebView.canGoForward)
+                enabled: win.currentWebView && (win.currentWebView.canGoBack || win.currentWebView.canGoForward)
                 onClicked: historyMenu.open()
                 text: qsTr("▼")
                 Menu {
                     id: historyMenu
                     Instantiator {
-                        model: currentWebView && currentWebView.history.items
+                        model: win.currentWebView && win.currentWebView.history.items
                         MenuItem {
                             text: model.title
-                            onTriggered: currentWebView.goBackOrForward(model.offset)
+                            onTriggered: win.currentWebView.goBackOrForward(model.offset)
                             checkable: !enabled
                             checked: !enabled
                             enabled: model.offset
@@ -198,23 +200,23 @@ ApplicationWindow {
             ToolButton {
                 id: backButton
                 icon.source: "icons/3rdparty/go-previous.png"
-                onClicked: currentWebView.goBack()
-                enabled: currentWebView && currentWebView.canGoBack
+                onClicked: win.currentWebView.goBack()
+                enabled: win.currentWebView && win.currentWebView.canGoBack
                 activeFocusOnTab: !win.platformIsMac
             }
             ToolButton {
                 id: forwardButton
                 icon.source: "icons/3rdparty/go-next.png"
-                onClicked: currentWebView.goForward()
-                enabled: currentWebView && currentWebView.canGoForward
+                onClicked: win.currentWebView.goForward()
+                enabled: win.currentWebView && win.currentWebView.canGoForward
                 activeFocusOnTab: !win.platformIsMac
             }
             ToolButton {
                 id: reloadButton
-                icon.source: currentWebView && currentWebView.loading
+                icon.source: win.currentWebView && win.currentWebView.loading
                              ? "icons/3rdparty/process-stop.png"
                              : "icons/3rdparty/view-refresh.png"
-                onClicked: currentWebView && currentWebView.loading ? currentWebView.stop() : currentWebView.reload()
+                onClicked: win.currentWebView && win.currentWebView.loading ? win.currentWebView.stop() : win.currentWebView.reload()
                 activeFocusOnTab: !win.platformIsMac
             }
             TextField {
@@ -226,7 +228,7 @@ ApplicationWindow {
                     id: faviconImage
                     width: 16; height: 16
                     sourceSize: Qt.size(width, height)
-                    source: currentWebView && currentWebView.icon ? currentWebView.icon : ''
+                    source: win.currentWebView && win.currentWebView.icon ? win.currentWebView.icon : ''
                 }
                 MouseArea {
                     id: textFieldMouseArea
@@ -274,10 +276,10 @@ ApplicationWindow {
                 focus: true
                 Layout.fillWidth: true
                 Binding on text {
-                    when: currentWebView
-                    value: currentWebView.url
+                    when: win.currentWebView
+                    value: win.currentWebView.url
                 }
-                onAccepted: currentWebView.url = Utils.fromUserInput(text)
+                onAccepted: win.currentWebView.url = Utils.fromUserInput(text)
                 selectByMouse: true
             }
             ToolButton {
@@ -321,21 +323,21 @@ ApplicationWindow {
                         id: offTheRecordEnabled
                         text: "Off The Record"
                         checkable: true
-                        checked: currentWebView && currentWebView.profile === otrPrototype.instance()
+                        checked: win.currentWebView && win.currentWebView.profile === otrPrototype.instance()
                         onToggled: function(checked) {
-                            if (currentWebView) {
-                                currentWebView.profile = checked ? otrPrototype.instance() : defaultProfilePrototype.instance();
+                            if (win.currentWebView) {
+                                win.currentWebView.profile = checked ? otrPrototype.instance() : defaultProfilePrototype.instance();
                             }
                         }
                     }
                     MenuItem {
                         id: httpDiskCacheEnabled
                         text: "HTTP Disk Cache"
-                        checkable: currentWebView && !currentWebView.profile.offTheRecord
-                        checked: currentWebView && (currentWebView.profile.httpCacheType === WebEngineProfile.DiskHttpCache)
+                        checkable: win.currentWebView && !win.currentWebView.profile.offTheRecord
+                        checked: win.currentWebView && (win.currentWebView.profile.httpCacheType === WebEngineProfile.DiskHttpCache)
                         onToggled: function(checked) {
-                            if (currentWebView) {
-                                currentWebView.profile.httpCacheType = checked ? WebEngineProfile.DiskHttpCache : WebEngineProfile.MemoryHttpCache;
+                            if (win.currentWebView) {
+                                win.currentWebView.profile.httpCacheType = checked ? WebEngineProfile.DiskHttpCache : WebEngineProfile.MemoryHttpCache;
                             }
                         }
                     }
@@ -426,7 +428,7 @@ ApplicationWindow {
             z: -2
             from: 0
             to: 100
-            value: (currentWebView && currentWebView.loadProgress < 100) ? currentWebView.loadProgress : 0
+            value: (win.currentWebView && win.currentWebView.loadProgress < 100) ? win.currentWebView.loadProgress : 0
         }
     }
 
@@ -580,17 +582,17 @@ ApplicationWindow {
                     if (!request.userInitiated)
                         console.warn("Blocked a popup window.");
                     else if (request.destination === WebEngineNewWindowRequest.InNewTab) {
-                        var tab = tabBar.createTab(currentWebView.profile, true, request.requestedUrl);
+                        var tab = tabBar.createTab(win.currentWebView.profile, true, request.requestedUrl);
                         tab.acceptAsNewWindow(request);
                     } else if (request.destination === WebEngineNewWindowRequest.InNewBackgroundTab) {
-                        var backgroundTab = tabBar.createTab(currentWebView.profile, false);
+                        var backgroundTab = tabBar.createTab(win.currentWebView.profile, false);
                         backgroundTab.acceptAsNewWindow(request);
                     } else if (request.destination === WebEngineNewWindowRequest.InNewDialog) {
-                        var dialog = applicationRoot.createDialog(currentWebView.profile);
-                        dialog.currentWebView.acceptAsNewWindow(request);
+                        var dialog = applicationRoot.createDialog(win.currentWebView.profile);
+                        dialog.win.currentWebView.acceptAsNewWindow(request);
                     } else {
-                        var window = applicationRoot.createWindow(currentWebView.profile);
-                        window.currentWebView.acceptAsNewWindow(request);
+                        var window = applicationRoot.createWindow(win.currentWebView.profile);
+                        window.win.currentWebView.acceptAsNewWindow(request);
                     }
                 }
 
@@ -670,7 +672,7 @@ ApplicationWindow {
                     interval: 0
                     running: false
                     repeat: false
-                    onTriggered: currentWebView.reload()
+                    onTriggered: win.currentWebView.reload()
                 }
             }
         }
@@ -684,7 +686,7 @@ ApplicationWindow {
         anchors.right: parent.right
         anchors.bottom: parent.bottom
         onNewWindowRequested: function(request) {
-            var tab = tabBar.createTab(currentWebView.profile);
+            var tab = tabBar.createTab(win.currentWebView.profile);
             request.openIn(tab);
         }
 
@@ -861,13 +863,13 @@ ApplicationWindow {
 
         onFindNext: {
             if (text)
-                currentWebView && currentWebView.findText(text);
+                win.currentWebView && win.currentWebView.findText(text);
             else if (!visible)
                 visible = true;
         }
         onFindPrevious: {
             if (text)
-                currentWebView && currentWebView.findText(text, WebEngineView.FindBackward);
+                win.currentWebView && win.currentWebView.findText(text, WebEngineView.FindBackward);
             else if (!visible)
                 visible = true;
         }

From 9faa5c0ee06014d28547e41b954f5eab804d6820 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Mon, 21 Jul 2025 15:58:16 +0200
Subject: [PATCH 073/100] Examples: Simplify common &&-existence-check pattern
 in quicknanobrowser

We can use optional chaining and nullish coalescing instead.

Task-number: QTBUG-138589
Change-Id: Ic6f1467dbada37010d593df492b7a2efee630996
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 9d008ceea310e22af962c1a5146d8dfc08b79d55)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../quicknanobrowser/BrowserWindow.qml        | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index 7dbb6b2938d..a5add8a297a 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -23,7 +23,7 @@ ApplicationWindow {
     width: 1300
     height: 900
     visible: true
-    title: win.currentWebView && win.currentWebView.title
+    title: win.currentWebView?.title ?? ""
 
     // Make sure the Qt.WindowFullscreenButtonHint is set on OS X.
     Component.onCompleted: flags = flags | Qt.WindowFullscreenButtonHint
@@ -172,13 +172,13 @@ ApplicationWindow {
         RowLayout {
             anchors.fill: parent
             ToolButton {
-                enabled: win.currentWebView && (win.currentWebView.canGoBack || win.currentWebView.canGoForward)
+                enabled: win.currentWebView?.canGoBack || win.currentWebView?.canGoForward
                 onClicked: historyMenu.open()
                 text: qsTr("▼")
                 Menu {
                     id: historyMenu
                     Instantiator {
-                        model: win.currentWebView && win.currentWebView.history.items
+                        model: win.currentWebView?.history?.items
                         MenuItem {
                             text: model.title
                             onTriggered: win.currentWebView.goBackOrForward(model.offset)
@@ -201,22 +201,22 @@ ApplicationWindow {
                 id: backButton
                 icon.source: "icons/3rdparty/go-previous.png"
                 onClicked: win.currentWebView.goBack()
-                enabled: win.currentWebView && win.currentWebView.canGoBack
+                enabled: win.currentWebView?.canGoBack ?? false
                 activeFocusOnTab: !win.platformIsMac
             }
             ToolButton {
                 id: forwardButton
                 icon.source: "icons/3rdparty/go-next.png"
                 onClicked: win.currentWebView.goForward()
-                enabled: win.currentWebView && win.currentWebView.canGoForward
+                enabled: win.currentWebView?.canGoForward ?? false
                 activeFocusOnTab: !win.platformIsMac
             }
             ToolButton {
                 id: reloadButton
-                icon.source: win.currentWebView && win.currentWebView.loading
+                icon.source: win.currentWebView?.loading
                              ? "icons/3rdparty/process-stop.png"
                              : "icons/3rdparty/view-refresh.png"
-                onClicked: win.currentWebView && win.currentWebView.loading ? win.currentWebView.stop() : win.currentWebView.reload()
+                onClicked: win.currentWebView?.loading ? win.currentWebView.stop() : win.currentWebView.reload()
                 activeFocusOnTab: !win.platformIsMac
             }
             TextField {
@@ -228,7 +228,7 @@ ApplicationWindow {
                     id: faviconImage
                     width: 16; height: 16
                     sourceSize: Qt.size(width, height)
-                    source: win.currentWebView && win.currentWebView.icon ? win.currentWebView.icon : ''
+                    source: win.currentWebView?.icon ? win.currentWebView.icon : ''
                 }
                 MouseArea {
                     id: textFieldMouseArea
@@ -323,7 +323,7 @@ ApplicationWindow {
                         id: offTheRecordEnabled
                         text: "Off The Record"
                         checkable: true
-                        checked: win.currentWebView && win.currentWebView.profile === otrPrototype.instance()
+                        checked: win.currentWebView?.profile === otrPrototype.instance()
                         onToggled: function(checked) {
                             if (win.currentWebView) {
                                 win.currentWebView.profile = checked ? otrPrototype.instance() : defaultProfilePrototype.instance();
@@ -333,8 +333,8 @@ ApplicationWindow {
                     MenuItem {
                         id: httpDiskCacheEnabled
                         text: "HTTP Disk Cache"
-                        checkable: win.currentWebView && !win.currentWebView.profile.offTheRecord
-                        checked: win.currentWebView && (win.currentWebView.profile.httpCacheType === WebEngineProfile.DiskHttpCache)
+                        checkable: !win.currentWebView?.profile?.offTheRecord ?? false
+                        checked: win.currentWebView?.profile.httpCacheType === WebEngineProfile.DiskHttpCache
                         onToggled: function(checked) {
                             if (win.currentWebView) {
                                 win.currentWebView.profile.httpCacheType = checked ? WebEngineProfile.DiskHttpCache : WebEngineProfile.MemoryHttpCache;
@@ -428,7 +428,7 @@ ApplicationWindow {
             z: -2
             from: 0
             to: 100
-            value: (win.currentWebView && win.currentWebView.loadProgress < 100) ? win.currentWebView.loadProgress : 0
+            value: (win.currentWebView?.loadProgress < 100) ? win.currentWebView.loadProgress : 0
         }
     }
 
@@ -863,13 +863,13 @@ ApplicationWindow {
 
         onFindNext: {
             if (text)
-                win.currentWebView && win.currentWebView.findText(text);
+                win.currentWebView?.findText(text);
             else if (!visible)
                 visible = true;
         }
         onFindPrevious: {
             if (text)
-                win.currentWebView && win.currentWebView.findText(text, WebEngineView.FindBackward);
+                win.currentWebView?.findText(text, WebEngineView.FindBackward);
             else if (!visible)
                 visible = true;
         }

From a0eb646ab57ae533b817ffaba63a4a43d1b5fd23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Mon, 21 Jul 2025 16:17:44 +0200
Subject: [PATCH 074/100] Examples: Fix more unqualified lookups in
 quicknanobrowser

Due to a cyclical dependency error, declare applicationRoot to be a
QtObject. This required all its usages to be as-casted to
ApplicationRoot to avoid warnings. BrowserWindow used in WebAuthDialog
has the same issue. Work around that issue by using parents. This error
is fixed on dev and this these changes are reverted in a following
commit targetting only dev.

Task-number: QTBUG-138589
Change-Id: I7327ec298432b1cfbb6d34f994b41cff0ab19eab
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 1059b682758323a3527a5edb0cd7477e0827be73)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../quicknanobrowser/BrowserWindow.qml        | 39 +++++++++++--------
 .../quicknanobrowser/DownloadView.qml         | 23 +++++++----
 .../quicknanobrowser/FindBar.qml              | 15 ++++---
 .../FullScreenNotification.qml                |  6 +--
 .../quicknanobrowser/WebAuthDialog.qml        | 12 ++++--
 5 files changed, 58 insertions(+), 37 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index a5add8a297a..52dcac80e0e 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -15,7 +15,7 @@ import BrowserUtils
 
 ApplicationWindow {
     id: win
-    property QtObject applicationRoot
+    required property QtObject applicationRoot
     property WebEngineView currentWebView: tabBar.currentIndex < tabBar.count ? tabLayout.children[tabBar.currentIndex] : null
     property int previousVisibility: Window.Windowed
     property int createdTabs: 0
@@ -74,7 +74,9 @@ ApplicationWindow {
     Action {
         shortcut: StandardKey.AddTab
         onTriggered: {
-            tabBar.createTab(tabBar.count != 0 ? win.currentWebView.profile : defaultProfilePrototype.instance());
+            tabBar.createTab(tabBar.count != 0
+                             ? win.currentWebView.profile
+                             : (win.applicationRoot as ApplicationRoot).defaultProfilePrototype.instance());
             addressBar.forceActiveFocus();
             addressBar.selectAll();
         }
@@ -180,6 +182,7 @@ ApplicationWindow {
                     Instantiator {
                         model: win.currentWebView?.history?.items
                         MenuItem {
+                            required property var model
                             text: model.title
                             onTriggered: win.currentWebView.goBackOrForward(model.offset)
                             checkable: !enabled
@@ -323,10 +326,12 @@ ApplicationWindow {
                         id: offTheRecordEnabled
                         text: "Off The Record"
                         checkable: true
-                        checked: win.currentWebView?.profile === otrPrototype.instance()
+                        checked: win.currentWebView?.profile === (win.applicationRoot as ApplicationRoot).otrPrototype.instance()
                         onToggled: function(checked) {
                             if (win.currentWebView) {
-                                win.currentWebView.profile = checked ? otrPrototype.instance() : defaultProfilePrototype.instance();
+                                win.currentWebView.profile = checked
+                                        ? (win.applicationRoot as ApplicationRoot).otrPrototype.instance()
+                                        : (win.applicationRoot as ApplicationRoot).defaultProfilePrototype.instance();
                             }
                         }
                     }
@@ -421,8 +426,8 @@ ApplicationWindow {
                 left: parent.left
                 top: parent.bottom
                 right: parent.right
-                leftMargin: parent.leftMargin
-                rightMargin: parent.rightMargin
+                leftMargin: parent.anchors.leftMargin
+                rightMargin: parent.anchors.rightMargin
             }
             background: Item {}
             z: -2
@@ -446,22 +451,22 @@ ApplicationWindow {
         id: tabButtonComponent
 
         TabButton {
+            id: tabButton
             property color frameColor: "#999"
             property color fillColor: "#eee"
             property color nonSelectedColor: "#ddd"
             property string tabTitle: "New Tab"
 
-            id: tabButton
             contentItem: Rectangle {
                 id: tabRectangle
-                color: tabButton.down ? fillColor : nonSelectedColor
+                color: tabButton.down ? tabButton.fillColor : tabButton.nonSelectedColor
                 border.width: 1
-                border.color: frameColor
+                border.color: tabButton.frameColor
                 implicitWidth: Math.max(text.width + 30, 80)
                 implicitHeight: Math.max(text.height + 10, 20)
-                Rectangle { height: 1 ; width: parent.width ; color: frameColor}
-                Rectangle { height: parent.height ; width: 1; color: frameColor}
-                Rectangle { x: parent.width - 2; height: parent.height ; width: 1; color: frameColor}
+                Rectangle { height: 1 ; width: parent.width ; color: tabButton.frameColor}
+                Rectangle { height: parent.height ; width: 1; color: tabButton.frameColor}
+                Rectangle { x: parent.width - 2; height: parent.height ; width: 1; color: tabButton.frameColor}
                 Text {
                     id: text
                     anchors.left: parent.left
@@ -469,7 +474,7 @@ ApplicationWindow {
                     anchors.leftMargin: 6
                     text: tabButton.tabTitle
                     elide: Text.ElideRight
-                    color: tabButton.down ? "black" : frameColor
+                    color: tabButton.down ? "black" : tabButton.frameColor
                     width: parent.width - button.background.width
                 }
                 Button {
@@ -488,7 +493,7 @@ ApplicationWindow {
                 }
             }
 
-            onClicked: addressBar.text = tabLayout.itemAt(TabBar.index).url;
+            onClicked: addressBar.text = (tabLayout.itemAt(TabBar.index) as WebEngineView).url;
             function closeTab() {
                 tabBar.removeView(TabBar.index);
             }
@@ -500,7 +505,7 @@ ApplicationWindow {
         anchors.top: parent.top
         anchors.left: parent.left
         anchors.right: parent.right
-        Component.onCompleted: createTab(defaultProfilePrototype.instance())
+        Component.onCompleted: createTab((win.applicationRoot as ApplicationRoot).defaultProfilePrototype.instance())
 
         function createTab(profile, focusOnNewTab = true, url = undefined) {
             var webview = tabComponent.createObject(tabLayout, {profile: profile});
@@ -588,10 +593,10 @@ ApplicationWindow {
                         var backgroundTab = tabBar.createTab(win.currentWebView.profile, false);
                         backgroundTab.acceptAsNewWindow(request);
                     } else if (request.destination === WebEngineNewWindowRequest.InNewDialog) {
-                        var dialog = applicationRoot.createDialog(win.currentWebView.profile);
+                        var dialog = (win.applicationRoot as ApplicationRoot).createDialog(win.currentWebView.profile);
                         dialog.win.currentWebView.acceptAsNewWindow(request);
                     } else {
-                        var window = applicationRoot.createWindow(win.currentWebView.profile);
+                        var window = (win.applicationRoot as ApplicationRoot).createWindow(win.currentWebView.profile);
                         window.win.currentWebView.acceptAsNewWindow(request);
                     }
                 }
diff --git a/examples/webenginequick/quicknanobrowser/DownloadView.qml b/examples/webenginequick/quicknanobrowser/DownloadView.qml
index baac8704790..845f371427a 100644
--- a/examples/webenginequick/quicknanobrowser/DownloadView.qml
+++ b/examples/webenginequick/quicknanobrowser/DownloadView.qml
@@ -1,10 +1,10 @@
 // Copyright (C) 2022 The Qt Company Ltd.
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
 
+pragma ComponentBehavior: Bound
+
 import QtQuick
 import QtQuick.Controls.Fusion
-import QtWebEngine
-import QtQuick.Layouts
 
 Rectangle {
     id: downloadView
@@ -25,17 +25,23 @@ Rectangle {
         id: downloadItemDelegate
 
         Rectangle {
+            id: downloadItem
             width: listView.width
             height: childrenRect.height
             anchors.margins: 10
             radius: 3
             color: "transparent"
             border.color: "black"
+
+            required property int index
+
             Rectangle {
                 id: progressBar
 
-                property real progress: downloadModel.downloads[index]
-                                       ? downloadModel.downloads[index].receivedBytes / downloadModel.downloads[index].totalBytes : 0
+                property real progress: {
+                    let d = downloadModel.downloads[downloadItem.index]
+                    return d ? d.receivedBytes / d.totalBytes : 0
+                }
 
                 radius: 3
                 color: width == listView.width ? "green" : "#2b74c7"
@@ -54,7 +60,10 @@ Rectangle {
                 }
                 Label {
                     id: label
-                    text: downloadModel.downloads[index] ? downloadModel.downloads[index].downloadDirectory + "/" + downloadModel.downloads[index].downloadFileName : qsTr("")
+                    text: {
+                        let d = downloadModel.downloads[downloadItem.index]
+                        return d ? d.downloadDirectory + "/" + d.downloadFileName : qsTr("")
+                    }
                     anchors {
                         verticalCenter: cancelButton.verticalCenter
                         left: parent.left
@@ -66,14 +75,14 @@ Rectangle {
                     anchors.right: parent.right
                     icon.source: "icons/3rdparty/process-stop.png"
                     onClicked: {
-                        var download = downloadModel.downloads[index];
+                        var download = downloadModel.downloads[downloadItem.index];
 
                         download.cancel();
 
                         downloadModel.downloads = downloadModel.downloads.filter(function (el) {
                             return el.id !== download.id;
                         });
-                        downloadModel.remove(index);
+                        downloadModel.remove(downloadItem.index);
                     }
                 }
             }
diff --git a/examples/webenginequick/quicknanobrowser/FindBar.qml b/examples/webenginequick/quicknanobrowser/FindBar.qml
index 409d8dcffe8..d27336a921b 100644
--- a/examples/webenginequick/quicknanobrowser/FindBar.qml
+++ b/examples/webenginequick/quicknanobrowser/FindBar.qml
@@ -63,7 +63,7 @@ Rectangle {
         }
 
         Label {
-            text: activeMatch + "/" + numberOfMatches
+            text: root.activeMatch + "/" + root.numberOfMatches
             visible: findTextField.text != ""
             color: "black"
         }
@@ -78,31 +78,34 @@ Rectangle {
         }
 
         ToolButton {
+            id: findBtnLeft
             text: "<"
-            enabled: numberOfMatches > 0
+            enabled: root.numberOfMatches > 0
             onClicked: root.findPrevious()
             contentItem: Text {
                 color: "black"
-                text: parent.text
+                text: findBtnLeft.text
             }
         }
 
         ToolButton {
+            id: findBtnRight
             text: ">"
-            enabled: numberOfMatches > 0
+            enabled: root.numberOfMatches > 0
             onClicked: root.findNext()
             contentItem: Text {
                 color: "black"
-                text: parent.text
+                text: findBtnRight.text
             }
         }
 
         ToolButton {
+            id: findBtnClose
             text: "x"
             onClicked: root.visible = false
             contentItem: Text {
                 color: "black"
-                text: parent.text
+                text: findBtnClose.text
             }
         }
     }
diff --git a/examples/webenginequick/quicknanobrowser/FullScreenNotification.qml b/examples/webenginequick/quicknanobrowser/FullScreenNotification.qml
index 7794064327f..cdf154c78b0 100644
--- a/examples/webenginequick/quicknanobrowser/FullScreenNotification.qml
+++ b/examples/webenginequick/quicknanobrowser/FullScreenNotification.qml
@@ -28,8 +28,8 @@ Rectangle {
         NumberAnimation {
             duration: 750
             onStopped: {
-                if (opacity == 0)
-                    visible = false;
+                if (fullScreenNotification.opacity === 0)
+                    fullScreenNotification.visible = false;
             }
         }
     }
@@ -37,7 +37,7 @@ Rectangle {
     Timer {
         id: reset
         interval: 5000
-        onTriggered: hide()
+        onTriggered: fullScreenNotification.hide()
     }
 
     anchors.horizontalCenter: parent.horizontalCenter
diff --git a/examples/webenginequick/quicknanobrowser/WebAuthDialog.qml b/examples/webenginequick/quicknanobrowser/WebAuthDialog.qml
index aeb6f5a0f0d..9d29ccb415d 100644
--- a/examples/webenginequick/quicknanobrowser/WebAuthDialog.qml
+++ b/examples/webenginequick/quicknanobrowser/WebAuthDialog.qml
@@ -1,6 +1,8 @@
 // Copyright (C) 2022 The Qt Company Ltd.
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
 
+pragma ComponentBehavior: Bound
+
 import QtQuick
 import QtQuick.Controls
 import QtQuick.Layouts
@@ -9,7 +11,7 @@ import QtWebEngine
 Dialog {
     id: webAuthDialog
     anchors.centerIn: parent
-    width: Math.min(browserWindow.width, browserWindow.height) / 3 * 2
+    width: Math.min(parent.parent.width, parent.parent.height) / 3 * 2
     contentWidth: verticalLayout.width +10;
     contentHeight: verticalLayout.height +10;
     standardButtons: Dialog.Cancel | Dialog.Apply
@@ -137,10 +139,12 @@ Dialog {
                 id : selectAccountRepeater
                 model: selectAccountModel
                 Column {
+                    id: selectAccountRepeaterColumn
+                    required property string modelData
                     spacing : 5
                     RadioButton {
-                        text: modelData
-                        ButtonGroup.group : selectAccount;
+                        text: selectAccountRepeaterColumn.modelData
+                        ButtonGroup.group : webAuthDialog.selectAccount;
                         onClicked: function(){
                             webAuthDialog.selectAccount = text;
                         }
@@ -182,7 +186,7 @@ Dialog {
             pinEdit.visible = true;
             confirmPinLabel.visible = false;
             confirmPinEdit.visible = false;
-        } else if (reason === WebEngineWebAuthUxRequest.PinEntryReason.Set) {
+        } else if (requestInfo.reason === WebEngineWebAuthUxRequest.PinEntryReason.Set) {
             heading.text = "Set PIN ";
             description.text = "Set new PIN for your security key";
             pinLabel.visible = true;

From eb58b863fc0a12e64643abfde27fac1e353192a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Mon, 21 Jul 2025 17:13:37 +0200
Subject: [PATCH 075/100] Examples: Break multiline string literals into
 separate strings

Also fix small typo and style issues.

Task-number: QTBUG-138589
Change-Id: I36109e36773a10914a996f6beec0b9758a671c2b
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 9f4a2e389deb42a13825b3674b01446397014ff6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../quicknanobrowser/WebAuthDialog.qml               | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/WebAuthDialog.qml b/examples/webenginequick/quicknanobrowser/WebAuthDialog.qml
index 9d29ccb415d..8d5cf598cba 100644
--- a/examples/webenginequick/quicknanobrowser/WebAuthDialog.qml
+++ b/examples/webenginequick/quicknanobrowser/WebAuthDialog.qml
@@ -228,14 +228,14 @@ Dialog {
         case WebEngineWebAuthUxRequest.RequestFailureReason.KeyNotRegistered:
             return "Key not registered";
         case WebEngineWebAuthUxRequest.RequestFailureReason.KeyAlreadyRegistered:
-            return "You already registered this device. You don't have to register it again
-                    Try agin with different key or device";
+            return "You already registered this device. You don't have to register it again\n"
+                     + "Try again with different key or device.";
         case WebEngineWebAuthUxRequest.RequestFailureReason.SoftPinBlock:
-            return "The security key is locked because the wrong PIN was entered too many times.
-                    To unlock it, remove and reinsert it.";
+            return "The security key is locked because the wrong PIN was entered too many times.\n"
+                    + "To unlock it, remove and reinsert it.";
         case WebEngineWebAuthUxRequest.RequestFailureReason.HardPinBlock:
-            return "The security key is locked because the wrong PIN was entered too many times.
-                    You'll need to reset the security key.";
+            return "The security key is locked because the wrong PIN was entered too many times.\n"
+                    + "You'll need to reset the security key.";
         case WebEngineWebAuthUxRequest.RequestFailureReason.AuthenticatorRemovedDuringPinEntry:
             return "Authenticator removed during verification. Please reinsert and try again";
         case WebEngineWebAuthUxRequest.RequestFailureReason.AuthenticatorMissingResidentKeys:

From 4afc06070c2aa7cc4145a63159949decd91da8da Mon Sep 17 00:00:00 2001
From: Szabolcs David <davidsz@inf.u-szeged.hu>
Date: Tue, 1 Jul 2025 15:14:24 +0200
Subject: [PATCH 076/100] Provide context argument for all QTimer::singleShots

This function is used to detach signal emissions from the main thread,
but there are cases when the API object (view, profile, etc.) is
destroyed while we are still waiting for incoming signals. We can avoid
some crashes by not trying to execute these codes if this case happened.

Change-Id: Ic5e6b46c7d40bfc9a816055ca335fc6806a045a3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 480612a18c3316638403cf0993be03c92e9704e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/select_file_dialog_factory_qt.cpp |  3 ++-
 src/core/web_contents_delegate_qt.cpp      | 19 +++++++++++--------
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/core/select_file_dialog_factory_qt.cpp b/src/core/select_file_dialog_factory_qt.cpp
index 8d0690628ae..de7b3d3334b 100644
--- a/src/core/select_file_dialog_factory_qt.cpp
+++ b/src/core/select_file_dialog_factory_qt.cpp
@@ -124,7 +124,8 @@ void SelectFileDialogQt::SelectFileImpl(Type type, const std::u16string &title,
 
     m_filePickerController.reset(createFilePickerController(
             toFileChooserMode(type), listener_, toQt(default_path.value()), acceptedSuffixes));
-    QTimer::singleShot(0, [this]() { m_client->runFileChooser(m_filePickerController); });
+    QTimer::singleShot(0, m_client->holdingQObject(),
+                       [this]() { m_client->runFileChooser(m_filePickerController); });
 }
 
 SelectFileDialogFactoryQt::SelectFileDialogFactoryQt() = default;
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index 4100daa9d52..89a0a658216 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -173,17 +173,21 @@ void WebContentsDelegateQt::NavigationStateChanged(content::WebContents* source,
     if (changed_flags & content::INVALIDATE_TYPE_URL && !m_pendingUrlUpdate) {
         m_pendingUrlUpdate = true;
         base::WeakPtr<WebContentsDelegateQt> delegate = AsWeakPtr();
-        QTimer::singleShot(0, [delegate, this](){ if (delegate) m_viewClient->urlChanged();});
+        QTimer::singleShot(0, m_viewClient->holdingQObject(), [delegate, this]() {
+            if (delegate)
+                m_viewClient->urlChanged();
+        });
     }
 
     if (changed_flags & content::INVALIDATE_TYPE_TITLE) {
         QString newTitle = toQt(source->GetTitle());
         if (m_title != newTitle) {
             m_title = newTitle;
-            QTimer::singleShot(0, [delegate = AsWeakPtr(), title = newTitle] () {
-                if (delegate)
-                    delegate->adapterClient()->titleChanged(title);
-            });
+            QTimer::singleShot(0, m_viewClient->holdingQObject(),
+                               [delegate = AsWeakPtr(), title = newTitle]() {
+                                   if (delegate)
+                                       delegate->adapterClient()->titleChanged(title);
+                               });
         }
     }
 
@@ -640,9 +644,8 @@ void WebContentsDelegateQt::RunFileChooser(content::RenderFrameHost * /*frameHos
                                                             listener, toQt(params.default_file_name.value()), acceptedMimeTypes));
 
     // Defer the call to not block base::MessageLoop::RunTask with modal dialogs.
-    QTimer::singleShot(0, [this] () {
-        m_viewClient->runFileChooser(m_filePickerController);
-    });
+    QTimer::singleShot(0, m_viewClient->holdingQObject(),
+                       [this]() { m_viewClient->runFileChooser(m_filePickerController); });
 }
 
 bool WebContentsDelegateQt::DidAddMessageToConsole(content::WebContents *source, blink::mojom::ConsoleMessageLevel log_level,

From 398eefcc5977c64fe3065126a64edef78323c970 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Thu, 3 Jul 2025 09:24:59 +0200
Subject: [PATCH 077/100] Upgrade loading of ui delegates

Our loading ui delegates implementation dates back to
Qt5 where we supported qquickcontrols1 with qquickcontrols2
overrides. Also it provided an unofficial way to customize
the ui delegates by providing own qml files as
we createed  qml compnonents by loading qml files.

This works fine if you have deployed ui delegates qml files
on target systems.  However, qt-cmake deployment scripts do
not handle qml file deploment instead qml plugins are used.

Therefore, drop the qml file based delegate creation and simply
let the qml enigne load the module and create the component.

Note we have now the proper delgates ui/request api to provide way
to customize delegates, however provide still way of overriding
delegates with own delegates module by setting environment variable
QTWEBENGINE_UI_DELEGATE_MODULE. This varaible can contain the list
of modules spearted by semicollon.

Task-number: QTBUG-111907
Change-Id: Ie79f863e75ea69f6a0e600c627ab111224b5e79c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit f48c6db26804520b2bfac9c24e08bc7641c3a4fb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/webenginequick/CMakeLists.txt           |  1 +
 src/webenginequick/ui_delegates_manager.cpp | 84 +++++++--------------
 src/webenginequick/ui_delegates_manager_p.h |  3 +-
 3 files changed, 30 insertions(+), 58 deletions(-)

diff --git a/src/webenginequick/CMakeLists.txt b/src/webenginequick/CMakeLists.txt
index 2071bedeffe..0476ba8be38 100644
--- a/src/webenginequick/CMakeLists.txt
+++ b/src/webenginequick/CMakeLists.txt
@@ -10,6 +10,7 @@ qt_internal_add_qml_module(WebEngineQuick
     DEPENDENCIES
         QtQuick/auto
         QtWebChannel/auto
+        QtWebEngine.ControlsDelegates/auto
     PLUGIN_TARGET qtwebenginequickplugin
     NO_GENERATE_PLUGIN_SOURCE
     NO_PLUGIN_OPTIONAL
diff --git a/src/webenginequick/ui_delegates_manager.cpp b/src/webenginequick/ui_delegates_manager.cpp
index 93ac634227e..fdc781adf7b 100644
--- a/src/webenginequick/ui_delegates_manager.cpp
+++ b/src/webenginequick/ui_delegates_manager.cpp
@@ -28,20 +28,22 @@
 
 #include <algorithm>
 
+using namespace Qt::Literals::StringLiterals;
+
 // Uncomment for QML debugging
 //#define UI_DELEGATES_DEBUG
 
 namespace QtWebEngineCore {
 
 #define NO_SEPARATOR
-#define FILE_NAME_CASE_STATEMENT(TYPE, COMPONENT) \
-    case UIDelegatesManager::TYPE:\
-        return QStringLiteral(#TYPE".qml");
+#define NAME_CASE_STATEMENT(TYPE, COMPONENT)                                                       \
+    case UIDelegatesManager::TYPE:                                                                 \
+        return QStringLiteral(#TYPE);
 
-static QString fileNameForComponent(UIDelegatesManager::ComponentType type)
+static QString nameForComponent(UIDelegatesManager::ComponentType type)
 {
     switch (type) {
-    FOR_EACH_COMPONENT_TYPE(FILE_NAME_CASE_STATEMENT, NO_SEPARATOR)
+        FOR_EACH_COMPONENT_TYPE(NAME_CASE_STATEMENT, NO_SEPARATOR)
     default:
         Q_UNREACHABLE();
     }
@@ -97,6 +99,11 @@ UIDelegatesManager::UIDelegatesManager(QQuickWebEngineView *view)
     FOR_EACH_COMPONENT_TYPE(COMPONENT_MEMBER_INIT, NO_SEPARATOR)
 // clang-format on
 {
+    const QString fromEnv = qEnvironmentVariable("QTWEBENGINE_UI_DELEGATE_MODULE");
+    if (!fromEnv.isEmpty()) {
+        m_moduleList = fromEnv.split(u';');
+    }
+    m_moduleList << u"QtWebEngine.ControlsDelegates"_s;
 }
 
 UIDelegatesManager::~UIDelegatesManager()
@@ -115,47 +122,36 @@ bool UIDelegatesManager::ensureComponentLoaded(ComponentType type)
     if (!engine)
         return false;
 
-    if (m_importDirs.isEmpty() && !initializeImportDirs(m_importDirs, engine))
-        return false;
-
     QQmlComponent **component;
     switch (type) {
     FOR_EACH_COMPONENT_TYPE(COMPONENT_MEMBER_CASE_STATEMENT, NO_SEPARATOR)
     default:
         Q_UNREACHABLE_RETURN(false);
     }
-    QString fileName(fileNameForComponent(type));
+    const QString &name = nameForComponent(type);
 #ifndef UI_DELEGATES_DEBUG
     if (*component)
         return true;
 #else // Unconditionally reload the components each time.
     fprintf(stderr, "%s: %s\n", Q_FUNC_INFO, qPrintable(fileName));
 #endif
+    for (const QString &module : m_moduleList) {
+        delete *component;
+        *component = new QQmlComponent(engine);
+        (*component)->loadFromModule(module, name, QQmlComponent::PreferSynchronous);
+        if ((*component)->status() == QQmlComponent::Ready)
+            break;
+    }
 
-    for (const QString &importDir : std::as_const(m_importDirs)) {
-        const QString componentFilePath = importDir % QLatin1Char('/') % fileName;
-
-        if (!QFileInfo(componentFilePath).exists())
-            continue;
-
-        // FIXME: handle async loading
-        *component = (new QQmlComponent(engine,
-                                        importDir.startsWith(QLatin1String(":/")) ? QUrl(QLatin1String("qrc") + componentFilePath)
-                                                                                  : QUrl::fromLocalFile(componentFilePath),
-                                        QQmlComponent::PreferSynchronous, m_view));
-
-        if ((*component)->status() != QQmlComponent::Ready) {
-            const QList<QQmlError> errs = (*component)->errors();
-            for (const QQmlError &err : errs)
-                qWarning("QtWebEngine: component error: %s\n", qPrintable(err.toString()));
-            delete *component;
-            *component = nullptr;
-            return false;
-        }
-        return true;
+    if ((*component)->status() != QQmlComponent::Ready) {
+        const QList<QQmlError> errs = (*component)->errors();
+        for (const QQmlError &err : errs)
+            qWarning("QtWebEngine: component error: %s\n", qPrintable(err.toString()));
+        delete *component;
+        *component = nullptr;
+        return false;
     }
-    qWarning("Default ui delegate %s can not be found.", qPrintable(fileName));
-    return false;
+    return true;
 }
 
 #define CHECK_QML_SIGNAL_PROPERTY(prop, location) \
@@ -727,30 +723,6 @@ void UIDelegatesManager::hideAutofillPopup()
     });
 }
 
-bool UIDelegatesManager::initializeImportDirs(QStringList &dirs, QQmlEngine *engine)
-{
-    const QStringList paths = engine->importPathList();
-    for (const QString &path : paths) {
-        QString controlsImportPath = path % QLatin1String("/QtWebEngine/ControlsDelegates/");
-
-        // resource paths have to be tested using the ":/" prefix
-        if (controlsImportPath.startsWith(QLatin1String("qrc:/"))) {
-            controlsImportPath.remove(0, 3);
-        }
-
-        QFileInfo fi(controlsImportPath);
-        if (fi.exists()) {
-            dirs << fi.absolutePath();
-
-            // add subdirectories
-            QDirIterator it(controlsImportPath, QDir::AllDirs | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
-            while (it.hasNext())
-                dirs << QFileInfo(it.next()).absoluteFilePath();
-        }
-    }
-    return !dirs.isEmpty();
-}
-
 QObject *UIDelegatesManager::addMenu(QObject *parentMenu, const QString &title, const QPoint &pos)
 {
     Q_ASSERT(parentMenu);
diff --git a/src/webenginequick/ui_delegates_manager_p.h b/src/webenginequick/ui_delegates_manager_p.h
index 3502757d7e9..0b2510f632f 100644
--- a/src/webenginequick/ui_delegates_manager_p.h
+++ b/src/webenginequick/ui_delegates_manager_p.h
@@ -81,7 +81,6 @@ class UIDelegatesManager
     UIDelegatesManager(QQuickWebEngineView *);
     virtual ~UIDelegatesManager();
 
-    virtual bool initializeImportDirs(QStringList &dirs, QQmlEngine *engine);
     virtual void addMenuItem(QQuickWebEngineAction *action, QObject *menu,
                              bool checkable = false, bool checked = true);
     void addMenuSeparator(QObject *menu);
@@ -106,10 +105,10 @@ class UIDelegatesManager
     bool ensureComponentLoaded(ComponentType);
 
     QQuickWebEngineView *m_view;
-    QStringList m_importDirs;
     QScopedPointer<QObject> m_toolTip;
     QScopedPointer<QObject> m_touchSelectionMenu;
     QScopedPointer<QObject> m_autofillPopup;
+    QStringList m_moduleList;
 
     FOR_EACH_COMPONENT_TYPE(MEMBER_DECLARATION, SEMICOLON_SEPARATOR)
 

From faf79551f54500d65af5a27fb9ac28716e9cdbaf Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Fri, 25 Jul 2025 11:14:08 +0200
Subject: [PATCH 078/100] Add test mock delegate plugin

Previews patch changed the way ui delegates are loaded.
Even though all delegates were tested on device it failed on ci.
The reason was that test mock delegate still relayed
on old 'way' of loading delegates. As we now load plugins,
change test ui delegates to be a plugin.

Add new qml module which contains both TestMockDelegates
and TestParams components and does not depend on Qt Quick Controls.
Missing delegates are taken from WebEngine.ControlsDelegates
as it was before.

Note we do not use plugin in this case and we link with backend
library statically as CI compiles test with qt-cmake-standalone-tests,
but does not install anything, meaning plugin would not be
deployed on testing node. The alternative would require
moving mock delegate 'plugin' to src directory, which looks messy.

Set proper QTWEBENGINE_UI_DELEGATE_MODULE for qml_tests.

Fix import for tst_uidelegates.

Change-Id: I01b6d58f10028378933272446c2afc3b98dcfed9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 9a8cd1a53cad0934fc5f3d6a30f66eb38e0d9650)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 REUSE.toml                                    |  1 -
 tests/auto/quick/qmltests/CMakeLists.txt      |  3 ++
 .../quick/qmltests/data/tst_contextMenu.qml   |  2 +-
 .../quick/qmltests/data/tst_filePicker.qml    |  2 +-
 .../quick/qmltests/data/tst_filesystem.qml    |  2 +-
 .../qmltests/data/tst_javaScriptDialogs.qml   |  2 +-
 .../ControlsDelegates => }/AlertDialog.qml    |  0
 .../qmltests/mock-delegates/CMakeLists.txt    | 38 +++++++++++++++++++
 .../ControlsDelegates => }/ConfirmDialog.qml  |  1 -
 .../DirectoryPicker.qml                       |  1 -
 .../ControlsDelegates => }/FilePicker.qml     |  1 -
 .../{TestParams => }/FilePickerParams.qml     |  0
 .../{TestParams => }/JSDialogParams.qml       |  0
 .../ControlsDelegates => }/Menu.qml           |  1 -
 .../ControlsDelegates => }/MenuItem.qml       |  0
 .../{TestParams => }/MenuParams.qml           |  0
 .../qmltests/mock-delegates/MenuSeparator.qml |  6 +++
 .../ControlsDelegates => }/PromptDialog.qml   |  1 -
 .../qmltests/mock-delegates/TestParams/qmldir |  5 ---
 tests/auto/quick/qmltests/tst_qmltests.cpp    | 19 ++--------
 .../quick/uidelegates/tst_uidelegates.cpp     |  1 +
 21 files changed, 55 insertions(+), 31 deletions(-)
 rename tests/auto/quick/qmltests/mock-delegates/{QtWebEngine/ControlsDelegates => }/AlertDialog.qml (100%)
 create mode 100644 tests/auto/quick/qmltests/mock-delegates/CMakeLists.txt
 rename tests/auto/quick/qmltests/mock-delegates/{QtWebEngine/ControlsDelegates => }/ConfirmDialog.qml (95%)
 rename tests/auto/quick/qmltests/mock-delegates/{QtWebEngine/ControlsDelegates => }/DirectoryPicker.qml (94%)
 rename tests/auto/quick/qmltests/mock-delegates/{QtWebEngine/ControlsDelegates => }/FilePicker.qml (96%)
 rename tests/auto/quick/qmltests/mock-delegates/{TestParams => }/FilePickerParams.qml (100%)
 rename tests/auto/quick/qmltests/mock-delegates/{TestParams => }/JSDialogParams.qml (100%)
 rename tests/auto/quick/qmltests/mock-delegates/{QtWebEngine/ControlsDelegates => }/Menu.qml (92%)
 rename tests/auto/quick/qmltests/mock-delegates/{QtWebEngine/ControlsDelegates => }/MenuItem.qml (100%)
 rename tests/auto/quick/qmltests/mock-delegates/{TestParams => }/MenuParams.qml (100%)
 create mode 100644 tests/auto/quick/qmltests/mock-delegates/MenuSeparator.qml
 rename tests/auto/quick/qmltests/mock-delegates/{QtWebEngine/ControlsDelegates => }/PromptDialog.qml (96%)
 delete mode 100644 tests/auto/quick/qmltests/mock-delegates/TestParams/qmldir

diff --git a/REUSE.toml b/REUSE.toml
index d7733c639e2..e3686c099c4 100644
--- a/REUSE.toml
+++ b/REUSE.toml
@@ -50,7 +50,6 @@ path = ["tests/auto/widgets/qwebenginepage/resources/*",
         "tests/auto/widgets/spellchecking/resources/index.html",
         "tests/auto/quick/dialogs/index.html",
         "tests/auto/quick/inspectorserver/html/basic_page.html",
-        "tests/auto/quick/qmltests/mock-delegates/TestParams/qmldir",
         "tests/auto/quick/qquickwebenginedefaultsurfaceformat/html/basic_page.html",
         "tests/auto/quick/qtbug-70248/test.qml",
         "tests/auto/widgets/defaultsurfaceformat/resources/index.html",
diff --git a/tests/auto/quick/qmltests/CMakeLists.txt b/tests/auto/quick/qmltests/CMakeLists.txt
index 0d9c69df4e6..7ff08551ec0 100644
--- a/tests/auto/quick/qmltests/CMakeLists.txt
+++ b/tests/auto/quick/qmltests/CMakeLists.txt
@@ -4,6 +4,8 @@
 include(../../httpserver/httpserver.cmake)
 include(../../util/util.cmake)
 
+add_subdirectory(mock-delegates)
+
 qt_internal_add_test(tst_qmltests
     SOURCES
         tst_qmltests.cpp
@@ -13,6 +15,7 @@ qt_internal_add_test(tst_qmltests
         Qt::TestPrivate
         Qt::WebEngineQuick
         Qt::WebEngineCorePrivate
+        Qt::WebEngineQuickTestMockDelegatesQml
         Test::HttpServer
         Test::Util
 )
diff --git a/tests/auto/quick/qmltests/data/tst_contextMenu.qml b/tests/auto/quick/qmltests/data/tst_contextMenu.qml
index 9a34d3f339f..c47bc920462 100644
--- a/tests/auto/quick/qmltests/data/tst_contextMenu.qml
+++ b/tests/auto/quick/qmltests/data/tst_contextMenu.qml
@@ -4,7 +4,7 @@
 import QtQuick
 import QtTest
 import QtWebEngine
-import "../mock-delegates/TestParams"
+import QtWebEngine.TestMockDelegates
 
 TestWebEngineView {
     id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_filePicker.qml b/tests/auto/quick/qmltests/data/tst_filePicker.qml
index 8c769a04291..0cd2cf10384 100644
--- a/tests/auto/quick/qmltests/data/tst_filePicker.qml
+++ b/tests/auto/quick/qmltests/data/tst_filePicker.qml
@@ -4,8 +4,8 @@
 import QtQuick
 import QtTest
 import QtWebEngine
+import QtWebEngine.TestMockDelegates
 import "../../qmltests/data"
-import "../mock-delegates/TestParams"
 
 TestWebEngineView {
     id: webEngineView
diff --git a/tests/auto/quick/qmltests/data/tst_filesystem.qml b/tests/auto/quick/qmltests/data/tst_filesystem.qml
index 5ed05b419dd..18ff9191075 100644
--- a/tests/auto/quick/qmltests/data/tst_filesystem.qml
+++ b/tests/auto/quick/qmltests/data/tst_filesystem.qml
@@ -4,9 +4,9 @@
 import QtQuick
 import QtTest
 import QtWebEngine
+import QtWebEngine.TestMockDelegates
 import Test.util
 import "../../qmltests/data"
-import "../mock-delegates/TestParams"
 
 
 TestWebEngineView {
diff --git a/tests/auto/quick/qmltests/data/tst_javaScriptDialogs.qml b/tests/auto/quick/qmltests/data/tst_javaScriptDialogs.qml
index 49ba5ae471c..b109a0133a2 100644
--- a/tests/auto/quick/qmltests/data/tst_javaScriptDialogs.qml
+++ b/tests/auto/quick/qmltests/data/tst_javaScriptDialogs.qml
@@ -4,8 +4,8 @@
 import QtQuick
 import QtTest
 import QtWebEngine
+import QtWebEngine.TestMockDelegates
 import "../../qmltests/data"
-import "../mock-delegates/TestParams"
 
 TestWebEngineView {
     id: webEngineView
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/AlertDialog.qml b/tests/auto/quick/qmltests/mock-delegates/AlertDialog.qml
similarity index 100%
rename from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/AlertDialog.qml
rename to tests/auto/quick/qmltests/mock-delegates/AlertDialog.qml
diff --git a/tests/auto/quick/qmltests/mock-delegates/CMakeLists.txt b/tests/auto/quick/qmltests/mock-delegates/CMakeLists.txt
new file mode 100644
index 00000000000..b752b96592d
--- /dev/null
+++ b/tests/auto/quick/qmltests/mock-delegates/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+set(qml_files
+    "AlertDialog.qml"
+    "ConfirmDialog.qml"
+    "DirectoryPicker.qml"
+    "FilePicker.qml"
+    "Menu.qml"
+    "MenuItem.qml"
+    "PromptDialog.qml"
+    "MenuParams.qml"
+    "JSDialogParams.qml"
+    "FilePickerParams.qml"
+    "MenuSeparator.qml"
+)
+
+set_source_files_properties(MenuParams.qml FilePickerParams.qml JSDialogParams.qml PROPERTIES
+    QT_QML_SINGLETON_TYPE TRUE
+)
+
+# test can be also configured with qt-cmake-standalone-test
+# make sure we did not define qml module already in case of module build with tests
+
+if(NOT TARGET Qt::WebEngineQuickTestMockDelegatesQml)
+    qt_internal_add_qml_module(WebEngineQuickTestMockDelegatesQml
+        URI "QtWebEngine.TestMockDelegates"
+        VERSION "${PROJECT_VERSION}"
+        QML_FILES ${qml_files}
+        PAST_MAJOR_VERSIONS 1
+        NO_SYNC_QT
+        NO_PLUGIN
+        NO_PRIVATE_MODULE
+        NO_GENERATE_CPP_EXPORTS
+        STATIC
+    )
+endif()
+
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/ConfirmDialog.qml b/tests/auto/quick/qmltests/mock-delegates/ConfirmDialog.qml
similarity index 95%
rename from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/ConfirmDialog.qml
rename to tests/auto/quick/qmltests/mock-delegates/ConfirmDialog.qml
index db7c2d05aa0..fdf6164a2ce 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/ConfirmDialog.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/ConfirmDialog.qml
@@ -3,7 +3,6 @@
 
 import QtQml
 import QtTest
-import "../../TestParams"
 
 QtObject {
     property string text
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/DirectoryPicker.qml b/tests/auto/quick/qmltests/mock-delegates/DirectoryPicker.qml
similarity index 94%
rename from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/DirectoryPicker.qml
rename to tests/auto/quick/qmltests/mock-delegates/DirectoryPicker.qml
index da423e44128..03e2a03292b 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/DirectoryPicker.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/DirectoryPicker.qml
@@ -2,7 +2,6 @@
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
 
 import QtQuick
-import "../../TestParams"
 
 QtObject {
     signal folderSelected(var folder)
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/FilePicker.qml b/tests/auto/quick/qmltests/mock-delegates/FilePicker.qml
similarity index 96%
rename from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/FilePicker.qml
rename to tests/auto/quick/qmltests/mock-delegates/FilePicker.qml
index 6dac9973e17..69940a5f138 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/FilePicker.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/FilePicker.qml
@@ -2,7 +2,6 @@
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
 
 import QtQuick
-import "../../TestParams"
 
 QtObject {
     property bool selectMultiple: false
diff --git a/tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml b/tests/auto/quick/qmltests/mock-delegates/FilePickerParams.qml
similarity index 100%
rename from tests/auto/quick/qmltests/mock-delegates/TestParams/FilePickerParams.qml
rename to tests/auto/quick/qmltests/mock-delegates/FilePickerParams.qml
diff --git a/tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml b/tests/auto/quick/qmltests/mock-delegates/JSDialogParams.qml
similarity index 100%
rename from tests/auto/quick/qmltests/mock-delegates/TestParams/JSDialogParams.qml
rename to tests/auto/quick/qmltests/mock-delegates/JSDialogParams.qml
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/Menu.qml b/tests/auto/quick/qmltests/mock-delegates/Menu.qml
similarity index 92%
rename from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/Menu.qml
rename to tests/auto/quick/qmltests/mock-delegates/Menu.qml
index 35e3b274f94..1b5c3ac47a0 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/Menu.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/Menu.qml
@@ -2,7 +2,6 @@
 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
 
 import QtQml
-import "../../TestParams"
 
 QtObject {
     id: menu
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/MenuItem.qml b/tests/auto/quick/qmltests/mock-delegates/MenuItem.qml
similarity index 100%
rename from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/MenuItem.qml
rename to tests/auto/quick/qmltests/mock-delegates/MenuItem.qml
diff --git a/tests/auto/quick/qmltests/mock-delegates/TestParams/MenuParams.qml b/tests/auto/quick/qmltests/mock-delegates/MenuParams.qml
similarity index 100%
rename from tests/auto/quick/qmltests/mock-delegates/TestParams/MenuParams.qml
rename to tests/auto/quick/qmltests/mock-delegates/MenuParams.qml
diff --git a/tests/auto/quick/qmltests/mock-delegates/MenuSeparator.qml b/tests/auto/quick/qmltests/mock-delegates/MenuSeparator.qml
new file mode 100644
index 00000000000..57eb05a370e
--- /dev/null
+++ b/tests/auto/quick/qmltests/mock-delegates/MenuSeparator.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2025 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item { id: dummy }
diff --git a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/PromptDialog.qml b/tests/auto/quick/qmltests/mock-delegates/PromptDialog.qml
similarity index 96%
rename from tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/PromptDialog.qml
rename to tests/auto/quick/qmltests/mock-delegates/PromptDialog.qml
index 62e48906751..8b71f8269ba 100644
--- a/tests/auto/quick/qmltests/mock-delegates/QtWebEngine/ControlsDelegates/PromptDialog.qml
+++ b/tests/auto/quick/qmltests/mock-delegates/PromptDialog.qml
@@ -3,7 +3,6 @@
 
 import QtQml
 import QtTest
-import "../../TestParams"
 
 QtObject {
     property string text
diff --git a/tests/auto/quick/qmltests/mock-delegates/TestParams/qmldir b/tests/auto/quick/qmltests/mock-delegates/TestParams/qmldir
deleted file mode 100644
index 2702ad30f4d..00000000000
--- a/tests/auto/quick/qmltests/mock-delegates/TestParams/qmldir
+++ /dev/null
@@ -1,5 +0,0 @@
-# QML module so that the autotests can set testing parameters
-module TestParams
-singleton FilePickerParams 1.0 FilePickerParams.qml
-singleton JSDialogParams 1.0 JSDialogParams.qml
-singleton MenuParams 1.0 MenuParams.qml
diff --git a/tests/auto/quick/qmltests/tst_qmltests.cpp b/tests/auto/quick/qmltests/tst_qmltests.cpp
index a603c61bcda..d8aa2781f4c 100644
--- a/tests/auto/quick/qmltests/tst_qmltests.cpp
+++ b/tests/auto/quick/qmltests/tst_qmltests.cpp
@@ -29,19 +29,6 @@
 #include <unistd.h>
 #endif
 
-class Setup : public QObject
-{
-    Q_OBJECT
-public:
-    Setup() { }
-
-public slots:
-    void qmlEngineAvailable(QQmlEngine *engine)
-    {
-        engine->addImportPath(QDir(QT_TESTCASE_SOURCEDIR).canonicalPath() + "/mock-delegates");
-    }
-};
-
 #if defined(Q_OS_LINUX) && defined(QT_DEBUG)
 static bool debuggerPresent()
 {
@@ -247,6 +234,7 @@ int main(int argc, char **argv)
 
     sigaction(SIGSEGV, &sigAction, 0);
 #endif
+    qputenv("QTWEBENGINE_UI_DELEGATE_MODULE", "QtWebEngine.TestMockDelegates");
     QtWebEngineQuick::initialize();
     // Force to use English language for testing due to error message checks
     QLocale::setDefault(QLocale("en"));
@@ -281,10 +269,9 @@ int main(int argc, char **argv)
                 return new HttpsServer(":/resources/server.pem", ":/resources/server.key", "");
             });
 #endif
-    Setup setup;
-    int i = quick_test_main_with_setup(
+    int i = quick_test_main(
             argc, argv, "qmltests",
-            qPrintable(QT_TESTCASE_BUILDDIR + QLatin1String("/webengine.qmltests")), &setup);
+            qPrintable(QT_TESTCASE_BUILDDIR + QLatin1String("/webengine.qmltests")));
     return i;
 }
 
diff --git a/tests/auto/quick/uidelegates/tst_uidelegates.cpp b/tests/auto/quick/uidelegates/tst_uidelegates.cpp
index 25702f4b870..d544d8c2361 100644
--- a/tests/auto/quick/uidelegates/tst_uidelegates.cpp
+++ b/tests/auto/quick/uidelegates/tst_uidelegates.cpp
@@ -53,6 +53,7 @@ tst_UIDelegates::tst_UIDelegates()
     m_component.reset(new QQmlComponent(engine, this));
     m_component->setData(QByteArrayLiteral("import QtQuick\n"
                                            "import QtWebEngine\n"
+                                           "import QtWebEngine.ControlsDelegates\n"
                                            "WebEngineView {}"),
                          QUrl());
 }

From 8db5652b7144d6d9397a3a4b060244bb62f7d624 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Wed, 30 Jul 2025 10:48:07 +0200
Subject: [PATCH 079/100] Move constructors out of line

API review

Change-Id: I31de5672d1cf50a6b533e2a9c44b1c7af8e71056
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 24fa72457e7cd30f716676033af7408af5b34385)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/api/qwebenginefullscreenrequest.cpp | 3 +++
 src/core/api/qwebenginefullscreenrequest.h   | 2 +-
 src/core/api/qwebengineloadinginfo.cpp       | 4 ++++
 src/core/api/qwebengineloadinginfo.h         | 2 +-
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/core/api/qwebenginefullscreenrequest.cpp b/src/core/api/qwebenginefullscreenrequest.cpp
index 938aad19c26..ddfaae0993d 100644
--- a/src/core/api/qwebenginefullscreenrequest.cpp
+++ b/src/core/api/qwebenginefullscreenrequest.cpp
@@ -67,6 +67,9 @@ class QWebEngineFullScreenRequestPrivate : public QSharedData {
 QWebEngineFullScreenRequest::QWebEngineFullScreenRequest(const QUrl &origin, bool toggleOn, const std::function<void (bool)> &setFullScreenCallback)
     : d_ptr(new QWebEngineFullScreenRequestPrivate(origin, toggleOn, setFullScreenCallback)) { }
 
+QWebEngineFullScreenRequest::QWebEngineFullScreenRequest()
+    : d_ptr(new QWebEngineFullScreenRequestPrivate(QUrl(), false, {})) { }
+
 QWebEngineFullScreenRequest::QWebEngineFullScreenRequest(const QWebEngineFullScreenRequest &other) = default;
 QWebEngineFullScreenRequest& QWebEngineFullScreenRequest::operator=(const QWebEngineFullScreenRequest &other) = default;
 QWebEngineFullScreenRequest::QWebEngineFullScreenRequest(QWebEngineFullScreenRequest &&other) = default;
diff --git a/src/core/api/qwebenginefullscreenrequest.h b/src/core/api/qwebenginefullscreenrequest.h
index b07d158fd35..07a2b8059a6 100644
--- a/src/core/api/qwebenginefullscreenrequest.h
+++ b/src/core/api/qwebenginefullscreenrequest.h
@@ -23,7 +23,7 @@ class Q_WEBENGINECORE_EXPORT QWebEngineFullScreenRequest
     Q_PROPERTY(QUrl origin READ origin CONSTANT)
 
 public:
-    QWebEngineFullScreenRequest() : QWebEngineFullScreenRequest(QUrl(), false, [](bool){}) {}
+    QWebEngineFullScreenRequest();
     QWebEngineFullScreenRequest(const QWebEngineFullScreenRequest &other);
     QWebEngineFullScreenRequest &operator=(const QWebEngineFullScreenRequest &other);
     QWebEngineFullScreenRequest(QWebEngineFullScreenRequest &&other);
diff --git a/src/core/api/qwebengineloadinginfo.cpp b/src/core/api/qwebengineloadinginfo.cpp
index 4d82f92b334..e60c70edb68 100644
--- a/src/core/api/qwebengineloadinginfo.cpp
+++ b/src/core/api/qwebengineloadinginfo.cpp
@@ -66,6 +66,10 @@ QWebEngineLoadingInfo::QWebEngineLoadingInfo(const QUrl& url, LoadStatus status,
 {
 }
 
+QWebEngineLoadingInfo::QWebEngineLoadingInfo() : QWebEngineLoadingInfo(QUrl(), QWebEngineLoadingInfo::LoadStartedStatus)
+{
+}
+
 QWebEngineLoadingInfo::QWebEngineLoadingInfo(const QWebEngineLoadingInfo &other) = default;
 QWebEngineLoadingInfo& QWebEngineLoadingInfo::operator=(const QWebEngineLoadingInfo &other) = default;
 QWebEngineLoadingInfo::QWebEngineLoadingInfo(QWebEngineLoadingInfo &&other) = default;
diff --git a/src/core/api/qwebengineloadinginfo.h b/src/core/api/qwebengineloadinginfo.h
index 16da45a2adb..098f8936a61 100644
--- a/src/core/api/qwebengineloadinginfo.h
+++ b/src/core/api/qwebengineloadinginfo.h
@@ -51,7 +51,7 @@ class Q_WEBENGINECORE_EXPORT QWebEngineLoadingInfo
     };
     Q_ENUM(ErrorDomain)
 
-    QWebEngineLoadingInfo() : QWebEngineLoadingInfo(QUrl(), LoadStartedStatus) {}
+    QWebEngineLoadingInfo();
     QWebEngineLoadingInfo(const QWebEngineLoadingInfo &other);
     QWebEngineLoadingInfo &operator=(const QWebEngineLoadingInfo &other);
     QWebEngineLoadingInfo(QWebEngineLoadingInfo &&other);

From a13f0f8568b23a0e3019cbac417fec2185776810 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Thu, 24 Jul 2025 13:24:34 +0200
Subject: [PATCH 080/100] Specify native platform for ANGLE's EGL backend on
 Wayland

Set EGL_PLATFORM=wayland to force ANGLE to obtain EGL display connection
for wayland platform. Otherwise, the display connection for
EGL_DEFAULT_DISPLAY may belong to a platform which Nvidia's EGL driver
doesn't support. In case of unsupported platform, EGL may fallback to
Mesa software renderer (LLVMPipe) disabling hardware acceleration in
Chromium.

Fixes: QTBUG-138425
Change-Id: I14250fd21e2215652d4533ca19784e2ac29cb5bb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 9a3cbf58e652e1e4c1ae13cf804b4d287b4e0703)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/ozone/gl_ozone_qt.cpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/core/ozone/gl_ozone_qt.cpp b/src/core/ozone/gl_ozone_qt.cpp
index bde6071508e..391e7d4bbfa 100644
--- a/src/core/ozone/gl_ozone_qt.cpp
+++ b/src/core/ozone/gl_ozone_qt.cpp
@@ -10,6 +10,7 @@
 #include "ozone_util_qt.h"
 
 #include <QtCore/private/qconfig_p.h>
+#include <QtGui/qguiapplication.h>
 #include <QtGui/qopenglcontext.h>
 
 #include "ui/base/ozone_buildflags.h"
@@ -29,6 +30,8 @@
 #include <dlfcn.h>
 #endif
 
+using namespace Qt::StringLiterals;
+
 extern "C" {
 typedef void (*__eglMustCastToProperFunctionPointerType)(void);
 extern __eglMustCastToProperFunctionPointerType EGL_GetProcAddress(const char *procname);
@@ -138,6 +141,18 @@ GLOzoneQt::ImportNativePixmap(scoped_refptr<gfx::NativePixmap> pixmap,
 
 bool GLOzoneANGLEQt::LoadGLES2Bindings(const gl::GLImplementationParts & /*implementation*/)
 {
+    if (QGuiApplication::platformName() == "wayland"_L1) {
+        const char eglPlatformVar[] = "EGL_PLATFORM";
+        const QByteArray eglPlatform = qgetenv(eglPlatformVar);
+        if (eglPlatform.isEmpty())
+            qputenv(eglPlatformVar, "wayland");
+        else if (eglPlatform != "wayland") {
+            qWarning("EGL_PLATFORM environment variable is set to \"%s\". "
+                     "This may break hardware rendering on Wayland.",
+                     eglPlatform.constData());
+        }
+    }
+
     gl::SetGLGetProcAddressProc(&EGL_GetProcAddress);
     return true;
 }

From e65778aee7c8023ad4bb64e699ea3462f0b01c47 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Wed, 30 Jul 2025 15:47:34 +0200
Subject: [PATCH 081/100] Fix async request calls in test httpserver

When we create in tests request handler and process responses,
the httpserver checked response isClosed() to bail out
from further processing. However, disconnecting from
the client is an async process, therefore proper check
should be isClosing(). Leave also isClosed() in case
handler does some re-entry into qt message loop.

Note this change can have side affects if given test case
relied on further processing.

Change-Id: I056c0da74000e1801ca756225db03b0f0209f360
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 8fbd99e61d73f2b67484a72a11789a576127a91f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 tests/auto/httpserver/httpreqrep.h   | 1 +
 tests/auto/httpserver/httpserver.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/auto/httpserver/httpreqrep.h b/tests/auto/httpserver/httpreqrep.h
index 2b90b774b16..0282942af57 100644
--- a/tests/auto/httpserver/httpreqrep.h
+++ b/tests/auto/httpserver/httpreqrep.h
@@ -19,6 +19,7 @@ class HttpReqRep : public QObject
     void sendResponse(const QByteArray &response);
     void close();
     bool isClosed() const { return m_state == State::DISCONNECTED; }
+    bool isClosing() const { return m_state == State::DISCONNECTING; }
 
     // Request parameters (only valid after requestReceived())
 
diff --git a/tests/auto/httpserver/httpserver.cpp b/tests/auto/httpserver/httpserver.cpp
index f5ef2198415..060ae996f9f 100644
--- a/tests/auto/httpserver/httpserver.cpp
+++ b/tests/auto/httpserver/httpserver.cpp
@@ -75,7 +75,7 @@ void HttpServer::handleNewConnection()
     auto rr = new HttpReqRep(m_tcpServer->nextPendingConnection(), this);
     connect(rr, &HttpReqRep::requestReceived, [this, rr]() {
         Q_EMIT newRequest(rr);
-        if (rr->isClosed()) // was explicitly answered
+        if (rr->isClosing() || rr->isClosed()) // was explicitly answered
             return;
 
         // if request wasn't handled or purposely ignored for default behavior

From 87f9b5955a0503eba4855fdfbc5bb43600b47d43 Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Tue, 5 Aug 2025 19:19:55 +0000
Subject: [PATCH 082/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I9c2ae1e3b03cc4eb78f09e8f2b0835c504684302
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 3165b921574..030734c719a 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: 1d383021d299031277bbfcc020727626293f5ba6
+    ref: 0f70624dd6ec5f3d2578490a02084dd7375a3842
     required: true
   ../qtpositioning:
-    ref: caad86072e0db9e5d46e5c7dd7e18e64c6dbce87
+    ref: 7d955e441d55fdd6df4205422fc39986c11b9454
     required: false
   ../qttools:
-    ref: 1575866313c4913a3c2142a93bc628e334b13b7c
+    ref: 035649d9f155777c7d8cd051bce7b95d466fd3d4
     required: false
   ../qtwebchannel:
-    ref: ffe74c635a31499f5fdc2a56dd90f9e6ce5ad92c
+    ref: 1f408980586d2c9f2eefe599a450165033601b90
     required: false

From c94b9117c9231ae7fca884d3a4d52c8d2f52aafb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Tue, 5 Aug 2025 12:13:37 +0200
Subject: [PATCH 083/100] Examples: Fix wrong signal handler parameters

These signals don't pass any arguments. The handlers were mistakenly
given parameters for some values. These are always undefined and can
shadow the actual value intended to be queried.

Amends f55df96ab51e590f73a7878742662758c1c4369b

Task-number: QTBUG-138589
Change-Id: Ide297f7abae0b4bb9aff3a8c6ce09555eb72df9b
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 716b874d92c292c9ff8bff73e381e92572cc9b2a)
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
---
 .../quicknanobrowser/BrowserWindow.qml               | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index 52dcac80e0e..8dd18c2a09b 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -327,9 +327,9 @@ ApplicationWindow {
                         text: "Off The Record"
                         checkable: true
                         checked: win.currentWebView?.profile === (win.applicationRoot as ApplicationRoot).otrPrototype.instance()
-                        onToggled: function(checked) {
+                        onToggled: function() {
                             if (win.currentWebView) {
-                                win.currentWebView.profile = checked
+                                win.currentWebView.profile = offTheRecordEnabled.checked
                                         ? (win.applicationRoot as ApplicationRoot).otrPrototype.instance()
                                         : (win.applicationRoot as ApplicationRoot).defaultProfilePrototype.instance();
                             }
@@ -340,9 +340,11 @@ ApplicationWindow {
                         text: "HTTP Disk Cache"
                         checkable: !win.currentWebView?.profile?.offTheRecord ?? false
                         checked: win.currentWebView?.profile.httpCacheType === WebEngineProfile.DiskHttpCache
-                        onToggled: function(checked) {
+                        onToggled: function() {
                             if (win.currentWebView) {
-                                win.currentWebView.profile.httpCacheType = checked ? WebEngineProfile.DiskHttpCache : WebEngineProfile.MemoryHttpCache;
+                                win.currentWebView.profile.httpCacheType = httpDiskCacheEnabled.checked
+                                        ? WebEngineProfile.DiskHttpCache
+                                        : WebEngineProfile.MemoryHttpCache;
                             }
                         }
                     }
@@ -702,7 +704,7 @@ ApplicationWindow {
             repeat: false
             onTriggered: devToolsEnabled.checked = false
         }
-        onWindowCloseRequested: function(request) {
+        onWindowCloseRequested: function() {
             // Delay hiding for keep the inspectedView set to receive the ACK message of close.
             hideTimer.running = true;
         }

From 53b7cb6529293d3d253320c4a9cf2085b1d550a0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Tue, 22 Jul 2025 15:05:35 +0200
Subject: [PATCH 084/100] Examples: Fix Quick qmllint warnings in
 quicknanobrowser

The top and bottom margins were removed from the find box as that fixes
its appearance visually. The rectangle spills out of the field
otherwise.

Task-number: QTBUG-138589
Change-Id: I4ff2559fa0cbd83bc40b15a1acb52bfeffad7cf8
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 0de3cf4a555e9909c2886ff221a03b18ade0aa50)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../webenginequick/quicknanobrowser/BrowserWindow.qml     | 8 ++++----
 examples/webenginequick/quicknanobrowser/FindBar.qml      | 8 +++-----
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index 8dd18c2a09b..7bb2d1b8d9b 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -454,9 +454,9 @@ ApplicationWindow {
 
         TabButton {
             id: tabButton
-            property color frameColor: "#999"
-            property color fillColor: "#eee"
-            property color nonSelectedColor: "#ddd"
+            property color frameColor: "#999999"
+            property color fillColor: "#eeeeee"
+            property color nonSelectedColor: "#dddddd"
             property string tabTitle: "New Tab"
 
             contentItem: Rectangle {
@@ -488,7 +488,7 @@ ApplicationWindow {
                     background: Rectangle {
                         implicitWidth: 12
                         implicitHeight: 12
-                        color: button.hovered ? "#ccc" : tabRectangle.color
+                        color: button.hovered ? "#cccccc" : tabRectangle.color
                         Text {text: "x"; anchors.centerIn: parent; color: "gray"}
                     }
                     onClicked: tabButton.closeTab()
diff --git a/examples/webenginequick/quicknanobrowser/FindBar.qml b/examples/webenginequick/quicknanobrowser/FindBar.qml
index d27336a921b..442f7c5f334 100644
--- a/examples/webenginequick/quicknanobrowser/FindBar.qml
+++ b/examples/webenginequick/quicknanobrowser/FindBar.qml
@@ -70,11 +70,9 @@ Rectangle {
 
         Rectangle {
             border.width: 1
-            border.color: "#ddd"
-            width: 2
-            height: parent.height
-            anchors.topMargin: 5
-            anchors.bottomMargin: 5
+            border.color: "#dddddd"
+            Layout.preferredWidth: 2
+            Layout.preferredHeight: parent.height
         }
 
         ToolButton {

From 29ca686222c0e5ccb02bf3b78f7b4ec24c969588 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Tue, 22 Jul 2025 15:26:07 +0200
Subject: [PATCH 085/100] Examples: Use strict comparison operators for
 quicknanobrowser

Interestingly, none of these triggered qmllint warnings.

Task-number: QTBUG-138589
Change-Id: I04618ff65448c9f23bce4c23a80b665e66d20956
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 06809ac4ace12801ce629de891a377e2d32845aa)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../webenginequick/quicknanobrowser/BrowserWindow.qml  | 10 +++++-----
 .../webenginequick/quicknanobrowser/DownloadView.qml   |  2 +-
 examples/webenginequick/quicknanobrowser/FindBar.qml   |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index 7bb2d1b8d9b..4b66d297b62 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -33,7 +33,7 @@ ApplicationWindow {
     }
 
     // When using style "mac", ToolButtons are not supposed to accept focus.
-    property bool platformIsMac: Qt.platform.os == "osx"
+    property bool platformIsMac: Qt.platform.os === "osx"
 
     Settings {
         id : appSettings
@@ -74,7 +74,7 @@ ApplicationWindow {
     Action {
         shortcut: StandardKey.AddTab
         onTriggered: {
-            tabBar.createTab(tabBar.count != 0
+            tabBar.createTab(tabBar.count !== 0
                              ? win.currentWebView.profile
                              : (win.applicationRoot as ApplicationRoot).defaultProfilePrototype.instance());
             addressBar.forceActiveFocus();
@@ -94,7 +94,7 @@ ApplicationWindow {
     Action {
         shortcut: "Escape"
         onTriggered: {
-            if (win.currentWebView.state == "FullScreen") {
+            if (win.currentWebView.state === "FullScreen") {
                 win.visibility = win.previousVisibility;
                 fullScreenNotification.hide();
                 win.currentWebView.triggerWebAction(WebEngineView.ExitFullScreen);
@@ -538,7 +538,7 @@ ApplicationWindow {
                 focus: true
 
                 onLinkHovered: function(hoveredUrl) {
-                    if (hoveredUrl == "")
+                    if (hoveredUrl === "")
                         hideStatusText.start();
                     else {
                         statusText.text = hoveredUrl;
@@ -662,7 +662,7 @@ ApplicationWindow {
                 }
 
                 onLoadingChanged: function(loadRequest) {
-                    if (loadRequest.status == WebEngineView.LoadStartedStatus)
+                    if (loadRequest.status === WebEngineView.LoadStartedStatus)
                         findBar.reset();
                 }
 
diff --git a/examples/webenginequick/quicknanobrowser/DownloadView.qml b/examples/webenginequick/quicknanobrowser/DownloadView.qml
index 845f371427a..ef0c7f5a7d7 100644
--- a/examples/webenginequick/quicknanobrowser/DownloadView.qml
+++ b/examples/webenginequick/quicknanobrowser/DownloadView.qml
@@ -44,7 +44,7 @@ Rectangle {
                 }
 
                 radius: 3
-                color: width == listView.width ? "green" : "#2b74c7"
+                color: width === listView.width ? "green" : "#2b74c7"
                 width: listView.width * progress
                 height: cancelButton.height
 
diff --git a/examples/webenginequick/quicknanobrowser/FindBar.qml b/examples/webenginequick/quicknanobrowser/FindBar.qml
index 442f7c5f334..013f28e88a6 100644
--- a/examples/webenginequick/quicknanobrowser/FindBar.qml
+++ b/examples/webenginequick/quicknanobrowser/FindBar.qml
@@ -64,7 +64,7 @@ Rectangle {
 
         Label {
             text: root.activeMatch + "/" + root.numberOfMatches
-            visible: findTextField.text != ""
+            visible: findTextField.text !== ""
             color: "black"
         }
 

From ec3259a6a0d2025fcbb94206f818ff8dffc4c7ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Olivier=20De=20Canni=C3=A8re?= <olivier.decanniere@qt.io>
Date: Tue, 22 Jul 2025 15:56:39 +0200
Subject: [PATCH 086/100] Examples: Update qmake files for quicknanobrowser

Task-number: QTBUG-138589
Change-Id: Icef324886802532cad05f7c71ae10deafc2a77d1
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit b6e52faeb996ee04ea433984d10b7da3cd7b42ff)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 examples/webenginequick/quicknanobrowser/qmldir     | 10 ++++++++++
 .../webenginequick/quicknanobrowser/resources.qrc   | 13 ++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)
 create mode 100644 examples/webenginequick/quicknanobrowser/qmldir

diff --git a/examples/webenginequick/quicknanobrowser/qmldir b/examples/webenginequick/quicknanobrowser/qmldir
new file mode 100644
index 00000000000..036b2e22307
--- /dev/null
+++ b/examples/webenginequick/quicknanobrowser/qmldir
@@ -0,0 +1,10 @@
+module BrowserUtils
+prefer :/qt/qml/BrowserUtils/
+ApplicationRoot 254.0 ApplicationRoot.qml
+BrowserDialog 254.0 BrowserDialog.qml
+BrowserWindow 254.0 BrowserWindow.qml
+DownloadView 254.0 DownloadView.qml
+FindBar 254.0 FindBar.qml
+FullScreenNotification 254.0 FullScreenNotification.qml
+WebAuthDialog 254.0 WebAuthDialog.qml
+depends QtQuick
diff --git a/examples/webenginequick/quicknanobrowser/resources.qrc b/examples/webenginequick/quicknanobrowser/resources.qrc
index 0a0b42bbb6e..c91d753dd1f 100644
--- a/examples/webenginequick/quicknanobrowser/resources.qrc
+++ b/examples/webenginequick/quicknanobrowser/resources.qrc
@@ -1,5 +1,5 @@
 <RCC>
-    <qresource prefix="/">
+    <qresource prefix="/qt/qml/BrowserUtils">
         <file>ApplicationRoot.qml</file>
         <file>BrowserDialog.qml</file>
         <file>BrowserWindow.qml</file>
@@ -7,11 +7,10 @@
         <file>FindBar.qml</file>
         <file>FullScreenNotification.qml</file>
         <file>WebAuthDialog.qml</file>
-    </qresource>
-    <qresource prefix="/icons">
-        <file alias="go-next.png">icons/3rdparty/go-next.png</file>
-        <file alias="go-previous.png">icons/3rdparty/go-previous.png</file>
-        <file alias="process-stop.png">icons/3rdparty/process-stop.png</file>
-        <file alias="view-refresh.png">icons/3rdparty/view-refresh.png</file>
+        <file>qmldir</file>
+        <file>icons/3rdparty/go-next.png</file>
+        <file>icons/3rdparty/go-previous.png</file>
+        <file>icons/3rdparty/process-stop.png</file>
+        <file>icons/3rdparty/view-refresh.png</file>
     </qresource>
 </RCC>

From 9a760ba22fb6ac73d3ecf73fb21d038a556f433d Mon Sep 17 00:00:00 2001
From: Sami Shalayel <sami.shalayel@qt.io>
Date: Mon, 28 Jul 2025 10:00:20 +0200
Subject: [PATCH 087/100] single/multi page viewer example: fix runtime warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fix a runtime warning on some platforms (macos, for example), by using
the sequences property instead of sequence (without s).

Fixes: QTBUG-138734
Change-Id: Ia531087222dee14cfbf2683df398700664505b26
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
(cherry picked from commit b0e10e7066c7ebfac72b2b5b50047b20fe9b8d8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 examples/pdf/multipage/Viewer.qml  | 4 ++--
 examples/pdf/singlepage/Viewer.qml | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/pdf/multipage/Viewer.qml b/examples/pdf/multipage/Viewer.qml
index d3ac6123036..a92774f09f6 100644
--- a/examples/pdf/multipage/Viewer.qml
+++ b/examples/pdf/multipage/Viewer.qml
@@ -95,11 +95,11 @@ ApplicationWindow {
                 editable: true
                 onValueModified: view.goToPage(value - 1)
                 Shortcut {
-                    sequence: StandardKey.MoveToPreviousPage
+                    sequences: [ StandardKey.MoveToPreviousPage ]
                     onActivated: view.goToPage(currentPageSB.value - 2)
                 }
                 Shortcut {
-                    sequence: StandardKey.MoveToNextPage
+                    sequences: [ StandardKey.MoveToNextPage ]
                     onActivated: view.goToPage(currentPageSB.value)
                 }
             }
diff --git a/examples/pdf/singlepage/Viewer.qml b/examples/pdf/singlepage/Viewer.qml
index 901bba7e8cb..f6f567ef260 100644
--- a/examples/pdf/singlepage/Viewer.qml
+++ b/examples/pdf/singlepage/Viewer.qml
@@ -97,11 +97,11 @@ ApplicationWindow {
                 value: view.currentPage + 1
                 onValueModified: view.goToPage(value - 1)
                 Shortcut {
-                    sequence: StandardKey.MoveToPreviousPage
+                    sequences: [ StandardKey.MoveToPreviousPage ]
                     onActivated: view.goToPage(currentPageSB.value - 2)
                 }
                 Shortcut {
-                    sequence: StandardKey.MoveToNextPage
+                    sequences: [ StandardKey.MoveToNextPage ]
                     onActivated: view.goToPage(currentPageSB.value)
                 }
             }

From 6653088d7e7e5b874005ba8fdeb05360157161a3 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Thu, 3 Jul 2025 09:56:32 +0200
Subject: [PATCH 088/100] CMake: Add deployment script to quicknanobrowser
 example

Task-number: QTBUG-111907
Change-Id: I1b662a7008f705a3c68d6a1ef1564f1d71ad309a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7ca25d13d5f00f6201c9b85e94da6c10e6fca4a0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../webenginequick/quicknanobrowser/CMakeLists.txt    | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/CMakeLists.txt b/examples/webenginequick/quicknanobrowser/CMakeLists.txt
index 4b81d8dd9cf..08693328e31 100644
--- a/examples/webenginequick/quicknanobrowser/CMakeLists.txt
+++ b/examples/webenginequick/quicknanobrowser/CMakeLists.txt
@@ -82,8 +82,11 @@ if (APPLE)
     endif()
 endif()
 
-install(TARGETS quicknanobrowser
-    RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
-    BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
-    LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+    TARGET quicknanobrowser
+    OUTPUT_SCRIPT deploy_script
+    MACOS_BUNDLE_POST_BUILD
+    NO_UNSUPPORTED_PLATFORM_ERROR
+    DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
 )
+install(SCRIPT ${deploy_script})

From 2db9b4c95be9691e1cc81d1a481441497699e154 Mon Sep 17 00:00:00 2001
From: Anu Aliyas <anu.aliyas@qt.io>
Date: Thu, 10 Jul 2025 21:02:24 +0200
Subject: [PATCH 089/100] [134-based]Support cursors on macOS
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change-Id: I10e699fcf3ed60952e86faf7f10297fea3a16d35
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
(cherry picked from commit 44d019140bf3ab70ab0a133572a63428c3a53418)
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
---
 src/core/CMakeLists.txt                 |  1 +
 src/core/cursor_utils_qt_mac.h          | 23 ++++++++++++
 src/core/cursor_utils_qt_mac.mm         | 50 +++++++++++++++++++++++++
 src/core/render_widget_host_view_qt.cpp | 20 +++++++---
 src/core/render_widget_host_view_qt.h   |  2 +-
 5 files changed, 90 insertions(+), 6 deletions(-)
 create mode 100644 src/core/cursor_utils_qt_mac.h
 create mode 100644 src/core/cursor_utils_qt_mac.mm

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index aa32b6ef5cd..23dc00dfac4 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -251,6 +251,7 @@ foreach(arch ${archs})
                 native_web_keyboard_event_qt_mac.mm
                 compositor/native_skia_output_device_mac.mm
                 compositor/native_skia_output_device_metal.cpp compositor/native_skia_output_device_metal.h
+                cursor_utils_qt_mac.mm cursor_utils_qt_mac.h
         )
 
         extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_pepper_plugins
diff --git a/src/core/cursor_utils_qt_mac.h b/src/core/cursor_utils_qt_mac.h
new file mode 100644
index 00000000000..a0ffed0cace
--- /dev/null
+++ b/src/core/cursor_utils_qt_mac.h
@@ -0,0 +1,23 @@
+// Copyright (C) 2025 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 CURSOR_ULTIS_QT_MAC_H
+#define CURSOR_ULTIS_QT_MAC_H
+
+#include <QtCore/qglobal.h>
+#include <QtGui/QImage>
+#include "ui/base/cocoa/cursor_utils.h"
+
+namespace QtWebEngineCore {
+
+struct ImageInfo
+{
+    QImage image;
+    QPoint hotSpotData;
+};
+
+ImageInfo QImageFromNSCursor(const ui::Cursor &cursor);
+
+} // namespace QtWebEngineCore
+
+#endif // CURSOR_ULTIS_QT_MAC_H
diff --git a/src/core/cursor_utils_qt_mac.mm b/src/core/cursor_utils_qt_mac.mm
new file mode 100644
index 00000000000..e2b113a48ff
--- /dev/null
+++ b/src/core/cursor_utils_qt_mac.mm
@@ -0,0 +1,50 @@
+// Copyright (C) 2025 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
+
+#undef Q_FORWARD_DECLARE_OBJC_CLASS
+
+#include "cursor_utils_qt_mac.h"
+#include "ui/base/cocoa/cursor_utils.h"
+#include <QImage>
+#include <AppKit/AppKit.h>
+#include <QtGui/private/qcoregraphics_p.h>
+
+namespace QtWebEngineCore {
+
+CGImageRef CGImageFromNSImage(NSImage *image)
+{
+    NSSize size = image.size;
+    CGRect rect = CGRectMake(0, 0, size.width, size.height);
+
+    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+    CGContextRef ctx = CGBitmapContextCreate(NULL, size.width, size.height, 8, 0, colorSpace,
+                                             kCGImageAlphaPremultipliedLast);
+    CGColorSpaceRelease(colorSpace);
+
+    NSGraphicsContext *gc = [NSGraphicsContext graphicsContextWithGraphicsPort:ctx flipped:NO];
+    [NSGraphicsContext saveGraphicsState];
+    [NSGraphicsContext setCurrentContext:gc];
+    [image drawInRect:rect fromRect:NSZeroRect operation:NSCompositingOperationCopy fraction:1.0];
+    [NSGraphicsContext restoreGraphicsState];
+
+    CGImageRef cgImage = CGBitmapContextCreateImage(ctx);
+    CGContextRelease(ctx);
+    return cgImage;
+}
+
+ImageInfo QImageFromNSCursor(const ui::Cursor &cursor)
+{
+    ImageInfo imageInfo;
+    NSCursor *nativeCursor = ui::GetNativeCursor(cursor);
+    NSImage *image = [nativeCursor image];
+    NSPoint hotSpot = [nativeCursor hotSpot];
+    imageInfo.hotSpotData.setX(hotSpot.x);
+    imageInfo.hotSpotData.setX(hotSpot.y);
+
+    CGImageRef cgImageRef = CGImageFromNSImage(image);
+    imageInfo.image = qt_mac_toQImage(cgImageRef);
+    CGImageRelease(cgImageRef);
+    return imageInfo;
+}
+
+}
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 3b7ba67dd4f..520ec88ccb0 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -53,6 +53,7 @@
 
 #if defined(Q_OS_MACOS)
 #include "ui/resources/grit/ui_resources.h"
+#include "cursor_utils_qt_mac.h"
 #endif
 
 #include <QGuiApplication>
@@ -422,7 +423,7 @@ void RenderWidgetHostViewQt::UnlockPointer()
     host()->LostPointerLock();
 }
 
-bool RenderWidgetHostViewQt::updateCursorFromResource(ui::mojom::CursorType type)
+bool RenderWidgetHostViewQt::updateCursorFromResource(const ui::Cursor &cursorInfo)
 {
     int resourceId;
     // GetCursorDataFor only knows hotspots for 1x and 2x cursor images, in physical pixels.
@@ -433,22 +434,31 @@ bool RenderWidgetHostViewQt::updateCursorFromResource(ui::mojom::CursorType type
 #if defined(USE_AURA)
     gfx::Point hotspot;
     bool isAnimated;
-    if (!wm::GetCursorDataFor(ui::CursorSize::kNormal, type, hotspotDpr, &resourceId, &hotspot, &isAnimated))
+    if (!wm::GetCursorDataFor(ui::CursorSize::kNormal, cursorInfo.type(), hotspotDpr, &resourceId,
+                              &hotspot, &isAnimated))
         return false;
     hotX = hotspot.x();
     hotY = hotspot.y();
 #elif defined(Q_OS_MACOS)
     // FIXME: find a way to reimplement
-    return false;
+    // get QImage from native cursor
+    ImageInfo imageInfo = QImageFromNSCursor(cursorInfo);
+    hotX = imageInfo.hotSpotData.x();
+    hotY = imageInfo.hotSpotData.y();
 #else
     Q_UNREACHABLE_RETURN(false);
 #endif
 
+    QImage imageQt;
+#if defined(Q_OS_MACOS)
+    imageQt = imageInfo.image;
+#else
     const gfx::ImageSkia *imageSkia = ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(resourceId);
     if (!imageSkia)
         return false;
 
-    QImage imageQt = toQImage(imageSkia->GetRepresentation(GetScreenInfo().device_scale_factor));
+    imageQt = toQImage(imageSkia->GetRepresentation(GetScreenInfo().device_scale_factor));
+#endif
 
     // Convert hotspot coordinates into device-independent pixels.
     hotX /= hotspotDpr;
@@ -553,7 +563,7 @@ void RenderWidgetHostViewQt::DisplayCursor(const ui::Cursor &cursorInfo)
     case ui::mojom::CursorType::kContextMenu:
     case ui::mojom::CursorType::kZoomIn:
     case ui::mojom::CursorType::kZoomOut:
-        if (updateCursorFromResource(cursorInfo.type()))
+        if (updateCursorFromResource(cursorInfo))
             return;
         break;
     case ui::mojom::CursorType::kEastWestNoResize:
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index 4a47b5c3415..1f4b3966706 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -189,7 +189,7 @@ class RenderWidgetHostViewQt
 
     bool isPopup() const;
 
-    bool updateCursorFromResource(ui::mojom::CursorType type);
+    bool updateCursorFromResource(const ui::Cursor &cursorInfo);
 
     scoped_refptr<base::SingleThreadTaskRunner> m_taskRunner;
 

From 2c15c762b55df97614c1b90e6cb01e46a888b2ca Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Tue, 5 Aug 2025 14:24:37 +0200
Subject: [PATCH 090/100] Remove leftover QOffscreenSurface from EGLHelper

Amends
2ed5f9632 Create EGLImage with eglCreateDRMImageMESA() for exporting dma_buf

Pick-to: 6.9
Task-number: QTBUG-136257
Change-Id: Ice4f4d58edaa7de6a55b2a621e930393803eb869
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit bcee2dbf412cc655c1b467091b581c696d234e3f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/ozone/egl_helper.cpp | 6 ------
 src/core/ozone/egl_helper.h   | 3 ---
 2 files changed, 9 deletions(-)

diff --git a/src/core/ozone/egl_helper.cpp b/src/core/ozone/egl_helper.cpp
index 1ed679d2390..78771d5d037 100644
--- a/src/core/ozone/egl_helper.cpp
+++ b/src/core/ozone/egl_helper.cpp
@@ -5,9 +5,7 @@
 #include "ozone_util_qt.h"
 #include "web_engine_context.h"
 
-#include <QtCore/qthread.h>
 #include <QtGui/qguiapplication.h>
-#include <QtGui/qoffscreensurface.h>
 #include <QtGui/qopenglcontext.h>
 #include <QtGui/qopenglfunctions.h>
 #include <qpa/qplatformnativeinterface.h>
@@ -94,7 +92,6 @@ EGLHelper *EGLHelper::instance()
 EGLHelper::EGLHelper()
     : m_eglDisplay(qApp->platformNativeInterface()->nativeResourceForIntegration("egldisplay"))
     , m_functions(new EGLHelper::EGLFunctions())
-    , m_offscreenSurface(new QOffscreenSurface())
 {
     const char *extensions = m_functions->eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
     if (!extensions) {
@@ -112,9 +109,6 @@ EGLHelper::EGLHelper()
         return;
     }
 
-    Q_ASSERT(QThread::currentThread() == qApp->thread());
-    m_offscreenSurface->create();
-
     m_isDmaBufSupported = QtWebEngineCore::WebEngineContext::isGbmSupported();
 
     // Check extensions.
diff --git a/src/core/ozone/egl_helper.h b/src/core/ozone/egl_helper.h
index 7594e1f8469..1710f00648d 100644
--- a/src/core/ozone/egl_helper.h
+++ b/src/core/ozone/egl_helper.h
@@ -24,8 +24,6 @@
 
 QT_BEGIN_NAMESPACE
 
-class QOffscreenSurface;
-
 class EGLHelper
 {
 public:
@@ -60,7 +58,6 @@ class EGLHelper
 
     EGLDisplay m_eglDisplay = EGL_NO_DISPLAY;
     QScopedPointer<EGLFunctions> m_functions;
-    QScopedPointer<QOffscreenSurface> m_offscreenSurface;
     bool m_isDmaBufSupported = false;
 };
 

From 3ec6722b9697814bd2f0a9f432304cd110573291 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Tue, 5 Aug 2025 13:37:30 +0200
Subject: [PATCH 091/100] CRA mark src/core/compositor and src/core/ozone

QUIP: 23
Fixes: QTBUG-138723
Pick-to: 6.9 6.8
Change-Id: Iac39c4d70e3887e910fe32f70e42d914a854e62d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit fbd466c74bd9b069062121839d56a8432e38e57c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/compositor/compositor.cpp                           | 1 +
 src/core/compositor/compositor.h                             | 1 +
 src/core/compositor/display_overrides.cpp                    | 1 +
 src/core/compositor/display_software_output_surface.cpp      | 1 +
 src/core/compositor/display_software_output_surface.h        | 1 +
 src/core/compositor/native_skia_output_device.cpp            | 1 +
 src/core/compositor/native_skia_output_device.h              | 1 +
 src/core/compositor/native_skia_output_device_direct3d11.cpp | 1 +
 src/core/compositor/native_skia_output_device_direct3d11.h   | 1 +
 src/core/compositor/native_skia_output_device_mac.mm         | 1 +
 src/core/compositor/native_skia_output_device_metal.cpp      | 1 +
 src/core/compositor/native_skia_output_device_metal.h        | 1 +
 src/core/compositor/native_skia_output_device_opengl.cpp     | 1 +
 src/core/compositor/native_skia_output_device_opengl.h       | 1 +
 src/core/compositor/native_skia_output_device_vulkan.cpp     | 1 +
 src/core/compositor/native_skia_output_device_vulkan.h       | 1 +
 src/core/compositor/vulkan_implementation_qt.cpp             | 1 +
 src/core/compositor/vulkan_implementation_qt.h               | 1 +
 src/core/compositor/wgl_helper.cpp                           | 1 +
 src/core/compositor/wgl_helper.h                             | 1 +
 src/core/ozone/egl_helper.cpp                                | 1 +
 src/core/ozone/egl_helper.h                                  | 1 +
 src/core/ozone/gl_helper.cpp                                 | 1 +
 src/core/ozone/gl_helper.h                                   | 1 +
 src/core/ozone/gl_ozone_qt.cpp                               | 1 +
 src/core/ozone/gl_ozone_qt.h                                 | 1 +
 src/core/ozone/glx_helper.cpp                                | 1 +
 src/core/ozone/glx_helper.h                                  | 1 +
 src/core/ozone/ozone_platform_qt.cpp                         | 1 +
 src/core/ozone/ozone_platform_qt.h                           | 1 +
 src/core/ozone/ozone_util_qt.cpp                             | 1 +
 src/core/ozone/ozone_util_qt.h                               | 1 +
 src/core/ozone/platform_window_qt.cpp                        | 1 +
 src/core/ozone/platform_window_qt.h                          | 1 +
 src/core/ozone/surface_factory_qt.cpp                        | 1 +
 src/core/ozone/surface_factory_qt.h                          | 1 +
 36 files changed, 36 insertions(+)

diff --git a/src/core/compositor/compositor.cpp b/src/core/compositor/compositor.cpp
index 2cbe0846ab2..1bc4b52689e 100644
--- a/src/core/compositor/compositor.cpp
+++ b/src/core/compositor/compositor.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2020 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 "compositor.h"
 
diff --git a/src/core/compositor/compositor.h b/src/core/compositor/compositor.h
index aaa1a74c8c0..aebd8f4c551 100644
--- a/src/core/compositor/compositor.h
+++ b/src/core/compositor/compositor.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2020 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 COMPOSITOR_H
 #define COMPOSITOR_H
diff --git a/src/core/compositor/display_overrides.cpp b/src/core/compositor/display_overrides.cpp
index c33e79e54ef..87fbf6a2584 100644
--- a/src/core/compositor/display_overrides.cpp
+++ b/src/core/compositor/display_overrides.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2019 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 "display_software_output_surface.h"
 #include "native_skia_output_device.h"
diff --git a/src/core/compositor/display_software_output_surface.cpp b/src/core/compositor/display_software_output_surface.cpp
index 2ad608f26fb..833469b85fb 100644
--- a/src/core/compositor/display_software_output_surface.cpp
+++ b/src/core/compositor/display_software_output_surface.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2019 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 "display_software_output_surface.h"
 
diff --git a/src/core/compositor/display_software_output_surface.h b/src/core/compositor/display_software_output_surface.h
index d23664d56e8..4bcefbe2cf4 100644
--- a/src/core/compositor/display_software_output_surface.h
+++ b/src/core/compositor/display_software_output_surface.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2019 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 DISPLAY_SOFTWARE_OUTPUT_SURFACE_H
 #define DISPLAY_SOFTWARE_OUTPUT_SURFACE_H
diff --git a/src/core/compositor/native_skia_output_device.cpp b/src/core/compositor/native_skia_output_device.cpp
index 1bad6c5b34a..b91512a40de 100644
--- a/src/core/compositor/native_skia_output_device.cpp
+++ b/src/core/compositor/native_skia_output_device.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2023 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 "native_skia_output_device.h"
 
diff --git a/src/core/compositor/native_skia_output_device.h b/src/core/compositor/native_skia_output_device.h
index 7dabca07dfc..9a573055daa 100644
--- a/src/core/compositor/native_skia_output_device.h
+++ b/src/core/compositor/native_skia_output_device.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2023 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 NATIVE_SKIA_OUTPUT_DEVICE_H
 #define NATIVE_SKIA_OUTPUT_DEVICE_H
diff --git a/src/core/compositor/native_skia_output_device_direct3d11.cpp b/src/core/compositor/native_skia_output_device_direct3d11.cpp
index 4454e500446..584f2bbcdce 100644
--- a/src/core/compositor/native_skia_output_device_direct3d11.cpp
+++ b/src/core/compositor/native_skia_output_device_direct3d11.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 "native_skia_output_device_direct3d11.h"
 
diff --git a/src/core/compositor/native_skia_output_device_direct3d11.h b/src/core/compositor/native_skia_output_device_direct3d11.h
index 33cf1bcd6fe..13441c742d2 100644
--- a/src/core/compositor/native_skia_output_device_direct3d11.h
+++ b/src/core/compositor/native_skia_output_device_direct3d11.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 NATIVE_SKIA_OUTPUT_DEVICE_DIRECT3D11_H
 #define NATIVE_SKIA_OUTPUT_DEVICE_DIRECT3D11_H
diff --git a/src/core/compositor/native_skia_output_device_mac.mm b/src/core/compositor/native_skia_output_device_mac.mm
index bf21ef8d7f1..e87309acd86 100644
--- a/src/core/compositor/native_skia_output_device_mac.mm
+++ b/src/core/compositor/native_skia_output_device_mac.mm
@@ -1,5 +1,6 @@
 // Copyright (C) 2023 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 a workaround to be able to include Qt headers without
 // "redefinition of 'NSString' as different kind of symbol" errors.
diff --git a/src/core/compositor/native_skia_output_device_metal.cpp b/src/core/compositor/native_skia_output_device_metal.cpp
index 77f869de75e..a7eaa5b33e8 100644
--- a/src/core/compositor/native_skia_output_device_metal.cpp
+++ b/src/core/compositor/native_skia_output_device_metal.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 "native_skia_output_device_metal.h"
 
diff --git a/src/core/compositor/native_skia_output_device_metal.h b/src/core/compositor/native_skia_output_device_metal.h
index 8e8d0fab866..6ab5d48f5cf 100644
--- a/src/core/compositor/native_skia_output_device_metal.h
+++ b/src/core/compositor/native_skia_output_device_metal.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 NATIVE_SKIA_OUTPUT_DEVICE_METAL_H
 #define NATIVE_SKIA_OUTPUT_DEVICE_METAL_H
diff --git a/src/core/compositor/native_skia_output_device_opengl.cpp b/src/core/compositor/native_skia_output_device_opengl.cpp
index 7e1511c16a0..c43311d80a2 100644
--- a/src/core/compositor/native_skia_output_device_opengl.cpp
+++ b/src/core/compositor/native_skia_output_device_opengl.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 "native_skia_output_device_opengl.h"
 
diff --git a/src/core/compositor/native_skia_output_device_opengl.h b/src/core/compositor/native_skia_output_device_opengl.h
index 233f51df965..53847171538 100644
--- a/src/core/compositor/native_skia_output_device_opengl.h
+++ b/src/core/compositor/native_skia_output_device_opengl.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 NATIVE_SKIA_OUTPUT_DEVICE_OPENGL_H
 #define NATIVE_SKIA_OUTPUT_DEVICE_OPENGL_H
diff --git a/src/core/compositor/native_skia_output_device_vulkan.cpp b/src/core/compositor/native_skia_output_device_vulkan.cpp
index 123be531b25..1e7f25cd03a 100644
--- a/src/core/compositor/native_skia_output_device_vulkan.cpp
+++ b/src/core/compositor/native_skia_output_device_vulkan.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 "native_skia_output_device_vulkan.h"
 
diff --git a/src/core/compositor/native_skia_output_device_vulkan.h b/src/core/compositor/native_skia_output_device_vulkan.h
index bead0cc1114..4694729eac0 100644
--- a/src/core/compositor/native_skia_output_device_vulkan.h
+++ b/src/core/compositor/native_skia_output_device_vulkan.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 NATIVE_SKIA_OUTPUT_DEVICE_VULKAN_H
 #define NATIVE_SKIA_OUTPUT_DEVICE_VULKAN_H
diff --git a/src/core/compositor/vulkan_implementation_qt.cpp b/src/core/compositor/vulkan_implementation_qt.cpp
index 2f225966631..56fb4f1c4f3 100644
--- a/src/core/compositor/vulkan_implementation_qt.cpp
+++ b/src/core/compositor/vulkan_implementation_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:critical reason:execute-external-code
 
 #include "vulkan_implementation_qt.h"
 
diff --git a/src/core/compositor/vulkan_implementation_qt.h b/src/core/compositor/vulkan_implementation_qt.h
index 88983331fa7..7f94e990063 100644
--- a/src/core/compositor/vulkan_implementation_qt.h
+++ b/src/core/compositor/vulkan_implementation_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 VULKAN_IMPLEMENTATION_QT_H
 #define VULKAN_IMPLEMENTATION_QT_H
diff --git a/src/core/compositor/wgl_helper.cpp b/src/core/compositor/wgl_helper.cpp
index 11526f4f95a..85e6bb915e8 100644
--- a/src/core/compositor/wgl_helper.cpp
+++ b/src/core/compositor/wgl_helper.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 "wgl_helper.h"
 
diff --git a/src/core/compositor/wgl_helper.h b/src/core/compositor/wgl_helper.h
index 770af3ab377..c726c234cce 100644
--- a/src/core/compositor/wgl_helper.h
+++ b/src/core/compositor/wgl_helper.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 WGL_HELPER_H
 #define WGL_HELPER_H
diff --git a/src/core/ozone/egl_helper.cpp b/src/core/ozone/egl_helper.cpp
index 78771d5d037..76e1c2a4663 100644
--- a/src/core/ozone/egl_helper.cpp
+++ b/src/core/ozone/egl_helper.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 "egl_helper.h"
 #include "ozone_util_qt.h"
diff --git a/src/core/ozone/egl_helper.h b/src/core/ozone/egl_helper.h
index 1710f00648d..6233ef87e4d 100644
--- a/src/core/ozone/egl_helper.h
+++ b/src/core/ozone/egl_helper.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 EGL_HELPER_H
 #define EGL_HELPER_H
diff --git a/src/core/ozone/gl_helper.cpp b/src/core/ozone/gl_helper.cpp
index f5135e23480..bd358430fa8 100644
--- a/src/core/ozone/gl_helper.cpp
+++ b/src/core/ozone/gl_helper.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 "gl_helper.h"
 #include "ozone_util_qt.h"
diff --git a/src/core/ozone/gl_helper.h b/src/core/ozone/gl_helper.h
index ae8639c84ee..a7cdbdade50 100644
--- a/src/core/ozone/gl_helper.h
+++ b/src/core/ozone/gl_helper.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 GL_HELPER_H
 #define GL_HELPER_H
diff --git a/src/core/ozone/gl_ozone_qt.cpp b/src/core/ozone/gl_ozone_qt.cpp
index 391e7d4bbfa..db6b76c2cf4 100644
--- a/src/core/ozone/gl_ozone_qt.cpp
+++ b/src/core/ozone/gl_ozone_qt.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2025 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:critical reason:execute-external-code
 
 // Copyright 2016 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
diff --git a/src/core/ozone/gl_ozone_qt.h b/src/core/ozone/gl_ozone_qt.h
index aba63cbb201..a645068cce5 100644
--- a/src/core/ozone/gl_ozone_qt.h
+++ b/src/core/ozone/gl_ozone_qt.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2025 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 2016 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
diff --git a/src/core/ozone/glx_helper.cpp b/src/core/ozone/glx_helper.cpp
index 35929b6a343..ea4baef8402 100644
--- a/src/core/ozone/glx_helper.cpp
+++ b/src/core/ozone/glx_helper.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 <QtGui/qguiapplication.h>
 #include <QtGui/qopenglcontext.h>
diff --git a/src/core/ozone/glx_helper.h b/src/core/ozone/glx_helper.h
index 20bc7159cbe..b5852fe04a4 100644
--- a/src/core/ozone/glx_helper.h
+++ b/src/core/ozone/glx_helper.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 GLX_HELPER_H
 #define GLX_HELPER_H
diff --git a/src/core/ozone/ozone_platform_qt.cpp b/src/core/ozone/ozone_platform_qt.cpp
index acea40c16ad..f4a169a224d 100644
--- a/src/core/ozone/ozone_platform_qt.cpp
+++ b/src/core/ozone/ozone_platform_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 "ozone_platform_qt.h"
 
diff --git a/src/core/ozone/ozone_platform_qt.h b/src/core/ozone/ozone_platform_qt.h
index 23629b2eb87..3f98128f575 100644
--- a/src/core/ozone/ozone_platform_qt.h
+++ b/src/core/ozone/ozone_platform_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
 
 #ifndef OZONE_PLATFORM_QT_H
 #define OZONE_PLATFORM_QT_H
diff --git a/src/core/ozone/ozone_util_qt.cpp b/src/core/ozone/ozone_util_qt.cpp
index 1c1a621b449..0e9f871a0a6 100644
--- a/src/core/ozone/ozone_util_qt.cpp
+++ b/src/core/ozone/ozone_util_qt.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 "ozone_util_qt.h"
 
diff --git a/src/core/ozone/ozone_util_qt.h b/src/core/ozone/ozone_util_qt.h
index 4d5c75ccd4a..68ee67b0e45 100644
--- a/src/core/ozone/ozone_util_qt.h
+++ b/src/core/ozone/ozone_util_qt.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 OZONE_UTIL_QT_H
 #define OZONE_UTIL_QT_H
diff --git a/src/core/ozone/platform_window_qt.cpp b/src/core/ozone/platform_window_qt.cpp
index 1c2a4c3a735..2aa7b2730eb 100644
--- a/src/core/ozone/platform_window_qt.cpp
+++ b/src/core/ozone/platform_window_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 "base/functional/bind.h"
 #include "ozone/platform_window_qt.h"
diff --git a/src/core/ozone/platform_window_qt.h b/src/core/ozone/platform_window_qt.h
index 593f98cf74f..28c091393f7 100644
--- a/src/core/ozone/platform_window_qt.h
+++ b/src/core/ozone/platform_window_qt.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 PLATFORM_WINDOW_QT_H
 #define PLATFORM_WINDOW_QT_H
diff --git a/src/core/ozone/surface_factory_qt.cpp b/src/core/ozone/surface_factory_qt.cpp
index bda4bfb8a6e..ba3d7924967 100644
--- a/src/core/ozone/surface_factory_qt.cpp
+++ b/src/core/ozone/surface_factory_qt.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2024 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 "surface_factory_qt.h"
 
diff --git a/src/core/ozone/surface_factory_qt.h b/src/core/ozone/surface_factory_qt.h
index f257e185eb5..889c4764b33 100644
--- a/src/core/ozone/surface_factory_qt.h
+++ b/src/core/ozone/surface_factory_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
 
 #ifndef SURFACE_FACTORY_QT
 #define SURFACE_FACTORY_QT

From 9836d8cd99a617aaaba1899b71afdd6bf2563bb6 Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Mon, 4 Aug 2025 18:05:28 +0200
Subject: [PATCH 092/100] Stop using private V4 API

Everything we need have long been available through public API.

Pick-to: 6.9 6.8
Change-Id: Ifc3925971e8b81852ad42d5dd535ffa9eec1b37b
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit 6187d6ea6fe5548188b60c357fc9c62f4f567a79)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 .../api/qquickwebenginescriptcollection.cpp   | 20 +++++++------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/webenginequick/api/qquickwebenginescriptcollection.cpp b/src/webenginequick/api/qquickwebenginescriptcollection.cpp
index 7a3e894a656..09a8d181e95 100644
--- a/src/webenginequick/api/qquickwebenginescriptcollection.cpp
+++ b/src/webenginequick/api/qquickwebenginescriptcollection.cpp
@@ -3,12 +3,10 @@
 
 #include "qquickwebenginescriptcollection_p.h"
 #include "qquickwebenginescriptcollection_p_p.h"
-#include "qwebenginescriptcollection.h"
+#include <QtWebEngineCore/qwebenginescriptcollection.h>
 #include <QtWebEngineCore/private/qwebenginescriptcollection_p.h>
 #include <QtQml/qqmlinfo.h>
-#include <QtQml/private/qqmlengine_p.h>
-#include <QtQml/private/qv4scopedvalue_p.h>
-#include <QtQml/private/qv4arrayobject_p.h>
+#include <QtQml/qqmlengine.h>
 
 /*!
     \qmltype WebEngineScriptCollection
@@ -198,15 +196,11 @@ QJSValue QQuickWebEngineScriptCollection::collection() const
     }
 
     const QList<QWebEngineScript> &list = d->toList();
-    QV4::ExecutionEngine *v4 = d->m_qmlEngine->handle();
-    QV4::Scope scope(v4);
-    QV4::Scoped<QV4::ArrayObject> scriptArray(scope, v4->newArrayObject(list.size()));
-    int i = 0;
-    for (const auto &val : list) {
-        QV4::ScopedValue sv(scope, v4->fromVariant(QVariant::fromValue(val)));
-        scriptArray->put(i++, sv);
-    }
-    return QJSValuePrivate::fromReturnedValue(scriptArray.asReturnedValue());
+    QJSValue scriptArray = d->m_qmlEngine->newArray(list.size());
+    uint32_t i = 0;
+    for (const auto &val : list)
+        scriptArray.setProperty(i++, d->m_qmlEngine->toScriptValue(val));
+    return scriptArray;
 }
 
 void QQuickWebEngineScriptCollection::setCollection(const QJSValue &scripts)

From 868417c4b9df52ad1a16da780d35b4d04f13625d Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Wed, 16 Jul 2025 13:25:27 +0200
Subject: [PATCH 093/100] Add permission element resources

HTMLPermissionElement was introduced in the 126 update.
It comes with a set of new localized strings which are
generated at build time.
Add the missing pak file to webengine.

Fixes FATAL:resource_bundle.cc(1210)] Check failed: !data->empty()
crash on google meet when trying to allow mic access in a video call.

Change-Id: Id3f7c27b145e63656d79df6004a48b2ed63a7e13
Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu>
(cherry picked from commit 771641a5683cadf71ffd9064f19002b5a878a461)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/configure/BUILD.root.gn.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in
index 0a4a6bfea29..0e611c29470 100644
--- a/src/core/configure/BUILD.root.gn.in
+++ b/src/core/configure/BUILD.root.gn.in
@@ -625,6 +625,7 @@ repack("qtwebengine_repack_resources") {
     "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
     "$root_gen_dir/net/net_resources.pak",
     "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
+    "$root_gen_dir/third_party/blink/public/strings/permission_element_generated_strings.pak",
     "$root_gen_dir/ui/webui/resources/webui_resources.pak",
     "$root_gen_dir/components/user_actions_ui_resources.pak",
   ]
@@ -658,6 +659,7 @@ repack("qtwebengine_repack_resources") {
      "//mojo/public/js:resources",
      "//net:net_resources_grit",
      "//third_party/blink/public:resources_grit",
+     "//third_party/blink/public/strings:permission_element_generated_strings_grit",
      "//ui/webui/resources",
   ]
   if (enable_extensions) {

From 50be6813bdbe759d31dbea054a27a89fbb7c8fe4 Mon Sep 17 00:00:00 2001
From: Martin Negyokru <negyokru@inf.u-szeged.hu>
Date: Wed, 16 Jul 2025 13:48:54 +0200
Subject: [PATCH 094/100] Initialize WebRtcEventLogManager at startup

It is needed for webrtcLoggingPrivate.startEventLogging
extension api.

Fixes FATAL:extension_function.cc(416)] Check failed: did_respond() webrtcLoggingPrivate.startEventLogging
crash on google meet.

Change-Id: I6bdba290944b1cb1dcb1d3345e02abf90e204774
Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu>
(cherry picked from commit 235f23b18388138c342f527f599ec2d2bf786bc6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/browser_main_parts_qt.cpp | 15 ++++++++++++++-
 src/core/browser_main_parts_qt.h   | 16 ++++++++++++++--
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/core/browser_main_parts_qt.cpp b/src/core/browser_main_parts_qt.cpp
index ee037d180a7..cdc5e32ad8b 100644
--- a/src/core/browser_main_parts_qt.cpp
+++ b/src/core/browser_main_parts_qt.cpp
@@ -26,7 +26,6 @@
 #include "content/public/browser/child_process_security_policy.h"
 #include "content/public/common/content_features.h"
 #include "content/public/common/result_codes.h"
-#include "extensions/buildflags/buildflags.h"
 #include "ppapi/buildflags/buildflags.h"
 #include "select_file_dialog_factory_qt.h"
 #include "services/service_manager/public/cpp/connector.h"
@@ -42,6 +41,10 @@
 #include "extensions/extensions_browser_client_qt.h"
 #include "extensions/extension_system_factory_qt.h"
 #include "common/extensions/extensions_client_qt.h"
+
+#if BUILDFLAG(ENABLE_WEBRTC)
+#include "chrome/browser/media/webrtc/webrtc_event_log_manager.h"
+#endif
 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
 
 #if BUILDFLAG(ENABLE_PLUGINS)
@@ -198,6 +201,10 @@ std::unique_ptr<base::MessagePump> messagePumpFactory()
 #endif
 }
 
+BrowserMainPartsQt::BrowserMainPartsQt() = default;
+
+BrowserMainPartsQt::~BrowserMainPartsQt() = default;
+
 int BrowserMainPartsQt::PreEarlyInitialization()
 {
 #if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -242,6 +249,12 @@ int BrowserMainPartsQt::PreMainMessageLoopRun()
     content::PluginService *plugin_service = content::PluginService::GetInstance();
     plugin_service->SetFilter(extensions::PluginServiceFilterQt::GetInstance());
 #endif // BUILDFLAG(ENABLE_PLUGINS)
+
+#if BUILDFLAG(ENABLE_WEBRTC)
+    m_webrtcEventLogManager =
+            webrtc_event_logging::WebRtcEventLogManager::CreateSingletonInstance();
+#endif
+
 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
 
     if (base::FeatureList::IsEnabled(features::kWebUsb)) {
diff --git a/src/core/browser_main_parts_qt.h b/src/core/browser_main_parts_qt.h
index dc7eae9fb3a..4ab4ed97856 100644
--- a/src/core/browser_main_parts_qt.h
+++ b/src/core/browser_main_parts_qt.h
@@ -6,6 +6,8 @@
 
 #include "content/public/browser/browser_main_parts.h"
 
+#include "extensions/buildflags/buildflags.h"
+#include "media/media_buildflags.h"
 #include "web_usb_detector_qt.h"
 
 namespace base {
@@ -24,6 +26,12 @@ namespace performance_manager {
 class PerformanceManagerLifetime;
 }
 
+#if BUILDFLAG(ENABLE_EXTENSIONS) && BUILDFLAG(ENABLE_WEBRTC)
+namespace webrtc_event_logging {
+class WebRtcEventLogManager;
+}
+#endif
+
 namespace QtWebEngineCore {
 
 std::unique_ptr<base::MessagePump> messagePumpFactory();
@@ -31,8 +39,8 @@ std::unique_ptr<base::MessagePump> messagePumpFactory();
 class BrowserMainPartsQt : public content::BrowserMainParts
 {
 public:
-    BrowserMainPartsQt() = default;
-    ~BrowserMainPartsQt() override = default;
+    BrowserMainPartsQt();
+    ~BrowserMainPartsQt() override;
 
     int PreEarlyInitialization() override;
     void PreCreateMainMessageLoop() override;
@@ -52,6 +60,10 @@ class BrowserMainPartsQt : public content::BrowserMainParts
 #if BUILDFLAG(IS_MAC)
     std::unique_ptr<device::GeolocationSystemPermissionManager> m_geolocationSystemPermissionManager;
 #endif
+
+#if BUILDFLAG(ENABLE_EXTENSIONS) && BUILDFLAG(ENABLE_WEBRTC)
+    std::unique_ptr<webrtc_event_logging::WebRtcEventLogManager> m_webrtcEventLogManager;
+#endif
 };
 
 } // namespace QtWebEngineCore

From 7bbdf6bdc1115b2e313b0b5ccd411c19665fc0bd Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Fri, 25 Jul 2025 11:25:29 +0200
Subject: [PATCH 095/100] API-review webenginecore fixes

Task-number: QTBUG-137478
Change-Id: I9c419f6e1349aef34237da0cf85cbd4a1968fbc2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 95051932ed2902eeb6250f033b5bd5dc5fadff9c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/api/qwebengineextensioninfo.h    | 6 +++---
 src/core/api/qwebengineextensionmanager.h | 2 +-
 src/core/api/qwebengineprofile.cpp        | 4 ++--
 src/core/api/qwebengineprofile.h          | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/core/api/qwebengineextensioninfo.h b/src/core/api/qwebengineextensioninfo.h
index 2bb3218a7e9..5ab02d60e06 100644
--- a/src/core/api/qwebengineextensioninfo.h
+++ b/src/core/api/qwebengineextensioninfo.h
@@ -1,8 +1,8 @@
 // Copyright (C) 2025 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 QWEBENGINEEXTENSION_H_
-#define QWEBENGINEEXTENSION_H_
+#ifndef QWEBENGINEEXTENSIONINFO_H_
+#define QWEBENGINEEXTENSIONINFO_H_
 
 #include <QtWebEngineCore/qtwebenginecoreglobal.h>
 
@@ -74,4 +74,4 @@ Q_DECLARE_SHARED(QWebEngineExtensionInfo)
 QT_END_NAMESPACE
 
 #endif // QT_CONFIG(webengine_extensions)
-#endif // QWEBENGINEEXTENSION_H_
+#endif // QWEBENGINEEXTENSIONINFO_H_
diff --git a/src/core/api/qwebengineextensionmanager.h b/src/core/api/qwebengineextensionmanager.h
index ec806f6b2c4..a908be97b6d 100644
--- a/src/core/api/qwebengineextensionmanager.h
+++ b/src/core/api/qwebengineextensionmanager.h
@@ -50,7 +50,7 @@ class Q_WEBENGINECORE_EXPORT QWebEngineExtensionManager : public QObject
     friend class QtWebEngineCore::ProfileAdapter;
     Q_DISABLE_COPY(QWebEngineExtensionManager)
 
-    QWebEngineExtensionManager(QtWebEngineCore::ExtensionManager *d);
+    explicit QWebEngineExtensionManager(QtWebEngineCore::ExtensionManager *d);
     QtWebEngineCore::ExtensionManager *d_ptr;
 };
 
diff --git a/src/core/api/qwebengineprofile.cpp b/src/core/api/qwebengineprofile.cpp
index dbd629b3369..5b523dd877e 100644
--- a/src/core/api/qwebengineprofile.cpp
+++ b/src/core/api/qwebengineprofile.cpp
@@ -1101,10 +1101,10 @@ QWebEngineClientHints *QWebEngineProfile::clientHints() const
     \since 6.10
     \sa QWebEngineExtensionManager
 */
-QWebEngineExtensionManager *QWebEngineProfile::extensionManager()
+QWebEngineExtensionManager *QWebEngineProfile::extensionManager() const
 {
 #if QT_CONFIG(webengine_extensions)
-    Q_D(QWebEngineProfile);
+    Q_D(const QWebEngineProfile);
     return d->profileAdapter()->extensionManager();
 #else
     return nullptr;
diff --git a/src/core/api/qwebengineprofile.h b/src/core/api/qwebengineprofile.h
index 2688dcc6123..fe00e6f5dca 100644
--- a/src/core/api/qwebengineprofile.h
+++ b/src/core/api/qwebengineprofile.h
@@ -129,7 +129,7 @@ class Q_WEBENGINECORE_EXPORT QWebEngineProfile : public QObject
     QList<QWebEnginePermission> listPermissionsForOrigin(const QUrl &securityOrigin) const;
     QList<QWebEnginePermission> listPermissionsForPermissionType(QWebEnginePermission::PermissionType permissionType) const;
 
-    QWebEngineExtensionManager *extensionManager();
+    QWebEngineExtensionManager *extensionManager() const;
 
     static QWebEngineProfile *defaultProfile();
 

From 770081e72c560bc8f63292e40025da4a9b23308d Mon Sep 17 00:00:00 2001
From: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
Date: Sat, 9 Aug 2025 00:29:32 +0000
Subject: [PATCH 096/100] Update dependencies on '6.10' in qt/qtwebengine

Change-Id: I05798f9253428e49c238554ff1f5caa421da3593
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
---
 dependencies.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dependencies.yaml b/dependencies.yaml
index 030734c719a..9820a89b9e4 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,13 +1,13 @@
 dependencies:
   ../qtdeclarative:
-    ref: 0f70624dd6ec5f3d2578490a02084dd7375a3842
+    ref: 9462edf80833e4bc2424f5b302f6aade953587a3
     required: true
   ../qtpositioning:
-    ref: 7d955e441d55fdd6df4205422fc39986c11b9454
+    ref: a46373bb33595c05537e6eff3cd4b105edb9ca2f
     required: false
   ../qttools:
-    ref: 035649d9f155777c7d8cd051bce7b95d466fd3d4
+    ref: e1edeadc3f8d5278208716fa1c7e882790b4482e
     required: false
   ../qtwebchannel:
-    ref: 1f408980586d2c9f2eefe599a450165033601b90
+    ref: 65d201c9ab75bb6f6153259015dada8c22955bcb
     required: false

From 1316ef37495a6b4844251de662dbb810830e05bf Mon Sep 17 00:00:00 2001
From: Moss Heim <moss.heim@qt.io>
Date: Thu, 7 Aug 2025 15:20:26 +0200
Subject: [PATCH 097/100] CRA mark src/webenginewidgets

QUIP: 23
Fixes: QTBUG-138714
Pick-to: 6.9 6.8
Change-Id: I330d87a2441a9256965892b0078a9d6d23f9f60c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 99eb5738b18dbcf1b27542a28f66611d78cd3133)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/webenginewidgets/api/qtwebenginewidgetsglobal.h              | 1 +
 src/webenginewidgets/api/qwebenginenotificationpresenter.cpp     | 1 +
 src/webenginewidgets/api/qwebenginenotificationpresenter_p.h     | 1 +
 src/webenginewidgets/api/qwebengineview.cpp                      | 1 +
 src/webenginewidgets/api/qwebengineview.h                        | 1 +
 src/webenginewidgets/api/qwebengineview_p.h                      | 1 +
 .../plugins/qwebengineview/qwebengineview_plugin.cpp             | 1 +
 .../plugins/qwebengineview/qwebengineview_plugin.h               | 1 +
 src/webenginewidgets/qwebengine_accessible.cpp                   | 1 +
 src/webenginewidgets/qwebengine_accessible_p.h                   | 1 +
 src/webenginewidgets/ui/autofillpopupwidget.cpp                  | 1 +
 src/webenginewidgets/ui/autofillpopupwidget_p.h                  | 1 +
 src/webenginewidgets/ui/touchhandlewidget.cpp                    | 1 +
 src/webenginewidgets/ui/touchhandlewidget_p.h                    | 1 +
 src/webenginewidgets/ui/touchselectionmenuwidget.cpp             | 1 +
 src/webenginewidgets/ui/touchselectionmenuwidget_p.h             | 1 +
 16 files changed, 16 insertions(+)

diff --git a/src/webenginewidgets/api/qtwebenginewidgetsglobal.h b/src/webenginewidgets/api/qtwebenginewidgetsglobal.h
index 58b9c7a2bae..edf6632ace4 100644
--- a/src/webenginewidgets/api/qtwebenginewidgetsglobal.h
+++ b/src/webenginewidgets/api/qtwebenginewidgetsglobal.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
 
 #ifndef QTWEBENGINEWIDGETSGLOBAL_H
 #define QTWEBENGINEWIDGETSGLOBAL_H
diff --git a/src/webenginewidgets/api/qwebenginenotificationpresenter.cpp b/src/webenginewidgets/api/qwebenginenotificationpresenter.cpp
index 83814fe4ac2..2adcbf91266 100644
--- a/src/webenginewidgets/api/qwebenginenotificationpresenter.cpp
+++ b/src/webenginewidgets/api/qwebenginenotificationpresenter.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 "qwebenginenotificationpresenter_p.h"
 
diff --git a/src/webenginewidgets/api/qwebenginenotificationpresenter_p.h b/src/webenginewidgets/api/qwebenginenotificationpresenter_p.h
index 61e7f9e45f5..c42c6cc84fc 100644
--- a/src/webenginewidgets/api/qwebenginenotificationpresenter_p.h
+++ b/src/webenginewidgets/api/qwebenginenotificationpresenter_p.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
 
 #ifndef QWEBENGINENOTIFICATIONPRESENTER_P_H
 #define QWEBENGINENOTIFICATIONPRESENTER_P_H
diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
index 53fcc46285a..9745654acb2 100644
--- a/src/webenginewidgets/api/qwebengineview.cpp
+++ b/src/webenginewidgets/api/qwebengineview.cpp
@@ -1,5 +1,6 @@
 // Copyright (C) 2021 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:critical reason:data-parser
 
 #include "qapplication.h"
 #include "qwebenginenotificationpresenter_p.h"
diff --git a/src/webenginewidgets/api/qwebengineview.h b/src/webenginewidgets/api/qwebengineview.h
index 008aaa03257..48d82acb12a 100644
--- a/src/webenginewidgets/api/qwebengineview.h
+++ b/src/webenginewidgets/api/qwebengineview.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2021 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:critical reason:data-parser
 
 #ifndef QWEBENGINEVIEW_H
 #define QWEBENGINEVIEW_H
diff --git a/src/webenginewidgets/api/qwebengineview_p.h b/src/webenginewidgets/api/qwebengineview_p.h
index 389bc4a6631..27ad6db71c0 100644
--- a/src/webenginewidgets/api/qwebengineview_p.h
+++ b/src/webenginewidgets/api/qwebengineview_p.h
@@ -1,5 +1,6 @@
 // Copyright (C) 2021 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:critical reason:data-parser
 
 #ifndef QWEBENGINEVIEW_P_H
 #define QWEBENGINEVIEW_P_H
diff --git a/src/webenginewidgets/plugins/qwebengineview/qwebengineview_plugin.cpp b/src/webenginewidgets/plugins/qwebengineview/qwebengineview_plugin.cpp
index 6ba64a1783e..f018b6d191f 100644
--- a/src/webenginewidgets/plugins/qwebengineview/qwebengineview_plugin.cpp
+++ b/src/webenginewidgets/plugins/qwebengineview/qwebengineview_plugin.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
 
 #include "qwebengineview_plugin.h"
 
diff --git a/src/webenginewidgets/plugins/qwebengineview/qwebengineview_plugin.h b/src/webenginewidgets/plugins/qwebengineview/qwebengineview_plugin.h
index a7150151df9..6706ab34e92 100644
--- a/src/webenginewidgets/plugins/qwebengineview/qwebengineview_plugin.h
+++ b/src/webenginewidgets/plugins/qwebengineview/qwebengineview_plugin.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
 
 #ifndef QWEBENGINEVIEW_PLUGIN_H
 #define QWEBENGINEVIEW_PLUGIN_H
diff --git a/src/webenginewidgets/qwebengine_accessible.cpp b/src/webenginewidgets/qwebengine_accessible.cpp
index cbdd90104bc..402a8cf0fb2 100644
--- a/src/webenginewidgets/qwebengine_accessible.cpp
+++ b/src/webenginewidgets/qwebengine_accessible.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
 
 #include "qwebengine_accessible_p.h"
 
diff --git a/src/webenginewidgets/qwebengine_accessible_p.h b/src/webenginewidgets/qwebengine_accessible_p.h
index 99604d90d91..c95514737e2 100644
--- a/src/webenginewidgets/qwebengine_accessible_p.h
+++ b/src/webenginewidgets/qwebengine_accessible_p.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
 
 #ifndef QWEBENGINE_ACCESSIBLE_H
 #define QWEBENGINE_ACCESSIBLE_H
diff --git a/src/webenginewidgets/ui/autofillpopupwidget.cpp b/src/webenginewidgets/ui/autofillpopupwidget.cpp
index a4dc31beb8d..4e463361a9d 100644
--- a/src/webenginewidgets/ui/autofillpopupwidget.cpp
+++ b/src/webenginewidgets/ui/autofillpopupwidget.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
 
 #include "autofillpopupwidget_p.h"
 #include "qwebengineview.h"
diff --git a/src/webenginewidgets/ui/autofillpopupwidget_p.h b/src/webenginewidgets/ui/autofillpopupwidget_p.h
index 79decc6ab12..d84b34befc7 100644
--- a/src/webenginewidgets/ui/autofillpopupwidget_p.h
+++ b/src/webenginewidgets/ui/autofillpopupwidget_p.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 AUTOFILLPOPUPWIDGET_P_H
 #define AUTOFILLPOPUPWIDGET_P_H
diff --git a/src/webenginewidgets/ui/touchhandlewidget.cpp b/src/webenginewidgets/ui/touchhandlewidget.cpp
index 88af0ff36ab..b855e425c5a 100644
--- a/src/webenginewidgets/ui/touchhandlewidget.cpp
+++ b/src/webenginewidgets/ui/touchhandlewidget.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
 
 #include "touchhandlewidget_p.h"
 #include "qwebengineview.h"
diff --git a/src/webenginewidgets/ui/touchhandlewidget_p.h b/src/webenginewidgets/ui/touchhandlewidget_p.h
index 9f181c935db..9ab8fc9d611 100644
--- a/src/webenginewidgets/ui/touchhandlewidget_p.h
+++ b/src/webenginewidgets/ui/touchhandlewidget_p.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 TOUCHHANDLEWIDGET_P_H
 #define TOUCHHANDLEWIDGET_P_H
diff --git a/src/webenginewidgets/ui/touchselectionmenuwidget.cpp b/src/webenginewidgets/ui/touchselectionmenuwidget.cpp
index ff69fe84bee..dee65ae0e32 100644
--- a/src/webenginewidgets/ui/touchselectionmenuwidget.cpp
+++ b/src/webenginewidgets/ui/touchselectionmenuwidget.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
 
 #include "touchselectionmenuwidget_p.h"
 #include "qwebengineview.h"
diff --git a/src/webenginewidgets/ui/touchselectionmenuwidget_p.h b/src/webenginewidgets/ui/touchselectionmenuwidget_p.h
index 1f822023b36..89216a51021 100644
--- a/src/webenginewidgets/ui/touchselectionmenuwidget_p.h
+++ b/src/webenginewidgets/ui/touchselectionmenuwidget_p.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 TOUCHSELECTIONMENUWIDGET_P_H
 #define TOUCHSELECTIONMENUWIDGET_P_H

From ba883b698bc98819de114f1af6f9efc70662ee19 Mon Sep 17 00:00:00 2001
From: Michal Klocek <michal.klocek@qt.io>
Date: Mon, 28 Jul 2025 17:51:56 +0200
Subject: [PATCH 098/100] Add beforeunload handling to quicknanobrowser example

If page implements beforeunload handler

<script>
 window.addEventListener('beforeunload', e => {
  e.preventDefault();
});
</script>

the browser should display a message in a confirmation dialog box
to inform the user whether he/she wants to really leave.

This is already implemented in simplebrowser, and it boils down
to making triggerWebAction call and proper handling of windowCloseRequested signal.

Pick-to: 6.9 6.8
Change-Id: I91341cd7cff82f8f7dbddf6c9224473e9cfb31b9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 64f8639f5088788cdbc7d078689f2af3d73aef67)
---
 .../quicknanobrowser/BrowserWindow.qml        | 25 +++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
index 4b66d297b62..3c802eca46a 100644
--- a/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webenginequick/quicknanobrowser/BrowserWindow.qml
@@ -19,6 +19,7 @@ ApplicationWindow {
     property WebEngineView currentWebView: tabBar.currentIndex < tabBar.count ? tabLayout.children[tabBar.currentIndex] : null
     property int previousVisibility: Window.Windowed
     property int createdTabs: 0
+    property bool lastTabClosing: false
 
     width: 1300
     height: 900
@@ -497,7 +498,7 @@ ApplicationWindow {
 
             onClicked: addressBar.text = (tabLayout.itemAt(TabBar.index) as WebEngineView).url;
             function closeTab() {
-                tabBar.removeView(TabBar.index);
+                tabBar.tryCloseView(TabBar.index);
             }
         }
     }
@@ -510,7 +511,7 @@ ApplicationWindow {
         Component.onCompleted: createTab((win.applicationRoot as ApplicationRoot).defaultProfilePrototype.instance())
 
         function createTab(profile, focusOnNewTab = true, url = undefined) {
-            var webview = tabComponent.createObject(tabLayout, {profile: profile});
+            var webview = tabComponent.createObject(tabLayout, {index: tabBar.count , profile: profile});
             var newTabButton = tabButtonComponent.createObject(tabBar, {tabTitle: Qt.binding(function () { return webview.title; })});
             tabBar.addItem(newTabButton);
             if (focusOnNewTab) {
@@ -522,11 +523,16 @@ ApplicationWindow {
             return webview;
         }
 
+        function tryCloseView(index) {
+            tabLayout.children[index].triggerWebAction(WebEngineView.RequestClose);
+        }
+
         function removeView(index) {
             if (tabBar.count > 1) {
                 tabBar.removeItem(tabBar.itemAt(index));
                 tabLayout.children[index].destroy();
             } else {
+                win.lastTabClosing = true;
                 win.close();
             }
         }
@@ -535,6 +541,7 @@ ApplicationWindow {
             id: tabComponent
             WebEngineView {
                 id: webEngineView
+                property int index;
                 focus: true
 
                 onLinkHovered: function(hoveredUrl) {
@@ -575,6 +582,10 @@ ApplicationWindow {
                 settings.imageAnimationPolicy: appSettings.imageAnimationPolicy
                 settings.screenCaptureEnabled: true
 
+                onWindowCloseRequested: function() {
+                    tabBar.removeView(webEngineView.index);
+                }
+
                 onCertificateError: function(error) {
                     if (!error.isMainFrame) {
                         error.rejectCertificate();
@@ -909,4 +920,14 @@ ApplicationWindow {
             }
         }
     }
+
+    onClosing: function(closeEvent) {
+       if (lastTabClosing) {
+           return;
+       }
+       closeEvent.accepted = false
+       for (var i = 0; i < tabBar.count; i++)  {
+           tabBar.tryCloseView(i);
+       }
+    }
 }

From b0268951bb0654f57c624192e2cc5b1bc4ca2f38 Mon Sep 17 00:00:00 2001
From: Kaloyan Chehlarski <kaloyan.chehlarski@qt.io>
Date: Thu, 31 Jul 2025 11:54:44 +0200
Subject: [PATCH 099/100] CRA mark src/core/renderer_host

QUIP: 23
Task-number: QTBUG-138724
Pick-to: 6.9 6.8
Change-Id: Icc5c4b8811de48e183975ec79f357cf9b993df45
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 57a3514b87c6e8d1c56929b1bb5d881bb908a191)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/renderer_host/user_resource_controller_host.cpp  | 1 +
 src/core/renderer_host/user_resource_controller_host.h    | 1 +
 src/core/renderer_host/web_channel_ipc_transport_host.cpp | 1 +
 src/core/renderer_host/web_channel_ipc_transport_host.h   | 1 +
 src/core/renderer_host/web_engine_page_host.cpp           | 1 +
 src/core/renderer_host/web_engine_page_host.h             | 1 +
 6 files changed, 6 insertions(+)

diff --git a/src/core/renderer_host/user_resource_controller_host.cpp b/src/core/renderer_host/user_resource_controller_host.cpp
index 1a6b9e935fa..a2917194234 100644
--- a/src/core/renderer_host/user_resource_controller_host.cpp
+++ b/src/core/renderer_host/user_resource_controller_host.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
 
 #include "user_resource_controller_host.h"
 
diff --git a/src/core/renderer_host/user_resource_controller_host.h b/src/core/renderer_host/user_resource_controller_host.h
index eb4404879d7..f843c732140 100644
--- a/src/core/renderer_host/user_resource_controller_host.h
+++ b/src/core/renderer_host/user_resource_controller_host.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
 
 //
 //  W A R N I N G
diff --git a/src/core/renderer_host/web_channel_ipc_transport_host.cpp b/src/core/renderer_host/web_channel_ipc_transport_host.cpp
index d69d543de3e..b44beddf3f3 100644
--- a/src/core/renderer_host/web_channel_ipc_transport_host.cpp
+++ b/src/core/renderer_host/web_channel_ipc_transport_host.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 "web_channel_ipc_transport_host.h"
 #include "qtwebenginecoreglobal_p.h"
diff --git a/src/core/renderer_host/web_channel_ipc_transport_host.h b/src/core/renderer_host/web_channel_ipc_transport_host.h
index 16ff5178933..82421199ffe 100644
--- a/src/core/renderer_host/web_channel_ipc_transport_host.h
+++ b/src/core/renderer_host/web_channel_ipc_transport_host.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 WEB_CHANNEL_IPC_TRANSPORT_H
 #define WEB_CHANNEL_IPC_TRANSPORT_H
diff --git a/src/core/renderer_host/web_engine_page_host.cpp b/src/core/renderer_host/web_engine_page_host.cpp
index ea9b363eab9..2a2672159eb 100644
--- a/src/core/renderer_host/web_engine_page_host.cpp
+++ b/src/core/renderer_host/web_engine_page_host.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
 
 #include "web_engine_page_host.h"
 
diff --git a/src/core/renderer_host/web_engine_page_host.h b/src/core/renderer_host/web_engine_page_host.h
index 20b9145b219..8fb128aeb32 100644
--- a/src/core/renderer_host/web_engine_page_host.h
+++ b/src/core/renderer_host/web_engine_page_host.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
 
 #ifndef WEB_ENGINE_PAGE_HOST_H
 #define WEB_ENGINE_PAGE_HOST_H

From 55ab373e2a1de3a330d1e5f3edb6f1169d74fbf0 Mon Sep 17 00:00:00 2001
From: Moss Heim <moss.heim@qt.io>
Date: Tue, 10 Jun 2025 12:00:40 +0200
Subject: [PATCH 100/100] Docs: Update info about high DPI support

Remove suggestion to use the "Enable high DPI" flag, this hasn't
been needed since Qt 6.0

Pick-to: 6.9
Change-Id: I663d00b6192d561c88da9f6ea28bb9c232c89c9d
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit b3ee2a743e61ee4bfe64e6a6d1d068a664918999)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
---
 src/core/doc/src/qtwebengine-overview.qdoc | 24 ++--------------------
 1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/src/core/doc/src/qtwebengine-overview.qdoc b/src/core/doc/src/qtwebengine-overview.qdoc
index 3a5d30338df..3d7ebf6ad79 100644
--- a/src/core/doc/src/qtwebengine-overview.qdoc
+++ b/src/core/doc/src/qtwebengine-overview.qdoc
@@ -249,28 +249,8 @@
 
     \section1 High DPI Support
 
-    To support High DPI devices, it is recommended that the application attribute
-    Qt::AA_EnableHighDpiScaling is set to enable automatic scaling based on the
-    pixel density of the monitor. In \QWE applications, the scaling
-    affects the default zooming factor and scrollbar size.
-
-    For example:
-
-    \code
-    int main(int argc, char *argv[])
-    {
-      QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-      QApplication app(argc, argv);
-      // ...
-    }
-    \endcode
-
-    \QWE bundles images for normal and high-dpi resolutions into
-    \e qtwebengine_resources_100p.pak and \e qtwebengine_resources_200p.pak
-    files. Depending on the target resolutions, one or both of these files need
-    to be deployed.
-
-    For more information, see \l{High DPI}.
+    High DPI support is always enabled in Qt 6, and this also applies to \QWE. For more information,
+    see \l{High DPI}.
 
     \section1 Using WebEngine Core
 
