From 584b19967ad8aba0e9c7d00f2b1cef01e8f6fc43 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 27 Feb 2023 13:52:38 -0500 Subject: [PATCH] Update to Chromium version 112.0.5615.0 - Windows: VS2022 and Win11 SDK 10.0.22621.0 are now required. --- CHROMIUM_BUILD_COMPATIBILITY.txt | 2 +- cmake/cef_variables.cmake.in | 2 + include/base/cef_weak_ptr.h | 28 +++---- .../alloy/alloy_content_browser_client.cc | 17 ++-- .../chrome_content_browser_client_cef.cc | 1 + .../browser/extensions/api/tabs/tabs_api.cc | 8 +- .../extensions/chrome_api_registration.cc | 2 + .../extensions/extension_function_details.cc | 9 +- .../extensions/extension_host_delegate.cc | 2 +- .../extensions/extension_host_delegate.h | 2 +- libcef/browser/file_dialog_manager.cc | 1 + .../browser_platform_delegate_native_win.cc | 26 +++--- .../net_service/browser_urlrequest_impl.cc | 3 +- libcef/browser/osr/osr_accessibility_util.cc | 2 + .../osr/render_widget_host_view_osr.cc | 8 +- .../browser/osr/render_widget_host_view_osr.h | 4 +- libcef/browser/prefs/browser_prefs.cc | 11 ++- libcef/browser/prefs/pref_helper.cc | 4 +- libcef/browser/views/window_impl.cc | 6 +- libcef/common/alloy/alloy_main_delegate.cc | 7 -- libcef/common/alloy/alloy_main_delegate.h | 10 +++ libcef/common/values_impl.cc | 6 +- .../alloy/alloy_content_renderer_client.cc | 1 + libcef_dll/base/cef_weak_ptr.cc | 4 +- patch/patch.cfg | 19 +++-- patch/patches/base_logging_4294575.patch | 20 +++++ patch/patches/base_sandbox_2743.patch | 10 +-- patch/patches/blink_web_element_4200240.patch | 43 ++++++++++ .../browser_security_policy_1081397.patch | 6 +- patch/patches/build.patch | 4 +- patch/patches/chrome_browser.patch | 8 +- patch/patches/chrome_browser_browser.patch | 70 ++++++++-------- .../chrome_browser_content_settings.patch | 12 +-- .../chrome_browser_context_menus.patch | 24 +++--- .../chrome_browser_dialogs_native.patch | 24 +++--- .../chrome_browser_dialogs_widget.patch | 2 +- patch/patches/chrome_browser_extensions.patch | 6 +- .../chrome_browser_permission_prompt.patch | 8 +- .../patches/chrome_browser_profile_menu.patch | 4 +- patch/patches/chrome_browser_profiles.patch | 12 +-- .../chrome_browser_safe_browsing.patch | 4 +- patch/patches/chrome_plugins.patch | 24 +++--- patch/patches/chrome_renderer.patch | 6 +- patch/patches/chrome_runtime.patch | 82 +++++++++---------- patch/patches/chrome_runtime_views.patch | 80 +++++++++--------- patch/patches/component_build.patch | 8 +- patch/patches/content_2015.patch | 44 +++++----- patch/patches/content_main_654986.patch | 43 ++++------ patch/patches/crashpad_1995.patch | 10 +-- patch/patches/embedder_product_override.patch | 4 +- patch/patches/extensions_1947.patch | 18 ++-- patch/patches/gn_config.patch | 14 ++-- patch/patches/gritsettings.patch | 4 +- patch/patches/linux_assets_path_1936.patch | 2 +- patch/patches/linux_bluetooth_1319006.patch | 2 +- .../patches/linux_chrome_widevine_3149.patch | 4 +- .../linux_glib_deprecated_volatile.patch | 6 +- patch/patches/message_loop.patch | 4 +- patch/patches/message_pump_mac_2495.patch | 6 +- .../mime_handler_view_guest_1565_2727.patch | 10 +-- patch/patches/net_cookie_flags.patch | 4 +- patch/patches/net_test_server_3798752.patch | 6 +- patch/patches/osr_fling_2745.patch | 12 +-- patch/patches/pdfium_103501.patch | 12 --- patch/patches/print_preview_123.patch | 22 ++--- patch/patches/resource_bundle_2512.patch | 4 +- patch/patches/rlz_tracker_4294854.patch | 36 ++++++++ patch/patches/runhooks.patch | 18 ++-- patch/patches/rwh_background_color_1984.patch | 6 +- patch/patches/services_network_2622.patch | 26 ++---- patch/patches/services_network_2718.patch | 6 +- patch/patches/storage_incognito_2289.patch | 4 +- patch/patches/trace_event.patch | 2 +- patch/patches/views_1749_2102_3330.patch | 78 +++++++++--------- patch/patches/views_widget.patch | 33 ++++---- patch/patches/viz_osr_2575.patch | 21 ++--- patch/patches/web_contents_1257_1565.patch | 26 +++--- patch/patches/webkit_plugin_info_2015.patch | 4 +- patch/patches/webkit_popups.patch | 10 +-- patch/patches/webui_2037.patch | 2 +- patch/patches/win_power_monitor_4219163.patch | 22 ----- patch/patches/win_sandbox_3210.patch | 4 +- 82 files changed, 622 insertions(+), 549 deletions(-) create mode 100644 patch/patches/base_logging_4294575.patch create mode 100644 patch/patches/blink_web_element_4200240.patch delete mode 100644 patch/patches/pdfium_103501.patch create mode 100644 patch/patches/rlz_tracker_4294854.patch delete mode 100644 patch/patches/win_power_monitor_4219163.patch diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 7072cffc1..aad121589 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'refs/tags/111.0.5563.0' + 'chromium_checkout': 'refs/tags/112.0.5615.0' } diff --git a/cmake/cef_variables.cmake.in b/cmake/cef_variables.cmake.in index fc3293213..2895b3ce0 100644 --- a/cmake/cef_variables.cmake.in +++ b/cmake/cef_variables.cmake.in @@ -538,9 +538,11 @@ if(OS_WINDOWS) psapi.lib SetupAPI.lib Shell32.lib + Shcore.lib Userenv.lib version.lib wbemuuid.lib + WindowsApp.lib winmm.lib ) diff --git a/include/base/cef_weak_ptr.h b/include/base/cef_weak_ptr.h index 63e1a7427..294668981 100644 --- a/include/base/cef_weak_ptr.h +++ b/include/base/cef_weak_ptr.h @@ -123,7 +123,7 @@ class SupportsWeakPtr; template class WeakPtr; -namespace internal { +namespace cef_internal { // These classes are part of the WeakPtr implementation. // DO NOT USE THESE CLASSES DIRECTLY YOURSELF. @@ -197,7 +197,7 @@ class WeakPtrBase { WeakPtrBase& operator=(WeakPtrBase&& other) noexcept = default; void reset() { - ref_ = internal::WeakReference(); + ref_ = cef_internal::WeakReference(); ptr_ = 0; } @@ -225,7 +225,7 @@ class SupportsWeakPtrBase { template static WeakPtr StaticAsWeakPtr(Derived* t) { static_assert( - std::is_base_of::value, + std::is_base_of::value, "AsWeakPtr argument must inherit from SupportsWeakPtr"); return AsWeakPtrImpl(t); } @@ -242,7 +242,7 @@ class SupportsWeakPtrBase { } }; -} // namespace internal +} // namespace cef_internal template class WeakPtrFactory; @@ -264,7 +264,7 @@ class WeakPtrFactory; /// /// template -class WeakPtr : public internal::WeakPtrBase { +class WeakPtr : public cef_internal::WeakPtrBase { public: WeakPtr() = default; WeakPtr(std::nullptr_t) {} @@ -325,13 +325,13 @@ class WeakPtr : public internal::WeakPtrBase { bool WasInvalidated() const { return ptr_ && !ref_.IsValid(); } private: - friend class internal::SupportsWeakPtrBase; + friend class cef_internal::SupportsWeakPtrBase; template friend class WeakPtr; friend class SupportsWeakPtr; friend class WeakPtrFactory; - WeakPtr(const internal::WeakReference& ref, T* ptr) + WeakPtr(const cef_internal::WeakReference& ref, T* ptr) : WeakPtrBase(ref, reinterpret_cast(ptr)) {} }; @@ -355,15 +355,15 @@ bool operator==(std::nullptr_t, const WeakPtr& weak_ptr) { return weak_ptr == nullptr; } -namespace internal { +namespace cef_internal { class WeakPtrFactoryBase { protected: WeakPtrFactoryBase(uintptr_t ptr); ~WeakPtrFactoryBase(); - internal::WeakReferenceOwner weak_reference_owner_; + cef_internal::WeakReferenceOwner weak_reference_owner_; uintptr_t ptr_; }; -} // namespace internal +} // namespace cef_internal /// /// A class may be composed of a WeakPtrFactory and thereby control how it @@ -374,7 +374,7 @@ class WeakPtrFactoryBase { /// bool. /// template -class WeakPtrFactory : public internal::WeakPtrFactoryBase { +class WeakPtrFactory : public cef_internal::WeakPtrFactoryBase { public: WeakPtrFactory() = delete; @@ -416,7 +416,7 @@ class WeakPtrFactory : public internal::WeakPtrFactoryBase { /// destroyed, its use can lead to subtle use-after-destroy issues. /// template -class SupportsWeakPtr : public internal::SupportsWeakPtrBase { +class SupportsWeakPtr : public cef_internal::SupportsWeakPtrBase { public: SupportsWeakPtr() = default; @@ -431,7 +431,7 @@ class SupportsWeakPtr : public internal::SupportsWeakPtrBase { ~SupportsWeakPtr() = default; private: - internal::WeakReferenceOwner weak_reference_owner_; + cef_internal::WeakReferenceOwner weak_reference_owner_; }; /// @@ -459,7 +459,7 @@ class SupportsWeakPtr : public internal::SupportsWeakPtrBase { /// template WeakPtr AsWeakPtr(Derived* t) { - return internal::SupportsWeakPtrBase::StaticAsWeakPtr(t); + return cef_internal::SupportsWeakPtrBase::StaticAsWeakPtr(t); } } // namespace base diff --git a/libcef/browser/alloy/alloy_content_browser_client.cc b/libcef/browser/alloy/alloy_content_browser_client.cc index 55711ca39..a5659fc33 100644 --- a/libcef/browser/alloy/alloy_content_browser_client.cc +++ b/libcef/browser/alloy/alloy_content_browser_client.cc @@ -52,7 +52,6 @@ #include "base/stl_util.h" #include "base/threading/thread_restrictions.h" #include "cef/grit/cef_resources.h" -#include "chrome/browser/accessibility/live_caption_unavailability_notifier.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h" @@ -82,6 +81,7 @@ #include "chrome/grit/browser_resources.h" #include "chrome/grit/generated_resources.h" #include "chrome/services/printing/printing_service.h" +#include "chrome/services/speech/buildflags/buildflags.h" #include "components/content_settings/core/browser/cookie_settings.h" #include "components/embedder_support/switches.h" #include "components/embedder_support/user_agent_utils.h" @@ -157,9 +157,12 @@ #endif #if BUILDFLAG(IS_WIN) +#if BUILDFLAG(ENABLE_SPEECH_SERVICE) +#include "media/mojo/mojom/renderer_extensions.mojom.h" +#endif #include "net/ssl/client_cert_store_win.h" #include "sandbox/win/src/sandbox_policy.h" -#endif +#endif // BUILDFLAG(IS_WIN) #if BUILDFLAG(USE_NSS_CERTS) #include "net/ssl/client_cert_store_nss.h" @@ -284,10 +287,12 @@ void BindBadgeServiceForServiceWorker( const content::ServiceWorkerVersionBaseInfo& info, mojo::PendingReceiver receiver) {} +#if BUILDFLAG(IS_WIN) && BUILDFLAG(ENABLE_SPEECH_SERVICE) void BindMediaFoundationRendererNotifierHandler( content::RenderFrameHost* frame_host, mojo::PendingReceiver receiver) {} +#endif void BindNetworkHintsHandler( content::RenderFrameHost* frame_host, @@ -1250,8 +1255,10 @@ void AlloyContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( map); map->Add(base::BindRepeating(&BindBadgeService)); +#if BUILDFLAG(IS_WIN) && BUILDFLAG(ENABLE_SPEECH_SERVICE) map->Add( base::BindRepeating(&BindMediaFoundationRendererNotifierHandler)); +#endif map->Add( base::BindRepeating(&BindNetworkHintsHandler)); @@ -1358,10 +1365,8 @@ bool AlloyContentBrowserClient::ArePersistentMediaDeviceIDsAllowed( // Persistent MediaDevice IDs are allowed if cookies are allowed. return CookieSettingsFactory::GetForProfile( Profile::FromBrowserContext(browser_context)) - ->IsFullCookieAccessAllowed( - url, site_for_cookies, top_frame_origin, - net::CookieSettingOverrides(), - content_settings::CookieSettings::QueryReason::kSiteStorage); + ->IsFullCookieAccessAllowed(url, site_for_cookies, top_frame_origin, + net::CookieSettingOverrides()); } void AlloyContentBrowserClient::OnWebContentsCreated( diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.cc b/libcef/browser/chrome/chrome_content_browser_client_cef.cc index c28d097af..d87fead84 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.cc +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.cc @@ -30,6 +30,7 @@ #include "base/path_service.h" #include "chrome/browser/chrome_browser_main.h" #include "chrome/browser/net/system_network_context_manager.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "content/public/browser/navigation_throttle.h" diff --git a/libcef/browser/extensions/api/tabs/tabs_api.cc b/libcef/browser/extensions/api/tabs/tabs_api.cc index 3fc19ef22..3383ff974 100644 --- a/libcef/browser/extensions/api/tabs/tabs_api.cc +++ b/libcef/browser/extensions/api/tabs/tabs_api.cc @@ -195,8 +195,12 @@ bool TabsUpdateFunction::UpdateURL(const std::string& url_string, int tab_id, std::string* error) { GURL url; - if (!ExtensionTabUtil::PrepareURLForNavigation(url_string, extension(), &url, - error)) { + auto url_expected = + ExtensionTabUtil::PrepareURLForNavigation(url_string, extension()); + if (url_expected.has_value()) { + url = *url_expected; + } else { + *error = std::move(url_expected.error()); return false; } diff --git a/libcef/browser/extensions/chrome_api_registration.cc b/libcef/browser/extensions/chrome_api_registration.cc index d1198ddc1..60c6153d3 100644 --- a/libcef/browser/extensions/chrome_api_registration.cc +++ b/libcef/browser/extensions/chrome_api_registration.cc @@ -43,6 +43,7 @@ const char* const kSupportedAPIs[] = { ContentSettingsContentSettingGetResourceIdentifiersFunction), "pdfViewerPrivate", EXTENSION_FUNCTION_NAME(PdfViewerPrivateIsAllowedLocalFileAccessFunction), + EXTENSION_FUNCTION_NAME(PdfViewerPrivateIsPdfOcrAlwaysActiveFunction), "resourcesPrivate", EXTENSION_FUNCTION_NAME(ResourcesPrivateGetStringsFunction), "storage", @@ -91,6 +92,7 @@ void ChromeFunctionRegistry::RegisterAll(ExtensionFunctionRegistry* registry) { ContentSettingsContentSettingGetResourceIdentifiersFunction>(); registry ->RegisterFunction(); + registry->RegisterFunction(); registry->RegisterFunction(); registry->RegisterFunction(); registry->RegisterFunction(); diff --git a/libcef/browser/extensions/extension_function_details.cc b/libcef/browser/extensions/extension_function_details.cc index 7b5126442..c07082829 100644 --- a/libcef/browser/extensions/extension_function_details.cc +++ b/libcef/browser/extensions/extension_function_details.cc @@ -324,9 +324,12 @@ std::unique_ptr CefExtensionFunctionDetails::OpenTab( GURL url; if (params.url.has_value()) { - std::string url_string = *params.url; - if (!ExtensionTabUtil::PrepareURLForNavigation( - url_string, function()->extension(), &url, error_message)) { + auto url_expected = ExtensionTabUtil::PrepareURLForNavigation( + *params.url, function()->extension()); + if (url_expected.has_value()) { + url = *url_expected; + } else { + *error_message = std::move(url_expected.error()); return nullptr; } } diff --git a/libcef/browser/extensions/extension_host_delegate.cc b/libcef/browser/extensions/extension_host_delegate.cc index 901920f75..6fadbb943 100644 --- a/libcef/browser/extensions/extension_host_delegate.cc +++ b/libcef/browser/extensions/extension_host_delegate.cc @@ -34,7 +34,7 @@ void CefExtensionHostDelegate::CreateTab( std::unique_ptr web_contents, const std::string& extension_id, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture) { // TODO(cef): Add support for extensions opening popup windows. NOTIMPLEMENTED(); diff --git a/libcef/browser/extensions/extension_host_delegate.h b/libcef/browser/extensions/extension_host_delegate.h index 60f456ac3..d3b2f19f4 100644 --- a/libcef/browser/extensions/extension_host_delegate.h +++ b/libcef/browser/extensions/extension_host_delegate.h @@ -27,7 +27,7 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate { void CreateTab(std::unique_ptr web_contents, const std::string& extension_id, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture) override; void ProcessMediaAccessRequest(content::WebContents* web_contents, const content::MediaStreamRequest& request, diff --git a/libcef/browser/file_dialog_manager.cc b/libcef/browser/file_dialog_manager.cc index 2e4508986..6b6535683 100644 --- a/libcef/browser/file_dialog_manager.cc +++ b/libcef/browser/file_dialog_manager.cc @@ -12,6 +12,7 @@ #include "libcef/browser/context.h" #include "libcef/browser/thread_util.h" +#include "base/strings/utf_string_conversions.h" #include "chrome/browser/file_select_helper.h" #include "content/public/browser/file_select_listener.h" #include "content/public/browser/render_frame_host.h" diff --git a/libcef/browser/native/browser_platform_delegate_native_win.cc b/libcef/browser/native/browser_platform_delegate_native_win.cc index d983f532d..b76cb862a 100644 --- a/libcef/browser/native/browser_platform_delegate_native_win.cc +++ b/libcef/browser/native/browser_platform_delegate_native_win.cc @@ -251,16 +251,14 @@ bool CefBrowserPlatformDelegateNativeWin::CreateHostWindow() { // Add a reference that will later be released in DestroyBrowser(). browser_->AddRef(); - if (!called_enable_non_client_dpi_scaling_ && has_frame_ && - base::win::IsProcessPerMonitorDpiAware()) { + if (!called_enable_non_client_dpi_scaling_ && has_frame_) { // This call gets Windows to scale the non-client area when WM_DPICHANGED // is fired on Windows versions < 10.0.14393.0. // Derived signature; not available in headers. - static auto enable_child_window_dpi_message_func = []() { - using EnableChildWindowDpiMessagePtr = LRESULT(WINAPI*)(HWND, BOOL); - return reinterpret_cast(GetProcAddress( - GetModuleHandle(L"user32.dll"), "EnableChildWindowDpiMessage")); - }(); + using EnableChildWindowDpiMessagePtr = LRESULT(WINAPI*)(HWND, BOOL); + static const auto enable_child_window_dpi_message_func = + reinterpret_cast( + base::win::GetUser32FunctionPointer("EnableChildWindowDpiMessage")); if (enable_child_window_dpi_message_func) { enable_child_window_dpi_message_func(window_info_.window, TRUE); } @@ -622,15 +620,15 @@ LRESULT CALLBACK CefBrowserPlatformDelegateNativeWin::WndProc(HWND hwnd, gfx::SetWindowUserData(hwnd, platform_delegate); platform_delegate->window_info_.window = hwnd; - if (platform_delegate->has_frame_ && - base::win::IsProcessPerMonitorDpiAware()) { + if (platform_delegate->has_frame_) { // This call gets Windows to scale the non-client area when // WM_DPICHANGED is fired on Windows versions >= 10.0.14393.0. - static auto enable_non_client_dpi_scaling_func = []() { - return reinterpret_cast( - GetProcAddress(GetModuleHandle(L"user32.dll"), - "EnableNonClientDpiScaling")); - }(); + using EnableNonClientDpiScalingPtr = + decltype(::EnableNonClientDpiScaling)*; + static const auto enable_non_client_dpi_scaling_func = + reinterpret_cast( + base::win::GetUser32FunctionPointer( + "EnableNonClientDpiScaling")); platform_delegate->called_enable_non_client_dpi_scaling_ = !!(enable_non_client_dpi_scaling_func && enable_non_client_dpi_scaling_func(hwnd)); diff --git a/libcef/browser/net_service/browser_urlrequest_impl.cc b/libcef/browser/net_service/browser_urlrequest_impl.cc index a8247e273..962c442e9 100644 --- a/libcef/browser/net_service/browser_urlrequest_impl.cc +++ b/libcef/browser/net_service/browser_urlrequest_impl.cc @@ -433,7 +433,8 @@ class CefBrowserURLRequest::Context } } - void OnRedirect(const net::RedirectInfo& redirect_info, + void OnRedirect(const GURL& url_before_redirect, + const net::RedirectInfo& redirect_info, const network::mojom::URLResponseHead& response_head, std::vector* removed_headers) { DCHECK(CalledOnValidThread()); diff --git a/libcef/browser/osr/osr_accessibility_util.cc b/libcef/browser/osr/osr_accessibility_util.cc index 19d74f645..d63ac0653 100644 --- a/libcef/browser/osr/osr_accessibility_util.cc +++ b/libcef/browser/osr/osr_accessibility_util.cc @@ -111,8 +111,10 @@ struct PopulateAxNodeAttributes { case ax::mojom::IntAttribute::kDropeffect: case ax::mojom::IntAttribute::kMemberOfId: case ax::mojom::IntAttribute::kNextFocusId: + case ax::mojom::IntAttribute::kNextWindowFocusId: case ax::mojom::IntAttribute::kNextOnLineId: case ax::mojom::IntAttribute::kPreviousFocusId: + case ax::mojom::IntAttribute::kPreviousWindowFocusId: case ax::mojom::IntAttribute::kPreviousOnLineId: case ax::mojom::IntAttribute::kSetSize: case ax::mojom::IntAttribute::kPosInSet: diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index e74390ccd..66b672a0b 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -908,15 +908,17 @@ void CefRenderWidgetHostViewOSR::NotifyHostAndDelegateOnWasShown( NOTREACHED(); } -void CefRenderWidgetHostViewOSR::RequestPresentationTimeFromHostOrDelegate( - blink::mojom::RecordContentToVisibleTimeRequestPtr visible_time_request) { +void CefRenderWidgetHostViewOSR:: + RequestSuccessfulPresentationTimeFromHostOrDelegate( + blink::mojom::RecordContentToVisibleTimeRequestPtr + visible_time_request) { // We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this // method should not be called. NOTREACHED(); } void CefRenderWidgetHostViewOSR:: - CancelPresentationTimeRequestForHostAndDelegate() { + CancelSuccessfulPresentationTimeRequestForHostAndDelegate() { // We don't call RenderWidgetHostViewBase::OnShowWithPageVisibility, so this // method should not be called. NOTREACHED(); diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 6a603b32e..a7411b98b 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -198,10 +198,10 @@ class CefRenderWidgetHostViewOSR void NotifyHostAndDelegateOnWasShown( blink::mojom::RecordContentToVisibleTimeRequestPtr visible_time_request) override; - void RequestPresentationTimeFromHostOrDelegate( + void RequestSuccessfulPresentationTimeFromHostOrDelegate( blink::mojom::RecordContentToVisibleTimeRequestPtr visible_time_request) override; - void CancelPresentationTimeRequestForHostAndDelegate() override; + void CancelSuccessfulPresentationTimeRequestForHostAndDelegate() override; void OnFrameComplete(const viz::BeginFrameAck& ack); diff --git a/libcef/browser/prefs/browser_prefs.cc b/libcef/browser/prefs/browser_prefs.cc index c42a02310..627ea0f29 100644 --- a/libcef/browser/prefs/browser_prefs.cc +++ b/libcef/browser/prefs/browser_prefs.cc @@ -26,7 +26,6 @@ #include "chrome/browser/media/webrtc/permission_bubble_media_access_handler.h" #include "chrome/browser/net/profile_network_context_service.h" #include "chrome/browser/net/system_network_context_manager.h" -#include "chrome/browser/plugins/plugin_info_host_impl.h" #include "chrome/browser/prefetch/prefetch_prefs.h" #include "chrome/browser/prefs/chrome_command_line_pref_store.h" #include "chrome/browser/printing/print_preview_sticky_settings.h" @@ -74,9 +73,10 @@ #endif #if BUILDFLAG(ENABLE_SUPERVISED_USERS) +#include "chrome/browser/profiles/profile_key.h" #include "chrome/browser/supervised_user/supervised_user_pref_store.h" -#include "chrome/browser/supervised_user/supervised_user_settings_service.h" #include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h" +#include "components/supervised_user/core/browser/supervised_user_settings_service.h" #endif namespace browser_prefs { @@ -176,7 +176,7 @@ std::unique_ptr CreatePrefService(Profile* profile, #if BUILDFLAG(ENABLE_SUPERVISED_USERS) if (profile) { // Used to store supervised user preferences. - SupervisedUserSettingsService* supervised_user_settings = + auto* supervised_user_settings = SupervisedUserSettingsServiceFactory::GetForKey( profile->GetProfileKey()); @@ -223,7 +223,6 @@ std::unique_ptr CreatePrefService(Profile* profile, certificate_transparency::prefs::RegisterPrefs(registry.get()); flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry.get()); media_router::RegisterLocalStatePrefs(registry.get()); - PluginInfoHostImpl::RegisterUserPrefs(registry.get()); PrefProxyConfigTrackerImpl::RegisterPrefs(registry.get()); ProfileNetworkContextService::RegisterLocalStatePrefs(registry.get()); SSLConfigServiceManager::RegisterPrefs(registry.get()); @@ -310,6 +309,10 @@ std::unique_ptr CreatePrefService(Profile* profile, registry->RegisterBooleanPref( prefs::kAccessControlAllowMethodsInCORSPreflightSpecConformant, true); + // Based on browser_prefs::RegisterProfilePrefs. + registry->RegisterBooleanPref(prefs::kAccessibilityPdfOcrAlwaysActive, + false); + // Spell checking preferences. // Modify defaults from SpellcheckServiceFactory::RegisterProfilePrefs. std::string spellcheck_lang = diff --git a/libcef/browser/prefs/pref_helper.cc b/libcef/browser/prefs/pref_helper.cc index 714882fea..3acb9c5e3 100644 --- a/libcef/browser/prefs/pref_helper.cc +++ b/libcef/browser/prefs/pref_helper.cc @@ -29,7 +29,7 @@ const char* GetTypeString(base::Value::Type type) { return "STRING"; case base::Value::Type::BINARY: return "BINARY"; - case base::Value::Type::DICTIONARY: + case base::Value::Type::DICT: return "DICTIONARY"; case base::Value::Type::LIST: return "LIST"; @@ -57,7 +57,7 @@ CefRefPtr GetPreference(PrefService* pref_service, CefRefPtr GetAllPreferences(PrefService* pref_service, bool include_defaults) { // Returns a DeepCopy of the value. - base::Value values = pref_service->GetPreferenceValues( + auto values = pref_service->GetPreferenceValues( include_defaults ? PrefService::INCLUDE_DEFAULTS : PrefService::EXCLUDE_DEFAULTS); diff --git a/libcef/browser/views/window_impl.cc b/libcef/browser/views/window_impl.cc index ecd69b44b..dff70d3b6 100644 --- a/libcef/browser/views/window_impl.cc +++ b/libcef/browser/views/window_impl.cc @@ -23,9 +23,6 @@ #include "ui/aura/test/ui_controls_factory_aura.h" #include "ui/aura/window.h" #include "ui/base/test/ui_controls_aura.h" -#if BUILDFLAG(IS_OZONE) -#include "ui/views/test/ui_controls_factory_desktop_aura_ozone.h" -#endif #endif // defined(USE_AURA) #if BUILDFLAG(IS_WIN) @@ -45,8 +42,7 @@ void InitializeUITesting() { ui_controls::InstallUIControlsAura( aura::test::CreateUIControlsAura(nullptr)); #elif BUILDFLAG(IS_OZONE) - ui_controls::InstallUIControlsAura( - views::test::CreateUIControlsDesktopAuraOzone()); + ui_controls::EnableUIControls(); #endif #endif // defined(USE_AURA) diff --git a/libcef/common/alloy/alloy_main_delegate.cc b/libcef/common/alloy/alloy_main_delegate.cc index d79c6a8c6..ab6ee426f 100644 --- a/libcef/common/alloy/alloy_main_delegate.cc +++ b/libcef/common/alloy/alloy_main_delegate.cc @@ -33,7 +33,6 @@ #include "components/component_updater/component_updater_paths.h" #include "components/content_settings/core/common/content_settings_pattern.h" #include "components/embedder_support/switches.h" -#include "components/spellcheck/common/spellcheck_features.h" #include "components/viz/common/features.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" @@ -260,12 +259,6 @@ absl::optional AlloyMainDelegate::BasicStartupComplete() { // parent windows (see issue #2805). disable_features.push_back(features::kCalculateNativeWinOcclusion.name); } - - if (spellcheck::kWinUseBrowserSpellChecker.default_state == - base::FEATURE_ENABLED_BY_DEFAULT) { - // TODO: Add support for windows spellcheck service (see issue #3055). - disable_features.push_back(spellcheck::kWinUseBrowserSpellChecker.name); - } #endif // BUILDFLAG(IS_WIN) if (features::kBackForwardCache.default_state == diff --git a/libcef/common/alloy/alloy_main_delegate.h b/libcef/common/alloy/alloy_main_delegate.h index 45652cc4c..911a16167 100644 --- a/libcef/common/alloy/alloy_main_delegate.h +++ b/libcef/common/alloy/alloy_main_delegate.h @@ -17,6 +17,10 @@ #include "content/public/app/content_main_delegate.h" +#if BUILDFLAG(IS_WIN) +#include "components/spellcheck/common/spellcheck_features.h" +#endif + namespace base { class CommandLine; } @@ -90,6 +94,12 @@ class AlloyMainDelegate : public content::ContentMainDelegate, AlloyContentClient content_client_; CefResourceBundleDelegate resource_bundle_delegate_; + +#if BUILDFLAG(IS_WIN) + // TODO: Add support for windows spellcheck service (see issue #3055). + spellcheck::ScopedDisableBrowserSpellCheckerForTesting + disable_browser_spellchecker_; +#endif }; #endif // CEF_LIBCEF_COMMON_ALLOY_ALLOY_MAIN_DELEGATE_H_ diff --git a/libcef/common/values_impl.cc b/libcef/common/values_impl.cc index 078410a0d..a90fd96cf 100644 --- a/libcef/common/values_impl.cc +++ b/libcef/common/values_impl.cc @@ -418,7 +418,7 @@ void CefValueImpl::SetValueInternal(absl::optional value) { case base::Value::Type::BINARY: binary_value_ = new CefBinaryValueImpl(std::move(*value)); break; - case base::Value::Type::DICTIONARY: + case base::Value::Type::DICT: dictionary_value_ = new CefDictionaryValueImpl(std::move(*value), /*read_only=*/false); break; @@ -828,7 +828,7 @@ CefValueType CefDictionaryValueImpl::GetType(const CefString& key) { return VTYPE_STRING; case base::Value::Type::BINARY: return VTYPE_BINARY; - case base::Value::Type::DICTIONARY: + case base::Value::Type::DICT: return VTYPE_DICTIONARY; case base::Value::Type::LIST: return VTYPE_LIST; @@ -1275,7 +1275,7 @@ CefValueType CefListValueImpl::GetType(size_t index) { return VTYPE_STRING; case base::Value::Type::BINARY: return VTYPE_BINARY; - case base::Value::Type::DICTIONARY: + case base::Value::Type::DICT: return VTYPE_DICTIONARY; case base::Value::Type::LIST: return VTYPE_LIST; diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.cc b/libcef/renderer/alloy/alloy_content_renderer_client.cc index 51d89cfdc..a20428ba1 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.cc +++ b/libcef/renderer/alloy/alloy_content_renderer_client.cc @@ -72,6 +72,7 @@ #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" #include "content/public/common/url_constants.h" +#include "content/public/renderer/render_frame.h" #include "extensions/common/manifest_handlers/csp_info.h" #include "extensions/common/switches.h" #include "extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container_manager.h" diff --git a/libcef_dll/base/cef_weak_ptr.cc b/libcef_dll/base/cef_weak_ptr.cc index 709500e6f..1f2d304c6 100644 --- a/libcef_dll/base/cef_weak_ptr.cc +++ b/libcef_dll/base/cef_weak_ptr.cc @@ -5,7 +5,7 @@ #include "include/base/cef_weak_ptr.h" namespace base { -namespace internal { +namespace cef_internal { WeakReference::Flag::Flag() { // Flags only become bound when checked for validity, or invalidated, @@ -97,5 +97,5 @@ WeakPtrFactoryBase::~WeakPtrFactoryBase() { ptr_ = 0; } -} // namespace internal +} // namespace cef_internal } // namespace base diff --git a/patch/patch.cfg b/patch/patch.cfg index 2c6a915e3..dd9526db1 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -609,15 +609,18 @@ patches = [ 'name': 'linux_glib_deprecated_volatile' }, { - # Specify an output name for the pdfium build component to fix PDF - # loading with component build. - # https://pdfium-review.googlesource.com/c/pdfium/+/103501 - 'name': 'pdfium_103501', - 'path': 'third_party/pdfium' + # Restore low-level attribute access from WebElement which was removed in + # https://chromium-review.googlesource.com/c/chromium/src/+/4200240 + 'name': 'blink_web_element_4200240' }, { - # Windows: Fix cef_sandbox compile error related to unsafe narrowing. - # https://chromium-review.googlesource.com/c/chromium/src/+/4219163 - 'name': 'win_power_monitor_4219163' + # win: Add missing process_handle.h include for cef_sandbox build. + # https://chromium-review.googlesource.com/c/chromium/src/+/4294575 + 'name': 'base_logging_4294575' + }, + { + # Fix Check failed: !*GetSingletonDisallowedTls() on shutdown. + # https://chromium-review.googlesource.com/c/chromium/src/+/4294854 + 'name': 'rlz_tracker_4294854' } ] diff --git a/patch/patches/base_logging_4294575.patch b/patch/patches/base_logging_4294575.patch new file mode 100644 index 000000000..77783beea --- /dev/null +++ b/patch/patches/base_logging_4294575.patch @@ -0,0 +1,20 @@ +diff --git base/logging.cc base/logging.cc +index 496e68dfcd33a..b1b0af0710f28 100644 +--- base/logging.cc ++++ base/logging.cc +@@ -20,6 +20,7 @@ + #include "base/debug/crash_logging.h" + #include "base/immediate_crash.h" + #include "base/pending_task.h" ++#include "base/process/process_handle.h" + #include "base/strings/string_piece.h" + #include "base/task/common/task_annotator.h" + #include "base/trace_event/base_tracing.h" +@@ -72,7 +73,6 @@ typedef HANDLE FileHandle; + #include + #include + #include +-#include "base/process/process_handle.h" + #define MAX_PATH PATH_MAX + typedef FILE* FileHandle; + #endif diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index d58b31342..28383897a 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,5 +1,5 @@ diff --git base/BUILD.gn base/BUILD.gn -index 1f0e5cc5f0fae..6f2003a67c9ce 100644 +index 422702cb196c5..7118ae9c9f467 100644 --- base/BUILD.gn +++ base/BUILD.gn @@ -39,6 +39,7 @@ import("//build/config/ui.gni") @@ -10,7 +10,7 @@ index 1f0e5cc5f0fae..6f2003a67c9ce 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") -@@ -1960,7 +1961,11 @@ component("base") { +@@ -1509,7 +1510,11 @@ component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 1f0e5cc5f0fae..6f2003a67c9ce 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -2104,6 +2109,12 @@ component("base") { +@@ -1909,6 +1914,12 @@ component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } @@ -35,9 +35,9 @@ index 1f0e5cc5f0fae..6f2003a67c9ce 100644 + libs += [ "cfgmgr32.lib", - "powrprof.lib", + "ntdll.lib", diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc -index fd6e8a1696c94..df996398c1e78 100644 +index 09ce0dc0c5016..8b847a24918f5 100644 --- base/allocator/dispatcher/dispatcher.cc +++ base/allocator/dispatcher/dispatcher.cc @@ -13,6 +13,7 @@ diff --git a/patch/patches/blink_web_element_4200240.patch b/patch/patches/blink_web_element_4200240.patch new file mode 100644 index 000000000..f9c4da32a --- /dev/null +++ b/patch/patches/blink_web_element_4200240.patch @@ -0,0 +1,43 @@ +diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h +index a23dd0a402704..91e4d3615fb6a 100644 +--- third_party/blink/public/web/web_element.h ++++ third_party/blink/public/web/web_element.h +@@ -81,6 +81,9 @@ class BLINK_EXPORT WebElement : public WebNode { + void SetAttribute(const WebString& name, const WebString& value); + WebString TextContent() const; + WebString InnerHTML() const; ++ WebString AttributeLocalName(unsigned index) const; ++ WebString AttributeValue(unsigned index) const; ++ unsigned AttributeCount() const; + + // Returns all