summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2023-09-21 13:28:54 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2023-12-09 19:53:11 +0100
commit94d3aa19ff444007de9cf656d32f6c7e8f7b1872 (patch)
tree657279e24e840fc57ade0e13f67aa2a234c7f3c7
parent5b7348aacee8688dda4d99011130754a9bf4678c (diff)
Chromium 116 adaptations
Change-Id: Ie297e6ddef21cda8d71ef3daeaa4bcb82e806911 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
-rw-r--r--cmake/Functions.cmake1
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/core/api/configure.cmake6
-rw-r--r--src/core/autofill_popup_controller.cpp2
-rw-r--r--src/core/browser_main_parts_qt.cpp5
-rw-r--r--src/core/chromium_overrides.cpp9
-rw-r--r--src/core/clipboard_qt.cpp48
-rw-r--r--src/core/clipboard_qt.h24
-rw-r--r--src/core/compositor/display_skia_output_device.cpp7
-rw-r--r--src/core/compositor/display_software_output_surface.cpp2
-rw-r--r--src/core/compositor/native_skia_output_device.cpp9
-rw-r--r--src/core/configure/BUILD.root.gn.in30
-rw-r--r--src/core/content_browser_client_qt.cpp34
-rw-r--r--src/core/content_browser_client_qt.h8
-rw-r--r--src/core/content_client_qt.cpp7
-rw-r--r--src/core/content_main_delegate_qt.cpp7
-rw-r--r--src/core/extensions/extension_system_qt.h2
-rw-r--r--src/core/location_provider_qt.h3
-rw-r--r--src/core/media_capture_devices_dispatcher.cpp4
-rw-r--r--src/core/net/plugin_response_interceptor_url_loader_throttle.cpp6
-rw-r--r--src/core/net/ssl_host_state_delegate_qt.cpp10
-rw-r--r--src/core/net/ssl_host_state_delegate_qt.h1
-rw-r--r--src/core/net/system_network_context_manager.cpp4
-rw-r--r--src/core/pref_service_adapter.cpp2
-rw-r--r--src/core/printing/print_view_manager_qt.cpp2
-rw-r--r--src/core/touch_selection_controller_client_qt.h2
-rw-r--r--src/core/type_conversion.h10
-rw-r--r--src/core/web_engine_context.cpp11
-rw-r--r--tools/scripts/version_resolver.py12
29 files changed, 166 insertions, 106 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index 311950536..f973f10fe 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -853,6 +853,7 @@ macro(append_build_type_setup)
use_partition_alloc=true
use_partition_alloc_as_malloc=false
use_custom_libcxx=false
+ enable_rust=false # We do not yet support rust
)
if(${config} STREQUAL "Debug")
list(APPEND gnArgArg is_debug=true symbol_level=2)
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 025a47441..286023637 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -478,6 +478,10 @@ foreach(arch ${archs})
CONDITION QT_FEATURE_webengine_system_pulseaudio
)
extend_gn_list(gnArgArg
+ ARGS use_system_minigbm
+ CONDITION QT_FEATURE_webengine_system_gbm
+ )
+ extend_gn_list(gnArgArg
ARGS use_vaapi
CONDITION QT_FEATURE_webengine_vaapi
)
diff --git a/src/core/api/configure.cmake b/src/core/api/configure.cmake
index 762f4bdd6..afef27a74 100644
--- a/src/core/api/configure.cmake
+++ b/src/core/api/configure.cmake
@@ -77,6 +77,12 @@ qt_feature("webengine-system-pulseaudio" PRIVATE
AUTODETECT UNIX
CONDITION PULSEAUDIO_FOUND
)
+qt_feature("webengine-system-gbm" PRIVATE
+ SECTION "WebEngine"
+ LABEL "Use system GBM"
+ AUTODETECT UNIX
+ CONDITION GBM_FOUND
+)
qt_feature("webengine-printing-and-pdf" PRIVATE
LABEL "Printing and PDF"
PURPOSE "Provides printing and output to PDF."
diff --git a/src/core/autofill_popup_controller.cpp b/src/core/autofill_popup_controller.cpp
index 6e5890e47..162592d50 100644
--- a/src/core/autofill_popup_controller.cpp
+++ b/src/core/autofill_popup_controller.cpp
@@ -26,7 +26,7 @@ void AutofillPopupController::setCurrentIndex(const QModelIndex &index)
if (m_currentIndex.isValid()) {
const autofill::Suggestion &suggestion = d->suggestions[m_currentIndex.row()];
- d->delegate->DidSelectSuggestion(suggestion.main_text.value, suggestion.frontend_id, autofill::Suggestion::BackendId());
+ d->delegate->DidSelectSuggestion(suggestion);
}
Q_EMIT currentIndexChanged(index);
diff --git a/src/core/browser_main_parts_qt.cpp b/src/core/browser_main_parts_qt.cpp
index c7d9ebd70..87f89de07 100644
--- a/src/core/browser_main_parts_qt.cpp
+++ b/src/core/browser_main_parts_qt.cpp
@@ -193,7 +193,7 @@ std::unique_ptr<base::MessagePump> messagePumpFactory()
return std::make_unique<MessagePumpForUIQt>();
}
#if BUILDFLAG(IS_MAC)
- return base::MessagePumpMac::Create();
+ return base::message_pump_mac::Create();
#else
return std::make_unique<base::MessagePumpForUI>();
#endif
@@ -222,7 +222,6 @@ void BrowserMainPartsQt::PostCreateMainMessageLoop()
#if defined(Q_OS_LINUX)
auto config = std::make_unique<os_crypt::Config>();
config->product_name = "Qt WebEngine";
- config->main_thread_runner = content::GetUIThreadTaskRunner({});
config->should_use_preference = false;
config->user_data_path = toFilePath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));
OSCrypt::SetConfig(std::move(config));
@@ -231,7 +230,7 @@ void BrowserMainPartsQt::PostCreateMainMessageLoop()
int BrowserMainPartsQt::PreMainMessageLoopRun()
{
- ui::SelectFileDialog::SetFactory(new SelectFileDialogFactoryQt());
+ ui::SelectFileDialog::SetFactory(std::make_unique<SelectFileDialogFactoryQt>());
#if BUILDFLAG(ENABLE_EXTENSIONS)
extensions::ExtensionsClient::Set(new extensions::ExtensionsClientQt());
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index b75e5a5e6..9d94c4099 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -45,11 +45,12 @@ void *GetQtXDisplay()
namespace content {
class RenderViewHostDelegateView;
-std::unique_ptr<WebContentsView> CreateWebContentsView(WebContentsImpl *web_contents,
- std::unique_ptr<WebContentsViewDelegate> delegate,
- RenderViewHostDelegateView **render_view_host_delegate_view)
+std::unique_ptr<WebContentsView> CreateWebContentsView(
+ WebContentsImpl *web_contents,
+ std::unique_ptr<WebContentsViewDelegate> delegate,
+ raw_ptr<RenderViewHostDelegateView>* render_view_host_delegate_view)
{
- QtWebEngineCore::WebContentsViewQt* rv = new QtWebEngineCore::WebContentsViewQt(web_contents);
+ QtWebEngineCore::WebContentsViewQt *rv = new QtWebEngineCore::WebContentsViewQt(web_contents);
*render_view_host_delegate_view = rv;
return std::unique_ptr<WebContentsView>(rv);
}
diff --git a/src/core/clipboard_qt.cpp b/src/core/clipboard_qt.cpp
index e6a0a10be..3f49c6e3c 100644
--- a/src/core/clipboard_qt.cpp
+++ b/src/core/clipboard_qt.cpp
@@ -12,6 +12,7 @@
#include "base/logging.h"
#include "base/strings/utf_offset_string_conversions.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/types/variant_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/custom_data_helper.h"
#include "ui/base/clipboard/clipboard.h"
@@ -98,11 +99,10 @@ void ClipboardQt::WritePortableAndPlatformRepresentations(ui::ClipboardBuffer ty
DCHECK(CalledOnValidThread());
DCHECK(IsSupportedClipboardBuffer(type));
- for (const auto &object : objects)
- DispatchPortableRepresentation(object.first, object.second);
-
if (!platform_representations.empty())
DispatchPlatformRepresentations(std::move(platform_representations));
+ for (const auto &object : objects)
+ DispatchPortableRepresentation(object.second);
// Commit the accumulated data.
if (uncommittedData)
@@ -111,11 +111,11 @@ void ClipboardQt::WritePortableAndPlatformRepresentations(ui::ClipboardBuffer ty
: QClipboard::Selection);
if (type == ui::ClipboardBuffer::kCopyPaste && IsSupportedClipboardBuffer(ui::ClipboardBuffer::kSelection)) {
- ObjectMap::const_iterator text_iter = objects.find(PortableFormat::kText);
+ auto text_iter = objects.find(base::VariantIndexOfType<Data, TextData>());
if (text_iter != objects.end()) {
// Copy text and SourceTag to the selection clipboard.
WritePortableAndPlatformRepresentations(ui::ClipboardBuffer::kSelection,
- ObjectMap(text_iter, text_iter + 1),
+ ObjectMap(text_iter, ++text_iter),
{},
nullptr);
}
@@ -123,14 +123,14 @@ void ClipboardQt::WritePortableAndPlatformRepresentations(ui::ClipboardBuffer ty
m_dataSrc[type] = std::move(data_src);
}
-void ClipboardQt::WriteText(const char *text_data, size_t text_len)
+void ClipboardQt::WriteText(base::StringPiece text)
{
- getUncommittedData()->setText(QString::fromUtf8(text_data, text_len));
+ getUncommittedData()->setText(toQString(text));
}
-void ClipboardQt::WriteHTML(const char *markup_data, size_t markup_len, const char *url_data, size_t url_len)
+void ClipboardQt::WriteHTML(base::StringPiece markup, absl::optional<base::StringPiece> source_url)
{
- QString markup_string = QString::fromUtf8(markup_data, markup_len);
+ QString markup_string = toQString(markup);
#if defined (Q_OS_MACOS)
// We need to prepend the charset on macOS to prevent garbled Unicode characters
// when pasting to certain applications (e.g. Notes, TextEdit)
@@ -141,11 +141,11 @@ void ClipboardQt::WriteHTML(const char *markup_data, size_t markup_len, const ch
#if !defined(Q_OS_WIN)
getUncommittedData()->setHtml(markup_string);
#else
- std::string url;
- if (url_len > 0)
- url.assign(url_data, url_len);
+ QString url;
+ if (source_url)
+ url = toQString(*source_url);
- std::string cf_html = HtmlToCFHtml(markup_string.toStdString(), url);
+ std::string cf_html = HtmlToCFHtml(markup_string.toStdString(), url.toStdString());
size_t html_start = std::string::npos;
size_t fragment_start = std::string::npos;
size_t fragment_end = std::string::npos;
@@ -159,9 +159,9 @@ void ClipboardQt::WriteHTML(const char *markup_data, size_t markup_len, const ch
#endif // !defined(Q_OS_WIN)
}
-void ClipboardQt::WriteRTF(const char *rtf_data, size_t data_len)
+void ClipboardQt::WriteRTF(base::StringPiece rtf)
{
- getUncommittedData()->setData(QString::fromLatin1(ui::kMimeTypeRTF), QByteArray(rtf_data, data_len));
+ getUncommittedData()->setData(QString::fromLatin1(ui::kMimeTypeRTF), toQByteArray(rtf));
}
void ClipboardQt::WriteWebSmartPaste()
@@ -174,12 +174,12 @@ void ClipboardQt::WriteBitmap(const SkBitmap &bitmap)
getUncommittedData()->setImageData(toQImage(bitmap).copy());
}
-void ClipboardQt::WriteBookmark(const char *title_data, size_t title_len, const char *url_data, size_t url_len)
+void ClipboardQt::WriteBookmark(base::StringPiece title_in, base::StringPiece url_in)
{
// FIXME: Untested, seems to be used only for drag-n-drop.
// Write as a mozilla url (UTF16: URL, newline, title).
- QString url = QString::fromUtf8(url_data, url_len);
- QString title = QString::fromUtf8(title_data, title_len);
+ QString url = toQString(url_in);
+ QString title = toQString(title_in);
QByteArray data;
data.append(reinterpret_cast<const char *>(url.utf16()), url.size() * 2);
@@ -188,9 +188,9 @@ void ClipboardQt::WriteBookmark(const char *title_data, size_t title_len, const
getUncommittedData()->setData(QString::fromLatin1(ui::kMimeTypeMozillaURL), data);
}
-void ClipboardQt::WriteData(const ui::ClipboardFormatType &format, const char *data_data, size_t data_len)
+void ClipboardQt::WriteData(const ui::ClipboardFormatType &format, base::span<const uint8_t> data)
{
- getUncommittedData()->setData(QString::fromStdString(format.GetName()), QByteArray(data_data, data_len));
+ getUncommittedData()->setData(QString::fromStdString(format.GetName()), QByteArray((const char *)data.data(), data.size()));
}
bool ClipboardQt::IsFormatAvailable(const ui::ClipboardFormatType &format,
@@ -363,10 +363,10 @@ void ClipboardQt::ReadSvg(ui::ClipboardBuffer clipboard_type,
*result = toString16(QString::fromUtf8(svgData));
}
-void ClipboardQt::WriteSvg(const char *svg_data, size_t data_len)
+void ClipboardQt::WriteSvg(base::StringPiece markup)
{
getUncommittedData()->setData(QString::fromLatin1(ui::kMimeTypeSvg),
- QByteArray(svg_data, data_len));
+ toQByteArray(markup));
}
void ClipboardQt::ReadData(const ui::ClipboardFormatType &format,
@@ -420,9 +420,9 @@ void ClipboardQt::WriteFilenames(std::vector<ui::FileInfo> filenames)
getUncommittedData()->setUrls(urls);
}
-void ClipboardQt::WriteUnsanitizedHTML(const char *markup_data, size_t markup_len, const char *url_data, size_t url_len)
+void ClipboardQt::WriteUnsanitizedHTML(base::StringPiece markup, absl::optional<base::StringPiece> source_url)
{
- WriteHTML(markup_data, markup_len, url_data, url_len);
+ WriteHTML(std::move(markup), std::move(source_url));
}
#if defined(USE_OZONE)
diff --git a/src/core/clipboard_qt.h b/src/core/clipboard_qt.h
index 302e7a00e..22f24cfe5 100644
--- a/src/core/clipboard_qt.h
+++ b/src/core/clipboard_qt.h
@@ -42,21 +42,21 @@ public:
std::vector<ui::FileInfo> *result) const override;
protected:
- void WritePortableAndPlatformRepresentations(
- ui::ClipboardBuffer buffer,
- const ObjectMap &objects,
- std::vector<Clipboard::PlatformRepresentation> platform_representations,
- std::unique_ptr<ui::DataTransferEndpoint> data_src) override;
- void WriteText(const char *text_data, size_t text_len) override;
- void WriteHTML(const char *markup_data, size_t markup_len, const char *url_data, size_t url_len) override;
- void WriteRTF(const char *rtf_data, size_t data_len) override;
- void WriteBookmark(const char *title_data, size_t title_len, const char *url_data, size_t url_len) override;
+ void WritePortableAndPlatformRepresentations(ui::ClipboardBuffer buffer,
+ const ObjectMap &objects,
+ std::vector<Clipboard::PlatformRepresentation> platform_representations,
+ std::unique_ptr<ui::DataTransferEndpoint> data_src) override;
+
+ void WriteText(base::StringPiece text) override;
+ void WriteHTML(base::StringPiece markup, absl::optional<base::StringPiece> source_url) override;
+ void WriteRTF(base::StringPiece rtf) override;
+ void WriteBookmark(base::StringPiece title, base::StringPiece url) override;
void WriteWebSmartPaste() override;
void WriteBitmap(const SkBitmap &bitmap) override;
- void WriteData(const ui::ClipboardFormatType &format, const char *data_data, size_t data_len) override;
- void WriteSvg(const char *, size_t) override;
+ void WriteData(const ui::ClipboardFormatType &format, base::span<const uint8_t> data) override;
+ void WriteSvg(base::StringPiece markup) override;
void WriteFilenames(std::vector<ui::FileInfo> filenames) override;
- void WriteUnsanitizedHTML(const char*, size_t, const char*, size_t) override;
+ void WriteUnsanitizedHTML(base::StringPiece markup, absl::optional<base::StringPiece> source_url) override;
base::flat_map<ui::ClipboardBuffer, std::unique_ptr<ui::DataTransferEndpoint>> m_dataSrc;
};
diff --git a/src/core/compositor/display_skia_output_device.cpp b/src/core/compositor/display_skia_output_device.cpp
index 9b87b4b01..7c954ed81 100644
--- a/src/core/compositor/display_skia_output_device.cpp
+++ b/src/core/compositor/display_skia_output_device.cpp
@@ -7,7 +7,9 @@
#include "type_conversion.h"
#include "gpu/command_buffer/service/skia_utils.h"
+#include "third_party/skia/include/core/SkSurface.h"
#include "third_party/skia/include/core/SkSurfaceProps.h"
+#include "third_party/skia/include/gpu/ganesh/SkSurfaceGanesh.h"
#if QT_CONFIG(webengine_vulkan)
#if defined(USE_OZONE)
@@ -69,7 +71,7 @@ public:
m_parent->memory_type_tracker_->TrackMemAlloc(m_estimatedSize);
SkSurfaceProps surfaceProps = SkSurfaceProps{0, kUnknown_SkPixelGeometry};
- m_surface = SkSurface::MakeFromBackendTexture(
+ m_surface = SkSurfaces::WrapBackendTexture(
m_parent->m_contextState->gr_context(), m_texture,
m_parent->capabilities_.output_surface_origin == gfx::SurfaceOrigin::kTopLeft
? kTopLeft_GrSurfaceOrigin
@@ -267,7 +269,8 @@ DisplaySkiaOutputDevice::DisplaySkiaOutputDevice(
bool requiresAlpha,
gpu::MemoryTracker *memoryTracker,
DidSwapBufferCompleteCallback didSwapBufferCompleteCallback)
- : SkiaOutputDevice(contextState->gr_context(), memoryTracker, didSwapBufferCompleteCallback)
+ : SkiaOutputDevice(contextState->gr_context(), contextState->graphite_context(),
+ memoryTracker, didSwapBufferCompleteCallback)
, Compositor(contextState->GrContextIsVulkan() ? Compositor::Type::Vulkan
: Compositor::Type::OpenGL)
, m_contextState(contextState)
diff --git a/src/core/compositor/display_software_output_surface.cpp b/src/core/compositor/display_software_output_surface.cpp
index c326c8cdf..2c208ca57 100644
--- a/src/core/compositor/display_software_output_surface.cpp
+++ b/src/core/compositor/display_software_output_surface.cpp
@@ -56,7 +56,7 @@ void DisplaySoftwareOutputSurface::Device::Resize(const gfx::Size &sizeInPixels,
return;
m_devicePixelRatio = devicePixelRatio;
viewport_pixel_size_ = sizeInPixels;
- surface_ = SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(sizeInPixels.width(), sizeInPixels.height()));
+ surface_ = SkSurfaces::Raster(SkImageInfo::MakeN32Premul(sizeInPixels.width(), sizeInPixels.height()));
}
void DisplaySoftwareOutputSurface::Device::OnSwapBuffers(SwapBuffersCallback swap_ack_callback, gfx::FrameData data)
diff --git a/src/core/compositor/native_skia_output_device.cpp b/src/core/compositor/native_skia_output_device.cpp
index b7476bf8a..89243ce18 100644
--- a/src/core/compositor/native_skia_output_device.cpp
+++ b/src/core/compositor/native_skia_output_device.cpp
@@ -115,11 +115,11 @@ public:
GrFlushInfo flush_info = {};
flush_info.fNumSemaphores = m_endSemaphores.size();
flush_info.fSignalSemaphores = m_endSemaphores.data();
- m_scopedSkiaWriteAccess->surface()->flush();
- m_scopedSkiaWriteAccess->ApplyBackendSurfaceEndState();
- m_scopedSkiaWriteAccess->surface()->flush(flush_info, nullptr);
auto *direct_context = m_scopedSkiaWriteAccess->surface()->recordingContext()->asDirectContext();
DCHECK(direct_context);
+ direct_context->flush(m_scopedSkiaWriteAccess->surface(), {});
+ m_scopedSkiaWriteAccess->ApplyBackendSurfaceEndState();
+ direct_context->flush(m_scopedSkiaWriteAccess->surface(), flush_info, nullptr);
direct_context->submit();
}
m_scopedSkiaWriteAccess.reset();
@@ -227,7 +227,8 @@ NativeSkiaOutputDevice::NativeSkiaOutputDevice(
gpu::SharedImageFactory *shared_image_factory,
gpu::SharedImageRepresentationFactory *shared_image_representation_factory,
DidSwapBufferCompleteCallback didSwapBufferCompleteCallback)
- : SkiaOutputDevice(contextState->gr_context(), memoryTracker, didSwapBufferCompleteCallback)
+ : SkiaOutputDevice(contextState->gr_context(), contextState->graphite_context(),
+ memoryTracker, didSwapBufferCompleteCallback)
, Compositor(Compositor::Type::NativeBuffer)
, m_requiresAlpha(requiresAlpha)
, m_factory(shared_image_factory)
diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in
index b63ef76b5..a35612a11 100644
--- a/src/core/configure/BUILD.root.gn.in
+++ b/src/core/configure/BUILD.root.gn.in
@@ -262,6 +262,7 @@ source_set("qtwebengine_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",
"//chrome/common:buildflags",
@@ -416,6 +417,9 @@ source_set("qtwebengine_sources") {
"//chrome/browser/ui/webui/sandbox/sandbox_internals_ui.cc",
"//chrome/browser/ui/webui/sandbox/sandbox_internals_ui.h",
]
+ deps += [
+ "//chrome/browser/resources/sandbox_internals:resources",
+ ]
}
if (is_win) {
sources += [
@@ -544,6 +548,7 @@ group("qtwebengine_resources") {
repack("qtwebengine_repack_resources") {
sources = [
"$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/net_internals_resources.pak",
@@ -553,10 +558,13 @@ repack("qtwebengine_repack_resources") {
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
"$root_gen_dir/content/browser/tracing/tracing_resources.pak",
"$root_gen_dir/content/content_resources.pak",
- "$root_gen_dir/content/dev_ui_content_resources.pak",
- "$root_gen_dir/content/indexed_db_resources.pak",
"$root_gen_dir/content/gpu_resources.pak",
+ "$root_gen_dir/content/histograms_resources.pak",
+ "$root_gen_dir/content/indexed_db_resources.pak",
+ "$root_gen_dir/content/network_errors_resources.pak",
+ "$root_gen_dir/content/process_resources.pak",
"$root_gen_dir/content/quota_internals_resources.pak",
+ "$root_gen_dir/content/service_worker_resources.pak",
"$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",
@@ -566,18 +574,22 @@ 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",
"//components/resources:components_resources_grit",
"//components/resources:dev_ui_components_resources_grit",
"//content/browser/resources/attribution_reporting:resources",
"//content/browser/resources/gpu:resources",
+ "//content/browser/resources/histograms:resources_grit",
+ "//content/browser/resources/indexed_db:resources",
"//content/browser/resources/media:resources",
+ "//content/browser/resources/net:resources",
+ "//content/browser/resources/process:resources",
+ "//content/browser/resources/quota:resources",
+ "//content/browser/resources/service_worker:resources",
"//content/browser/tracing:resources",
"//content:content_resources",
- "//content/browser/resources/indexed_db:resources",
- "//content/browser/resources/quota:resources",
- "//content:dev_ui_content_resources_grit",
"//mojo/public/js:resources",
"//net:net_resources_grit",
"//third_party/blink/public:resources_grit",
@@ -619,6 +631,14 @@ repack("qtwebengine_repack_resources") {
"//chrome/browser/resources/pdf:resources",
]
}
+ if (is_linux || is_win) {
+ sources += [
+ "$root_gen_dir/chrome/sandbox_internals_resources.pak",
+ ]
+ deps += [
+ "//chrome/browser/resources/sandbox_internals:resources_grit",
+ ]
+ }
}
repack("qtwebengine_repack_resources_100") {
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 904ed87a5..b25c51db1 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -1192,7 +1192,8 @@ bool ContentBrowserClientQt::WillCreateURLLoaderFactory(
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient> *header_client,
bool *bypass_redirect_checks,
bool *disable_secure_dns,
- network::mojom::URLLoaderFactoryOverridePtr *factory_override)
+ network::mojom::URLLoaderFactoryOverridePtr *factory_override,
+ scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner)
{
Q_UNUSED(render_process_id);
Q_UNUSED(type);
@@ -1208,6 +1209,7 @@ bool ContentBrowserClientQt::WillCreateURLLoaderFactory(
mojo::PendingRemote<network::mojom::URLLoaderFactory> pending_url_loader_factory;
*factory_receiver = pending_url_loader_factory.InitWithNewPipeAndPassReceiver();
// Will manage its own lifetime
+ // FIXME: use navigation_response_task_runner?
new ProxyingURLLoaderFactoryQt(adapter,
frame ? frame->GetFrameTreeNodeId() : content::RenderFrameHost::kNoFrameTreeNodeId,
std::move(proxied_receiver), std::move(pending_url_loader_factory));
@@ -1216,7 +1218,8 @@ bool ContentBrowserClientQt::WillCreateURLLoaderFactory(
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
ContentBrowserClientQt::WillCreateURLLoaderRequestInterceptors(content::NavigationUIData* navigation_ui_data,
- int frame_tree_node_id)
+ int frame_tree_node_id, int64_t navigation_id,
+ scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner)
{
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>> interceptors;
#if BUILDFLAG(ENABLE_PDF) && BUILDFLAG(ENABLE_EXTENSIONS)
@@ -1305,30 +1308,19 @@ void ContentBrowserClientQt::SiteInstanceGotProcess(content::SiteInstance *site_
#if BUILDFLAG(ENABLE_EXTENSIONS)
content::BrowserContext *context = site_instance->GetBrowserContext();
extensions::ExtensionRegistry *registry = extensions::ExtensionRegistry::Get(context);
- const extensions::Extension *extension = registry->enabled_extensions().GetExtensionOrAppByURL(site_instance->GetSiteURL());
- if (!extension)
+ if (!registry)
return;
-
- extensions::ProcessMap *processMap = extensions::ProcessMap::Get(context);
- processMap->Insert(extension->id(), site_instance->GetProcess()->GetID(), site_instance->GetId());
-#endif
-}
-
-void ContentBrowserClientQt::SiteInstanceDeleting(content::SiteInstance *site_instance)
-{
-#if BUILDFLAG(ENABLE_EXTENSIONS)
- // Don't do anything if we're shutting down.
- if (content::BrowserMainRunner::ExitedMainMessageLoop() || !site_instance->HasProcess())
- return;
-
- content::BrowserContext *context = site_instance->GetBrowserContext();
- extensions::ExtensionRegistry *registry = extensions::ExtensionRegistry::Get(context);
- const extensions::Extension *extension = registry->enabled_extensions().GetExtensionOrAppByURL(site_instance->GetSiteURL());
+ if (site_instance->IsGuest())
+ return;
+ auto site_url = site_instance->GetSiteURL();
+ if (!site_url.SchemeIs(extensions::kExtensionScheme))
+ return;
+ const extensions::Extension *extension = registry->enabled_extensions().GetByID(site_url.host());
if (!extension)
return;
extensions::ProcessMap *processMap = extensions::ProcessMap::Get(context);
- processMap->Remove(extension->id(), site_instance->GetProcess()->GetID(), site_instance->GetId());
+ processMap->Insert(extension->id(), site_instance->GetProcess()->GetID());
#endif
}
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index e93a3f117..7f05594c3 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -187,7 +187,9 @@ public:
const std::string &scheme) override;
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>
WillCreateURLLoaderRequestInterceptors(content::NavigationUIData *navigation_ui_data,
- int frame_tree_node_id) override;
+ int frame_tree_node_id,
+ int64_t navigation_id,
+ scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) override;
bool WillCreateURLLoaderFactory(content::BrowserContext *browser_context,
content::RenderFrameHost *frame,
int render_process_id,
@@ -199,7 +201,8 @@ public:
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient> *header_client,
bool *bypass_redirect_checks,
bool *disable_secure_dns,
- network::mojom::URLLoaderFactoryOverridePtr *factory_override) override;
+ network::mojom::URLLoaderFactoryOverridePtr *factory_override,
+ scoped_refptr<base::SequencedTaskRunner> navigation_response_task_runner) override;
scoped_refptr<network::SharedURLLoaderFactory> GetSystemSharedURLLoaderFactory() override;
network::mojom::NetworkContext *GetSystemNetworkContext() override;
void OnNetworkServiceCreated(network::mojom::NetworkService *network_service) override;
@@ -221,7 +224,6 @@ public:
void RegisterNonNetworkServiceWorkerUpdateURLLoaderFactories(content::BrowserContext* browser_context,
NonNetworkURLLoaderFactoryMap* factories) override;
void SiteInstanceGotProcess(content::SiteInstance *site_instance) override;
- void SiteInstanceDeleting(content::SiteInstance *site_instance) override;
base::flat_set<std::string> GetPluginMimeTypesWithExternalHandlers(content::BrowserContext *browser_context) override;
std::unique_ptr<content::WebContentsViewDelegate> GetWebContentsViewDelegate(content::WebContents *web_contents) override;
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index a18560283..b6a0909b0 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -163,14 +163,17 @@ static const QDir widevineCdmDirHint(const QDir &widevineDir)
return widevineDir;
}
+ std::string error_message;
JSONStringValueDeserializer deserializer(jsonString);
- std::unique_ptr<base::Value> dict = deserializer.Deserialize(nullptr, nullptr);
+ std::unique_ptr<base::Value> dict = deserializer.Deserialize(nullptr, &error_message);
if (!dict || !dict->is_dict()) {
+ DLOG(ERROR) << "Could not deserialize the CDM hint file. Error: "
+ << error_message;
// Could not deserialize the CDM hint file.
return widevineDir;
}
- std::string *widevineCdmDirPath = dict->FindStringKey("Path");
+ std::string *widevineCdmDirPath = dict->GetDict().FindString("Path");
if (!widevineCdmDirPath)
return widevineDir;
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index 0aea6ca20..f949d93a5 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -39,8 +39,8 @@
#endif
#if BUILDFLAG(IS_WIN)
-#include "media/gpu/windows/dxva_video_decode_accelerator_win.h"
-#include "media/gpu/windows/media_foundation_video_encode_accelerator_win.h"
+#include "media/base/win/mf_initializer.h"
+#include "sandbox/policy/win/sandbox_warmup.h"
#endif
#if BUILDFLAG(IS_MAC)
@@ -169,8 +169,7 @@ void ContentMainDelegateQt::PreSandboxStartup()
if (isBrowserProcess) {
// from gpu_main.cc:
#if BUILDFLAG(IS_WIN)
- media::DXVAVideoDecodeAccelerator::PreSandboxInitialization();
- media::MediaFoundationVideoEncodeAccelerator::PreSandboxInitialization();
+ media::PreSandboxMediaFoundationInitialization();
#endif
#if BUILDFLAG(IS_MAC)
diff --git a/src/core/extensions/extension_system_qt.h b/src/core/extensions/extension_system_qt.h
index e4e9b953e..c213671a7 100644
--- a/src/core/extensions/extension_system_qt.h
+++ b/src/core/extensions/extension_system_qt.h
@@ -71,7 +71,7 @@ public:
const base::OneShotEvent &ready() const override { return ready_; }
bool is_ready() const override;
- void PerformActionBasedOnOmahaAttributes(const std::string &, const base::Value &) override { /* fixme? */}
+ void PerformActionBasedOnOmahaAttributes(const std::string &, const base::Value::Dict &) override { /* fixme? */}
private:
void NotifyExtensionLoaded(const Extension *extension);
diff --git a/src/core/location_provider_qt.h b/src/core/location_provider_qt.h
index 76937cc15..93e409d77 100644
--- a/src/core/location_provider_qt.h
+++ b/src/core/location_provider_qt.h
@@ -25,7 +25,8 @@ public:
void StopProvider() override;
const device::mojom::GeopositionResult* GetPosition() override { return m_lastKnownPosition.get(); }
void OnPermissionGranted() override;
- void SetUpdateCallback(const LocationProviderUpdateCallback& callback) override;
+ void SetUpdateCallback(const LocationProviderUpdateCallback &callback) override;
+ void FillDiagnostics(device::mojom::GeolocationDiagnostics &) override {}
private:
friend class QtPositioningHelper;
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp
index a6ac070af..612713361 100644
--- a/src/core/media_capture_devices_dispatcher.cpp
+++ b/src/core/media_capture_devices_dispatcher.cpp
@@ -543,13 +543,11 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content::
content::DesktopMediaID mediaId;
if (main_frame) {
- // The extension name that the stream is registered with.
- std::string originalExtensionName;
// Resolve DesktopMediaID for the specified device id.
mediaId = content::DesktopStreamsRegistry::GetInstance()->RequestMediaForStreamId(
request.requested_video_device_id, main_frame->GetProcess()->GetID(),
main_frame->GetRoutingID(), url::Origin::Create(request.security_origin),
- &originalExtensionName, content::kRegistryStreamTypeDesktop);
+ content::kRegistryStreamTypeDesktop);
}
// Received invalid device id.
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 fb7656392..5994f083d 100644
--- a/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
+++ b/src/core/net/plugin_response_interceptor_url_loader_throttle.cpp
@@ -9,7 +9,7 @@
#include "plugin_response_interceptor_url_loader_throttle.h"
#include "base/functional/bind.h"
-#include "base/guid.h"
+#include "base/uuid.h"
#include "chrome/browser/extensions/api/streams_private/streams_private_api.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -120,7 +120,7 @@ void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse(const GURL
MimeTypesHandler::ReportUsedHandler(extension_id);
- std::string view_id = base::GenerateGUID();
+ std::string view_id = base::Uuid::GenerateRandomV4().AsLowercaseString();
// The string passed down to the original client with the response body.
std::string payload = view_id;
@@ -173,7 +173,7 @@ void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse(const GURL
auto transferrable_loader = blink::mojom::TransferrableURLLoader::New();
transferrable_loader->url = GURL(
extensions::Extension::GetBaseURLFromExtensionId(extension_id).spec() +
- base::GenerateGUID());
+ base::Uuid::GenerateRandomV4().AsLowercaseString());
transferrable_loader->url_loader = std::move(original_loader);
transferrable_loader->url_loader_client = std::move(original_client);
transferrable_loader->head = std::move(deep_copied_response);
diff --git a/src/core/net/ssl_host_state_delegate_qt.cpp b/src/core/net/ssl_host_state_delegate_qt.cpp
index dcb881a49..41967f14e 100644
--- a/src/core/net/ssl_host_state_delegate_qt.cpp
+++ b/src/core/net/ssl_host_state_delegate_qt.cpp
@@ -111,6 +111,16 @@ bool SSLHostStateDelegateQt::HasAllowException(const std::string &host, content:
policy_iterator->second.HasAllowException();
}
+bool SSLHostStateDelegateQt::HasAllowExceptionForAnyHost(content::StoragePartition *storage_partition)
+{
+ for (auto const &it : m_certPolicyforHost) {
+ if (it.second.HasAllowException()) {
+ return true;
+ }
+ }
+ return false;
+}
+
void SSLHostStateDelegateQt::SetHttpsEnforcementForHost(const std::string &host, bool enforce,
content::StoragePartition *storage_partition)
{
diff --git a/src/core/net/ssl_host_state_delegate_qt.h b/src/core/net/ssl_host_state_delegate_qt.h
index ab415603f..0b3d7974c 100644
--- a/src/core/net/ssl_host_state_delegate_qt.h
+++ b/src/core/net/ssl_host_state_delegate_qt.h
@@ -43,6 +43,7 @@ public:
bool IsHttpsEnforcedForHost(const std::string &host, content::StoragePartition *web_contents) override;
void RevokeUserAllowExceptions(const std::string &host) override;
bool HasAllowException(const std::string &host, content::StoragePartition *web_contents) override;
+ bool HasAllowExceptionForAnyHost(content::StoragePartition *storage_partition) override;
private:
std::map<std::string, CertPolicy> m_certPolicyforHost;
diff --git a/src/core/net/system_network_context_manager.cpp b/src/core/net/system_network_context_manager.cpp
index 65b5d9c97..935bf6b28 100644
--- a/src/core/net/system_network_context_manager.cpp
+++ b/src/core/net/system_network_context_manager.cpp
@@ -34,8 +34,8 @@
#if BUILDFLAG(IS_WIN)
#include "chrome/browser/net/chrome_mojo_proxy_resolver_win.h"
-#include "components/os_crypt/os_crypt.h"
-#include "content/public/common/network_service_util.h"
+#include "components/os_crypt/sync/os_crypt.h"
+#include "content/public/browser/network_service_util.h"
#endif
namespace {
diff --git a/src/core/pref_service_adapter.cpp b/src/core/pref_service_adapter.cpp
index dcc7401c0..3e0adb423 100644
--- a/src/core/pref_service_adapter.cpp
+++ b/src/core/pref_service_adapter.cpp
@@ -43,7 +43,7 @@
#endif
#if defined(Q_OS_WIN)
-#include "components/os_crypt/os_crypt.h"
+#include "components/os_crypt/sync/os_crypt.h"
#endif
namespace {
diff --git a/src/core/printing/print_view_manager_qt.cpp b/src/core/printing/print_view_manager_qt.cpp
index 892c9e406..b730c8461 100644
--- a/src/core/printing/print_view_manager_qt.cpp
+++ b/src/core/printing/print_view_manager_qt.cpp
@@ -239,7 +239,7 @@ bool PrintViewManagerQt::PrintToPDFInternal(const QPageLayout &pageLayout,
return false;
content::RenderFrameHost* rfh = web_contents()->GetPrimaryMainFrame();
- GetPrintRenderFrame(rfh)->InitiatePrintPreview(mojo::PendingAssociatedRemote<printing::mojom::PrintRenderer>(), false);
+ GetPrintRenderFrame(rfh)->InitiatePrintPreview(false);
DCHECK(!m_printPreviewRfh);
m_printPreviewRfh = rfh;
diff --git a/src/core/touch_selection_controller_client_qt.h b/src/core/touch_selection_controller_client_qt.h
index df693a0e1..884e7f020 100644
--- a/src/core/touch_selection_controller_client_qt.h
+++ b/src/core/touch_selection_controller_client_qt.h
@@ -51,6 +51,8 @@ public:
ui::TouchSelectionController* GetTouchSelectionController() override;
void AddObserver(Observer* observer) override;
void RemoveObserver(Observer* observer) override;
+ void OnSwipeToMoveCursorBegin() override {}
+ void OnSwipeToMoveCursorEnd() override {}
// ui::TouchSelectionControllerClient overrides
bool SupportsAnimation() const override;
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index 92304a7b8..0da8a6931 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -58,11 +58,21 @@ inline QString toQt(const absl::optional<std::u16string> &string)
return QString::fromStdU16String(*string);
}
+inline QString toQString(const base::StringPiece &string)
+{
+ return QString::fromUtf8(string.data(), string.size());
+}
+
inline QString toQString(const std::string &string)
{
return QString::fromStdString(string);
}
+inline QByteArray toQByteArray(const base::StringPiece &string)
+{
+ return QByteArray(string.data(), string.size());
+}
+
inline QByteArray toQByteArray(const std::string &string)
{
return QByteArray::fromStdString(string);
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 14d9b64f2..8cee00027 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -32,7 +32,6 @@
#endif
#include "components/discardable_memory/service/discardable_shared_memory_manager.h"
#include "components/download/public/common/download_task_runner.h"
-#include "components/power_scheduler/power_mode_arbiter.h"
#include "components/viz/common/features.h"
#include "components/web_cache/browser/web_cache_manager.h"
#include "content/app/mojo_ipc_support.h"
@@ -57,7 +56,6 @@
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/main_function_params.h"
-#include "content/public/common/network_service_util.h"
#include "content/renderer/in_process_renderer_thread.h"
#include "content/utility/in_process_utility_thread.h"
#include "gpu/command_buffer/service/gpu_switches.h"
@@ -76,6 +74,7 @@
#include "ui/base/ui_base_features.h"
#include "ui/events/event_switches.h"
#include "ui/native_theme/native_theme_features.h"
+#include "ui/gl/gl_utils.h"
#include "ui/gl/gl_switches.h"
#if defined(Q_OS_WIN)
#include "sandbox/win/src/sandbox_types.h"
@@ -777,8 +776,11 @@ WebEngineContext::WebEngineContext()
// "Could not share GL contexts" warnings, because it's not possible to share between Core and
// legacy profiles. See GLContextWGL::Initialize().
if (sharedFormat.renderableType() == QSurfaceFormat::OpenGL
- && sharedFormat.profile() != QSurfaceFormat::CoreProfile)
- parsedCommandLine->AppendSwitch(switches::kDisableES3GLContext);
+ && sharedFormat.profile() != QSurfaceFormat::CoreProfile) {
+ gl::GlWorkarounds workarounds = gl::GetGlWorkarounds();
+ workarounds.disable_es3gl_context = true;
+ gl::SetGlWorkarounds(workarounds);
+ }
#endif
}
#endif //QT_CONFIG(opengl)
@@ -817,7 +819,6 @@ WebEngineContext::WebEngineContext()
base::PowerMonitor::Initialize(std::make_unique<base::PowerMonitorDeviceSource>());
content::ProcessVisibilityTracker::GetInstance();
m_discardableSharedMemoryManager = std::make_unique<discardable_memory::DiscardableSharedMemoryManager>();
- power_scheduler::PowerModeArbiter::GetInstance()->OnThreadPoolAvailable();
m_mojoIpcSupport = std::make_unique<content::MojoIpcSupport>(content::BrowserTaskExecutor::CreateIOThread());
download::SetIOTaskRunner(m_mojoIpcSupport->io_thread()->task_runner());
diff --git a/tools/scripts/version_resolver.py b/tools/scripts/version_resolver.py
index b5e6f67b8..77d82c6e2 100644
--- a/tools/scripts/version_resolver.py
+++ b/tools/scripts/version_resolver.py
@@ -43,8 +43,8 @@ class DEPSParser(ABC):
return self.local_scope["recursedeps"]
-chromium_version = '112.0.5615.213'
-chromium_branch = '5615'
+chromium_version = '116.0.5845.183'
+chromium_branch = '5845'
ninja_version = 'v1.8.2'
json_url = 'http://omahaproxy.appspot.com/all.json'
@@ -57,7 +57,13 @@ submodule_blacklist = [
'buildtools/clang_format/script',
'buildtools/third_party/libc++/trunk',
'buildtools/third_party/libc++abi/trunk',
- 'buildtools/third_party/libunwind/trunk'
+ 'buildtools/third_party/libunwind/trunk',
+ 'chrome/browser/resources/chromeos/quickoffice',
+ 'remoting/host/installer/linux/internal',
+ 'third_party/widevine/cdm/chromeos',
+ 'third_party/widevine/cdm/linux',
+ 'third_party/widevine/test/license_server',
+ 'ui/file_manager/internal'
]
submodule_whitelist = [ 'src/third_party/android_ndk' , 'src/third_party/libunwindstack' ]