diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-10-12 15:27:23 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-28 13:32:50 +0100 |
commit | b104487f072cd04ca4301ba1f10d3ad2e874569e (patch) | |
tree | 920c6e6fcabdcaff9e4c9f8ead2e6b0c289f99eb | |
parent | 2d002e42a8b6e711e3c9ca5b6dd3611e9d8426ab (diff) |
Adaptations for 106-based
Change-Id: I2fe91c06ce91dfaace7825a0589b56ee375479b6
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
73 files changed, 381 insertions, 418 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 745bf4cc2..dfbdb7a61 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -293,6 +293,7 @@ foreach(arch ${archs}) list(APPEND gnArgArg qtwebengine_target="${buildDir}/${config}/${arch}:QtWebEngineCore" + build_with_tflite_lib=false enable_background_contents=false enable_background_mode=false enable_ipc_fuzzer=false @@ -300,17 +301,20 @@ foreach(arch ${archs}) enable_media_remoting=false enable_message_center=false enable_nacl=false - enable_one_click_signin=false enable_oop_printing=false enable_remoting=false enable_reporting=false enable_resource_allowlist_generation=false + enable_screen_ai_service=false enable_swiftshader=false enable_swiftshader_vulkan=false angle_enable_swiftshader=false dawn_use_swiftshader=false + use_dawn=false + enable_vr=false enable_web_speech=false enable_widevine=true + enable_library_cdms=true fatal_linker_warnings=false has_native_accessibility=false safe_browsing_mode=0 @@ -322,6 +326,7 @@ foreach(arch ${archs}) strip_absolute_paths_from_debug_symbols=false devtools_fast_bundle=false devtools_skip_typecheck=false + enable_jxl_decoder=false # temporarily because libjxl causes internal compiler error on armv7 ) extend_gn_list(gnArgArg diff --git a/src/core/accessibility_tree_formatter_qt.cpp b/src/core/accessibility_tree_formatter_qt.cpp index dcf2aa39d..c85605654 100644 --- a/src/core/accessibility_tree_formatter_qt.cpp +++ b/src/core/accessibility_tree_formatter_qt.cpp @@ -78,58 +78,58 @@ void AccessibilityTreeFormatterQt::AddProperties(const BrowserAccessibility &nod QAccessible::State state = iface->state(); - std::vector<base::Value> states; + base::Value::List states; if (state.busy) - states.push_back(base::Value("busy")); + states.Append(base::Value("busy")); if (state.checkable) - states.push_back(base::Value("checkable")); + states.Append(base::Value("checkable")); if (state.checked) - states.push_back(base::Value("checked")); + states.Append(base::Value("checked")); if (node.IsClickable()) - states.push_back(base::Value("clickable")); + states.Append(base::Value("clickable")); if (state.collapsed) - states.push_back(base::Value("collapsed")); + states.Append(base::Value("collapsed")); if (state.disabled) - states.push_back(base::Value("disabled")); + states.Append(base::Value("disabled")); if (state.editable) - states.push_back(base::Value("editable")); + states.Append(base::Value("editable")); if (state.expandable) - states.push_back(base::Value("expandable")); + states.Append(base::Value("expandable")); if (state.expanded) - states.push_back(base::Value("expanded")); + states.Append(base::Value("expanded")); if (state.focusable) - states.push_back(base::Value("focusable")); + states.Append(base::Value("focusable")); if (state.focused) - states.push_back(base::Value("focused")); + states.Append(base::Value("focused")); if (state.hasPopup) - states.push_back(base::Value("hasPopup")); + states.Append(base::Value("hasPopup")); if (state.hotTracked) - states.push_back(base::Value("hotTracked")); + states.Append(base::Value("hotTracked")); if (state.invisible) - states.push_back(base::Value("invisible")); + states.Append(base::Value("invisible")); if (state.linked) - states.push_back(base::Value("linked")); + states.Append(base::Value("linked")); if (state.multiLine) - states.push_back(base::Value("multiLine")); + states.Append(base::Value("multiLine")); if (state.multiSelectable) - states.push_back(base::Value("multiSelectable")); + states.Append(base::Value("multiSelectable")); if (state.modal) - states.push_back(base::Value("modal")); + states.Append(base::Value("modal")); if (state.offscreen) - states.push_back(base::Value("offscreen")); + states.Append(base::Value("offscreen")); if (state.passwordEdit) - states.push_back(base::Value("password")); + states.Append(base::Value("password")); if (state.pressed) - states.push_back(base::Value("pressed")); + states.Append(base::Value("pressed")); if (state.readOnly) - states.push_back(base::Value("readOnly")); + states.Append(base::Value("readOnly")); if (state.selectable) - states.push_back(base::Value("selectable")); + states.Append(base::Value("selectable")); if (state.selected) - states.push_back(base::Value("selected")); + states.Append(base::Value("selected")); if (state.traversed) - states.push_back(base::Value("traversed")); - dict->Set("states", base::Value(states)); + states.Append(base::Value("traversed")); + dict->Set("states", std::move(states)); dict->Set("name", iface->text(QAccessible::Name).toStdString()); dict->Set("description", iface->text(QAccessible::Description).toStdString()); diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp index 0b79f2dd4..b75e5a5e6 100644 --- a/src/core/chromium_overrides.cpp +++ b/src/core/chromium_overrides.cpp @@ -9,7 +9,9 @@ #include "base/values.h" #include "content/browser/web_contents/web_contents_impl.h" +#include "content/browser/web_contents/web_contents_view.h" #include "content/common/font_list.h" +#include "content/public/browser/web_contents_view_delegate.h" #include "extensions/buildflags/buildflags.h" #include "extensions/common/constants.h" #include "gpu/vulkan/buildflags.h" @@ -41,8 +43,6 @@ void *GetQtXDisplay() } namespace content { -class WebContentsView; -class WebContentsViewDelegate; class RenderViewHostDelegateView; std::unique_ptr<WebContentsView> CreateWebContentsView(WebContentsImpl *web_contents, @@ -74,35 +74,21 @@ base::FilePath getSandboxPath() namespace content { // content/common/font_list.h -std::unique_ptr<base::ListValue> GetFontList_SlowBlocking() +base::Value::List GetFontList_SlowBlocking() { - std::unique_ptr<base::ListValue> font_list(new base::ListValue); + base::Value::List font_list; for (auto family : QFontDatabase::families()){ base::Value::List font_item; font_item.Append(family.toStdString()); font_item.Append(family.toStdString()); // localized name. // TODO(yusukes): Support localized family names. - font_list->Append(std::move(font_item)); + font_list.Append(std::move(font_item)); } return font_list; } } // namespace content - -namespace aura { -class Window; -} - -namespace wm { -class ActivationClient; - -ActivationClient *GetActivationClient(aura::Window *) -{ - return nullptr; -} - -} // namespace wm #endif // defined(USE_AURA) || defined(USE_OZONE) #if BUILDFLAG(ENABLE_VULKAN) diff --git a/src/core/common/extensions/extensions_client_qt.cpp b/src/core/common/extensions/extensions_client_qt.cpp index 30d1836ca..9240e6528 100644 --- a/src/core/common/extensions/extensions_client_qt.cpp +++ b/src/core/common/extensions/extensions_client_qt.cpp @@ -122,6 +122,12 @@ bool ExtensionsClientQt::IsBlocklistUpdateURL(const GURL &url) const return true; } +const GURL &ExtensionsClientQt::GetNewWebstoreBaseURL() const +{ + static GURL dummy; + return dummy; +} + // Returns the set of file paths corresponding to any images within an // extension's contents that may be displayed directly within the browser UI // or WebUI, such as icons or theme images. This set of paths is used by the diff --git a/src/core/common/extensions/extensions_client_qt.h b/src/core/common/extensions/extensions_client_qt.h index b0069db22..b2d128bf9 100644 --- a/src/core/common/extensions/extensions_client_qt.h +++ b/src/core/common/extensions/extensions_client_qt.h @@ -74,6 +74,8 @@ public: // extension blacklist URL. bool IsBlocklistUpdateURL(const GURL &url) const override; + const GURL &GetNewWebstoreBaseURL() const override; + // Returns the set of file paths corresponding to any images within an // extension's contents that may be displayed directly within the browser UI // or WebUI, such as icons or theme images. This set of paths is used by the diff --git a/src/core/compositor/vulkan_implementation_qt.cpp b/src/core/compositor/vulkan_implementation_qt.cpp index 713e5d7a1..3090a945a 100644 --- a/src/core/compositor/vulkan_implementation_qt.cpp +++ b/src/core/compositor/vulkan_implementation_qt.cpp @@ -136,6 +136,7 @@ VkExternalMemoryHandleTypeFlagBits VulkanImplementationQt::GetExternalImageHandl } bool VulkanImplementationQt::CanImportGpuMemoryBuffer( + VulkanDeviceQueue* /*device_queue*/, gfx::GpuMemoryBufferType /*memory_buffer_type*/) { return false; diff --git a/src/core/compositor/vulkan_implementation_qt.h b/src/core/compositor/vulkan_implementation_qt.h index 6e7a68b49..db48acead 100644 --- a/src/core/compositor/vulkan_implementation_qt.h +++ b/src/core/compositor/vulkan_implementation_qt.h @@ -32,7 +32,8 @@ public: VkSemaphore ImportSemaphoreHandle(VkDevice vk_device, SemaphoreHandle handle) override; SemaphoreHandle GetSemaphoreHandle(VkDevice vk_device, VkSemaphore vk_semaphore) override; VkExternalMemoryHandleTypeFlagBits GetExternalImageHandleType() override; - bool CanImportGpuMemoryBuffer(gfx::GpuMemoryBufferType memory_buffer_type) override; + bool CanImportGpuMemoryBuffer(VulkanDeviceQueue* device_queue, + gfx::GpuMemoryBufferType memory_buffer_type) override; std::unique_ptr<VulkanImage> CreateImageFromGpuMemoryHandle(VulkanDeviceQueue *device_queue, gfx::GpuMemoryBufferHandle gmb_handle, gfx::Size size, diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in index cdd9c440a..bf0454863 100644 --- a/src/core/configure/BUILD.root.gn.in +++ b/src/core/configure/BUILD.root.gn.in @@ -115,6 +115,7 @@ shared_library("QtWebEngineCore") { "//components/autofill/content/browser", "//components/autofill/content/renderer", "//components/autofill/core/browser", + "//components/autofill/core/browser:buildflags", "//components/cdm/renderer", "//components/error_page/common", "//components/favicon/content", @@ -137,6 +138,7 @@ shared_library("QtWebEngineCore") { "//content/public/app", "//content/public/browser", "//content", + "//gpu/ipc:gl_in_process_context", "//media:media_buildflags", "//net", "//services/proxy_resolver:lib", @@ -222,12 +224,12 @@ source_set("qtwebengine_sources") { ] deps = [ "//build:branding_buildflags", + "//build/config/chromebox_for_meetings:buildflags", "//chrome/browser:dev_ui_browser_resources_grit", "//chrome/browser/resources/net_internals:resources", "//chrome/browser/signin:identity_manager_provider", "//chrome/common:buildflags", "//chrome/common:version_header", - "//chromeos/components/chromebox_for_meetings/buildflags", "//components/custom_handlers", "//components/embedder_support:embedder_support", "//components/nacl/common:buildflags", @@ -263,6 +265,10 @@ source_set("qtwebengine_sources") { "//chrome/browser/prefs/chrome_command_line_pref_store.h", "//chrome/browser/profiles/incognito_helpers.cc", "//chrome/browser/profiles/incognito_helpers.h", + "//chrome/browser/profiles/profile_keyed_service_factory.cc", + "//chrome/browser/profiles/profile_keyed_service_factory.h", + "//chrome/browser/profiles/profile_selections.cc", + "//chrome/browser/profiles/profile_selections.h", "//chrome/browser/profiles/profile.cc", "//chrome/browser/profiles/profile.h", "//chrome/browser/push_messaging/push_messaging_app_identifier.cc", diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 5a7102b63..1c1db445c 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -480,12 +480,12 @@ void ContentBrowserClientQt::ExposeInterfacesToRenderer(service_manager::BinderR if (auto *manager = performance_manager::PerformanceManagerRegistry::GetInstance()) manager->CreateProcessNodeAndExposeInterfacesToRendererProcess(registry, render_process_host); #if BUILDFLAG(ENABLE_EXTENSIONS) - associated_registry->AddInterface(base::BindRepeating(&extensions::EventRouter::BindForRenderer, - render_process_host->GetID())); - associated_registry->AddInterface(base::BindRepeating(&extensions::ExtensionsGuestView::CreateForComponents, - render_process_host->GetID())); - associated_registry->AddInterface(base::BindRepeating(&extensions::ExtensionsGuestView::CreateForExtensions, - render_process_host->GetID())); + associated_registry->AddInterface<extensions::mojom::EventRouter>( + base::BindRepeating(&extensions::EventRouter::BindForRenderer, render_process_host->GetID())); + associated_registry->AddInterface<guest_view::mojom::GuestViewHost>( + base::BindRepeating(&extensions::ExtensionsGuestView::CreateForComponents, render_process_host->GetID())); + associated_registry->AddInterface<extensions::mojom::GuestView>( + base::BindRepeating(&extensions::ExtensionsGuestView::CreateForExtensions, render_process_host->GetID())); #else Q_UNUSED(associated_registry); #endif @@ -496,7 +496,7 @@ void ContentBrowserClientQt::RegisterAssociatedInterfaceBindersForRenderFrameHos blink::AssociatedInterfaceRegistry &associated_registry) { #if QT_CONFIG(webengine_webchannel) - associated_registry.AddInterface( + associated_registry.AddInterface<qtwebchannel::mojom::WebChannelTransportHost>( base::BindRepeating( [](content::RenderFrameHost *render_frame_host, mojo::PendingAssociatedReceiver<qtwebchannel::mojom::WebChannelTransportHost> receiver) { @@ -506,7 +506,7 @@ void ContentBrowserClientQt::RegisterAssociatedInterfaceBindersForRenderFrameHos }, &rfh)); #endif #if BUILDFLAG(ENABLE_PRINTING) && BUILDFLAG(ENABLE_PRINT_PREVIEW) - associated_registry.AddInterface( + associated_registry.AddInterface<printing::mojom::PrintManagerHost>( base::BindRepeating( [](content::RenderFrameHost* render_frame_host, mojo::PendingAssociatedReceiver<printing::mojom::PrintManagerHost> receiver) { @@ -514,21 +514,21 @@ void ContentBrowserClientQt::RegisterAssociatedInterfaceBindersForRenderFrameHos }, &rfh)); #endif #if BUILDFLAG(ENABLE_EXTENSIONS) - associated_registry.AddInterface( + associated_registry.AddInterface<extensions::mojom::LocalFrameHost>( base::BindRepeating( [](content::RenderFrameHost *render_frame_host, mojo::PendingAssociatedReceiver<extensions::mojom::LocalFrameHost> receiver) { extensions::ExtensionWebContentsObserverQt::BindLocalFrameHost(std::move(receiver), render_frame_host); }, &rfh)); #endif - associated_registry.AddInterface( + associated_registry.AddInterface<autofill::mojom::AutofillDriver>( base::BindRepeating( [](content::RenderFrameHost *render_frame_host, mojo::PendingAssociatedReceiver<autofill::mojom::AutofillDriver> receiver) { autofill::ContentAutofillDriverFactory::BindAutofillDriver(std::move(receiver), render_frame_host); }, &rfh)); #if BUILDFLAG(ENABLE_PDF) - associated_registry.AddInterface( + associated_registry.AddInterface<pdf::mojom::PdfService>( base::BindRepeating( [](content::RenderFrameHost *render_frame_host, mojo::PendingAssociatedReceiver<pdf::mojom::PdfService> receiver) { @@ -694,7 +694,7 @@ static void LaunchURL(const GURL& url, has_user_gesture); if (!allowed) { - content::RenderFrameHost *rfh = webContents->GetMainFrame(); + content::RenderFrameHost *rfh = webContents->GetPrimaryMainFrame(); if (!base::CommandLine::ForCurrentProcess()->HasSwitch("disable-sandbox-external-protocols")) { rfh->AddMessageToConsole(blink::mojom::ConsoleMessageLevel::kError, "Navigation to external protocol blocked by sandbox."); diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp index cc5566024..52e23399e 100644 --- a/src/core/content_main_delegate_qt.cpp +++ b/src/core/content_main_delegate_qt.cpp @@ -77,19 +77,18 @@ struct LazyDirectoryListerCacher { LazyDirectoryListerCacher() { - base::DictionaryValue dict; - dict.SetString("header", l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_HEADER)); - dict.SetString("parentDirText", l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_PARENT)); - dict.SetString("headerName", l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_NAME)); - dict.SetString("headerSize", l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_SIZE)); - dict.SetString("headerDateModified", - l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_DATE_MODIFIED)); - dict.SetString("language", l10n_util::GetLanguage(base::i18n::GetConfiguredLocale())); - dict.SetString("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr"); + base::Value::Dict dict; + dict.Set("header", l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_HEADER)); + dict.Set("parentDirText", l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_PARENT)); + dict.Set("headerName", l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_NAME)); + dict.Set("headerSize", l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_SIZE)); + dict.Set("headerDateModified", l10n_util::GetStringUTF16(IDS_DIRECTORY_LISTING_DATE_MODIFIED)); + dict.Set("language", l10n_util::GetLanguage(base::i18n::GetConfiguredLocale())); + dict.Set("textdirection", base::i18n::IsRTL() ? "rtl" : "ltr"); std::string html = webui::GetI18nTemplateHtml( ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(IDR_DIR_HEADER_HTML), - &dict); + std::move(dict)); html_data = base::RefCountedString::TakeString(&html); } @@ -259,7 +258,7 @@ static void SafeOverridePathImpl(const char *keyName, int key, const base::FileP #define SafeOverridePath(KEY, PATH) SafeOverridePathImpl(#KEY, KEY, PATH) -bool ContentMainDelegateQt::BasicStartupComplete(int *exit_code) +absl::optional<int> ContentMainDelegateQt::BasicStartupComplete() { SafeOverridePath(base::FILE_EXE, WebEngineLibraryInfo::getPath(base::FILE_EXE)); SafeOverridePath(base::DIR_QT_LIBRARY_DATA, WebEngineLibraryInfo::getPath(base::DIR_QT_LIBRARY_DATA)); @@ -270,7 +269,7 @@ bool ContentMainDelegateQt::BasicStartupComplete(int *exit_code) url::CustomScheme::LoadSchemes(base::CommandLine::ForCurrentProcess()); - return false; + return absl::nullopt; } } // namespace QtWebEngineCore diff --git a/src/core/content_main_delegate_qt.h b/src/core/content_main_delegate_qt.h index 3369beb98..a177bd6df 100644 --- a/src/core/content_main_delegate_qt.h +++ b/src/core/content_main_delegate_qt.h @@ -26,7 +26,7 @@ public: content::ContentGpuClient* CreateContentGpuClient() override; content::ContentRendererClient* CreateContentRendererClient() override; content::ContentUtilityClient* CreateContentUtilityClient() override; - bool BasicStartupComplete(int* /*exit_code*/) override; + absl::optional<int> BasicStartupComplete() override; private: ContentClientQt m_contentClient; diff --git a/src/core/desktop_screen_qt.cpp b/src/core/desktop_screen_qt.cpp index 898b8a1cc..fb68f7b09 100644 --- a/src/core/desktop_screen_qt.cpp +++ b/src/core/desktop_screen_qt.cpp @@ -119,13 +119,27 @@ display::Display DesktopScreenQt::GetDisplayNearestWindow(gfx::NativeWindow /*wi return GetPrimaryDisplay(); } +#if defined(USE_XSCREENSAVER) +class XScreenSuspender : public display::Screen::ScreenSaverSuspender +{ +public: + XScreenSuspender() + { + ui::SuspendX11ScreenSaver(true); + } + ~XScreenSuspender() override + { + ui::SuspendX11ScreenSaver(false); + } +}; +#endif #if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) -bool DesktopScreenQt::SetScreenSaverSuspended(bool suspend) +std::unique_ptr<display::Screen::ScreenSaverSuspender> DesktopScreenQt::SuspendScreenSaver() { #if defined(USE_XSCREENSAVER) - return ui::SuspendX11ScreenSaver(suspend); + return std::make_unique<XScreenSuspender>(); #else - return false; + return nullptr; #endif } #endif diff --git a/src/core/desktop_screen_qt.h b/src/core/desktop_screen_qt.h index 33f0cf870..a322c4840 100644 --- a/src/core/desktop_screen_qt.h +++ b/src/core/desktop_screen_qt.h @@ -18,7 +18,7 @@ public: display::Display GetDisplayNearestWindow(gfx::NativeWindow /*window*/) const override; #if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX) - bool SetScreenSaverSuspended(bool suspend) override; + std::unique_ptr<ScreenSaverSuspender> SuspendScreenSaver() override; #endif bool IsScreenSaverActive() const override; diff --git a/src/core/devtools_frontend_qt.cpp b/src/core/devtools_frontend_qt.cpp index ea2118b52..cda922ffa 100644 --- a/src/core/devtools_frontend_qt.cpp +++ b/src/core/devtools_frontend_qt.cpp @@ -348,15 +348,13 @@ void DevToolsFrontendQt::CreateJsonPreferences(bool clear) m_prefStore = scoped_refptr<PersistentPrefStore>(jsonPrefStore); } -void DevToolsFrontendQt::HandleMessageFromDevToolsFrontend(base::Value message) +void DevToolsFrontendQt::HandleMessageFromDevToolsFrontend(base::Value::Dict message) { - const std::string *method_ptr = nullptr; + const base::Value *method_ptr = nullptr; base::Value *params_value = nullptr; - if (message.is_dict()) { - method_ptr = message.FindStringKey("method"); - params_value = message.FindKey("params"); - } - if (!method_ptr || (params_value && !params_value->is_list())) { + method_ptr = message.Find("method"); + params_value = message.Find("params"); + if (!method_ptr || !method_ptr->is_string() || (params_value && !params_value->is_list())) { LOG(ERROR) << "Invalid message was sent to embedder: " << message; return; } @@ -364,8 +362,8 @@ void DevToolsFrontendQt::HandleMessageFromDevToolsFrontend(base::Value message) if (!params_value) params_value = &empty_params; - int request_id = message.FindIntKey("id").value_or(0); - const std::string &method = *method_ptr; + int request_id = message.Find("id")->GetIfInt().value_or(0); + const std::string &method = *method_ptr->GetIfString(); base::Value::List *paramsPtr; if (params_value) paramsPtr = params_value->GetIfList(); @@ -378,7 +376,7 @@ void DevToolsFrontendQt::HandleMessageFromDevToolsFrontend(base::Value message) if (m_agentHost) m_agentHost->DispatchProtocolMessage(this, base::as_bytes(base::make_span(*protocol_message))); } else if (method == "loadCompleted") { - web_contents()->GetMainFrame()->ExecuteJavaScript(u"DevToolsAPI.setUseSoftMenu(true);", + web_contents()->GetPrimaryMainFrame()->ExecuteJavaScript(u"DevToolsAPI.setUseSoftMenu(true);", base::NullCallback()); } else if (method == "loadNetworkResource" && params.size() == 3) { // TODO(pfeldman): handle some of the embedder messages in content. @@ -458,8 +456,8 @@ void DevToolsFrontendQt::HandleMessageFromDevToolsFrontend(base::Value message) if (!m_prefStore->GetValue(kScreencastEnabled, NULL)) SetPreference(kScreencastEnabled, "false"); - m_preferences = std::move(*m_prefStore->GetValues()); - SendMessageAck(request_id, m_preferences.Clone()); + m_preferences = std::move(m_prefStore->GetValues()); + SendMessageAck(request_id, base::Value(m_preferences.Clone())); return; } else if (method == "setPreference" && params.size() >= 2) { const std::string *name = params[0].GetIfString(); @@ -628,7 +626,7 @@ void DevToolsFrontendQt::CallClientFunction(const std::string &object_name, } } } - web_contents()->GetMainFrame()->ExecuteJavaScriptMethod(base::ASCIIToUTF16(object_name), + web_contents()->GetPrimaryMainFrame()->ExecuteJavaScriptMethod(base::ASCIIToUTF16(object_name), base::ASCIIToUTF16(method_name), std::move(arguments), std::move(cb)); diff --git a/src/core/devtools_frontend_qt.h b/src/core/devtools_frontend_qt.h index e0ec993e2..5c1237bbc 100644 --- a/src/core/devtools_frontend_qt.h +++ b/src/core/devtools_frontend_qt.h @@ -67,7 +67,7 @@ protected: void DispatchProtocolMessage(content::DevToolsAgentHost* agent_host, base::span<const uint8_t> message) override; void SetPreferences(const std::string& json); - void HandleMessageFromDevToolsFrontend(base::Value message); + void HandleMessageFromDevToolsFrontend(base::Value::Dict message); private: // WebContentsObserver overrides @@ -115,7 +115,7 @@ private: class NetworkResourceLoader; std::set<std::unique_ptr<NetworkResourceLoader>, base::UniquePtrComparator> m_loaders; - base::DictionaryValue m_preferences; + base::Value::Dict m_preferences; scoped_refptr<PersistentPrefStore> m_prefStore; base::WeakPtrFactory<DevToolsFrontendQt> m_weakFactory; }; diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp index 33783769d..3823268fb 100644 --- a/src/core/download_manager_delegate_qt.cpp +++ b/src/core/download_manager_delegate_qt.cpp @@ -56,7 +56,6 @@ void DownloadManagerDelegateQt::cancelDownload(content::DownloadTargetCallback c base::FilePath(), base::FilePath(), std::string(), - absl::nullopt, download::DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED); } @@ -99,7 +98,6 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem * item->GetForcedFilePath(), item->GetFileNameToReportUser(), item->GetMimeType(), - absl::nullopt, download::DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_NONE); return true; } @@ -193,7 +191,6 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem * filePathForCallback.AddExtension(toFilePathString("download")), base::FilePath(), item->GetMimeType(), - absl::nullopt, download::DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_NONE); } else cancelDownload(std::move(*callback)); diff --git a/src/core/extensions/pdf_iframe_navigation_throttle_qt.cpp b/src/core/extensions/pdf_iframe_navigation_throttle_qt.cpp index f09954bd8..5a93b4b84 100644 --- a/src/core/extensions/pdf_iframe_navigation_throttle_qt.cpp +++ b/src/core/extensions/pdf_iframe_navigation_throttle_qt.cpp @@ -69,12 +69,12 @@ bool IsPDFPluginEnabled(content::NavigationHandle *navigation_handle, bool *is_s if (web_contents->IsInnerWebContentsForGuest()) web_contents = web_contents->GetOuterWebContents(); - int process_id = web_contents->GetMainFrame()->GetProcess()->GetID(); - int routing_id = web_contents->GetMainFrame()->GetRoutingID(); + int process_id = web_contents->GetPrimaryMainFrame()->GetProcess()->GetID(); + int routing_id = web_contents->GetPrimaryMainFrame()->GetRoutingID(); content::WebPluginInfo plugin_info; // Will check WebEngineSettings by PluginServiceFilterQt return content::PluginService::GetInstance()->GetPluginInfo( - process_id, routing_id, navigation_handle->GetURL(), + process_id, routing_id, nullptr, navigation_handle->GetURL(), kPDFMimeType, false /* allow_wildcard */, is_stale, &plugin_info, nullptr /* actual_mime_type */); @@ -85,12 +85,12 @@ std::string GetPDFPlaceholderHTML(const GURL &pdf_url) std::string template_html = ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(IDR_PDF_PLUGIN_HTML); webui::AppendWebUiCssTextDefaults(&template_html); - base::DictionaryValue values; - values.SetString("fileName", pdf_url.ExtractFileName()); - values.SetString("open", l10n_util::GetStringUTF8(IDS_ACCNAME_OPEN)); - values.SetString("pdfUrl", pdf_url.spec()); + base::Value::Dict values; + values.Set("fileName", pdf_url.ExtractFileName()); + values.Set("open", l10n_util::GetStringUTF8(IDS_ACCNAME_OPEN)); + values.Set("pdfUrl", pdf_url.spec()); - return webui::GetI18nTemplateHtml(template_html, &values); + return webui::GetI18nTemplateHtml(template_html, std::move(values)); } // static diff --git a/src/core/extensions/plugin_service_filter_qt.cpp b/src/core/extensions/plugin_service_filter_qt.cpp index 9c66ea6c3..1f6c606bc 100644 --- a/src/core/extensions/plugin_service_filter_qt.cpp +++ b/src/core/extensions/plugin_service_filter_qt.cpp @@ -18,11 +18,12 @@ PluginServiceFilterQt *PluginServiceFilterQt::GetInstance() return base::Singleton<PluginServiceFilterQt>::get(); } -bool PluginServiceFilterQt::IsPluginAvailable(int render_process_id, - int render_frame_id, +bool PluginServiceFilterQt::IsPluginAvailable(int render_process_id, int render_frame_id, + content::BrowserContext *browser_context, const content::WebPluginInfo &plugin) { Q_UNUSED(plugin); + Q_UNUSED(browser_context); content::RenderFrameHost *frame_host = content::RenderFrameHost::FromID(render_process_id, render_frame_id); content::WebContents *web_contents = content::WebContents::FromRenderFrameHost(frame_host); if (!web_contents) { diff --git a/src/core/extensions/plugin_service_filter_qt.h b/src/core/extensions/plugin_service_filter_qt.h index e26a71d68..d171edfde 100644 --- a/src/core/extensions/plugin_service_filter_qt.h +++ b/src/core/extensions/plugin_service_filter_qt.h @@ -14,8 +14,8 @@ class PluginServiceFilterQt : public content::PluginServiceFilter { public: static PluginServiceFilterQt* GetInstance(); - bool IsPluginAvailable(int render_process_id, - int render_frame_id, + bool IsPluginAvailable(int render_process_id, int render_frame_id, + content::BrowserContext *browser_context, const content::WebPluginInfo &plugin) override; bool CanLoadPlugin(int render_process_id, diff --git a/src/core/favicon_service_factory_qt.cpp b/src/core/favicon_service_factory_qt.cpp index 6963f7e9b..d76bfab11 100644 --- a/src/core/favicon_service_factory_qt.cpp +++ b/src/core/favicon_service_factory_qt.cpp @@ -41,6 +41,10 @@ std::unique_ptr<history::HistoryBackendClient> HistoryClientQt::CreateBackendCli return nullptr; } +void HistoryClientQt::UpdateBookmarkLastUsedTime(int64_t /*bookmark_node_id*/, base::Time /*time*/) +{ +} + // static history::HistoryService * HistoryServiceFactoryQt::GetForBrowserContext(content::BrowserContext *context) diff --git a/src/core/favicon_service_factory_qt.h b/src/core/favicon_service_factory_qt.h index 2816140ba..44a43211e 100644 --- a/src/core/favicon_service_factory_qt.h +++ b/src/core/favicon_service_factory_qt.h @@ -51,6 +51,7 @@ public: bool CanAddURL(const GURL &url) override; void NotifyProfileError(sql::InitStatus init_status, const std::string &diagnostics) override; std::unique_ptr<history::HistoryBackendClient> CreateBackendClient() override; + void UpdateBookmarkLastUsedTime(int64_t bookmark_node_id, base::Time time) override; }; class HistoryServiceFactoryQt : public BrowserContextKeyedServiceFactory 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 7377cea75..6144aa9ea 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 @@ -256,13 +256,14 @@ FileSystemAccessPermissionContextQt::GetWritePermissionGrant(const url::Origin & return existing_grant; } -void FileSystemAccessPermissionContextQt::ConfirmSensitiveDirectoryAccess( +void FileSystemAccessPermissionContextQt::ConfirmSensitiveEntryAccess( const url::Origin &origin, PathType path_type, const base::FilePath &path, - HandleType handle_type, content::GlobalRenderFrameHostId frame_id, - base::OnceCallback<void(SensitiveDirectoryResult)> callback) + HandleType handle_type, ui::SelectFileDialog::Type dialog_type, + content::GlobalRenderFrameHostId frame_id, + base::OnceCallback<void(SensitiveEntryResult)> callback) { if (path_type == PathType::kExternal) { - std::move(callback).Run(SensitiveDirectoryResult::kAllowed); + std::move(callback).Run(SensitiveEntryResult::kAllowed); return; } @@ -270,7 +271,7 @@ void FileSystemAccessPermissionContextQt::ConfirmSensitiveDirectoryAccess( FROM_HERE, { base::MayBlock(), base::TaskPriority::USER_VISIBLE }, base::BindOnce(&ShouldBlockAccessToPath, path, handle_type), base::BindOnce(&FileSystemAccessPermissionContextQt::DidConfirmSensitiveDirectoryAccess, - m_weakFactory.GetWeakPtr(), origin, path, handle_type, frame_id, + m_weakFactory.GetWeakPtr(), origin, path, handle_type, dialog_type, frame_id, std::move(callback))); } @@ -377,19 +378,20 @@ void FileSystemAccessPermissionContextQt::NavigatedAwayFromOrigin(const url::Ori } void FileSystemAccessPermissionContextQt::DidConfirmSensitiveDirectoryAccess( - const url::Origin &origin, const base::FilePath &path, HandleType handle_type, + const url::Origin &origin, const base::FilePath &path, HandleType handle_type, ui::SelectFileDialog::Type dialog_type, content::GlobalRenderFrameHostId frame_id, - base::OnceCallback<void(SensitiveDirectoryResult)> callback, bool should_block) + base::OnceCallback<void(SensitiveEntryResult)> callback, bool should_block) { Q_UNUSED(origin); Q_UNUSED(path); Q_UNUSED(handle_type); + Q_UNUSED(dialog_type); Q_UNUSED(frame_id); if (should_block) - std::move(callback).Run(SensitiveDirectoryResult::kAbort); + std::move(callback).Run(SensitiveEntryResult::kAbort); else - std::move(callback).Run(SensitiveDirectoryResult::kAllowed); + std::move(callback).Run(SensitiveEntryResult::kAllowed); } std::u16string FileSystemAccessPermissionContextQt::GetPickerTitle(const blink::mojom::FilePickerOptionsPtr &) 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 d2894cc5f..affe141bc 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 @@ -36,10 +36,11 @@ public: scoped_refptr<content::FileSystemAccessPermissionGrant> GetWritePermissionGrant(const url::Origin &origin, const base::FilePath &path, HandleType handle_type, UserAction user_action) override; - void ConfirmSensitiveDirectoryAccess( + void ConfirmSensitiveEntryAccess( const url::Origin &origin, PathType path_type, const base::FilePath &path, - HandleType handle_type, content::GlobalRenderFrameHostId frame_id, - base::OnceCallback<void(SensitiveDirectoryResult)> callback) override; + HandleType handle_type, ui::SelectFileDialog::Type dialog_type, + content::GlobalRenderFrameHostId frame_id, + base::OnceCallback<void(SensitiveEntryResult)> callback) override; void PerformAfterWriteChecks(std::unique_ptr<content::FileSystemAccessWriteItem> item, content::GlobalRenderFrameHostId frame_id, base::OnceCallback<void(AfterWriteCheckResult)> callback) override; @@ -60,8 +61,8 @@ private: void DidConfirmSensitiveDirectoryAccess( const url::Origin &origin, const base::FilePath &path, HandleType handle_type, - content::GlobalRenderFrameHostId frame_id, - base::OnceCallback<void(SensitiveDirectoryResult)> callback, bool should_block); + ui::SelectFileDialog::Type dialog_type, content::GlobalRenderFrameHostId frame_id, + base::OnceCallback<void(SensitiveEntryResult)> callback, bool should_block); content::BrowserContext *m_profile; 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 423cdd777..c384dc7b3 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 @@ -153,7 +153,7 @@ void FileSystemAccessPermissionRequestManagerQt::DidFinishNavigation( if (!navigation->IsInMainFrame() || !navigation->HasCommitted()) return; - auto src_origin = url::Origin::Create(navigation->GetPreviousMainFrameURL()); + auto src_origin = url::Origin::Create(navigation->GetPreviousPrimaryMainFrameURL()); auto dest_origin = url::Origin::Create(navigation->GetURL()); if (src_origin == dest_origin) return; @@ -168,7 +168,7 @@ void FileSystemAccessPermissionRequestManagerQt::DidFinishNavigation( void FileSystemAccessPermissionRequestManagerQt::WebContentsDestroyed() { - auto src_origin = web_contents()->GetMainFrame()->GetLastCommittedOrigin(); + auto src_origin = web_contents()->GetPrimaryMainFrame()->GetLastCommittedOrigin(); // Navigated away from |src_origin|, tell permission context to check if // permissions need to be revoked. diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp index a2840b37a..f8baf72a5 100644 --- a/src/core/media_capture_devices_dispatcher.cpp +++ b/src/core/media_capture_devices_dispatcher.cpp @@ -538,7 +538,7 @@ void MediaCaptureDevicesDispatcher::processDesktopCaptureAccessRequest(content:: content::WebContents *const web_contents_for_stream = content::WebContents::FromRenderFrameHost( content::RenderFrameHost::FromID(request.render_process_id, request.render_frame_id)); - content::RenderFrameHost *const main_frame = web_contents_for_stream ? web_contents_for_stream->GetMainFrame() : NULL; + content::RenderFrameHost *const main_frame = web_contents_for_stream ? web_contents_for_stream->GetPrimaryMainFrame() : nullptr; content::DesktopMediaID mediaId; if (main_frame) { diff --git a/src/core/net/proxy_config_service_qt.cpp b/src/core/net/proxy_config_service_qt.cpp index 14514a615..fbd6aecaf 100644 --- a/src/core/net/proxy_config_service_qt.cpp +++ b/src/core/net/proxy_config_service_qt.cpp @@ -12,7 +12,6 @@ #include "base/bind.h" #include "components/proxy_config/pref_proxy_config_tracker_impl.h" #include "content/public/browser/browser_thread.h" -#include "net/proxy_resolution/configured_proxy_resolution_service.h" using content::BrowserThread; @@ -36,7 +35,7 @@ net::ProxyServer ProxyConfigServiceQt::fromQNetworkProxy(const QNetworkProxy &qt ProxyConfigServiceQt::ProxyConfigServiceQt(PrefService *prefService, const scoped_refptr<base::SequencedTaskRunner> &taskRunner) - : m_baseService(net::ConfiguredProxyResolutionService::CreateSystemProxyConfigService(taskRunner)) + : m_baseService(net::ProxyConfigService::CreateSystemProxyConfigService(taskRunner)) , m_usesSystemConfiguration(false) , m_registeredObserver(false) , m_prefState(prefService diff --git a/src/core/net/proxying_restricted_cookie_manager_qt.cpp b/src/core/net/proxying_restricted_cookie_manager_qt.cpp index 88ce07687..8608d35cd 100644 --- a/src/core/net/proxying_restricted_cookie_manager_qt.cpp +++ b/src/core/net/proxying_restricted_cookie_manager_qt.cpp @@ -120,7 +120,7 @@ void ProxyingRestrictedCookieManagerQt::SetCookieFromString(const GURL &url, underlying_restricted_cookie_manager_->SetCookieFromString(url, site_for_cookies, top_frame_origin, cookie, partitioned_cookies_runtime_feature_enabled, std::move(callback)); } else { - std::move(callback).Run(); + std::move(callback).Run(false, false); // FIXME: is true, true in aw_proxying_restricted_cookie_manager.cc though.. } } diff --git a/src/core/net/ssl_host_state_delegate_qt.cpp b/src/core/net/ssl_host_state_delegate_qt.cpp index 2c64132f3..d0308389d 100644 --- a/src/core/net/ssl_host_state_delegate_qt.cpp +++ b/src/core/net/ssl_host_state_delegate_qt.cpp @@ -39,7 +39,7 @@ SSLHostStateDelegateQt::SSLHostStateDelegateQt() {} SSLHostStateDelegateQt::~SSLHostStateDelegateQt() {} -void SSLHostStateDelegateQt::AllowCert(const std::string &host, const net::X509Certificate &cert, int error, content::WebContents *) +void SSLHostStateDelegateQt::AllowCert(const std::string &host, const net::X509Certificate &cert, int error, content::StoragePartition *) { m_certPolicyforHost[host].Allow(cert, error); } @@ -67,7 +67,7 @@ void SSLHostStateDelegateQt::Clear(base::RepeatingCallback<bool(const std::strin // prior to this query, otherwise false. content::SSLHostStateDelegate::CertJudgment SSLHostStateDelegateQt::QueryPolicy(const std::string &host, const net::X509Certificate &cert, - int error, content::WebContents *) + int error, content::StoragePartition *) { return m_certPolicyforHost[host].Check(cert, error) ? SSLHostStateDelegate::ALLOWED : SSLHostStateDelegate::DENIED; } @@ -83,12 +83,12 @@ bool SSLHostStateDelegateQt::DidHostRunInsecureContent(const std::string &host, return false; } -void SSLHostStateDelegateQt::AllowHttpForHost(const std::string &host, content::WebContents *web_contents) +void SSLHostStateDelegateQt::AllowHttpForHost(const std::string &host, content::StoragePartition *web_contents) { // Intentional no-op see aw_ssl_host_state_delegate } -bool SSLHostStateDelegateQt::IsHttpAllowedForHost(const std::string &host, content::WebContents *web_contents) +bool SSLHostStateDelegateQt::IsHttpAllowedForHost(const std::string &host, content::StoragePartition *web_contents) { return false; } @@ -104,7 +104,7 @@ void SSLHostStateDelegateQt::RevokeUserAllowExceptions(const std::string &host) // |host|. This does not mean that *all* certificate errors are allowed, just // that there exists an exception. To see if a particular certificate and // error combination exception is allowed, use QueryPolicy(). -bool SSLHostStateDelegateQt::HasAllowException(const std::string &host, content::WebContents *) +bool SSLHostStateDelegateQt::HasAllowException(const std::string &host, content::StoragePartition *) { auto policy_iterator = m_certPolicyforHost.find(host); return policy_iterator != m_certPolicyforHost.end() && diff --git a/src/core/net/ssl_host_state_delegate_qt.h b/src/core/net/ssl_host_state_delegate_qt.h index ff25a0587..380e59f2c 100644 --- a/src/core/net/ssl_host_state_delegate_qt.h +++ b/src/core/net/ssl_host_state_delegate_qt.h @@ -32,15 +32,15 @@ public: ~SSLHostStateDelegateQt(); // content::SSLHostStateDelegate implementation: - void AllowCert(const std::string &, const net::X509Certificate &cert, int error, content::WebContents *web_contents) override; + void AllowCert(const std::string &, const net::X509Certificate &cert, int error, content::StoragePartition *storage_partition) override; void Clear(base::RepeatingCallback<bool(const std::string&)> host_filter) override; - CertJudgment QueryPolicy(const std::string &host, const net::X509Certificate &cert, int error, content::WebContents *web_contents) override; + CertJudgment QueryPolicy(const std::string &host, const net::X509Certificate &cert, int error, content::StoragePartition *web_contents) override; void HostRanInsecureContent(const std::string &host, int child_id, InsecureContentType content_type) override; bool DidHostRunInsecureContent(const std::string &host, int child_id, InsecureContentType content_type) override; - void AllowHttpForHost(const std::string &host, content::WebContents *web_contents) override; - bool IsHttpAllowedForHost(const std::string &host, content::WebContents *web_contents) override; + void AllowHttpForHost(const std::string &host, content::StoragePartition *web_contents) override; + bool IsHttpAllowedForHost(const std::string &host, content::StoragePartition *web_contents) override; void RevokeUserAllowExceptions(const std::string &host) override; - bool HasAllowException(const std::string &host, content::WebContents *web_contents) override; + bool HasAllowException(const std::string &host, content::StoragePartition *web_contents) override; private: std::map<std::string, CertPolicy> m_certPolicyforHost; diff --git a/src/core/ozone/gl_ozone_egl_qt.cpp b/src/core/ozone/gl_ozone_egl_qt.cpp index efb1dd962..c0348e833 100644 --- a/src/core/ozone/gl_ozone_egl_qt.cpp +++ b/src/core/ozone/gl_ozone_egl_qt.cpp @@ -55,21 +55,24 @@ gl::GLDisplay *GLOzoneEGLQt::InitializeGLOneOffPlatform(uint64_t system_device_i bool GLOzoneEGLQt::InitializeExtensionSettingsOneOffPlatform(gl::GLDisplay *display) { + Q_UNUSED(display); return gl::GLSurfaceEGLQt::InitializeExtensionSettingsOneOff(); } -scoped_refptr<gl::GLSurface> GLOzoneEGLQt::CreateViewGLSurface(gfx::AcceleratedWidget window) +scoped_refptr<gl::GLSurface> GLOzoneEGLQt::CreateViewGLSurface(gl::GLDisplay* display, gfx::AcceleratedWidget window) { + Q_UNUSED(display); + Q_UNUSED(window); return nullptr; } -scoped_refptr<gl::GLSurface> GLOzoneEGLQt::CreateOffscreenGLSurface(const gfx::Size &size) +scoped_refptr<gl::GLSurface> GLOzoneEGLQt::CreateOffscreenGLSurface(gl::GLDisplay* display, const gfx::Size &size) { - scoped_refptr<gl::GLSurface> surface = new gl::GLSurfaceEGLQt(size); + scoped_refptr<gl::GLSurface> surface = new gl::GLSurfaceEGLQt(static_cast<gl::GLDisplayEGL*>(display), size); if (surface->Initialize(gl::GLSurfaceFormat())) return surface; - surface = new gl::GLSurfacelessQtEGL(size); + surface = new gl::GLSurfacelessQtEGL(static_cast<gl::GLDisplayEGL*>(display), size); if (surface->Initialize(gl::GLSurfaceFormat())) return surface; diff --git a/src/core/ozone/gl_ozone_egl_qt.h b/src/core/ozone/gl_ozone_egl_qt.h index 59f25a724..4619fc714 100644 --- a/src/core/ozone/gl_ozone_egl_qt.h +++ b/src/core/ozone/gl_ozone_egl_qt.h @@ -15,9 +15,11 @@ public: gl::GLDisplay *InitializeGLOneOffPlatform(uint64_t system_device_id) override; bool InitializeExtensionSettingsOneOffPlatform(gl::GLDisplay *display) override; scoped_refptr<gl::GLSurface> CreateViewGLSurface( + gl::GLDisplay *display, gfx::AcceleratedWidget window) override; scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface( - const gfx::Size& size) override; + gl::GLDisplay *display, + const gfx::Size &size) override; protected: // Returns native platform display handle. This is used to obtain the EGL diff --git a/src/core/ozone/gl_ozone_glx_qt.cpp b/src/core/ozone/gl_ozone_glx_qt.cpp index fa42facac..c610862f6 100644 --- a/src/core/ozone/gl_ozone_glx_qt.cpp +++ b/src/core/ozone/gl_ozone_glx_qt.cpp @@ -82,16 +82,19 @@ scoped_refptr<gl::GLContext> GLOzoneGLXQt::CreateGLContext( } scoped_refptr<gl::GLSurface> GLOzoneGLXQt::CreateViewGLSurface( + gl::GLDisplay* display, gfx::AcceleratedWidget window) { return nullptr; } scoped_refptr<gl::GLSurface> GLOzoneGLXQt::CreateSurfacelessViewGLSurface( + gl::GLDisplay* display, gfx::AcceleratedWidget window) { return nullptr; } scoped_refptr<gl::GLSurface> GLOzoneGLXQt::CreateOffscreenGLSurface( + gl::GLDisplay* display, const gfx::Size& size) { scoped_refptr<gl::GLSurface> surface = new gl::GLSurfaceGLXQt(size); if (surface->Initialize(gl::GLSurfaceFormat())) @@ -100,6 +103,18 @@ scoped_refptr<gl::GLSurface> GLOzoneGLXQt::CreateOffscreenGLSurface( return nullptr; } +bool GLOzoneGLXQt::CanImportNativePixmap() +{ + return false; +} + +std::unique_ptr<ui::NativePixmapGLBinding> GLOzoneGLXQt::ImportNativePixmap( + scoped_refptr<gfx::NativePixmap>, gfx::BufferFormat, gfx::BufferPlane, + gfx::Size, const gfx::ColorSpace&, GLenum, GLuint) +{ + return nullptr; +} + bool GLOzoneGLXQt::InitializeExtensionSettingsOneOffPlatform(gl::GLDisplay *) { return gl::GLSurfaceGLXQt::InitializeExtensionSettingsOneOff(); diff --git a/src/core/ozone/gl_ozone_glx_qt.h b/src/core/ozone/gl_ozone_glx_qt.h index ca9ff47a3..777de352e 100644 --- a/src/core/ozone/gl_ozone_glx_qt.h +++ b/src/core/ozone/gl_ozone_glx_qt.h @@ -25,18 +25,26 @@ public: const gl::GLVersionInfo &gl_info, gl::GLWindowSystemBindingInfo *info) override; + bool CanImportNativePixmap() override; + std::unique_ptr<ui::NativePixmapGLBinding> ImportNativePixmap( + scoped_refptr<gfx::NativePixmap>, gfx::BufferFormat, gfx::BufferPlane, + gfx::Size, const gfx::ColorSpace&, GLenum, GLuint) override; + scoped_refptr<gl::GLContext> CreateGLContext( gl::GLShareGroup* share_group, gl::GLSurface* compatible_surface, const gl::GLContextAttribs& attribs) override; scoped_refptr<gl::GLSurface> CreateViewGLSurface( + gl::GLDisplay* display, gfx::AcceleratedWidget window) override; scoped_refptr<gl::GLSurface> CreateSurfacelessViewGLSurface( + gl::GLDisplay* display, gfx::AcceleratedWidget window) override; scoped_refptr<gl::GLSurface> CreateOffscreenGLSurface( + gl::GLDisplay* display, const gfx::Size& size) override; }; diff --git a/src/core/ozone/gl_surface_egl_qt.cpp b/src/core/ozone/gl_surface_egl_qt.cpp index 163d9242d..7f00ea6ed 100644 --- a/src/core/ozone/gl_surface_egl_qt.cpp +++ b/src/core/ozone/gl_surface_egl_qt.cpp @@ -8,13 +8,14 @@ #include "gl_context_qt.h" #include "ozone/gl_surface_egl_qt.h" -#if !BUILDFLAG(IS_MAC) #include "ui/gl/egl_util.h" #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_display.h" +#include "ui/gl/gl_display_manager.h" #include "ui/gl/gl_surface_egl.h" #include "ui/gl/init/gl_factory.h" +#if !BUILDFLAG(IS_MAC) // From ANGLE's egl/eglext.h. #ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle #define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 @@ -25,157 +26,69 @@ using ui::GetLastEGLErrorString; namespace gl { -bool GLSurfaceEGL::InitializeExtensionSettingsOneOff(GLDisplayEGL* display) +bool GLDisplayEGL::InitializeExtensionSettings() { return GLSurfaceEGLQt::InitializeExtensionSettingsOneOff(); } -EGLDisplay GLDisplayEGL::GetHardwareDisplay() -{ - return GLSurfaceQt::g_display ? static_cast<EGLDisplay>(GLSurfaceQt::g_display->GetDisplay()) : EGL_NO_DISPLAY; -} - -bool GLDisplayEGL::IsCreateContextRobustnessSupported() +GLDisplayEGL *GLDisplayEGL::GetDisplayForCurrentContext() { - return GLContextHelper::isCreateContextRobustnessSupported() && HasEGLExtension("EGL_EXT_create_context_robustness"); + GLContext *context = GLContext::GetCurrent(); + return context ? context->GetGLDisplayEGL() : nullptr; } -bool GLDisplayEGL::IsCreateContextBindGeneratesResourceSupported() -{ - return false; -} - -bool GLDisplayEGL::IsCreateContextWebGLCompatabilitySupported() -{ - return false; -} bool GLDisplayEGL::IsEGLSurfacelessContextSupported() { return GLSurfaceEGLQt::g_egl_surfaceless_context_supported; } -bool GLDisplayEGL::IsEGLContextPrioritySupported() -{ - return false; -} - -bool GLDisplayEGL::IsRobustResourceInitSupported() -{ - return false; -} - -bool GLDisplayEGL::IsDisplayTextureShareGroupSupported() -{ - return false; -} - -bool GLDisplayEGL::IsCreateContextClientArraysSupported() -{ - return false; -} - -bool GLDisplayEGL::IsPixelFormatFloatSupported() -{ - return false; -} - -bool GLDisplayEGL::IsANGLEFeatureControlSupported() -{ - return false; -} - -bool GLDisplayEGL::IsANGLEPowerPreferenceSupported() -{ - return false; -} -bool GLDisplayEGL::IsANGLEExternalContextAndSurfaceSupported() -{ - return false; -} - -bool GLDisplayEGL::IsDisplaySemaphoreShareGroupSupported() -{ - return false; -} - -bool GLDisplayEGL::IsRobustnessVideoMemoryPurgeSupported() -{ - return false; -} - -bool GLDisplayEGL::IsANGLEContextVirtualizationSupported() +bool GLDisplayEGL::IsEGLContextPrioritySupported() { return false; } -bool GLDisplayEGL::IsANGLEVulkanImageSupported() -{ - return false; -} - -bool GLDisplayEGL::IsEGLQueryDeviceSupported() +bool GLDisplayEGL::Initialize(gl::EGLDisplayPlatform native_display) { - return false; -} + auto glDisplay = GLSurfaceEGLQt::InitializeOneOff(0); -void GLSurfaceEGL::ShutdownOneOff(GLDisplayEGL *) -{ -} - -const char *GetEGLClientExtensions() -{ - return GLSurfaceQt::g_client_extensions.c_str(); -} - -const char *GetEGLExtensions() -{ - return GLSurfaceQt::g_extensions.c_str(); -} - -bool GLDisplayEGL::HasEGLClientExtension(const char *name) -{ - return GLSurface::ExtensionsContain(GetEGLClientExtensions(), name); -} - -bool GLDisplayEGL::HasEGLExtension(const char *name) -{ - return GLSurface::ExtensionsContain(GetEGLExtensions(), name); -} + if (glDisplay) { + display_ = glDisplay->GetDisplay(); + native_display_ = native_display; + } -GLDisplayEGL *GLSurfaceEGL::InitializeOneOff(gl::EGLDisplayPlatform /*native_display*/, uint64_t system_id) -{ - return static_cast<GLDisplayEGL *>(GLSurfaceEGLQt::InitializeOneOff(system_id)); + return glDisplay; } -bool GLDisplayEGL::IsEGLNoConfigContextSupported() +bool GLDisplayEGL::IsAndroidNativeFenceSyncSupported() { return false; } -bool GLDisplayEGL::IsAndroidNativeFenceSyncSupported() +// static +GLDisplayEGL *GLSurfaceEGL::GetGLDisplayEGL() { - return false; + return GLDisplayManagerEGL::GetInstance()->GetDisplay(GpuPreference::kDefault); } -GLDisplayEGL *GLSurfaceEGL::GetGLDisplayEGL() +DisplayType GLDisplayEGL::GetDisplayType() const { - return static_cast<GLDisplayEGL *>(GLSurfaceEGLQt::g_display); + return DisplayType::DEFAULT; } -DisplayType GLDisplayEGL::GetDisplayType() +EGLDisplayPlatform GLDisplayEGL::GetNativeDisplay() const { - return DisplayType::DEFAULT; + return native_display_; } -GLSurface *GLSurfaceEGL::createSurfaceless(const gfx::Size& size) +GLSurface *GLSurfaceEGL::createSurfaceless(gl::GLDisplayEGL *display, const gfx::Size& size) { - return new GLSurfacelessQtEGL(size); + return new GLSurfacelessQtEGL(display, size); } bool GLSurfaceEGLQt::g_egl_surfaceless_context_supported = false; bool GLSurfaceEGLQt::s_initialized = false; -GLSurfaceEGLQt::GLSurfaceEGLQt(const gfx::Size& size) +GLSurfaceEGLQt::GLSurfaceEGLQt(gl::GLDisplayEGL *display, const gfx::Size& size) : GLSurfaceQt(size), m_surfaceBuffer(0) { @@ -191,10 +104,10 @@ gl::GLDisplay *GLSurfaceEGLQt::InitializeOneOff(uint64_t system_device_id) if (s_initialized) return g_display; - auto *egl_display = new GLDisplayEGL(system_device_id); + auto *egl_display = GLDisplayManagerEGL::GetInstance()->GetDisplay(system_device_id); g_display = egl_display; egl_display->SetDisplay(GLContextHelper::getEGLDisplay()); - if (!g_display->GetDisplay()) { + if (!egl_display->GetDisplay()) { LOG(ERROR) << "GLContextHelper::getEGLDisplay() failed."; return nullptr; } @@ -205,16 +118,16 @@ gl::GLDisplay *GLSurfaceEGLQt::InitializeOneOff(uint64_t system_device_id) return nullptr; } - if (!eglInitialize(g_display->GetDisplay(), NULL, NULL)) { + if (!eglInitialize(egl_display->GetDisplay(), NULL, NULL)) { LOG(ERROR) << "eglInitialize failed with error " << GetLastEGLErrorString(); return nullptr; } g_client_extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); - g_extensions = eglQueryString(g_display->GetDisplay(), EGL_EXTENSIONS); + g_extensions = eglQueryString(egl_display->GetDisplay(), EGL_EXTENSIONS); g_egl_surfaceless_context_supported = ExtensionsContain(g_extensions.c_str(), "EGL_KHR_surfaceless_context"); if (g_egl_surfaceless_context_supported) { - scoped_refptr<GLSurface> surface = new GLSurfacelessQtEGL(gfx::Size(1, 1)); + scoped_refptr<GLSurface> surface = new GLSurfacelessQtEGL(egl_display, gfx::Size(1, 1)); gl::GLContextAttribs attribs; scoped_refptr<GLContext> context = init::CreateGLContext( NULL, surface.get(), attribs); @@ -231,7 +144,7 @@ gl::GLDisplay *GLSurfaceEGLQt::InitializeOneOff(uint64_t system_device_id) } s_initialized = true; - return g_display; + return egl_display; } bool GLSurfaceEGLQt::InitializeExtensionSettingsOneOff() @@ -244,7 +157,7 @@ bool GLSurfaceEGLQt::Initialize(GLSurfaceFormat format) Q_ASSERT(!m_surfaceBuffer); m_format = format; - EGLDisplay display = g_display->GetDisplay(); + EGLDisplay display = GLContextHelper::getEGLDisplay(); if (!display) { LOG(ERROR) << "Trying to create surface with invalid display."; return false; @@ -272,7 +185,7 @@ bool GLSurfaceEGLQt::Initialize(GLSurfaceFormat format) void GLSurfaceEGLQt::Destroy() { if (m_surfaceBuffer) { - if (!eglDestroySurface(g_display->GetDisplay(), m_surfaceBuffer)) + if (!eglDestroySurface(GLContextHelper::getEGLDisplay(), m_surfaceBuffer)) LOG(ERROR) << "eglDestroySurface failed with error " << GetLastEGLErrorString(); m_surfaceBuffer = 0; @@ -310,7 +223,7 @@ void* GLSurfaceEGLQt::GetHandle() return reinterpret_cast<void*>(m_surfaceBuffer); } -GLSurfacelessQtEGL::GLSurfacelessQtEGL(const gfx::Size& size) +GLSurfacelessQtEGL::GLSurfacelessQtEGL(GLDisplayEGL *display, const gfx::Size& size) : GLSurfaceQt(size) { } diff --git a/src/core/ozone/gl_surface_egl_qt.h b/src/core/ozone/gl_surface_egl_qt.h index 2444ebd4a..71992e700 100644 --- a/src/core/ozone/gl_surface_egl_qt.h +++ b/src/core/ozone/gl_surface_egl_qt.h @@ -10,9 +10,11 @@ namespace gl { +class GLDisplayEGL; + class GLSurfaceEGLQt: public GLSurfaceQt { public: - explicit GLSurfaceEGLQt(const gfx::Size& size); + explicit GLSurfaceEGLQt(gl::GLDisplayEGL *display, const gfx::Size& size); static gl::GLDisplay *InitializeOneOff(uint64_t system_device_id); static bool InitializeExtensionSettingsOneOff(); @@ -42,7 +44,7 @@ private: class GLSurfacelessQtEGL : public GLSurfaceQt { public: - explicit GLSurfacelessQtEGL(const gfx::Size& size); + explicit GLSurfacelessQtEGL(gl::GLDisplayEGL *display, const gfx::Size& size); public: bool Initialize(GLSurfaceFormat format) override; diff --git a/src/core/ozone/gl_surface_glx_qt.cpp b/src/core/ozone/gl_surface_glx_qt.cpp index 1028f3235..21de815a8 100644 --- a/src/core/ozone/gl_surface_glx_qt.cpp +++ b/src/core/ozone/gl_surface_glx_qt.cpp @@ -7,8 +7,10 @@ #include "gl_context_qt.h" #include "ozone/gl_surface_glx_qt.h" + #include "ui/gl/gl_bindings.h" #include "ui/gl/gl_display.h" +#include "ui/gl/gl_display_manager.h" #include "ui/gl/gl_surface_glx.h" namespace gl { @@ -91,7 +93,7 @@ GLDisplay *GLSurfaceGLXQt::InitializeOneOff(uint64_t system_device_id) if (s_initialized) return g_display; - g_display = new GLDisplayX11(system_device_id); + g_display = GLDisplayManagerX11::GetInstance()->GetDisplay(system_device_id); if (!g_display->GetDisplay()) { LOG(ERROR) << "GLContextHelper::getXDisplay() failed."; return nullptr; diff --git a/src/core/ozone/gl_surface_qt.cpp b/src/core/ozone/gl_surface_qt.cpp index 0d7f686e8..2e76110f9 100644 --- a/src/core/ozone/gl_surface_qt.cpp +++ b/src/core/ozone/gl_surface_qt.cpp @@ -88,17 +88,18 @@ void* GLSurfaceQt::GetConfig() #if BUILDFLAG(IS_WIN) namespace init { -bool InitializeGLOneOffPlatform(uint64_t system_device_id) + +gl::GLDisplay *InitializeGLOneOffPlatform(uint64_t system_device_id) { VSyncProviderWin::InitializeOneOff(); if (GetGLImplementation() == kGLImplementationEGLGLES2 || GetGLImplementation() == kGLImplementationEGLANGLE) - return GLSurfaceEGLQt::InitializeOneOff(); + return GLSurfaceEGLQt::InitializeOneOff(system_device_id); if (GetGLImplementation() == kGLImplementationDesktopGL || GetGLImplementation() == kGLImplementationDesktopGLCoreProfile) - return GLSurfaceWGLQt::InitializeOneOff(); + return GLSurfaceWGLQt::InitializeOneOff(system_device_id); - return false; + return nullptr; } bool usingSoftwareDynamicGL() @@ -111,7 +112,7 @@ bool usingSoftwareDynamicGL() } scoped_refptr<GLSurface> -CreateOffscreenGLSurfaceWithFormat(const gfx::Size& size, GLSurfaceFormat format) +CreateOffscreenGLSurfaceWithFormat(GLDisplay *display, const gfx::Size& size, GLSurfaceFormat format) { scoped_refptr<GLSurface> surface; switch (GetGLImplementation()) { @@ -124,7 +125,7 @@ CreateOffscreenGLSurfaceWithFormat(const gfx::Size& size, GLSurfaceFormat format } case kGLImplementationEGLANGLE: case kGLImplementationEGLGLES2: { - surface = new GLSurfaceEGLQt(size); + surface = new GLSurfaceEGLQt(static_cast<gl::GLDisplayEGL*>(display), size); if (surface->Initialize(format)) return surface; @@ -132,7 +133,7 @@ CreateOffscreenGLSurfaceWithFormat(const gfx::Size& size, GLSurfaceFormat format // is not available since some implementations of surfaceless context // have problems. (e.g. QTBUG-57290) if (GLSurfaceEGLQt::g_egl_surfaceless_context_supported) { - surface = new GLSurfacelessQtEGL(size); + surface = new GLSurfacelessQtEGL(static_cast<gl::GLDisplayEGL*>(display), size); if (surface->Initialize(format)) return surface; } @@ -163,59 +164,14 @@ CreateViewGLSurface(gfx::AcceleratedWidget window) namespace gpu { class GpuCommandBufferStub; class GpuChannelManager; -scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(base::WeakPtr<ImageTransportSurfaceDelegate>, +scoped_refptr<gl::GLSurface> ImageTransportSurface::CreateNativeSurface(gl::GLDisplay *, + base::WeakPtr<ImageTransportSurfaceDelegate>, SurfaceHandle, gl::GLSurfaceFormat) { QT_NOT_USED return scoped_refptr<gl::GLSurface>(); } } // namespace gpu - -namespace gl { - -bool DirectCompositionSurfaceWin::IsDirectCompositionSupported() -{ - return false; -} - -bool DirectCompositionSurfaceWin::IsDecodeSwapChainSupported() -{ - return false; -} - -bool DirectCompositionSurfaceWin::IsHDRSupported() -{ - return false; -} - -bool DirectCompositionSurfaceWin::IsSwapChainTearingSupported() -{ - return false; -} - -bool DirectCompositionSurfaceWin::AreOverlaysSupported() -{ - return false; -} - -UINT DirectCompositionSurfaceWin::GetOverlaySupportFlags(DXGI_FORMAT format) -{ - Q_UNUSED(format); - return 0; -} - -void DirectCompositionSurfaceWin::DisableDecodeSwapChain() -{ -} - -void DirectCompositionSurfaceWin::DisableSoftwareOverlays() -{ -} - -void DirectCompositionSurfaceWin::ShutdownOneOff() -{ -} - -} // namespace gl #endif // BUILDFLAG(IS_WIN) + #endif // !defined(Q_OS_MACOS) diff --git a/src/core/ozone/gl_surface_wgl_qt.cpp b/src/core/ozone/gl_surface_wgl_qt.cpp index 57493c14a..0788a04c1 100644 --- a/src/core/ozone/gl_surface_wgl_qt.cpp +++ b/src/core/ozone/gl_surface_wgl_qt.cpp @@ -4,6 +4,7 @@ #include "gl_surface_wgl_qt.h" #if BUILDFLAG(IS_WIN) +#include "ui/gl/gl_display_manager.h" #include "ui/gl/gl_surface_wgl.h" namespace gl { @@ -19,9 +20,12 @@ GLSurfaceWGLQt::~GLSurfaceWGLQt() Destroy(); } -bool GLSurfaceWGLQt::InitializeOneOff() +gl::GLDisplay *GLSurfaceWGLQt::InitializeOneOff(uint64_t system_device_id) { - return GLSurfaceWGL::InitializeOneOff(); + if (GLSurfaceWGL::InitializeOneOff()) + return GLDisplayManagerWGL::GetInstance()->GetDisplay(GpuPreference::kDefault); + + return nullptr; } bool GLSurfaceWGLQt::Initialize(GLSurfaceFormat format) diff --git a/src/core/ozone/gl_surface_wgl_qt.h b/src/core/ozone/gl_surface_wgl_qt.h index e1a1253bb..5b671ebd9 100644 --- a/src/core/ozone/gl_surface_wgl_qt.h +++ b/src/core/ozone/gl_surface_wgl_qt.h @@ -16,7 +16,7 @@ class GLSurfaceWGLQt: public GLSurfaceQt { public: explicit GLSurfaceWGLQt(const gfx::Size& size); - static bool InitializeOneOff(); + static gl::GLDisplay *InitializeOneOff(uint64_t system_device_id); bool Initialize(GLSurfaceFormat format) override; void Destroy() override; diff --git a/src/core/ozone/ozone_platform_qt.cpp b/src/core/ozone/ozone_platform_qt.cpp index 71315a049..4971ef847 100644 --- a/src/core/ozone/ozone_platform_qt.cpp +++ b/src/core/ozone/ozone_platform_qt.cpp @@ -51,7 +51,7 @@ public: ui::InputController* GetInputController() override; std::unique_ptr<ui::SystemInputInjector> CreateSystemInputInjector() override; ui::OverlayManagerOzone* GetOverlayManager() override; - std::unique_ptr<InputMethod> CreateInputMethod(internal::InputMethodDelegate *delegate, gfx::AcceleratedWidget widget) override; + std::unique_ptr<InputMethod> CreateInputMethod(ImeKeyEventDispatcher *ime_key_event_dispatcher, gfx::AcceleratedWidget widget) override; std::unique_ptr<ui::PlatformScreen> CreateScreen() override { return nullptr; } const PlatformProperties &GetPlatformProperties() override; @@ -207,7 +207,7 @@ void OzonePlatformQt::InitializeGPU(const ui::OzonePlatform::InitParams &) surface_factory_ozone_.reset(new QtWebEngineCore::SurfaceFactoryQt()); } -std::unique_ptr<InputMethod> OzonePlatformQt::CreateInputMethod(internal::InputMethodDelegate *, gfx::AcceleratedWidget) +std::unique_ptr<InputMethod> OzonePlatformQt::CreateInputMethod(ImeKeyEventDispatcher *, gfx::AcceleratedWidget) { NOTREACHED(); return nullptr; diff --git a/src/core/ozone/platform_window_qt.cpp b/src/core/ozone/platform_window_qt.cpp index 4a6331c61..fe8a715ce 100644 --- a/src/core/ozone/platform_window_qt.cpp +++ b/src/core/ozone/platform_window_qt.cpp @@ -38,8 +38,10 @@ void PlatformWindowQt::SetBoundsInPixels(const gfx::Rect& bounds) { if (bounds == bounds_) return; + const bool origin_changed = (bounds_.origin() != bounds.origin()); + bounds_ = bounds; - delegate_->OnBoundsChanged(bounds); + delegate_->OnBoundsChanged({origin_changed}); } bool PlatformWindowQt::CanDispatchEvent(const ui::PlatformEvent& /*ne*/) diff --git a/src/core/permission_manager_qt.cpp b/src/core/permission_manager_qt.cpp index b5669eb66..9d98c0592 100644 --- a/src/core/permission_manager_qt.cpp +++ b/src/core/permission_manager_qt.cpp @@ -304,6 +304,16 @@ blink::mojom::PermissionStatus PermissionManagerQt::GetPermissionStatusForWorker return GetPermissionStatus(permission, url, url); } +content::PermissionResult PermissionManagerQt::GetPermissionResultForOriginWithoutContext( + blink::PermissionType permission, + const url::Origin &origin) +{ + blink::mojom::PermissionStatus status = + GetPermissionStatus(permission, origin.GetURL(), origin.GetURL()); + + return content::PermissionResult(status, content::PermissionStatusSource::UNSPECIFIED); +} + void PermissionManagerQt::ResetPermission( blink::PermissionType permission, const GURL& requesting_origin, diff --git a/src/core/permission_manager_qt.h b/src/core/permission_manager_qt.h index 00165d258..8778c538d 100644 --- a/src/core/permission_manager_qt.h +++ b/src/core/permission_manager_qt.h @@ -39,6 +39,8 @@ public: blink::mojom::PermissionStatus GetPermissionStatusForWorker(blink::PermissionType, content::RenderProcessHost *, const GURL &) override; + content::PermissionResult GetPermissionResultForOriginWithoutContext(blink::PermissionType, const url::Origin &) override; + void ResetPermission( blink::PermissionType permission, const GURL& requesting_origin, diff --git a/src/core/printing/pdf_web_contents_helper_client_qt.cpp b/src/core/printing/pdf_web_contents_helper_client_qt.cpp index 7c2a46ebf..cbeb7d112 100644 --- a/src/core/printing/pdf_web_contents_helper_client_qt.cpp +++ b/src/core/printing/pdf_web_contents_helper_client_qt.cpp @@ -43,7 +43,7 @@ PDFWebContentsHelperClientQt::~PDFWebContentsHelperClientQt() = default; content::RenderFrameHost *PDFWebContentsHelperClientQt::FindPdfFrame(content::WebContents *contents) { - content::RenderFrameHost *main_frame = contents->GetMainFrame(); + content::RenderFrameHost *main_frame = contents->GetPrimaryMainFrame(); content::RenderFrameHost *pdf_frame = FindPdfChildFrame(main_frame); return pdf_frame ? pdf_frame : main_frame; } diff --git a/src/core/printing/print_view_manager_base_qt.cpp b/src/core/printing/print_view_manager_base_qt.cpp index dcbf6a5bc..db557715a 100644 --- a/src/core/printing/print_view_manager_base_qt.cpp +++ b/src/core/printing/print_view_manager_base_qt.cpp @@ -188,9 +188,9 @@ void PrintViewManagerBaseQt::UpdatePrintingEnabled() #if QT_CONFIG(webengine_printing_and_pdf) enabled = true; #endif - web_contents()->ForEachFrame( - base::BindRepeating(&PrintViewManagerBaseQt::SendPrintingEnabled, - base::Unretained(this), enabled)); + web_contents()->ForEachRenderFrameHost( + base::BindRepeating(&PrintViewManagerBaseQt::SendPrintingEnabled, + base::Unretained(this), enabled)); } void PrintViewManagerBaseQt::NavigationStopped() @@ -395,8 +395,8 @@ bool PrintViewManagerBaseQt::RenderAllMissingPagesNow() // We can't print if there is no renderer. if (!web_contents() || - !web_contents()->GetMainFrame() || - !web_contents()->GetMainFrame()->IsRenderFrameLive()) { + !web_contents()->GetPrimaryMainFrame() || + !web_contents()->GetPrimaryMainFrame()->IsRenderFrameLive()) { return false; } diff --git a/src/core/printing/print_view_manager_qt.cpp b/src/core/printing/print_view_manager_qt.cpp index 37657df3a..d8b6f1c1f 100644 --- a/src/core/printing/print_view_manager_qt.cpp +++ b/src/core/printing/print_view_manager_qt.cpp @@ -238,7 +238,7 @@ bool PrintViewManagerQt::PrintToPDFInternal(const QPageLayout &pageLayout, if (web_contents()->IsCrashed()) return false; - content::RenderFrameHost* rfh = web_contents()->GetMainFrame(); + content::RenderFrameHost* rfh = web_contents()->GetPrimaryMainFrame(); GetPrintRenderFrame(rfh)->InitiatePrintPreview(mojo::PendingAssociatedRemote<printing::mojom::PrintRenderer>(), false); DCHECK(!m_printPreviewRfh); diff --git a/src/core/profile_qt.cpp b/src/core/profile_qt.cpp index 1355140e3..1e35f6966 100644 --- a/src/core/profile_qt.cpp +++ b/src/core/profile_qt.cpp @@ -72,10 +72,6 @@ ProfileQt::ProfileQt(ProfileAdapter *profileAdapter) setupPrefService(); -#if defined(Q_OS_WIN) - OSCrypt::Init(m_prefServiceAdapter.prefService()); -#endif - // Mark the context as live. This prevents the use-after-free DCHECK in // AssertBrowserContextWasntDestroyed from being triggered when a new // ProfileQt object is allocated at the same address as a previously @@ -221,6 +217,11 @@ content::StorageNotificationService *ProfileQt::GetStorageNotificationService() return nullptr; } +content::ReduceAcceptLanguageControllerDelegate *ProfileQt::GetReduceAcceptLanguageControllerDelegate() +{ + return nullptr; +} + #if QT_CONFIG(webengine_spellchecker) void ProfileQt::FailedToLoadDictionary(const std::string &language) { diff --git a/src/core/profile_qt.h b/src/core/profile_qt.h index d05998ea2..787c13148 100644 --- a/src/core/profile_qt.h +++ b/src/core/profile_qt.h @@ -57,6 +57,7 @@ public: std::string GetMediaDeviceIDSalt() override; content::FileSystemAccessPermissionContext *GetFileSystemAccessPermissionContext() override; std::string GetPushMessagingEndpoint() const override; + content::ReduceAcceptLanguageControllerDelegate *GetReduceAcceptLanguageControllerDelegate() override; // Profile implementation: PrefService *GetPrefs() override; diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index dfbbe72e7..0dd067cc5 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -46,12 +46,12 @@ #endif #if defined(USE_AURA) -#include "ui/aura/cursor/cursors_aura.h" +#include "ui/wm/core/cursors_aura.h" #include "ui/base/cursor/cursor_size.h" #endif #if defined(Q_OS_MACOS) -#include "content/app/resources/grit/content_resources.h" +#include "ui/resources/grit/ui_resources.h" #endif #include <QGuiApplication> @@ -419,7 +419,7 @@ bool RenderWidgetHostViewQt::updateCursorFromResource(ui::mojom::CursorType type #if defined(USE_AURA) gfx::Point hotspot; - if (!aura::GetCursorDataFor(ui::CursorSize::kNormal, type, hotspotDpr, &resourceId, &hotspot)) + if (!wm::GetCursorDataFor(ui::CursorSize::kNormal, type, hotspotDpr, &resourceId, &hotspot)) return false; hotX = hotspot.x(); hotY = hotspot.y(); @@ -903,7 +903,9 @@ void RenderWidgetHostViewQt::WheelEventAck(const blink::WebMouseWheelEvent &even } } -void RenderWidgetHostViewQt::GestureEventAck(const blink::WebGestureEvent &event, blink::mojom::InputEventResultState ack_result) +void RenderWidgetHostViewQt::GestureEventAck(const blink::WebGestureEvent &event, + blink::mojom::InputEventResultState ack_result, + blink::mojom::ScrollResultDataPtr scroll_result_data) { // Forward unhandled scroll events back as wheel events if (event.GetType() != blink::WebInputEvent::Type::kGestureScrollUpdate) diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h index bdc0efc24..a1addd1b6 100644 --- a/src/core/render_widget_host_view_qt.h +++ b/src/core/render_widget_host_view_qt.h @@ -94,7 +94,8 @@ public: void WheelEventAck(const blink::WebMouseWheelEvent &event, blink::mojom::InputEventResultState ack_result) override; void GestureEventAck(const blink::WebGestureEvent &event, - blink::mojom::InputEventResultState ack_result) override; + blink::mojom::InputEventResultState ack_result, + blink::mojom::ScrollResultDataPtr scroll_result_data) override; content::MouseWheelPhaseHandler *GetMouseWheelPhaseHandler() override; viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties(const cc::RenderFrameMetadata &metadata) override; void OnDidUpdateVisualPropertiesComplete(const cc::RenderFrameMetadata &metadata); diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp index cdb4fdf12..4c175768d 100644 --- a/src/core/renderer/content_renderer_client_qt.cpp +++ b/src/core/renderer/content_renderer_client_qt.cpp @@ -127,14 +127,17 @@ void ContentRendererClientQt::RenderThreadStarted() void ContentRendererClientQt::ExposeInterfacesToBrowser(mojo::BinderMap* binders) { - binders->Add(m_visitedLinkReader->GetBindCallback(), base::SequencedTaskRunnerHandle::Get()); + binders->Add<visitedlink::mojom::VisitedLinkNotificationSink>( + m_visitedLinkReader->GetBindCallback(), base::SequencedTaskRunnerHandle::Get()); - binders->Add(base::BindRepeating(&web_cache::WebCacheImpl::BindReceiver, - base::Unretained(m_webCacheImpl.get())), - base::SequencedTaskRunnerHandle::Get()); + binders->Add<web_cache::mojom::WebCache>( + base::BindRepeating(&web_cache::WebCacheImpl::BindReceiver, + base::Unretained(m_webCacheImpl.get())), + base::SequencedTaskRunnerHandle::Get()); #if QT_CONFIG(webengine_spellchecker) - binders->Add(base::BindRepeating( + binders->Add<spellcheck::mojom::SpellChecker>( + base::BindRepeating( [](ContentRendererClientQt *client, mojo::PendingReceiver<spellcheck::mojom::SpellChecker> receiver) { if (!client->m_spellCheck) @@ -145,7 +148,8 @@ void ContentRendererClientQt::ExposeInterfacesToBrowser(mojo::BinderMap* binders #endif #if QT_CONFIG(webengine_webrtc) && QT_CONFIG(webengine_extensions) - binders->Add(base::BindRepeating( + binders->Add<chrome::mojom::WebRtcLoggingAgent>( + base::BindRepeating( [](ContentRendererClientQt *client, mojo::PendingReceiver<chrome::mojom::WebRtcLoggingAgent> receiver) { client->GetWebRtcLoggingAgent()->AddReceiver(std::move(receiver)); @@ -179,9 +183,10 @@ void ContentRendererClientQt::RenderFrameCreated(content::RenderFrame *render_fr blink::AssociatedInterfaceRegistry *associated_interfaces = render_frame_observer->associatedInterfaces(); #if BUILDFLAG(ENABLE_EXTENSIONS) - associated_interfaces->AddInterface(base::BindRepeating( - &extensions::MimeHandlerViewContainerManager::BindReceiver, - render_frame->GetRoutingID())); + associated_interfaces->AddInterface<extensions::mojom::MimeHandlerViewContainerManager>( + base::BindRepeating( + &extensions::MimeHandlerViewContainerManager::BindReceiver, + render_frame->GetRoutingID())); auto registry = std::make_unique<service_manager::BinderRegistry>(); ExtensionsRendererClientQt::GetInstance()->RenderFrameCreated(render_frame, render_frame_observer->registry()); @@ -285,7 +290,7 @@ void ContentRendererClientQt::GetNavigationErrorStringsInternal(content::RenderF if (template_html.empty()) NOTREACHED() << "unable to load template. ID: " << resourceId; else // "t" is the id of the templates root node. - *errorHtml = webui::GetTemplatesHtml(template_html, &errorPageState.strings, "t"); + *errorHtml = webui::GetTemplatesHtml(template_html, errorPageState.strings, "t"); } } @@ -472,7 +477,7 @@ static void AddExternalClearKey(const media::mojom::KeySystemCapabilityPtr &capa } #if BUILDFLAG(ENABLE_WIDEVINE) -media::SupportedCodecs GetVP9Codecs(const std::vector<media::VideoCodecProfile> &profiles) +media::SupportedCodecs GetVP9Codecs(const base::flat_set<media::VideoCodecProfile> &profiles) { if (profiles.empty()) { // If no profiles are specified, then all are supported. @@ -560,7 +565,7 @@ static media::SupportedCodecs GetSupportedCodecs(const media::CdmCapability& cap supported_codecs |= media::EME_CODEC_VP8; break; case media::VideoCodec::kVP9: - supported_codecs |= GetVP9Codecs(codec.second); + supported_codecs |= GetVP9Codecs(codec.second.supported_profiles); break; case media::VideoCodec::kAV1: supported_codecs |= media::EME_CODEC_AV1; @@ -572,7 +577,7 @@ static media::SupportedCodecs GetSupportedCodecs(const media::CdmCapability& cap #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) #if BUILDFLAG(ENABLE_PLATFORM_HEVC) case media::VideoCodec::kHEVC: - supported_codecs |= GetHevcCodecs(codec.second); + supported_codecs |= GetHevcCodecs(codec.second.supported_profiles); break; #endif // BUILDFLAG(ENABLE_PLATFORM_HEVC) default: diff --git a/src/core/renderer/plugins/loadable_plugin_placeholder_qt.cpp b/src/core/renderer/plugins/loadable_plugin_placeholder_qt.cpp index 70fd791fd..06fd4f71f 100644 --- a/src/core/renderer/plugins/loadable_plugin_placeholder_qt.cpp +++ b/src/core/renderer/plugins/loadable_plugin_placeholder_qt.cpp @@ -40,11 +40,11 @@ LoadablePluginPlaceholderQt* LoadablePluginPlaceholderQt::CreateLoadableMissingP { std::string template_html(ui::ResourceBundle::GetSharedInstance().LoadDataResourceString(IDR_BLOCKED_PLUGIN_HTML)); - base::DictionaryValue values; - values.SetString("name", ""); - values.SetString("message", l10n_util::GetStringUTF8(IDS_PLUGIN_NOT_SUPPORTED)); + base::Value::Dict values; + values.Set("name", ""); + values.Set("message", l10n_util::GetStringUTF8(IDS_PLUGIN_NOT_SUPPORTED)); - const std::string html_data = webui::GetI18nTemplateHtml(template_html, &values); + const std::string html_data = webui::GetI18nTemplateHtml(template_html, std::move(values)); // Will destroy itself when its WebViewPlugin is going away. return new LoadablePluginPlaceholderQt(render_frame, params, html_data, params.mime_type.Utf16()); diff --git a/src/core/renderer/render_configuration.cpp b/src/core/renderer/render_configuration.cpp index 078655496..7b35cdd48 100644 --- a/src/core/renderer/render_configuration.cpp +++ b/src/core/renderer/render_configuration.cpp @@ -16,7 +16,7 @@ bool RenderConfiguration::m_isIncognitoProcess = false; void RenderConfiguration::RegisterMojoInterfaces( blink::AssociatedInterfaceRegistry *associated_interfaces) { - associated_interfaces->AddInterface( + associated_interfaces->AddInterface<qtwebengine::mojom::RendererConfiguration>( base::BindRepeating(&RenderConfiguration::OnRendererConfigurationAssociatedRequest, base::Unretained(this))); } diff --git a/src/core/renderer/user_resource_controller.cpp b/src/core/renderer/user_resource_controller.cpp index cc9989695..c49ecd391 100644 --- a/src/core/renderer/user_resource_controller.cpp +++ b/src/core/renderer/user_resource_controller.cpp @@ -182,7 +182,7 @@ UserResourceController::RenderFrameObserverHelper::RenderFrameObserverHelper( , m_binding(this) , m_userResourceController(controller) { - render_frame->GetAssociatedInterfaceRegistry()->AddInterface( + render_frame->GetAssociatedInterfaceRegistry()->AddInterface<qtwebengine::mojom::UserResourceControllerRenderFrame>( base::BindRepeating(&UserResourceController::RenderFrameObserverHelper::BindReceiver, base::Unretained(this))); } @@ -347,7 +347,7 @@ void UserResourceController::ClearScripts() void UserResourceController::RegisterMojoInterfaces( blink::AssociatedInterfaceRegistry *associated_interfaces) { - associated_interfaces->AddInterface( + associated_interfaces->AddInterface<qtwebengine::mojom::UserResourceController>( base::BindRepeating(&UserResourceController::BindReceiver, base::Unretained(this))); } diff --git a/src/core/renderer/web_channel_ipc_transport.cpp b/src/core/renderer/web_channel_ipc_transport.cpp index 4f753d112..04a4ce705 100644 --- a/src/core/renderer/web_channel_ipc_transport.cpp +++ b/src/core/renderer/web_channel_ipc_transport.cpp @@ -139,7 +139,7 @@ WebChannelIPCTransport::WebChannelIPCTransport(content::RenderFrame *renderFrame , m_worldInitialized(false) , m_binding(this) { - renderFrame->GetAssociatedInterfaceRegistry()->AddInterface( + renderFrame->GetAssociatedInterfaceRegistry()->AddInterface<qtwebchannel::mojom::WebChannelTransportRender>( base::BindRepeating(&WebChannelIPCTransport::BindReceiver, base::Unretained(this))); } diff --git a/src/core/renderer/web_engine_page_render_frame.cpp b/src/core/renderer/web_engine_page_render_frame.cpp index 7b4851382..1e7ac62fc 100644 --- a/src/core/renderer/web_engine_page_render_frame.cpp +++ b/src/core/renderer/web_engine_page_render_frame.cpp @@ -15,7 +15,7 @@ namespace QtWebEngineCore { WebEnginePageRenderFrame::WebEnginePageRenderFrame(content::RenderFrame *render_frame) : content::RenderFrameObserver(render_frame), m_binding(this), m_ready(false) { - render_frame->GetAssociatedInterfaceRegistry()->AddInterface( + render_frame->GetAssociatedInterfaceRegistry()->AddInterface<qtwebenginepage::mojom::WebEnginePageRenderFrame>( base::BindRepeating(&WebEnginePageRenderFrame::BindReceiver, base::Unretained(this))); } diff --git a/src/core/renderer_host/user_resource_controller_host.cpp b/src/core/renderer_host/user_resource_controller_host.cpp index 98a640695..f2a00fc72 100644 --- a/src/core/renderer_host/user_resource_controller_host.cpp +++ b/src/core/renderer_host/user_resource_controller_host.cpp @@ -117,7 +117,7 @@ void UserResourceControllerHost::addUserScript(const UserScript &script, WebCont m_perContentsScripts.insert(contents, currentScripts); } } - GetUserResourceControllerRenderFrame(contents->GetMainFrame()) + GetUserResourceControllerRenderFrame(contents->GetPrimaryMainFrame()) ->AddScript(script.data()); } } @@ -140,7 +140,7 @@ bool UserResourceControllerHost::removeUserScript(const UserScript &script, WebC QList<UserScript>::iterator it = std::find(list.begin(), list.end(), script); if (it == list.end()) return false; - GetUserResourceControllerRenderFrame(contents->GetMainFrame()) + GetUserResourceControllerRenderFrame(contents->GetPrimaryMainFrame()) ->RemoveScript((*it).data()); list.erase(it); } @@ -159,7 +159,7 @@ void UserResourceControllerHost::clearAllScripts(WebContentsAdapter *adapter) m_perContentsScripts.remove(contents); mojo::AssociatedRemote<qtwebengine::mojom::UserResourceControllerRenderFrame> userResourceController; - GetUserResourceControllerRenderFrame(contents->GetMainFrame()) + GetUserResourceControllerRenderFrame(contents->GetPrimaryMainFrame()) ->ClearScripts(); } } 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 d234fb141..8fd59cbc2 100644 --- a/src/core/renderer_host/web_channel_ipc_transport_host.cpp +++ b/src/core/renderer_host/web_channel_ipc_transport_host.cpp @@ -30,7 +30,7 @@ WebChannelIPCTransportHost::WebChannelIPCTransportHost(content::WebContents *con , m_worldId(worldId) , m_receiver(contents, this) { - contents->ForEachFrame(base::BindRepeating([](WebChannelIPCTransportHost *that, uint32_t worldId, content::RenderFrameHost *frame) { + contents->ForEachRenderFrameHost(base::BindRepeating([](WebChannelIPCTransportHost *that, uint32_t worldId, content::RenderFrameHost *frame) { that->setWorldId(frame, worldId); }, base::Unretained(this), worldId)); @@ -50,7 +50,7 @@ void WebChannelIPCTransportHost::sendMessage(const QJsonObject &message) { QJsonDocument doc(message); QByteArray json = doc.toJson(QJsonDocument::Compact); - content::RenderFrameHost *frame = web_contents()->GetMainFrame(); + content::RenderFrameHost *frame = web_contents()->GetPrimaryMainFrame(); qCDebug(log).nospace() << "sending webchannel message to " << frame << ": " << doc; GetWebChannelIPCTransportRemote(frame)->DispatchWebChannelMessage( std::vector<uint8_t>(json.begin(), json.end()), m_worldId); @@ -60,7 +60,7 @@ void WebChannelIPCTransportHost::setWorldId(uint32_t worldId) { if (m_worldId == worldId) return; - web_contents()->ForEachFrame(base::BindRepeating([](WebChannelIPCTransportHost *that, uint32_t worldId, content::RenderFrameHost *frame) { + web_contents()->ForEachRenderFrameHost(base::BindRepeating([](WebChannelIPCTransportHost *that, uint32_t worldId, content::RenderFrameHost *frame) { that->setWorldId(frame, worldId); }, base::Unretained(this), worldId)); @@ -77,7 +77,7 @@ void WebChannelIPCTransportHost::setWorldId(content::RenderFrameHost *frame, uin void WebChannelIPCTransportHost::resetWorldId() { - web_contents()->ForEachFrame(base::BindRepeating([](WebChannelIPCTransportHost *that, content::RenderFrameHost *frame) { + web_contents()->ForEachRenderFrameHost(base::BindRepeating([](WebChannelIPCTransportHost *that, content::RenderFrameHost *frame) { if (!frame->IsRenderFrameLive()) return; that->GetWebChannelIPCTransportRemote(frame)->ResetWorldId(); @@ -86,7 +86,7 @@ void WebChannelIPCTransportHost::resetWorldId() void WebChannelIPCTransportHost::DispatchWebChannelMessage(const std::vector<uint8_t> &json) { - content::RenderFrameHost *frame = web_contents()->GetMainFrame(); + content::RenderFrameHost *frame = web_contents()->GetPrimaryMainFrame(); if (m_receiver.GetCurrentTargetFrame() != frame) { return; diff --git a/src/core/renderer_host/web_engine_page_host.cpp b/src/core/renderer_host/web_engine_page_host.cpp index 1b9b9863a..ea9b363ea 100644 --- a/src/core/renderer_host/web_engine_page_host.cpp +++ b/src/core/renderer_host/web_engine_page_host.cpp @@ -21,7 +21,7 @@ WebEnginePageHost::WebEnginePageHost(content::WebContents *webContents, void WebEnginePageHost::FetchDocumentMarkup(uint64_t requestId) { - auto &remote = GetWebEnginePageRenderFrame(web_contents()->GetMainFrame()); + auto &remote = GetWebEnginePageRenderFrame(web_contents()->GetPrimaryMainFrame()); remote->FetchDocumentMarkup( requestId, base::BindOnce(&WebEnginePageHost::OnDidFetchDocumentMarkup, base::Unretained(this))); @@ -29,7 +29,7 @@ void WebEnginePageHost::FetchDocumentMarkup(uint64_t requestId) void WebEnginePageHost::FetchDocumentInnerText(uint64_t requestId) { - auto &remote = GetWebEnginePageRenderFrame(web_contents()->GetMainFrame()); + auto &remote = GetWebEnginePageRenderFrame(web_contents()->GetPrimaryMainFrame()); remote->FetchDocumentInnerText(requestId, base::BindOnce(&WebEnginePageHost::OnDidFetchDocumentInnerText, base::Unretained(this))); @@ -53,7 +53,7 @@ void WebEnginePageHost::RenderFrameDeleted(content::RenderFrameHost *render_fram void WebEnginePageHost::SetBackgroundColor(uint32_t color) { - auto &remote = GetWebEnginePageRenderFrame(web_contents()->GetMainFrame()); + auto &remote = GetWebEnginePageRenderFrame(web_contents()->GetPrimaryMainFrame()); remote->SetBackgroundColor(color); } diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index d6c3b37ad..1458c25ff 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -396,7 +396,7 @@ QSharedPointer<WebContentsAdapter> WebContentsAdapter::createFromSerializedNavig // Set up the file access rights for the selected navigation entry. // TODO(joth): This is duplicated from chrome/.../session_restore.cc and // should be shared e.g. in NavigationController. http://crbug.com/68222 - const int id = newWebContents->GetMainFrame()->GetProcess()->GetID(); + const int id = newWebContents->GetPrimaryMainFrame()->GetProcess()->GetID(); const blink::PageState& pageState = controller.GetActiveEntry()->GetPageState(); const std::vector<base::FilePath>& filePaths = pageState.GetReferencedFiles(); for (std::vector<base::FilePath>::const_iterator file = filePaths.begin(); file != filePaths.end(); ++file) @@ -505,7 +505,7 @@ void WebContentsAdapter::initialize(content::SiteInstance *site) // Create a RenderView with the initial empty document content::RenderViewHost *rvh = m_webContents->GetRenderViewHost(); Q_ASSERT(rvh); - if (!m_webContents->GetMainFrame()->IsRenderFrameLive()) + if (!m_webContents->GetPrimaryMainFrame()->IsRenderFrameLive()) static_cast<content::WebContentsImpl*>(m_webContents.get())->CreateRenderViewForRenderManager( rvh, absl::nullopt, nullptr); @@ -589,7 +589,7 @@ void WebContentsAdapter::reload() bool wasDiscarded = (m_lifecycleState == LifecycleState::Discarded); setLifecycleState(LifecycleState::Active); - CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetMainFrame()); + CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetPrimaryMainFrame()); WebEngineSettings *settings = WebEngineSettings::get(m_adapterClient->webEngineSettings()); settings->doApply(); if (!wasDiscarded) // undiscard() already triggers a reload @@ -604,7 +604,7 @@ void WebContentsAdapter::reloadAndBypassCache() bool wasDiscarded = (m_lifecycleState == LifecycleState::Discarded); setLifecycleState(LifecycleState::Active); - CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetMainFrame()); + CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetPrimaryMainFrame()); WebEngineSettings *settings = WebEngineSettings::get(m_adapterClient->webEngineSettings()); settings->doApply(); if (!wasDiscarded) // undiscard() already triggers a reload @@ -636,7 +636,7 @@ void WebContentsAdapter::load(const QWebEngineHttpRequest &request) setLifecycleState(LifecycleState::Active); } - CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetMainFrame()); + CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetPrimaryMainFrame()); WebEngineSettings::get(m_adapterClient->webEngineSettings())->doApply(); @@ -724,7 +724,7 @@ void WebContentsAdapter::setContent(const QByteArray &data, const QString &mimeT else setLifecycleState(LifecycleState::Active); - CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetMainFrame()); + CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetPrimaryMainFrame()); WebEngineSettings::get(m_adapterClient->webEngineSettings())->doApply(); @@ -875,7 +875,7 @@ void WebContentsAdapter::navigateBack() { CHECK_INITIALIZED(); base::RecordAction(base::UserMetricsAction("Back")); - CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetMainFrame()); + CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetPrimaryMainFrame()); if (!m_webContents->GetController().CanGoBack()) return; m_webContents->GetController().GoBack(); @@ -886,7 +886,7 @@ void WebContentsAdapter::navigateForward() { CHECK_INITIALIZED(); base::RecordAction(base::UserMetricsAction("Forward")); - CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetMainFrame()); + CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetPrimaryMainFrame()); if (!m_webContents->GetController().CanGoForward()) return; m_webContents->GetController().GoForward(); @@ -896,7 +896,7 @@ void WebContentsAdapter::navigateForward() void WebContentsAdapter::navigateToIndex(int offset) { CHECK_INITIALIZED(); - CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetMainFrame()); + CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetPrimaryMainFrame()); m_webContents->GetController().GoToIndex(offset); focusIfNecessary(); } @@ -904,7 +904,7 @@ void WebContentsAdapter::navigateToIndex(int offset) void WebContentsAdapter::navigateToOffset(int offset) { CHECK_INITIALIZED(); - CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetMainFrame()); + CHECK_VALID_RENDER_WIDGET_HOST_VIEW(m_webContents->GetPrimaryMainFrame()); m_webContents->GetController().GoToOffset(offset); focusIfNecessary(); } @@ -982,7 +982,7 @@ void WebContentsAdapter::setZoomFactor(qreal factor) content::HostZoomMap *zoomMap = content::HostZoomMap::GetForWebContents(m_webContents.get()); if (zoomMap) { - int render_process_id = m_webContents->GetMainFrame()->GetProcess()->GetID(); + int render_process_id = m_webContents->GetPrimaryMainFrame()->GetProcess()->GetID(); int render_view_id = m_webContents->GetRenderViewHost()->GetRoutingID(); zoomMap->SetTemporaryZoomLevel(render_process_id, render_view_id, zoomLevel); } @@ -1020,7 +1020,7 @@ QWebEngineUrlRequestInterceptor* WebContentsAdapter::requestInterceptor() const QAccessibleInterface *WebContentsAdapter::browserAccessible() { CHECK_INITIALIZED(nullptr); - content::RenderFrameHostImpl *rfh = static_cast<content::RenderFrameHostImpl *>(m_webContents->GetMainFrame()); + content::RenderFrameHostImpl *rfh = static_cast<content::RenderFrameHostImpl *>(m_webContents->GetPrimaryMainFrame()); if (!rfh) return nullptr; content::BrowserAccessibilityManager *manager = rfh->GetOrCreateBrowserAccessibilityManager(); @@ -1035,7 +1035,7 @@ QAccessibleInterface *WebContentsAdapter::browserAccessible() void WebContentsAdapter::runJavaScript(const QString &javaScript, quint32 worldId) { CHECK_INITIALIZED(); - content::RenderFrameHost *rfh = m_webContents->GetMainFrame(); + content::RenderFrameHost *rfh = m_webContents->GetPrimaryMainFrame(); Q_ASSERT(rfh); if (worldId == 0) rfh->ExecuteJavaScript(toString16(javaScript), base::NullCallback()); @@ -1046,7 +1046,7 @@ void WebContentsAdapter::runJavaScript(const QString &javaScript, quint32 worldI quint64 WebContentsAdapter::runJavaScriptCallbackResult(const QString &javaScript, quint32 worldId) { CHECK_INITIALIZED(0); - content::RenderFrameHost *rfh = m_webContents->GetMainFrame(); + content::RenderFrameHost *rfh = m_webContents->GetPrimaryMainFrame(); Q_ASSERT(rfh); content::RenderFrameHost::JavaScriptResultCallback callback = base::BindOnce(&callbackOnEvaluateJS, m_adapterClient, m_nextRequestId); if (worldId == 0) @@ -1158,7 +1158,7 @@ qint64 WebContentsAdapter::renderProcessPid() const { CHECK_INITIALIZED(0); - content::RenderProcessHost *renderProcessHost = m_webContents->GetMainFrame()->GetProcess(); + content::RenderProcessHost *renderProcessHost = m_webContents->GetPrimaryMainFrame()->GetProcess(); const base::Process &process = renderProcessHost->GetProcess(); if (!process.IsValid()) return 0; @@ -1168,7 +1168,7 @@ qint64 WebContentsAdapter::renderProcessPid() const void WebContentsAdapter::copyImageAt(const QPoint &location) { CHECK_INITIALIZED(); - m_webContents->GetMainFrame()->CopyImageAt(location.x(), location.y()); + m_webContents->GetPrimaryMainFrame()->CopyImageAt(location.x(), location.y()); } static blink::mojom::MediaPlayerActionType toBlinkMediaPlayerActionType(WebContentsAdapter::MediaPlayerAction action) @@ -1195,7 +1195,7 @@ void WebContentsAdapter::executeMediaPlayerActionAt(const QPoint &location, Medi if (action == MediaPlayerNoAction) return; blink::mojom::MediaPlayerAction blinkAction(toBlinkMediaPlayerActionType(action), enable); - m_webContents->GetMainFrame()->ExecuteMediaPlayerActionAtLocation(toGfx(location), blinkAction); + m_webContents->GetPrimaryMainFrame()->ExecuteMediaPlayerActionAtLocation(toGfx(location), blinkAction); } void WebContentsAdapter::inspectElementAt(const QPoint &location) @@ -1813,7 +1813,7 @@ void WebContentsAdapter::viewSource() { CHECK_INITIALIZED(); base::RecordAction(base::UserMetricsAction("ViewSource")); - m_webContents->GetMainFrame()->ViewSource(); + m_webContents->GetPrimaryMainFrame()->ViewSource(); } bool WebContentsAdapter::canViewSource() @@ -2000,7 +2000,7 @@ void WebContentsAdapter::discard() nullContents->SetWasDiscarded(true); // Kill render process if this is the only page it's got. - content::RenderProcessHost *renderProcessHost = m_webContents->GetMainFrame()->GetProcess(); + content::RenderProcessHost *renderProcessHost = m_webContents->GetPrimaryMainFrame()->GetProcess(); renderProcessHost->FastShutdownIfPossible(/* page_count */ 1u, /* skip_unload_handlers */ false); @@ -2037,7 +2037,7 @@ void WebContentsAdapter::undiscard() // Create a RenderView with the initial empty document content::RenderViewHost *rvh = m_webContents->GetRenderViewHost(); Q_ASSERT(rvh); - if (!m_webContents->GetMainFrame()->IsRenderFrameLive()) + if (!m_webContents->GetPrimaryMainFrame()->IsRenderFrameLive()) static_cast<content::WebContentsImpl *>(m_webContents.get()) ->CreateRenderViewForRenderManager(rvh, absl::nullopt, nullptr); m_webContentsDelegate->RenderViewHostChanged(nullptr, rvh); diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index 9544ca55e..75ab0c6f9 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -472,7 +472,7 @@ void WebContentsDelegateQt::DidFailLoad(content::RenderFrameHost* render_frame_h { setLoadingState(LoadingState::Loaded); - if (render_frame_host != web_contents()->GetMainFrame()) + if (render_frame_host != web_contents()->GetPrimaryMainFrame()) return; if (validated_url.spec() == content::kUnreachableWebDataURL) { @@ -623,7 +623,7 @@ void WebContentsDelegateQt::UpdateTargetURL(content::WebContents* source, const void WebContentsDelegateQt::OnVisibilityChanged(content::Visibility visibility) { if (visibility != content::Visibility::HIDDEN) - web_cache::WebCacheManager::GetInstance()->ObserveActivity(web_contents()->GetMainFrame()->GetProcess()->GetID()); + web_cache::WebCacheManager::GetInstance()->ObserveActivity(web_contents()->GetPrimaryMainFrame()->GetProcess()->GetID()); } void WebContentsDelegateQt::ActivateContents(content::WebContents* contents) @@ -869,6 +869,7 @@ int &WebContentsDelegateQt::streamCount(blink::mojom::MediaStreamType type) case blink::mojom::MediaStreamType::DISPLAY_VIDEO_CAPTURE: case blink::mojom::MediaStreamType::DISPLAY_AUDIO_CAPTURE: case blink::mojom::MediaStreamType::DISPLAY_VIDEO_CAPTURE_THIS_TAB: + case blink::mojom::MediaStreamType::DISPLAY_VIDEO_CAPTURE_SET: return m_desktopStreamCount; case blink::mojom::MediaStreamType::NO_SERVICE: diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index f3226939f..49d626b3a 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -677,6 +677,13 @@ WebEngineContext::WebEngineContext() disableFeatures.push_back(features::kWebUsb.name); disableFeatures.push_back(media::kPictureInPicture.name); + // Disable webkitPersistentStorage alias to webkitTemporaryStorage. + // Persistent quota is depreceted and this flag will be removed: + // https://chromium-review.googlesource.com/c/chromium/src/+/3888541 + // TODO: Implement support for webkitTemporaryStorage. + // Also see: https://bugs.chromium.org/p/chromium/issues/detail?id=1233525 + disableFeatures.push_back(blink::features::kPersistentQuotaIsTemporaryQuota.name); + if (useEmbeddedSwitches) { // embedded switches are based on the switches for Android, see content/browser/android/content_startup_flags.cc enableFeatures.push_back(features::kOverlayScrollbar.name); @@ -687,7 +694,6 @@ WebEngineContext::WebEngineContext() #if QT_CONFIG(webengine_vulkan) if (QQuickWindow::graphicsApi() == QSGRendererInterface::Vulkan) { enableFeatures.push_back(features::kVulkan.name); - enableFeatures.push_back(features::kUseSkiaRenderer.name); parsedCommandLine->AppendSwitchASCII(switches::kUseVulkan, switches::kVulkanImplementationNameNative); } diff --git a/src/core/web_engine_context_threads.cpp b/src/core/web_engine_context_threads.cpp index 5e969fb98..f62e2074e 100644 --- a/src/core/web_engine_context_threads.cpp +++ b/src/core/web_engine_context_threads.cpp @@ -48,11 +48,11 @@ struct GpuThreadControllerQt : content::GpuThreadController if (s_gpuProcessDestroyed) return; - s_gpuProcess = std::make_unique<content::ChildProcess>(base::ThreadPriority::NORMAL); + s_gpuProcess = std::make_unique<content::ChildProcess>(base::ThreadType::kDefault); auto gpuInit = std::make_unique<gpu::GpuInit>(); gpuInit->InitializeInProcess(base::CommandLine::ForCurrentProcess(), gpuPreferences); auto childThread = new content::GpuChildThread(params, std::move(gpuInit)); - childThread->Init(base::Time::Now()); + childThread->Init(base::TimeTicks::Now()); s_gpuProcess->set_main_thread(childThread); } diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp index 3e829457e..906f9fb72 100644 --- a/src/core/web_engine_settings.cpp +++ b/src/core/web_engine_settings.cpp @@ -422,7 +422,6 @@ void WebEngineSettings::applySettingsToWebPreferences(blink::web_pref::WebPrefer prefs->text_track_font_family = style->font_family; prefs->text_track_font_variant = style->font_variant; prefs->text_track_window_color = style->window_color; - prefs->text_track_window_padding = style->window_padding; prefs->text_track_window_radius = style->window_radius; } } diff --git a/tests/auto/core/origins/tst_origins.cpp b/tests/auto/core/origins/tst_origins.cpp index cef9c31d5..71285dcf0 100644 --- a/tests/auto/core/origins/tst_origins.cpp +++ b/tests/auto/core/origins/tst_origins.cpp @@ -442,8 +442,8 @@ void tst_Origins::jsUrlRelative() // URLs even without an initial slash. QCOMPARE(eval(QSL("new URL('bar', 'qrc:foo').href")), QVariant(QSL("qrc:bar"))); QCOMPARE(eval(QSL("new URL('baz', 'qrc:foo/bar').href")), QVariant(QSL("qrc:foo/baz"))); - QCOMPARE(eval(QSL("new URL('bar', 'qrc://foo').href")), QVariant()); - QCOMPARE(eval(QSL("new URL('bar', 'qrc:///foo').href")), QVariant()); + QCOMPARE(eval(QSL("new URL('bar', 'qrc://foo').href")), QVariant(QSL("qrc://bar"))); + QCOMPARE(eval(QSL("new URL('bar', 'qrc:///foo').href")), QVariant(QSL("qrc:///bar"))); // With a slash it works the same as http except 'foo' is part of the path and not the host. QCOMPARE(eval(QSL("new URL('bar', 'qrc:/foo').href")), QVariant(QSL("qrc:/bar"))); diff --git a/tests/auto/core/qwebenginesettings/tst_qwebenginesettings.cpp b/tests/auto/core/qwebenginesettings/tst_qwebenginesettings.cpp index 4220f496b..e0bb604e2 100644 --- a/tests/auto/core/qwebenginesettings/tst_qwebenginesettings.cpp +++ b/tests/auto/core/qwebenginesettings/tst_qwebenginesettings.cpp @@ -143,7 +143,7 @@ void tst_QWebEngineSettings::javascriptClipboard() // - return value of queryCommandEnabled and // - return value of execCommand // - comparing the clipboard / input field - QGuiApplication::clipboard()->clear(); + QGuiApplication::clipboard()->setText(QString()); QCOMPARE(evaluateJavaScriptSync(&page, "document.queryCommandEnabled('copy')").toBool(), copyResult); QCOMPARE(evaluateJavaScriptSync(&page, "document.execCommand('copy')").toBool(), copyResult); diff --git a/tests/auto/quick/qmltests/data/tst_newViewRequest.qml b/tests/auto/quick/qmltests/data/tst_newViewRequest.qml index a47862565..6d4bdbb41 100644 --- a/tests/auto/quick/qmltests/data/tst_newViewRequest.qml +++ b/tests/auto/quick/qmltests/data/tst_newViewRequest.qml @@ -98,7 +98,7 @@ TestWebEngineView { if (viewType === "dialog") { tryVerify(dialog.webEngineView.loadSucceeded) - compare(dialog.webEngineView.url, ""); + compare(dialog.webEngineView.url, Qt.url("about:blank")); dialog.destroy(); } // https://chromium-review.googlesource.com/c/chromium/src/+/1300395 diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp index fe9f42053..6e369b4c6 100644 --- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp +++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp @@ -1117,7 +1117,7 @@ void tst_QQuickWebEngineView::javascriptClipboard() // - return value of queryCommandEnabled and // - return value of execCommand // - comparing the clipboard / input field - QGuiApplication::clipboard()->clear(); + QGuiApplication::clipboard()->setText(QString()); QCOMPARE(evaluateJavaScriptSync(view, "document.queryCommandEnabled('copy')").toBool(), copyResult); QCOMPARE(evaluateJavaScriptSync(view, "document.execCommand('copy')").toBool(), copyResult); diff --git a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp index 9589e83e1..6ddc031d5 100644 --- a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp +++ b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp @@ -487,9 +487,9 @@ void tst_QWebEngineHistory::clear() QWebEnginePage page2(this); QWebEngineHistory* hist2 = page2.history(); - QVERIFY(hist2->count() == 0); + QCOMPARE(hist2->count(), 1); hist2->clear(); - QVERIFY(hist2->count() == 0); // Do not change anything. + QCOMPARE(hist2->count(), 1); // Do not change anything. } void tst_QWebEngineHistory::historyItemFromDeletedPage() diff --git a/tests/auto/widgets/qwebenginepage/CMakeLists.txt b/tests/auto/widgets/qwebenginepage/CMakeLists.txt index f9a24b2c7..a15bb6e06 100644 --- a/tests/auto/widgets/qwebenginepage/CMakeLists.txt +++ b/tests/auto/widgets/qwebenginepage/CMakeLists.txt @@ -9,6 +9,7 @@ qt_internal_add_test(tst_qwebenginepage tst_qwebenginepage.cpp LIBRARIES Qt::CorePrivate + Qt::NetworkPrivate Qt::WebEngineCorePrivate Qt::WebEngineWidgets Test::HttpServer diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index c76da443e..64acdb3d5 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 <QtNetwork/private/qtnetworkglobal_p.h> #include <QtWebEngineCore/qtwebenginecore-config.h> #include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h> #include <QByteArray> @@ -2060,14 +2061,14 @@ void tst_QWebEnginePage::symmetricUrl() QVERIFY(view.url().isEmpty()); - QCOMPARE(view.history()->count(), 0); + QCOMPARE(view.history()->count(), 1); QUrl dataUrl("data:text/html,<h1>Test"); view.setUrl(dataUrl); view.show(); QCOMPARE(view.url(), dataUrl); - QCOMPARE(view.history()->count(), 0); + QCOMPARE(view.history()->count(), 1); // loading is _not_ immediate, so the text isn't set just yet. QVERIFY(toPlainTextSync(view.page()).isEmpty()); @@ -2380,7 +2381,7 @@ void tst_QWebEnginePage::setHtmlWithBaseURL() QCOMPARE(evaluateJavaScriptSync(&page, "document.images[0].height").toInt(), 128); // no history item has to be added. - QCOMPARE(m_view->page()->history()->count(), 0); + QCOMPARE(m_view->page()->history()->count(), 1); } class MyPage : public QWebEnginePage @@ -2810,7 +2811,7 @@ void tst_QWebEnginePage::setUrlHistory() int expectedLoadFinishedCount = 0; QSignalSpy spy(m_page, SIGNAL(loadFinished(bool))); - QCOMPARE(m_page->history()->count(), 0); + QCOMPARE(m_page->history()->count(), 1); m_page->setUrl(QUrl()); expectedLoadFinishedCount++; @@ -2884,7 +2885,7 @@ void tst_QWebEnginePage::setUrlUsingStateObject() QSignalSpy loadFinishedSpy(m_page, SIGNAL(loadFinished(bool))); int expectedUrlChangeCount = 0; - QCOMPARE(m_page->history()->count(), 0); + QCOMPARE(m_page->history()->count(), 1); url = QUrl("qrc:/resources/test1.html"); m_page->setUrl(url); @@ -3709,7 +3710,7 @@ void tst_QWebEnginePage::openLinkInNewPage() QCOMPARE(page1.history()->count(), 1); else QCOMPARE(page1.history()->count(), 2); - QCOMPARE(page2.history()->count(), 0); + QCOMPARE(page2.history()->count(), 1); break; case Effect::LoadInOther: QTRY_COMPARE(page2.spy.size(), 1); diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py index f82ff7d03..8769d096d 100755 --- a/tools/scripts/take_snapshot.py +++ b/tools/scripts/take_snapshot.py @@ -55,6 +55,8 @@ def isInChromiumBlacklist(file_path): and not file_path.startswith('chrome/browser/prefs/') and not file_path.startswith('chrome/browser/printing/') and not file_path.startswith('chrome/browser/profiles/incognito_helpers') + and not file_path.startswith('chrome/browser/profiles/profile_keyed_service_factory') + and not file_path.startswith('chrome/browser/profiles/profile_selections') and not file_path.startswith('chrome/browser/push_messaging/') and not file_path.startswith('chrome/browser/renderer_host/') and not file_path.startswith('chrome/browser/share/core/') @@ -227,6 +229,7 @@ def isInChromiumBlacklist(file_path): or file_path.startswith('third_party/sqlite/sqlite-src-') or file_path.startswith('third_party/spirv-cross/spirv-cross/reference/') or file_path.startswith('third_party/swiftshader/third_party/') + or file_path.startswith('third_party/tflite/') or file_path.startswith('third_party/unrar') or file_path.startswith('third_party/wayland') or file_path.startswith('third_party/webgl') diff --git a/tools/scripts/version_resolver.py b/tools/scripts/version_resolver.py index 921e97f36..1462ab2e2 100644 --- a/tools/scripts/version_resolver.py +++ b/tools/scripts/version_resolver.py @@ -12,8 +12,8 @@ import json import urllib3 import git_submodule as GitSubmodule -chromium_version = '102.0.5005.177' -chromium_branch = '5005' +chromium_version = '106.0.5249.126' +chromium_branch = '5249' ninja_version = 'v1.8.2' json_url = 'http://omahaproxy.appspot.com/all.json' |