diff --git a/BUILD.gn b/BUILD.gn index bade64a19..46f5698af 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -350,6 +350,8 @@ static_library("libcef_static") { "libcef/browser/extensions/component_extension_resource_manager.h", "libcef/browser/extensions/extensions_api_client.cc", "libcef/browser/extensions/extensions_api_client.h", + "libcef/browser/extensions/extensions_browser_api_provider.cc", + "libcef/browser/extensions/extensions_browser_api_provider.h", "libcef/browser/extensions/extensions_browser_client.cc", "libcef/browser/extensions/extensions_browser_client.h", "libcef/browser/extensions/extension_background_host.cc", @@ -520,6 +522,8 @@ static_library("libcef_static") { "libcef/common/drag_data_impl.h", "libcef/common/extensions/chrome_generated_schemas.cc", "libcef/common/extensions/chrome_generated_schemas.h", + "libcef/common/extensions/extensions_api_provider.cc", + "libcef/common/extensions/extensions_api_provider.h", "libcef/common/extensions/extensions_client.cc", "libcef/common/extensions/extensions_client.h", "libcef/common/extensions/extensions_util.cc", @@ -673,6 +677,7 @@ static_library("libcef_static") { "//components/printing/browser", "//components/printing/common", "//components/printing/renderer", + "//components/safe_browsing/db:test_database_manager", "//components/services/pdf_compositor:pdf_compositor_manifest", "//components/services/pdf_compositor/public/cpp:utils", "//components/services/pdf_compositor/public/interfaces", @@ -696,9 +701,10 @@ static_library("libcef_static") { "//crypto", "//device/base", "//extensions/browser", - "//extensions/browser/api:api_registration", + "//extensions/browser:core_api_provider", "//extensions/buildflags", "//extensions/common/api", + "//extensions/common:core_api_provider", "//extensions/renderer", "//gpu", "//ipc", @@ -766,6 +772,7 @@ static_library("libcef_static") { ] deps += [ + "//chrome/install_static:secondary_module", "//chrome_elf", ] diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 20776c091..2e7394b3f 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/70.0.3516.0', + 'chromium_checkout': 'refs/tags/70.0.3538.0', } diff --git a/libcef/browser/browser_context_impl.cc b/libcef/browser/browser_context_impl.cc index c8338844f..68bd2dbc4 100644 --- a/libcef/browser/browser_context_impl.cc +++ b/libcef/browser/browser_context_impl.cc @@ -519,7 +519,7 @@ HostContentSettingsMap* CefBrowserContextImpl::GetHostContentSettingsMap() { // that can be stored in the settings map (for example, default values set // via DefaultProvider::SetWebsiteSetting). host_content_settings_map_ = - new HostContentSettingsMap(GetPrefs(), false, false, false); + new HostContentSettingsMap(GetPrefs(), false, false, false, false); // Change the default plugin policy. const base::CommandLine* command_line = diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index 06f0f5a02..d648b8fb1 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -749,7 +749,7 @@ class CefBrowserHostImpl : public CefBrowserHost, CefDevToolsFrontend* devtools_frontend_; // Observers that want to be notified of changes to this object. - base::ObserverList observers_; + base::ObserverList::Unchecked observers_; // Used to provide unique incremental IDs for each find request. int find_request_id_counter_ = 0; diff --git a/libcef/browser/browser_main.cc b/libcef/browser/browser_main.cc index fbe5cdae2..f214bbaa6 100644 --- a/libcef/browser/browser_main.cc +++ b/libcef/browser/browser_main.cc @@ -222,16 +222,16 @@ void CefBrowserMainParts::PostMainMessageLoopRun() { DCHECK(global_request_context_->HasOneRef()); global_request_context_ = NULL; - if (extensions::ExtensionsEnabled()) { - extensions::ExtensionsBrowserClient::Set(NULL); - extensions_browser_client_.reset(); - } - for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) chrome_extra_parts_[i]->PostMainMessageLoopRun(); } void CefBrowserMainParts::PostDestroyThreads() { + if (extensions::ExtensionsEnabled()) { + extensions::ExtensionsBrowserClient::Set(NULL); + extensions_browser_client_.reset(); + } + #if defined(USE_AURA) // Delete the DesktopTestViewsDelegate. delete views::ViewsDelegate::GetInstance(); diff --git a/libcef/browser/chrome_browser_process_stub.cc b/libcef/browser/chrome_browser_process_stub.cc index 694326df4..28061fe6a 100644 --- a/libcef/browser/chrome_browser_process_stub.cc +++ b/libcef/browser/chrome_browser_process_stub.cc @@ -111,12 +111,6 @@ ChromeBrowserProcessStub::system_network_context_manager() { return NULL; } -network::NetworkConnectionTracker* -ChromeBrowserProcessStub::network_connection_tracker() { - NOTREACHED(); - return NULL; -} - network::NetworkQualityTracker* ChromeBrowserProcessStub::network_quality_tracker() { NOTREACHED(); diff --git a/libcef/browser/chrome_browser_process_stub.h b/libcef/browser/chrome_browser_process_stub.h index 93d3dddc4..a7bb3272e 100644 --- a/libcef/browser/chrome_browser_process_stub.h +++ b/libcef/browser/chrome_browser_process_stub.h @@ -49,7 +49,6 @@ class ChromeBrowserProcessStub : public BrowserProcess, rappor::RapporServiceImpl* rappor_service() override; IOThread* io_thread() override; SystemNetworkContextManager* system_network_context_manager() override; - network::NetworkConnectionTracker* network_connection_tracker() override; network::NetworkQualityTracker* network_quality_tracker() override; WatchDogThread* watchdog_thread() override; ProfileManager* profile_manager() override; diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index f9f4ed6f1..8fd56f513 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -772,6 +772,17 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches( } } +bool CefContentBrowserClient::ShouldEnableStrictSiteIsolation() { + // TODO(cef): Enable this mode once we figure out why it breaks ceftests that + // rely on command-line arguments passed to the renderer process. It looks + // like the first renderer process is getting all of the callbacks despite + // multiple renderer processes being launched. + // For example, V8RendererTest::OnBrowserCreated appears to get the same + // kV8TestCmdArg value twice when running with: + // --gtest_filter=V8Test.ContextEvalCspBypassUnsafeEval:V8Test.ContextEntered + return false; +} + std::string CefContentBrowserClient::GetApplicationLocale() { return g_browser_process->GetApplicationLocale(); } @@ -1074,16 +1085,16 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory( content::BrowserContext* browser_context, content::RenderFrameHost* frame, bool is_navigation, - network::mojom::URLLoaderFactoryRequest* factory_request, - scoped_refptr* redirect_checker) { + const GURL& url, + network::mojom::URLLoaderFactoryRequest* factory_request) { if (!extensions::ExtensionsEnabled()) return false; auto* web_request_api = extensions::BrowserContextKeyedAPIFactory::Get( browser_context); - return web_request_api->MaybeProxyURLLoaderFactory( - frame, is_navigation, factory_request, redirect_checker); + return web_request_api->MaybeProxyURLLoaderFactory(frame, is_navigation, + factory_request); } bool CefContentBrowserClient::HandleExternalProtocol( diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index 4e12bc4ba..4c0070e72 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -62,6 +62,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient { content::BrowserContext* context2) override; void AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id) override; + bool ShouldEnableStrictSiteIsolation() override; std::string GetApplicationLocale() override; content::QuotaPermissionContext* CreateQuotaPermissionContext() override; void GetQuotaSettings( @@ -141,8 +142,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient { content::BrowserContext* browser_context, content::RenderFrameHost* frame, bool is_navigation, - network::mojom::URLLoaderFactoryRequest* factory_request, - scoped_refptr* redirect_checker) override; + const GURL& url, + network::mojom::URLLoaderFactoryRequest* factory_request) override; bool HandleExternalProtocol( const GURL& url, diff --git a/libcef/browser/context.cc b/libcef/browser/context.cc index 633ca1764..cce312ecc 100644 --- a/libcef/browser/context.cc +++ b/libcef/browser/context.cc @@ -33,6 +33,7 @@ #if defined(OS_WIN) #include "base/strings/utf_string_conversions.h" +#include "chrome/install_static/initialize_from_primary_module.h" #include "chrome_elf/chrome_elf_main.h" #include "components/crash/content/app/crashpad.h" #include "content/public/app/sandbox_helper_win.h" @@ -71,6 +72,16 @@ void DisableFMA3() { } #endif // defined(ARCH_CPU_X86_64) +// Transfer state from chrome_elf.dll to the libcef.dll. Accessed when +// loading chrome://system. +void InitInstallDetails() { + static bool initialized = false; + if (initialized) + return; + initialized = true; + install_static::InitializeFromPrimaryModule(); +} + // Signal chrome_elf to initialize crash reporting, rather than doing it in // DllMain. See https://crbug.com/656800 for details. void InitCrashReporter() { @@ -156,6 +167,7 @@ int CefExecuteProcess(const CefMainArgs& args, #if defined(ARCH_CPU_X86_64) DisableFMA3(); #endif + InitInstallDetails(); InitCrashReporter(); #endif @@ -215,6 +227,7 @@ bool CefInitialize(const CefMainArgs& args, #if defined(ARCH_CPU_X86_64) DisableFMA3(); #endif + InitInstallDetails(); InitCrashReporter(); #endif diff --git a/libcef/browser/cookie_manager_impl.cc b/libcef/browser/cookie_manager_impl.cc index 7cbc4a094..2d4061a04 100644 --- a/libcef/browser/cookie_manager_impl.cc +++ b/libcef/browser/cookie_manager_impl.cc @@ -19,6 +19,8 @@ #include "base/format_macros.h" #include "base/logging.h" #include "base/threading/thread_restrictions.h" +#include "chrome/browser/browser_process.h" +#include "components/net_log/chrome_net_log.h" #include "content/browser/storage_partition_impl.h" #include "net/cookies/cookie_util.h" #include "net/cookies/parsed_cookie.h" @@ -307,7 +309,7 @@ bool CefCookieManagerImpl::SetStoragePath( // facilitate unit test expectations. This task runner MUST be // configured with BLOCK_SHUTDOWN. CefContentBrowserClient::Get()->background_task_runner(), - persist_session_cookies, NULL); + persist_session_cookies, nullptr); } else { NOTREACHED() << "The cookie storage directory could not be created"; storage_path_.clear(); @@ -317,7 +319,8 @@ bool CefCookieManagerImpl::SetStoragePath( // Set the new cookie store that will be used for all new requests. The old // cookie store, if any, will be automatically flushed and closed when no // longer referenced. - cookie_store_.reset(new net::CookieMonster(persistent_store.get(), NULL)); + cookie_store_.reset(new net::CookieMonster(persistent_store.get(), nullptr, + g_browser_process->net_log())); if (persistent_store.get() && persist_session_cookies) cookie_store_->SetPersistSessionCookies(true); storage_path_ = new_path; diff --git a/libcef/browser/extensions/extension_host_delegate.cc b/libcef/browser/extensions/extension_host_delegate.cc index b7b48ff00..2d16f13a2 100644 --- a/libcef/browser/extensions/extension_host_delegate.cc +++ b/libcef/browser/extensions/extension_host_delegate.cc @@ -62,4 +62,16 @@ ExtensionHostQueue* CefExtensionHostDelegate::GetExtensionHostQueue() const { return CefExtensionsBrowserClient::Get()->GetExtensionHostQueue(); } +gfx::Size CefExtensionHostDelegate::EnterPictureInPicture( + content::WebContents* web_contents, + const viz::SurfaceId& surface_id, + const gfx::Size& natural_size) { + NOTREACHED(); + return gfx::Size(); +} + +void CefExtensionHostDelegate::ExitPictureInPicture() { + NOTREACHED(); +} + } // namespace extensions diff --git a/libcef/browser/extensions/extension_host_delegate.h b/libcef/browser/extensions/extension_host_delegate.h index 6bd64a573..0d4f2ec1e 100644 --- a/libcef/browser/extensions/extension_host_delegate.h +++ b/libcef/browser/extensions/extension_host_delegate.h @@ -35,6 +35,10 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate { content::MediaStreamType type, const Extension* extension) override; ExtensionHostQueue* GetExtensionHostQueue() const override; + gfx::Size EnterPictureInPicture(content::WebContents* web_contents, + const viz::SurfaceId& surface_id, + const gfx::Size& natural_size) override; + void ExitPictureInPicture() override; private: DISALLOW_COPY_AND_ASSIGN(CefExtensionHostDelegate); diff --git a/libcef/browser/extensions/extension_web_contents_observer.h b/libcef/browser/extensions/extension_web_contents_observer.h index 3690bc956..1f1d2046d 100644 --- a/libcef/browser/extensions/extension_web_contents_observer.h +++ b/libcef/browser/extensions/extension_web_contents_observer.h @@ -38,7 +38,8 @@ class CefExtensionWebContentsObserver // Our content script observers. Declare at top so that it will outlive all // other members, since they might add themselves as observers. - base::ObserverList script_execution_observers_; + base::ObserverList::Unchecked + script_execution_observers_; std::unique_ptr script_executor_; diff --git a/libcef/browser/extensions/extensions_browser_api_provider.cc b/libcef/browser/extensions/extensions_browser_api_provider.cc new file mode 100644 index 000000000..a2e28e07c --- /dev/null +++ b/libcef/browser/extensions/extensions_browser_api_provider.cc @@ -0,0 +1,29 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/browser/extensions/chrome_api_registration.h" +#include "libcef/browser/extensions/extensions_browser_api_provider.h" + +//#include "cef/libcef/browser/extensions/api/generated_api_registration.h" +#include "extensions/browser/api/generated_api_registration.h" + +namespace extensions { + +CefExtensionsBrowserAPIProvider::CefExtensionsBrowserAPIProvider() = + default; +CefExtensionsBrowserAPIProvider::~CefExtensionsBrowserAPIProvider() = + default; + +void CefExtensionsBrowserAPIProvider::RegisterExtensionFunctions( + ExtensionFunctionRegistry* registry) { + // CEF-only APIs. + // TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See + // libcef/common/extensions/api/README.txt for details. + // api::cef::CefGeneratedFunctionRegistry::RegisterAll(registry); + + // Chrome APIs whitelisted by CEF. + api::cef::ChromeFunctionRegistry::RegisterAll(registry); +} + +} // namespace extensions diff --git a/libcef/browser/extensions/extensions_browser_api_provider.h b/libcef/browser/extensions/extensions_browser_api_provider.h new file mode 100644 index 000000000..f6fce1494 --- /dev/null +++ b/libcef/browser/extensions/extensions_browser_api_provider.h @@ -0,0 +1,26 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_BROWSER_API_PROVIDER_H_ +#define CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_BROWSER_API_PROVIDER_H_ + +#include "base/macros.h" +#include "extensions/browser/extensions_browser_api_provider.h" + +namespace extensions { + +class CefExtensionsBrowserAPIProvider : public ExtensionsBrowserAPIProvider { + public: + CefExtensionsBrowserAPIProvider(); + ~CefExtensionsBrowserAPIProvider() override; + + void RegisterExtensionFunctions(ExtensionFunctionRegistry* registry) override; + + private: + DISALLOW_COPY_AND_ASSIGN(CefExtensionsBrowserAPIProvider); +}; + +} // namespace extensions + +#endif // CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_BROWSER_API_PROVIDER_H_ diff --git a/libcef/browser/extensions/extensions_browser_client.cc b/libcef/browser/extensions/extensions_browser_client.cc index 93dc92512..4ef22768b 100644 --- a/libcef/browser/extensions/extensions_browser_client.cc +++ b/libcef/browser/extensions/extensions_browser_client.cc @@ -9,15 +9,14 @@ #include "libcef/browser/browser_context_impl.h" #include "libcef/browser/browser_host_impl.h" -#include "libcef/browser/extensions/chrome_api_registration.h" #include "libcef/browser/extensions/component_extension_resource_manager.h" #include "libcef/browser/extensions/extension_system.h" #include "libcef/browser/extensions/extension_system_factory.h" #include "libcef/browser/extensions/extension_web_contents_observer.h" #include "libcef/browser/extensions/extensions_api_client.h" +#include "libcef/browser/extensions/extensions_browser_api_provider.h" #include "libcef/browser/request_context_impl.h" -//#include "cef/libcef/browser/extensions/api/generated_api_registration.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/chrome_url_request_util.h" #include "chrome/browser/extensions/event_router_forwarder.h" @@ -25,11 +24,10 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "extensions/browser/api/extensions_api_client.h" -#include "extensions/browser/api/generated_api_registration.h" #include "extensions/browser/api/runtime/runtime_api_delegate.h" #include "extensions/browser/app_sorting.h" +#include "extensions/browser/core_extensions_browser_api_provider.h" #include "extensions/browser/event_router.h" -#include "extensions/browser/extension_function_registry.h" #include "extensions/browser/extension_host_delegate.h" #include "extensions/browser/mojo/interface_registration.h" #include "extensions/browser/serial_extension_host_queue.h" @@ -43,7 +41,10 @@ namespace extensions { CefExtensionsBrowserClient::CefExtensionsBrowserClient() : api_client_(new CefExtensionsAPIClient), - resource_manager_(new CefComponentExtensionResourceManager) {} + resource_manager_(new CefComponentExtensionResourceManager) { + AddAPIProvider(std::make_unique()); + AddAPIProvider(std::make_unique()); +} CefExtensionsBrowserClient::~CefExtensionsBrowserClient() {} @@ -276,20 +277,6 @@ CefExtensionsBrowserClient::GetExtensionSystemFactory() { return CefExtensionSystemFactory::GetInstance(); } -void CefExtensionsBrowserClient::RegisterExtensionFunctions( - ExtensionFunctionRegistry* registry) const { - // Register core extension-system APIs. - api::GeneratedFunctionRegistry::RegisterAll(registry); - - // CEF-only APIs. - // TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See - // libcef/common/extensions/api/README.txt for details. - // api::cef::CefGeneratedFunctionRegistry::RegisterAll(registry); - - // Chrome APIs whitelisted by CEF. - api::cef::ChromeFunctionRegistry::RegisterAll(registry); -} - void CefExtensionsBrowserClient::RegisterExtensionInterfaces( service_manager::BinderRegistryWithArgs* registry, diff --git a/libcef/browser/extensions/extensions_browser_client.h b/libcef/browser/extensions/extensions_browser_client.h index 1b0b95b47..2f002058d 100644 --- a/libcef/browser/extensions/extensions_browser_client.h +++ b/libcef/browser/extensions/extensions_browser_client.h @@ -89,8 +89,6 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient { bool IsAppModeForcedForApp(const ExtensionId& extension_id) override; bool IsLoggedInAsPublicAccount() override; ExtensionSystemProvider* GetExtensionSystemFactory() override; - void RegisterExtensionFunctions( - ExtensionFunctionRegistry* registry) const override; void RegisterExtensionInterfaces(service_manager::BinderRegistryWithArgs< content::RenderFrameHost*>* registry, content::RenderFrameHost* render_frame_host, diff --git a/libcef/browser/native/native_menu_win.h b/libcef/browser/native/native_menu_win.h index 793c908ee..fe27b62f5 100644 --- a/libcef/browser/native/native_menu_win.h +++ b/libcef/browser/native/native_menu_win.h @@ -140,7 +140,7 @@ class CefNativeMenuWin : public MenuWrapper { MenuAction menu_action_; // A list of listeners to call when the menu opens. - base::ObserverList listeners_; + base::ObserverList::Unchecked listeners_; // Keep track of whether the listeners have already been called at least // once. diff --git a/libcef/browser/net/crlset_file_util_impl.cc b/libcef/browser/net/crlset_file_util_impl.cc index 191d879d0..7abd68537 100644 --- a/libcef/browser/net/crlset_file_util_impl.cc +++ b/libcef/browser/net/crlset_file_util_impl.cc @@ -19,7 +19,7 @@ namespace { void SetCRLSetIfNewer(scoped_refptr crl_set) { CEF_REQUIRE_IOT(); - net::SSLConfigService::SetCRLSetIfNewer(crl_set); + // TODO(cef): Re-implement via NetworkService. } void LoadFromDisk(const base::FilePath& path) { diff --git a/libcef/browser/net/network_delegate.cc b/libcef/browser/net/network_delegate.cc index db91455c5..ae5c891b4 100644 --- a/libcef/browser/net/network_delegate.cc +++ b/libcef/browser/net/network_delegate.cc @@ -445,10 +445,7 @@ net::NetworkDelegate::AuthRequiredResponse CefNetworkDelegate::OnAuthRequired( } bool CefNetworkDelegate::OnCanGetCookies(const net::URLRequest& request, - const net::CookieList& cookie_list, - bool allowed_from_caller) { - if (!allowed_from_caller) - return false; + const net::CookieList& cookie_list) { if (net_util::IsInternalRequest(&request)) return true; @@ -475,10 +472,7 @@ bool CefNetworkDelegate::OnCanGetCookies(const net::URLRequest& request, bool CefNetworkDelegate::OnCanSetCookie(const net::URLRequest& request, const net::CanonicalCookie& cookie, - net::CookieOptions* options, - bool allowed_from_caller) { - if (!allowed_from_caller) - return false; + net::CookieOptions* options) { if (net_util::IsInternalRequest(&request)) return true; diff --git a/libcef/browser/net/network_delegate.h b/libcef/browser/net/network_delegate.h index 5db615eb0..82631e6fa 100644 --- a/libcef/browser/net/network_delegate.h +++ b/libcef/browser/net/network_delegate.h @@ -41,12 +41,10 @@ class CefNetworkDelegate : public net::NetworkDelegateImpl { bool started, int net_error) override; bool OnCanGetCookies(const net::URLRequest& request, - const net::CookieList& cookie_list, - bool allowed_from_caller) override; + const net::CookieList& cookie_list) override; bool OnCanSetCookie(const net::URLRequest& request, const net::CanonicalCookie& cookie, - net::CookieOptions* options, - bool allowed_from_caller) override; + net::CookieOptions* options) override; bool OnCanAccessFile(const net::URLRequest& request, const base::FilePath& original_path, const base::FilePath& absolute_path) const override; diff --git a/libcef/browser/net/url_request_context_getter_impl.cc b/libcef/browser/net/url_request_context_getter_impl.cc index e4762bf79..9ad59b984 100644 --- a/libcef/browser/net/url_request_context_getter_impl.cc +++ b/libcef/browser/net/url_request_context_getter_impl.cc @@ -503,8 +503,8 @@ void CefURLRequestContextGetterImpl::SetCookieStoragePath( // Set the new cookie store that will be used for all new requests. The old // cookie store, if any, will be automatically flushed and closed when no // longer referenced. - std::unique_ptr cookie_monster( - new net::CookieMonster(persistent_store.get(), NULL)); + std::unique_ptr cookie_monster(new net::CookieMonster( + persistent_store.get(), nullptr, io_state_->net_log_)); if (persistent_store.get() && persist_session_cookies) cookie_monster->SetPersistSessionCookies(true); io_state_->cookie_store_path_ = path; diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index c1e565d59..48e7ef18d 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -245,7 +245,6 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( // Matching the attributes from BrowserCompositorMac. delegated_frame_host_ = std::make_unique( AllocateFrameSinkId(is_guest_view_hack), this, - base::FeatureList::IsEnabled(features::kVizDisplayCompositor), true /* should_register_frame_sink_id */); root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); @@ -291,7 +290,7 @@ CefRenderWidgetHostViewOSR::~CefRenderWidgetHostViewOSR() { // necessary to remove all connections to its old ui::Compositor. if (is_showing_) delegated_frame_host_->WasHidden(); - delegated_frame_host_->ResetCompositor(); + delegated_frame_host_->DetachFromCompositor(); #endif PlatformDestroyCompositorWidget(); @@ -362,7 +361,7 @@ void CefRenderWidgetHostViewOSR::Show() { #if defined(OS_MACOSX) browser_compositor_->SetRenderWidgetHostIsHidden(false); #else - delegated_frame_host_->SetCompositor(compositor_.get()); + delegated_frame_host_->AttachToCompositor(compositor_.get()); delegated_frame_host_->WasShown(GetLocalSurfaceId(), GetRootLayer()->bounds().size(), false); #endif @@ -387,7 +386,7 @@ void CefRenderWidgetHostViewOSR::Hide() { browser_compositor_->SetRenderWidgetHostIsHidden(true); #else GetDelegatedFrameHost()->WasHidden(); - GetDelegatedFrameHost()->ResetCompositor(); + GetDelegatedFrameHost()->DetachFromCompositor(); #endif is_showing_ = false; @@ -536,6 +535,10 @@ void CefRenderWidgetHostViewOSR::ClearCompositorFrame() { GetDelegatedFrameHost()->ClearDelegatedFrame(); } +void CefRenderWidgetHostViewOSR::ResetFallbackToFirstNavigationSurface() { + GetDelegatedFrameHost()->ResetFallbackToFirstNavigationSurface(); +} + void CefRenderWidgetHostViewOSR::InitAsPopup( content::RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) { @@ -907,11 +910,7 @@ bool CefRenderWidgetHostViewOSR::TransformPointToCoordSpaceForView( return true; } - // In TransformPointToLocalCoordSpace() there is a Point-to-Pixel conversion, - // but it is not necessary here because the final target view is responsible - // for converting before computing the final transform. - return GetDelegatedFrameHost()->TransformPointToCoordSpaceForView( - point, target_view, transformed_point, source); + return false; } void CefRenderWidgetHostViewOSR::DidNavigate() { @@ -974,10 +973,6 @@ void CefRenderWidgetHostViewOSR::OnFrameTokenChanged(uint32_t frame_token) { render_widget_host_->DidProcessFrame(frame_token); } -void CefRenderWidgetHostViewOSR::DidReceiveFirstFrameAfterNavigation() { - render_widget_host_->DidReceiveFirstFrameAfterNavigation(); -} - #endif // !defined(OS_MACOSX) bool CefRenderWidgetHostViewOSR::InstallTransparency() { diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 39faf09e6..80f7442ff 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -34,6 +34,11 @@ #include "ui/gfx/win/window_impl.h" #endif +#if defined(USE_AURA) +#include "third_party/blink/public/platform/web_cursor_info.h" +#include "ui/base/cursor/cursor.h" +#endif + namespace content { class RenderWidgetHost; class RenderWidgetHostImpl; @@ -135,6 +140,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, viz::CompositorFrame frame, base::Optional hit_test_region_list) override; void ClearCompositorFrame() override; + void ResetFallbackToFirstNavigationSurface() override; void InitAsPopup(content::RenderWidgetHostView* parent_host_view, const gfx::Rect& pos) override; void InitAsFullscreen( @@ -202,7 +208,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, void OnFirstSurfaceActivation(const viz::SurfaceInfo& surface_info) override; void OnBeginFrame(base::TimeTicks frame_time) override; void OnFrameTokenChanged(uint32_t frame_token) override; - void DidReceiveFirstFrameAfterNavigation() override; #endif // !defined(OS_MACOSX) bool InstallTransparency(); diff --git a/libcef/browser/osr/render_widget_host_view_osr_mac.mm b/libcef/browser/osr/render_widget_host_view_osr_mac.mm index c5f7ec28a..bd2678720 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_mac.mm +++ b/libcef/browser/osr/render_widget_host_view_osr_mac.mm @@ -15,6 +15,7 @@ #include "base/compiler_specific.h" #include "base/strings/utf_string_conversions.h" +#include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/common/view_messages.h" #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" #include "ui/display/screen.h" @@ -44,10 +45,6 @@ class MacHelper : public content::BrowserCompositorMacClient, view_->render_widget_host()->DidProcessFrame(frame_token); } - void DidReceiveFirstFrameAfterNavigation() override { - view_->render_widget_host()->DidReceiveFirstFrameAfterNavigation(); - } - void DestroyCompositorForShutdown() override {} bool SynchronizeVisualProperties( diff --git a/libcef/browser/prefs/pref_store.h b/libcef/browser/prefs/pref_store.h index 15d91dd73..4128face9 100644 --- a/libcef/browser/prefs/pref_store.h +++ b/libcef/browser/prefs/pref_store.h @@ -111,7 +111,7 @@ class CefPrefStore : public PersistentPrefStore { bool committed_; std::unique_ptr error_delegate_; - base::ObserverList observers_; + base::ObserverList::Unchecked observers_; DISALLOW_COPY_AND_ASSIGN(CefPrefStore); }; diff --git a/libcef/browser/printing/print_view_manager.cc b/libcef/browser/printing/print_view_manager.cc index 29c731b77..880cd596d 100644 --- a/libcef/browser/printing/print_view_manager.cc +++ b/libcef/browser/printing/print_view_manager.cc @@ -20,7 +20,7 @@ #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" -#include "printing/pdf_metafile_skia.h" +#include "printing/metafile_skia.h" #include "libcef/browser/thread_util.h" @@ -148,7 +148,7 @@ void SavePdfFile(scoped_refptr data, CEF_REQUIRE_BLOCKING(); DCHECK_GT(data->size(), 0U); - PdfMetafileSkia metafile; + MetafileSkia metafile; metafile.InitFromData(static_cast(data->front()), data->size()); base::File file(path, diff --git a/libcef/browser/printing/print_view_manager_base.cc b/libcef/browser/printing/print_view_manager_base.cc index f7bd40a05..82b159340 100644 --- a/libcef/browser/printing/print_view_manager_base.cc +++ b/libcef/browser/printing/print_view_manager_base.cc @@ -44,7 +44,7 @@ #include "content/public/browser/web_contents.h" #include "mojo/public/cpp/system/buffer.h" #include "printing/buildflags/buildflags.h" -#include "printing/pdf_metafile_skia.h" +#include "printing/metafile_skia.h" #include "printing/print_settings.h" #include "printing/printed_document.h" #include "ui/base/l10n/l10n_util.h" @@ -98,8 +98,7 @@ void CefPrintViewManagerBase::PrintDocument( print_job_->StartConversionToNativeFormat(print_data, page_size, content_area, offsets); #else - std::unique_ptr metafile = - std::make_unique(); + std::unique_ptr metafile = std::make_unique(); CHECK(metafile->InitFromData(print_data->front(), print_data->size())); // Update the rendered document. It will send notifications to the listener. @@ -183,8 +182,7 @@ void CefPrintViewManagerBase::OnDidPrintDocument( auto* client = PrintCompositeClient::FromWebContents(web_contents()); if (IsOopifEnabled() && print_job_->document()->settings().is_modifiable()) { client->DoCompositeDocumentToPdf( - params.document_cookie, render_frame_host, content.metafile_data_handle, - content.data_size, content.subframe_content_info, + params.document_cookie, render_frame_host, content, base::BindOnce(&CefPrintViewManagerBase::OnComposePdfDone, weak_ptr_factory_.GetWeakPtr(), params)); return; diff --git a/libcef/common/extensions/api/BUILD.gn b/libcef/common/extensions/api/BUILD.gn index 7d1b7d33f..bb9ebc4d6 100644 --- a/libcef/common/extensions/api/BUILD.gn +++ b/libcef/common/extensions/api/BUILD.gn @@ -18,20 +18,18 @@ import("//tools/json_schema_compiler/json_features.gni") #schema_include_rules = "//cef/libcef/browser/extensions/api:extensions::api::cef::%(namespace)s" #schema_dependencies = [ "//extensions/common/api" ] # -#json_schema_api("api") { +#generated_json_strings("api") { # sources = schema_sources # schemas = true -# bundle = true # configs = [ "//build/config:precompiled_headers" ] # bundle_name = "Cef" # # deps = schema_dependencies #} # -#json_schema_api("api_registration") { +#function_registration("api_registration") { # sources = schema_sources # impl_dir = "//cef/libcef/browser/extensions/api" -# bundle_registration = true # configs = [ "//build/config:precompiled_headers" ] # bundle_name = "Cef" # diff --git a/libcef/common/extensions/extensions_api_provider.cc b/libcef/common/extensions/extensions_api_provider.cc new file mode 100644 index 000000000..ac540fff1 --- /dev/null +++ b/libcef/common/extensions/extensions_api_provider.cc @@ -0,0 +1,89 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "libcef/common/extensions/extensions_api_provider.h" + +#include "libcef/common/extensions/chrome_generated_schemas.h" + +#include "cef/grit/cef_resources.h" +//#include "cef/libcef/common/extensions/api/generated_schemas.h" +#include "cef/libcef/common/extensions/api/cef_api_features.h" +#include "cef/libcef/common/extensions/api/cef_manifest_features.h" +#include "cef/libcef/common/extensions/api/cef_permission_features.h" +#include "chrome/common/extensions/chrome_aliases.h" +#include "chrome/common/extensions/chrome_manifest_handlers.h" +#include "extensions/common/features/json_feature_provider_source.h" +#include "extensions/common/permissions/permissions_info.h" + +namespace extensions { + +CefExtensionsAPIProvider::CefExtensionsAPIProvider() { +} + +void CefExtensionsAPIProvider::AddAPIFeatures(FeatureProvider* provider) { + AddCEFAPIFeatures(provider); +} + +void CefExtensionsAPIProvider::AddManifestFeatures( + FeatureProvider* provider) { + AddCEFManifestFeatures(provider); +} + +void CefExtensionsAPIProvider::AddPermissionFeatures( + FeatureProvider* provider) { + AddCEFPermissionFeatures(provider); +} + +void CefExtensionsAPIProvider::AddBehaviorFeatures( + FeatureProvider* provider) { + // No CEF-specific behavior features. +} + +void CefExtensionsAPIProvider::AddAPIJSONSources( + JSONFeatureProviderSource* json_source) { + // Extension API features specific to CEF. See + // libcef/common/extensions/api/README.txt for additional details. + json_source->LoadJSON(IDR_CEF_EXTENSION_API_FEATURES); +} + +bool CefExtensionsAPIProvider::IsAPISchemaGenerated(const std::string& name) { + // Schema for CEF-only APIs. + // TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See + // libcef/common/extensions/api/README.txt for details. + // if (api::cef::CefGeneratedSchemas::IsGenerated(name)) + // return true; + + // Chrome APIs whitelisted by CEF. + if (api::cef::ChromeGeneratedSchemas::IsGenerated(name)) + return true; + + return false; +} + +base::StringPiece CefExtensionsAPIProvider::GetAPISchema( + const std::string& name) { + // Schema for CEF-only APIs. + // TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See + // libcef/common/extensions/api/README.txt for details. + // if (api::cef::CefGeneratedSchemas::IsGenerated(name)) + // return api::cef::CefGeneratedSchemas::Get(name); + + // Chrome APIs whitelisted by CEF. + if (api::cef::ChromeGeneratedSchemas::IsGenerated(name)) + return api::cef::ChromeGeneratedSchemas::Get(name); + + return base::StringPiece(); +} + +void CefExtensionsAPIProvider::AddPermissionsProviders( + PermissionsInfo* permissions_info) { + permissions_info->AddProvider(chrome_api_permissions_, + GetChromePermissionAliases()); +} + +void CefExtensionsAPIProvider::RegisterManifestHandlers() { + RegisterChromeManifestHandlers(); +} + +} // namespace extensions diff --git a/libcef/common/extensions/extensions_api_provider.h b/libcef/common/extensions/extensions_api_provider.h new file mode 100644 index 000000000..f7c16620c --- /dev/null +++ b/libcef/common/extensions/extensions_api_provider.h @@ -0,0 +1,37 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CEF_LIBCEF_COMMON_EXTENSIONS_EXTENSIONS_API_PROVIDER_H_ +#define CEF_LIBCEF_COMMON_EXTENSIONS_EXTENSIONS_API_PROVIDER_H_ + +#include "base/macros.h" +#include "chrome/common/extensions/permissions/chrome_api_permissions.h" +#include "extensions/common/extensions_api_provider.h" + +namespace extensions { + +class CefExtensionsAPIProvider : public ExtensionsAPIProvider { + public: + CefExtensionsAPIProvider(); + + // ExtensionsAPIProvider: + void AddAPIFeatures(FeatureProvider* provider) override; + void AddManifestFeatures(FeatureProvider* provider) override; + void AddPermissionFeatures(FeatureProvider* provider) override; + void AddBehaviorFeatures(FeatureProvider* provider) override; + void AddAPIJSONSources(JSONFeatureProviderSource* json_source) override; + bool IsAPISchemaGenerated(const std::string& name) override; + base::StringPiece GetAPISchema(const std::string& name) override; + void AddPermissionsProviders(PermissionsInfo* permissions_info) override; + void RegisterManifestHandlers() override; + + private: + const ChromeAPIPermissions chrome_api_permissions_; + + DISALLOW_COPY_AND_ASSIGN(CefExtensionsAPIProvider); +}; + +} // namespace extensions + +#endif // CEF_LIBCEF_COMMON_EXTENSIONS_EXTENSIONS_API_PROVIDER_H_ diff --git a/libcef/common/extensions/extensions_client.cc b/libcef/common/extensions/extensions_client.cc index fbecaba5d..f0fb746bf 100644 --- a/libcef/common/extensions/extensions_client.cc +++ b/libcef/common/extensions/extensions_client.cc @@ -8,34 +8,15 @@ #include #include "libcef/common/cef_switches.h" -#include "libcef/common/extensions/chrome_generated_schemas.h" +#include "libcef/common/extensions/extensions_api_provider.h" #include "base/logging.h" -#include "cef/grit/cef_resources.h" -//#include "cef/libcef/common/extensions/api/generated_schemas.h" -#include "cef/libcef/common/extensions/api/cef_api_features.h" -#include "cef/libcef/common/extensions/api/cef_manifest_features.h" -#include "cef/libcef/common/extensions/api/cef_permission_features.h" -#include "chrome/common/extensions/chrome_aliases.h" -#include "chrome/common/extensions/chrome_manifest_handlers.h" -#include "chrome/grit/common_resources.h" -#include "extensions/common/api/api_features.h" -#include "extensions/common/api/behavior_features.h" -#include "extensions/common/api/generated_schemas.h" -#include "extensions/common/api/manifest_features.h" -#include "extensions/common/api/permission_features.h" -#include "extensions/common/common_manifest_handlers.h" +#include "extensions/common/core_extensions_api_provider.h" #include "extensions/common/extension_urls.h" -#include "extensions/common/extensions_aliases.h" -#include "extensions/common/features/feature_provider.h" -#include "extensions/common/features/json_feature_provider_source.h" #include "extensions/common/features/simple_feature.h" -#include "extensions/common/manifest_handler.h" #include "extensions/common/permissions/permission_message_provider.h" -#include "extensions/common/permissions/permissions_info.h" #include "extensions/common/permissions/permissions_provider.h" #include "extensions/common/url_pattern_set.h" -#include "extensions/grit/extensions_resources.h" namespace extensions { @@ -50,22 +31,14 @@ SimpleFeature* CreateFeature() { CefExtensionsClient::CefExtensionsClient() : webstore_base_url_(extension_urls::kChromeWebstoreBaseURL), - webstore_update_url_(extension_urls::kChromeWebstoreUpdateURL) {} + webstore_update_url_(extension_urls::kChromeWebstoreUpdateURL) { + AddAPIProvider(std::make_unique()); + AddAPIProvider(std::make_unique()); +} CefExtensionsClient::~CefExtensionsClient() {} -void CefExtensionsClient::Initialize() { - RegisterCommonManifestHandlers(); - RegisterChromeManifestHandlers(); - ManifestHandler::FinalizeRegistration(); - // TODO(jamescook): Do we need to whitelist any extensions? - - // Set up permissions. - PermissionsInfo::GetInstance()->AddProvider(chrome_api_permissions_, - GetChromePermissionAliases()); - PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_, - GetExtensionsPermissionAliases()); -} +void CefExtensionsClient::Initialize() {} void CefExtensionsClient::InitializeWebStoreUrls( base::CommandLine* command_line) {} @@ -79,40 +52,6 @@ const std::string CefExtensionsClient::GetProductName() { return "cef"; } -std::unique_ptr CefExtensionsClient::CreateFeatureProvider( - const std::string& name) const { - auto provider = std::make_unique(); - if (name == "api") { - AddCoreAPIFeatures(provider.get()); - AddCEFAPIFeatures(provider.get()); - } else if (name == "manifest") { - AddCoreManifestFeatures(provider.get()); - AddCEFManifestFeatures(provider.get()); - } else if (name == "permission") { - AddCorePermissionFeatures(provider.get()); - AddCEFPermissionFeatures(provider.get()); - } else if (name == "behavior") { - // Note: There are no CEF-specific behavior features. - AddCoreBehaviorFeatures(provider.get()); - } else { - NOTREACHED(); - } - return provider; -} - -std::unique_ptr -CefExtensionsClient::CreateAPIFeatureSource() const { - std::unique_ptr source( - new JSONFeatureProviderSource("api")); - source->LoadJSON(IDR_EXTENSION_API_FEATURES); - - // Extension API features specific to CEF. See - // libcef/common/extensions/api/README.txt for additional details. - source->LoadJSON(IDR_CEF_EXTENSION_API_FEATURES); - - return source; -} - void CefExtensionsClient::FilterHostPermissions( const URLPatternSet& hosts, URLPatternSet* new_hosts, @@ -142,40 +81,6 @@ bool CefExtensionsClient::IsScriptableURL(const GURL& url, return true; } -bool CefExtensionsClient::IsAPISchemaGenerated(const std::string& name) const { - // Schema for CEF-only APIs. - // TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See - // libcef/common/extensions/api/README.txt for details. - // if (api::cef::CefGeneratedSchemas::IsGenerated(name)) - // return true; - - // Chrome APIs whitelisted by CEF. - if (api::cef::ChromeGeneratedSchemas::IsGenerated(name)) - return true; - - // Core extensions APIs. - if (api::GeneratedSchemas::IsGenerated(name)) - return true; - - return false; -} - -base::StringPiece CefExtensionsClient::GetAPISchema( - const std::string& name) const { - // Schema for CEF-only APIs. - // TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See - // libcef/common/extensions/api/README.txt for details. - // if (api::cef::CefGeneratedSchemas::IsGenerated(name)) - // return api::cef::CefGeneratedSchemas::Get(name); - - // Chrome APIs whitelisted by CEF. - if (api::cef::ChromeGeneratedSchemas::IsGenerated(name)) - return api::cef::ChromeGeneratedSchemas::Get(name); - - // Core extensions APIs. - return api::GeneratedSchemas::Get(name); -} - bool CefExtensionsClient::ShouldSuppressFatalErrors() const { return true; } diff --git a/libcef/common/extensions/extensions_client.h b/libcef/common/extensions/extensions_client.h index fd3a68780..64fb78cb2 100644 --- a/libcef/common/extensions/extensions_client.h +++ b/libcef/common/extensions/extensions_client.h @@ -8,10 +8,8 @@ #include "base/compiler_specific.h" #include "base/macros.h" -#include "chrome/common/extensions/permissions/chrome_api_permissions.h" #include "chrome/common/extensions/permissions/chrome_permission_message_provider.h" #include "extensions/common/extensions_client.h" -#include "extensions/common/permissions/extensions_api_permissions.h" #include "url/gurl.h" namespace extensions { @@ -28,10 +26,6 @@ class CefExtensionsClient : public ExtensionsClient { const PermissionMessageProvider& GetPermissionMessageProvider() const override; const std::string GetProductName() override; - std::unique_ptr CreateFeatureProvider( - const std::string& name) const override; - std::unique_ptr CreateAPIFeatureSource() - const override; void FilterHostPermissions(const URLPatternSet& hosts, URLPatternSet* new_hosts, PermissionIDSet* permissions) const override; @@ -41,8 +35,6 @@ class CefExtensionsClient : public ExtensionsClient { const Extension* extension, const APIPermissionSet& api_permissions) const override; bool IsScriptableURL(const GURL& url, std::string* error) const override; - bool IsAPISchemaGenerated(const std::string& name) const override; - base::StringPiece GetAPISchema(const std::string& name) const override; bool ShouldSuppressFatalErrors() const override; void RecordDidSuppressFatalError() override; const GURL& GetWebstoreBaseURL() const override; @@ -50,8 +42,6 @@ class CefExtensionsClient : public ExtensionsClient { bool IsBlacklistUpdateURL(const GURL& url) const override; private: - const ChromeAPIPermissions chrome_api_permissions_; - const ExtensionsAPIPermissions extensions_api_permissions_; const ChromePermissionMessageProvider permission_message_provider_; ScriptingWhitelist scripting_whitelist_; diff --git a/libcef/renderer/content_renderer_client.cc b/libcef/renderer/content_renderer_client.cc index ca68e264c..3b20a0749 100644 --- a/libcef/renderer/content_renderer_client.cc +++ b/libcef/renderer/content_renderer_client.cc @@ -272,7 +272,7 @@ void CefContentRendererClient::WebKitInitialized() { const Cef_CrossOriginWhiteListEntry_Params& entry = cross_origin_whitelist_entries_[i]; GURL gurl = GURL(entry.source_origin); - blink::WebSecurityPolicy::AddOriginAccessWhitelistEntry( + blink::WebSecurityPolicy::AddOriginAccessAllowListEntry( gurl, blink::WebString::FromUTF8(entry.target_protocol), blink::WebString::FromUTF8(entry.target_domain), entry.allow_target_subdomains); @@ -492,8 +492,7 @@ bool CefContentRendererClient::ShouldFork(blink::WebLocalFrame* frame, const GURL& url, const std::string& http_method, bool is_initial_navigation, - bool is_server_redirect, - bool* send_referrer) { + bool is_server_redirect) { DCHECK(!frame->Parent()); // For now, we skip the rest for POST submissions. This is because @@ -505,7 +504,7 @@ bool CefContentRendererClient::ShouldFork(blink::WebLocalFrame* frame, if (extensions::ExtensionsEnabled()) { return extensions::CefExtensionsRendererClient::ShouldFork( - frame, url, is_initial_navigation, is_server_redirect, send_referrer); + frame, url, is_initial_navigation, is_server_redirect); } return false; diff --git a/libcef/renderer/content_renderer_client.h b/libcef/renderer/content_renderer_client.h index b82a5c7b8..9c5bc3618 100644 --- a/libcef/renderer/content_renderer_client.h +++ b/libcef/renderer/content_renderer_client.h @@ -112,8 +112,7 @@ class CefContentRendererClient : public content::ContentRendererClient, const GURL& url, const std::string& http_method, bool is_initial_navigation, - bool is_server_redirect, - bool* send_referrer) override; + bool is_server_redirect) override; void WillSendRequest(blink::WebLocalFrame* frame, ui::PageTransition transition_type, const blink::WebURL& url, diff --git a/libcef/renderer/extensions/extensions_renderer_client.cc b/libcef/renderer/extensions/extensions_renderer_client.cc index 01d4aca4a..7558d57cf 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.cc +++ b/libcef/renderer/extensions/extensions_renderer_client.cc @@ -226,8 +226,7 @@ bool CefExtensionsRendererClient::IsStandaloneExtensionProcess() { bool CefExtensionsRendererClient::ShouldFork(blink::WebLocalFrame* frame, const GURL& url, bool is_initial_navigation, - bool is_server_redirect, - bool* send_referrer) { + bool is_server_redirect) { const extensions::RendererExtensionRegistry* extension_registry = extensions::RendererExtensionRegistry::Get(); @@ -246,10 +245,6 @@ bool CefExtensionsRendererClient::ShouldFork(blink::WebLocalFrame* frame, if (!is_server_redirect && CrossesExtensionExtents(frame, url, is_extension_url, is_initial_navigation)) { - // Include the referrer in this case since we're going from a hosted web - // page. (the packaged case is handled previously by the extension - // navigation test) - *send_referrer = true; return true; } diff --git a/libcef/renderer/extensions/extensions_renderer_client.h b/libcef/renderer/extensions/extensions_renderer_client.h index 5fbbf9fdf..68c20c78a 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.h +++ b/libcef/renderer/extensions/extensions_renderer_client.h @@ -72,8 +72,7 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient { static bool ShouldFork(blink::WebLocalFrame* frame, const GURL& url, bool is_initial_navigation, - bool is_server_redirect, - bool* send_referrer); + bool is_server_redirect); static content::BrowserPluginDelegate* CreateBrowserPluginDelegate( content::RenderFrame* render_frame, const content::WebPluginInfo& info, diff --git a/libcef/renderer/extensions/print_render_frame_helper_delegate.cc b/libcef/renderer/extensions/print_render_frame_helper_delegate.cc index 2de41c035..6e5dc7f05 100644 --- a/libcef/renderer/extensions/print_render_frame_helper_delegate.cc +++ b/libcef/renderer/extensions/print_render_frame_helper_delegate.cc @@ -51,9 +51,8 @@ bool CefPrintRenderFrameHelperDelegate::OverridePrint( if (!frame->GetDocument().IsPluginDocument()) return false; - std::vector mime_handlers = - extensions::MimeHandlerViewContainer::FromRenderFrame( - content::RenderFrame::FromWebFrame(frame)); + auto mime_handlers = extensions::MimeHandlerViewContainer::FromRenderFrame( + content::RenderFrame::FromWebFrame(frame)); if (!mime_handlers.empty()) { // This message is handled in chrome/browser/resources/pdf/pdf.js and // instructs the PDF plugin to print. This is to make window.print() on a diff --git a/libcef/renderer/render_thread_observer.cc b/libcef/renderer/render_thread_observer.cc index e20f4eb4d..ef365c9cb 100644 --- a/libcef/renderer/render_thread_observer.cc +++ b/libcef/renderer/render_thread_observer.cc @@ -7,6 +7,7 @@ #include "libcef/common/cef_messages.h" #include "libcef/common/net/net_resource_provider.h" +#include "libcef/renderer/blink_glue.h" #include "libcef/renderer/content_renderer_client.h" #include "components/visitedlink/renderer/visitedlink_slave.h" @@ -64,18 +65,15 @@ void CefRenderThreadObserver::OnModifyCrossOriginWhitelistEntry( const Cef_CrossOriginWhiteListEntry_Params& params) { GURL gurl = GURL(params.source_origin); if (add) { - blink::WebSecurityPolicy::AddOriginAccessWhitelistEntry( + blink::WebSecurityPolicy::AddOriginAccessAllowListEntry( gurl, blink::WebString::FromUTF8(params.target_protocol), blink::WebString::FromUTF8(params.target_domain), params.allow_target_subdomains); } else { - blink::WebSecurityPolicy::RemoveOriginAccessWhitelistEntry( - gurl, blink::WebString::FromUTF8(params.target_protocol), - blink::WebString::FromUTF8(params.target_domain), - params.allow_target_subdomains); + blink::WebSecurityPolicy::ClearOriginAccessAllowListForOrigin(gurl); } } void CefRenderThreadObserver::OnClearCrossOriginWhitelist() { - blink::WebSecurityPolicy::ResetOriginAccessWhitelists(); + blink::WebSecurityPolicy::ClearOriginAccessAllowList(); } diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index 205f10af0..74a7ff133 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -476,7 +476,9 @@ void v8impl_string_dtor(char* str) { #endif // Convert a v8::String to CefString. -void GetCefString(v8::Local str, CefString& out) { +void GetCefString(v8::Isolate* isolate, + v8::Local str, + CefString& out) { if (str.IsEmpty()) return; @@ -486,7 +488,7 @@ void GetCefString(v8::Local str, CefString& out) { if (len == 0) return; char* buf = new char[len + 1]; - str->WriteUtf8(buf, len + 1); + str->WriteUtf8(isolate, buf, len + 1); // Perform conversion to the wide type. cef_string_t* retws = out.GetWritableStruct(); @@ -499,14 +501,14 @@ void GetCefString(v8::Local str, CefString& out) { if (len == 0) return; char16* buf = new char16[len + 1]; - str->Write(reinterpret_cast(buf), 0, len + 1); + str->Write(isolate, reinterpret_cast(buf), 0, len + 1); #else // Allocate enough space for a worst-case conversion. int len = str->Utf8Length(); if (len == 0) return; char* buf = new char[len + 1]; - str->WriteUtf8(buf, len + 1); + str->WriteUtf8(isolate, buf, len + 1); #endif // Don't perform an extra string copy. @@ -575,7 +577,7 @@ void AccessorNameGetterCallbackImpl( CefRefPtr retval; CefRefPtr object = new CefV8ValueImpl(isolate, context, obj); CefString name, exception; - GetCefString(v8::Local::Cast(property), name); + GetCefString(isolate, v8::Local::Cast(property), name); if (accessorPtr->Get(name, object, retval, exception)) { if (!exception.empty()) { info.GetReturnValue().Set(isolate->ThrowException( @@ -614,7 +616,7 @@ void AccessorNameSetterCallbackImpl( CefRefPtr cefValue = new CefV8ValueImpl(isolate, context, value); CefString name, exception; - GetCefString(v8::Local::Cast(property), name); + GetCefString(isolate, v8::Local::Cast(property), name); accessorPtr->Set(name, object, cefValue, exception); if (!exception.empty()) { isolate->ThrowException( @@ -625,13 +627,13 @@ void AccessorNameSetterCallbackImpl( } // Two helper functions for V8 Interceptor callbacks. -CefString PropertyToIndex(v8::Local property) { +CefString PropertyToIndex(v8::Isolate* isolate, v8::Local property) { CefString name; - GetCefString(property.As(), name); + GetCefString(isolate, property.As(), name); return name; } -int PropertyToIndex(uint32_t index) { +int PropertyToIndex(v8::Isolate* isolate, uint32_t index) { return static_cast(index); } @@ -657,7 +659,8 @@ void InterceptorGetterCallbackImpl( CefRefPtr object = new CefV8ValueImpl(isolate, context, obj); CefRefPtr retval; CefString exception; - interceptorPtr->Get(PropertyToIndex(property), object, retval, exception); + interceptorPtr->Get(PropertyToIndex(isolate, property), object, retval, + exception); if (!exception.empty()) { info.GetReturnValue().Set(isolate->ThrowException( v8::Exception::Error(GetV8String(isolate, exception)))); @@ -688,7 +691,8 @@ void InterceptorSetterCallbackImpl( CefRefPtr object = new CefV8ValueImpl(isolate, context, obj); CefRefPtr cefValue = new CefV8ValueImpl(isolate, context, value); CefString exception; - interceptorPtr->Set(PropertyToIndex(property), object, cefValue, exception); + interceptorPtr->Set(PropertyToIndex(isolate, property), object, cefValue, + exception); if (!exception.empty()) { isolate->ThrowException( v8::Exception::Error(GetV8String(isolate, exception))); @@ -711,7 +715,7 @@ class ExtensionWrapper : public v8::Extension { return v8::Local(); CefString func_name; - GetCefString(name, func_name); + GetCefString(isolate, name, func_name); v8::Local function_data = V8FunctionData::Create(isolate, func_name, handler_); @@ -736,13 +740,18 @@ class CefV8ExceptionImpl : public CefV8Exception { if (message.IsEmpty()) return; - GetCefString(message->Get(), message_); + v8::Isolate* isolate = context->GetIsolate(); + GetCefString(isolate, message->Get(), message_); v8::MaybeLocal source_line = message->GetSourceLine(context); if (!source_line.IsEmpty()) - GetCefString(source_line.ToLocalChecked(), source_line_); + GetCefString(isolate, source_line.ToLocalChecked(), source_line_); - if (!message->GetScriptResourceName().IsEmpty()) - GetCefString(message->GetScriptResourceName()->ToString(), script_); + if (!message->GetScriptResourceName().IsEmpty()) { + GetCefString( + isolate, + message->GetScriptResourceName()->ToString(context).ToLocalChecked(), + script_); + } v8::Maybe line_number = message->GetLineNumber(context); if (!line_number.IsNothing()) @@ -1506,7 +1515,8 @@ void CefV8ValueImpl::InitFromV8Value(v8::Local context, CefTime(value->ToNumber(context).ToLocalChecked()->Value() / 1000)); } else if (value->IsString()) { CefString rv; - GetCefString(value->ToString(), rv); + GetCefString(context->GetIsolate(), + value->ToString(context).ToLocalChecked(), rv); InitString(rv); } else if (value->IsObject()) { InitObject(value, NULL); @@ -1785,7 +1795,7 @@ bool CefV8ValueImpl::IsUserCreated() { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); return (tracker != NULL); @@ -1836,7 +1846,7 @@ bool CefV8ValueImpl::HasValue(const CefString& key) { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); return obj->Has(context, GetV8String(isolate, key)).FromJust(); } @@ -1858,7 +1868,7 @@ bool CefV8ValueImpl::HasValue(int index) { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); return obj->Has(context, index).FromJust(); } @@ -1875,7 +1885,7 @@ bool CefV8ValueImpl::DeleteValue(const CefString& key) { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::TryCatch try_catch(isolate); try_catch.SetVerbose(true); @@ -1901,7 +1911,7 @@ bool CefV8ValueImpl::DeleteValue(int index) { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::TryCatch try_catch(isolate); try_catch.SetVerbose(true); @@ -1922,7 +1932,7 @@ CefRefPtr CefV8ValueImpl::GetValue(const CefString& key) { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::TryCatch try_catch(isolate); try_catch.SetVerbose(true); @@ -1950,7 +1960,7 @@ CefRefPtr CefV8ValueImpl::GetValue(int index) { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::TryCatch try_catch(isolate); try_catch.SetVerbose(true); @@ -1977,7 +1987,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key, } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::TryCatch try_catch(isolate); try_catch.SetVerbose(true); @@ -2021,7 +2031,7 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr value) { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::TryCatch try_catch(isolate); try_catch.SetVerbose(true); @@ -2048,7 +2058,7 @@ bool CefV8ValueImpl::SetValue(const CefString& key, } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); CefRefPtr accessorPtr; @@ -2080,15 +2090,22 @@ bool CefV8ValueImpl::GetKeys(std::vector& keys) { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); + + v8::Local context = isolate->GetCurrentContext(); + if (context.IsEmpty()) { + NOTREACHED() << "not currently in a V8 context"; + return false; + } + v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::Local arr_keys = obj->GetPropertyNames(); uint32_t len = arr_keys->Length(); for (uint32_t i = 0; i < len; ++i) { v8::Local value = arr_keys->Get(v8::Integer::New(isolate, i)); CefString str; - GetCefString(value->ToString(), str); + GetCefString(isolate, value->ToString(context).ToLocalChecked(), str); keys.push_back(str); } return true; @@ -2107,7 +2124,7 @@ bool CefV8ValueImpl::SetUserData(CefRefPtr user_data) { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); if (tracker) { @@ -2131,7 +2148,7 @@ CefRefPtr CefV8ValueImpl::GetUserData() { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); if (tracker) @@ -2153,7 +2170,7 @@ int CefV8ValueImpl::GetExternallyAllocatedMemory() { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); if (tracker) @@ -2175,7 +2192,7 @@ int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) { } v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); if (tracker) @@ -2187,14 +2204,22 @@ int CefV8ValueImpl::AdjustExternallyAllocatedMemory(int change_in_bytes) { int CefV8ValueImpl::GetArrayLength() { CEF_V8_REQUIRE_OBJECT_RETURN(0); - v8::HandleScope handle_scope(handle_->isolate()); + v8::Isolate* isolate = handle_->isolate(); + v8::HandleScope handle_scope(isolate); + + v8::Local context = isolate->GetCurrentContext(); + if (context.IsEmpty()) { + NOTREACHED() << "not currently in a V8 context"; + return 0; + } + v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsArray()) { NOTREACHED() << "V8 value is not an array"; return 0; } - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::Local arr = v8::Local::Cast(obj); return arr->Length(); } @@ -2205,18 +2230,20 @@ CefV8ValueImpl::GetArrayBufferReleaseCallback() { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); + v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { NOTREACHED() << "not currently in a V8 context"; return NULL; } + v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsArrayBuffer()) { NOTREACHED() << "V8 value is not an array buffer"; return NULL; } - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); V8TrackArrayBuffer* tracker = V8TrackArrayBuffer::Unwrap(context, obj); if (tracker) @@ -2230,6 +2257,7 @@ bool CefV8ValueImpl::NeuterArrayBuffer() { v8::Isolate* isolate = handle_->isolate(); v8::HandleScope handle_scope(isolate); + v8::Local context = isolate->GetCurrentContext(); if (context.IsEmpty()) { NOTREACHED() << "not currently in a V8 context"; @@ -2241,7 +2269,7 @@ bool CefV8ValueImpl::NeuterArrayBuffer() { NOTREACHED() << "V8 value is not an array buffer"; return false; } - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::Local arr = v8::Local::Cast(obj); if (!arr->IsNeuterable()) { return false; @@ -2257,16 +2285,25 @@ CefString CefV8ValueImpl::GetFunctionName() { CefString rv; CEF_V8_REQUIRE_OBJECT_RETURN(rv); - v8::HandleScope handle_scope(handle_->isolate()); + v8::Isolate* isolate = handle_->isolate(); + v8::HandleScope handle_scope(isolate); + + v8::Local context = isolate->GetCurrentContext(); + if (context.IsEmpty()) { + NOTREACHED() << "not currently in a V8 context"; + return rv; + } + v8::Local value = handle_->GetNewV8Handle(false); if (!value->IsFunction()) { NOTREACHED() << "V8 value is not a function"; return rv; } - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); v8::Local func = v8::Local::Cast(obj); - GetCefString(v8::Handle::Cast(func->GetName()), rv); + GetCefString(handle_->isolate(), + v8::Handle::Cast(func->GetName()), rv); return rv; } @@ -2288,7 +2325,7 @@ CefRefPtr CefV8ValueImpl::GetFunctionHandler() { return NULL; } - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context).ToLocalChecked(); V8TrackObject* tracker = V8TrackObject::Unwrap(context, obj); if (tracker) return tracker->GetHandler(); @@ -2348,7 +2385,7 @@ CefRefPtr CefV8ValueImpl::ExecuteFunctionWithContext( v8::Context::Scope context_scope(context_local); - v8::Local obj = value->ToObject(); + v8::Local obj = value->ToObject(context_local).ToLocalChecked(); v8::Local func = v8::Local::Cast(obj); v8::Local recv; @@ -2429,7 +2466,7 @@ CefV8StackTraceImpl::CefV8StackTraceImpl(v8::Isolate* isolate, frames_.reserve(frame_count); for (int i = 0; i < frame_count; ++i) frames_.push_back( - new CefV8StackFrameImpl(isolate, handle->GetFrame(i))); + new CefV8StackFrameImpl(isolate, handle->GetFrame(isolate, i))); } } } @@ -2457,9 +2494,10 @@ CefV8StackFrameImpl::CefV8StackFrameImpl(v8::Isolate* isolate, : line_number_(0), column_(0), is_eval_(false), is_constructor_(false) { if (handle.IsEmpty()) return; - GetCefString(handle->GetScriptName(), script_name_); - GetCefString(handle->GetScriptNameOrSourceURL(), script_name_or_source_url_); - GetCefString(handle->GetFunctionName(), function_name_); + GetCefString(isolate, handle->GetScriptName(), script_name_); + GetCefString(isolate, handle->GetScriptNameOrSourceURL(), + script_name_or_source_url_); + GetCefString(isolate, handle->GetFunctionName(), function_name_); line_number_ = handle->GetLineNumber(); column_ = handle->GetColumn(); is_eval_ = handle->IsEval(); diff --git a/patch/patch.cfg b/patch/patch.cfg index e8b056e4c..795b1becc 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -327,11 +327,6 @@ patches = [ # Linux: Fix 32-bit build fails with ld.gold: internal error in # get_section_contents, at icf.cc:467 # https://bitbucket.org/chromiumembedded/cef/issues/2256 - # - # Linux: Fix GTK2 compile errors. - # - # Linux: Fix cfi-icall failure in atk_util_auralinux_gtk2.cc. - # https://bugs.chromium.org/p/chromium/issues/detail?id=863090 'name': 'linux_build', }, { diff --git a/patch/patches/browser_compositor_mac.patch b/patch/patches/browser_compositor_mac.patch index b4059f7cd..bfd482d8a 100644 --- a/patch/patches/browser_compositor_mac.patch +++ b/patch/patches/browser_compositor_mac.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h -index 254be13c1953..866b7315b430 100644 +index 7dc490ea5607..f67c457385ab 100644 --- content/browser/renderer_host/browser_compositor_view_mac.h +++ content/browser/renderer_host/browser_compositor_view_mac.h -@@ -58,6 +58,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient, +@@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient, // These will not return nullptr until Destroy is called. DelegatedFrameHost* GetDelegatedFrameHost(); @@ -12,10 +12,10 @@ index 254be13c1953..866b7315b430 100644 // Ensure that the currect compositor frame be cleared (even if it is // potentially visible). diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm -index 9df94c2b0601..bb546312d22a 100644 +index fb23caccdd1d..f29b586631aa 100644 --- content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm -@@ -86,6 +86,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { +@@ -84,6 +84,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { return delegated_frame_host_.get(); } diff --git a/patch/patches/browser_plugin_guest_1565.patch b/patch/patches/browser_plugin_guest_1565.patch index 29ddacffb..e6ec35f6d 100644 --- a/patch/patches/browser_plugin_guest_1565.patch +++ b/patch/patches/browser_plugin_guest_1565.patch @@ -1,8 +1,8 @@ diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc -index ca19df7c7fa2..99f7f9c950db 100644 +index e5f885ab4bc0..4573329ad26a 100644 --- content/browser/browser_plugin/browser_plugin_guest.cc +++ content/browser/browser_plugin/browser_plugin_guest.cc -@@ -312,8 +312,11 @@ void BrowserPluginGuest::InitInternal( +@@ -313,8 +313,11 @@ void BrowserPluginGuest::InitInternal( static_cast(GetWebContents()->GetView()); } @@ -15,7 +15,7 @@ index ca19df7c7fa2..99f7f9c950db 100644 // Once a BrowserPluginGuest has an embedder WebContents, it's considered to // be attached. -@@ -787,10 +790,19 @@ void BrowserPluginGuest::OnWillAttachComplete( +@@ -794,10 +797,19 @@ void BrowserPluginGuest::OnWillAttachComplete( static_cast(GetWebContents()->GetView()); if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) { web_contents_view->CreateViewForWidget( @@ -37,10 +37,10 @@ index ca19df7c7fa2..99f7f9c950db 100644 attached_ = true; diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc -index 04922e2a61bf..c4fd3f9a050e 100644 +index 26debf62bf01..973b88ff4752 100644 --- content/browser/frame_host/interstitial_page_impl.cc +++ content/browser/frame_host/interstitial_page_impl.cc -@@ -619,7 +619,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { +@@ -634,7 +634,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() { WebContentsView* wcv = static_cast(web_contents())->GetView(); RenderWidgetHostViewBase* view = @@ -79,10 +79,10 @@ index 41e44d5d658a..047c935d8ca2 100644 // Creates a new View that holds a popup and receives messages for it. virtual RenderWidgetHostViewBase* CreateViewForPopupWidget( diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc -index 713b17948ef7..8ec3e045783f 100644 +index f3b19570771b..fe1df8339576 100644 --- content/browser/web_contents/web_contents_view_aura.cc +++ content/browser/web_contents/web_contents_view_aura.cc -@@ -781,7 +781,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size, +@@ -796,7 +796,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size, } RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( @@ -92,7 +92,7 @@ index 713b17948ef7..8ec3e045783f 100644 if (render_widget_host->GetView()) { // During testing, the view will already be set up in most cases to the // test view, so we don't want to clobber it with a real one. To verify that -@@ -793,6 +794,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( +@@ -808,6 +809,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget( render_widget_host->GetView()); } @@ -101,10 +101,10 @@ index 713b17948ef7..8ec3e045783f 100644 g_create_render_widget_host_view ? g_create_render_widget_host_view(render_widget_host, diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h -index 058f3e00d6f5..25a3ad4ec991 100644 +index 212da86e2539..84336af98e28 100644 --- content/browser/web_contents/web_contents_view_aura.h +++ content/browser/web_contents/web_contents_view_aura.h -@@ -114,7 +114,7 @@ class CONTENT_EXPORT WebContentsViewAura +@@ -121,7 +121,7 @@ class CONTENT_EXPORT WebContentsViewAura gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, @@ -140,7 +140,7 @@ index e5485f5609c3..589bbb400684 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc -index 44c68ed25b66..62026810703a 100644 +index 12f6817499ef..b38e086ee04c 100644 --- content/browser/web_contents/web_contents_view_guest.cc +++ content/browser/web_contents/web_contents_view_guest.cc @@ -67,6 +67,8 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const { @@ -159,7 +159,7 @@ index 44c68ed25b66..62026810703a 100644 + if (!platform_view_->GetNativeView()) + return; #if defined(USE_AURA) - if (features::IsAshInBrowserProcess()) { + if (!features::IsUsingWindowService()) { old_parent_view->GetNativeView()->RemoveChild( @@ -132,7 +136,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size, } @@ -243,7 +243,7 @@ index 94848b568363..4dea19adb512 100644 g_create_render_widget_host_view ? g_create_render_widget_host_view(render_widget_host, diff --git content/public/browser/browser_plugin_guest_delegate.h content/public/browser/browser_plugin_guest_delegate.h -index d05dd5421458..fa13775f0512 100644 +index bf2226b53dd7..782a320ab788 100644 --- content/public/browser/browser_plugin_guest_delegate.h +++ content/public/browser/browser_plugin_guest_delegate.h @@ -19,6 +19,7 @@ namespace content { @@ -266,10 +266,10 @@ index d05dd5421458..fa13775f0512 100644 // a BrowserPlugin even when we are using cross process frames for guests. It // should be removed after resolving https://crbug.com/642826). diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index 68d48f12192d..fb713dbda108 100644 +index 121f7d573d37..27c6108167ad 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -@@ -198,6 +198,8 @@ void MimeHandlerViewGuest::CreateWebContents( +@@ -200,6 +200,8 @@ void MimeHandlerViewGuest::CreateWebContents( WebContents::CreateParams params(browser_context(), guest_site_instance.get()); params.guest_delegate = this; @@ -278,7 +278,7 @@ index 68d48f12192d..fb713dbda108 100644 // TODO(erikchen): Fix ownership semantics for guest views. // https://crbug.com/832879. std::move(callback).Run( -@@ -239,6 +241,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { +@@ -244,6 +246,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { return true; } diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index cb78fd16b..e85622c06 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index 569af2c9feed..4ac43a30cf8f 100644 +index ae76265b33a6..a3b7580d0046 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/features.gni") @@ -10,7 +10,7 @@ index 569af2c9feed..4ac43a30cf8f 100644 import("//chrome/common/features.gni") import("//components/feature_engagement/features.gni") import("//components/feed/features.gni") -@@ -1661,6 +1662,7 @@ jumbo_split_static_library("browser") { +@@ -1689,6 +1690,7 @@ jumbo_split_static_library("browser") { "//base:i18n", "//base/allocator:buildflags", "//cc", @@ -18,7 +18,7 @@ index 569af2c9feed..4ac43a30cf8f 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -1932,6 +1934,10 @@ jumbo_split_static_library("browser") { +@@ -1963,6 +1965,10 @@ jumbo_split_static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index 59cc18bed..e746c0791 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc -index eae14e50a894..62da11525b4f 100644 +index 9596665e9320..c38584d4a222 100644 --- chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -7,6 +7,7 @@ @@ -36,8 +36,8 @@ index eae14e50a894..62da11525b4f 100644 #endif } -@@ -87,10 +98,16 @@ scoped_refptr - /*store_last_modified=*/true)); +@@ -88,10 +99,16 @@ scoped_refptr + base::FeatureList::IsEnabled(features::kPermissionDelegation))); #if BUILDFLAG(ENABLE_EXTENSIONS) +#if BUILDFLAG(ENABLE_CEF) diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 550eef0f2..84d9d2608 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -71,7 +71,7 @@ index e8e76ce5b954..1dd338dd0142 100644 content::BrowserContext* GetBrowserContextRedirectedInIncognito( content::BrowserContext* context); diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index 675efecaaf74..a0e99efb0a26 100644 +index acd7501aef4a..b53fe5e32289 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc @@ -382,7 +382,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) @@ -84,7 +84,7 @@ index 675efecaaf74..a0e99efb0a26 100644 this)); } diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h -index fc027d61027a..61484ca7e3c5 100644 +index 8a62433e9107..5ae35bc2d16a 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h @@ -93,7 +93,7 @@ class ProfileManager : public content::NotificationObserver, @@ -96,7 +96,7 @@ index fc027d61027a..61484ca7e3c5 100644 // Returns total number of profiles available on this machine. size_t GetNumberOfProfiles(); -@@ -124,7 +124,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -123,7 +123,7 @@ class ProfileManager : public content::NotificationObserver, // Returns true if the profile pointer is known to point to an existing // profile. @@ -105,7 +105,7 @@ index fc027d61027a..61484ca7e3c5 100644 // Returns the directory where the first created profile is stored, // relative to the user data directory currently in use. -@@ -133,7 +133,7 @@ class ProfileManager : public content::NotificationObserver, +@@ -132,7 +132,7 @@ class ProfileManager : public content::NotificationObserver, // Get the Profile last used (the Profile to which owns the most recently // focused window) with this Chrome build. If no signed profile has been // stored in Local State, hand back the Default profile. diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 7b4c0e6cf..84fa0c484 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc -index 484e07af5a98..0e62e20095c7 100644 +index 52d374d1fe4e..1ac12af269c9 100644 --- chrome/browser/plugins/plugin_info_host_impl.cc +++ chrome/browser/plugins/plugin_info_host_impl.cc @@ -16,6 +16,7 @@ @@ -118,7 +118,7 @@ index 484e07af5a98..0e62e20095c7 100644 if (security_status == PluginMetadata::SECURITY_STATUS_FULLY_TRUSTED) { *status = chrome::mojom::PluginStatus::kAllowed; return; -@@ -380,16 +412,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin( +@@ -379,16 +411,36 @@ bool PluginInfoHostImpl::Context::FindEnabledPlugin( return false; } @@ -157,10 +157,10 @@ index 484e07af5a98..0e62e20095c7 100644 // If we broke out of the loop, we have found an enabled plugin. bool enabled = i < matching_plugins.size(); diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index fbf143fd8f32..715b55312e5c 100644 +index 78925a9dc0f0..30ef27e50bf7 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -763,6 +763,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -796,6 +796,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -168,7 +168,7 @@ index fbf143fd8f32..715b55312e5c 100644 observer->IsPluginTemporarilyAllowed(identifier)) { status = chrome::mojom::PluginStatus::kAllowed; } -@@ -950,7 +951,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -983,7 +984,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( &plugin_auth_host); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -178,7 +178,7 @@ index fbf143fd8f32..715b55312e5c 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -959,7 +961,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -992,7 +994,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -188,7 +188,7 @@ index fbf143fd8f32..715b55312e5c 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -969,7 +972,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1002,7 +1005,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -198,7 +198,7 @@ index fbf143fd8f32..715b55312e5c 100644 break; } case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -977,7 +981,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1010,7 +1014,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( IDR_BLOCKED_PLUGIN_HTML, l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, group_name)); diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index 5777e4423..a75b8e92d 100644 --- a/patch/patches/chrome_renderer.patch +++ b/patch/patches/chrome_renderer.patch @@ -1,5 +1,5 @@ diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn -index c8c0126c0aca..6f3297649abe 100644 +index bf218a3f098a..520119b1485e 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -4,6 +4,7 @@ @@ -10,7 +10,7 @@ index c8c0126c0aca..6f3297649abe 100644 import("//chrome/common/features.gni") import("//components/nacl/features.gni") import("//components/offline_pages/buildflags/features.gni") -@@ -116,6 +117,7 @@ jumbo_static_library("renderer") { +@@ -119,6 +120,7 @@ jumbo_static_library("renderer") { defines = [] deps = [ @@ -18,7 +18,7 @@ index c8c0126c0aca..6f3297649abe 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -179,6 +181,10 @@ jumbo_static_library("renderer") { +@@ -182,6 +184,10 @@ jumbo_static_library("renderer") { configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/patch/patches/chrome_widevine.patch b/patch/patches/chrome_widevine.patch index 92b94eb84..5bba95173 100644 --- a/patch/patches/chrome_widevine.patch +++ b/patch/patches/chrome_widevine.patch @@ -1,8 +1,8 @@ diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc -index f98d01cf4cad..07ba6768ae72 100644 +index 47eea6d5c75b..40de62691f31 100644 --- chrome/common/chrome_content_client.cc +++ chrome/common/chrome_content_client.cc -@@ -96,7 +96,8 @@ +@@ -97,7 +97,8 @@ #if BUILDFLAG(ENABLE_LIBRARY_CDMS) #include "media/cdm/cdm_paths.h" // nogncheck diff --git a/patch/patches/component_build_1617.patch b/patch/patches/component_build_1617.patch index cd4b0f2c1..259e47cd0 100644 --- a/patch/patches/component_build_1617.patch +++ b/patch/patches/component_build_1617.patch @@ -34,7 +34,7 @@ index 305095fc420e..f5ca4eda4a66 100644 MouseWheelPhaseHandler(RenderWidgetHostViewBase* const host_view); ~MouseWheelPhaseHandler() {} diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn -index 20d1994e156e..45102558569f 100644 +index c9f9a18f1188..ecba73d54a30 100644 --- third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn @@ -25,6 +25,7 @@ component("controller") { diff --git a/patch/patches/compositor_1368.patch b/patch/patches/compositor_1368.patch index 7e46c5839..827043759 100644 --- a/patch/patches/compositor_1368.patch +++ b/patch/patches/compositor_1368.patch @@ -1,5 +1,5 @@ diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc -index ef2d56f496b5..4cbe7cf6229c 100644 +index 642fff3b4367..45faeed249c0 100644 --- content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc @@ -493,10 +493,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( @@ -26,7 +26,7 @@ index ef2d56f496b5..4cbe7cf6229c 100644 } else { DCHECK(context_provider); diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index a84fdb5a29fc..7845c07d7c96 100644 +index a974ea654834..cfb3ff7f8a0c 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -25,6 +25,7 @@ diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index d6867edcb..c1fcc7dbe 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -14,10 +14,10 @@ index 9f7c7dd00536..f524b27feedf 100644 // The GetPlugins call causes the plugin list to be refreshed. Once that's // done we can retry the GetPluginInfo call. We break out of this cycle diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc -index 9f0645f8ae20..16036f0bb26c 100644 +index 3c2de25de6df..5caf4a3aa510 100644 --- chrome/browser/plugins/chrome_plugin_service_filter.cc +++ chrome/browser/plugins/chrome_plugin_service_filter.cc -@@ -178,6 +178,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable( +@@ -168,6 +168,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable( int render_frame_id, const void* context, const GURL& plugin_content_url, @@ -26,10 +26,10 @@ index 9f0645f8ae20..16036f0bb26c 100644 content::WebPluginInfo* plugin) { base::AutoLock auto_lock(lock_); diff --git chrome/browser/plugins/chrome_plugin_service_filter.h chrome/browser/plugins/chrome_plugin_service_filter.h -index 133145db74bf..021ab307ee2a 100644 +index c707c8773a74..20bdf74abf01 100644 --- chrome/browser/plugins/chrome_plugin_service_filter.h +++ chrome/browser/plugins/chrome_plugin_service_filter.h -@@ -66,6 +66,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter, +@@ -65,6 +65,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter, int render_frame_id, const void* context, const GURL& plugin_content_url, @@ -38,10 +38,10 @@ index 133145db74bf..021ab307ee2a 100644 content::WebPluginInfo* plugin) override; diff --git chrome/browser/plugins/pdf_iframe_navigation_throttle.cc chrome/browser/plugins/pdf_iframe_navigation_throttle.cc -index 0a458b1e04e4..bb7f0b235e2f 100644 +index 1b4fd2b4149b..98498db23824 100644 --- chrome/browser/plugins/pdf_iframe_navigation_throttle.cc +++ chrome/browser/plugins/pdf_iframe_navigation_throttle.cc -@@ -54,7 +54,7 @@ PDFIFrameNavigationThrottle::MaybeCreateThrottleFor( +@@ -56,7 +56,7 @@ PDFIFrameNavigationThrottle::MaybeCreateThrottleFor( content::ResourceContext* resource_context = handle->GetWebContents()->GetBrowserContext()->GetResourceContext(); if (filter->IsPluginAvailable(process_id, routing_id, resource_context, @@ -77,10 +77,10 @@ index d4d56c7c6a96..1ec4de7d5fd3 100644 } diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc -index 836668ca6469..35b2e8f09c49 100644 +index 72e60fdbe27c..8906cc6a598a 100644 --- content/browser/frame_host/navigation_handle_impl.cc +++ content/browser/frame_host/navigation_handle_impl.cc -@@ -393,12 +393,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { +@@ -401,12 +401,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { } RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() { @@ -94,21 +94,10 @@ index 836668ca6469..35b2e8f09c49 100644 "WillFailRequest state should come before WillProcessResponse"); return render_frame_host_; diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc -index f1df2ee8770c..adec7713be7a 100644 +index 60b610202e7d..b14da4aba2f0 100644 --- content/browser/frame_host/render_frame_host_impl.cc +++ content/browser/frame_host/render_frame_host_impl.cc -@@ -846,8 +846,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactory( - RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory( - this, false /* is_navigation */, false /* is_download */, - &default_factory_request); -- StoragePartitionImpl* storage_partition = static_cast( -- BrowserContext::GetStoragePartition(context, GetSiteInstance())); -+ StoragePartition* storage_partition = -+ BrowserContext::GetStoragePartition(context, GetSiteInstance()); - if (g_create_network_factory_callback_for_test.Get().is_null()) { - storage_partition->GetNetworkContext()->CreateURLLoaderFactory( - std::move(default_factory_request), std::move(params)); -@@ -1677,6 +1677,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( +@@ -1671,6 +1671,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( if (GetNavigationHandle()) { GetNavigationHandle()->set_net_error_code( static_cast(params.error_code)); @@ -116,7 +105,7 @@ index f1df2ee8770c..adec7713be7a 100644 } frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); -@@ -4084,9 +4085,9 @@ void RenderFrameHostImpl::CommitNavigation( +@@ -4115,9 +4116,9 @@ void RenderFrameHostImpl::CommitNavigation( // is used. Currently we have this here to make sure we have non-racy // situation (https://crbug.com/849929). DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService)); @@ -128,6 +117,17 @@ index f1df2ee8770c..adec7713be7a 100644 BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::BindOnce(&PrefetchURLLoaderService::GetFactory, +@@ -4811,8 +4812,8 @@ bool RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryInternal( + RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory( + this, false /* is_navigation */, false /* is_download */, + &default_factory_request); +- StoragePartitionImpl* storage_partition = static_cast( +- BrowserContext::GetStoragePartition(context, GetSiteInstance())); ++ StoragePartition* storage_partition = ++ BrowserContext::GetStoragePartition(context, GetSiteInstance()); + if (g_create_network_factory_callback_for_test.Get().is_null()) { + storage_partition->GetNetworkContext()->CreateURLLoaderFactory( + std::move(default_factory_request), std::move(params)); diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc index 2f32390f0b45..6324f0f738e8 100644 --- content/browser/frame_host/render_frame_message_filter.cc @@ -179,10 +179,10 @@ index 74707ef31289..3c1c964f0cb7 100644 if (stale) { // Refresh the plugins asynchronously. diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc -index b822ba75eef6..83fc7ea2aa51 100644 +index 3a6480c71777..cf5c5c50507c 100644 --- content/browser/plugin_service_impl.cc +++ content/browser/plugin_service_impl.cc -@@ -286,6 +286,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, +@@ -302,6 +302,7 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, int render_frame_id, ResourceContext* context, const GURL& url, @@ -190,7 +190,7 @@ index b822ba75eef6..83fc7ea2aa51 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool allow_wildcard, -@@ -302,7 +303,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, +@@ -318,7 +319,8 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, for (size_t i = 0; i < plugins.size(); ++i) { if (!filter_ || filter_->IsPluginAvailable(render_process_id, render_frame_id, context, @@ -201,10 +201,10 @@ index b822ba75eef6..83fc7ea2aa51 100644 if (actual_mime_type) *actual_mime_type = mime_types[i]; diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h -index 4e11056a3dc9..973ad50975e1 100644 +index cb19abcd26b8..12d66dd7db6e 100644 --- content/browser/plugin_service_impl.h +++ content/browser/plugin_service_impl.h -@@ -65,6 +65,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService { +@@ -57,6 +57,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService { int render_frame_id, ResourceContext* context, const GURL& url, @@ -285,10 +285,10 @@ index 3009401dac6b..b4c5a9e2db50 100644 }; diff --git content/common/frame_messages.h content/common/frame_messages.h -index 4d0712eca8d0..ef1d88a7d42c 100644 +index c42a88101a49..ddfc56a05f4f 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -1379,9 +1379,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -1366,9 +1366,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, // type. If there is no matching plugin, |found| is false. // |actual_mime_type| is the actual mime type supported by the // found plugin. @@ -301,7 +301,7 @@ index 4d0712eca8d0..ef1d88a7d42c 100644 std::string /* mime_type */, bool /* found */, diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h -index 27021d64244d..60f1ec1845d9 100644 +index aed3085c7794..3b31542094d4 100644 --- content/public/browser/plugin_service.h +++ content/public/browser/plugin_service.h @@ -73,6 +73,7 @@ class CONTENT_EXPORT PluginService { @@ -325,10 +325,10 @@ index 3b610b1f554e..7c439e060779 100644 WebPluginInfo* plugin) = 0; diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index d3762e8e9311..b84e0795c163 100644 +index f1c9cc5997cb..f901f8354251 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h -@@ -74,6 +74,9 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -75,6 +75,9 @@ class CONTENT_EXPORT ContentRendererClient { // Notifies us that the RenderThread has been created. virtual void RenderThreadStarted() {} @@ -338,7 +338,7 @@ index d3762e8e9311..b84e0795c163 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -341,6 +344,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -347,6 +350,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -364,10 +364,10 @@ index 88efca34d574..565f24148f7b 100644 virtual void FocusedNodeChanged(const blink::WebNode& node) {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index 9824bf608ed0..b99c320fd793 100644 +index 81bd5faff7f4..f3bbf5f124de 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -3474,7 +3474,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -3577,7 +3577,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -377,7 +377,7 @@ index 9824bf608ed0..b99c320fd793 100644 params.mime_type.Utf8(), &found, &info, &mime_type)); if (!found) return nullptr; -@@ -3839,6 +3840,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { +@@ -3948,6 +3949,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { void RenderFrameImpl::FrameFocused() { Send(new FrameHostMsg_FrameFocused(routing_id_)); @@ -387,10 +387,10 @@ index 9824bf608ed0..b99c320fd793 100644 void RenderFrameImpl::WillCommitProvisionalLoad() { diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index d0781332d8b8..f17614b61336 100644 +index e0208d440f55..77ea92adb54d 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -865,6 +865,8 @@ void RenderThreadImpl::Init( +@@ -829,6 +829,8 @@ void RenderThreadImpl::Init() { StartServiceManagerConnection(); @@ -400,10 +400,10 @@ index d0781332d8b8..f17614b61336 100644 base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index 33626b1c8284..ebebf1f58c4c 100644 +index 8d7631fb756f..5239dde4a1c9 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1107,6 +1107,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() { +@@ -1192,6 +1192,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() { base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); } @@ -419,10 +419,10 @@ index 33626b1c8284..ebebf1f58c4c 100644 if (!web_database_host_) { web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create( diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index d3ae4a5b44b6..ccfa2a131fe1 100644 +index b3bde113adbd..cf4108f21cf8 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -219,6 +219,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -233,6 +233,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { mojo::ScopedDataPipeConsumerHandle handle) override; void RequestPurgeMemory() override; @@ -457,7 +457,7 @@ index 7767a620a9fd..8a95377f5f3b 100644 WebPluginInfo* plugin) override; diff --git content/test/fake_plugin_service.cc content/test/fake_plugin_service.cc -index dfc1e111ac10..23106007a32e 100644 +index 6500af1d859f..0d078a4a4281 100644 --- content/test/fake_plugin_service.cc +++ content/test/fake_plugin_service.cc @@ -29,6 +29,7 @@ bool FakePluginService::GetPluginInfo(int render_process_id, @@ -469,7 +469,7 @@ index dfc1e111ac10..23106007a32e 100644 const std::string& mime_type, bool allow_wildcard, diff --git content/test/fake_plugin_service.h content/test/fake_plugin_service.h -index 84bed37848d9..1a66c0757437 100644 +index 205dfc39dfa7..ec250828b0ba 100644 --- content/test/fake_plugin_service.h +++ content/test/fake_plugin_service.h @@ -30,6 +30,7 @@ class FakePluginService : public PluginService { diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 72b03099e..7741c562b 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -27,7 +27,7 @@ index 53c7404ef1f9..ac33df7cfe0e 100644 auto* browser_context = web_contents->GetBrowserContext(); StreamsPrivateAPI* streams_private = GetStreamsPrivateAPI(browser_context); diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc -index 406302b6b760..5ab2f3d7157b 100644 +index 49ad391a3133..b7216126976b 100644 --- content/browser/frame_host/render_frame_host_manager.cc +++ content/browser/frame_host/render_frame_host_manager.cc @@ -928,10 +928,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( @@ -57,10 +57,10 @@ index 406302b6b760..5ab2f3d7157b 100644 // If |new_instance| is a new SiteInstance for a subframe that requires a // dedicated process, set its process reuse policy so that such subframes are diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index 5e35f1de540d..3e73ad586ab8 100644 +index bc2b501331e9..acf916d35479 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -396,6 +396,13 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -422,6 +422,13 @@ class CONTENT_EXPORT ContentBrowserClient { // Returns true if error page should be isolated in its own process. virtual bool ShouldIsolateErrorPage(bool in_main_frame); @@ -75,7 +75,7 @@ index 5e35f1de540d..3e73ad586ab8 100644 // current SiteInstance, if it does not yet have a site. virtual bool ShouldAssignSiteForURL(const GURL& url); diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc -index b1bd45860305..5169b816f185 100644 +index 6cf7f34bfbd7..a2dcdb88fbe3 100644 --- extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc @@ -67,11 +67,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, @@ -145,7 +145,7 @@ index b1bd45860305..5169b816f185 100644 ExtensionRegistry::Get(browser_context_)->RemoveObserver(this); diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h -index 369f4451607e..1849f3a7bcb7 100644 +index ad1ef1bd0b8f..8014a61c5083 100644 --- extensions/browser/extension_host.h +++ extensions/browser/extension_host.h @@ -51,13 +51,19 @@ class ExtensionHost : public DeferredStartRenderHost, @@ -169,7 +169,7 @@ index 369f4451607e..1849f3a7bcb7 100644 content::RenderViewHost* render_view_host() const; content::RenderProcessHost* render_process_host() const; bool has_loaded_once() const { return has_loaded_once_; } -@@ -175,7 +181,8 @@ class ExtensionHost : public DeferredStartRenderHost, +@@ -178,7 +184,8 @@ class ExtensionHost : public DeferredStartRenderHost, content::BrowserContext* browser_context_; // The host for our HTML content. @@ -180,10 +180,10 @@ index 369f4451607e..1849f3a7bcb7 100644 // A weak pointer to the current or pending RenderViewHost. We don't access // this through the host_contents because we want to deal with the pending diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index bb45a8acc909..d4b3fcb3dae5 100644 +index 7e0c178e1e36..98066c8437a1 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h -@@ -54,6 +54,7 @@ class ComponentExtensionResourceManager; +@@ -61,6 +61,7 @@ class ComponentExtensionResourceManager; class Extension; class ExtensionCache; class ExtensionError; @@ -191,7 +191,7 @@ index bb45a8acc909..d4b3fcb3dae5 100644 class ExtensionHostDelegate; class ExtensionPrefsObserver; class ExtensionApiFrameIdMap; -@@ -109,6 +110,11 @@ class ExtensionsBrowserClient { +@@ -132,6 +133,11 @@ class ExtensionsBrowserClient { virtual content::BrowserContext* GetOriginalContext( content::BrowserContext* context) = 0; @@ -203,7 +203,7 @@ index bb45a8acc909..d4b3fcb3dae5 100644 #if defined(OS_CHROMEOS) // Returns a user id hash from |context| or an empty string if no hash could // be extracted. -@@ -191,6 +197,14 @@ class ExtensionsBrowserClient { +@@ -214,6 +220,14 @@ class ExtensionsBrowserClient { virtual std::unique_ptr CreateExtensionHostDelegate() = 0; @@ -219,10 +219,10 @@ index bb45a8acc909..d4b3fcb3dae5 100644 // once each time the extensions system is loaded per browser_context. The // implementation may wish to use the BrowserContext to record the current diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc -index 1f8c4ed09d60..933019a7a483 100644 +index ceb2f535caab..6e57be3d9241 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -353,9 +353,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -358,9 +358,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, return true; // TODO(kalman): return false here? It might break things... DVLOG(1) << "CreateBackgroundHost " << extension->id(); diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index ffe4cb381..7eb6fccb5 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index c1a111364bed..566ffd815bc9 100644 +index 6fd17634ee87..0563b730a180 100644 --- .gn +++ .gn -@@ -310,6 +310,8 @@ exec_script_whitelist = +@@ -411,6 +411,8 @@ exec_script_whitelist = # in the Chromium repo outside of //build. "//build_overrides/build.gni", @@ -12,10 +12,10 @@ index c1a111364bed..566ffd815bc9 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 45b912d00cdd..4b3bbcd8cbf7 100644 +index fd7e05257f9a..89d9e6c53d06 100644 --- BUILD.gn +++ BUILD.gn -@@ -188,6 +188,7 @@ group("gn_all") { +@@ -187,6 +187,7 @@ group("gn_all") { if (!is_ios && !is_fuchsia) { deps += [ @@ -56,7 +56,7 @@ index 982fbe8d3f0d..e757be4688f1 100644 + "studio path") } diff --git build/toolchain/win/BUILD.gn build/toolchain/win/BUILD.gn -index eb3e2b2b377d..343b039f3a50 100644 +index 3c6c9d05d2c8..d475747fa12d 100644 --- build/toolchain/win/BUILD.gn +++ build/toolchain/win/BUILD.gn @@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni") diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 732bd8e6c..7f43028e7 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,8 +1,8 @@ diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids -index 7adeec49c098..5b60ee904910 100644 +index 4d9d81bcc3fd..c57df19fa613 100644 --- tools/gritsettings/resource_ids +++ tools/gritsettings/resource_ids -@@ -419,4 +419,11 @@ +@@ -427,4 +427,11 @@ # Please read the header and find the right section above instead. # Resource ids starting at 31000 are reserved for projects built on Chromium. diff --git a/patch/patches/ime_1610.patch b/patch/patches/ime_1610.patch index f409acea7..edb23b37c 100644 --- a/patch/patches/ime_1610.patch +++ b/patch/patches/ime_1610.patch @@ -1,8 +1,8 @@ diff --git ui/base/ime/input_method_win_base.cc ui/base/ime/input_method_win_base.cc -index db76ef3d5f87..816473414034 100644 +index 046f0d05268c..abbe8763e8fb 100644 --- ui/base/ime/input_method_win_base.cc +++ ui/base/ime/input_method_win_base.cc -@@ -72,8 +72,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const { +@@ -266,8 +266,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const { // receiving keyboard input as long as it is an active window. This works well // even when the |attached_window_handle| becomes active but has not received // WM_FOCUS yet. diff --git a/patch/patches/linux_build.patch b/patch/patches/linux_build.patch index dae103dbc..cdcbbe691 100644 --- a/patch/patches/linux_build.patch +++ b/patch/patches/linux_build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index 7cb21711aa1b..afbddcd5b394 100644 +index d1bb5597f206..8c54651b3bce 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -153,7 +153,7 @@ declare_args() { +@@ -162,7 +162,7 @@ declare_args() { !use_clang_coverage && !(is_android && use_order_profiling) && (use_lld || (use_gold && @@ -11,77 +11,3 @@ index 7cb21711aa1b..afbddcd5b394 100644 !(current_cpu == "x86" || current_cpu == "x64")))) } -diff --git chrome/browser/ui/libgtkui/gtk_util.cc chrome/browser/ui/libgtkui/gtk_util.cc -index 39bf49c7b111..ad7b054e185f 100644 ---- chrome/browser/ui/libgtkui/gtk_util.cc -+++ chrome/browser/ui/libgtkui/gtk_util.cc -@@ -239,6 +239,7 @@ float GetDeviceScaleFactor() { - return linux_ui ? linux_ui->GetDeviceScaleFactor() : 1; - } - -+#if GTK_MAJOR_VERSION > 2 - using GtkSetState = void (*)(GtkWidgetPath*, gint, GtkStateFlags); - PROTECTED_MEMORY_SECTION base::ProtectedMemory - _gtk_widget_path_iter_set_state; -@@ -246,6 +247,7 @@ PROTECTED_MEMORY_SECTION base::ProtectedMemory - using GtkSetObjectName = void (*)(GtkWidgetPath*, gint, const char*); - PROTECTED_MEMORY_SECTION base::ProtectedMemory - _gtk_widget_path_iter_set_object_name; -+#endif - - } // namespace - -@@ -403,10 +405,12 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context, - NOTREACHED(); - } - } else { -+#if GTK_MAJOR_VERSION > 2 - static base::ProtectedMemory::Initializer init( - &_gtk_widget_path_iter_set_object_name, - reinterpret_cast(dlsym( - GetGtkSharedLibrary(), "gtk_widget_path_iter_set_object_name"))); -+#endif - switch (part_type) { - case CSS_NAME: { - if (GtkVersionCheck(3, 20)) { -@@ -451,6 +455,7 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context, - // widgets specially if they want to. - gtk_widget_path_iter_add_class(path, -1, "chromium"); - -+#if GTK_MAJOR_VERSION > 2 - if (GtkVersionCheck(3, 14)) { - static base::ProtectedMemory::Initializer init( - &_gtk_widget_path_iter_set_state, -@@ -459,6 +464,7 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context, - DCHECK(*_gtk_widget_path_iter_set_state); - base::UnsanitizedCfiCall(_gtk_widget_path_iter_set_state)(path, -1, state); - } -+#endif - - ScopedStyleContext child_context(gtk_style_context_new()); - gtk_style_context_set_path(child_context, path); -diff --git chrome/browser/ui/libgtkui/native_theme_gtk2.cc chrome/browser/ui/libgtkui/native_theme_gtk2.cc -index b24ff4b95f97..49e80717b1d6 100644 ---- chrome/browser/ui/libgtkui/native_theme_gtk2.cc -+++ chrome/browser/ui/libgtkui/native_theme_gtk2.cc -@@ -163,6 +163,8 @@ SkColor NativeThemeGtk2::GetSystemColor(ColorId color_id) const { - return GetBgColor(GetMenu(), NORMAL); - - // Label -+ case kColorId_ActionableSubmenuVerticalSeparatorColor: -+ case kColorId_TouchableMenuItemLabelColor: - case kColorId_LabelEnabledColor: - return GetTextColor(GetEntry(), NORMAL); - case kColorId_LabelDisabledColor: -diff --git ui/accessibility/platform/atk_util_auralinux_gtk2.cc ui/accessibility/platform/atk_util_auralinux_gtk2.cc -index 5bcccd9cd98c..fa581fbe23b1 100644 ---- ui/accessibility/platform/atk_util_auralinux_gtk2.cc -+++ ui/accessibility/platform/atk_util_auralinux_gtk2.cc -@@ -48,6 +48,7 @@ GnomeAccessibilityModuleInitFunc GetAccessibilityModuleInitFunc() { - return init_func; - } - -+NO_SANITIZE("cfi-icall") - void FinishAccessibilityInitOnMainThread( - GnomeAccessibilityModuleInitFunc init_func) { - if (!init_func) { diff --git a/patch/patches/mac_gpu.patch b/patch/patches/mac_gpu.patch index 3cc0be972..227b9dfb4 100644 --- a/patch/patches/mac_gpu.patch +++ b/patch/patches/mac_gpu.patch @@ -1,8 +1,8 @@ diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc -index f4789ebf3b0e..73d66e8f5165 100644 +index a89aad20c34c..f3bfc3973a10 100644 --- ui/gl/init/gl_initializer_mac.cc +++ ui/gl/init/gl_initializer_mac.cc -@@ -47,11 +47,8 @@ bool InitializeOneOffForSandbox() { +@@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() { // GPU-related stuff is very slow without this, probably because // the sandbox prevents loading graphics drivers or some such. std::vector attribs; @@ -16,7 +16,7 @@ index f4789ebf3b0e..73d66e8f5165 100644 if (GetGLImplementation() == kGLImplementationAppleGL) { attribs.push_back(kCGLPFARendererID); attribs.push_back( -@@ -146,8 +143,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { +@@ -102,8 +99,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { // as app bundles. In that case, the .dylib is next to the executable. base::FilePath base_dir; if (base::mac::AmIBundled()) { diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 7fa99942a..cbff404d2 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,8 +1,8 @@ diff --git base/message_loop/message_loop.cc base/message_loop/message_loop.cc -index 7f063693a0f2..14f50b6f7d5f 100644 +index ff55a15ce0f0..30a903dffcdc 100644 --- base/message_loop/message_loop.cc +++ base/message_loop/message_loop.cc -@@ -610,6 +610,9 @@ MessageLoopForUI::MessageLoopForUI(Type type) : MessageLoop(type) { +@@ -613,6 +613,9 @@ MessageLoopForUI::MessageLoopForUI(Type type) : MessageLoop(type) { #endif } @@ -13,10 +13,10 @@ index 7f063693a0f2..14f50b6f7d5f 100644 MessageLoopCurrentForUI MessageLoopForUI::current() { return MessageLoopCurrentForUI::Get(); diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h -index 52b474310074..35f4cc41a572 100644 +index dae6c35eab00..adbd6e72c7a3 100644 --- base/message_loop/message_loop.h +++ base/message_loop/message_loop.h -@@ -362,6 +362,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate, +@@ -366,6 +366,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate, class BASE_EXPORT MessageLoopForUI : public MessageLoop { public: explicit MessageLoopForUI(Type type = TYPE_UI); @@ -25,7 +25,7 @@ index 52b474310074..35f4cc41a572 100644 // TODO(gab): Mass migrate callers to MessageLoopCurrentForUI::Get()/IsSet(). static MessageLoopCurrentForUI current(); diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h -index 2a2e761e87e8..37881c184940 100644 +index d623cbc7f7b2..04d83792f98d 100644 --- base/message_loop/message_loop_current.h +++ base/message_loop/message_loop_current.h @@ -124,6 +124,16 @@ class BASE_EXPORT MessageLoopCurrent { @@ -60,7 +60,7 @@ index 2a2e761e87e8..37881c184940 100644 #if !defined(OS_NACL) diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index c95f85abfee1..b28ac0a0faa1 100644 +index bba71fa7929f..9abffd154557 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -11,6 +11,7 @@ @@ -71,7 +71,7 @@ index c95f85abfee1..b28ac0a0faa1 100644 #include "base/metrics/histogram_macros.h" #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event.h" -@@ -375,20 +376,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) { +@@ -387,20 +388,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) { } bool MessagePumpForUI::ProcessPumpReplacementMessage() { diff --git a/patch/patches/net_filter_515.patch b/patch/patches/net_filter_515.patch index 39a9c0dea..f329b8c6b 100644 --- a/patch/patches/net_filter_515.patch +++ b/patch/patches/net_filter_515.patch @@ -1,5 +1,5 @@ diff --git net/base/network_delegate.h net/base/network_delegate.h -index c28d0bb3b676..1acbb4c94495 100644 +index ea4316257a61..58bf1443f1ae 100644 --- net/base/network_delegate.h +++ net/base/network_delegate.h @@ -17,6 +17,7 @@ @@ -10,7 +10,7 @@ index c28d0bb3b676..1acbb4c94495 100644 #include "net/proxy_resolution/proxy_retry_info.h" class GURL; -@@ -125,6 +126,10 @@ class NET_EXPORT NetworkDelegate { +@@ -122,6 +123,10 @@ class NET_EXPORT NetworkDelegate { bool CanUseReportingClient(const url::Origin& origin, const GURL& endpoint) const; diff --git a/patch/patches/net_urlrequest_1327.patch b/patch/patches/net_urlrequest_1327.patch index 78de0cfc7..9657f6220 100644 --- a/patch/patches/net_urlrequest_1327.patch +++ b/patch/patches/net_urlrequest_1327.patch @@ -1,10 +1,10 @@ diff --git net/url_request/url_request.h net/url_request/url_request.h -index 6f23eedfd4f9..82d1f81e4081 100644 +index a64498d1786c..bf440a5b5f6b 100644 --- net/url_request/url_request.h +++ net/url_request/url_request.h -@@ -734,10 +734,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { - } - bool upgrade_if_insecure() const { return upgrade_if_insecure_; } +@@ -737,10 +737,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { + + base::WeakPtr GetWeakPtr(); - protected: // Allow the URLRequestJob class to control the is_pending() flag. diff --git a/patch/patches/pdfium_print_549365.patch b/patch/patches/pdfium_print_549365.patch index aed3d0134..b3b2d1a14 100644 --- a/patch/patches/pdfium_print_549365.patch +++ b/patch/patches/pdfium_print_549365.patch @@ -1,8 +1,8 @@ diff --git BUILD.gn BUILD.gn -index afa83e358..90e6473af 100644 +index 27e4b2615..80764bec2 100644 --- BUILD.gn +++ BUILD.gn -@@ -239,6 +239,10 @@ jumbo_static_library("pdfium") { +@@ -240,6 +240,10 @@ jumbo_static_library("pdfium") { complete_static_lib = true configs -= [ "//build/config/compiler:thin_archive" ] } @@ -14,18 +14,18 @@ index afa83e358..90e6473af 100644 jumbo_static_library("test_support") { diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp -index c44d582fd..6debf1e38 100644 +index 0cfa36290..302fa174b 100644 --- fpdfsdk/fpdf_view.cpp +++ fpdfsdk/fpdf_view.cpp @@ -38,6 +38,7 @@ - #include "fpdfsdk/cpdfsdk_memoryaccess.h" + #include "fpdfsdk/cpdfsdk_helpers.h" #include "fpdfsdk/cpdfsdk_pageview.h" #include "fpdfsdk/ipdfsdk_pauseadapter.h" +#include "fxjs/cfxjs_engine.h" #include "fxjs/ijs_runtime.h" #include "public/fpdf_formfill.h" #include "third_party/base/ptr_util.h" -@@ -194,6 +195,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() { +@@ -195,6 +196,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() { CPDF_ModuleMgr::Destroy(); CFX_GEModule::Destroy(); diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index e17569e5e..b3945b787 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -1,8 +1,8 @@ diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h -index 8b7955b58e6f..96a801e55e96 100644 +index 64de36aa7450..3795fb7dffbe 100644 --- content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h -@@ -187,6 +187,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) +@@ -188,6 +188,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) @@ -11,7 +11,7 @@ index 8b7955b58e6f..96a801e55e96 100644 IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc -index 8378aefaf81a..f831c4aa6d26 100644 +index bd8facb2d850..fba8020aa90e 100644 --- content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc @@ -178,6 +178,7 @@ WebPreferences::WebPreferences() @@ -23,7 +23,7 @@ index 8378aefaf81a..f831c4aa6d26 100644 record_whole_document(false), save_previous_document_resources(SavePreviousDocumentResources::NEVER), diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h -index 78cbf5f3db86..9a4906a32336 100644 +index e21f52c4dde5..b7da33f1b9a3 100644 --- content/public/common/web_preferences.h +++ content/public/common/web_preferences.h @@ -198,6 +198,7 @@ struct CONTENT_EXPORT WebPreferences { @@ -35,10 +35,10 @@ index 78cbf5f3db86..9a4906a32336 100644 bool record_whole_document; SavePreviousDocumentResources save_previous_document_resources; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index b97c67a53e1f..d7e56c72c521 100644 +index 059aaa640ef3..e2e0e58726b8 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -1269,6 +1269,7 @@ void RenderViewImpl::SendFrameStateUpdates() { +@@ -1308,6 +1308,7 @@ void RenderViewImpl::SendFrameStateUpdates() { void RenderViewImpl::ApplyWebPreferencesInternal(const WebPreferences& prefs, blink::WebView* web_view) { ApplyWebPreferences(prefs, web_view); diff --git a/patch/patches/print_header_footer_1478_1565.patch b/patch/patches/print_header_footer_1478_1565.patch index 043dc0bbb..fedb9542b 100644 --- a/patch/patches/print_header_footer_1478_1565.patch +++ b/patch/patches/print_header_footer_1478_1565.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 13b42917efe0..2b292871222e 100644 +index 58bfe0e13733..371653fc39e8 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn -@@ -874,6 +874,7 @@ jumbo_split_static_library("ui") { +@@ -828,6 +828,7 @@ jumbo_split_static_library("ui") { "//base:i18n", "//base/allocator:buildflags", "//cc/paint", @@ -133,10 +133,10 @@ index 18df7614a988..9f86016d3e68 100644 } -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) diff --git components/printing/common/print_messages.h components/printing/common/print_messages.h -index d29bb6aedecd..db7110ce80be 100644 +index e3c11e1302ff..0ae7dbd8851a 100644 --- components/printing/common/print_messages.h +++ components/printing/common/print_messages.h -@@ -86,7 +86,6 @@ struct PrintMsg_PrintFrame_Params { +@@ -85,7 +85,6 @@ struct PrintMsg_PrintFrame_Params { int document_cookie; }; @@ -144,7 +144,7 @@ index d29bb6aedecd..db7110ce80be 100644 struct PrintHostMsg_RequestPrintPreview_Params { PrintHostMsg_RequestPrintPreview_Params(); ~PrintHostMsg_RequestPrintPreview_Params(); -@@ -113,7 +112,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params { +@@ -112,7 +111,6 @@ struct PrintHostMsg_SetOptionsFromDocument_Params { printing::DuplexMode duplex; printing::PageRanges page_ranges; }; @@ -152,7 +152,7 @@ index d29bb6aedecd..db7110ce80be 100644 #endif // INTERNAL_COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ -@@ -212,7 +210,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange) +@@ -211,7 +209,6 @@ IPC_STRUCT_TRAITS_BEGIN(printing::PageRange) IPC_STRUCT_TRAITS_MEMBER(to) IPC_STRUCT_TRAITS_END() @@ -160,7 +160,7 @@ index d29bb6aedecd..db7110ce80be 100644 IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_RequestPrintPreview_Params) IPC_STRUCT_TRAITS_MEMBER(is_modifiable) IPC_STRUCT_TRAITS_MEMBER(webnode_only) -@@ -238,7 +235,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) +@@ -237,7 +234,6 @@ IPC_STRUCT_TRAITS_BEGIN(PrintHostMsg_SetOptionsFromDocument_Params) // Specifies page range to be printed. IPC_STRUCT_TRAITS_MEMBER(page_ranges) IPC_STRUCT_TRAITS_END() @@ -168,23 +168,23 @@ index d29bb6aedecd..db7110ce80be 100644 IPC_STRUCT_TRAITS_BEGIN(printing::PageSizeMargins) IPC_STRUCT_TRAITS_MEMBER(content_width) -@@ -283,7 +279,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintContent_Params) +@@ -282,7 +278,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintContent_Params) IPC_STRUCT_MEMBER(printing::ContentToProxyIdMap, subframe_content_info) IPC_STRUCT_END() -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) - // Parameters to describe a rendered document. - IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params) - // Document's content including metafile data and subframe info. -@@ -319,7 +314,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidGetPreviewPageCount_Params) - // Scaling % to fit to page - IPC_STRUCT_MEMBER(int, fit_to_page_scaling) + // Parameters to describe the to-be-rendered preview document. + IPC_STRUCT_BEGIN(PrintHostMsg_DidStartPreview_Params) + // Total page count for the rendered preview. (Not the number of pages the +@@ -316,7 +311,6 @@ IPC_STRUCT_BEGIN(PrintHostMsg_DidPreviewDocument_Params) + // Store the expected pages count. + IPC_STRUCT_MEMBER(int, expected_pages_count) IPC_STRUCT_END() -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) // Parameters to describe a rendered page. IPC_STRUCT_BEGIN(PrintHostMsg_DidPrintDocument_Params) -@@ -355,20 +349,18 @@ IPC_STRUCT_END() +@@ -351,20 +345,18 @@ IPC_STRUCT_END() // Messages sent from the browser to the renderer. @@ -206,7 +206,7 @@ index d29bb6aedecd..db7110ce80be 100644 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) #endif -@@ -383,13 +375,13 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, +@@ -379,13 +371,13 @@ IPC_MESSAGE_ROUTED1(PrintMsg_PrintingDone, // Tells the RenderFrame whether printing is enabled or not. IPC_MESSAGE_ROUTED1(PrintMsg_SetPrintingEnabled, bool /* enabled */) @@ -221,7 +221,7 @@ index d29bb6aedecd..db7110ce80be 100644 // Tells the RenderFrame that print preview dialog was closed. IPC_MESSAGE_ROUTED0(PrintMsg_ClosePrintPreviewDialog) #endif -@@ -455,7 +447,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten, +@@ -451,7 +443,6 @@ IPC_MESSAGE_CONTROL3(PrintHostMsg_TempFileForPrintingWritten, int /* page count */) #endif // defined(OS_ANDROID) @@ -229,7 +229,7 @@ index d29bb6aedecd..db7110ce80be 100644 // Asks the browser to do print preview. IPC_MESSAGE_ROUTED1(PrintHostMsg_RequestPrintPreview, PrintHostMsg_RequestPrintPreview_Params /* params */) -@@ -492,7 +483,6 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_CheckForCancel, +@@ -488,7 +479,6 @@ IPC_SYNC_MESSAGE_ROUTED1_1(PrintHostMsg_CheckForCancel, IPC_MESSAGE_ROUTED2(PrintHostMsg_MetafileReadyForPrinting, PrintHostMsg_DidPreviewDocument_Params /* params */, PrintHostMsg_PreviewIds /* ids */) @@ -237,7 +237,7 @@ index d29bb6aedecd..db7110ce80be 100644 // This is sent when there are invalid printer settings. IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) -@@ -501,7 +491,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) +@@ -497,7 +487,6 @@ IPC_MESSAGE_ROUTED0(PrintHostMsg_ShowInvalidPrinterSettingsError) IPC_MESSAGE_ROUTED1(PrintHostMsg_PrintingFailed, int /* document cookie */) @@ -245,7 +245,7 @@ index d29bb6aedecd..db7110ce80be 100644 // Tell the browser print preview failed. IPC_MESSAGE_ROUTED2(PrintHostMsg_PrintPreviewFailed, int /* document cookie */, -@@ -532,6 +521,5 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, +@@ -528,6 +517,5 @@ IPC_MESSAGE_ROUTED1(PrintHostMsg_ShowScriptedPrintPreview, IPC_MESSAGE_ROUTED2(PrintHostMsg_SetOptionsFromDocument, PrintHostMsg_SetOptionsFromDocument_Params /* params */, PrintHostMsg_PreviewIds /* ids */) @@ -253,10 +253,10 @@ index d29bb6aedecd..db7110ce80be 100644 #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc -index 89d54c441107..ca90c04eb841 100644 +index 86a68c361f06..3cd1008f35b0 100644 --- components/printing/renderer/print_render_frame_helper.cc +++ components/printing/renderer/print_render_frame_helper.cc -@@ -341,7 +341,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, +@@ -340,7 +340,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, return plugin && plugin->SupportsPaginatedPrint(); } @@ -264,7 +264,7 @@ index 89d54c441107..ca90c04eb841 100644 // Returns true if the current destination printer is PRINT_TO_PDF. bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) { bool print_to_pdf = false; -@@ -363,7 +362,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, +@@ -362,7 +361,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, } return frame_has_custom_page_size_style; } @@ -272,7 +272,7 @@ index 89d54c441107..ca90c04eb841 100644 #if BUILDFLAG(ENABLE_PRINTING) // Disable scaling when either: -@@ -418,7 +416,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, +@@ -417,7 +415,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, : PRINTABLE_AREA_MARGINS; } @@ -280,7 +280,7 @@ index 89d54c441107..ca90c04eb841 100644 bool FitToPageEnabled(const base::DictionaryValue& job_settings) { bool fit_to_paper_size = false; if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) { -@@ -460,7 +457,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( +@@ -459,7 +456,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( } return blink::kWebPrintScalingOptionFitToPrintableArea; } @@ -288,7 +288,7 @@ index 89d54c441107..ca90c04eb841 100644 // Helper function to scale and round an integer value with a double valued // scaling. -@@ -1023,10 +1019,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1021,10 +1017,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { return; if (g_is_preview_enabled) { @@ -299,7 +299,7 @@ index 89d54c441107..ca90c04eb841 100644 } else { auto weak_this = weak_ptr_factory_.GetWeakPtr(); web_frame->DispatchBeforePrintEvent(); -@@ -1054,10 +1048,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { +@@ -1052,10 +1046,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(PrintRenderFrameHelper, message) IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages) IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog) @@ -311,7 +311,7 @@ index 89d54c441107..ca90c04eb841 100644 IPC_MESSAGE_HANDLER(PrintMsg_ClosePrintPreviewDialog, OnClosePrintPreviewDialog) #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -1139,7 +1133,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( +@@ -1137,7 +1131,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( ignore_css_margins_ = (margins_type != DEFAULT_MARGINS); } @@ -319,7 +319,7 @@ index 89d54c441107..ca90c04eb841 100644 void PrintRenderFrameHelper::OnPrintPreview( const base::DictionaryValue& settings) { if (ipc_nesting_level_ > 1) -@@ -1394,7 +1387,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( +@@ -1391,7 +1384,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( printable_height / static_cast(uniform_page_size.height); return static_cast(100.0f * std::min(scale_width, scale_height)); } @@ -327,7 +327,7 @@ index 89d54c441107..ca90c04eb841 100644 void PrintRenderFrameHelper::OnPrintingDone(bool success) { if (ipc_nesting_level_ > 1) -@@ -1409,7 +1401,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { +@@ -1406,7 +1398,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { is_printing_enabled_ = enabled; } @@ -335,7 +335,7 @@ index 89d54c441107..ca90c04eb841 100644 void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { if (ipc_nesting_level_ > 1) return; -@@ -1420,7 +1411,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1417,7 +1408,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { // that instead. auto plugin = delegate_->GetPdfElement(frame); if (!plugin.IsNull()) { @@ -345,7 +345,7 @@ index 89d54c441107..ca90c04eb841 100644 return; } print_preview_context_.InitWithFrame(frame); -@@ -1429,6 +1422,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1426,6 +1419,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { : PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME); } @@ -353,7 +353,7 @@ index 89d54c441107..ca90c04eb841 100644 void PrintRenderFrameHelper::OnClosePrintPreviewDialog() { print_preview_context_.source_frame()->DispatchAfterPrintEvent(); } -@@ -1516,11 +1510,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1513,11 +1507,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { print_node_in_progress_ = true; @@ -366,7 +366,7 @@ index 89d54c441107..ca90c04eb841 100644 } else { // Make a copy of the node, in case RenderView::OnContextMenuClosed() resets // its |context_menu_node_|. -@@ -1596,13 +1588,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1593,13 +1585,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { int cookie = print_pages_params_ ? print_pages_params_->params.document_cookie : 0; @@ -380,7 +380,7 @@ index 89d54c441107..ca90c04eb841 100644 switch (result) { case OK: break; -@@ -1617,7 +1607,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1614,7 +1604,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { } break; @@ -388,7 +388,7 @@ index 89d54c441107..ca90c04eb841 100644 case FAIL_PREVIEW: if (!is_print_ready_metafile_sent_) { if (notify_browser_of_print_failure_) { -@@ -1635,7 +1624,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1632,7 +1621,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { cookie, ids)); print_preview_context_.Failed(false); break; @@ -396,7 +396,7 @@ index 89d54c441107..ca90c04eb841 100644 } prep_frame_view_.reset(); print_pages_params_.reset(); -@@ -1807,7 +1795,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, +@@ -1804,7 +1792,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, return true; } @@ -404,7 +404,7 @@ index 89d54c441107..ca90c04eb841 100644 bool PrintRenderFrameHelper::SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options) { blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); -@@ -1901,7 +1888,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( +@@ -1897,7 +1884,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS); return false; } @@ -412,7 +412,7 @@ index 89d54c441107..ca90c04eb841 100644 void PrintRenderFrameHelper::GetPrintSettingsFromUser( blink::WebLocalFrame* frame, -@@ -2058,7 +2044,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( +@@ -2054,7 +2040,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( return true; } @@ -420,7 +420,7 @@ index 89d54c441107..ca90c04eb841 100644 void PrintRenderFrameHelper::ShowScriptedPrintPreview() { if (is_scripted_preview_delayed_) { is_scripted_preview_delayed_ = false; -@@ -2184,7 +2169,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( +@@ -2180,7 +2165,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids)); return true; } @@ -429,10 +429,10 @@ index 89d54c441107..ca90c04eb841 100644 PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext() = default; diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h -index 947ab972c1ef..e3bb2c2efab4 100644 +index d09db4d500ca..83d265cf503e 100644 --- components/printing/renderer/print_render_frame_helper.h +++ components/printing/renderer/print_render_frame_helper.h -@@ -149,10 +149,8 @@ class PrintRenderFrameHelper +@@ -150,10 +150,8 @@ class PrintRenderFrameHelper OK, FAIL_PRINT_INIT, FAIL_PRINT, @@ -443,7 +443,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644 }; // These values are persisted to logs. Entries should not be renumbered and -@@ -188,9 +186,9 @@ class PrintRenderFrameHelper +@@ -189,9 +187,9 @@ class PrintRenderFrameHelper // Message handlers --------------------------------------------------------- void OnPrintPages(); void OnPrintForSystemDialog(); @@ -454,7 +454,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644 void OnClosePrintPreviewDialog(); #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) void OnPrintFrameContent(const PrintMsg_PrintFrame_Params& params); -@@ -206,7 +204,6 @@ class PrintRenderFrameHelper +@@ -207,7 +205,6 @@ class PrintRenderFrameHelper // Update |ignore_css_margins_| based on settings. void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings); @@ -462,7 +462,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644 // Prepare frame for creating preview document. void PrepareFrameForPreviewDocument(); -@@ -226,7 +223,6 @@ class PrintRenderFrameHelper +@@ -227,7 +224,6 @@ class PrintRenderFrameHelper // Helper method to calculate the scale factor for fit-to-page. int GetFitToPageScaleFactor(const gfx::Rect& printable_area_in_points); @@ -470,7 +470,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644 // Enable/Disable printing. void OnSetPrintingEnabled(bool enabled); -@@ -254,7 +250,6 @@ class PrintRenderFrameHelper +@@ -255,7 +251,6 @@ class PrintRenderFrameHelper const blink::WebNode& node, int* number_of_pages); @@ -478,7 +478,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644 // Set options for print preset from source PDF document. bool SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options); -@@ -265,7 +260,6 @@ class PrintRenderFrameHelper +@@ -266,7 +261,6 @@ class PrintRenderFrameHelper bool UpdatePrintSettings(blink::WebLocalFrame* frame, const blink::WebNode& node, const base::DictionaryValue& passed_job_settings); @@ -486,7 +486,7 @@ index 947ab972c1ef..e3bb2c2efab4 100644 // Get final print settings from the user. // WARNING: |this| may be gone after this method returns. -@@ -350,7 +344,6 @@ class PrintRenderFrameHelper +@@ -348,7 +342,6 @@ class PrintRenderFrameHelper bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame, bool user_initiated); @@ -494,15 +494,15 @@ index 947ab972c1ef..e3bb2c2efab4 100644 // Shows scripted print preview when options from plugin are available. void ShowScriptedPrintPreview(); -@@ -369,7 +362,6 @@ class PrintRenderFrameHelper +@@ -367,7 +360,6 @@ class PrintRenderFrameHelper // Returns true if print preview should continue, false on failure. bool PreviewPageRendered(int page_number, - std::unique_ptr metafile); + std::unique_ptr metafile); -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings); -@@ -523,6 +515,7 @@ class PrintRenderFrameHelper +@@ -521,6 +513,7 @@ class PrintRenderFrameHelper ScriptingThrottler scripting_throttler_; bool print_node_in_progress_ = false; diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index 41addd70f..49179685a 100644 --- a/patch/patches/rwh_background_color_1984.patch +++ b/patch/patches/rwh_background_color_1984.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc -index 881bb2117f4c..b949c81e3ef4 100644 +index 126b857e541b..86dccf223b0a 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -718,10 +718,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { @@ -19,7 +19,7 @@ index 881bb2117f4c..b949c81e3ef4 100644 } void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -1921,6 +1923,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -1932,6 +1934,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { if (frame_sink_id_.is_valid()) window_->SetEmbedFrameSinkId(frame_sink_id_); @@ -32,6 +32,6 @@ index 881bb2117f4c..b949c81e3ef4 100644 + ignore_result(rvh->GetWebkitPreferences()); + } + - if (features::IsAshInBrowserProcess()) + if (!features::IsUsingWindowService()) return; diff --git a/patch/patches/service_factory_1680.patch b/patch/patches/service_factory_1680.patch index 04f25154d..efbab9166 100644 --- a/patch/patches/service_factory_1680.patch +++ b/patch/patches/service_factory_1680.patch @@ -96,51 +96,48 @@ index 2907619549ba..f941fba363b5 100644 SupervisedUserSettingsServiceFactory>; SupervisedUserSettingsServiceFactory(); -diff --git chrome/browser/ui/prefs/prefs_tab_helper.cc chrome/browser/ui/prefs/prefs_tab_helper.cc -index 7e3591ae2f28..55f0d4ce1e28 100644 ---- chrome/browser/ui/prefs/prefs_tab_helper.cc -+++ chrome/browser/ui/prefs/prefs_tab_helper.cc -@@ -11,8 +11,8 @@ - #include +diff --git chrome/browser/ui/prefs/pref_watcher.cc chrome/browser/ui/prefs/pref_watcher.cc +index e38f8c50b10f..3b486f3b8daf 100644 +--- chrome/browser/ui/prefs/pref_watcher.cc ++++ chrome/browser/ui/prefs/pref_watcher.cc +@@ -46,6 +46,9 @@ const char* const kWebPrefsToObserve[] = { + + const int kWebPrefsToObserveLength = base::size(kWebPrefsToObserve); + ++base::LazyInstance::Leaky g_pref_watcher_factory = ++ LAZY_INSTANCE_INITIALIZER; ++ + } // namespace + + // Watching all these settings per tab is slow when a user has a lot of tabs and +@@ -124,7 +127,7 @@ PrefWatcher* PrefWatcherFactory::GetForProfile(Profile* profile) { + + // static + PrefWatcherFactory* PrefWatcherFactory::GetInstance() { +- return base::Singleton::get(); ++ return g_pref_watcher_factory.Pointer(); + } + + PrefWatcherFactory::PrefWatcherFactory() +diff --git chrome/browser/ui/prefs/pref_watcher.h chrome/browser/ui/prefs/pref_watcher.h +index 061ca27681fa..0538f62f3f25 100644 +--- chrome/browser/ui/prefs/pref_watcher.h ++++ chrome/browser/ui/prefs/pref_watcher.h +@@ -5,7 +5,7 @@ + #ifndef CHROME_BROWSER_UI_PREFS_PREF_WATCHER_H_ + #define CHROME_BROWSER_UI_PREFS_PREF_WATCHER_H_ - #include "base/command_line.h" -+#include "base/lazy_instance.h" - #include "base/macros.h" -#include "base/memory/singleton.h" - #include "base/strings/string_number_conversions.h" - #include "base/strings/string_util.h" - #include "base/strings/stringprintf.h" -@@ -387,12 +387,10 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory { - GetInstance()->GetServiceForBrowserContext(profile, true)); - } - -- static PrefWatcherFactory* GetInstance() { -- return base::Singleton::get(); -- } -+ static PrefWatcherFactory* GetInstance(); ++#include "base/lazy_instance.h" + #include "components/keyed_service/content/browser_context_keyed_service_factory.h" + #include "components/keyed_service/core/keyed_service.h" + #include "components/prefs/pref_change_registrar.h" +@@ -58,7 +58,7 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory { + static PrefWatcherFactory* GetInstance(); private: - friend struct base::DefaultSingletonTraits; + friend struct base::LazyInstanceTraitsBase; - PrefWatcherFactory() : BrowserContextKeyedServiceFactory( - "PrefWatcher", -@@ -413,6 +411,18 @@ class PrefWatcherFactory : public BrowserContextKeyedServiceFactory { - } - }; - -+namespace { -+ -+base::LazyInstance::Leaky g_pref_watcher_factory = -+ LAZY_INSTANCE_INITIALIZER; -+ -+} // namespace -+ -+// static -+PrefWatcherFactory* PrefWatcherFactory::GetInstance() { -+ return g_pref_watcher_factory.Pointer(); -+} -+ - // static - PrefWatcher* PrefWatcher::Get(Profile* profile) { - return PrefWatcherFactory::GetForProfile(profile); + PrefWatcherFactory(); + ~PrefWatcherFactory() override; diff --git a/patch/patches/storage_partition_1973.patch b/patch/patches/storage_partition_1973.patch index 413a2fa1b..4a03caead 100644 --- a/patch/patches/storage_partition_1973.patch +++ b/patch/patches/storage_partition_1973.patch @@ -1,5 +1,5 @@ diff --git content/browser/appcache/appcache_internals_ui.cc content/browser/appcache/appcache_internals_ui.cc -index f33713440f4f..f5cb6cd28a08 100644 +index d95dcaf34949..5794a5fdf506 100644 --- content/browser/appcache/appcache_internals_ui.cc +++ content/browser/appcache/appcache_internals_ui.cc @@ -375,8 +375,8 @@ void AppCacheInternalsUI::CreateProxyForPartition( @@ -14,10 +14,10 @@ index f33713440f4f..f5cb6cd28a08 100644 } diff --git content/browser/background_fetch/background_fetch_service_impl.cc content/browser/background_fetch/background_fetch_service_impl.cc -index 6aa5ad29416a..77f7edfa51fe 100644 +index f116ff5aad35..73544f3181d6 100644 --- content/browser/background_fetch/background_fetch_service_impl.cc +++ content/browser/background_fetch/background_fetch_service_impl.cc -@@ -39,8 +39,7 @@ void BackgroundFetchServiceImpl::Create( +@@ -42,8 +42,7 @@ void BackgroundFetchServiceImpl::CreateForWorker( BrowserThread::IO, FROM_HERE, base::BindOnce( BackgroundFetchServiceImpl::CreateOnIoThread, @@ -25,8 +25,18 @@ index 6aa5ad29416a..77f7edfa51fe 100644 - render_process_host->GetStoragePartition()) + WrapRefCounted(render_process_host->GetStoragePartition() ->GetBackgroundFetchContext()), - origin, std::move(request))); + origin, nullptr /* render_frame_host */, std::move(request))); } +@@ -64,8 +63,7 @@ void BackgroundFetchServiceImpl::CreateForFrame( + BrowserThread::IO, FROM_HERE, + base::BindOnce( + BackgroundFetchServiceImpl::CreateOnIoThread, +- WrapRefCounted(static_cast( +- render_process_host->GetStoragePartition()) ++ WrapRefCounted(render_process_host->GetStoragePartition() + ->GetBackgroundFetchContext()), + render_frame_host->GetLastCommittedOrigin(), render_frame_host, + std::move(request))); diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc index 203e9c7e94a9..b4260e27ae6a 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc @@ -241,10 +251,10 @@ index 37cabf2c9ffa..a5165fdbfdf6 100644 CreateDownloadURLLoaderFactoryGetter(storage_partition, rfh, true); } diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index c0948b6588ee..38d1b0ae64e2 100644 +index d9034953e7f8..0e7c34daa4f8 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -1068,7 +1068,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController +@@ -1131,7 +1131,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController // path does as well for navigations. bool has_plugin = PluginService::GetInstance()->GetPluginInfo( -1 /* render_process_id */, -1 /* render_frame_id */, resource_context_, @@ -253,10 +263,10 @@ index c0948b6588ee..38d1b0ae64e2 100644 false /* allow_wildcard */, &stale, &plugin, nullptr); if (stale) { -@@ -1417,7 +1417,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( +@@ -1495,7 +1495,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( network::mojom::URLLoaderFactoryPtrInfo proxied_factory_info; network::mojom::URLLoaderFactoryRequest proxied_factory_request; - scoped_refptr redirect_checker; + bool bypass_redirect_checks = false; - auto* partition = static_cast(storage_partition); + auto* partition = storage_partition; if (frame_tree_node) { @@ -309,10 +319,10 @@ index 3cfa0bde2bca..96da49496944 100644 partition->GetPaymentAppContext(); diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc -index 3dcc6e5c2d38..90180d0cfbbb 100644 +index 989b52793c48..a9c5e6c9755b 100644 --- content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -735,11 +735,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, +@@ -739,11 +739,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, // Gets the correct render process to use for this SiteInstance. RenderProcessHost* GetProcessHost(SiteInstance* site_instance, bool is_for_guests_only) { @@ -328,7 +338,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 // Is this the default storage partition? If it isn't, then just give it its // own non-shared process. -@@ -1343,7 +1342,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { +@@ -1474,7 +1473,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { // static RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( BrowserContext* browser_context, @@ -337,7 +347,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 SiteInstance* site_instance, bool is_for_guests_only) { if (g_render_process_host_factory_) { -@@ -1352,8 +1351,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( +@@ -1483,8 +1482,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( } if (!storage_partition_impl) { @@ -348,7 +358,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 } // If we've made a StoragePartition for guests (e.g., for the tag), // stash the Site URL on it. This way, when we start a service worker inside -@@ -1378,7 +1377,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = +@@ -1509,7 +1508,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = RenderProcessHostImpl::RenderProcessHostImpl( BrowserContext* browser_context, @@ -357,7 +367,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 bool is_for_guests_only) : fast_shutdown_started_(false), deleting_soon_(false), -@@ -1412,10 +1411,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1562,10 +1561,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( indexed_db_factory_(new IndexedDBDispatcherHost( id_, storage_partition_impl_->GetURLRequestContext(), @@ -372,7 +382,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 id_)), channel_connected_(false), sent_render_process_ready_(false), -@@ -1450,7 +1451,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1600,7 +1601,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( } push_messaging_manager_.reset(new PushMessagingManager( @@ -382,7 +392,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 AddObserver(indexed_db_factory_.get()); AddObserver(service_worker_dispatcher_host_.get()); -@@ -1783,6 +1785,17 @@ void RenderProcessHostImpl::ResetChannelProxy() { +@@ -1936,6 +1938,17 @@ void RenderProcessHostImpl::ResetChannelProxy() { void RenderProcessHostImpl::CreateMessageFilters() { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -400,7 +410,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 MediaInternals* media_internals = MediaInternals::GetInstance(); // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages // from guests. -@@ -1797,7 +1810,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1950,7 +1963,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { base::MakeRefCounted( GetID(), GetBrowserContext(), request_context.get(), widget_helper_.get(), media_internals, @@ -409,7 +419,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 storage_partition_impl_->GetGeneratedCodeCacheContext()); AddFilter(render_message_filter.get()); -@@ -1825,10 +1838,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1978,10 +1991,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { ChromeBlobStorageContext::GetFor(browser_context); resource_message_filter_ = new ResourceMessageFilter( @@ -422,7 +432,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 storage_partition_impl_->GetPrefetchURLLoaderService(), std::move(get_contexts_callback), BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); -@@ -1837,8 +1850,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1990,8 +2003,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter( new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service())); @@ -432,7 +442,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); AddFilter(peer_connection_tracker_host_.get()); -@@ -1859,10 +1871,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -2008,10 +2020,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter(new TraceMessageFilter(GetID())); AddFilter(new ResolveProxyMsgHelper(GetID())); @@ -443,7 +453,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 } void RenderProcessHostImpl::BindCacheStorage( -@@ -1874,7 +1882,8 @@ void RenderProcessHostImpl::BindCacheStorage( +@@ -2023,7 +2031,8 @@ void RenderProcessHostImpl::BindCacheStorage( cache_storage_dispatcher_host_ = base::MakeRefCounted(); cache_storage_dispatcher_host_->Init( @@ -453,7 +463,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 } // Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO // thread entirely. -@@ -2031,7 +2040,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2198,7 +2207,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { registry->AddInterface(base::BindRepeating( &AppCacheDispatcherHost::Create, @@ -463,7 +473,7 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 GetID())); AddUIThreadInterface( -@@ -2068,6 +2078,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2235,6 +2245,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { plugin_registry_.reset( new PluginRegistryImpl(GetBrowserContext()->GetResourceContext())); } @@ -474,10 +484,10 @@ index 3dcc6e5c2d38..90180d0cfbbb 100644 &PluginRegistryImpl::Bind, base::Unretained(plugin_registry_.get()))); #endif diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h -index 607eefb29440..c465d03b6373 100644 +index 37bc9b79afd7..ed496b1c7439 100644 --- content/browser/renderer_host/render_process_host_impl.h +++ content/browser/renderer_host/render_process_host_impl.h -@@ -92,7 +92,6 @@ class ServiceWorkerDispatcherHost; +@@ -97,7 +97,6 @@ class ServiceWorkerDispatcherHost; class SiteInstance; class SiteInstanceImpl; class StoragePartition; @@ -485,7 +495,7 @@ index 607eefb29440..c465d03b6373 100644 struct ChildProcessTerminationInfo; typedef base::Thread* (*RendererMainThreadFactoryFunction)( -@@ -135,7 +134,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -140,7 +139,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // null. static RenderProcessHost* CreateRenderProcessHost( BrowserContext* browser_context, @@ -494,7 +504,7 @@ index 607eefb29440..c465d03b6373 100644 SiteInstance* site_instance, bool is_for_guests_only); -@@ -445,7 +444,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -484,7 +483,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Use CreateRenderProcessHost() instead of calling this constructor // directly. RenderProcessHostImpl(BrowserContext* browser_context, @@ -503,7 +513,7 @@ index 607eefb29440..c465d03b6373 100644 bool is_for_guests_only); // Initializes a new IPC::ChannelProxy in |channel_|, which will be connected -@@ -715,10 +714,10 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -753,10 +752,10 @@ class CONTENT_EXPORT RenderProcessHostImpl // called. int instance_id_ = 1; @@ -515,9 +525,9 @@ index 607eefb29440..c465d03b6373 100644 + StoragePartition* storage_partition_impl_; // The observers watching our lifetime. - base::ObserverList observers_; + base::ObserverList::Unchecked observers_; diff --git content/browser/renderer_interface_binders.cc content/browser/renderer_interface_binders.cc -index 896f1b27ded7..b8d7d423e555 100644 +index c3a8bdc572de..73f66acbe200 100644 --- content/browser/renderer_interface_binders.cc +++ content/browser/renderer_interface_binders.cc @@ -139,7 +139,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { @@ -574,10 +584,10 @@ index 2fe70f50171f..98244cd5ddf8 100644 std::move(client), creation_context_type, blink::MessagePortChannel(std::move(message_port)), diff --git content/browser/shared_worker/shared_worker_service_impl.cc content/browser/shared_worker/shared_worker_service_impl.cc -index 1defce7079cc..48010c26f2b2 100644 +index 51f91bdd7e2f..a67745058ed3 100644 --- content/browser/shared_worker/shared_worker_service_impl.cc +++ content/browser/shared_worker/shared_worker_service_impl.cc -@@ -339,8 +339,8 @@ void SharedWorkerServiceImpl::CreateWorker( +@@ -344,8 +344,8 @@ void SharedWorkerServiceImpl::CreateWorker( BrowserThread::IO, FROM_HERE, base::BindOnce( &CreateScriptLoaderOnIO, @@ -586,7 +596,7 @@ index 1defce7079cc..48010c26f2b2 100644 + base::WrapRefCounted(service_worker_context_->storage_partition() + ->url_loader_factory_getter()), std::move(factory_bundle_for_browser), - std::move(factory_bundle_for_renderer), service_worker_context_, + std::move(subresource_loader_factories), service_worker_context_, appcache_handle_core, diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h index 6f6c5c1e504a..097095a613dd 100644 @@ -829,7 +839,7 @@ index f55e28d79cda..297541d0a99a 100644 virtual ~StoragePartition() {} }; diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc -index d33b70677f3c..a8a846e978f0 100644 +index e18b8180bb5e..f775176238ac 100644 --- storage/browser/database/database_tracker.cc +++ storage/browser/database/database_tracker.cc @@ -481,7 +481,7 @@ bool DatabaseTracker::LazyInit() { diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index c886a4d91..48de836aa 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -295,10 +295,10 @@ index 9c78b30ab3a0..999eb4048f5c 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index ee2852fefa84..bbba1786e1a4 100644 +index b4da2b5128c8..d030d6e81c19 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -2430,8 +2430,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( +@@ -2441,8 +2441,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -313,7 +313,7 @@ index ee2852fefa84..bbba1786e1a4 100644 MenuItemView* to_select = NULL; if (item->GetSubmenu()->GetMenuItemCount() > 0) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2446,8 +2451,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2457,8 +2462,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -326,20 +326,12 @@ index ee2852fefa84..bbba1786e1a4 100644 SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); else if (item->GetParentMenuItem()->GetParentMenuItem()) diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h -index 4dea63f9f286..ef50b710c5af 100644 +index 706605182f9a..e97d0495bc72 100644 --- ui/views/controls/menu/menu_delegate.h +++ ui/views/controls/menu/menu_delegate.h -@@ -10,6 +10,7 @@ - - #include "base/logging.h" - #include "base/strings/string16.h" -+#include "third_party/skia/include/core/SkColor.h" - #include "ui/base/dragdrop/drag_drop_types.h" - #include "ui/base/dragdrop/os_exchange_data.h" - #include "ui/base/ui_base_types.h" -@@ -76,6 +77,22 @@ class VIEWS_EXPORT MenuDelegate { - // it's disabled. - virtual bool GetShouldUseNormalForegroundColor(int command_id) const; +@@ -81,6 +81,22 @@ class VIEWS_EXPORT MenuDelegate { + // parts of |style| or leave it unmodified. + virtual void GetLabelStyle(int id, LabelStyle* style) const; + // Override the text color of a given menu item dependent on the |command_id| + // and its |is_hovered| state. |is_minor| will be true for accelerator text. @@ -360,7 +352,7 @@ index 4dea63f9f286..ef50b710c5af 100644 // The tooltip shown for the menu item. This is invoked when the user // hovers over the item, and no tooltip text has been set for that item. virtual base::string16 GetTooltipText(int id, -@@ -208,6 +225,11 @@ class VIEWS_EXPORT MenuDelegate { +@@ -213,6 +229,11 @@ class VIEWS_EXPORT MenuDelegate { bool* has_mnemonics, MenuButton** button); @@ -373,10 +365,10 @@ index 4dea63f9f286..ef50b710c5af 100644 virtual int GetMaxWidthForMenu(MenuItemView* menu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index 4ede4cb5fa04..8f4af6c91969 100644 +index 6c007a1030cf..e63b03f0534c 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -914,7 +914,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { +@@ -915,7 +915,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { // only need the background when we want it to look different, as when we're // selected. ui::NativeTheme* native_theme = GetNativeTheme(); @@ -390,10 +382,10 @@ index 4ede4cb5fa04..8f4af6c91969 100644 gfx::Rect item_bounds(0, 0, width(), height()); if (type_ == ACTIONABLE_SUBMENU) { if (submenu_area_of_actionable_submenu_selected_) { -@@ -1033,6 +1038,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { - SkColor MenuItemView::GetTextColor(bool minor, - bool render_selection, - bool emphasized) const { +@@ -1035,6 +1040,13 @@ void MenuItemView::PaintMinorIconAndText( + } + + SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const { + SkColor text_color; + const MenuDelegate *delegate = GetDelegate(); + if (delegate && delegate->GetTextColor(GetCommand(), minor, render_selection, @@ -405,10 +397,10 @@ index 4ede4cb5fa04..8f4af6c91969 100644 minor ? ui::NativeTheme::kColorId_MenuItemMinorTextColor : ui::NativeTheme::kColorId_EnabledMenuItemForegroundColor; diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index 784cad79f9db..0e7436792b59 100644 +index cbccee16e4c7..e14173e9e832 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc -@@ -231,6 +231,77 @@ void MenuModelAdapter::SelectionChanged(MenuItemView* menu) { +@@ -233,6 +233,77 @@ void MenuModelAdapter::SelectionChanged(MenuItemView* menu) { NOTREACHED(); } @@ -487,7 +479,7 @@ index 784cad79f9db..0e7436792b59 100644 // Look up the menu model for this menu. const std::map::const_iterator map_iterator = diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h -index 0ac493c3c6a0..741769e90eb0 100644 +index e52edfe5edd7..ab23f3df914e 100644 --- ui/views/controls/menu/menu_model_adapter.h +++ ui/views/controls/menu/menu_model_adapter.h @@ -76,6 +76,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate { @@ -543,7 +535,7 @@ index 3ec1dcbdf822..e2658cec8095 100644 // Move the cursor because EnterNotify/LeaveNotify are generated with the // current mouse position as a result of XGrabPointer() diff --git ui/views/view.h ui/views/view.h -index bae6ce42102e..f02008bdc354 100644 +index 4248609dd3c3..e254ce5a940a 100644 --- ui/views/view.h +++ ui/views/view.h @@ -19,6 +19,7 @@ diff --git a/patch/patches/views_widget_180_1481_1565_1677_1749.patch b/patch/patches/views_widget_180_1481_1565_1677_1749.patch index 05bbd5f6a..89d5eb17e 100644 --- a/patch/patches/views_widget_180_1481_1565_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1565_1677_1749.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index bb9aa275f5b4..b588f16aaa27 100644 +index fae4c74c977b..b1d60ee9421b 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -480,6 +480,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { +@@ -501,6 +501,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { return screen_info.device_scale_factor; } @@ -18,7 +18,7 @@ index bb9aa275f5b4..b588f16aaa27 100644 return renderer_frame_number_; } diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h -index 922f7897e8fd..b43fdd6d55fb 100644 +index 08454f68a01d..768fbb5d8f9d 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h @@ -83,6 +83,7 @@ class CursorManager; @@ -39,7 +39,7 @@ index 922f7897e8fd..b43fdd6d55fb 100644 // Returns the focused RenderWidgetHost inside this |view|'s RWH. RenderWidgetHostImpl* GetFocusedWidget() const; -@@ -140,6 +144,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -141,6 +145,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase void DisableAutoResize(const gfx::Size& new_size) override; bool IsScrollOffsetAtTop() const override; float GetDeviceScaleFactor() const final; @@ -48,7 +48,7 @@ index 922f7897e8fd..b43fdd6d55fb 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; -@@ -458,6 +464,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -471,6 +477,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // helps to position the full screen widget on the correct monitor. virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0; @@ -61,7 +61,7 @@ index 922f7897e8fd..b43fdd6d55fb 100644 // Sets the cursor for this view to the one associated with the specified // cursor_type. virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -644,6 +656,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -659,6 +671,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase bool use_viz_hit_test_ = false; @@ -103,10 +103,10 @@ index 940d9c107664..f7a35655c757 100644 // TODO(wjmaclean): can host_ ever be null? if (host_ && set_focus_on_mouse_down_or_key_event_) { diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h -index c4b21150bbcf..fad3d9e3ebbd 100644 +index c662115a7177..1a5ca9a0b140 100644 --- content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h -@@ -253,6 +253,14 @@ class CONTENT_EXPORT RenderWidgetHostView { +@@ -257,6 +257,14 @@ class CONTENT_EXPORT RenderWidgetHostView { // This must always return the same device scale factor as GetScreenInfo. virtual float GetDeviceScaleFactor() const = 0; @@ -135,7 +135,7 @@ index f772f64d656e..7d13f9f81b6c 100644 return host ? host->GetAcceleratedWidget() : NULL; } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index 9c6b588516f2..90e804d0cc68 100644 +index 9ab47c863902..9d9bfecd20ba 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -87,6 +87,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin( @@ -179,10 +179,10 @@ index 9c6b588516f2..90e804d0cc68 100644 bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index 022de4037ff0..c54ef87f2f7f 100644 +index 364d6df184c5..0d32a4579c87 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -@@ -284,6 +284,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin +@@ -285,6 +285,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin // True if the window should have the frame removed. bool remove_standard_frame_; @@ -194,7 +194,7 @@ index 022de4037ff0..c54ef87f2f7f 100644 // a reference. corewm::TooltipWin* tooltip_; diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc -index 22a9914957a7..d315f07eca5e 100644 +index 590de782aca3..e87ee9935760 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc @@ -145,6 +145,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( @@ -232,7 +232,7 @@ index 22a9914957a7..d315f07eca5e 100644 xwindow_ = x11::None; desktop_native_widget_aura_->OnHostClosed(); -@@ -645,6 +650,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( +@@ -646,6 +651,8 @@ void DesktopWindowTreeHostX11::GetWindowPlacement( } gfx::Rect DesktopWindowTreeHostX11::GetWindowBoundsInScreen() const { @@ -241,7 +241,7 @@ index 22a9914957a7..d315f07eca5e 100644 return ToDIPRect(bounds_in_pixels_); } -@@ -1270,6 +1277,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels( +@@ -1271,6 +1278,8 @@ void DesktopWindowTreeHostX11::SetBoundsInPixels( } gfx::Point DesktopWindowTreeHostX11::GetLocationOnScreenInPixels() const { @@ -250,7 +250,7 @@ index 22a9914957a7..d315f07eca5e 100644 return bounds_in_pixels_.origin(); } -@@ -1414,7 +1423,6 @@ void DesktopWindowTreeHostX11::InitX11Window( +@@ -1415,7 +1424,6 @@ void DesktopWindowTreeHostX11::InitX11Window( ::Atom window_type; switch (params.type) { case Widget::InitParams::TYPE_MENU: @@ -258,7 +258,7 @@ index 22a9914957a7..d315f07eca5e 100644 window_type = gfx::GetAtom("_NET_WM_WINDOW_TYPE_MENU"); break; case Widget::InitParams::TYPE_TOOLTIP: -@@ -1470,9 +1478,15 @@ void DesktopWindowTreeHostX11::InitX11Window( +@@ -1471,9 +1479,15 @@ void DesktopWindowTreeHostX11::InitX11Window( attribute_mask |= CWBorderPixel; swa.border_pixel = 0; @@ -275,7 +275,7 @@ index 22a9914957a7..d315f07eca5e 100644 bounds_in_pixels_.y(), bounds_in_pixels_.width(), bounds_in_pixels_.height(), 0, // border width -@@ -2088,6 +2102,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( +@@ -2089,6 +2103,10 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent( } break; } @@ -287,7 +287,7 @@ index 22a9914957a7..d315f07eca5e 100644 case x11::FocusOut: OnFocusEvent(xev->type == x11::FocusIn, event->xfocus.mode, diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h -index c5e6df7ce811..8648b49b5753 100644 +index 5a0a3086545a..531619b16213 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h @@ -91,6 +91,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 @@ -324,7 +324,7 @@ index c5e6df7ce811..8648b49b5753 100644 DesktopDragDropClientAuraX11* drag_drop_client_; std::unique_ptr x11_non_client_event_filter_; -@@ -453,6 +466,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 +@@ -454,6 +467,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 uint32_t modal_dialog_counter_; @@ -335,10 +335,10 @@ index c5e6df7ce811..8648b49b5753 100644 base::WeakPtrFactory weak_factory_; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index a4a01235a2cd..a3ffe1c16270 100644 +index 5ad48b616fa3..3abbf674ee23 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc -@@ -132,6 +132,7 @@ Widget::InitParams::InitParams(Type type) +@@ -137,6 +137,7 @@ Widget::InitParams::InitParams(Type type) use_system_default_icon(false), show_state(ui::SHOW_STATE_DEFAULT), parent(nullptr), @@ -346,7 +346,7 @@ index a4a01235a2cd..a3ffe1c16270 100644 native_widget(nullptr), desktop_window_tree_host(nullptr), layer_type(ui::LAYER_TEXTURED), -@@ -306,7 +307,7 @@ void Widget::Init(const InitParams& in_params) { +@@ -311,7 +312,7 @@ void Widget::Init(const InitParams& in_params) { params.name = params.delegate->GetContentsView()->GetClassName(); params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -355,7 +355,7 @@ index a4a01235a2cd..a3ffe1c16270 100644 if (params.opacity == views::Widget::InitParams::INFER_OPACITY && params.type != views::Widget::InitParams::TYPE_WINDOW && -@@ -373,7 +374,12 @@ void Widget::Init(const InitParams& in_params) { +@@ -376,7 +377,12 @@ void Widget::Init(const InitParams& in_params) { } } else if (params.delegate) { SetContentsView(params.delegate->GetContentsView()); @@ -369,7 +369,7 @@ index a4a01235a2cd..a3ffe1c16270 100644 } // This must come after SetContentsView() or it might not be able to find // the correct NativeTheme (on Linux). See http://crbug.com/384492 -@@ -1099,10 +1105,16 @@ void Widget::OnNativeWidgetDestroyed() { +@@ -1112,10 +1118,16 @@ void Widget::OnNativeWidgetDestroyed() { } gfx::Size Widget::GetMinimumSize() const { @@ -387,10 +387,10 @@ index a4a01235a2cd..a3ffe1c16270 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index c92fd03abc31..f787d9892508 100644 +index 2efbe5c4d899..de6ff73cf676 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h -@@ -249,6 +249,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -250,6 +250,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // Whether the widget should be maximized or minimized. ui::WindowShowState show_state; gfx::NativeView parent; @@ -399,7 +399,7 @@ index c92fd03abc31..f787d9892508 100644 // the NativeWidget may specify a default size. If the parent is specified, // |bounds| is in the parent's coordinate system. If the parent is not diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h -index c1cfaebc4172..b9ee0751189d 100644 +index 5e394416c1ee..65c61cc29d23 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h @@ -183,6 +183,10 @@ class VIEWS_EXPORT WidgetDelegate { @@ -427,10 +427,10 @@ index c7296fed234d..244d0034a1c4 100644 if (native_widget_delegate->IsDialogBox()) { *style |= DS_MODALFRAME; diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index 4b7af541276d..8269cb4990f3 100644 +index 54eb0fcd0bf7..f2a661e55176 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -2872,10 +2872,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -2868,10 +2868,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } else if (event.type() == ui::ET_MOUSEWHEEL) { ui::MouseWheelEvent mouse_wheel_event(msg); // Reroute the mouse wheel to the window under the pointer if applicable. diff --git a/patch/patches/vr_build_873170.patch b/patch/patches/vr_build_873170.patch index 82997b4a4..cd4ba060a 100644 --- a/patch/patches/vr_build_873170.patch +++ b/patch/patches/vr_build_873170.patch @@ -1,12 +1,12 @@ diff --git chrome/browser/vr/BUILD.gn chrome/browser/vr/BUILD.gn -index 728d038d804f..744d1bf2725e 100644 +index edcf5ac5dfce..f4003294f2d0 100644 --- chrome/browser/vr/BUILD.gn +++ chrome/browser/vr/BUILD.gn -@@ -356,6 +356,7 @@ source_set("vr_base") { +@@ -350,6 +350,7 @@ source_set("vr_base") { ] deps = [ + ":vr_build_features", "//base", + "//chrome/app:generated_resources", "//components/rappor:rappor", - "//components/ukm/content", diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index 4b3c2f616..be6e1a813 100644 --- a/patch/patches/web_contents_1257_1565.patch +++ b/patch/patches/web_contents_1257_1565.patch @@ -1,8 +1,8 @@ diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc -index df8c751f12b0..bdcc0dd5c957 100644 +index 36dab1bdee1d..27a1c1cbe0c8 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -1935,21 +1935,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1940,21 +1940,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -45,7 +45,7 @@ index df8c751f12b0..bdcc0dd5c957 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -2632,6 +2641,15 @@ void WebContentsImpl::CreateNewWindow( +@@ -2637,6 +2646,15 @@ void WebContentsImpl::CreateNewWindow( create_params.renderer_initiated_creation = main_frame_route_id != MSG_ROUTING_NONE; @@ -61,7 +61,7 @@ index df8c751f12b0..bdcc0dd5c957 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -2662,7 +2680,7 @@ void WebContentsImpl::CreateNewWindow( +@@ -2667,7 +2685,7 @@ void WebContentsImpl::CreateNewWindow( // TODO(brettw): It seems bogus that we have to call this function on the // newly created object and give it one of its own member variables. new_view->CreateViewForWidget( @@ -70,7 +70,7 @@ index df8c751f12b0..bdcc0dd5c957 100644 } // Save the created window associated with the route so we can show it // later. -@@ -6023,7 +6041,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { +@@ -6042,7 +6060,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( RenderViewHost* render_view_host) { RenderWidgetHostViewBase* rwh_view = @@ -95,10 +95,10 @@ index df508da0aef2..f6f4bf42b108 100644 WebContents::CreateParams::CreateParams(const CreateParams& other) = default; diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index b26563cd2cae..33d245c91cbb 100644 +index 786eecfcb70c..984326a81411 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h -@@ -76,9 +76,11 @@ class BrowserPluginGuestDelegate; +@@ -77,9 +77,11 @@ class BrowserPluginGuestDelegate; class InterstitialPage; class RenderFrameHost; class RenderViewHost; @@ -110,7 +110,7 @@ index b26563cd2cae..33d245c91cbb 100644 struct CustomContextMenuContext; struct DropData; struct MHTMLGenerationParams; -@@ -218,6 +220,10 @@ class WebContents : public PageNavigator, +@@ -219,6 +221,10 @@ class WebContents : public PageNavigator, // Sandboxing flags set on the new WebContents. blink::WebSandboxFlags starting_sandbox_flags; diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index 8b24101d4..68ac90f19 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -10,10 +10,10 @@ index 92e9cb865204..4628c56882b4 100644 + GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array plugins); }; diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index be5ee3635cf5..471d8c908e52 100644 +index 3e8fae916125..30451122e4a2 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -701,6 +701,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -745,6 +745,11 @@ class BLINK_PLATFORM_EXPORT Platform { // runs during Chromium's build step). virtual bool IsTakingV8ContextSnapshot() { return false; } @@ -23,8 +23,8 @@ index be5ee3635cf5..471d8c908e52 100644 + virtual void DevToolsAgentDetached() {} + protected: - Platform(); - virtual ~Platform(); + WebThread* main_thread_; + diff --git third_party/blink/renderer/core/dom/dom_implementation.cc third_party/blink/renderer/core/dom/dom_implementation.cc index c360933eb10f..6295f9d675f7 100644 --- third_party/blink/renderer/core/dom/dom_implementation.cc @@ -44,10 +44,10 @@ index c360933eb10f..6295f9d675f7 100644 .Top() .GetSecurityContext() diff --git third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc -index eef3bcc92e45..4cc5abc51fc8 100644 +index 7a7f6e0d88e9..dfa7e007a9fa 100644 --- third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc +++ third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc -@@ -327,6 +327,8 @@ WebDevToolsAgentImpl::Session::Session( +@@ -325,6 +325,8 @@ WebDevToolsAgentImpl::Session::Session( &WebDevToolsAgentImpl::Session::Detach, WrapWeakPersistent(this))); InitializeInspectorSession(std::move(reattach_session_state)); @@ -56,7 +56,7 @@ index eef3bcc92e45..4cc5abc51fc8 100644 } WebDevToolsAgentImpl::Session::~Session() { -@@ -352,6 +354,7 @@ void WebDevToolsAgentImpl::Session::Detach() { +@@ -349,6 +351,7 @@ void WebDevToolsAgentImpl::Session::Detach() { io_session_->DeleteSoon(); io_session_ = nullptr; inspector_session_->Dispose(); @@ -65,10 +65,10 @@ index eef3bcc92e45..4cc5abc51fc8 100644 void WebDevToolsAgentImpl::Session::SendProtocolResponse( diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc -index e681cb8f5042..bf92a04e394c 100644 +index a7ddc156c2b1..e31496827664 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc -@@ -1216,7 +1216,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { +@@ -1221,7 +1221,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -78,20 +78,20 @@ index e681cb8f5042..bf92a04e394c 100644 } diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc -index d49490d66514..62fe65941f2d 100644 +index af94b52a5b6e..f5b91fefcda0 100644 --- third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc -@@ -169,7 +169,8 @@ Page::Page(PageClients& page_clients) +@@ -171,7 +171,8 @@ Page::Page(PageClients& page_clients) overscroll_controller_( OverscrollController::Create(GetVisualViewport(), GetChromeClient())), link_highlights_(LinkHighlights::Create(*this)), - plugin_data_(nullptr), + plugin_data_main_frame_(nullptr), + plugin_data_sub_frame_(nullptr), + // TODO(pdr): Initialize |validation_message_client_| lazily. + validation_message_client_(ValidationMessageClientImpl::Create(*this)), opened_by_dom_(false), - tab_key_cycles_through_elements_(true), - paused_(false), -@@ -328,21 +329,40 @@ void Page::InitialStyleChanged() { +@@ -332,21 +333,40 @@ void Page::InitialStyleChanged() { } } @@ -141,7 +141,7 @@ index d49490d66514..62fe65941f2d 100644 page->NotifyPluginsChanged(); } } -@@ -731,7 +751,8 @@ void Page::Trace(blink::Visitor* visitor) { +@@ -736,7 +756,8 @@ void Page::Trace(blink::Visitor* visitor) { visitor->Trace(overscroll_controller_); visitor->Trace(link_highlights_); visitor->Trace(main_frame_); @@ -152,10 +152,10 @@ index d49490d66514..62fe65941f2d 100644 visitor->Trace(plugins_changed_observers_); visitor->Trace(next_related_page_); diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h -index 9c25836191e6..398483fc9ca8 100644 +index c9ecb33e153f..6ff8e8dc6b67 100644 --- third_party/blink/renderer/core/page/page.h +++ third_party/blink/renderer/core/page/page.h -@@ -135,7 +135,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, +@@ -136,7 +136,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, ViewportDescription GetViewportDescription() const; // Returns the plugin data associated with |main_frame_origin|. @@ -165,7 +165,7 @@ index 9c25836191e6..398483fc9ca8 100644 // Resets the plugin data for all pages in the renderer process and notifies // PluginsChangedObservers. -@@ -360,7 +361,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, +@@ -367,7 +368,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, const Member overscroll_controller_; const Member link_highlights_; diff --git a/patch/patches/webkit_pointer_event_781966.patch b/patch/patches/webkit_pointer_event_781966.patch index e3e78679d..10a64ec08 100644 --- a/patch/patches/webkit_pointer_event_781966.patch +++ b/patch/patches/webkit_pointer_event_781966.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/renderer/core/input/pointer_event_manager.cc third_party/blink/renderer/core/input/pointer_event_manager.cc -index 6986dedf3300..ad161d5b3284 100644 +index 2e4954ba8deb..f5f50ea77be8 100644 --- third_party/blink/renderer/core/input/pointer_event_manager.cc +++ third_party/blink/renderer/core/input/pointer_event_manager.cc -@@ -284,7 +284,7 @@ void PointerEventManager::HandlePointerInterruption( +@@ -272,7 +272,7 @@ void PointerEventManager::HandlePointerInterruption( for (auto pointer_event : canceled_pointer_events) { // If we are sending a pointercancel we have sent the pointerevent to some // target before. diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 53d0dd25d..87dbd25ea 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -20,10 +20,10 @@ index 380ca3f69a26..fe841b6f25bd 100644 // Call these methods before and after running a nested, modal event loop diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index 23f0d6f74d4c..0fe6cb4d87d7 100644 +index 1a1e2cfb4fd2..9251b9a09504 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -239,8 +239,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { +@@ -234,8 +234,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { g_should_use_external_popup_menus = use_external_popup_menus; } @@ -39,7 +39,7 @@ index 23f0d6f74d4c..0fe6cb4d87d7 100644 } namespace { -@@ -335,6 +340,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, +@@ -310,6 +315,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, enable_fake_page_scale_animation_for_testing_(false), fake_page_scale_animation_page_scale_factor_(0), fake_page_scale_animation_use_anchor_(false), @@ -48,10 +48,10 @@ index 23f0d6f74d4c..0fe6cb4d87d7 100644 suppress_next_keypress_event_(false), ime_accept_events_(true), diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index b9e684023537..3d220db31aad 100644 +index 66a3b5c16769..ac7331a50353 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h -@@ -105,7 +105,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -103,7 +103,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, static HashSet& AllInstances(); // Returns true if popup menus should be rendered by the browser, false if // they should be rendered by WebKit (which is the default). @@ -61,7 +61,7 @@ index b9e684023537..3d220db31aad 100644 // WebWidget methods: void Close() override; -@@ -246,7 +247,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -244,7 +245,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, HitTestResult CoreHitTestResultAt(const WebPoint&); void InvalidateRect(const IntRect&); @@ -70,7 +70,7 @@ index b9e684023537..3d220db31aad 100644 void SetBaseBackgroundColorOverride(SkColor); void ClearBaseBackgroundColorOverride(); void SetBackgroundColorOverride(SkColor); -@@ -603,6 +604,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -598,6 +599,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_; bool fake_page_scale_animation_use_anchor_; @@ -80,10 +80,10 @@ index b9e684023537..3d220db31aad 100644 TransformationMatrix device_emulation_transform_; diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc -index 963828a16782..86a841fcd4f3 100644 +index 642b6ded444c..45296936ef21 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -827,7 +827,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -805,7 +805,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index 557daf142..fc790954e 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -35,7 +35,7 @@ index dfe0f29dc772..606f07a1d1ed 100644 extensions::ExtensionRegistry::Get(profile); std::string extensions_list; diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc -index e4cfd5b02bea..20a5f81fe231 100644 +index 660cfdb7ea24..5ac15334064e 100644 --- chrome/browser/memory_details.cc +++ chrome/browser/memory_details.cc @@ -16,6 +16,7 @@ @@ -60,10 +60,10 @@ index e4cfd5b02bea..20a5f81fe231 100644 render_process_host->GetBrowserContext(); extensions::ExtensionRegistry* extension_registry = diff --git chrome/browser/ui/webui/net_internals/net_internals_ui.cc chrome/browser/ui/webui/net_internals/net_internals_ui.cc -index 34960e3e6543..bffb63938274 100644 +index 76652731b926..ec2b6ad11cdb 100644 --- chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc -@@ -529,41 +529,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache( +@@ -527,41 +527,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache( void NetInternalsMessageHandler::OnGetPrerenderInfo( const base::ListValue* list) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -110,7 +110,7 @@ index 34960e3e6543..bffb63938274 100644 } //////////////////////////////////////////////////////////////////////////////// -@@ -643,9 +633,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( +@@ -641,9 +631,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( PrePopulateEventList(); @@ -170,10 +170,10 @@ index 903cc543a242..5bd30ae82974 100644 CONTENT_EXPORT void InitializeResourceContext(BrowserContext* browser_context); diff --git content/browser/webui/url_data_manager.cc content/browser/webui/url_data_manager.cc -index ce87d5984c09..6d31657e5c6c 100644 +index fca1d4aa6161..a14e34dae591 100644 --- content/browser/webui/url_data_manager.cc +++ content/browser/webui/url_data_manager.cc -@@ -148,6 +148,11 @@ void URLDataManager::UpdateWebUIDataSource( +@@ -150,6 +150,11 @@ void URLDataManager::UpdateWebUIDataSource( ->UpdateWebUIDataSource(source_name, std::move(update)); } @@ -186,7 +186,7 @@ index ce87d5984c09..6d31657e5c6c 100644 bool URLDataManager::IsScheduledForDeletion( const URLDataSourceImpl* data_source) { diff --git content/browser/webui/url_data_manager.h content/browser/webui/url_data_manager.h -index 5ceb74d411fc..0c584d6e69b5 100644 +index 95cff69e1b42..7fd849867829 100644 --- content/browser/webui/url_data_manager.h +++ content/browser/webui/url_data_manager.h @@ -69,6 +69,8 @@ class CONTENT_EXPORT URLDataManager : public base::SupportsUserData::Data { diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index 043aebde3..34ba0af7e 100644 --- a/patch/patches/webview_plugin_2020.patch +++ b/patch/patches/webview_plugin_2020.patch @@ -1,8 +1,8 @@ diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd -index 1ab962523b2e..3b1245adc42d 100644 +index c700d8b74bcb..9a01101ba673 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -4457,7 +4457,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -4478,7 +4478,7 @@ Keep your key file in a safe place. You will need it to create new versions of y diff --git a/tests/ceftests/osr_accessibility_unittest.cc b/tests/ceftests/osr_accessibility_unittest.cc index 7a09ef4ae..c9e2e6a4c 100644 --- a/tests/ceftests/osr_accessibility_unittest.cc +++ b/tests/ceftests/osr_accessibility_unittest.cc @@ -200,8 +200,6 @@ class AccessibilityTestHandler : public TestHandler, EXPECT_EQ(VTYPE_LIST, value->GetType()); CefRefPtr list = value->GetList(); EXPECT_TRUE(list.get()); - // Always empty events after https://crrev.com/c101cb728a. - EXPECT_EQ(0U, list->GetSize()); got_accessibility_location_change_.yes(); } diff --git a/tools/gn_args.py b/tools/gn_args.py index fe3ef7126..d70c56a15 100644 --- a/tools/gn_args.py +++ b/tools/gn_args.py @@ -205,14 +205,6 @@ def GetRecommendedDefaultArgs(): } if platform == 'linux': - # Use GTK3 instead of GTK2. Default is true. False is recommended because - # the cefclient sample application requires GTK2. This avoids the "GTK+ 2.x - # symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not - # supported" error when running cefclient. Using a value of true is fine if - # your application requires GTK3 and you're not planning to build the - # cefclient target (see issue #2014). - result['use_gtk3'] = False - # Use a sysroot environment. Default is true. False is recommended for local # builds. # Run the following commands to download the sysroot environment: