diff --git a/.gitignore b/.gitignore index 6a88ba34c..88732f329 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ Thumbs.db /docs # CEF generated files /include/cef_version.h +.ccls-cache/ \ No newline at end of file diff --git a/BUILD.gn b/BUILD.gn index 52dfa6309..801607c17 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -457,6 +457,8 @@ static_library("libcef_static") { "libcef/browser/osr/render_widget_host_view_osr.h", "libcef/browser/osr/software_output_device_osr.cc", "libcef/browser/osr/software_output_device_osr.h", + "libcef/browser/osr/synthetic_gesture_target_osr.cc", + "libcef/browser/osr/synthetic_gesture_target_osr.h", "libcef/browser/osr/web_contents_view_osr.cc", "libcef/browser/osr/web_contents_view_osr.h", "libcef/browser/path_util_impl.cc", diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 54e4cc806..1105c8baa 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/74.0.3706.0' + 'chromium_checkout': 'refs/tags/74.0.3729.0' } diff --git a/include/capi/cef_request_context_capi.h b/include/capi/cef_request_context_capi.h index b3467e809..31f9bd59a 100644 --- a/include/capi/cef_request_context_capi.h +++ b/include/capi/cef_request_context_capi.h @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=cd2b70b906b9f07923d69d9ec0b32488125b0af3$ +// $hash=f7f1ec971c726a6a74bcc7f5cee7a8eb1911078d$ // #ifndef CEF_INCLUDE_CAPI_CEF_REQUEST_CONTEXT_CAPI_H_ @@ -259,17 +259,6 @@ typedef struct _cef_request_context_t { const cef_string_t* origin, struct _cef_resolve_callback_t* callback); - /// - // Attempts to resolve |origin| to a list of associated IP addresses using - // cached data. |resolved_ips| will be populated with the list of resolved IP - // addresses or NULL if no cached data is available. Returns ERR_NONE on - // success. This function must be called on the browser process IO thread. - /// - cef_errorcode_t(CEF_CALLBACK* resolve_host_cached)( - struct _cef_request_context_t* self, - const cef_string_t* origin, - cef_string_list_t resolved_ips); - /// // Load an extension. // diff --git a/include/cef_base.h b/include/cef_base.h index 3d0726cd1..0db0f3a8d 100644 --- a/include/cef_base.h +++ b/include/cef_base.h @@ -139,7 +139,7 @@ class CefRefCount { } \ \ private: \ - CefRefCount ref_count_; + CefRefCount ref_count_ /// // Macro that provides a locking implementation. Use the Lock() and Unlock() diff --git a/include/cef_request_context.h b/include/cef_request_context.h index fdf4737d9..5d4bbb79f 100644 --- a/include/cef_request_context.h +++ b/include/cef_request_context.h @@ -270,17 +270,6 @@ class CefRequestContext : public virtual CefBaseRefCounted { virtual void ResolveHost(const CefString& origin, CefRefPtr callback) = 0; - /// - // Attempts to resolve |origin| to a list of associated IP addresses using - // cached data. |resolved_ips| will be populated with the list of resolved IP - // addresses or empty if no cached data is available. Returns ERR_NONE on - // success. This method must be called on the browser process IO thread. - /// - /*--cef(default_retval=ERR_FAILED)--*/ - virtual cef_errorcode_t ResolveHostCached( - const CefString& origin, - std::vector& resolved_ips) = 0; - /// // Load an extension. // diff --git a/include/views/cef_button_delegate.h b/include/views/cef_button_delegate.h index 77e77393f..60d8a2f44 100644 --- a/include/views/cef_button_delegate.h +++ b/include/views/cef_button_delegate.h @@ -59,7 +59,7 @@ class CefButtonDelegate : public CefViewDelegate { // Called when the state of |button| changes. /// /*--cef()--*/ - virtual void OnButtonStateChanged(CefRefPtr button){}; + virtual void OnButtonStateChanged(CefRefPtr button) {} }; #endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_ diff --git a/libcef/browser/browser_context_impl.cc b/libcef/browser/browser_context_impl.cc index 7b02d8926..57a9fb407 100644 --- a/libcef/browser/browser_context_impl.cc +++ b/libcef/browser/browser_context_impl.cc @@ -500,6 +500,10 @@ const PrefService* CefBrowserContextImpl::GetPrefs() const { return pref_service_.get(); } +SimpleFactoryKey* CefBrowserContextImpl::GetSimpleFactoryKey() const { + return nullptr; +} + CefRequestContextImpl* CefBrowserContextImpl::GetCefRequestContext() const { return GetCefRequestContext(false); } diff --git a/libcef/browser/browser_context_impl.h b/libcef/browser/browser_context_impl.h index 917c5b14c..3d4ec3d0f 100644 --- a/libcef/browser/browser_context_impl.h +++ b/libcef/browser/browser_context_impl.h @@ -87,7 +87,9 @@ class CefBrowserContextImpl : public CefBrowserContext, // Profile methods. PrefService* GetPrefs() override; + bool AllowsBrowserWindows() const override { return false; } const PrefService* GetPrefs() const override; + SimpleFactoryKey* GetSimpleFactoryKey() const override; // CefBrowserContext methods. CefRequestContextImpl* GetCefRequestContext() const override; diff --git a/libcef/browser/browser_context_proxy.cc b/libcef/browser/browser_context_proxy.cc index c81be9ba6..803f5ea75 100644 --- a/libcef/browser/browser_context_proxy.cc +++ b/libcef/browser/browser_context_proxy.cc @@ -208,10 +208,18 @@ PrefService* CefBrowserContextProxy::GetPrefs() { return parent_->GetPrefs(); } +bool CefBrowserContextProxy::AllowsBrowserWindows() const { + return parent_->AllowsBrowserWindows(); +} + const PrefService* CefBrowserContextProxy::GetPrefs() const { return parent_->GetPrefs(); } +SimpleFactoryKey* CefBrowserContextProxy::GetSimpleFactoryKey() const { + return parent_->GetSimpleFactoryKey(); +} + CefRequestContextImpl* CefBrowserContextProxy::GetCefRequestContext() const { return request_context_; } diff --git a/libcef/browser/browser_context_proxy.h b/libcef/browser/browser_context_proxy.h index c2914fbe7..69dd17f73 100644 --- a/libcef/browser/browser_context_proxy.h +++ b/libcef/browser/browser_context_proxy.h @@ -64,7 +64,9 @@ class CefBrowserContextProxy : public CefBrowserContext { // Profile methods. PrefService* GetPrefs() override; + bool AllowsBrowserWindows() const override; const PrefService* GetPrefs() const override; + SimpleFactoryKey* GetSimpleFactoryKey() const override; // CefBrowserContext methods. CefRequestContextImpl* GetCefRequestContext() const override; diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 1b9e5c798..4dfa06eaa 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -512,7 +512,7 @@ CefRefPtr CefBrowserHostImpl::GetBrowserForRequest( return GetBrowserForFrame(render_process_id, render_frame_id); } - const content::ResourceRequestInfo* request_info = + content::ResourceRequestInfo* request_info = content::ResourceRequestInfo::ForRequest(request); if (request_info) return GetBrowserForFrameTreeNode(request_info->GetFrameTreeNodeId()); @@ -1644,7 +1644,7 @@ void CefBrowserHostImpl::CancelContextMenu() { CefRefPtr CefBrowserHostImpl::GetFrameForRequest( const net::URLRequest* request) { CEF_REQUIRE_IOT(); - const content::ResourceRequestInfo* info = + content::ResourceRequestInfo* info = content::ResourceRequestInfo::ForRequest(request); if (!info) return nullptr; @@ -2435,6 +2435,7 @@ bool CefBrowserHostImpl::TakeFocus(content::WebContents* source, bool reverse) { } bool CefBrowserHostImpl::HandleContextMenu( + content::RenderFrameHost* render_frame_host, const content::ContextMenuParams& params) { return HandleContextMenu(web_contents(), params); } diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index b14e36dc3..64427260a 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -426,7 +426,9 @@ class CefBrowserHostImpl : public CefBrowserHost, bool proceed, bool* proceed_to_fire_unload) override; bool TakeFocus(content::WebContents* source, bool reverse) override; - bool HandleContextMenu(const content::ContextMenuParams& params) override; + + bool HandleContextMenu(content::RenderFrameHost* render_frame_host, + const content::ContextMenuParams& params) override; content::KeyboardEventProcessingResult PreHandleKeyboardEvent( content::WebContents* source, const content::NativeWebKeyboardEvent& event) override; diff --git a/libcef/browser/browser_info.h b/libcef/browser/browser_info.h index 7d52ecec1..dcc081890 100644 --- a/libcef/browser/browser_info.h +++ b/libcef/browser/browser_info.h @@ -85,7 +85,7 @@ class CefBrowserInfo : public base::RefCountedThreadSafe { CefBrowserInfo(int browser_id, bool is_popup); - int browser_id() const { return browser_id_; }; + int browser_id() const { return browser_id_; } bool is_popup() const { return is_popup_; } bool is_windowless() const { return is_windowless_; } diff --git a/libcef/browser/browser_message_loop.cc b/libcef/browser/browser_message_loop.cc index 8034e408f..80b87996f 100644 --- a/libcef/browser/browser_message_loop.cc +++ b/libcef/browser/browser_message_loop.cc @@ -7,11 +7,16 @@ #include "libcef/common/content_client.h" #include "base/memory/ptr_util.h" +#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_pump_for_ui.h" #if defined(OS_MACOSX) #include "base/mac/scoped_nsautorelease_pool.h" +#include "base/message_loop/message_pump_mac.h" #endif +#include "content/public/browser/browser_thread.h" + namespace { // MessagePump implementation that delegates to OnScheduleMessagePumpWork() for @@ -82,23 +87,27 @@ CefRefPtr GetBrowserProcessHandler() { return nullptr; } -std::unique_ptr CreatePump() { - const CefSettings& settings = CefContext::Get()->settings(); - if (settings.external_message_pump) { +std::unique_ptr MessagePumpFactoryForUI() { + if (!content::BrowserThread::IsThreadInitialized( + content::BrowserThread::UI) || + content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) { CefRefPtr handler = GetBrowserProcessHandler(); if (handler) - return base::WrapUnique(new MessagePumpExternal(0.01f, handler)); + return std::make_unique(0.01f, handler); } - return base::MessageLoop::CreateMessagePumpForType( - base::MessageLoop::TYPE_UI); +#if defined(OS_MACOSX) + return base::MessagePumpMac::Create(); +#else + return std::make_unique(); +#endif } } // namespace -CefBrowserMessageLoop::CefBrowserMessageLoop() - : base::MessageLoopForUI(CreatePump()) { - BindToCurrentThread(); +void InitMessagePumpFactoryForUI() { + const CefSettings& settings = CefContext::Get()->settings(); + if (settings.external_message_pump) { + base::MessageLoop::InitMessagePumpForUIFactory(MessagePumpFactoryForUI); + } } - -CefBrowserMessageLoop::~CefBrowserMessageLoop() {} diff --git a/libcef/browser/browser_message_loop.h b/libcef/browser/browser_message_loop.h index 62eea72fd..8510c1cf8 100644 --- a/libcef/browser/browser_message_loop.h +++ b/libcef/browser/browser_message_loop.h @@ -4,21 +4,7 @@ #ifndef CEF_LIBCEF_BROWSER_BROWSER_MESSAGE_LOOP_H_ #define CEF_LIBCEF_BROWSER_BROWSER_MESSAGE_LOOP_H_ -#pragma once -#include "base/macros.h" -#include "base/message_loop/message_loop.h" - -// Class used to process events on the current message loop. -class CefBrowserMessageLoop : public base::MessageLoopForUI { - typedef base::MessageLoopForUI inherited; - - public: - CefBrowserMessageLoop(); - ~CefBrowserMessageLoop() override; - - private: - DISALLOW_COPY_AND_ASSIGN(CefBrowserMessageLoop); -}; +void InitMessagePumpFactoryForUI(); #endif // CEF_LIBCEF_BROWSER_BROWSER_MESSAGE_LOOP_H_ diff --git a/libcef/browser/chrome_browser_process_stub.cc b/libcef/browser/chrome_browser_process_stub.cc index 4f0634cd2..00f59e3f4 100644 --- a/libcef/browser/chrome_browser_process_stub.cc +++ b/libcef/browser/chrome_browser_process_stub.cc @@ -75,11 +75,11 @@ void ChromeBrowserProcessStub::Shutdown() { void ChromeBrowserProcessStub::ResourceDispatcherHostCreated() { NOTREACHED(); -}; +} void ChromeBrowserProcessStub::EndSession() { NOTREACHED(); -}; +} void ChromeBrowserProcessStub::FlushLocalStateAndReply( base::OnceClosure reply) { diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index fbf9816cf..ed637e038 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -553,6 +553,34 @@ bool CefContentBrowserClient::ShouldUseProcessPerSite( return true; } +// Based on +// ChromeContentBrowserClientExtensionsPart::DoesSiteRequireDedicatedProcess. +bool CefContentBrowserClient::DoesSiteRequireDedicatedProcess( + content::BrowserContext* browser_context, + const GURL& effective_site_url) { + if (!extensions::ExtensionsEnabled()) + return false; + + extensions::ExtensionRegistry* registry = + extensions::ExtensionRegistry::Get(browser_context); + const extensions::Extension* extension = + registry->enabled_extensions().GetExtensionOrAppByURL(effective_site_url); + if (!extension) + return false; + + // Always isolate Chrome Web Store. + if (extension->id() == extensions::kWebStoreAppId) + return true; + + // Extensions should be isolated, except for hosted apps. Isolating hosted + // apps is a good idea, but ought to be a separate knob. + if (extension->is_hosted_app()) + return false; + + // Isolate all extensions. + return true; +} + bool CefContentBrowserClient::IsHandledURL(const GURL& url) { if (!url.is_valid()) return false; @@ -1126,6 +1154,7 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory( content::RenderFrameHost* frame, int render_process_id, bool is_navigation, + bool is_download, const url::Origin& request_initiator, network::mojom::URLLoaderFactoryRequest* factory_request, network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client, @@ -1137,8 +1166,8 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory( extensions::BrowserContextKeyedAPIFactory::Get( browser_context); bool use_proxy = web_request_api->MaybeProxyURLLoaderFactory( - browser_context, frame, render_process_id, is_navigation, factory_request, - header_client); + browser_context, frame, render_process_id, is_navigation, is_download, + factory_request, header_client); if (bypass_redirect_checks) *bypass_redirect_checks = use_proxy; return use_proxy; @@ -1191,7 +1220,7 @@ blink::UserAgentMetadata CefContentBrowserClient::GetUserAgentMetadata() const { blink::UserAgentMetadata metadata; metadata.brand = version_info::GetProductName(); - metadata.version = version_info::GetVersionNumber(); + metadata.full_version = version_info::GetVersionNumber(); metadata.platform = version_info::GetOSType(); // TODO(mkwst): Poke at BuildUserAgentFromProduct to split out these pieces. diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index b19202a9c..5b819ce0c 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -48,6 +48,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient { service_manager::mojom::ServiceRequest* service_request) override; bool ShouldUseProcessPerSite(content::BrowserContext* browser_context, const GURL& effective_url) override; + bool DoesSiteRequireDedicatedProcess(content::BrowserContext* browser_context, + const GURL& effective_site_url) override; bool IsHandledURL(const GURL& url) override; void SiteInstanceGotProcess(content::SiteInstance* site_instance) override; void SiteInstanceDeleting(content::SiteInstance* site_instance) override; @@ -147,6 +149,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient { content::RenderFrameHost* frame, int render_process_id, bool is_navigation, + bool is_download, const url::Origin& request_initiator, network::mojom::URLLoaderFactoryRequest* factory_request, network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client, diff --git a/libcef/browser/context.cc b/libcef/browser/context.cc index 28af0cc75..4441ff67d 100644 --- a/libcef/browser/context.cc +++ b/libcef/browser/context.cc @@ -420,21 +420,17 @@ bool CefContext::Initialize(const CefMainArgs& args, // gets called by some call down the line of service_manager::MainRun. content::SetUpFieldTrialsAndFeatureList(); - if (!main_delegate_->CreateUIThread()) { - return false; - } - - initialized_ = true; - - // Can't use CEF_POST_TASK here yet, because the TaskRunner is not yet set. - main_delegate_->ui_thread()->task_runner()->PostTask( - FROM_HERE, - base::BindOnce( + if (!main_delegate_->CreateUIThread(base::BindOnce( [](CefContext* context, base::WaitableEvent* event) { service_manager::MainRun(*context->sm_main_params_); event->Signal(); }, - base::Unretained(this), base::Unretained(&uithread_startup_event))); + base::Unretained(this), + base::Unretained(&uithread_startup_event)))) { + return false; + } + + initialized_ = true; // We need to wait until service_manager::MainRun has finished. uithread_startup_event.Wait(); diff --git a/libcef/browser/cookie_manager_impl.cc b/libcef/browser/cookie_manager_impl.cc index 67c75ff95..d68f655d4 100644 --- a/libcef/browser/cookie_manager_impl.cc +++ b/libcef/browser/cookie_manager_impl.cc @@ -107,11 +107,14 @@ void DeleteCookiesCallbackImpl(CefRefPtr callback, // Always execute the callback asynchronously. void SetCookieCallbackImpl(CefRefPtr callback, - bool success) { + net::CanonicalCookie::CookieInclusionStatus status) { if (!callback.get()) return; - CEF_POST_TASK(CEF_IOT, base::Bind(&CefSetCookieCallback::OnComplete, - callback.get(), success)); + CEF_POST_TASK( + CEF_IOT, + base::Bind( + &CefSetCookieCallback::OnComplete, callback.get(), + status == net::CanonicalCookie::CookieInclusionStatus::INCLUDE)); } net::CookieStore* GetExistingCookieStoreHelper( @@ -560,7 +563,7 @@ void CefCookieManagerImpl::SetCookieInternal( base::Time(), // Last access time. cookie.secure ? true : false, cookie.httponly ? true : false, net::CookieSameSite::DEFAULT_MODE, net::COOKIE_PRIORITY_DEFAULT), - cookie.secure ? true : false, cookie.httponly ? true : false, + url.scheme(), cookie.httponly ? true : false, base::Bind(SetCookieCallbackImpl, callback)); } diff --git a/libcef/browser/devtools/devtools_frontend.cc b/libcef/browser/devtools/devtools_frontend.cc index 785b8d8a7..26a1e9986 100644 --- a/libcef/browser/devtools/devtools_frontend.cc +++ b/libcef/browser/devtools/devtools_frontend.cc @@ -249,7 +249,7 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( std::string method; base::ListValue* params = NULL; base::DictionaryValue* dict = NULL; - std::unique_ptr parsed_message = base::JSONReader::Read(message); + base::Optional parsed_message = base::JSONReader::Read(message); if (!parsed_message || !parsed_message->GetAsDictionary(&dict) || !dict->GetString("method", &method)) { return; diff --git a/libcef/browser/extension_impl.h b/libcef/browser/extension_impl.h index 6db15a401..bcb629454 100644 --- a/libcef/browser/extension_impl.h +++ b/libcef/browser/extension_impl.h @@ -14,7 +14,7 @@ namespace extensions { class Extension; -}; +} // CefNavigationEntry implementation class CefExtensionImpl : public CefExtension { diff --git a/libcef/browser/extensions/extension_function_details.cc b/libcef/browser/extensions/extension_function_details.cc index 198cc31d6..d04576485 100644 --- a/libcef/browser/extensions/extension_function_details.cc +++ b/libcef/browser/extensions/extension_function_details.cc @@ -21,8 +21,8 @@ #include "extensions/browser/extension_function_dispatcher.h" #include "extensions/common/error_utils.h" -using content::WebContents; using content::RenderViewHost; +using content::WebContents; namespace extensions { @@ -92,7 +92,7 @@ class CefGetExtensionLoadFileCallbackImpl static std::unique_ptr LoadFileFromStream( const std::string& file, CefRefPtr stream) { - base::AssertBlockingAllowedDeprecated(); + CEF_REQUIRE_BLOCKING(); // Move to the end of the stream. stream->Seek(0, SEEK_END); diff --git a/libcef/browser/extensions/pdf_web_contents_helper_client.cc b/libcef/browser/extensions/pdf_web_contents_helper_client.cc index 678fcc6f9..950579068 100644 --- a/libcef/browser/extensions/pdf_web_contents_helper_client.cc +++ b/libcef/browser/extensions/pdf_web_contents_helper_client.cc @@ -19,4 +19,8 @@ void CefPDFWebContentsHelperClient::OnPDFHasUnsupportedFeature( void CefPDFWebContentsHelperClient::OnSaveURL(content::WebContents* contents) {} +void CefPDFWebContentsHelperClient::SetPluginCanSave( + content::WebContents* contents, + bool can_save) {} + } // namespace extensions diff --git a/libcef/browser/extensions/pdf_web_contents_helper_client.h b/libcef/browser/extensions/pdf_web_contents_helper_client.h index 6d42c9c24..13ed29e07 100644 --- a/libcef/browser/extensions/pdf_web_contents_helper_client.h +++ b/libcef/browser/extensions/pdf_web_contents_helper_client.h @@ -21,6 +21,7 @@ class CefPDFWebContentsHelperClient : public pdf::PDFWebContentsHelperClient { int content_restrictions) override; void OnPDFHasUnsupportedFeature(content::WebContents* contents) override; void OnSaveURL(content::WebContents* contents) override; + void SetPluginCanSave(content::WebContents* contents, bool can_save) override; DISALLOW_COPY_AND_ASSIGN(CefPDFWebContentsHelperClient); }; diff --git a/libcef/browser/media_capture_devices_dispatcher.cc b/libcef/browser/media_capture_devices_dispatcher.cc index bdd627559..032b5f949 100644 --- a/libcef/browser/media_capture_devices_dispatcher.cc +++ b/libcef/browser/media_capture_devices_dispatcher.cc @@ -29,7 +29,7 @@ const blink::MediaStreamDevice* FindDefaultDeviceWithId( } return &(*devices.begin()); -}; +} } // namespace diff --git a/libcef/browser/menu_manager.cc b/libcef/browser/menu_manager.cc index d9819b39f..ccebac5d9 100644 --- a/libcef/browser/menu_manager.cc +++ b/libcef/browser/menu_manager.cc @@ -305,7 +305,6 @@ void CefMenuManager::CreateDefaultModel() { model_->AddItem(MENU_ID_CUT, GetLabel(IDS_CONTENT_CONTEXT_CUT)); model_->AddItem(MENU_ID_COPY, GetLabel(IDS_CONTENT_CONTEXT_COPY)); model_->AddItem(MENU_ID_PASTE, GetLabel(IDS_CONTENT_CONTEXT_PASTE)); - model_->AddItem(MENU_ID_DELETE, GetLabel(IDS_CONTENT_CONTEXT_DELETE)); model_->AddSeparator(); model_->AddItem(MENU_ID_SELECT_ALL, diff --git a/libcef/browser/menu_manager.h b/libcef/browser/menu_manager.h index 4ef302242..5b7d9168e 100644 --- a/libcef/browser/menu_manager.h +++ b/libcef/browser/menu_manager.h @@ -17,7 +17,7 @@ namespace content { class RenderFrameHost; class WebContents; -}; +} // namespace content class CefBrowserHostImpl; class CefRunContextMenuCallback; diff --git a/libcef/browser/net/cookie_store_proxy.cc b/libcef/browser/net/cookie_store_proxy.cc index 0daf4278d..6891a2ad7 100644 --- a/libcef/browser/net/cookie_store_proxy.cc +++ b/libcef/browser/net/cookie_store_proxy.cc @@ -64,22 +64,24 @@ void CefCookieStoreProxy::SetCookieWithOptionsAsync( cookie_store->SetCookieWithOptionsAsync(url, cookie_line, options, std::move(callback)); } else if (!callback.is_null()) { - std::move(callback).Run(false); + std::move(callback).Run( + net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE); } } void CefCookieStoreProxy::SetCanonicalCookieAsync( std::unique_ptr cookie, - bool secure_source, + std::string source_scheme, bool modify_http_only, SetCookiesCallback callback) { net::CookieStore* cookie_store = GetCookieStore(); if (cookie_store) { - cookie_store->SetCanonicalCookieAsync(std::move(cookie), secure_source, + cookie_store->SetCanonicalCookieAsync(std::move(cookie), source_scheme, modify_http_only, std::move(callback)); } else if (!callback.is_null()) { - std::move(callback).Run(false); + std::move(callback).Run( + net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE); } } diff --git a/libcef/browser/net/cookie_store_proxy.h b/libcef/browser/net/cookie_store_proxy.h index aafcca9ac..5fbb6bba0 100644 --- a/libcef/browser/net/cookie_store_proxy.h +++ b/libcef/browser/net/cookie_store_proxy.h @@ -23,7 +23,7 @@ class CefCookieStoreProxy : public net::CookieStore { const net::CookieOptions& options, SetCookiesCallback callback) override; void SetCanonicalCookieAsync(std::unique_ptr cookie, - bool secure_source, + std::string source_scheme, bool modify_http_only, SetCookiesCallback callback) override; void GetCookieListWithOptionsAsync(const GURL& url, diff --git a/libcef/browser/net/net_util.cc b/libcef/browser/net/net_util.cc index 1291d6eca..a41cafacf 100644 --- a/libcef/browser/net/net_util.cc +++ b/libcef/browser/net/net_util.cc @@ -19,4 +19,4 @@ bool IsInternalRequest(const net::URLRequest* request) { return false; } -}; // namespace net_util +} // namespace net_util diff --git a/libcef/browser/net/net_util.h b/libcef/browser/net/net_util.h index e2085ff96..11c3857ef 100644 --- a/libcef/browser/net/net_util.h +++ b/libcef/browser/net/net_util.h @@ -16,6 +16,6 @@ namespace net_util { // the CEF API. bool IsInternalRequest(const net::URLRequest* request); -}; // namespace net_util +} // namespace net_util #endif // CEF_LIBCEF_BROWSER_NET_NET_UTIL_H_ diff --git a/libcef/browser/net/resource_request_job.cc b/libcef/browser/net/resource_request_job.cc index 511e26c88..5d89ff787 100644 --- a/libcef/browser/net/resource_request_job.cc +++ b/libcef/browser/net/resource_request_job.cc @@ -9,6 +9,7 @@ #include #include "include/cef_callback.h" +#include "include/cef_parser.h" #include "libcef/browser/cookie_manager_impl.h" #include "libcef/browser/thread_util.h" #include "libcef/common/request_impl.h" @@ -565,7 +566,7 @@ void CefResourceRequestJob::SaveNextCookie() { if (can_set_cookie) { request_->context()->cookie_store()->SetCanonicalCookieAsync( - std::move(cookie), request_->url().SchemeIsCryptographic(), + std::move(cookie), request_->url().scheme(), !options.exclude_httponly(), base::Bind(&CefResourceRequestJob::OnCookieSaved, weak_factory_.GetWeakPtr())); @@ -575,7 +576,8 @@ void CefResourceRequestJob::SaveNextCookie() { CookieHandled(); } -void CefResourceRequestJob::OnCookieSaved(bool cookie_status) { +void CefResourceRequestJob::OnCookieSaved( + net::CanonicalCookie::CookieInclusionStatus status) { CookieHandled(); } diff --git a/libcef/browser/net/resource_request_job.h b/libcef/browser/net/resource_request_job.h index 16e0883b0..851d00e4d 100644 --- a/libcef/browser/net/resource_request_job.h +++ b/libcef/browser/net/resource_request_job.h @@ -61,7 +61,7 @@ class CefResourceRequestJob : public net::URLRequestJob { net::HttpResponseHeaders* GetResponseHeaders(); void SaveCookiesAndNotifyHeadersComplete(); void SaveNextCookie(); - void OnCookieSaved(bool cookie_status); + void OnCookieSaved(net::CanonicalCookie::CookieInclusionStatus status); void CookieHandled(); void FetchResponseCookies(std::vector* cookies); diff --git a/libcef/browser/net/url_request_context_getter_impl.cc b/libcef/browser/net/url_request_context_getter_impl.cc index a09d6ed2f..3f1426c4c 100644 --- a/libcef/browser/net/url_request_context_getter_impl.cc +++ b/libcef/browser/net/url_request_context_getter_impl.cc @@ -363,7 +363,6 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() { io_state_->storage_->set_http_auth_handler_factory( net::HttpAuthHandlerRegistryFactory::Create( - io_state_->url_request_context_->host_resolver(), io_state_->http_auth_preferences_.get(), supported_schemes #if defined(OS_POSIX) && !defined(OS_ANDROID) , diff --git a/libcef/browser/osr/osr_accessibility_util.cc b/libcef/browser/osr/osr_accessibility_util.cc index 291a50230..1c665209e 100644 --- a/libcef/browser/osr/osr_accessibility_util.cc +++ b/libcef/browser/osr/osr_accessibility_util.cc @@ -191,6 +191,9 @@ struct PopulateAxNodeAttributes { } attributes->SetList(ToString(attr.first), list); } break; + case ax::mojom::IntAttribute::kImageAnnotationStatus: { + // TODO(cef): Implement support for Image Annotation Status + } break; } } diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index c8b362b3e..5fdb65569 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -12,6 +12,7 @@ #include "libcef/browser/browser_host_impl.h" #include "libcef/browser/osr/osr_util.h" #include "libcef/browser/osr/software_output_device_osr.h" +#include "libcef/browser/osr/synthetic_gesture_target_osr.h" #include "libcef/browser/thread_util.h" #include "base/callback_helpers.h" @@ -161,7 +162,7 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient { void InvalidateLocalSurfaceIdOnEviction() override {} - bool ShouldShowStaleContentOnEviction() override { return false; }; + bool ShouldShowStaleContentOnEviction() override { return false; } private: CefRenderWidgetHostViewOSR* const view_; @@ -1133,10 +1134,7 @@ viz::FrameSinkId CefRenderWidgetHostViewOSR::GetRootFrameSinkId() { std::unique_ptr CefRenderWidgetHostViewOSR::CreateSyntheticGestureTarget() { - // TODO(cef): This is likely incorrect for OOPIF. - // See https://crrev.com/5375957bb5. - return std::unique_ptr( - new content::SyntheticGestureTargetBase(host())); + return std::make_unique(host()); } #if !defined(OS_MACOSX) @@ -1193,8 +1191,7 @@ bool CefRenderWidgetHostViewOSR::TransformPointToLocalCoordSpaceLegacy( bool CefRenderWidgetHostViewOSR::TransformPointToCoordSpaceForView( const gfx::PointF& point, RenderWidgetHostViewBase* target_view, - gfx::PointF* transformed_point, - viz::EventSource source) { + gfx::PointF* transformed_point) { if (target_view == this) { *transformed_point = point; return true; diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 391325ee1..1b5b15925 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -194,8 +194,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, bool TransformPointToCoordSpaceForView( const gfx::PointF& point, RenderWidgetHostViewBase* target_view, - gfx::PointF* transformed_point, - viz::EventSource source = viz::EventSource::ANY) override; + gfx::PointF* transformed_point) override; void DidNavigate() override; void SelectionChanged(const base::string16& text, size_t offset, @@ -369,8 +368,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, std::unique_ptr browser_compositor_; MacHelper* mac_helper_; #elif defined(USE_X11) -CefWindowX11* window_; -std::unique_ptr invisible_cursor_; + CefWindowX11* window_; + std::unique_ptr invisible_cursor_; #endif std::unique_ptr cursor_manager_; diff --git a/libcef/browser/osr/synthetic_gesture_target_osr.cc b/libcef/browser/osr/synthetic_gesture_target_osr.cc new file mode 100644 index 000000000..977962f8f --- /dev/null +++ b/libcef/browser/osr/synthetic_gesture_target_osr.cc @@ -0,0 +1,61 @@ +// Copyright (c) 2019 The Chromium Embedded Framework 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/osr/synthetic_gesture_target_osr.h" + +#include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/public/common/screen_info.h" +#include "ui/events/gesture_detection/gesture_configuration.h" + +CefSyntheticGestureTargetOSR::CefSyntheticGestureTargetOSR( + content::RenderWidgetHostImpl* host) + : SyntheticGestureTargetBase(host) {} + +void CefSyntheticGestureTargetOSR::DispatchWebTouchEventToPlatform( + const blink::WebTouchEvent& web_touch, + const ui::LatencyInfo& latency_info) { + // We assume that platforms supporting touch have their own implementation of + // SyntheticGestureTarget to route the events through their respective input + // stack. + LOG(ERROR) << "Touch events not supported for this browser."; +} + +void CefSyntheticGestureTargetOSR::DispatchWebMouseWheelEventToPlatform( + const blink::WebMouseWheelEvent& web_wheel, + const ui::LatencyInfo& latency_info) { + render_widget_host()->ForwardWheelEventWithLatencyInfo(web_wheel, + latency_info); +} + +void CefSyntheticGestureTargetOSR::DispatchWebGestureEventToPlatform( + const blink::WebGestureEvent& web_gesture, + const ui::LatencyInfo& latency_info) { + render_widget_host()->ForwardGestureEventWithLatencyInfo(web_gesture, + latency_info); +} + +void CefSyntheticGestureTargetOSR::DispatchWebMouseEventToPlatform( + const blink::WebMouseEvent& web_mouse, + const ui::LatencyInfo& latency_info) { + render_widget_host()->ForwardMouseEventWithLatencyInfo(web_mouse, + latency_info); +} + +content::SyntheticGestureParams::GestureSourceType +CefSyntheticGestureTargetOSR::GetDefaultSyntheticGestureSourceType() const { + return content::SyntheticGestureParams::MOUSE_INPUT; +} + +float CefSyntheticGestureTargetOSR::GetTouchSlopInDips() const { + return ui::GestureConfiguration::GetInstance() + ->max_touch_move_in_pixels_for_click(); +} + +float CefSyntheticGestureTargetOSR::GetSpanSlopInDips() const { + return ui::GestureConfiguration::GetInstance()->span_slop(); +} + +float CefSyntheticGestureTargetOSR::GetMinScalingSpanInDips() const { + return ui::GestureConfiguration::GetInstance()->min_scaling_span_in_pixels(); +} diff --git a/libcef/browser/osr/synthetic_gesture_target_osr.h b/libcef/browser/osr/synthetic_gesture_target_osr.h new file mode 100644 index 000000000..f6471a563 --- /dev/null +++ b/libcef/browser/osr/synthetic_gesture_target_osr.h @@ -0,0 +1,42 @@ +// Copyright (c) 2019 The Chromium Embedded Framework 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_OSR_SYNTHETIC_GESTURE_TARGET_OSR_H_ +#define CEF_LIBCEF_BROWSER_OSR_SYNTHETIC_GESTURE_TARGET_OSR_H_ + +#include "base/macros.h" +#include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" + +// SyntheticGestureTarget implementation for OSR. +class CefSyntheticGestureTargetOSR + : public content::SyntheticGestureTargetBase { + public: + explicit CefSyntheticGestureTargetOSR(content::RenderWidgetHostImpl* host); + + // SyntheticGestureTargetBase: + void DispatchWebTouchEventToPlatform( + const blink::WebTouchEvent& web_touch, + const ui::LatencyInfo& latency_info) override; + void DispatchWebMouseWheelEventToPlatform( + const blink::WebMouseWheelEvent& web_wheel, + const ui::LatencyInfo& latency_info) override; + void DispatchWebGestureEventToPlatform( + const blink::WebGestureEvent& web_gesture, + const ui::LatencyInfo& latency_info) override; + void DispatchWebMouseEventToPlatform( + const blink::WebMouseEvent& web_mouse, + const ui::LatencyInfo& latency_info) override; + + // SyntheticGestureTarget: + content::SyntheticGestureParams::GestureSourceType + GetDefaultSyntheticGestureSourceType() const override; + float GetTouchSlopInDips() const override; + float GetSpanSlopInDips() const override; + float GetMinScalingSpanInDips() const override; + + private: + DISALLOW_COPY_AND_ASSIGN(CefSyntheticGestureTargetOSR); +}; + +#endif // CEF_LIBCEF_BROWSER_OSR_SYNTHETIC_GESTURE_TARGET_OSR_H_ diff --git a/libcef/browser/osr/web_contents_view_osr.cc b/libcef/browser/osr/web_contents_view_osr.cc index a511db3a8..39b77cf57 100644 --- a/libcef/browser/osr/web_contents_view_osr.cc +++ b/libcef/browser/osr/web_contents_view_osr.cc @@ -151,11 +151,9 @@ void CefWebContentsViewOSR::RenderViewHostChanged( void CefWebContentsViewOSR::SetOverscrollControllerEnabled(bool enabled) {} #if defined(OS_MACOSX) -bool CefWebContentsViewOSR::IsEventTracking() const { +bool CefWebContentsViewOSR::CloseTabAfterEventTrackingIfNeeded() { return false; } - -void CefWebContentsViewOSR::CloseTabAfterEventTracking() {} #endif // defined(OS_MACOSX) void CefWebContentsViewOSR::StartDragging( diff --git a/libcef/browser/osr/web_contents_view_osr.h b/libcef/browser/osr/web_contents_view_osr.h index e8fd0135c..12afac981 100644 --- a/libcef/browser/osr/web_contents_view_osr.h +++ b/libcef/browser/osr/web_contents_view_osr.h @@ -59,8 +59,7 @@ class CefWebContentsViewOSR : public content::WebContentsView, void SetOverscrollControllerEnabled(bool enabled) override; #if defined(OS_MACOSX) - bool IsEventTracking() const override; - void CloseTabAfterEventTracking() override; + bool CloseTabAfterEventTrackingIfNeeded() override; #endif // RenderViewHostDelegateView methods. diff --git a/libcef/browser/request_context_impl.cc b/libcef/browser/request_context_impl.cc index 7dab45d45..1d8041b00 100644 --- a/libcef/browser/request_context_impl.cc +++ b/libcef/browser/request_context_impl.cc @@ -61,11 +61,13 @@ struct ResolveHostHelper { void OnResolveCompleted(int result) { std::vector resolved_ips; - - net::AddressList::const_iterator iter = address_list_.begin(); - for (; iter != address_list_.end(); ++iter) - resolved_ips.push_back(iter->ToStringWithoutPort()); - + base::Optional maybe_address_list = + request_->GetAddressResults(); + if (maybe_address_list) { + net::AddressList::const_iterator iter = maybe_address_list->begin(); + for (; iter != maybe_address_list->end(); ++iter) + resolved_ips.push_back(iter->ToStringWithoutPort()); + } CEF_POST_TASK( CEF_UIT, base::Bind(&CefResolveCallback::OnResolveCompleted, callback_, @@ -75,8 +77,7 @@ struct ResolveHostHelper { } CefRefPtr callback_; - net::AddressList address_list_; - std::unique_ptr request_; + std::unique_ptr request_; }; } // namespace @@ -475,39 +476,6 @@ void CefRequestContextImpl::ResolveHost( callback)); } -cef_errorcode_t CefRequestContextImpl::ResolveHostCached( - const CefString& origin, - std::vector& resolved_ips) { - resolved_ips.clear(); - - if (!CEF_CURRENTLY_ON_IOT()) { - NOTREACHED() << "called on invalid thread"; - return ERR_FAILED; - } - - if (!request_context_getter_impl_) - return ERR_FAILED; - - int retval = ERR_FAILED; - - net::HostResolver* host_resolver = - request_context_getter_impl_->GetHostResolver(); - if (host_resolver) { - net::HostResolver::RequestInfo request_info( - net::HostPortPair::FromURL(GURL(origin.ToString()))); - net::AddressList address_list; - retval = host_resolver->ResolveFromCache(request_info, &address_list, - net::NetLogWithSource()); - if (retval == net::OK) { - net::AddressList::const_iterator iter = address_list.begin(); - for (; iter != address_list.end(); ++iter) - resolved_ips.push_back(iter->ToString()); - } - } - - return static_cast(retval); -} - void CefRequestContextImpl::LoadExtension( const CefString& root_directory, CefRefPtr manifest, @@ -801,13 +769,11 @@ void CefRequestContextImpl::ResolveHostInternal( net::HostResolver* host_resolver = request_context->GetHostResolver(); if (host_resolver) { - net::HostResolver::RequestInfo request_info( - net::HostPortPair::FromURL(GURL(origin.ToString()))); - retval = host_resolver->Resolve( - request_info, net::DEFAULT_PRIORITY, &helper->address_list_, - base::Bind(&ResolveHostHelper::OnResolveCompleted, - base::Unretained(helper)), - &helper->request_, net::NetLogWithSource()); + helper->request_ = host_resolver->CreateRequest( + net::HostPortPair::FromURL(GURL(origin.ToString())), + net::NetLogWithSource(), {}); + retval = helper->request_->Start(base::Bind( + &ResolveHostHelper::OnResolveCompleted, base::Unretained(helper))); if (retval == net::ERR_IO_PENDING) { // The result will be delivered asynchronously via the callback. return; diff --git a/libcef/browser/request_context_impl.h b/libcef/browser/request_context_impl.h index 30e1cd734..0d07103d3 100644 --- a/libcef/browser/request_context_impl.h +++ b/libcef/browser/request_context_impl.h @@ -77,9 +77,6 @@ class CefRequestContextImpl : public CefRequestContext { void CloseAllConnections(CefRefPtr callback) override; void ResolveHost(const CefString& origin, CefRefPtr callback) override; - cef_errorcode_t ResolveHostCached( - const CefString& origin, - std::vector& resolved_ips) override; void LoadExtension(const CefString& root_directory, CefRefPtr manifest, CefRefPtr handler) override; diff --git a/libcef/browser/resource_dispatcher_host_delegate.cc b/libcef/browser/resource_dispatcher_host_delegate.cc index 46f7fdff9..f03461e36 100644 --- a/libcef/browser/resource_dispatcher_host_delegate.cc +++ b/libcef/browser/resource_dispatcher_host_delegate.cc @@ -46,7 +46,7 @@ bool CefResourceDispatcherHostDelegate::ShouldInterceptResourceAsStream( if (!extensions::ExtensionsEnabled()) return false; - const content::ResourceRequestInfo* info = + content::ResourceRequestInfo* info = content::ResourceRequestInfo::ForRequest(request); CefResourceContext* context = static_cast(info->GetContext()); @@ -91,7 +91,7 @@ void CefResourceDispatcherHostDelegate::OnStreamCreated( net::URLRequest* request, std::unique_ptr stream) { DCHECK(extensions::ExtensionsEnabled()); - const content::ResourceRequestInfo* info = + content::ResourceRequestInfo* info = content::ResourceRequestInfo::ForRequest(request); std::map::iterator ix = stream_target_info_.find(request); diff --git a/libcef/browser/server_impl.h b/libcef/browser/server_impl.h index 77157e3fd..49386c210 100644 --- a/libcef/browser/server_impl.h +++ b/libcef/browser/server_impl.h @@ -16,7 +16,7 @@ namespace base { class Thread; -}; +} class CefServerImpl : public CefServer, net::HttpServer::Delegate { public: diff --git a/libcef/browser/thread_util.h b/libcef/browser/thread_util.h index 80f4ed485..c2e98902e 100644 --- a/libcef/browser/thread_util.h +++ b/libcef/browser/thread_util.h @@ -9,6 +9,7 @@ #include "base/location.h" #include "base/logging.h" #include "base/task/post_task.h" +#include "base/threading/scoped_blocking_call.h" #include "base/threading/thread_restrictions.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -73,7 +74,9 @@ CEF_POST_BLOCKING_TASK(base::TaskPriority::BEST_EFFORT, task) // Assert that blocking is allowed on the current thread. -#define CEF_REQUIRE_BLOCKING() base::AssertBlockingAllowedDeprecated() +#define CEF_REQUIRE_BLOCKING() \ + base::ScopedBlockingCall scoped_blocking_call( \ + FROM_HERE, base::BlockingType::WILL_BLOCK) // Same as IMPLEMENT_REFCOUNTING() but using the specified Destructor. #define IMPLEMENT_REFCOUNTING_EX(ClassName, Destructor) \ @@ -92,7 +95,7 @@ } \ \ private: \ - CefRefCount ref_count_; + CefRefCount ref_count_ #define IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(ClassName) \ IMPLEMENT_REFCOUNTING_EX(ClassName, content::BrowserThread::DeleteOnUIThread) diff --git a/libcef/browser/views/layout_adapter.h b/libcef/browser/views/layout_adapter.h index aec63d962..04a2d9029 100644 --- a/libcef/browser/views/layout_adapter.h +++ b/libcef/browser/views/layout_adapter.h @@ -10,7 +10,7 @@ namespace views { class LayoutManager; -}; +} // Exposes a common interface from all CefLayout implementation objects to // simplify the layout_util implementation. See comments in view_impl.h for a diff --git a/libcef/common/content_client.cc b/libcef/common/content_client.cc index db4e2a518..76bba5ebe 100644 --- a/libcef/common/content_client.cc +++ b/libcef/common/content_client.cc @@ -35,6 +35,7 @@ #include "content/public/common/pepper_plugin_info.h" #include "ppapi/shared_impl/ppapi_permissions.h" #include "third_party/widevine/cdm/buildflags.h" +#include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #if defined(OS_LINUX) @@ -161,8 +162,10 @@ bool GetSystemPepperFlash(content::PepperPluginInfo* plugin) { std::string manifest_data; if (!base::ReadFileToString(manifest_path, &manifest_data)) return false; - std::unique_ptr manifest_value( - base::JSONReader::Read(manifest_data, base::JSON_ALLOW_TRAILING_COMMAS)); + std::unique_ptr manifest_value(base::Value::ToUniquePtrValue( + std::move(base::JSONReader::Read(manifest_data, + base::JSON_ALLOW_TRAILING_COMMAS) + .value()))); if (!manifest_value.get()) return false; base::DictionaryValue* manifest = NULL; @@ -242,6 +245,16 @@ base::string16 CefContentClient::GetLocalizedString(int message_id) const { return value; } +base::string16 CefContentClient::GetLocalizedString( + int message_id, + const base::string16& replacement) const { + base::string16 value = l10n_util::GetStringFUTF16(message_id, replacement); + if (value.empty()) + LOG(ERROR) << "No localized string available for id " << message_id; + + return value; +} + base::StringPiece CefContentClient::GetDataResource( int resource_id, ui::ScaleFactor scale_factor) const { diff --git a/libcef/common/content_client.h b/libcef/common/content_client.h index 56c3161c4..2599f3bd6 100644 --- a/libcef/common/content_client.h +++ b/libcef/common/content_client.h @@ -38,6 +38,9 @@ class CefContentClient : public content::ContentClient, std::vector* cdm_host_file_paths) override; void AddAdditionalSchemes(Schemes* schemes) override; base::string16 GetLocalizedString(int message_id) const override; + base::string16 GetLocalizedString( + int message_id, + const base::string16& replacement) const override; base::StringPiece GetDataResource( int resource_id, ui::ScaleFactor scale_factor) const override; diff --git a/libcef/common/json_impl.cc b/libcef/common/json_impl.cc index 16c02db1f..df325bc66 100644 --- a/libcef/common/json_impl.cc +++ b/libcef/common/json_impl.cc @@ -34,10 +34,13 @@ int GetJSONWriterOptions(cef_json_writer_options_t options) { CefRefPtr CefParseJSON(const CefString& json_string, cef_json_parser_options_t options) { const std::string& json = json_string.ToString(); - std::unique_ptr parse_result = + base::Optional parse_result = base::JSONReader::Read(json, GetJSONReaderOptions(options)); - if (parse_result) - return new CefValueImpl(parse_result.release()); + if (parse_result) { + return new CefValueImpl( + base::Value::ToUniquePtrValue(std::move(parse_result.value())) + .release()); + } return NULL; } @@ -48,16 +51,19 @@ CefRefPtr CefParseJSONAndReturnError( CefString& error_msg_out) { const std::string& json = json_string.ToString(); - int error_code; std::string error_msg; - std::unique_ptr parse_result = - base::JSONReader::ReadAndReturnError(json, GetJSONReaderOptions(options), - &error_code, &error_msg); - if (parse_result) - return new CefValueImpl(parse_result.release()); + base::JSONReader::ValueWithError value_and_error = + base::JSONReader::ReadAndReturnValueWithError( + json, GetJSONReaderOptions(options)); + if (value_and_error.value) { + return new CefValueImpl( + base::Value::ToUniquePtrValue(std::move(value_and_error.value.value())) + .release()); + } - error_code_out = static_cast(error_code); - error_msg_out = error_msg; + error_code_out = + static_cast(value_and_error.error_code); + error_msg_out = value_and_error.error_message; return NULL; } diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index 3a69c36e7..7ba200fb6 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -37,6 +37,7 @@ #include "components/content_settings/core/common/content_settings_pattern.h" #include "components/viz/common/features.h" #include "content/browser/browser_process_sub_thread.h" +#include "content/browser/scheduler/browser_task_executor.h" #include "content/public/browser/browser_main_runner.h" #include "content/public/browser/render_process_host.h" #include "content/public/common/content_features.h" @@ -45,6 +46,7 @@ #include "extensions/common/constants.h" #include "ipc/ipc_buildflags.h" #include "pdf/pdf_ppapi.h" +#include "services/network/public/cpp/features.h" #include "services/service_manager/sandbox/switches.h" #include "ui/base/layout.h" #include "ui/base/resource/resource_bundle.h" @@ -274,22 +276,52 @@ void OverrideAssetPath() { } #endif -// Used to run the UI on a separate thread. -class CefUIThread : public base::Thread { - public: - CefUIThread() : base::Thread("CefUIThread") {} +} // namespace - void Init() override { -#if defined(OS_WIN) - // Initializes the COM library on the current thread. - CoInitialize(NULL); -#endif +// Used to run the UI on a separate thread. +class CefUIThread : public base::PlatformThread::Delegate { + public: + explicit CefUIThread(base::OnceClosure setup_callback) + : setup_callback_(std::move(setup_callback)) {} + ~CefUIThread() override { Stop(); } + + void Start() { + base::AutoLock lock(thread_lock_); + bool success = base::PlatformThread::CreateWithPriority( + 0, this, &thread_, base::ThreadPriority::NORMAL); + if (!success) { + LOG(FATAL) << "failed to UI create thread"; + } + } + + void Stop() { + base::AutoLock lock(thread_lock_); + + if (!stopping_) { + stopping_ = true; + base::PostTaskWithTraits( + FROM_HERE, {content::BrowserThread::UI}, + base::BindOnce(&CefUIThread::ThreadQuitHelper, Unretained(this))); + } + + // Can't join if the |thread_| is either already gone or is non-joinable. + if (thread_.is_null()) + return; + + base::PlatformThread::Join(thread_); + thread_ = base::PlatformThreadHandle(); + + stopping_ = false; + } + + bool WaitUntilThreadStarted() const { + DCHECK(owning_sequence_checker_.CalledOnValidSequence()); + start_event_.Wait(); + return true; } void InitializeBrowserRunner( const content::MainFunctionParams& main_function_params) { - DCHECK(task_runner()->BelongsToCurrentThread()); - // Use our own browser process runner. browser_runner_ = content::BrowserMainRunner::Create(); @@ -298,15 +330,27 @@ class CefUIThread : public base::Thread { CHECK_EQ(exit_code, -1); } - void CleanUp() override { + protected: + void ThreadMain() override { + base::PlatformThread::SetName("CefUIThread"); + +#if defined(OS_WIN) + // Initializes the COM library on the current thread. + CoInitialize(NULL); +#endif + + start_event_.Signal(); + + std::move(setup_callback_).Run(); + + base::RunLoop run_loop; + run_loop_ = &run_loop; + run_loop.Run(); + browser_runner_->Shutdown(); browser_runner_.reset(NULL); - // Release MessagePump resources registered with the AtExitManager. - base::MessageLoop* ml = const_cast(message_loop()); - base::MessageLoopCurrent::UnbindFromCurrentThreadInternal( - ml->GetMessageLoopBase()); - ml->ReleasePump(); + content::BrowserTaskExecutor::Shutdown(); // Run exit callbacks on the UI thread to avoid sequence check failures. base::AtExitManager::ProcessCallbacksNow(); @@ -316,13 +360,32 @@ class CefUIThread : public base::Thread { // be balanced by a corresponding call to CoUninitialize. CoUninitialize(); #endif + + run_loop_ = nullptr; } - protected: - std::unique_ptr browser_runner_; -}; + void ThreadQuitHelper() { + DCHECK(run_loop_); + run_loop_->QuitWhenIdle(); + } -} // namespace + std::unique_ptr browser_runner_; + base::OnceClosure setup_callback_; + + bool stopping_ = false; + + // The thread's handle. + base::PlatformThreadHandle thread_; + mutable base::Lock thread_lock_; // Protects |thread_|. + + base::RunLoop* run_loop_ = nullptr; + + mutable base::WaitableEvent start_event_; + + // This class is not thread-safe, use this to verify access from the owning + // sequence of the Thread. + base::SequenceChecker owning_sequence_checker_; +}; CefMainDelegate::CefMainDelegate(CefRefPtr application) : content_client_(application) { @@ -339,10 +402,7 @@ CefMainDelegate::CefMainDelegate(CefRefPtr application) CefMainDelegate::~CefMainDelegate() {} void CefMainDelegate::PreCreateMainMessageLoop() { - if (!message_loop_) { - // Create the main message loop. - message_loop_.reset(new CefBrowserMessageLoop()); - } + InitMessagePumpFactoryForUI(); } bool CefMainDelegate::BasicStartupComplete(int* exit_code) { @@ -506,6 +566,13 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { } } + // Disable NetworkService for now + // TODO(cef): Implement the required changes for network service + if (network::features::kNetworkService.default_state == + base::FEATURE_ENABLED_BY_DEFAULT) { + disable_features.push_back(network::features::kNetworkService.name); + } + if (!disable_features.empty()) { DCHECK(!base::FeatureList::GetInstance()); std::string disable_features_str = @@ -653,8 +720,7 @@ int CefMainDelegate::RunProcess( } else { // Running on the separate UI thread. DCHECK(ui_thread_); - static_cast(ui_thread_.get()) - ->InitializeBrowserRunner(main_function_params); + ui_thread_->InitializeBrowserRunner(main_function_params); } return 0; @@ -663,22 +729,16 @@ int CefMainDelegate::RunProcess( return -1; } -bool CefMainDelegate::CreateUIThread() { +bool CefMainDelegate::CreateUIThread(base::OnceClosure setup_callback) { DCHECK(!ui_thread_); - DCHECK(!message_loop_); - std::unique_ptr thread; - thread.reset(new CefUIThread()); - base::Thread::Options options; - options.message_loop_type = base::MessageLoop::TYPE_UI; - if (!thread->StartWithOptions(options)) { - NOTREACHED() << "failed to start UI thread"; - return false; - } + std::unique_ptr thread; + thread.reset(new CefUIThread(std::move(setup_callback))); + thread->Start(); thread->WaitUntilThreadStarted(); ui_thread_.swap(thread); - message_loop_.reset(new CefBrowserMessageLoop()); + InitMessagePumpFactoryForUI(); return true; } @@ -717,8 +777,6 @@ void CefMainDelegate::ShutdownBrowser() { browser_runner_.reset(NULL); } - message_loop_.reset(); - if (ui_thread_.get()) { // Blocks until the thread has stopped. ui_thread_->Stop(); diff --git a/libcef/common/main_delegate.h b/libcef/common/main_delegate.h index 5e72fdfde..83e5fbad6 100644 --- a/libcef/common/main_delegate.h +++ b/libcef/common/main_delegate.h @@ -27,6 +27,7 @@ class BrowserMainRunner; class CefContentBrowserClient; class CefContentRendererClient; class CefContentUtilityClient; +class CefUIThread; class CefMainDelegate : public content::ContentMainDelegate { public: @@ -48,21 +49,19 @@ class CefMainDelegate : public content::ContentMainDelegate { content::ContentRendererClient* CreateContentRendererClient() override; content::ContentUtilityClient* CreateContentUtilityClient() override; - bool CreateUIThread(); + bool CreateUIThread(base::OnceClosure setup_callback); // Shut down the browser runner. void ShutdownBrowser(); CefContentBrowserClient* browser_client() { return browser_client_.get(); } CefContentClient* content_client() { return &content_client_; } - base::Thread* ui_thread() { return ui_thread_.get(); } private: void InitializeResourceBundle(); - std::unique_ptr message_loop_; std::unique_ptr browser_runner_; - std::unique_ptr ui_thread_; + std::unique_ptr ui_thread_; std::unique_ptr browser_client_; std::unique_ptr renderer_client_; diff --git a/libcef/common/net/http_header_utils.h b/libcef/common/net/http_header_utils.h index 6d956835d..bbd981ecb 100644 --- a/libcef/common/net/http_header_utils.h +++ b/libcef/common/net/http_header_utils.h @@ -17,6 +17,6 @@ typedef CefRequest::HeaderMap HeaderMap; std::string GenerateHeaders(const HeaderMap& map); void ParseHeaders(const std::string& header_str, HeaderMap& map); -}; // namespace HttpHeaderUtils +} // namespace HttpHeaderUtils #endif // CEF_LIBCEF_COMMON_NET_HTTP_HEADER_UTILS_H_ diff --git a/libcef/common/request_impl.cc b/libcef/common/request_impl.cc index 080f567b7..de76f8620 100644 --- a/libcef/common/request_impl.cc +++ b/libcef/common/request_impl.cc @@ -448,7 +448,7 @@ void CefRequestImpl::Set(const net::URLRequest* request) { site_for_cookies_ = request->site_for_cookies(); - const content::ResourceRequestInfo* info = + content::ResourceRequestInfo* info = content::ResourceRequestInfo::ForRequest(request); if (info) { resource_type_ = static_cast(info->GetResourceType()); diff --git a/libcef/common/request_impl.h b/libcef/common/request_impl.h index 51525e2b3..1ef8f435e 100644 --- a/libcef/common/request_impl.h +++ b/libcef/common/request_impl.h @@ -29,7 +29,7 @@ class UploadElement; class UploadElementReader; class URLFetcher; class URLRequest; -}; // namespace net +} // namespace net namespace blink { class WebURLRequest; diff --git a/libcef/renderer/browser_impl.cc b/libcef/renderer/browser_impl.cc index b8f7acec2..0023520f8 100644 --- a/libcef/renderer/browser_impl.cc +++ b/libcef/renderer/browser_impl.cc @@ -438,11 +438,6 @@ void CefBrowserImpl::DidFinishLoad(blink::WebLocalFrame* frame) { OnLoadEnd(frame); } -void CefBrowserImpl::DidStartProvisionalLoad(blink::WebLocalFrame* frame) { - // Send the frame creation notification if necessary. - GetWebFrameImpl(frame); -} - void CefBrowserImpl::DidFailProvisionalLoad(blink::WebLocalFrame* frame, const blink::WebURLError& error) { OnLoadError(frame, error); diff --git a/libcef/renderer/browser_impl.h b/libcef/renderer/browser_impl.h index b99f977c9..b5a849b88 100644 --- a/libcef/renderer/browser_impl.h +++ b/libcef/renderer/browser_impl.h @@ -115,7 +115,6 @@ class CefBrowserImpl : public CefBrowser, public content::RenderViewObserver { // Forwarded from CefRenderFrameObserver. void DidFinishLoad(blink::WebLocalFrame* frame); - void DidStartProvisionalLoad(blink::WebLocalFrame* frame); void FrameDetached(blink::WebLocalFrame* frame); void FocusedNodeChanged(const blink::WebNode& node); void DraggableRegionsChanged(blink::WebLocalFrame* frame); diff --git a/libcef/renderer/dom_document_impl.h b/libcef/renderer/dom_document_impl.h index cb19218c1..85e50ee1b 100644 --- a/libcef/renderer/dom_document_impl.h +++ b/libcef/renderer/dom_document_impl.h @@ -12,7 +12,7 @@ namespace blink { class WebLocalFrame; class WebNode; -}; // namespace blink +} // namespace blink class CefBrowserImpl; diff --git a/libcef/renderer/extensions/extensions_renderer_client.cc b/libcef/renderer/extensions/extensions_renderer_client.cc index c753ecf9f..aeea980f2 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.cc +++ b/libcef/renderer/extensions/extensions_renderer_client.cc @@ -152,7 +152,7 @@ bool CefExtensionsRendererClient::OverrideCreatePlugin( return true; bool guest_view_api_available = false; - extension_dispatcher_->script_context_set().ForEach( + extension_dispatcher_->script_context_set_iterator()->ForEach( render_frame, base::Bind(&IsGuestViewApiAvailableToScriptContext, &guest_view_api_available)); return !guest_view_api_available; diff --git a/libcef/renderer/render_frame_observer.cc b/libcef/renderer/render_frame_observer.cc index 1f461840d..cd435bfe0 100644 --- a/libcef/renderer/render_frame_observer.cc +++ b/libcef/renderer/render_frame_observer.cc @@ -39,18 +39,6 @@ void CefRenderFrameObserver::OnInterfaceRequestForFrame( registry_.TryBindInterface(interface_name, interface_pipe); } -void CefRenderFrameObserver::DidStartProvisionalLoad( - blink::WebDocumentLoader* document_loader, - bool is_content_initiated) { - blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); - CefRefPtr browserPtr = - CefBrowserImpl::GetBrowserForMainFrame(frame->Top()); - if (!browserPtr.get()) - return; - - browserPtr->DidStartProvisionalLoad(frame); -} - void CefRenderFrameObserver::DidFinishLoad() { blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); CefRefPtr browserPtr = diff --git a/libcef/renderer/render_frame_observer.h b/libcef/renderer/render_frame_observer.h index 61d8abe3b..378996157 100644 --- a/libcef/renderer/render_frame_observer.h +++ b/libcef/renderer/render_frame_observer.h @@ -21,8 +21,6 @@ class CefRenderFrameObserver : public content::RenderFrameObserver { void OnInterfaceRequestForFrame( const std::string& interface_name, mojo::ScopedMessagePipeHandle* interface_pipe) override; - void DidStartProvisionalLoad(blink::WebDocumentLoader* document_loader, - bool is_content_initiated) override; void DidFinishLoad() override; void FrameDetached() override; void FrameFocused() override; diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index ff8c387f7..3a4148f5b 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -40,8 +40,8 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient { ~CefWebURLLoaderClient() override; // blink::WebURLLoaderClient methods. - void DidSendData(unsigned long long bytesSent, - unsigned long long totalBytesToBeSent) override; + void DidSendData(uint64_t bytes_sent, + uint64_t total_bytes_to_be_sent) override; void DidReceiveResponse(const WebURLResponse& response) override; void DidReceiveData(const char* data, int dataLength) override; void DidFinishLoading( @@ -280,10 +280,10 @@ CefWebURLLoaderClient::CefWebURLLoaderClient( CefWebURLLoaderClient::~CefWebURLLoaderClient() {} -void CefWebURLLoaderClient::DidSendData(unsigned long long bytesSent, - unsigned long long totalBytesToBeSent) { +void CefWebURLLoaderClient::DidSendData(uint64_t bytes_sent, + uint64_t total_bytes_to_be_sent) { if (request_flags_ & UR_FLAG_REPORT_UPLOAD_PROGRESS) - context_->OnUploadProgress(bytesSent, totalBytesToBeSent); + context_->OnUploadProgress(bytes_sent, total_bytes_to_be_sent); } void CefWebURLLoaderClient::DidReceiveResponse(const WebURLResponse& response) { diff --git a/libcef/renderer/v8_impl.h b/libcef/renderer/v8_impl.h index 43a7b66e2..bc37af3d3 100644 --- a/libcef/renderer/v8_impl.h +++ b/libcef/renderer/v8_impl.h @@ -22,7 +22,7 @@ class GURL; namespace blink { class WebLocalFrame; -}; +} // Call after a V8 Isolate has been created and entered for the first time. void CefV8IsolateCreated(); diff --git a/libcef_dll/cpptoc/request_context_cpptoc.cc b/libcef_dll/cpptoc/request_context_cpptoc.cc index 82c1f4062..833c6bdfa 100644 --- a/libcef_dll/cpptoc/request_context_cpptoc.cc +++ b/libcef_dll/cpptoc/request_context_cpptoc.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3de63a7f85158f967dd780e98a171b6665f1edb0$ +// $hash=f4724d1d945c06c5113ba9e1b7f7ad8d4b735b9c$ // #include "libcef_dll/cpptoc/request_context_cpptoc.h" @@ -411,41 +411,6 @@ request_context_resolve_host(struct _cef_request_context_t* self, CefString(origin), CefResolveCallbackCToCpp::Wrap(callback)); } -cef_errorcode_t CEF_CALLBACK -request_context_resolve_host_cached(struct _cef_request_context_t* self, - const cef_string_t* origin, - cef_string_list_t resolved_ips) { - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return ERR_FAILED; - // Verify param: origin; type: string_byref_const - DCHECK(origin); - if (!origin) - return ERR_FAILED; - // Verify param: resolved_ips; type: string_vec_byref - DCHECK(resolved_ips); - if (!resolved_ips) - return ERR_FAILED; - - // Translate param: resolved_ips; type: string_vec_byref - std::vector resolved_ipsList; - transfer_string_list_contents(resolved_ips, resolved_ipsList); - - // Execute - cef_errorcode_t _retval = - CefRequestContextCppToC::Get(self)->ResolveHostCached(CefString(origin), - resolved_ipsList); - - // Restore param: resolved_ips; type: string_vec_byref - cef_string_list_clear(resolved_ips); - transfer_string_list_contents(resolved_ipsList, resolved_ips); - - // Return type: simple - return _retval; -} - void CEF_CALLBACK request_context_load_extension(struct _cef_request_context_t* self, const cef_string_t* root_directory, @@ -587,7 +552,6 @@ CefRequestContextCppToC::CefRequestContextCppToC() { request_context_clear_certificate_exceptions; GetStruct()->close_all_connections = request_context_close_all_connections; GetStruct()->resolve_host = request_context_resolve_host; - GetStruct()->resolve_host_cached = request_context_resolve_host_cached; GetStruct()->load_extension = request_context_load_extension; GetStruct()->did_load_extension = request_context_did_load_extension; GetStruct()->has_extension = request_context_has_extension; diff --git a/libcef_dll/ctocpp/request_context_ctocpp.cc b/libcef_dll/ctocpp/request_context_ctocpp.cc index 68c163356..8ab8f4f4f 100644 --- a/libcef_dll/ctocpp/request_context_ctocpp.cc +++ b/libcef_dll/ctocpp/request_context_ctocpp.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=37d522682ec51c38bb9b4f0e94a46a49c3820046$ +// $hash=ed414e127773ef135584c3c61a386615177feb59$ // #include "libcef_dll/ctocpp/request_context_ctocpp.h" @@ -395,42 +395,6 @@ void CefRequestContextCToCpp::ResolveHost( CefResolveCallbackCppToC::Wrap(callback)); } -NO_SANITIZE("cfi-icall") -cef_errorcode_t CefRequestContextCToCpp::ResolveHostCached( - const CefString& origin, - std::vector& resolved_ips) { - cef_request_context_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, resolve_host_cached)) - return ERR_FAILED; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Verify param: origin; type: string_byref_const - DCHECK(!origin.empty()); - if (origin.empty()) - return ERR_FAILED; - - // Translate param: resolved_ips; type: string_vec_byref - cef_string_list_t resolved_ipsList = cef_string_list_alloc(); - DCHECK(resolved_ipsList); - if (resolved_ipsList) - transfer_string_list_contents(resolved_ips, resolved_ipsList); - - // Execute - cef_errorcode_t _retval = _struct->resolve_host_cached( - _struct, origin.GetStruct(), resolved_ipsList); - - // Restore param:resolved_ips; type: string_vec_byref - if (resolved_ipsList) { - resolved_ips.clear(); - transfer_string_list_contents(resolved_ipsList, resolved_ips); - cef_string_list_free(resolved_ipsList); - } - - // Return type: simple - return _retval; -} - NO_SANITIZE("cfi-icall") void CefRequestContextCToCpp::LoadExtension( const CefString& root_directory, diff --git a/libcef_dll/ctocpp/request_context_ctocpp.h b/libcef_dll/ctocpp/request_context_ctocpp.h index 27aaee9e5..a81632881 100644 --- a/libcef_dll/ctocpp/request_context_ctocpp.h +++ b/libcef_dll/ctocpp/request_context_ctocpp.h @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=376c88ccfd6a48b8d46d7b0493a36a6dc5c1e3b8$ +// $hash=52475096e498cd28cbd25676eaab24e14c1438b0$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_REQUEST_CONTEXT_CTOCPP_H_ @@ -64,9 +64,6 @@ class CefRequestContextCToCpp void CloseAllConnections(CefRefPtr callback) OVERRIDE; void ResolveHost(const CefString& origin, CefRefPtr callback) OVERRIDE; - cef_errorcode_t ResolveHostCached( - const CefString& origin, - std::vector& resolved_ips) OVERRIDE; void LoadExtension(const CefString& root_directory, CefRefPtr manifest, CefRefPtr handler) OVERRIDE; diff --git a/patch/patch.cfg b/patch/patch.cfg index d2ce79690..931e3fa37 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -416,5 +416,15 @@ patches = [ # macOS: Fix crash when showing a select popup with CefDoMessageLoopWork. # https://bitbucket.org/chromiumembedded/cef/issues/2495 'name': 'message_pump_mac_2495', + }, + { + # Windows: Fix jumbo build error in AccessibilityTreeFormatterWin + # https://bugs.chromium.org/p/chromium/issues/detail?id=939668 + 'name': 'accessibility_win_939668', + }, + { + # Windows: Revert base::Value change which breaks cef_sandbox build. + # https://bugs.chromium.org/p/chromium/issues/detail?id=646113#c173 + 'name': 'base_value_646113', } ] diff --git a/patch/patches/accessibility_win_939668.patch b/patch/patches/accessibility_win_939668.patch new file mode 100644 index 000000000..d639ae7ac --- /dev/null +++ b/patch/patches/accessibility_win_939668.patch @@ -0,0 +1,31 @@ +diff --git content/browser/accessibility/accessibility_tree_formatter_win.cc content/browser/accessibility/accessibility_tree_formatter_win.cc +index 59f85adf85c3..a60cb7aa874c 100644 +--- content/browser/accessibility/accessibility_tree_formatter_win.cc ++++ content/browser/accessibility/accessibility_tree_formatter_win.cc +@@ -35,7 +35,7 @@ + #include "ui/base/win/atl_module.h" + #include "ui/gfx/win/hwnd_util.h" + +-namespace { ++namespace internal { + + struct HwndWithProcId { + HwndWithProcId(const base::ProcessId id) : pid(id), hwnd(nullptr) {} +@@ -60,7 +60,7 @@ HWND GetHwndForProcess(base::ProcessId pid) { + return hwnd_with_proc_id.hwnd; + } + +-} // namespace ++} // namespace internal + + namespace content { + +@@ -354,7 +354,7 @@ std::unique_ptr + AccessibilityTreeFormatterWin::BuildAccessibilityTreeForProcess( + base::ProcessId pid) { + // Get HWND for process id. +- HWND hwnd = GetHwndForProcess(pid); ++ HWND hwnd = ::internal::GetHwndForProcess(pid); + return BuildAccessibilityTreeForWindow(hwnd); + } + diff --git a/patch/patches/base_value_646113.patch b/patch/patches/base_value_646113.patch new file mode 100644 index 000000000..b81719c0e --- /dev/null +++ b/patch/patches/base_value_646113.patch @@ -0,0 +1,335 @@ +diff --git base/values.cc base/values.cc +index 2b0c6c8163d8..fc12313a7bb5 100644 +--- base/values.cc ++++ base/values.cc +@@ -22,20 +22,6 @@ + + namespace base { + +-// base::Value must be standard layout to guarantee that writing to +-// |bool_type_| then reading |type_| is defined behaviour. See: +-// +-// [class.union]: +-// If a standard-layout union contains several standard-layout structs that +-// share a common initial sequence (9.2), and if an object of this +-// standard-layout union type contains one of the standard-layout structs, +-// it is permitted to inspect the common initial sequence of any of +-// standard-layout struct members; +-// +-static_assert(std::is_standard_layout::value, +- "base::Value should be a standard-layout C++ class in order " +- "to avoid undefined behaviour in its implementation!"); +- + namespace { + + const char* const kTypeNames[] = {"null", "boolean", "integer", "double", +@@ -90,7 +76,7 @@ std::unique_ptr CopyWithoutEmptyChildren(const Value& node) { + + } // namespace + +-constexpr uint16_t Value::kMagicIsAlive; ++constexpr uint32_t Value::kMagicIsAlive; + + // static + std::unique_ptr Value::CreateWithCopiedBuffer(const char* buffer, +@@ -112,9 +98,9 @@ Value::Value(Value&& that) noexcept { + InternalMoveConstructFrom(std::move(that)); + } + +-Value::Value() noexcept : type_(Type::NONE), is_alive_(kMagicIsAlive) {} ++Value::Value() noexcept : type_(Type::NONE) {} + +-Value::Value(Type type) : type_(type), is_alive_(kMagicIsAlive) { ++Value::Value(Type type) : type_(type) { + // Initialize with the default value. + switch (type_) { + case Type::NONE: +@@ -144,20 +130,11 @@ Value::Value(Type type) : type_(type), is_alive_(kMagicIsAlive) { + } + } + +-Value::Value(bool in_bool) +- : bool_type_(Type::BOOLEAN), +- bool_is_alive_(kMagicIsAlive), +- bool_value_(in_bool) {} ++Value::Value(bool in_bool) : type_(Type::BOOLEAN), bool_value_(in_bool) {} + +-Value::Value(int in_int) +- : int_type_(Type::INTEGER), +- int_is_alive_(kMagicIsAlive), +- int_value_(in_int) {} ++Value::Value(int in_int) : type_(Type::INTEGER), int_value_(in_int) {} + +-Value::Value(double in_double) +- : double_type_(Type::DOUBLE), +- double_is_alive_(kMagicIsAlive), +- double_value_(in_double) { ++Value::Value(double in_double) : type_(Type::DOUBLE), double_value_(in_double) { + if (!std::isfinite(double_value_)) { + NOTREACHED() << "Non-finite (i.e. NaN or positive/negative infinity) " + << "values cannot be represented in JSON"; +@@ -170,9 +147,7 @@ Value::Value(const char* in_string) : Value(std::string(in_string)) {} + Value::Value(StringPiece in_string) : Value(std::string(in_string)) {} + + Value::Value(std::string&& in_string) noexcept +- : string_type_(Type::STRING), +- string_is_alive_(kMagicIsAlive), +- string_value_(std::move(in_string)) { ++ : type_(Type::STRING), string_value_(std::move(in_string)) { + DCHECK(IsStringUTF8(string_value_)); + } + +@@ -181,22 +156,15 @@ Value::Value(const char16* in_string16) : Value(StringPiece16(in_string16)) {} + Value::Value(StringPiece16 in_string16) : Value(UTF16ToUTF8(in_string16)) {} + + Value::Value(const std::vector& in_blob) +- : binary_type_(Type::BINARY), +- binary_is_alive_(kMagicIsAlive), +- binary_value_(in_blob.begin(), in_blob.end()) {} ++ : type_(Type::BINARY), binary_value_(in_blob.begin(), in_blob.end()) {} + + Value::Value(base::span in_blob) +- : binary_type_(Type::BINARY), +- binary_is_alive_(kMagicIsAlive), +- binary_value_(in_blob.begin(), in_blob.end()) {} ++ : type_(Type::BINARY), binary_value_(in_blob.begin(), in_blob.end()) {} + + Value::Value(BlobStorage&& in_blob) noexcept +- : binary_type_(Type::BINARY), +- binary_is_alive_(kMagicIsAlive), +- binary_value_(std::move(in_blob)) {} ++ : type_(Type::BINARY), binary_value_(std::move(in_blob)) {} + +-Value::Value(const DictStorage& in_dict) +- : dict_type_(Type::DICTIONARY), dict_is_alive_(kMagicIsAlive), dict_() { ++Value::Value(const DictStorage& in_dict) : type_(Type::DICTIONARY), dict_() { + dict_.reserve(in_dict.size()); + for (const auto& it : in_dict) { + dict_.try_emplace(dict_.end(), it.first, +@@ -205,21 +173,16 @@ Value::Value(const DictStorage& in_dict) + } + + Value::Value(DictStorage&& in_dict) noexcept +- : dict_type_(Type::DICTIONARY), +- dict_is_alive_(kMagicIsAlive), +- dict_(std::move(in_dict)) {} ++ : type_(Type::DICTIONARY), dict_(std::move(in_dict)) {} + +-Value::Value(const ListStorage& in_list) +- : list_type_(Type::LIST), list_is_alive_(kMagicIsAlive), list_() { ++Value::Value(const ListStorage& in_list) : type_(Type::LIST), list_() { + list_.reserve(in_list.size()); + for (const auto& val : in_list) + list_.emplace_back(val.Clone()); + } + + Value::Value(ListStorage&& in_list) noexcept +- : list_type_(Type::LIST), +- list_is_alive_(kMagicIsAlive), +- list_(std::move(in_list)) {} ++ : type_(Type::LIST), list_(std::move(in_list)) {} + + Value& Value::operator=(Value&& that) noexcept { + InternalCleanup(); +@@ -733,7 +696,6 @@ size_t Value::EstimateMemoryUsage() const { + + void Value::InternalMoveConstructFrom(Value&& that) { + type_ = that.type_; +- is_alive_ = that.is_alive_; + + switch (type_) { + case Type::NONE: +diff --git base/values.h base/values.h +index 7546fa53756d..00a357342d23 100644 +--- base/values.h ++++ base/values.h +@@ -96,6 +96,10 @@ class BASE_EXPORT Value { + // Note: Do not add more types. See the file-level comment above for why. + }; + ++ // Magic IsAlive signature to debug double frees. ++ // TODO(crbug.com/859477): Remove once root cause is found. ++ static constexpr uint32_t kMagicIsAlive = 0x15272f19; ++ + // For situations where you want to keep ownership of your buffer, this + // factory method creates a new BinaryValue by copying the contents of the + // buffer that's passed in. +@@ -375,100 +379,28 @@ class BASE_EXPORT Value { + size_t EstimateMemoryUsage() const; + + protected: +- // Magic IsAlive signature to debug double frees. +- // TODO(crbug.com/859477): Remove once root cause is found. +- static constexpr uint16_t kMagicIsAlive = 0x2f19; ++ // TODO(crbug.com/646113): Make these private once DictionaryValue and ++ // ListValue are properly inlined. ++ Type type_; + +- // Technical note: +- // The naive way to implement a tagged union leads to wasted bytes +- // in the object on CPUs like ARM ones, which impose an 8-byte alignment +- // for double values. I.e. if one does something like: +- // +- // struct TaggedValue { +- // int type_; // size = 1, align = 4 +- // union { +- // bool bool_value_; // size = 1, align = 1 +- // int int_value_; // size = 4, align = 4 +- // double double_value_; // size = 8, align = 8 +- // std::string string_value_; // size = 12, align = 4 (32-bit) +- // }; +- // }; +- // +- // The end result is that the union will have an alignment of 8, and a size +- // of 16, due to 4 extra padding bytes following |string_value_| to respect +- // the alignment requirement. +- // +- // As a consequence, the struct TaggedValue will have a size of 24 bytes, +- // due to the size of the union (16), the size of |type_| (4) and 4 bytes +- // of padding between |type_| and the union to respect its alignment. +- // +- // This means 8 bytes of unused memory per instance on 32-bit ARM! +- // +- // To reclaim these, a union of structs is used instead, in order to ensure +- // that |double_value_| below is always located at an offset that is a +- // multiple of 8, relative to the start of the overall data structure. +- // +- // Each struct must declare its own |type_| and |is_alive_| field, which +- // must have a different name, to appease the C++ compiler. +- // +- // Using this technique sizeof(base::Value) == 16 on 32-bit ARM instead +- // of 24, without losing any information. Results are unchanged for x86, +- // x86_64 and arm64 (16, 32 and 32 bytes respectively). + union { +- struct { +- // TODO(crbug.com/646113): Make these private once DictionaryValue and +- // ListValue are properly inlined. +- Type type_ : 8; +- +- // IsAlive member to debug double frees. +- // TODO(crbug.com/859477): Remove once root cause is found. +- uint16_t is_alive_ = kMagicIsAlive; +- }; +- struct { +- Type bool_type_ : 8; +- uint16_t bool_is_alive_; +- bool bool_value_; +- }; +- struct { +- Type int_type_ : 8; +- uint16_t int_is_alive_; +- int int_value_; +- }; +- struct { +- Type double_type_ : 8; +- uint16_t double_is_alive_; +- // Subtle: On architectures that require it, the compiler will ensure +- // that |double_value_|'s offset is a multiple of 8 (e.g. 32-bit ARM). +- // See technical note above to understand why it is important. +- double double_value_; +- }; +- struct { +- Type string_type_ : 8; +- uint16_t string_is_alive_; +- std::string string_value_; +- }; +- struct { +- Type binary_type_ : 8; +- uint16_t binary_is_alive_; +- BlobStorage binary_value_; +- }; +- struct { +- Type dict_type_ : 8; +- uint16_t dict_is_alive_; +- DictStorage dict_; +- }; +- struct { +- Type list_type_ : 8; +- uint16_t list_is_alive_; +- ListStorage list_; +- }; ++ bool bool_value_; ++ int int_value_; ++ double double_value_; ++ std::string string_value_; ++ BlobStorage binary_value_; ++ DictStorage dict_; ++ ListStorage list_; + }; + + private: +- friend class ValuesTest_SizeOfValue_Test; + void InternalMoveConstructFrom(Value&& that); + void InternalCleanup(); + ++ // IsAlive member to debug double frees. ++ // TODO(crbug.com/859477): Remove once root cause is found. ++ uint32_t is_alive_ = kMagicIsAlive; ++ + DISALLOW_COPY_AND_ASSIGN(Value); + }; + +diff --git base/values_unittest.cc base/values_unittest.cc +index 0a641bcc7ef4..bedacd9b1dee 100644 +--- base/values_unittest.cc ++++ base/values_unittest.cc +@@ -6,7 +6,6 @@ + + #include + +-#include + #include + #include + #include +@@ -16,7 +15,6 @@ + #include + + #include "base/containers/adapters.h" +-#include "base/logging.h" + #include "base/strings/string16.h" + #include "base/strings/string_piece.h" + #include "base/strings/utf_string_conversions.h" +@@ -25,43 +23,6 @@ + + namespace base { + +-TEST(ValuesTest, SizeOfValue) { +- // Ensure that base::Value is as small as possible, i.e. that there is +- // no wasted space after the inner value due to alignment constraints. +- // Distinguish between the 'header' that includes |type_| and |is_alive_| +- // and the inner value that follows it, which can be a bool, int, double, +- // string, blob, list or dict. +-#define INNER_TYPES_LIST(X) \ +- X(bool, bool_value_) \ +- X(int, int_value_) \ +- X(double, double_value_) \ +- X(std::string, string_value_) \ +- X(Value::BlobStorage, binary_value_) \ +- X(Value::ListStorage, list_) \ +- X(Value::DictStorage, dict_) +- +-#define INNER_STRUCT_LIMIT(type, value) offsetof(Value, value) + sizeof(type), +- +- // Return the maximum size in bytes of each inner struct inside base::Value +- size_t max_inner_struct_limit = +- std::max({INNER_TYPES_LIST(INNER_STRUCT_LIMIT)}); +- +- // Ensure that base::Value is not larger than necessary, i.e. that there is +- // no un-necessary padding afte the structs due to alignment constraints of +- // one of the inner fields. +- EXPECT_EQ(max_inner_struct_limit, sizeof(Value)); +- if (max_inner_struct_limit != sizeof(Value)) { +- // The following are useful to understand what's wrong when the EXPECT_EQ() +- // above actually fails. +-#define PRINT_INNER_FIELD_INFO(x, y) \ +- LOG(INFO) << #y " type=" #x " size=" << sizeof(x) << " align=" << alignof(x); +- +- LOG(INFO) << "Value size=" << sizeof(Value) << " align=" << alignof(Value); +- INNER_TYPES_LIST(PRINT_INNER_FIELD_INFO) +- LOG(INFO) << "max_inner_struct_limit=" << max_inner_struct_limit; +- } +-} +- + TEST(ValuesTest, TestNothrow) { + static_assert(std::is_nothrow_move_constructible::value, + "IsNothrowMoveConstructible"); diff --git a/patch/patches/browser_child_frame_2507.patch b/patch/patches/browser_child_frame_2507.patch index 594d3b60c..701812d05 100644 --- a/patch/patches/browser_child_frame_2507.patch +++ b/patch/patches/browser_child_frame_2507.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_child_frame.cc content/browser/renderer_host/render_widget_host_view_child_frame.cc -index 5d42110bf368..146cc5c81eba 100644 +index 1e2a66d449be..639bb2096cf4 100644 --- content/browser/renderer_host/render_widget_host_view_child_frame.cc +++ content/browser/renderer_host/render_widget_host_view_child_frame.cc -@@ -652,6 +652,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame( +@@ -650,6 +650,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame( "RenderWidgetHostViewChildFrame::OnSwapCompositorFrame"); support_->SubmitCompositorFrame(local_surface_id, std::move(frame), std::move(hit_test_region_list)); @@ -10,7 +10,7 @@ index 5d42110bf368..146cc5c81eba 100644 } void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame( -@@ -660,6 +661,15 @@ void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame( +@@ -658,6 +659,15 @@ void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame( support_->DidNotProduceFrame(ack); } @@ -26,7 +26,7 @@ index 5d42110bf368..146cc5c81eba 100644 void RenderWidgetHostViewChildFrame::TransformPointToRootSurface( gfx::PointF* point) { // This function is called by RenderWidgetHostInputEventRouter only for -@@ -845,6 +855,11 @@ void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() { +@@ -842,6 +852,11 @@ void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() { void RenderWidgetHostViewChildFrame::SpeakSelection() {} #endif // defined(OS_MACOSX) diff --git a/patch/patches/browser_plugin_guest_1565.patch b/patch/patches/browser_plugin_guest_1565.patch index f52f8326f..1875f09e5 100644 --- a/patch/patches/browser_plugin_guest_1565.patch +++ b/patch/patches/browser_plugin_guest_1565.patch @@ -50,7 +50,7 @@ index dbc6281ef737..e413bf418b25 100644 render_view_host_->GetMainFrame()->AllowBindings( BINDINGS_POLICY_DOM_AUTOMATION); diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h -index 5426d600906c..4bf4537514eb 100644 +index 2960f298ff54..218743f1847c 100644 --- content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h @@ -24,7 +24,7 @@ struct ScreenInfo; @@ -114,7 +114,7 @@ index c917d912bbdf..36b9d9b8e3e9 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_child_frame.cc content/browser/web_contents/web_contents_view_child_frame.cc -index 7b339bf9407a..ffb0668ecf74 100644 +index 1a68298648a2..a54af8a7f735 100644 --- content/browser/web_contents/web_contents_view_child_frame.cc +++ content/browser/web_contents/web_contents_view_child_frame.cc @@ -84,7 +84,7 @@ void WebContentsViewChildFrame::CreateView(const gfx::Size& initial_size, @@ -127,7 +127,7 @@ index 7b339bf9407a..ffb0668ecf74 100644 } diff --git content/browser/web_contents/web_contents_view_child_frame.h content/browser/web_contents/web_contents_view_child_frame.h -index e82cced4364b..7ed27a6b39b3 100644 +index 8aaa80183dd1..b9df8a87be07 100644 --- content/browser/web_contents/web_contents_view_child_frame.h +++ content/browser/web_contents/web_contents_view_child_frame.h @@ -40,7 +40,7 @@ class WebContentsViewChildFrame : public WebContentsView, @@ -140,7 +140,7 @@ index e82cced4364b..7ed27a6b39b3 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 5de4d7cf8a7a..e24e5c88d8dc 100644 +index 9d91d225fd9f..381b5a1743ae 100644 --- content/browser/web_contents/web_contents_view_guest.cc +++ content/browser/web_contents/web_contents_view_guest.cc @@ -69,6 +69,8 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const { @@ -195,7 +195,7 @@ index 5de4d7cf8a7a..e24e5c88d8dc 100644 RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForChildWidget( diff --git content/browser/web_contents/web_contents_view_guest.h content/browser/web_contents/web_contents_view_guest.h -index 1f0e661628aa..f896c842ff0d 100644 +index 913fbc4bb00e..731a81c72803 100644 --- content/browser/web_contents/web_contents_view_guest.h +++ content/browser/web_contents/web_contents_view_guest.h @@ -58,7 +58,7 @@ class WebContentsViewGuest : public WebContentsView, @@ -208,7 +208,7 @@ index 1f0e661628aa..f896c842ff0d 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h -index c0c553023138..39b8fe0bd57c 100644 +index be73ba6b3aca..3ba5aba86462 100644 --- content/browser/web_contents/web_contents_view_mac.h +++ content/browser/web_contents/web_contents_view_mac.h @@ -74,7 +74,7 @@ class WebContentsViewMac : public WebContentsView, @@ -221,10 +221,10 @@ index c0c553023138..39b8fe0bd57c 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm -index 7f4308b56a14..d17b8b8ef44d 100644 +index 92ac389639d8..83a2ddb344ba 100644 --- content/browser/web_contents/web_contents_view_mac.mm +++ content/browser/web_contents/web_contents_view_mac.mm -@@ -312,7 +312,8 @@ void WebContentsViewMac::CreateView( +@@ -319,7 +319,8 @@ void WebContentsViewMac::CreateView( } RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( @@ -234,7 +234,7 @@ index 7f4308b56a14..d17b8b8ef44d 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 -@@ -324,6 +325,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( +@@ -331,6 +332,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget( render_widget_host->GetView()); } @@ -266,10 +266,10 @@ index bf2226b53dd7..782a320ab788 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 7a1f8c1caffd..a6bff0e50a04 100644 +index 5bc11895ea38..656fa0f62114 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 -@@ -208,6 +208,8 @@ void MimeHandlerViewGuest::CreateWebContents( +@@ -211,6 +211,8 @@ void MimeHandlerViewGuest::CreateWebContents( WebContents::CreateParams params(browser_context(), guest_site_instance.get()); params.guest_delegate = this; @@ -278,7 +278,7 @@ index 7a1f8c1caffd..a6bff0e50a04 100644 // TODO(erikchen): Fix ownership semantics for guest views. // https://crbug.com/832879. std::move(callback).Run( -@@ -252,6 +254,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { +@@ -255,6 +257,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { return true; } @@ -298,10 +298,10 @@ index 7a1f8c1caffd..a6bff0e50a04 100644 WebContents* source, const content::OpenURLParams& params) { diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index cfa759b4b826..4d53d6bcc492 100644 +index a0e702bdfd0c..a389ca9b948a 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -@@ -114,6 +114,10 @@ class MimeHandlerViewGuest +@@ -119,6 +119,10 @@ class MimeHandlerViewGuest bool ZoomPropagatesFromEmbedderToGuest() const final; bool ShouldDestroyOnDetach() const final; diff --git a/patch/patches/build.patch b/patch/patches/build.patch index a2e622aa5..502142dda 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index 0b18059e72df..fd82d5b14efd 100644 +index ca6ff2b13809..c48e65157f5b 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -166,7 +166,7 @@ declare_args() { +@@ -168,7 +168,7 @@ declare_args() { !use_clang_coverage && !(is_android && use_order_profiling) && (use_lld || (use_gold && @@ -11,7 +11,7 @@ index 0b18059e72df..fd82d5b14efd 100644 !(current_cpu == "x86" || current_cpu == "x64")))) } -@@ -1696,8 +1696,6 @@ config("thin_archive") { +@@ -1709,8 +1709,6 @@ config("thin_archive") { # archive names to 16 characters, which is not what we want). if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { arflags = [ "-T" ] diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 781f40a21..dd1720fb7 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 809f1819b37e..697ef3f97926 100644 +index f8dfe8e20824..ec6fc42d11de 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/features.gni") @@ -10,7 +10,7 @@ index 809f1819b37e..697ef3f97926 100644 import("//chrome/common/features.gni") import("//components/feature_engagement/features.gni") import("//components/feed/features.gni") -@@ -1794,6 +1795,7 @@ jumbo_split_static_library("browser") { +@@ -1812,6 +1813,7 @@ jumbo_split_static_library("browser") { "//base:i18n", "//base/allocator:buildflags", "//cc", @@ -18,7 +18,7 @@ index 809f1819b37e..697ef3f97926 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2083,6 +2085,10 @@ jumbo_split_static_library("browser") { +@@ -2109,6 +2111,10 @@ jumbo_split_static_library("browser") { ] } @@ -29,7 +29,7 @@ index 809f1819b37e..697ef3f97926 100644 if (is_android) { sources += [ "after_startup_task_utils_android.cc", -@@ -3810,7 +3816,7 @@ jumbo_split_static_library("browser") { +@@ -3858,7 +3864,7 @@ jumbo_split_static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_net_export.patch b/patch/patches/chrome_browser_net_export.patch index 9992fd19b..780c1a3ab 100644 --- a/patch/patches/chrome_browser_net_export.patch +++ b/patch/patches/chrome_browser_net_export.patch @@ -24,7 +24,7 @@ index cac72c6a2fd1..2ed83a4af1b3 100644 // network quality change events. virtual network::NetworkQualityTracker* network_quality_tracker() = 0; diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index 31234258792d..36ba13242a9c 100644 +index 27092f6375c4..b8ce740e4a08 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc @@ -665,6 +665,10 @@ BrowserProcessImpl::system_network_context_manager() { @@ -51,7 +51,7 @@ index 7168c719aa25..bae7162a539c 100644 override; network::NetworkQualityTracker* network_quality_tracker() override; diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 6a0e84303ff0..8a902419f474 100644 +index 911e49e41313..eecbca982a92 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -9,6 +9,7 @@ import("//build/config/features.gni") @@ -62,7 +62,7 @@ index 6a0e84303ff0..8a902419f474 100644 import("//chrome/common/features.gni") import("//chromeos/assistant/assistant.gni") import("//components/feature_engagement/features.gni") -@@ -349,6 +350,10 @@ jumbo_split_static_library("ui") { +@@ -350,6 +351,10 @@ jumbo_split_static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -73,7 +73,7 @@ index 6a0e84303ff0..8a902419f474 100644 # Since browser and browser_ui actually depend on each other, # we must omit the dependency from browser_ui to browser. # However, this means browser_ui and browser should more or less -@@ -365,6 +370,7 @@ jumbo_split_static_library("ui") { +@@ -366,6 +371,7 @@ jumbo_split_static_library("ui") { "//base:i18n", "//base/allocator:buildflags", "//cc/paint", @@ -91,7 +91,7 @@ index 6a0e84303ff0..8a902419f474 100644 deps += [ "//chrome/browser/ui/libgtkui" ] } diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc -index 62796358a2a7..8ba23a87b982 100644 +index 6357cea3ca36..9ac953d5a885 100644 --- chrome/browser/ui/webui/net_export_ui.cc +++ chrome/browser/ui/webui/net_export_ui.cc @@ -20,14 +20,13 @@ diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 83c104a10..302a650f1 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 9ab37ce7d4ca..71632ab3534e 100644 +index d66a0216832f..25c5ea80cb07 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc @@ -384,7 +384,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 0d7ec721a..071cd6e6d 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -125,10 +125,10 @@ index 989d5d02cedb..e05810db6824 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 2e90fc9add69..9d644676e15f 100644 +index d007c018c95f..1c48ced4abc2 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -785,6 +785,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -807,6 +807,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -136,7 +136,7 @@ index 2e90fc9add69..9d644676e15f 100644 observer->IsPluginTemporarilyAllowed(identifier)) { status = chrome::mojom::PluginStatus::kAllowed; } -@@ -969,7 +970,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -991,7 +992,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( &plugin_auth_host); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -146,7 +146,7 @@ index 2e90fc9add69..9d644676e15f 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -978,7 +980,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1000,7 +1002,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -156,7 +156,7 @@ index 2e90fc9add69..9d644676e15f 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -988,7 +991,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1010,7 +1013,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -166,7 +166,7 @@ index 2e90fc9add69..9d644676e15f 100644 break; } case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -996,7 +1000,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1018,7 +1022,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 394d43be4..e60fb69c5 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 80146842a974..24cbe9d80640 100644 +index 245a7102ec7b..6ca00c19f881 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -4,6 +4,7 @@ @@ -18,7 +18,7 @@ index 80146842a974..24cbe9d80640 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -186,6 +188,10 @@ jumbo_static_library("renderer") { +@@ -187,6 +189,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 dc7dbb6e2..d93f7380f 100644 --- a/patch/patches/chrome_widevine.patch +++ b/patch/patches/chrome_widevine.patch @@ -1,5 +1,5 @@ diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc -index cbfea8ee06b3..125a12b9c33f 100644 +index 45f0aa95dbde..83d4d5bb5eb9 100644 --- chrome/common/chrome_content_client.cc +++ chrome/common/chrome_content_client.cc @@ -98,7 +98,8 @@ diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 1d744a3cd..5c48cd54a 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -12,42 +12,8 @@ index 864f2a5a315a..78b71d523e86 100644 public: explicit ContentServiceManagerMainDelegate(const ContentMainParams& params); ~ContentServiceManagerMainDelegate() override; -diff --git content/browser/renderer_host/input/mouse_wheel_phase_handler.h content/browser/renderer_host/input/mouse_wheel_phase_handler.h -index fc252b6ceffd..b0dfd847ec03 100644 ---- content/browser/renderer_host/input/mouse_wheel_phase_handler.h -+++ content/browser/renderer_host/input/mouse_wheel_phase_handler.h -@@ -7,6 +7,7 @@ - - #include "base/timer/timer.h" - #include "content/browser/renderer_host/render_widget_host_delegate.h" -+#include "content/common/content_export.h" - #include "content/public/common/input_event_ack_state.h" - #include "third_party/blink/public/platform/web_mouse_wheel_event.h" - -@@ -55,7 +56,7 @@ enum class FirstScrollUpdateAckState { - // The MouseWheelPhaseHandler is responsible for adding the proper phase to - // wheel events. Phase information is necessary for wheel scrolling since it - // shows the start and end of a scrolling sequence. --class MouseWheelPhaseHandler { -+class CONTENT_EXPORT MouseWheelPhaseHandler { - public: - MouseWheelPhaseHandler(RenderWidgetHostViewBase* const host_view); - ~MouseWheelPhaseHandler() {} -diff --git content/common/content_switches_internal.h content/common/content_switches_internal.h -index 886bdf0edf8f..1d714000cce5 100644 ---- content/common/content_switches_internal.h -+++ content/common/content_switches_internal.h -@@ -15,7 +15,7 @@ class CommandLine; - - namespace content { - --bool IsPinchToZoomEnabled(); -+CONTENT_EXPORT bool IsPinchToZoomEnabled(); - - blink::mojom::V8CacheOptions GetV8CacheOptions(); - diff --git content/browser/renderer_host/input/synthetic_gesture_target_base.h content/browser/renderer_host/input/synthetic_gesture_target_base.h -index 53476354343e..fd1a7a24455b 100644 +index 33a2d55e47ac..1700b3df2468 100644 --- content/browser/renderer_host/input/synthetic_gesture_target_base.h +++ content/browser/renderer_host/input/synthetic_gesture_target_base.h @@ -8,6 +8,7 @@ @@ -68,6 +34,19 @@ index 53476354343e..fd1a7a24455b 100644 public: explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host); ~SyntheticGestureTargetBase() override; +diff --git content/common/content_switches_internal.h content/common/content_switches_internal.h +index 886bdf0edf8f..1d714000cce5 100644 +--- content/common/content_switches_internal.h ++++ content/common/content_switches_internal.h +@@ -15,7 +15,7 @@ class CommandLine; + + namespace content { + +-bool IsPinchToZoomEnabled(); ++CONTENT_EXPORT bool IsPinchToZoomEnabled(); + + blink::mojom::V8CacheOptions GetV8CacheOptions(); + diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn index 65c03e2a2f7d..f44826c38236 100644 --- third_party/blink/renderer/controller/BUILD.gn diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 22eea3835..0bc821c12 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -53,7 +53,7 @@ index 2eb7f21919fd..4218d3352d70 100644 } #endif diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc -index e877397f869b..d3040b01cf6a 100644 +index be77d0e074e9..949873b9bb22 100644 --- chrome/browser/ui/views/frame/browser_root_view.cc +++ chrome/browser/ui/views/frame/browser_root_view.cc @@ -70,7 +70,7 @@ void OnFindURLMimeType(const GURL& url, @@ -66,10 +66,10 @@ index e877397f869b..d3040b01cf6a 100644 } diff --git content/browser/frame_host/navigation_handle_impl.cc content/browser/frame_host/navigation_handle_impl.cc -index 48b56d92a82a..06d463660a94 100644 +index 1e912186c32c..38d03aafc8b0 100644 --- content/browser/frame_host/navigation_handle_impl.cc +++ content/browser/frame_host/navigation_handle_impl.cc -@@ -348,12 +348,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { +@@ -308,12 +308,6 @@ net::Error NavigationHandleImpl::GetNetErrorCode() { } RenderFrameHostImpl* NavigationHandleImpl::GetRenderFrameHost() { @@ -81,23 +81,15 @@ index 48b56d92a82a..06d463660a94 100644 - "picked for this navigation."; static_assert(WILL_FAIL_REQUEST < WILL_PROCESS_RESPONSE, "WillFailRequest state should come before WillProcessResponse"); - return render_frame_host_; + return navigation_request_->render_frame_host(); diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc -index 2d6227362f32..4aa419238e94 100644 +index 21f84cc3f922..020017584cd9 100644 --- content/browser/frame_host/render_frame_host_impl.cc +++ content/browser/frame_host/render_frame_host_impl.cc -@@ -2125,6 +2125,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( - if (GetNavigationHandle()) { - GetNavigationHandle()->set_net_error_code( - static_cast(params.error_code)); -+ GetNavigationHandle()->set_render_frame_host(this); - } - - frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); -@@ -4741,9 +4742,9 @@ void RenderFrameHostImpl::CommitNavigation( - DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService) || - base::FeatureList::IsEnabled( - blink::features::kServiceWorkerServicification)); +@@ -4777,9 +4777,9 @@ void RenderFrameHostImpl::CommitNavigation( + // factories. TODO(kinuko): Consider setting this up only when prefetch + // is used. Currently we have this here to make sure we have non-racy + // situation (https://crbug.com/849929). - auto* storage_partition = static_cast( + auto* storage_partition = BrowserContext::GetStoragePartition( @@ -107,7 +99,7 @@ index 2d6227362f32..4aa419238e94 100644 FROM_HERE, {BrowserThread::IO}, base::BindOnce(&PrefetchURLLoaderService::GetFactory, diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc -index e17622d6221a..a44c7d6a577d 100644 +index 09095ba2dc8e..2fb0becabf88 100644 --- content/browser/frame_host/render_frame_message_filter.cc +++ content/browser/frame_host/render_frame_message_filter.cc @@ -704,6 +704,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id, @@ -142,7 +134,7 @@ index 641c7bcbf1b8..3faf6a6452c4 100644 const std::string& mime_type, bool* found, diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc -index 3b788c4a564d..7f16dccdb712 100644 +index 31aa4bc38442..0314343499d3 100644 --- content/browser/loader/mime_sniffing_resource_handler.cc +++ content/browser/loader/mime_sniffing_resource_handler.cc @@ -510,8 +510,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler( @@ -263,10 +255,10 @@ index 3009401dac6b..b4c5a9e2db50 100644 }; diff --git content/common/frame_messages.h content/common/frame_messages.h -index b48fee6e264a..24665ed6fe07 100644 +index f1b940d02a3e..7ba4495c34b0 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -1349,9 +1349,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -1319,9 +1319,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. @@ -303,7 +295,7 @@ index 3b610b1f554e..7c439e060779 100644 WebPluginInfo* plugin) = 0; diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 0bca8dc6a55e..bd40da8b5396 100644 +index 3b5c53a10c8d..bb56c4ed5c77 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -73,6 +73,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -316,7 +308,7 @@ index 0bca8dc6a55e..bd40da8b5396 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -328,6 +331,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -333,6 +336,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -328,10 +320,10 @@ index 0bca8dc6a55e..bd40da8b5396 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h -index 8136604d267a..be7fde2f1a38 100644 +index c9ce48e3c3ec..0a3448b194a3 100644 --- content/public/renderer/render_frame_observer.h +++ content/public/renderer/render_frame_observer.h -@@ -161,6 +161,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, +@@ -193,6 +193,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, virtual void DidReceiveTransferSizeUpdate(int resource_id, int received_data_length) {} @@ -342,10 +334,10 @@ index 8136604d267a..be7fde2f1a38 100644 virtual void FocusedNodeChanged(const blink::WebNode& node) {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index 104e48abf3b8..0fbdbfc44fd7 100644 +index b82743edbc63..cae550657487 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -3893,7 +3893,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -3922,7 +3922,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -355,7 +347,7 @@ index 104e48abf3b8..0fbdbfc44fd7 100644 params.mime_type.Utf8(), &found, &info, &mime_type)); if (!found) return nullptr; -@@ -4276,6 +4277,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { +@@ -4340,6 +4341,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { void RenderFrameImpl::FrameFocused() { Send(new FrameHostMsg_FrameFocused(routing_id_)); @@ -365,10 +357,10 @@ index 104e48abf3b8..0fbdbfc44fd7 100644 void RenderFrameImpl::WillCommitProvisionalLoad() { diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index b5669f996bb7..6c51c2e6699a 100644 +index 9d029d4ee65b..d5aff5825371 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -819,6 +819,8 @@ void RenderThreadImpl::Init() { +@@ -806,6 +806,8 @@ void RenderThreadImpl::Init() { StartServiceManagerConnection(); @@ -378,12 +370,12 @@ index b5669f996bb7..6c51c2e6699a 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 6fa35ba65753..eb9731d0ea48 100644 +index 1277a3b2c1e4..9e62e5ce6dd6 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1082,6 +1082,14 @@ void RendererBlinkPlatformImpl::SetMemoryPressureNotificationsSuppressed( - base::MemoryPressureListener::SetNotificationsSuppressed(suppressed); - } +@@ -1070,6 +1070,14 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( + + //------------------------------------------------------------------------------ +void RendererBlinkPlatformImpl::DevToolsAgentAttached() { + GetContentClient()->renderer()->DevToolsAgentAttached(); @@ -397,12 +389,12 @@ index 6fa35ba65753..eb9731d0ea48 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 e3d39d775eff..7e75b0267c11 100644 +index 38ff3be90843..6514d37afe00 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -237,6 +237,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { - void RequestPurgeMemory() override; - void SetMemoryPressureNotificationsSuppressed(bool suppressed) override; +@@ -235,6 +235,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { + std::unique_ptr CreateDataConsumerHandle( + mojo::ScopedDataPipeConsumerHandle handle) override; + void DevToolsAgentAttached() override; + void DevToolsAgentDetached() override; diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 73a69b3df..ee260e4b4 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -241,7 +241,7 @@ index 6e95af6ca7f5..061fb189d60f 100644 extern void InitCrashKeysForTesting(); diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc -index b3b09cee8d6f..4bc2afc7bd6e 100644 +index c3c3f9db07d4..c532a5a46740 100644 --- components/crash/content/app/crash_reporter_client.cc +++ components/crash/content/app/crash_reporter_client.cc @@ -88,7 +88,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() { @@ -300,7 +300,7 @@ index b3b09cee8d6f..4bc2afc7bd6e 100644 +#endif + #if defined(OS_ANDROID) - unsigned int CrashReporterClient::GetCrashDumpPercentageForWebView() { + unsigned int CrashReporterClient::GetCrashDumpPercentage() { return 100; @@ -194,9 +222,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() { return false; @@ -318,7 +318,7 @@ index b3b09cee8d6f..4bc2afc7bd6e 100644 } // namespace crash_reporter diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h -index caebf67a7e0f..5e7cf3d8c1a6 100644 +index 1d35caa36716..7b96fb687b98 100644 --- components/crash/content/app/crash_reporter_client.h +++ components/crash/content/app/crash_reporter_client.h @@ -5,7 +5,9 @@ @@ -388,10 +388,10 @@ index caebf67a7e0f..5e7cf3d8c1a6 100644 } // namespace crash_reporter diff --git components/crash/content/app/crashpad.cc components/crash/content/app/crashpad.cc -index 72c9703b692d..6f0464a78012 100644 +index 5eba3742684b..9bc66b0dbfb9 100644 --- components/crash/content/app/crashpad.cc +++ components/crash/content/app/crashpad.cc -@@ -151,7 +151,8 @@ void InitializeCrashpadImpl(bool initial_client, +@@ -152,7 +152,8 @@ void InitializeCrashpadImpl(bool initial_client, // fallback. Forwarding is turned off for debug-mode builds even for the // browser process, because the system's crash reporter can take a very long // time to chew on symbols. @@ -598,10 +598,10 @@ index cc16c40ea320..3bb03459adf4 100644 if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc -index 8dd06415ce2f..b809cf14d9d1 100644 +index d47b0305167e..d5941ed0e2af 100644 --- content/browser/frame_host/debug_urls.cc +++ content/browser/frame_host/debug_urls.cc -@@ -135,7 +135,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) { +@@ -136,7 +136,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) { cc::switches::kEnableGpuBenchmarking) && (PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED)); diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index 3ae0b995f..0d02c700b 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -146,7 +146,7 @@ index a2b0c74636f4..01370fdc20d9 100644 struct Data; diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn -index 32d4d6c11a15..7c1b1a344831 100644 +index b22ab2c4b912..223e43e910d7 100644 --- third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn @@ -12,6 +12,7 @@ @@ -156,8 +156,8 @@ index 32d4d6c11a15..7c1b1a344831 100644 +import("//cef/libcef/features/features.gni") import("../build/crashpad_buildconfig.gni") - static_library("handler") { -@@ -65,6 +66,17 @@ static_library("handler") { + if (crashpad_is_in_chromium) { +@@ -69,6 +70,17 @@ static_library("handler") { ] } @@ -175,7 +175,7 @@ index 32d4d6c11a15..7c1b1a344831 100644 public_configs = [ "..:crashpad_config" ] public_deps = [ -@@ -77,6 +89,7 @@ static_library("handler") { +@@ -81,6 +93,7 @@ static_library("handler") { "../minidump", "../snapshot", "../tools:tool_support", @@ -248,7 +248,7 @@ index 2ec1147d2620..8ff9a72e0bd7 100644 //! \brief Calls ProcessPendingReports() in response to ReportPending() having //! been called on any thread, as well as periodically on a timer. diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc -index b3e0a68a1c0a..087a4e4c6b9c 100644 +index 31686b3eb899..f361f5759976 100644 --- third_party/crashpad/crashpad/handler/handler_main.cc +++ third_party/crashpad/crashpad/handler/handler_main.cc @@ -36,8 +36,10 @@ @@ -283,7 +283,7 @@ index b3e0a68a1c0a..087a4e4c6b9c 100644 }; // Splits |key_value| on '=' and inserts the resulting key and value into |map|. -@@ -541,6 +550,9 @@ int HandlerMain(int argc, +@@ -553,6 +562,9 @@ int HandlerMain(int argc, kOptionSanitizationInformation, #endif kOptionURL, @@ -293,7 +293,7 @@ index b3e0a68a1c0a..087a4e4c6b9c 100644 // Standard options. kOptionHelp = -2, -@@ -602,6 +614,9 @@ int HandlerMain(int argc, +@@ -614,6 +626,9 @@ int HandlerMain(int argc, {"url", required_argument, nullptr, kOptionURL}, {"help", no_argument, nullptr, kOptionHelp}, {"version", no_argument, nullptr, kOptionVersion}, @@ -303,7 +303,7 @@ index b3e0a68a1c0a..087a4e4c6b9c 100644 {nullptr, 0, nullptr, 0}, }; -@@ -737,6 +752,27 @@ int HandlerMain(int argc, +@@ -749,6 +764,27 @@ int HandlerMain(int argc, options.url = optarg; break; } @@ -331,7 +331,7 @@ index b3e0a68a1c0a..087a4e4c6b9c 100644 case kOptionHelp: { Usage(me); MetricsRecordExit(Metrics::LifetimeMilestone::kExitedEarly); -@@ -851,8 +887,14 @@ int HandlerMain(int argc, +@@ -863,8 +899,14 @@ int HandlerMain(int argc, upload_thread_options.upload_gzip = options.upload_gzip; upload_thread_options.watch_pending_reports = options.periodic_tasks; @@ -346,7 +346,7 @@ index b3e0a68a1c0a..087a4e4c6b9c 100644 upload_thread.Get()->Start(); } -@@ -880,7 +922,8 @@ int HandlerMain(int argc, +@@ -892,7 +934,8 @@ int HandlerMain(int argc, ScopedStoppable prune_thread; if (options.periodic_tasks) { prune_thread.Reset(new PruneCrashReportThread( diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index bb60856a6..4072330a1 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -27,10 +27,10 @@ index 9e81f0a33ede..b796e79ae7ef 100644 auto* browser_context = web_contents->GetBrowserContext(); diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc -index 11643f592dee..687e9da19789 100644 +index cc7c7b4ffab5..24cab4f980a5 100644 --- content/browser/frame_host/render_frame_host_manager.cc +++ content/browser/frame_host/render_frame_host_manager.cc -@@ -955,10 +955,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( +@@ -967,10 +967,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( // TODO(alexmos): This check should've been enforced earlier in the // navigation, in chrome::Navigate(). Verify this, and then convert this to // a CHECK and remove the fallback. @@ -46,7 +46,7 @@ index 11643f592dee..687e9da19789 100644 return true; } -@@ -1097,7 +1098,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( +@@ -1109,7 +1110,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( // Double-check that the new SiteInstance is associated with the right // BrowserContext. @@ -57,10 +57,10 @@ index 11643f592dee..687e9da19789 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 a013031c6e2a..d43890a109e9 100644 +index 7fc0a70f4e79..96a887d5e8e5 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -456,6 +456,13 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -460,6 +460,13 @@ class CONTENT_EXPORT ContentBrowserClient { // Returns true if error page should be isolated in its own process. virtual bool ShouldIsolateErrorPage(bool in_main_frame); @@ -74,7 +74,7 @@ index a013031c6e2a..d43890a109e9 100644 // Returns true if the passed in URL should be assigned as the site of the // current SiteInstance, if it does not yet have a site. virtual bool ShouldAssignSiteForURL(const GURL& url); -@@ -1461,6 +1468,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1491,6 +1498,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct() const; @@ -230,10 +230,10 @@ index 93dce1cad08c..fdb7ad2193d7 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 30847850a812..9b59574c1bf1 100644 +index 14fa00f41564..9487425a5627 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -382,9 +382,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -383,9 +383,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/external_textures_1006.patch b/patch/patches/external_textures_1006.patch index 12938bb21..c3de39db2 100644 --- a/patch/patches/external_textures_1006.patch +++ b/patch/patches/external_textures_1006.patch @@ -1,8 +1,8 @@ diff --git content/browser/compositor/browser_compositor_output_surface.cc content/browser/compositor/browser_compositor_output_surface.cc -index d96efe91eea8..1345025b6fd8 100644 +index 0a1231d4e16c..11e1cbc521d4 100644 --- content/browser/compositor/browser_compositor_output_surface.cc +++ content/browser/compositor/browser_compositor_output_surface.cc -@@ -62,6 +62,10 @@ void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { +@@ -53,6 +53,10 @@ void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) { OnReflectorChanged(); } @@ -14,10 +14,10 @@ index d96efe91eea8..1345025b6fd8 100644 } diff --git content/browser/compositor/browser_compositor_output_surface.h content/browser/compositor/browser_compositor_output_surface.h -index 941d70bd2a7e..ef14a7dd7d4f 100644 +index 3c4d448b972f..fa3f01f59484 100644 --- content/browser/compositor/browser_compositor_output_surface.h +++ content/browser/compositor/browser_compositor_output_surface.h -@@ -41,6 +41,8 @@ class CONTENT_EXPORT BrowserCompositorOutputSurface +@@ -40,6 +40,8 @@ class CONTENT_EXPORT BrowserCompositorOutputSurface void SetReflector(ReflectorImpl* reflector); @@ -27,7 +27,7 @@ index 941d70bd2a7e..ef14a7dd7d4f 100644 virtual void OnReflectorChanged(); diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc -index bc1934e2c7b4..c139815caa52 100644 +index 4768ac1a3bac..9432533a3db2 100644 --- content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc @@ -209,6 +209,18 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() { @@ -49,7 +49,7 @@ index bc1934e2c7b4..c139815caa52 100644 std::unique_ptr GpuProcessTransportFactory::CreateSoftwareOutputDevice( gfx::AcceleratedWidget widget, -@@ -451,11 +463,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( +@@ -452,11 +464,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( // surfaces as they are not following the correct mode. DisableGpuCompositing(compositor.get()); } @@ -73,7 +73,7 @@ index bc1934e2c7b4..c139815caa52 100644 } else { DCHECK(context_provider); const auto& capabilities = context_provider->ContextCapabilities(); -@@ -463,7 +484,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( +@@ -464,7 +485,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( display_output_surface = std::make_unique( context_provider, std::move(vsync_callback), @@ -83,7 +83,7 @@ index bc1934e2c7b4..c139815caa52 100644 } else if (capabilities.surfaceless) { #if defined(OS_MACOSX) const auto& gpu_feature_info = context_provider->GetGpuFeatureInfo(); -@@ -908,7 +930,8 @@ GpuProcessTransportFactory::CreatePerCompositorData( +@@ -909,7 +931,8 @@ GpuProcessTransportFactory::CreatePerCompositorData( gfx::AcceleratedWidget widget = compositor->widget(); auto data = std::make_unique(); @@ -106,7 +106,7 @@ index 4c4548058be5..335099597a9d 100644 // ImageTransportFactory implementation. void DisableGpuCompositing() override; diff --git content/browser/compositor/offscreen_browser_compositor_output_surface.cc content/browser/compositor/offscreen_browser_compositor_output_surface.cc -index ac661d7e0234..0059e9123e99 100644 +index e719683c37e9..a51294913fc4 100644 --- content/browser/compositor/offscreen_browser_compositor_output_surface.cc +++ content/browser/compositor/offscreen_browser_compositor_output_surface.cc @@ -34,10 +34,12 @@ OffscreenBrowserCompositorOutputSurface:: @@ -254,7 +254,7 @@ index ac661d7e0234..0059e9123e99 100644 if (fbo_) { gl->BindFramebuffer(GL_FRAMEBUFFER, fbo_); gl->DeleteFramebuffers(1, &fbo_); -@@ -126,15 +172,20 @@ void OffscreenBrowserCompositorOutputSurface::Reshape( +@@ -124,15 +170,20 @@ void OffscreenBrowserCompositorOutputSurface::Reshape( } void OffscreenBrowserCompositorOutputSurface::BindFramebuffer() { @@ -279,7 +279,7 @@ index ac661d7e0234..0059e9123e99 100644 } } -@@ -155,6 +206,12 @@ void OffscreenBrowserCompositorOutputSurface::SwapBuffers( +@@ -153,6 +204,12 @@ void OffscreenBrowserCompositorOutputSurface::SwapBuffers( // The original implementation had a flickering issue (crbug.com/515332). gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL(); @@ -292,7 +292,7 @@ index ac661d7e0234..0059e9123e99 100644 gpu::SyncToken sync_token; gl->GenUnverifiedSyncTokenCHROMIUM(sync_token.GetData()); context_provider_->ContextSupport()->SignalSyncToken( -@@ -194,7 +251,9 @@ void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete( +@@ -192,7 +249,9 @@ void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete( const std::vector& latency_info) { latency_tracker_.OnGpuSwapBuffersCompleted(latency_info); client_->DidReceiveSwapBuffersAck(); @@ -302,12 +302,12 @@ index ac661d7e0234..0059e9123e99 100644 + client_->DidReceivePresentationFeedback(feedback); } - #if BUILDFLAG(ENABLE_VULKAN) + unsigned OffscreenBrowserCompositorOutputSurface::UpdateGpuFence() { diff --git content/browser/compositor/offscreen_browser_compositor_output_surface.h content/browser/compositor/offscreen_browser_compositor_output_surface.h -index b028dc136e7f..fa83865087dc 100644 +index 71830777ae56..6a0857b02a04 100644 --- content/browser/compositor/offscreen_browser_compositor_output_surface.h +++ content/browser/compositor/offscreen_browser_compositor_output_surface.h -@@ -32,7 +32,8 @@ class OffscreenBrowserCompositorOutputSurface +@@ -31,7 +31,8 @@ class OffscreenBrowserCompositorOutputSurface scoped_refptr context, const UpdateVSyncParametersCallback& update_vsync_parameters_callback, std::unique_ptr @@ -317,7 +317,7 @@ index b028dc136e7f..fa83865087dc 100644 ~OffscreenBrowserCompositorOutputSurface() override; -@@ -54,6 +55,8 @@ class OffscreenBrowserCompositorOutputSurface +@@ -53,11 +54,15 @@ class OffscreenBrowserCompositorOutputSurface gfx::BufferFormat GetOverlayBufferFormat() const override; uint32_t GetFramebufferCopyTextureFormat() override; @@ -326,8 +326,6 @@ index b028dc136e7f..fa83865087dc 100644 // BrowserCompositorOutputSurface implementation. void OnReflectorChanged() override; -@@ -63,6 +66,8 @@ class OffscreenBrowserCompositorOutputSurface - unsigned UpdateGpuFence() override; + void NotifyRenderHost(const std::vector& latency_info); @@ -335,7 +333,7 @@ index b028dc136e7f..fa83865087dc 100644 void OnSwapBuffersComplete(const std::vector& latency_info); viz::OutputSurfaceClient* client_ = nullptr; -@@ -70,6 +75,11 @@ class OffscreenBrowserCompositorOutputSurface +@@ -65,6 +70,11 @@ class OffscreenBrowserCompositorOutputSurface uint32_t fbo_ = 0; bool reflector_changed_ = false; std::unique_ptr reflector_texture_; @@ -348,10 +346,10 @@ index b028dc136e7f..fa83865087dc 100644 base::WeakPtrFactory weak_ptr_factory_; diff --git gpu/GLES2/gl2chromium_autogen.h gpu/GLES2/gl2chromium_autogen.h -index 3065b8b9ea47..ba39222f3d87 100644 +index 404c05cee78b..d2ce3e8de6e9 100644 --- gpu/GLES2/gl2chromium_autogen.h +++ gpu/GLES2/gl2chromium_autogen.h -@@ -414,6 +414,10 @@ +@@ -416,6 +416,10 @@ GLES2_GET_FUN(CreateClientGpuFenceCHROMIUM) #define glWaitGpuFenceCHROMIUM GLES2_GET_FUN(WaitGpuFenceCHROMIUM) #define glDestroyGpuFenceCHROMIUM GLES2_GET_FUN(DestroyGpuFenceCHROMIUM) @@ -363,10 +361,10 @@ index 3065b8b9ea47..ba39222f3d87 100644 GLES2_GET_FUN(InvalidateReadbackBufferShadowDataCHROMIUM) #define glFramebufferTextureMultiviewLayeredANGLE \ diff --git gpu/command_buffer/build_gles2_cmd_buffer.py gpu/command_buffer/build_gles2_cmd_buffer.py -index 7fe7fed028b5..c6f8ee684dc9 100755 +index 4032b2491109..02639f9b2080 100755 --- gpu/command_buffer/build_gles2_cmd_buffer.py +++ gpu/command_buffer/build_gles2_cmd_buffer.py -@@ -4244,6 +4244,35 @@ _FUNCTION_INFO = { +@@ -4254,6 +4254,35 @@ _FUNCTION_INFO = { 'extension': 'CHROMIUM_gpu_fence', 'extension_flag': 'chromium_gpu_fence', }, @@ -403,10 +401,10 @@ index 7fe7fed028b5..c6f8ee684dc9 100755 'decoder_func': 'DoUnpremultiplyAndDitherCopyCHROMIUM', 'cmd_args': 'GLuint source_id, GLuint dest_id, GLint x, GLint y, ' diff --git gpu/command_buffer/client/gles2_c_lib_autogen.h gpu/command_buffer/client/gles2_c_lib_autogen.h -index ca386c64990c..0adac90e4437 100644 +index b68942087179..2248762fcd77 100644 --- gpu/command_buffer/client/gles2_c_lib_autogen.h +++ gpu/command_buffer/client/gles2_c_lib_autogen.h -@@ -1899,6 +1899,20 @@ void GL_APIENTRY GLES2WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) { +@@ -1909,6 +1909,20 @@ void GL_APIENTRY GLES2WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) { void GL_APIENTRY GLES2DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) { gles2::GetGLContext()->DestroyGpuFenceCHROMIUM(gpu_fence_id); } @@ -427,7 +425,7 @@ index ca386c64990c..0adac90e4437 100644 void GL_APIENTRY GLES2InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) { gles2::GetGLContext()->InvalidateReadbackBufferShadowDataCHROMIUM(buffer_id); -@@ -3411,6 +3425,22 @@ extern const NameToFunc g_gles2_function_table[] = { +@@ -3434,6 +3448,22 @@ extern const NameToFunc g_gles2_function_table[] = { "glDestroyGpuFenceCHROMIUM", reinterpret_cast(glDestroyGpuFenceCHROMIUM), }, @@ -451,10 +449,10 @@ index ca386c64990c..0adac90e4437 100644 "glInvalidateReadbackBufferShadowDataCHROMIUM", reinterpret_cast( diff --git gpu/command_buffer/client/gles2_cmd_helper_autogen.h gpu/command_buffer/client/gles2_cmd_helper_autogen.h -index e0c0ca8e93fb..2998690b8bf8 100644 +index 02f89cdad67c..a2da1b7c518a 100644 --- gpu/command_buffer/client/gles2_cmd_helper_autogen.h +++ gpu/command_buffer/client/gles2_cmd_helper_autogen.h -@@ -3508,6 +3508,42 @@ void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) { +@@ -3521,6 +3521,42 @@ void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) { } } @@ -498,10 +496,10 @@ index e0c0ca8e93fb..2998690b8bf8 100644 GLint shm_id, GLuint shm_offset, diff --git gpu/command_buffer/client/gles2_implementation.cc gpu/command_buffer/client/gles2_implementation.cc -index 3f15a8c2ceb5..6305875463f7 100644 +index 985e6324567b..d2e067f28521 100644 --- gpu/command_buffer/client/gles2_implementation.cc +++ gpu/command_buffer/client/gles2_implementation.cc -@@ -7651,6 +7651,22 @@ void GLES2Implementation::Viewport(GLint x, +@@ -7680,6 +7680,22 @@ void GLES2Implementation::Viewport(GLint x, CheckGLError(); } @@ -525,10 +523,10 @@ index 3f15a8c2ceb5..6305875463f7 100644 GLuint id, uint32_t sync_data_shm_id, diff --git gpu/command_buffer/client/gles2_implementation_autogen.h gpu/command_buffer/client/gles2_implementation_autogen.h -index 60200cb39bdc..d6b603fde369 100644 +index 6882d12a79c4..b237ee953860 100644 --- gpu/command_buffer/client/gles2_implementation_autogen.h +++ gpu/command_buffer/client/gles2_implementation_autogen.h -@@ -1338,6 +1338,16 @@ void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override; +@@ -1345,6 +1345,16 @@ void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override; void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override; @@ -546,10 +544,10 @@ index 60200cb39bdc..d6b603fde369 100644 void FramebufferTextureMultiviewLayeredANGLE(GLenum target, diff --git gpu/command_buffer/client/gles2_implementation_impl_autogen.h gpu/command_buffer/client/gles2_implementation_impl_autogen.h -index bfbcd6b7741c..9a461a9cc321 100644 +index 13b36769ae3d..d2351bb96021 100644 --- gpu/command_buffer/client/gles2_implementation_impl_autogen.h +++ gpu/command_buffer/client/gles2_implementation_impl_autogen.h -@@ -3751,6 +3751,30 @@ void GLES2Implementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) { +@@ -3790,6 +3790,30 @@ void GLES2Implementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) { CheckGLError(); } @@ -581,10 +579,10 @@ index bfbcd6b7741c..9a461a9cc321 100644 GLenum target, GLenum attachment, diff --git gpu/command_buffer/client/gles2_interface_autogen.h gpu/command_buffer/client/gles2_interface_autogen.h -index 9daed65b7658..692e72c651a4 100644 +index 2071473f0da8..77a29e65cafd 100644 --- gpu/command_buffer/client/gles2_interface_autogen.h +++ gpu/command_buffer/client/gles2_interface_autogen.h -@@ -1004,6 +1004,12 @@ virtual GLuint CreateGpuFenceCHROMIUM() = 0; +@@ -1010,6 +1010,12 @@ virtual GLuint CreateGpuFenceCHROMIUM() = 0; virtual GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) = 0; virtual void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) = 0; virtual void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) = 0; @@ -598,10 +596,10 @@ index 9daed65b7658..692e72c651a4 100644 virtual void FramebufferTextureMultiviewLayeredANGLE(GLenum target, GLenum attachment, diff --git gpu/command_buffer/client/gles2_interface_stub_autogen.h gpu/command_buffer/client/gles2_interface_stub_autogen.h -index 35b35b1684cd..320a9661ca63 100644 +index 158134cf608e..2990494dcc5e 100644 --- gpu/command_buffer/client/gles2_interface_stub_autogen.h +++ gpu/command_buffer/client/gles2_interface_stub_autogen.h -@@ -974,6 +974,12 @@ GLuint CreateGpuFenceCHROMIUM() override; +@@ -980,6 +980,12 @@ GLuint CreateGpuFenceCHROMIUM() override; GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override; void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override; void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override; @@ -615,10 +613,10 @@ index 35b35b1684cd..320a9661ca63 100644 void FramebufferTextureMultiviewLayeredANGLE(GLenum target, GLenum attachment, diff --git gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h -index bb14269b85c1..22330e480b6a 100644 +index 29d079725c72..444c60df71a4 100644 --- gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h +++ gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h -@@ -1296,6 +1296,14 @@ GLuint GLES2InterfaceStub::CreateClientGpuFenceCHROMIUM( +@@ -1303,6 +1303,14 @@ GLuint GLES2InterfaceStub::CreateClientGpuFenceCHROMIUM( } void GLES2InterfaceStub::WaitGpuFenceCHROMIUM(GLuint /* gpu_fence_id */) {} void GLES2InterfaceStub::DestroyGpuFenceCHROMIUM(GLuint /* gpu_fence_id */) {} @@ -634,10 +632,10 @@ index bb14269b85c1..22330e480b6a 100644 GLuint /* buffer_id */) {} void GLES2InterfaceStub::FramebufferTextureMultiviewLayeredANGLE( diff --git gpu/command_buffer/client/gles2_trace_implementation_autogen.h gpu/command_buffer/client/gles2_trace_implementation_autogen.h -index 428d60ef0af5..ec6792d5bb07 100644 +index 7e94db26455d..d9de7879ea9a 100644 --- gpu/command_buffer/client/gles2_trace_implementation_autogen.h +++ gpu/command_buffer/client/gles2_trace_implementation_autogen.h -@@ -974,6 +974,12 @@ GLuint CreateGpuFenceCHROMIUM() override; +@@ -980,6 +980,12 @@ GLuint CreateGpuFenceCHROMIUM() override; GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override; void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override; void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override; @@ -651,10 +649,10 @@ index 428d60ef0af5..ec6792d5bb07 100644 void FramebufferTextureMultiviewLayeredANGLE(GLenum target, GLenum attachment, diff --git gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h -index b14f102a33ae..5e6dd209e3ad 100644 +index 4b7932e147b0..b0f5f2cafae3 100644 --- gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h +++ gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h -@@ -2734,6 +2734,28 @@ void GLES2TraceImplementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) { +@@ -2747,6 +2747,28 @@ void GLES2TraceImplementation::DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) { gl_->DestroyGpuFenceCHROMIUM(gpu_fence_id); } @@ -684,10 +682,10 @@ index b14f102a33ae..5e6dd209e3ad 100644 GLuint buffer_id) { TRACE_EVENT_BINARY_EFFICIENT0( diff --git gpu/command_buffer/common/gles2_cmd_format_autogen.h gpu/command_buffer/common/gles2_cmd_format_autogen.h -index 41836d0a4a4f..ef29fcc644b1 100644 +index 68d9861198e0..98e8772b2993 100644 --- gpu/command_buffer/common/gles2_cmd_format_autogen.h +++ gpu/command_buffer/common/gles2_cmd_format_autogen.h -@@ -17261,6 +17261,193 @@ static_assert(offsetof(DestroyGpuFenceCHROMIUM, header) == 0, +@@ -17336,6 +17336,193 @@ static_assert(offsetof(DestroyGpuFenceCHROMIUM, header) == 0, static_assert(offsetof(DestroyGpuFenceCHROMIUM, gpu_fence_id) == 4, "offset of DestroyGpuFenceCHROMIUM gpu_fence_id should be 4"); @@ -882,10 +880,10 @@ index 41836d0a4a4f..ef29fcc644b1 100644 typedef SetReadbackBufferShadowAllocationINTERNAL ValueType; static const CommandId kCmdId = kSetReadbackBufferShadowAllocationINTERNAL; diff --git gpu/command_buffer/common/gles2_cmd_format_test_autogen.h gpu/command_buffer/common/gles2_cmd_format_test_autogen.h -index 23dbbe72f2ff..321dca6d026c 100644 +index 790e72622c7d..bf87d86d9386 100644 --- gpu/command_buffer/common/gles2_cmd_format_test_autogen.h +++ gpu/command_buffer/common/gles2_cmd_format_test_autogen.h -@@ -5701,6 +5701,52 @@ TEST_F(GLES2FormatTest, DestroyGpuFenceCHROMIUM) { +@@ -5721,6 +5721,52 @@ TEST_F(GLES2FormatTest, DestroyGpuFenceCHROMIUM) { CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd)); } @@ -939,28 +937,27 @@ index 23dbbe72f2ff..321dca6d026c 100644 cmds::SetReadbackBufferShadowAllocationINTERNAL& cmd = *GetBufferAs(); diff --git gpu/command_buffer/common/gles2_cmd_ids_autogen.h gpu/command_buffer/common/gles2_cmd_ids_autogen.h -index 1731b16d3eb2..3bf2b95d2513 100644 +index b3dd9b38feba..bcb3656e4481 100644 --- gpu/command_buffer/common/gles2_cmd_ids_autogen.h +++ gpu/command_buffer/common/gles2_cmd_ids_autogen.h -@@ -360,7 +360,12 @@ - OP(MaxShaderCompilerThreadsKHR) /* 601 */ \ - OP(CreateAndTexStorage2DSharedImageINTERNALImmediate) /* 602 */ \ - OP(BeginSharedImageAccessDirectCHROMIUM) /* 603 */ \ -- OP(EndSharedImageAccessDirectCHROMIUM) /* 604 */ -+ OP(EndSharedImageAccessDirectCHROMIUM) /* 604 */ \ -+ OP(CreateSharedTexture) /* 605 */ \ -+ OP(LockSharedTexture) /* 606 */ \ -+ OP(UnlockSharedTexture) /* 607 */ \ -+ OP(DeleteSharedTexture) /* 608 */ -+ +@@ -361,7 +361,11 @@ + OP(MaxShaderCompilerThreadsKHR) /* 602 */ \ + OP(CreateAndTexStorage2DSharedImageINTERNALImmediate) /* 603 */ \ + OP(BeginSharedImageAccessDirectCHROMIUM) /* 604 */ \ +- OP(EndSharedImageAccessDirectCHROMIUM) /* 605 */ ++ OP(EndSharedImageAccessDirectCHROMIUM) /* 605 */ \ ++ OP(CreateSharedTexture) /* 606 */ \ ++ OP(LockSharedTexture) /* 607 */ \ ++ OP(UnlockSharedTexture) /* 608 */ \ ++ OP(DeleteSharedTexture) /* 609 */ enum CommandId { kOneBeforeStartPoint = diff --git gpu/command_buffer/gles2_cmd_buffer_functions.txt gpu/command_buffer/gles2_cmd_buffer_functions.txt -index a0227387cf62..da714ca81b62 100644 +index aa55852d05dd..4638d070c48c 100644 --- gpu/command_buffer/gles2_cmd_buffer_functions.txt +++ gpu/command_buffer/gles2_cmd_buffer_functions.txt -@@ -416,6 +416,12 @@ GL_APICALL GLuint GL_APIENTRY glCreateClientGpuFenceCHROMIUM (ClientGpuFen +@@ -417,6 +417,12 @@ GL_APICALL GLuint GL_APIENTRY glCreateClientGpuFenceCHROMIUM (ClientGpuFen GL_APICALL void GL_APIENTRY glWaitGpuFenceCHROMIUM (GLuint gpu_fence_id); GL_APICALL void GL_APIENTRY glDestroyGpuFenceCHROMIUM (GLuint gpu_fence_id); @@ -974,10 +971,10 @@ index a0227387cf62..da714ca81b62 100644 GL_APICALL void GL_APIENTRY glInvalidateReadbackBufferShadowDataCHROMIUM (GLidBuffer buffer_id); // (used for CHROMIUM_nonblocking_readback implementation) diff --git gpu/command_buffer/service/BUILD.gn gpu/command_buffer/service/BUILD.gn -index 24c15709c327..36264c1665ff 100644 +index 6955858281e7..045dee3185bf 100644 --- gpu/command_buffer/service/BUILD.gn +++ gpu/command_buffer/service/BUILD.gn -@@ -106,6 +106,8 @@ target(link_target_type, "gles2_sources") { +@@ -107,6 +107,8 @@ target(link_target_type, "gles2_sources") { visibility = [ "//gpu/*" ] sources = [ @@ -987,7 +984,7 @@ index 24c15709c327..36264c1665ff 100644 "buffer_manager.cc", "buffer_manager.h", diff --git gpu/command_buffer/service/gles2_cmd_decoder.cc gpu/command_buffer/service/gles2_cmd_decoder.cc -index e3f5d83ca54f..67e1bdee5068 100644 +index d7197fe6455c..bfb072283725 100644 --- gpu/command_buffer/service/gles2_cmd_decoder.cc +++ gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -38,6 +38,7 @@ @@ -998,7 +995,7 @@ index e3f5d83ca54f..67e1bdee5068 100644 #include "gpu/command_buffer/common/debug_marker_manager.h" #include "gpu/command_buffer/common/gles2_cmd_format.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" -@@ -909,6 +910,13 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { +@@ -916,6 +917,13 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { return group_->mailbox_manager(); } @@ -1012,7 +1009,7 @@ index e3f5d83ca54f..67e1bdee5068 100644 ImageManager* image_manager() { return group_->image_manager(); } VertexArrayManager* vertex_array_manager() { -@@ -2620,6 +2628,8 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { +@@ -2643,6 +2651,8 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient { std::unique_ptr vertex_array_manager_; @@ -1021,7 +1018,7 @@ index e3f5d83ca54f..67e1bdee5068 100644 base::flat_set> writes_submitted_but_not_completed_; // The format of the back buffer_ -@@ -5580,6 +5590,59 @@ error::Error GLES2DecoderImpl::HandleDestroyGpuFenceCHROMIUM( +@@ -5618,6 +5628,59 @@ error::Error GLES2DecoderImpl::HandleDestroyGpuFenceCHROMIUM( return error::kNoError; } diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index c039526fc..fdeb57acc 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index b3587587786f..8d3ff106d714 100644 +index 0591fc512d52..23d066a9254d 100644 --- .gn +++ .gn -@@ -671,6 +671,8 @@ exec_script_whitelist = +@@ -669,6 +669,8 @@ exec_script_whitelist = # in the Chromium repo outside of //build. "//build_overrides/build.gni", @@ -12,10 +12,10 @@ index b3587587786f..8d3ff106d714 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index b7227438d469..c879fd3d071d 100644 +index f50c9f99a36e..33be1efac8f0 100644 --- BUILD.gn +++ BUILD.gn -@@ -188,6 +188,7 @@ group("gn_all") { +@@ -189,6 +189,7 @@ group("gn_all") { if (!is_ios && !is_fuchsia) { deps += [ @@ -100,7 +100,7 @@ index 2c8675206f31..d3e419d8fe98 100644 diff --git build/vs_toolchain.py build/vs_toolchain.py -index 83b5e25dfa87..65186ae4780c 100755 +index 1ab7be527726..1467d18c1a81 100755 --- build/vs_toolchain.py +++ build/vs_toolchain.py @@ -76,11 +76,18 @@ def SetEnvironmentAndGetRuntimeDllDirs(): @@ -123,10 +123,10 @@ index 83b5e25dfa87..65186ae4780c 100755 # directory in order to run binaries locally, but they are needed in order # to create isolates or the mini_installer. Copying them to the output diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 4c790d3ee4e6..e9f3768c20d6 100644 +index ca18ca7ca65b..b51ebadccd0d 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni -@@ -265,7 +265,7 @@ template("chrome_paks") { +@@ -263,7 +263,7 @@ template("chrome_paks") { } input_locales = locales @@ -136,7 +136,7 @@ index 4c790d3ee4e6..e9f3768c20d6 100644 if (is_mac) { output_locales = locales_as_mac_outputs diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn -index 8d19c74ebe9d..7470cc298e36 100644 +index ec629333b006..981f3f26548d 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -134,7 +134,7 @@ template("generate_mini_installer") { diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 1a271c199..8cabe77db 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 6f7cfefd69ac..35ccc5b2ea15 100644 +index e823c9b9edfd..2402613c8d44 100644 --- tools/gritsettings/resource_ids +++ tools/gritsettings/resource_ids -@@ -434,4 +434,11 @@ +@@ -431,4 +431,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/linux_gtk_2014.patch b/patch/patches/linux_gtk_2014.patch index afc70f555..c53a5fadd 100644 --- a/patch/patches/linux_gtk_2014.patch +++ b/patch/patches/linux_gtk_2014.patch @@ -1,5 +1,5 @@ diff --git build/config/linux/gtk/BUILD.gn build/config/linux/gtk/BUILD.gn -index 6624d138e14a..1ae9cadc4f3a 100644 +index d78f7407c179..0bb79883e16c 100644 --- build/config/linux/gtk/BUILD.gn +++ build/config/linux/gtk/BUILD.gn @@ -4,8 +4,10 @@ @@ -68,10 +68,10 @@ index faae7805435a..5101e0d51bf2 100644 void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn -index f691b9c4be33..e9dec0b09c8b 100644 +index fd7f3e60a599..9678ad4828cf 100644 --- chrome/test/BUILD.gn +++ chrome/test/BUILD.gn -@@ -4085,7 +4085,7 @@ test("unit_tests") { +@@ -4115,7 +4115,7 @@ test("unit_tests") { "../browser/ui/input_method/input_method_engine_unittest.cc", ] } @@ -80,7 +80,7 @@ index f691b9c4be33..e9dec0b09c8b 100644 sources += [ "../browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc" ] deps += [ "//build/config/linux/gtk" ] -@@ -4106,7 +4106,7 @@ test("unit_tests") { +@@ -4136,7 +4136,7 @@ test("unit_tests") { if (use_gio) { configs += [ "//build/linux:gio_config" ] } @@ -89,7 +89,7 @@ index f691b9c4be33..e9dec0b09c8b 100644 deps += [ "//chrome/browser/ui/libgtkui" ] } -@@ -5119,7 +5119,7 @@ if (!is_android) { +@@ -5152,7 +5152,7 @@ if (!is_android) { # suites, it seems like one or another starts timing out too. "../browser/ui/views/keyboard_access_browsertest.cc", ] @@ -99,10 +99,10 @@ index f691b9c4be33..e9dec0b09c8b 100644 "../browser/ui/libgtkui/select_file_dialog_interactive_uitest.cc", ] diff --git remoting/host/BUILD.gn remoting/host/BUILD.gn -index ff592fdd56d2..80cdc2093175 100644 +index 647f01cfae49..fdbc8f8d49aa 100644 --- remoting/host/BUILD.gn +++ remoting/host/BUILD.gn -@@ -350,7 +350,7 @@ static_library("common") { +@@ -351,7 +351,7 @@ static_library("common") { "//build/config/linux:xrandr", ] deps += [ "//remoting/host/linux:x11" ] @@ -111,7 +111,7 @@ index ff592fdd56d2..80cdc2093175 100644 deps += [ "//build/config/linux/gtk" ] } } else { -@@ -732,7 +732,7 @@ if (enable_me2me_host) { +@@ -733,7 +733,7 @@ if (enable_me2me_host) { deps += [ "//components/policy:generated" ] } @@ -121,12 +121,12 @@ index ff592fdd56d2..80cdc2093175 100644 } if ((is_linux && !is_chromeos) || is_mac) { diff --git remoting/host/file_transfer/BUILD.gn remoting/host/file_transfer/BUILD.gn -index d8985375e279..bf034bc990f5 100644 +index ffaaa0b5b423..9fc7f88859a9 100644 --- remoting/host/file_transfer/BUILD.gn +++ remoting/host/file_transfer/BUILD.gn -@@ -60,7 +60,7 @@ source_set("common") { - "//remoting/protocol", - ] +@@ -35,7 +35,7 @@ source_set("file_transfer") { + sources -= [ "get_desktop_directory.cc" ] + } - if (is_desktop_linux) { + if (is_desktop_linux && use_gtk) { @@ -169,10 +169,10 @@ index a07f8b0254af..970c1a54b4d2 100644 } } diff --git remoting/test/BUILD.gn remoting/test/BUILD.gn -index 2b7d0d78eef9..4feb3a244da9 100644 +index d916fa822a8f..245c0e006cdf 100644 --- remoting/test/BUILD.gn +++ remoting/test/BUILD.gn -@@ -149,7 +149,7 @@ if (enable_remoting_host && !is_android && !is_chromeos) { +@@ -148,7 +148,7 @@ if (enable_remoting_host && !is_android && !is_chromeos) { ":it2me_standalone_host", ] diff --git a/patch/patches/linux_poll_2466.patch b/patch/patches/linux_poll_2466.patch index a1b23e02e..58dbbdc6b 100644 --- a/patch/patches/linux_poll_2466.patch +++ b/patch/patches/linux_poll_2466.patch @@ -1,5 +1,5 @@ diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc -index b22421d834c2..8fda7598ba4b 100644 +index 22732f2864ef..7d5caef5c3b0 100644 --- base/files/file_path_watcher_linux.cc +++ base/files/file_path_watcher_linux.cc @@ -5,6 +5,7 @@ @@ -18,7 +18,7 @@ index b22421d834c2..8fda7598ba4b 100644 #include #include #include -@@ -220,21 +222,15 @@ void InotifyReaderThreadDelegate::ThreadMain() { +@@ -220,22 +222,15 @@ void InotifyReaderThreadDelegate::ThreadMain() { PlatformThread::SetName("inotify_reader"); // Make sure the file descriptors are good for use with select(). @@ -34,7 +34,8 @@ index b22421d834c2..8fda7598ba4b 100644 - FD_ZERO(&rfds); - FD_SET(inotify_fd_, &rfds); - -- ScopedBlockingCall scoped_blocking_call(BlockingType::WILL_BLOCK); +- ScopedBlockingCall scoped_blocking_call(FROM_HERE, +- BlockingType::WILL_BLOCK); - - // Wait until some inotify events are available. - int select_result = diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index e4608d8aa..fdf6e06f5 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,52 +1,22 @@ diff --git base/message_loop/message_loop.cc base/message_loop/message_loop.cc -index cec3a133889d..4b25f540a4af 100644 +index fff922d36819..28fea401be5f 100644 --- base/message_loop/message_loop.cc +++ base/message_loop/message_loop.cc -@@ -151,6 +151,10 @@ void MessageLoop::RemoveTaskObserver(TaskObserver* task_observer) { - } - - bool MessageLoop::IsBoundToCurrentThread() const { -+ if (!pump_) { -+ // Avoid DCHECKs in the MessageLoop destructor after we call ReleasePump(). -+ return false; -+ } - return backend_->IsBoundToCurrentThread(); - } - -@@ -164,6 +168,9 @@ MessageLoopBase* MessageLoop::GetMessageLoopBase() { +@@ -163,6 +163,9 @@ MessageLoopBase* MessageLoop::GetMessageLoopBase() { //------------------------------------------------------------------------------ +MessageLoopForUI::MessageLoopForUI(std::unique_ptr pump) -+ : MessageLoop(TYPE_UI, BindOnce(&ReturnPump, std::move(pump))) {} ++ : MessageLoop(TYPE_UI, std::move(pump)) {} + // static - std::unique_ptr MessageLoop::CreateUnbound( - Type type, + std::unique_ptr MessageLoop::CreateUnbound(Type type) { + return WrapUnique(new MessageLoop(type, nullptr)); diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h -index f49f56285de7..159e645a0c9f 100644 +index 46782b49a7f0..78ebaf71cbdf 100644 --- base/message_loop/message_loop.h +++ base/message_loop/message_loop.h -@@ -185,6 +185,8 @@ class BASE_EXPORT MessageLoopBase { - // can post other tasks when destructed. - virtual void DeletePendingTasks() = 0; - -+ virtual void ReleasePump() = 0; -+ - protected: - friend class MessageLoop; - friend class MessageLoopForUI; -@@ -286,6 +288,9 @@ class BASE_EXPORT MessageLoop { - - MessageLoopBase* GetMessageLoopBase(); - -+ // Called from Thread::CleanUp() to release resources. -+ void ReleasePump() { pump_ = nullptr; backend_->ReleasePump(); } -+ - //---------------------------------------------------------------------------- - protected: - using MessagePumpFactoryCallback = -@@ -374,6 +379,7 @@ class BASE_EXPORT MessageLoop { +@@ -377,6 +377,7 @@ class BASE_EXPORT MessageLoop { class BASE_EXPORT MessageLoopForUI : public MessageLoop { public: explicit MessageLoopForUI(Type type = TYPE_UI); @@ -55,7 +25,7 @@ index f49f56285de7..159e645a0c9f 100644 #if defined(OS_IOS) // On iOS, the main message loop cannot be Run(). Instead call Attach(), diff --git base/message_loop/message_loop_current.cc base/message_loop/message_loop_current.cc -index e669669c72f5..84cc1bee2c74 100644 +index c0b2ff7e0ad6..75802589ca01 100644 --- base/message_loop/message_loop_current.cc +++ base/message_loop/message_loop_current.cc @@ -49,6 +49,8 @@ void MessageLoopCurrent::AddDestructionObserver( @@ -68,43 +38,23 @@ index e669669c72f5..84cc1bee2c74 100644 current_->RemoveDestructionObserver(destruction_observer); } diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h -index d469a7214001..76ae4cb77c8e 100644 +index bcab89d6e2e7..3160b321990e 100644 --- base/message_loop/message_loop_current.h +++ base/message_loop/message_loop_current.h -@@ -134,6 +134,16 @@ class BASE_EXPORT MessageLoopCurrent { +@@ -133,6 +133,12 @@ class BASE_EXPORT MessageLoopCurrent { // posted tasks. void SetAddQueueTimeToTasks(bool enable); +#if defined(OS_WIN) -+ void set_os_modal_loop(bool os_modal_loop) { -+ os_modal_loop_ = os_modal_loop; -+ } ++ void set_os_modal_loop(bool os_modal_loop) { os_modal_loop_ = os_modal_loop; } + -+ bool os_modal_loop() const { -+ return os_modal_loop_; -+ } ++ bool os_modal_loop() const { return os_modal_loop_; } +#endif // OS_WIN + // Enables or disables the recursive task processing. This happens in the case // of recursive message loops. Some unwanted message loops may occur when // using common controls or printer functions. By default, recursive task -@@ -187,7 +197,6 @@ class BASE_EXPORT MessageLoopCurrent { - // level. - bool IsIdleForTesting(); - -- protected: - // Binds |current| to the current thread. It will from then on be the - // MessageLoop driven by MessageLoopCurrent on this thread. This is only meant - // to be invoked by the MessageLoop itself. -@@ -198,6 +207,7 @@ class BASE_EXPORT MessageLoopCurrent { - // meant to be invoked by the MessageLoop itself. - static void UnbindFromCurrentThreadInternal(MessageLoopBase* current); - -+ protected: - explicit MessageLoopCurrent(MessageLoopBase* current) : current_(current) {} - - friend class MessageLoopImpl; -@@ -215,6 +225,13 @@ class BASE_EXPORT MessageLoopCurrent { +@@ -213,6 +219,13 @@ class BASE_EXPORT MessageLoopCurrent { MessageLoopBase* ToMessageLoopBaseDeprecated() const { return current_; } MessageLoopBase* current_; @@ -119,43 +69,24 @@ index d469a7214001..76ae4cb77c8e 100644 #if !defined(OS_NACL) diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 9de7721c9cfb..13b9bf8660ed 100644 +index 3e9562cc4cc5..cf4a700364d3 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc -@@ -12,6 +12,7 @@ - #include "base/bind.h" - #include "base/debug/alias.h" - #include "base/memory/ptr_util.h" -+#include "base/message_loop/message_loop_current.h" - #include "base/metrics/histogram_macros.h" - #include "base/strings/stringprintf.h" - #include "base/trace_event/trace_event.h" -@@ -390,20 +391,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) { - } +@@ -2,6 +2,7 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include "base/message_loop/message_loop_current.h" + #include "base/message_loop/message_pump_win.h" + + #include +@@ -493,10 +494,18 @@ bool MessagePumpForUI::ProcessPumpReplacementMessage() { + // asynchronous to this thread!! - bool MessagePumpForUI::ProcessPumpReplacementMessage() { -- // When we encounter a kMsgHaveWork message, this method is called to peek and -- // process a replacement message. The goal is to make the kMsgHaveWork as non- -- // intrusive as possible, even though a continuous stream of such messages are -- // posted. This method carefully peeks a message while there is no chance for -- // a kMsgHaveWork to be pending, then resets the |have_work_| flag (allowing a -- // replacement kMsgHaveWork to possibly be posted), and finally dispatches -- // that peeked replacement. Note that the re-post of kMsgHaveWork may be -- // asynchronous to this thread!! -- -+ // When we encounter a kMsgHaveWork message, this method is called to peek -+ // and process a replacement message, such as a WM_PAINT or WM_TIMER. The -+ // goal is to make the kMsgHaveWork as non-intrusive as possible, even though -+ // a continuous stream of such messages are posted. This method carefully -+ // peeks a message while there is no chance for a kMsgHaveWork to be pending, -+ // then resets the have_work_ flag (allowing a replacement kMsgHaveWork to -+ // possibly be posted), and finally dispatches that peeked replacement. Note -+ // that the re-post of kMsgHaveWork may be asynchronous to this thread!! -+ -+ bool have_message = false; MSG msg; - const bool have_message = - ::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE; ++ bool have_message = false; + // We should not process all window messages if we are in the context of an + // OS modal loop, i.e. in the context of a windows API call like MessageBox. + // This is to ensure that these messages are peeked out by the OS modal loop. @@ -171,16 +102,3 @@ index 9de7721c9cfb..13b9bf8660ed 100644 DCHECK(!have_message || kMsgHaveWork != msg.message || msg.hwnd != message_window_.hwnd()); -diff --git base/task/sequence_manager/sequence_manager_impl.h base/task/sequence_manager/sequence_manager_impl.h -index 6c5c85f0e62f..78d400e609dc 100644 ---- base/task/sequence_manager/sequence_manager_impl.h -+++ base/task/sequence_manager/sequence_manager_impl.h -@@ -155,6 +155,8 @@ class BASE_EXPORT SequenceManagerImpl - void BindToCurrentThread(std::unique_ptr pump) override; - void DeletePendingTasks() override; - bool HasTasks() override; -+ -+ void ReleasePump() override {} - - // Requests that a task to process work is scheduled. - void ScheduleWork(); diff --git a/patch/patches/message_pump_mac_2495.patch b/patch/patches/message_pump_mac_2495.patch index 04011bdd1..3fc170919 100644 --- a/patch/patches/message_pump_mac_2495.patch +++ b/patch/patches/message_pump_mac_2495.patch @@ -1,8 +1,8 @@ diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm -index 6ebddfc9f404..85809cf7b134 100644 +index 666b6cdca80b..239f6fad81a1 100644 --- base/message_loop/message_pump_mac.mm +++ base/message_loop/message_pump_mac.mm -@@ -799,7 +799,8 @@ void MessagePumpUIApplication::Attach(Delegate* delegate) { +@@ -800,7 +800,8 @@ void MessagePumpUIApplication::Attach(Delegate* delegate) { #else ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { @@ -12,7 +12,7 @@ index 6ebddfc9f404..85809cf7b134 100644 DCHECK_EQ(kNSApplicationModalSafeModeMask, g_app_pump->GetModeMask()); // Pumping events in private runloop modes is known to interact badly with // app modal windows like NSAlert. -@@ -811,7 +812,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { +@@ -812,7 +813,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { } ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() { diff --git a/patch/patches/net_filter_515.patch b/patch/patches/net_filter_515.patch index 1cee7e695..a1dcd30fa 100644 --- a/patch/patches/net_filter_515.patch +++ b/patch/patches/net_filter_515.patch @@ -22,10 +22,10 @@ index 49fe875c7d22..c1e3df840dc0 100644 THREAD_CHECKER(thread_checker_); diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc -index dc7c3d2fd023..e2b348746816 100644 +index 85a188974509..ec9a15fc9fa5 100644 --- net/url_request/url_request_job.cc +++ net/url_request/url_request_job.cc -@@ -467,6 +467,12 @@ void URLRequestJob::NotifyHeadersComplete() { +@@ -466,6 +466,12 @@ void URLRequestJob::NotifyHeadersComplete() { DCHECK(!source_stream_); source_stream_ = SetUpSourceStream(); diff --git a/patch/patches/net_urlrequest_1327.patch b/patch/patches/net_urlrequest_1327.patch index 119fd4b90..183c900b9 100644 --- a/patch/patches/net_urlrequest_1327.patch +++ b/patch/patches/net_urlrequest_1327.patch @@ -1,8 +1,8 @@ diff --git net/url_request/url_request.h net/url_request/url_request.h -index 9301dc42e121..9dbe0e83fc3a 100644 +index 33337d91f5cc..7de7579d9f12 100644 --- net/url_request/url_request.h +++ net/url_request/url_request.h -@@ -753,10 +753,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { +@@ -754,10 +754,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { base::WeakPtr GetWeakPtr(); diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index 15c537136..9298184d2 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -1,5 +1,5 @@ diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h -index 37693ee802d2..66d4827146d5 100644 +index 39ff86491246..163eaec35230 100644 --- content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h @@ -186,6 +186,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) @@ -11,7 +11,7 @@ index 37693ee802d2..66d4827146d5 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 bb5de85a28c1..c48451322c00 100644 +index b76f327dccca..eecf13a609ca 100644 --- content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc @@ -168,6 +168,7 @@ WebPreferences::WebPreferences() @@ -23,7 +23,7 @@ index bb5de85a28c1..c48451322c00 100644 record_whole_document(false), cookie_enabled(true), diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h -index 798b963f5900..86d81ec9a58a 100644 +index 9052d1d6f4db..acb7027bb637 100644 --- content/public/common/web_preferences.h +++ content/public/common/web_preferences.h @@ -183,6 +183,7 @@ struct CONTENT_EXPORT WebPreferences { @@ -35,10 +35,10 @@ index 798b963f5900..86d81ec9a58a 100644 bool record_whole_document; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index 2d0908fb291b..33668351b73a 100644 +index c748edbf5a32..0d549ad30f4c 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -1008,6 +1008,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, +@@ -1028,6 +1028,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, #endif WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available); diff --git a/patch/patches/print_header_footer_1478_1565.patch b/patch/patches/print_header_footer_1478_1565.patch index 5bf8b0efa..17e4fd5f0 100644 --- a/patch/patches/print_header_footer_1478_1565.patch +++ b/patch/patches/print_header_footer_1478_1565.patch @@ -242,18 +242,18 @@ index 1802034a6e15..ae0d479ecafa 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 56e2dd5faf2b..9428db8c616d 100644 +index 40ea9d21b07a..d45e607cc316 100644 --- components/printing/renderer/print_render_frame_helper.cc +++ components/printing/renderer/print_render_frame_helper.cc -@@ -351,7 +351,6 @@ bool IsPrintingFrameset(const blink::WebLocalFrame* frame) { - frame->GetDocument().Body().TagName().Equals("FRAMESET"); +@@ -344,7 +344,6 @@ bool IsPrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, + return plugin && plugin->SupportsPaginatedPrint(); } -#if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Returns true if the current destination printer is PRINT_TO_PDF. bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) { bool print_to_pdf = false; -@@ -373,7 +372,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, +@@ -366,7 +365,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, } return frame_has_custom_page_size_style; } @@ -261,7 +261,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 #if BUILDFLAG(ENABLE_PRINTING) // Disable scaling when either: -@@ -428,7 +426,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, +@@ -421,7 +419,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, : PRINTABLE_AREA_MARGINS; } @@ -269,7 +269,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 gfx::Size GetPdfPageSize(const gfx::Size& page_size, int dpi) { return gfx::Size(ConvertUnit(page_size.width(), dpi, kPointsPerInch), ConvertUnit(page_size.height(), dpi, kPointsPerInch)); -@@ -475,7 +472,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( +@@ -468,7 +465,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( } return blink::kWebPrintScalingOptionFitToPrintableArea; } @@ -277,7 +277,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 // Helper function to scale and round an integer value with a double valued // scaling. -@@ -1106,10 +1102,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1099,10 +1095,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { return; if (g_is_preview_enabled) { @@ -288,7 +288,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 } else { auto weak_this = weak_ptr_factory_.GetWeakPtr(); web_frame->DispatchBeforePrintEvent(); -@@ -1137,13 +1131,11 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { +@@ -1130,13 +1124,11 @@ 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) @@ -302,7 +302,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 IPC_MESSAGE_HANDLER(PrintMsg_PrintFrameContent, OnPrintFrameContent) IPC_MESSAGE_HANDLER(PrintMsg_SetPrintingEnabled, OnSetPrintingEnabled) IPC_MESSAGE_UNHANDLED(handled = false) -@@ -1223,7 +1215,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( +@@ -1216,7 +1208,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( ignore_css_margins_ = (margins_type != DEFAULT_MARGINS); } @@ -310,7 +310,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 void PrintRenderFrameHelper::OnPrintPreview( const base::DictionaryValue& settings) { if (ipc_nesting_level_ > 1) -@@ -1489,7 +1480,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( +@@ -1481,7 +1472,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( printable_height / static_cast(uniform_page_size.height); return static_cast(100.0f * std::min(scale_width, scale_height)); } @@ -318,7 +318,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 void PrintRenderFrameHelper::OnPrintingDone(bool success) { if (ipc_nesting_level_ > 1) -@@ -1504,7 +1494,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { +@@ -1496,7 +1486,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { is_printing_enabled_ = enabled; } @@ -326,7 +326,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { if (ipc_nesting_level_ > 1) return; -@@ -1515,7 +1504,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1507,7 +1496,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { // that instead. auto plugin = delegate_->GetPdfElement(frame); if (!plugin.IsNull()) { @@ -336,7 +336,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 return; } print_preview_context_.InitWithFrame(frame); -@@ -1527,7 +1518,6 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1519,7 +1510,6 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { void PrintRenderFrameHelper::OnClosePrintPreviewDialog() { print_preview_context_.source_frame()->DispatchAfterPrintEvent(); } @@ -344,7 +344,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 void PrintRenderFrameHelper::OnPrintFrameContent( const PrintMsg_PrintFrame_Params& params) { -@@ -1611,11 +1601,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1603,11 +1593,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { print_node_in_progress_ = true; @@ -357,7 +357,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 } else { // Make a copy of the node, in case RenderView::OnContextMenuClosed() resets // its |context_menu_node_|. -@@ -1696,13 +1684,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1683,13 +1671,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { int cookie = print_pages_params_ ? print_pages_params_->params.document_cookie : 0; @@ -371,7 +371,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 switch (result) { case OK: break; -@@ -1717,7 +1703,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1704,7 +1690,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { } break; @@ -379,7 +379,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 case FAIL_PREVIEW: if (!is_print_ready_metafile_sent_) { if (notify_browser_of_print_failure_) { -@@ -1735,7 +1720,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1722,7 +1707,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { cookie, ids)); print_preview_context_.Failed(false); break; @@ -387,7 +387,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 } prep_frame_view_.reset(); print_pages_params_.reset(); -@@ -1908,7 +1892,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, +@@ -1895,7 +1879,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, return true; } @@ -395,7 +395,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 bool PrintRenderFrameHelper::SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options) { blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); -@@ -2001,7 +1984,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( +@@ -1988,7 +1971,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS); return false; } @@ -403,7 +403,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 void PrintRenderFrameHelper::GetPrintSettingsFromUser( blink::WebLocalFrame* frame, -@@ -2153,7 +2135,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( +@@ -2140,7 +2122,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( return true; } @@ -411,7 +411,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 void PrintRenderFrameHelper::ShowScriptedPrintPreview() { if (is_scripted_preview_delayed_) { is_scripted_preview_delayed_ = false; -@@ -2279,7 +2260,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( +@@ -2266,7 +2247,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids)); return true; } @@ -420,7 +420,7 @@ index 56e2dd5faf2b..9428db8c616d 100644 PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext() = default; diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h -index 34690801675c..bb503ad7f849 100644 +index c4effb05d16c..5d225dcab071 100644 --- components/printing/renderer/print_render_frame_helper.h +++ components/printing/renderer/print_render_frame_helper.h @@ -150,10 +150,8 @@ class PrintRenderFrameHelper @@ -434,7 +434,7 @@ index 34690801675c..bb503ad7f849 100644 }; // These values are persisted to logs. Entries should not be renumbered and -@@ -194,11 +192,9 @@ class PrintRenderFrameHelper +@@ -195,11 +193,9 @@ class PrintRenderFrameHelper // Message handlers --------------------------------------------------------- void OnPrintPages(); void OnPrintForSystemDialog(); @@ -446,7 +446,7 @@ index 34690801675c..bb503ad7f849 100644 void OnPrintFrameContent(const PrintMsg_PrintFrame_Params& params); void OnPrintingDone(bool success); -@@ -212,7 +208,6 @@ class PrintRenderFrameHelper +@@ -213,7 +209,6 @@ class PrintRenderFrameHelper // Update |ignore_css_margins_| based on settings. void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings); @@ -454,7 +454,7 @@ index 34690801675c..bb503ad7f849 100644 // Prepare frame for creating preview document. void PrepareFrameForPreviewDocument(); -@@ -232,7 +227,6 @@ class PrintRenderFrameHelper +@@ -233,7 +228,6 @@ class PrintRenderFrameHelper // Helper method to calculate the scale factor for fit-to-page. int GetFitToPageScaleFactor(const gfx::Rect& printable_area_in_points); @@ -462,7 +462,7 @@ index 34690801675c..bb503ad7f849 100644 // Enable/Disable printing. void OnSetPrintingEnabled(bool enabled); -@@ -259,7 +253,6 @@ class PrintRenderFrameHelper +@@ -260,7 +254,6 @@ class PrintRenderFrameHelper const blink::WebNode& node, int* number_of_pages); @@ -470,7 +470,7 @@ index 34690801675c..bb503ad7f849 100644 // Set options for print preset from source PDF document. bool SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options); -@@ -270,7 +263,6 @@ class PrintRenderFrameHelper +@@ -271,7 +264,6 @@ class PrintRenderFrameHelper bool UpdatePrintSettings(blink::WebLocalFrame* frame, const blink::WebNode& node, const base::DictionaryValue& passed_job_settings); @@ -478,7 +478,7 @@ index 34690801675c..bb503ad7f849 100644 // Get final print settings from the user. // WARNING: |this| may be gone after this method returns. -@@ -352,7 +344,6 @@ class PrintRenderFrameHelper +@@ -353,7 +345,6 @@ class PrintRenderFrameHelper bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame, bool user_initiated); @@ -486,7 +486,7 @@ index 34690801675c..bb503ad7f849 100644 // Shows scripted print preview when options from plugin are available. void ShowScriptedPrintPreview(); -@@ -371,7 +362,6 @@ class PrintRenderFrameHelper +@@ -372,7 +363,6 @@ class PrintRenderFrameHelper // Returns true if print preview should continue, false on failure. bool PreviewPageRendered(int page_number, std::unique_ptr metafile); @@ -494,7 +494,7 @@ index 34690801675c..bb503ad7f849 100644 void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings); -@@ -526,6 +516,7 @@ class PrintRenderFrameHelper +@@ -527,6 +517,7 @@ class PrintRenderFrameHelper ScriptingThrottler scripting_throttler_; bool print_node_in_progress_ = false; diff --git a/patch/patches/renderer_preferences_util_545103.patch b/patch/patches/renderer_preferences_util_545103.patch index a4afaf613..91af65e86 100644 --- a/patch/patches/renderer_preferences_util_545103.patch +++ b/patch/patches/renderer_preferences_util_545103.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc -index f3fc761cf5d5..3ccb345c41f0 100644 +index f5ed7f0683c5..5b31fb309985 100644 --- chrome/browser/renderer_preferences_util.cc +++ chrome/browser/renderer_preferences_util.cc @@ -29,7 +29,8 @@ diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index de25131c0..506f4c60f 100644 --- a/patch/patches/rwh_background_color_1984.patch +++ b/patch/patches/rwh_background_color_1984.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc -index 071e658ff195..651cc9eedf65 100644 +index cbee55a9f87c..c31a358239ff 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -733,10 +733,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { +@@ -738,10 +738,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -19,7 +19,7 @@ index 071e658ff195..651cc9eedf65 100644 } void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -2026,6 +2028,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2053,6 +2055,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { if (frame_sink_id_.is_valid()) window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/storage_partition_1973.patch b/patch/patches/storage_partition_1973.patch index d2ad66542..05afdc357 100644 --- a/patch/patches/storage_partition_1973.patch +++ b/patch/patches/storage_partition_1973.patch @@ -38,7 +38,7 @@ index a19d29165970..aaf918cd4b71 100644 render_frame_host->GetLastCommittedOrigin(), render_frame_host->GetFrameTreeNodeId(), std::move(wc_getter), diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc -index 8c5b2fc028c3..d6848a7e8750 100644 +index 5610c0df1c7d..7440b58504ec 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc @@ -88,6 +88,11 @@ class BlobHandleImpl : public BlobHandle { @@ -54,7 +54,7 @@ index 8c5b2fc028c3..d6848a7e8750 100644 ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( BrowserContext* context) { diff --git content/browser/blob_storage/chrome_blob_storage_context.h content/browser/blob_storage/chrome_blob_storage_context.h -index 26cf1ebfdffc..f6de541d25d1 100644 +index afd21be63a9a..8ac63336f6e7 100644 --- content/browser/blob_storage/chrome_blob_storage_context.h +++ content/browser/blob_storage/chrome_blob_storage_context.h @@ -50,6 +50,8 @@ class CONTENT_EXPORT ChromeBlobStorageContext @@ -83,10 +83,10 @@ index 6952610f8c88..fd8babeb99fd 100644 partition->GetBluetoothAllowedDevicesMap(); return allowed_devices_map->GetOrCreateAllowedDevices(GetOrigin()); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index 68e34ea69ecc..da82a4d99a91 100644 +index b2b3920da3b0..8ab540f00d3d 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc -@@ -210,11 +210,18 @@ StoragePartition* GetStoragePartitionFromConfig( +@@ -211,11 +211,18 @@ StoragePartition* GetStoragePartitionFromConfig( StoragePartitionImplMap* partition_map = GetStoragePartitionMap(browser_context); @@ -108,7 +108,7 @@ index 68e34ea69ecc..da82a4d99a91 100644 } void SaveSessionStateOnIOThread( -@@ -732,6 +739,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor( +@@ -741,6 +748,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor( BrowserContext::BrowserContext() : unique_id_(base::UnguessableToken::Create().ToString()) {} @@ -120,25 +120,40 @@ index 68e34ea69ecc..da82a4d99a91 100644 BrowserContext::~BrowserContext() { CHECK(GetUserData(kServiceInstanceGroup)) << "Attempting to destroy a BrowserContext that never called " +diff --git content/browser/devtools/protocol/background_service_handler.cc content/browser/devtools/protocol/background_service_handler.cc +index af047913e230..849eeddcfcc5 100644 +--- content/browser/devtools/protocol/background_service_handler.cc ++++ content/browser/devtools/protocol/background_service_handler.cc +@@ -49,8 +49,7 @@ void BackgroundServiceHandler::SetRenderer(int process_host_id, + return; + } + +- auto* storage_partition = +- static_cast(process_host->GetStoragePartition()); ++ auto* storage_partition = process_host->GetStoragePartition(); + devtools_context_ = storage_partition->GetDevToolsBackgroundServicesContext(); + DCHECK(devtools_context_); + } diff --git content/browser/devtools/protocol/network_handler.cc content/browser/devtools/protocol/network_handler.cc -index 69d2ffaea87b..5eb30fe7f22f 100644 +index 4fa2f08b626c..84c3be6138c0 100644 --- content/browser/devtools/protocol/network_handler.cc +++ content/browser/devtools/protocol/network_handler.cc -@@ -807,8 +807,7 @@ class BackgroundSyncRestorer { +@@ -816,8 +816,8 @@ class BackgroundSyncRestorer { scoped_refptr service_worker_host = static_cast(host.get()); - scoped_refptr sync_context = + scoped_refptr sync_context = - static_cast(storage_partition_) - ->GetBackgroundSyncContext(); -+ storage_partition_->GetBackgroundSyncContext(); ++ static_cast( ++ storage_partition_->GetBackgroundSyncContext()); base::PostTaskWithTraits( FROM_HERE, {BrowserThread::IO}, base::BindOnce( diff --git content/browser/devtools/protocol/service_worker_handler.cc content/browser/devtools/protocol/service_worker_handler.cc -index 3dc663a54995..8ed420d31c0d 100644 +index 34381dc45e10..960ba73c1ea8 100644 --- content/browser/devtools/protocol/service_worker_handler.cc +++ content/browser/devtools/protocol/service_worker_handler.cc -@@ -173,8 +173,7 @@ void ServiceWorkerHandler::SetRenderer(int process_host_id, +@@ -174,8 +174,7 @@ void ServiceWorkerHandler::SetRenderer(int process_host_id, return; } @@ -148,6 +163,16 @@ index 3dc663a54995..8ed420d31c0d 100644 DCHECK(storage_partition_); browser_context_ = process_host->GetBrowserContext(); context_ = static_cast( +@@ -338,7 +337,8 @@ Response ServiceWorkerHandler::DispatchSyncEvent( + return CreateInvalidVersionIdErrorResponse(); + + BackgroundSyncContextImpl* sync_context = +- storage_partition_->GetBackgroundSyncContext(); ++ static_cast( ++ storage_partition_->GetBackgroundSyncContext()); + + base::PostTaskWithTraits(FROM_HERE, {BrowserThread::IO}, + base::BindOnce(&DispatchSyncEventOnIO, context_, diff --git content/browser/devtools/protocol/service_worker_handler.h content/browser/devtools/protocol/service_worker_handler.h index ec9ab86d0ca6..0fe5219f1e84 100644 --- content/browser/devtools/protocol/service_worker_handler.h @@ -171,10 +196,10 @@ index ec9ab86d0ca6..0fe5219f1e84 100644 base::WeakPtrFactory weak_factory_; diff --git content/browser/download/download_manager_impl.cc content/browser/download/download_manager_impl.cc -index 5da8761a8e1b..f573f9f49434 100644 +index 5ed0f15fe47b..5452066f9e73 100644 --- content/browser/download/download_manager_impl.cc +++ content/browser/download/download_manager_impl.cc -@@ -99,9 +99,9 @@ void DeleteDownloadedFileOnUIThread(const base::FilePath& file_path) { +@@ -102,9 +102,9 @@ void DeleteDownloadedFileOnUIThread(const base::FilePath& file_path) { } #endif @@ -187,7 +212,7 @@ index 5da8761a8e1b..f573f9f49434 100644 DCHECK_CURRENTLY_ON(BrowserThread::UI); SiteInstance* site_instance = nullptr; -@@ -111,8 +111,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context, +@@ -114,8 +114,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context, if (render_frame_host_) site_instance = render_frame_host_->GetSiteInstance(); } @@ -197,7 +222,7 @@ index 5da8761a8e1b..f573f9f49434 100644 } void OnDownloadStarted( -@@ -270,7 +269,7 @@ base::FilePath GetTemporaryDownloadDirectory() { +@@ -273,7 +272,7 @@ base::FilePath GetTemporaryDownloadDirectory() { #endif scoped_refptr @@ -206,16 +231,16 @@ index 5da8761a8e1b..f573f9f49434 100644 RenderFrameHost* rfh, bool is_download) { network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info; -@@ -287,7 +286,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition, - } +@@ -308,7 +307,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition, } + return base::MakeRefCounted( - storage_partition->url_loader_factory_getter(), + base::WrapRefCounted(storage_partition->url_loader_factory_getter()), std::move(proxy_factory_ptr_info), std::move(proxy_factory_request)); } -@@ -1230,7 +1229,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( +@@ -1252,7 +1251,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( tab_referrer_url = entry->GetReferrer().url; } } @@ -224,7 +249,7 @@ index 5da8761a8e1b..f573f9f49434 100644 GetStoragePartition(browser_context_, render_process_id, render_frame_id); in_progress_manager_->InterceptDownloadFromNavigation( std::move(resource_request), render_process_id, render_frame_id, site_url, -@@ -1281,10 +1280,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( +@@ -1303,10 +1302,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( base::MakeRefCounted( rfh, params->url()); } else if (rfh && params->url().SchemeIsFileSystem()) { @@ -237,9 +262,9 @@ index 5da8761a8e1b..f573f9f49434 100644 std::string storage_domain; auto* site_instance = rfh->GetSiteInstance(); if (site_instance) { -@@ -1299,10 +1296,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( - params->url(), rfh, /*is_navigation=*/false, - storage_partition->GetFileSystemContext(), storage_domain); +@@ -1350,10 +1347,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( + std::move(wrapper_factory)); + } } else { - StoragePartitionImpl* storage_partition = - static_cast( @@ -251,19 +276,10 @@ index 5da8761a8e1b..f573f9f49434 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 81809b25675d..fe4b21a71091 100644 +index 161ab06fa1dd..f76c1a63362e 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -387,7 +387,7 @@ class AboutURLLoaderFactory : public network::mojom::URLLoaderFactory { - std::unique_ptr - CreateNetworkFactoryInfoWithHeaderClient( - network::mojom::TrustedURLLoaderHeaderClientPtrInfo header_client, -- StoragePartitionImpl* partition) { -+ StoragePartition* partition) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - network::mojom::URLLoaderFactoryPtrInfo factory_info; - network::mojom::URLLoaderFactoryParamsPtr params = -@@ -1267,7 +1267,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController +@@ -1141,7 +1141,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_, @@ -272,7 +288,7 @@ index 81809b25675d..fe4b21a71091 100644 false /* allow_wildcard */, &stale, &plugin, nullptr); if (stale) { -@@ -1616,7 +1616,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( +@@ -1505,7 +1505,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( CreateResourceRequest(request_info.get(), frame_tree_node_id, IsNavigationDownloadAllowed(download_policy_)); @@ -281,6 +297,28 @@ index 81809b25675d..fe4b21a71091 100644 scoped_refptr signed_exchange_prefetch_metric_recorder = partition->GetPrefetchURLLoaderService() +@@ -1753,7 +1753,7 @@ void NavigationURLLoaderImpl::SetURLLoaderFactoryInterceptorForTesting( + void NavigationURLLoaderImpl::CreateURLLoaderFactoryWithHeaderClient( + network::mojom::TrustedURLLoaderHeaderClientPtrInfo header_client, + network::mojom::URLLoaderFactoryRequest factory_request, +- StoragePartitionImpl* partition) { ++ StoragePartition* partition) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + network::mojom::URLLoaderFactoryParamsPtr params = + network::mojom::URLLoaderFactoryParams::New(); +diff --git content/browser/loader/navigation_url_loader_impl.h content/browser/loader/navigation_url_loader_impl.h +index b99335361248..72a281c12fc3 100644 +--- content/browser/loader/navigation_url_loader_impl.h ++++ content/browser/loader/navigation_url_loader_impl.h +@@ -97,7 +97,7 @@ class CONTENT_EXPORT NavigationURLLoaderImpl : public NavigationURLLoader { + static void CreateURLLoaderFactoryWithHeaderClient( + network::mojom::TrustedURLLoaderHeaderClientPtrInfo header_client, + network::mojom::URLLoaderFactoryRequest factory_request, +- StoragePartitionImpl* partition); ++ StoragePartition* partition); + + // Returns a Request ID for browser-initiated navigation requests. Called on + // the IO thread. diff --git content/browser/payments/payment_app_installer.cc content/browser/payments/payment_app_installer.cc index c2ee504cd0c7..422dc641d0a0 100644 --- content/browser/payments/payment_app_installer.cc @@ -328,7 +366,7 @@ index 9d3bee713440..38cc82d730a5 100644 partition->GetPaymentAppContext(); diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc -index b33f30b3ec0d..9b78bdcd55b0 100644 +index 221dc8424f85..840a5533db90 100644 --- content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc @@ -700,11 +700,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, @@ -376,14 +414,16 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 bool is_for_guests_only) : fast_shutdown_started_(false), deleting_soon_(false), -@@ -1503,10 +1502,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( - permission_service_context_(new PermissionServiceContext(this)), - indexed_db_factory_(new IndexedDBDispatcherHost( - id_, -- storage_partition_impl_->GetIndexedDBContext(), -+ static_cast( +@@ -1504,12 +1503,14 @@ RenderProcessHostImpl::RenderProcessHostImpl( + indexed_db_factory_( + new IndexedDBDispatcherHost( + id_, +- storage_partition_impl_->GetIndexedDBContext(), ++ static_cast( + storage_partition_impl_->GetIndexedDBContext()), - ChromeBlobStorageContext::GetFor(browser_context_))), + ChromeBlobStorageContext::GetFor(browser_context_)), + base::OnTaskRunnerDeleter( + storage_partition_impl_->GetIndexedDBContext()->TaskRunner())), service_worker_dispatcher_host_(new ServiceWorkerDispatcherHost( - storage_partition_impl_->GetServiceWorkerContext(), + static_cast( @@ -391,7 +431,7 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 id_)), channel_connected_(false), sent_render_process_ready_(false), -@@ -1539,7 +1540,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1542,7 +1543,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( } push_messaging_manager_.reset(new PushMessagingManager( @@ -401,7 +441,7 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 AddObserver(indexed_db_factory_.get()); AddObserver(service_worker_dispatcher_host_.get()); -@@ -1865,6 +1867,15 @@ void RenderProcessHostImpl::ResetChannelProxy() { +@@ -1868,6 +1870,15 @@ void RenderProcessHostImpl::ResetChannelProxy() { void RenderProcessHostImpl::CreateMessageFilters() { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -417,7 +457,7 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 MediaInternals* media_internals = MediaInternals::GetInstance(); // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages // from guests. -@@ -1904,10 +1915,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1907,10 +1918,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { media_request_context)); resource_message_filter_ = new ResourceMessageFilter( @@ -430,7 +470,7 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 storage_partition_impl_->GetPrefetchURLLoaderService(), browser_context->GetSharedCorsOriginAccessList(), std::move(get_contexts_callback), -@@ -1916,8 +1927,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1919,8 +1930,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter(resource_message_filter_.get()); } @@ -440,7 +480,7 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); AddFilter(peer_connection_tracker_host_.get()); -@@ -1934,10 +1944,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1937,10 +1947,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter(new TraceMessageFilter(GetID())); AddFilter(new ResolveProxyMsgHelper(GetID())); @@ -451,7 +491,7 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 } void RenderProcessHostImpl::BindCacheStorage( -@@ -1949,7 +1955,8 @@ void RenderProcessHostImpl::BindCacheStorage( +@@ -1952,7 +1958,8 @@ void RenderProcessHostImpl::BindCacheStorage( cache_storage_dispatcher_host_ = base::MakeRefCounted(); cache_storage_dispatcher_host_->Init( @@ -461,7 +501,17 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 } // Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO // thread entirely. -@@ -2153,7 +2160,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2068,7 +2075,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { + base::BindRepeating( + &BackgroundSyncContextImpl::CreateService, + base::Unretained( +- storage_partition_impl_->GetBackgroundSyncContext()))); ++ static_cast( ++ storage_partition_impl_->GetBackgroundSyncContext())))); + AddUIThreadInterface( + registry.get(), + base::BindRepeating(&RenderProcessHostImpl::CreateStoragePartitionService, +@@ -2164,7 +2172,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { registry->AddInterface(base::BindRepeating( &CodeCacheHostImpl::Create, GetID(), @@ -471,7 +521,7 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 base::RetainedRef( storage_partition_impl_->GetGeneratedCodeCacheContext()))); -@@ -2165,7 +2173,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2176,7 +2185,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { registry->AddInterface(base::BindRepeating( &ChromeAppCacheService::CreateBackend, @@ -481,7 +531,7 @@ index b33f30b3ec0d..9b78bdcd55b0 100644 GetID())); AddUIThreadInterface( -@@ -2211,6 +2220,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2222,6 +2232,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { plugin_registry_.reset( new PluginRegistryImpl(GetBrowserContext()->GetResourceContext())); } @@ -492,7 +542,7 @@ index b33f30b3ec0d..9b78bdcd55b0 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 d5d82b53dd5e..080011133034 100644 +index a746e1dae051..59e4316ab2ae 100644 --- content/browser/renderer_host/render_process_host_impl.h +++ content/browser/renderer_host/render_process_host_impl.h @@ -101,7 +101,6 @@ class ServiceWorkerDispatcherHost; @@ -512,7 +562,7 @@ index d5d82b53dd5e..080011133034 100644 SiteInstance* site_instance, bool is_for_guests_only); -@@ -516,7 +515,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -518,7 +517,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Use CreateRenderProcessHost() instead of calling this constructor // directly. RenderProcessHostImpl(BrowserContext* browser_context, @@ -521,7 +571,7 @@ index d5d82b53dd5e..080011133034 100644 bool is_for_guests_only); // Initializes a new IPC::ChannelProxy in |channel_|, which will be connected -@@ -782,10 +781,10 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -787,10 +786,10 @@ class CONTENT_EXPORT RenderProcessHostImpl // The globally-unique identifier for this RPH. const int id_; @@ -586,10 +636,10 @@ index 8e4df0b15aeb..02bcdca69af9 100644 ->CreateService(std::move(request), origin); })); diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h -index afc09164afd8..8b6e2cacc9d2 100644 +index 84aa3aa2091f..86a3e1ff3206 100644 --- content/browser/storage_partition_impl.h +++ content/browser/storage_partition_impl.h -@@ -98,8 +98,8 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -99,8 +99,8 @@ class CONTENT_EXPORT StoragePartitionImpl storage::FileSystemContext* GetFileSystemContext() override; storage::DatabaseTracker* GetDatabaseTracker() override; DOMStorageContextWrapper* GetDOMStorageContext() override; @@ -600,12 +650,11 @@ index afc09164afd8..8b6e2cacc9d2 100644 IndexedDBContextImpl* GetIndexedDBContext() override; CacheStorageContextImpl* GetCacheStorageContext() override; ServiceWorkerContextWrapper* GetServiceWorkerContext() override; -@@ -144,15 +144,16 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -145,14 +145,15 @@ class CONTENT_EXPORT StoragePartitionImpl void FlushNetworkInterfaceForTesting() override; void WaitForDeletionTasksForTesting() override; - BackgroundFetchContext* GetBackgroundFetchContext(); -- BackgroundSyncContext* GetBackgroundSyncContext(); - PaymentAppContextImpl* GetPaymentAppContext(); - BroadcastChannelProvider* GetBroadcastChannelProvider(); - BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap(); @@ -614,7 +663,6 @@ index afc09164afd8..8b6e2cacc9d2 100644 - CookieStoreContext* GetCookieStoreContext(); - DevToolsBackgroundServicesContext* GetDevToolsBackgroundServicesContext(); + BackgroundFetchContext* GetBackgroundFetchContext() override; -+ BackgroundSyncContext* GetBackgroundSyncContext() override; + PaymentAppContextImpl* GetPaymentAppContext() override; + BroadcastChannelProvider* GetBroadcastChannelProvider() override; + BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap() override; @@ -626,7 +674,7 @@ index afc09164afd8..8b6e2cacc9d2 100644 // blink::mojom::StoragePartitionService interface. void OpenLocalStorage(const url::Origin& origin, -@@ -170,21 +171,22 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -169,21 +170,22 @@ class CONTENT_EXPORT StoragePartitionImpl const GURL& origin, OnCanSendDomainReliabilityUploadCallback callback) override; @@ -654,7 +702,7 @@ index afc09164afd8..8b6e2cacc9d2 100644 auto& bindings_for_testing() { return bindings_; } -@@ -195,10 +197,11 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -194,10 +196,11 @@ class CONTENT_EXPORT StoragePartitionImpl // one must use the "chrome-guest://blahblah" site URL to ensure that the // service worker stays in this StoragePartition. This is an empty GURL if // this StoragePartition is not for guests. @@ -729,11 +777,11 @@ index 63fe0125ca1c..698378600723 100644 RenderFrameHost* render_frame_host_; diff --git content/browser/worker_host/dedicated_worker_host.cc content/browser/worker_host/dedicated_worker_host.cc -index d0eae9ed2150..edf0c88464d8 100644 +index d55172625502..22abdeec0c94 100644 --- content/browser/worker_host/dedicated_worker_host.cc +++ content/browser/worker_host/dedicated_worker_host.cc -@@ -77,8 +77,7 @@ class DedicatedWorkerHost : public service_manager::mojom::InterfaceProvider { - client->OnScriptLoadFailed(); +@@ -76,8 +76,7 @@ class DedicatedWorkerHost : public service_manager::mojom::InterfaceProvider { + client->OnScriptLoadStartFailed(); return; } - auto* storage_partition_impl = static_cast( @@ -741,8 +789,8 @@ index d0eae9ed2150..edf0c88464d8 100644 + auto* storage_partition_impl = render_process_host->GetStoragePartition(); scoped_refptr blob_url_loader_factory; - if (blob_url_token) { -@@ -93,11 +92,13 @@ class DedicatedWorkerHost : public service_manager::mojom::InterfaceProvider { + if (script_url.SchemeIsBlob()) { +@@ -95,11 +94,13 @@ class DedicatedWorkerHost : public service_manager::mojom::InterfaceProvider { } appcache_handle_ = std::make_unique( @@ -757,17 +805,7 @@ index d0eae9ed2150..edf0c88464d8 100644 + storage_partition_impl->GetServiceWorkerContext()), appcache_handle_->core(), std::move(blob_url_loader_factory), storage_partition_impl, - base::BindOnce(&DedicatedWorkerHost::DidLoadDedicatedWorker, -@@ -141,8 +142,7 @@ class DedicatedWorkerHost : public service_manager::mojom::InterfaceProvider { - client->OnScriptLoadFailed(); - return; - } -- auto* storage_partition_impl = static_cast( -- render_process_host->GetStoragePartition()); -+ auto* storage_partition_impl = render_process_host->GetStoragePartition(); - - // Set up the default network loader factory. - network::mojom::URLLoaderFactoryPtrInfo default_factory_info; + base::BindOnce(&DedicatedWorkerHost::DidStartScriptLoad, diff --git content/browser/worker_host/shared_worker_connector_impl.cc content/browser/worker_host/shared_worker_connector_impl.cc index 4b410f1384b0..299e9402b93d 100644 --- content/browser/worker_host/shared_worker_connector_impl.cc @@ -784,7 +822,7 @@ index 4b410f1384b0..299e9402b93d 100644 std::move(client), creation_context_type, blink::MessagePortChannel(std::move(message_port)), diff --git content/browser/worker_host/worker_script_fetch_initiator.cc content/browser/worker_host/worker_script_fetch_initiator.cc -index a8f396c70a7b..ba94144b93e0 100644 +index 81453c24a3a0..ded1058db7e7 100644 --- content/browser/worker_host/worker_script_fetch_initiator.cc +++ content/browser/worker_host/worker_script_fetch_initiator.cc @@ -11,11 +11,11 @@ @@ -800,22 +838,15 @@ index a8f396c70a7b..ba94144b93e0 100644 #include "content/browser/url_loader_factory_getter.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/browser/worker_host/worker_script_fetcher.h" -@@ -23,12 +23,14 @@ - #include "content/browser/worker_host/worker_script_loader_factory.h" - #include "content/common/content_constants_internal.h" - #include "content/common/navigation_subresource_loader_params.h" -+#include "content/public/browser/browser_context.h" - #include "content/public/browser/browser_task_traits.h" - #include "content/public/browser/browser_thread.h" - #include "content/public/browser/content_browser_client.h" - #include "content/public/browser/render_frame_host.h" +@@ -31,6 +31,7 @@ #include "content/public/browser/render_process_host.h" + #include "content/public/browser/resource_context.h" #include "content/public/browser/shared_cors_origin_access_list.h" +#include "content/public/browser/storage_partition.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" #include "content/public/common/origin_util.h" -@@ -53,7 +55,7 @@ void WorkerScriptFetchInitiator::Start( +@@ -54,7 +55,7 @@ void WorkerScriptFetchInitiator::Start( scoped_refptr service_worker_context, AppCacheNavigationHandleCore* appcache_handle_core, scoped_refptr blob_url_loader_factory, @@ -823,17 +854,17 @@ index a8f396c70a7b..ba94144b93e0 100644 + StoragePartition* storage_partition, CompletionCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - DCHECK(blink::ServiceWorkerUtils::IsServicificationEnabled()); -@@ -99,7 +101,7 @@ void WorkerScriptFetchInitiator::Start( + DCHECK(storage_partition); +@@ -113,7 +114,7 @@ void WorkerScriptFetchInitiator::Start( base::BindOnce( &WorkerScriptFetchInitiator::CreateScriptLoaderOnIO, process_id, std::move(resource_request), - storage_partition->url_loader_factory_getter(), + base::WrapRefCounted(storage_partition->url_loader_factory_getter()), std::move(factory_bundle_for_browser), - std::move(subresource_loader_factories), + std::move(subresource_loader_factories), resource_context, std::move(service_worker_context), appcache_handle_core, -@@ -110,7 +112,7 @@ void WorkerScriptFetchInitiator::Start( +@@ -124,7 +125,7 @@ void WorkerScriptFetchInitiator::Start( std::unique_ptr WorkerScriptFetchInitiator::CreateFactoryBundle( int process_id, @@ -841,21 +872,21 @@ index a8f396c70a7b..ba94144b93e0 100644 + StoragePartition* storage_partition, bool file_support) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - DCHECK(blink::ServiceWorkerUtils::IsServicificationEnabled()); + diff --git content/browser/worker_host/worker_script_fetch_initiator.h content/browser/worker_host/worker_script_fetch_initiator.h -index 8bf63d954554..47a03e2d3364 100644 +index d334e29ed59b..62e3101ac0ce 100644 --- content/browser/worker_host/worker_script_fetch_initiator.h +++ content/browser/worker_host/worker_script_fetch_initiator.h -@@ -32,7 +32,7 @@ namespace content { - class AppCacheNavigationHandleCore; - class BrowserContext; +@@ -35,7 +35,7 @@ class BrowserContext; + class ResourceContext; class ServiceWorkerContextWrapper; + class ServiceWorkerObjectHost; -class StoragePartitionImpl; +class StoragePartition; class URLLoaderFactoryGetter; struct SubresourceLoaderParams; -@@ -59,14 +59,14 @@ class WorkerScriptFetchInitiator { +@@ -63,14 +63,14 @@ class WorkerScriptFetchInitiator { scoped_refptr service_worker_context, AppCacheNavigationHandleCore* appcache_handle_core, scoped_refptr blob_url_loader_factory, @@ -900,7 +931,7 @@ index 0a6913f2ca56..31bda5a84c31 100644 const std::string unique_id_; bool was_notify_will_be_destroyed_called_ = false; diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h -index 911c9e347c33..6f97bbd947a9 100644 +index f3bf35ed1ff7..8059c07a44f2 100644 --- content/public/browser/storage_partition.h +++ content/public/browser/storage_partition.h @@ -14,8 +14,10 @@ @@ -914,12 +945,11 @@ index 911c9e347c33..6f97bbd947a9 100644 class GURL; -@@ -59,12 +61,30 @@ class PlatformNotificationContext; +@@ -60,12 +62,29 @@ class PlatformNotificationContext; class ServiceWorkerContext; class SharedWorkerService; +class BackgroundFetchContext; -+class BackgroundSyncContext; +class BlobRegistryWrapper; +class BlobURLLoaderFactory; +class BluetoothAllowedDevicesMap; @@ -945,7 +975,7 @@ index 911c9e347c33..6f97bbd947a9 100644 // Defines what persistent state a child process can access. // // The StoragePartition defines the view each child process has of the -@@ -104,6 +124,8 @@ class CONTENT_EXPORT StoragePartition { +@@ -106,6 +125,8 @@ class CONTENT_EXPORT StoragePartition { virtual storage::FileSystemContext* GetFileSystemContext() = 0; virtual storage::DatabaseTracker* GetDatabaseTracker() = 0; virtual DOMStorageContext* GetDOMStorageContext() = 0; @@ -954,12 +984,11 @@ index 911c9e347c33..6f97bbd947a9 100644 virtual IndexedDBContext* GetIndexedDBContext() = 0; virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; virtual SharedWorkerService* GetSharedWorkerService() = 0; -@@ -239,6 +261,30 @@ class CONTENT_EXPORT StoragePartition { +@@ -241,6 +262,29 @@ class CONTENT_EXPORT StoragePartition { // Wait until all deletions tasks are finished. For test use only. virtual void WaitForDeletionTasksForTesting() = 0; + virtual BackgroundFetchContext* GetBackgroundFetchContext() = 0; -+ virtual BackgroundSyncContext* GetBackgroundSyncContext() = 0; + virtual PaymentAppContextImpl* GetPaymentAppContext() = 0; + virtual BroadcastChannelProvider* GetBroadcastChannelProvider() = 0; + virtual BluetoothAllowedDevicesMap* GetBluetoothAllowedDevicesMap() = 0; diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 9392c951d..51aac3003 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,5 +1,5 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index 72adf46bf133..1af3dfddb795 100644 +index ac68abb4ab2a..310f36e807c3 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -47,6 +47,8 @@ diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index 7c06ecabe..26140aa79 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -102,7 +102,7 @@ index 18e57f9823d0..4ec5cb20dabb 100644 }; diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h -index b137d7ff80e3..d6aefad0affb 100644 +index 4e20d534c103..096015a4038b 100644 --- ui/views/animation/ink_drop_host_view.h +++ ui/views/animation/ink_drop_host_view.h @@ -119,6 +119,8 @@ class VIEWS_EXPORT InkDropHostView : public View { @@ -115,7 +115,7 @@ index b137d7ff80e3..d6aefad0affb 100644 // Size used for the default SquareInkDropRipple. static constexpr int kDefaultInkDropSize = 24; diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index 79b6dca32725..9dbb179ee3a4 100644 +index ae8d430460a2..fcf82329ac10 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc @@ -185,6 +185,7 @@ gfx::Size LabelButton::CalculatePreferredSize() const { @@ -140,7 +140,7 @@ index 79b6dca32725..9dbb179ee3a4 100644 const gfx::Size previous_image_size(image_->GetPreferredSize()); UpdateImage(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index 01dfb90dca0a..048da0d3b631 100644 +index 46f81be3d27a..249edf8cc5f8 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h @@ -100,6 +100,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { @@ -240,10 +240,10 @@ index 771034ccebbe..79e3026f6870 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index 2164c847f795..5083a47ebc4b 100644 +index 8a302b528875..8125b5af96c5 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -2575,8 +2575,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( +@@ -2618,8 +2618,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -258,7 +258,7 @@ index 2164c847f795..5083a47ebc4b 100644 MenuItemView* to_select = NULL; if (item->GetSubmenu()->GetMenuItemCount() > 0) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2595,8 +2600,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2638,8 +2643,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -310,10 +310,10 @@ index 921aef245bf3..4b7474c01c0e 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 9e1b05f914c2..d071aa7ab9c5 100644 +index e609b8521842..73971df2a441 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1055,6 +1055,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1063,6 +1063,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, spilling_rect.set_y(spilling_rect.y() - corner_radius_); spilling_rect.set_height(spilling_rect.height() + corner_radius_); canvas->DrawRoundRect(spilling_rect, corner_radius_, flags); @@ -329,7 +329,7 @@ index 9e1b05f914c2..d071aa7ab9c5 100644 } else if (render_selection) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == ACTIONABLE_SUBMENU) { -@@ -1121,6 +1130,13 @@ void MenuItemView::PaintMinorIconAndText( +@@ -1129,6 +1138,13 @@ void MenuItemView::PaintMinorIconAndText( } SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const { @@ -482,7 +482,7 @@ index 0180b30d383a..c0724b6b80a7 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 4c10e9872aa7..0adbfab904b1 100644 +index b0f106e272a6..c89b37be9b63 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 bcbe66b6c..5f77dec36 100644 --- a/patch/patches/views_widget_180_1481_1565_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1565_1677_1749.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index 68d55c2f9e2d..6965fc87237a 100644 +index 2672a26d934d..d911db336c0f 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc @@ -571,6 +571,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { @@ -18,7 +18,7 @@ index 68d55c2f9e2d..6965fc87237a 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 148c980a6f60..fc88fd4bebe0 100644 +index 8cdb72afa1bc..ab32e9e06b8c 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h @@ -84,6 +84,7 @@ class CursorManager; @@ -48,7 +48,7 @@ index 148c980a6f60..fc88fd4bebe0 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; -@@ -477,6 +483,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -474,6 +480,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 148c980a6f60..fc88fd4bebe0 100644 // Sets the cursor for this view to the one associated with the specified // cursor_type. virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -678,6 +690,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -675,6 +687,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase bool is_currently_scrolling_viewport_ = false; @@ -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 3072635b1d3f..8f95501e27e1 100644 +index 383a23422e76..cf788070202d 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -90,6 +90,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin( @@ -194,7 +194,7 @@ index 57fdabdb047a..db7c6b027452 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 42c4658fe75f..17e47e1b61ba 100644 +index 6f9892830001..1369d7e367ea 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc @@ -146,6 +146,7 @@ DesktopWindowTreeHostX11::DesktopWindowTreeHostX11( @@ -335,7 +335,7 @@ index c547609abf03..5092e2a38b67 100644 base::WeakPtrFactory weak_factory_; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 04a14bf90d58..db1f16c72f37 100644 +index c6c267383674..c66481e65a72 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc @@ -138,6 +138,7 @@ Widget::InitParams::InitParams(Type type) @@ -369,7 +369,7 @@ index 04a14bf90d58..db1f16c72f37 100644 } // This must come after SetContentsView() or it might not be able to find // the correct NativeTheme (on Linux). See http://crbug.com/384492 -@@ -1135,10 +1141,16 @@ void Widget::OnNativeWidgetDestroyed() { +@@ -1150,10 +1156,16 @@ void Widget::OnNativeWidgetDestroyed() { } gfx::Size Widget::GetMinimumSize() const { @@ -387,7 +387,7 @@ index 04a14bf90d58..db1f16c72f37 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index bb13f4e9ff1a..c8535665cea7 100644 +index d04ca53ec52e..f47caf483a7e 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h @@ -255,6 +255,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -427,7 +427,7 @@ index 5bcb8d8b9bae..020fa85573aa 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 a71728f78327..aff700c1ace0 100644 +index 3703f163d237..83db8b82f960 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc @@ -2916,10 +2916,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index a8675dab6..abd3782d9 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 11ee9803f85e..f4178215d5ec 100644 +index 9ad76884fa8c..d04f8c633384 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -2041,21 +2041,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2068,21 +2068,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 11ee9803f85e..f4178215d5ec 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -2746,6 +2755,15 @@ void WebContentsImpl::CreateNewWindow( +@@ -2781,6 +2790,15 @@ void WebContentsImpl::CreateNewWindow( create_params.renderer_initiated_creation = main_frame_route_id != MSG_ROUTING_NONE; @@ -61,7 +61,7 @@ index 11ee9803f85e..f4178215d5ec 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -2778,7 +2796,7 @@ void WebContentsImpl::CreateNewWindow( +@@ -2813,7 +2831,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 11ee9803f85e..f4178215d5ec 100644 } // Save the created window associated with the route so we can show it // later. -@@ -6320,7 +6338,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { +@@ -6377,7 +6395,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( RenderViewHost* render_view_host) { RenderWidgetHostViewBase* rwh_view = @@ -95,7 +95,7 @@ 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 87031ac3aaaa..8bd3fc212283 100644 +index 2fe0a25aed9f..6012449ffaee 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h @@ -75,9 +75,11 @@ class BrowserPluginGuestDelegate; @@ -122,7 +122,7 @@ index 87031ac3aaaa..8bd3fc212283 100644 // the value that'll be returned by GetLastActiveTime(). If this is left // default initialized then the value is not passed on to the WebContents diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index 5a0ec94ade36..86b12ad25b0d 100644 +index cb139112070d..aeabc47cf5f4 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -56,10 +56,12 @@ class FileSelectListener; @@ -138,7 +138,7 @@ index 5a0ec94ade36..86b12ad25b0d 100644 struct ContextMenuParams; struct DropData; struct NativeWebKeyboardEvent; -@@ -320,6 +322,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -321,6 +323,14 @@ class CONTENT_EXPORT WebContentsDelegate { const std::string& partition_id, SessionStorageNamespace* session_storage_namespace); diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index f2dec566c..420638892 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 55bd97c5ddae..5d69388be783 100644 +index e89fff83c1c7..d6162de6986f 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -732,6 +732,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -724,6 +724,11 @@ class BLINK_PLATFORM_EXPORT Platform { // runs during Chromium's build step). virtual bool IsTakingV8ContextSnapshot() { return false; } @@ -26,7 +26,7 @@ index 55bd97c5ddae..5d69388be783 100644 static void InitializeCommon(Platform* platform, std::unique_ptr main_thread); diff --git third_party/blink/renderer/core/dom/dom_implementation.cc third_party/blink/renderer/core/dom/dom_implementation.cc -index 31d7915a56b1..3867128de143 100644 +index eff68a91b185..e2487f1aa0dc 100644 --- third_party/blink/renderer/core/dom/dom_implementation.cc +++ third_party/blink/renderer/core/dom/dom_implementation.cc @@ -243,10 +243,11 @@ Document* DOMImplementation::createDocument(const String& type, @@ -44,10 +44,10 @@ index 31d7915a56b1..3867128de143 100644 .Top() .GetSecurityContext() diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc -index daf6c8f000dd..ca2ac98edf8a 100644 +index c6cc53beb1d4..469869b0ff60 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc -@@ -1322,7 +1322,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { +@@ -1359,7 +1359,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -57,7 +57,7 @@ index daf6c8f000dd..ca2ac98edf8a 100644 } diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc -index 3eb429271b95..3ebd2ac75f4d 100644 +index 13d28689750a..b7c710c747c3 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc @@ -4,6 +4,7 @@ @@ -68,7 +68,7 @@ index 3eb429271b95..3ebd2ac75f4d 100644 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/use_counter.h" -@@ -146,6 +147,7 @@ DevToolsSession::DevToolsSession( +@@ -152,6 +153,7 @@ DevToolsSession::DevToolsSession( for (wtf_size_t i = 0; i < agents_.size(); i++) agents_[i]->Restore(); } @@ -76,7 +76,7 @@ index 3eb429271b95..3ebd2ac75f4d 100644 } DevToolsSession::~DevToolsSession() { -@@ -184,6 +186,7 @@ void DevToolsSession::Detach() { +@@ -190,6 +192,7 @@ void DevToolsSession::Detach() { agents_.clear(); v8_session_.reset(); agent_->client_->DebuggerTaskFinished(); @@ -85,10 +85,10 @@ index 3eb429271b95..3ebd2ac75f4d 100644 void DevToolsSession::FlushProtocolNotifications() { diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc -index b1533fe6db9a..6c006296ef9e 100644 +index 6c65ef4322bb..d536609c8d09 100644 --- third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc -@@ -171,7 +171,8 @@ Page::Page(PageClients& page_clients) +@@ -173,7 +173,8 @@ Page::Page(PageClients& page_clients) overscroll_controller_( OverscrollController::Create(GetVisualViewport(), GetChromeClient())), link_highlights_(LinkHighlights::Create(*this)), @@ -98,7 +98,7 @@ index b1533fe6db9a..6c006296ef9e 100644 // TODO(pdr): Initialize |validation_message_client_| lazily. validation_message_client_(ValidationMessageClientImpl::Create(*this)), opened_by_dom_(false), -@@ -326,21 +327,40 @@ void Page::InitialStyleChanged() { +@@ -329,21 +330,40 @@ void Page::InitialStyleChanged() { } } @@ -148,7 +148,7 @@ index b1533fe6db9a..6c006296ef9e 100644 page->NotifyPluginsChanged(); } } -@@ -745,7 +765,8 @@ void Page::Trace(blink::Visitor* visitor) { +@@ -769,7 +789,8 @@ void Page::Trace(blink::Visitor* visitor) { visitor->Trace(link_highlights_); visitor->Trace(spatial_navigation_controller_); visitor->Trace(main_frame_); @@ -182,10 +182,10 @@ index 38e73455007f..cae4a0c51d55 100644 Member validation_message_client_; -diff --git third_party/blink/renderer/platform/plugins/plugin_data.cc third_party/blink/renderer/platform/plugins/plugin_data.cc -index 29721cbbc167..bfb0086206a4 100644 ---- third_party/blink/renderer/platform/plugins/plugin_data.cc -+++ third_party/blink/renderer/platform/plugins/plugin_data.cc +diff --git third_party/blink/renderer/core/page/plugin_data.cc third_party/blink/renderer/core/page/plugin_data.cc +index 072f97a6f7d7..4c691ceeb068 100644 +--- third_party/blink/renderer/core/page/plugin_data.cc ++++ third_party/blink/renderer/core/page/plugin_data.cc @@ -88,10 +88,12 @@ void PluginData::RefreshBrowserSidePluginCache() { Platform::Current()->GetInterfaceProvider()->GetInterface( mojo::MakeRequest(®istry)); @@ -210,11 +210,11 @@ index 29721cbbc167..bfb0086206a4 100644 for (const auto& plugin : plugins) { auto* plugin_info = MakeGarbageCollected( plugin->name, FilePathToWebString(plugin->filename), -diff --git third_party/blink/renderer/platform/plugins/plugin_data.h third_party/blink/renderer/platform/plugins/plugin_data.h -index bb48e3956f52..18fc136fd971 100644 ---- third_party/blink/renderer/platform/plugins/plugin_data.h -+++ third_party/blink/renderer/platform/plugins/plugin_data.h -@@ -103,7 +103,8 @@ class PLATFORM_EXPORT PluginData final +diff --git third_party/blink/renderer/core/page/plugin_data.h third_party/blink/renderer/core/page/plugin_data.h +index c25e74204efd..21ca09179da6 100644 +--- third_party/blink/renderer/core/page/plugin_data.h ++++ third_party/blink/renderer/core/page/plugin_data.h +@@ -101,7 +101,8 @@ class CORE_EXPORT PluginData final const HeapVector>& Plugins() const { return plugins_; } const HeapVector>& Mimes() const { return mimes_; } const SecurityOrigin* Origin() const { return main_frame_origin_.get(); } diff --git a/patch/patches/webkit_pointer_event_781966.patch b/patch/patches/webkit_pointer_event_781966.patch index a4c5f9f83..8b7b33ede 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 0d527c28e043..0175257c0c3c 100644 +index 21f30c6fb608..746d75d2b145 100644 --- third_party/blink/renderer/core/input/pointer_event_manager.cc +++ third_party/blink/renderer/core/input/pointer_event_manager.cc -@@ -282,7 +282,7 @@ void PointerEventManager::HandlePointerInterruption( +@@ -284,7 +284,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 22e76e446..ea9c75ac8 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h -index 79f633d3c8d0..b8ee1de999d5 100644 +index 61ea5ce43940..776eb720aaae 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -344,6 +344,7 @@ class WebView { +@@ -358,6 +358,7 @@ class WebView { // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void SetUseExternalPopupMenus(bool); @@ -11,10 +11,10 @@ index 79f633d3c8d0..b8ee1de999d5 100644 // Cancels and hides the current popup (datetime, select...) if any. virtual void CancelPagePopup() = 0; diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index 86caa260d408..c0791f605d0d 100644 +index 8dd8d5e381cf..6b8d2d3c2e19 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -236,8 +236,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; } @@ -30,7 +30,7 @@ index 86caa260d408..c0791f605d0d 100644 } namespace { -@@ -299,6 +304,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, +@@ -297,6 +302,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, chrome_client_(ChromeClientImpl::Create(this)), minimum_zoom_level_(ZoomFactorToZoomLevel(kMinTextSizeMultiplier)), maximum_zoom_level_(ZoomFactorToZoomLevel(kMaxTextSizeMultiplier)), @@ -39,7 +39,7 @@ index 86caa260d408..c0791f605d0d 100644 fullscreen_controller_(FullscreenController::Create(this)) { if (!AsView().client) { diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index 60d70f5bebd0..a4b78f823f49 100644 +index 52b62bace7a8..3d962d2880c3 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h @@ -106,7 +106,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -51,8 +51,8 @@ index 60d70f5bebd0..a4b78f823f49 100644 + bool UseExternalPopupMenus() const; // WebView methods: - void SetWebWidgetClient(WebWidgetClient*) override; -@@ -613,6 +614,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, + void DidAttachLocalMainFrame(WebWidgetClient*) override; +@@ -614,6 +615,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_ = 0.f; bool fake_page_scale_animation_use_anchor_ = false; @@ -62,7 +62,7 @@ index 60d70f5bebd0..a4b78f823f49 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 99da78636e16..55296b806d54 100644 +index cb0aa3034bad..88cdd25b427b 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc @@ -801,7 +801,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index c6f486b3d..c895135e9 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -index 6a943ceb13bc..44db1b8a2371 100644 +index 8f60e60d6ad3..ff85f58185f2 100644 --- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc @@ -19,6 +19,7 @@ @@ -20,7 +20,7 @@ index 6a943ceb13bc..44db1b8a2371 100644 + // We are only interested in sync logs for the primary user profile. Profile* profile = ProfileManager::GetPrimaryUserProfile(); - if (!profile || !ProfileSyncServiceFactory::HasProfileSyncService(profile)) + if (!profile || !ProfileSyncServiceFactory::HasSyncService(profile)) @@ -309,6 +314,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( if (!profile) return; diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index 38cc035d4..bc0a836ee 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 d31b79b758ae..c1cb0d7e75eb 100644 +index ef5304602534..f2921f6f9da7 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -4581,7 +4581,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -4589,7 +4589,7 @@ Keep your key file in a safe place. You will need it to create new versions of y diff --git a/tests/cefclient/browser/osr_accessibility_helper.h b/tests/cefclient/browser/osr_accessibility_helper.h index f4ea50d25..1555a08ea 100644 --- a/tests/cefclient/browser/osr_accessibility_helper.h +++ b/tests/cefclient/browser/osr_accessibility_helper.h @@ -31,7 +31,7 @@ class OsrAccessibilityHelper { return browser_->GetHost()->GetWindowHandle(); } - CefRefPtr GetBrowser() const { return browser_; }; + CefRefPtr GetBrowser() const { return browser_; } OsrAXNode* GetNode(int nodeId) const; diff --git a/tests/cefclient/browser/osr_accessibility_node.h b/tests/cefclient/browser/osr_accessibility_node.h index 3f33927d8..dedec57cb 100644 --- a/tests/cefclient/browser/osr_accessibility_node.h +++ b/tests/cefclient/browser/osr_accessibility_node.h @@ -56,7 +56,7 @@ class OsrAXNode { OsrAccessibilityHelper* GetAccessibilityHelper() const { return accessibility_helper_; - }; + } int GetChildCount() const { return static_cast(child_ids_.size()); } diff --git a/tests/cefclient/browser/osr_renderer.h b/tests/cefclient/browser/osr_renderer.h index f858d87be..f66cc24d5 100644 --- a/tests/cefclient/browser/osr_renderer.h +++ b/tests/cefclient/browser/osr_renderer.h @@ -54,7 +54,7 @@ class OsrRenderer { inline bool IsTransparent() const { return CefColorGetA(settings_.background_color) == 0; - }; + } const OsrRendererSettings settings_; bool initialized_; diff --git a/tests/ceftests/download_unittest.cc b/tests/ceftests/download_unittest.cc index 3274da4d1..5796fc0f2 100644 --- a/tests/ceftests/download_unittest.cc +++ b/tests/ceftests/download_unittest.cc @@ -490,17 +490,17 @@ class DownloadTestHandler : public TestHandler { RC_TEST_GROUP_ALL(DownloadTest, test_name, DownloadTestHandler, test_mode) // Test a programmatic download. -DOWNLOAD_TEST_GROUP(Programmatic, PROGAMMATIC); +DOWNLOAD_TEST_GROUP(Programmatic, PROGAMMATIC) // Test a clicked download. -DOWNLOAD_TEST_GROUP(Clicked, CLICKED); +DOWNLOAD_TEST_GROUP(Clicked, CLICKED) // Test a clicked download where the protocol is invalid and therefore rejected. // There will be no resulting CefDownloadHandler callbacks. -DOWNLOAD_TEST_GROUP(ClickedRejected, CLICKED_REJECTED); +DOWNLOAD_TEST_GROUP(ClickedRejected, CLICKED_REJECTED) // Test where the download completes after cross-origin navigation. -DOWNLOAD_TEST_GROUP(Navigated, NAVIGATED); +DOWNLOAD_TEST_GROUP(Navigated, NAVIGATED) // Test where the download is still pending when the browser is destroyed. -DOWNLOAD_TEST_GROUP(Pending, PENDING); +DOWNLOAD_TEST_GROUP(Pending, PENDING) diff --git a/tests/ceftests/extensions/background_unittest.cc b/tests/ceftests/extensions/background_unittest.cc index f61cac19b..86a57fe99 100644 --- a/tests/ceftests/extensions/background_unittest.cc +++ b/tests/ceftests/extensions/background_unittest.cc @@ -262,7 +262,7 @@ class BackgroundLoadUnloadTestHandler : public ExtensionTestHandler { } // namespace -EXTENSION_TEST_GROUP_ALL(BackgroundLoadUnload, BackgroundLoadUnloadTestHandler); +EXTENSION_TEST_GROUP_ALL(BackgroundLoadUnload, BackgroundLoadUnloadTestHandler) namespace { @@ -288,4 +288,4 @@ class BackgroundLoadNoUnloadTestHandler } // namespace EXTENSION_TEST_GROUP_MINIMAL_CUSTOM(BackgroundLoadNoUnload, - BackgroundLoadNoUnloadTestHandler); + BackgroundLoadNoUnloadTestHandler) diff --git a/tests/ceftests/extensions/chrome_alarms_unittest.cc b/tests/ceftests/extensions/chrome_alarms_unittest.cc index 42397a66d..57c4957d9 100644 --- a/tests/ceftests/extensions/chrome_alarms_unittest.cc +++ b/tests/ceftests/extensions/chrome_alarms_unittest.cc @@ -236,7 +236,7 @@ class CreateAlarmTestHandler : public AlarmsTestHandler { }; } // namespace -ALARMS_TEST_GROUP_ALL(CreateAlarm, CreateAlarmTestHandler); +ALARMS_TEST_GROUP_ALL(CreateAlarm, CreateAlarmTestHandler) namespace { @@ -260,7 +260,7 @@ class GetAlarmTestHandler : public AlarmsTestHandler { }; } // namespace -ALARMS_TEST_GROUP_MINIMAL(GetAlarm, GetAlarmTestHandler); +ALARMS_TEST_GROUP_MINIMAL(GetAlarm, GetAlarmTestHandler) namespace { @@ -286,7 +286,7 @@ class GetAllAlarmsTestHandler : public AlarmsTestHandler { }; } // namespace -ALARMS_TEST_GROUP_MINIMAL(GetAllAlarms, GetAllAlarmsTestHandler); +ALARMS_TEST_GROUP_MINIMAL(GetAllAlarms, GetAllAlarmsTestHandler) namespace { @@ -311,7 +311,7 @@ class ClearAlarmTestHandler : public AlarmsTestHandler { }; } // namespace -ALARMS_TEST_GROUP_MINIMAL(ClearAlarm, ClearAlarmTestHandler); +ALARMS_TEST_GROUP_MINIMAL(ClearAlarm, ClearAlarmTestHandler) namespace { @@ -337,4 +337,4 @@ class ClearAllAlarmsTestHandler : public AlarmsTestHandler { }; } // namespace -ALARMS_TEST_GROUP_MINIMAL(ClearAllAlarms, ClearAllAlarmsTestHandler); +ALARMS_TEST_GROUP_MINIMAL(ClearAllAlarms, ClearAllAlarmsTestHandler) diff --git a/tests/ceftests/extensions/chrome_storage_unittest.cc b/tests/ceftests/extensions/chrome_storage_unittest.cc index 68b5f4692..bf91c57de 100644 --- a/tests/ceftests/extensions/chrome_storage_unittest.cc +++ b/tests/ceftests/extensions/chrome_storage_unittest.cc @@ -225,7 +225,8 @@ class LocalStorageTestHandler : public StorageTestHandler { protected: std::string GetStorageApiJS() const override { - return "chrome.storage.local.set({\"local_key_1\": \"local_value_1\"}, function() {" + return "chrome.storage.local.set({\"local_key_1\": \"local_value_1\"}, " + "function() {" "chrome.storage.local.get(\"local_key_1\", function (items) {" "if(items[\"local_key_1\"] == \"local_value_1\") {" + GetMessageJS(kSuccessMessage) + @@ -239,7 +240,7 @@ class LocalStorageTestHandler : public StorageTestHandler { }; } // namespace -STORAGE_TEST_GROUP_ALL(LocalStorage, LocalStorageTestHandler); +STORAGE_TEST_GROUP_ALL(LocalStorage, LocalStorageTestHandler) namespace { @@ -253,8 +254,10 @@ class LocalStorageGetBytesInUseTestHandler : public StorageTestHandler { protected: std::string GetStorageApiJS() const override { - return "chrome.storage.local.set({\"local_key_2\": \"local_value_2\"}, function() {" - "chrome.storage.local.getBytesInUse(\"local_key_2\", function (bytesInUse) {" + return "chrome.storage.local.set({\"local_key_2\": \"local_value_2\"}, " + "function() {" + "chrome.storage.local.getBytesInUse(\"local_key_2\", function " + "(bytesInUse) {" "if (bytesInUse == 26) {" + GetMessageJS(kSuccessMessage) + "}});" @@ -268,7 +271,7 @@ class LocalStorageGetBytesInUseTestHandler : public StorageTestHandler { } // namespace STORAGE_TEST_GROUP_MINIMAL(LocalStorageGetBytesInUse, - LocalStorageGetBytesInUseTestHandler); + LocalStorageGetBytesInUseTestHandler) namespace { @@ -282,7 +285,8 @@ class LocalStorageRemoveTestHandler : public StorageTestHandler { protected: std::string GetStorageApiJS() const override { - return "chrome.storage.local.set({\"local_key_3\": \"local_value_3\"}, function() {" + return "chrome.storage.local.set({\"local_key_3\": \"local_value_3\"}, " + "function() {" "chrome.storage.local.remove(\"local_key_3\", function () {" "chrome.storage.local.get(\"local_key_3\", function(items) {" "if (items[\"local_key_3\"] == undefined) {" + @@ -297,7 +301,7 @@ class LocalStorageRemoveTestHandler : public StorageTestHandler { }; } // namespace -STORAGE_TEST_GROUP_MINIMAL(LocalStorageRemove, LocalStorageRemoveTestHandler); +STORAGE_TEST_GROUP_MINIMAL(LocalStorageRemove, LocalStorageRemoveTestHandler) namespace { @@ -312,8 +316,8 @@ class LocalStorageClearTestHandler : public StorageTestHandler { return "var value1Cleared = false;" "var value2Cleared = false;" "function checkCleared() {" - "if (value1Cleared && value2Cleared) {" - + GetMessageJS(kSuccessMessage) + + "if (value1Cleared && value2Cleared) {" + + GetMessageJS(kSuccessMessage) + "}}" "chrome.storage.local.set({\"local_key_4\": \"local_value_4\"," "\"local_key_5\": \"local_value_5\"}, function() {" @@ -339,7 +343,7 @@ class LocalStorageClearTestHandler : public StorageTestHandler { }; } // namespace -STORAGE_TEST_GROUP_MINIMAL(LocalStorageClear, LocalStorageClearTestHandler); +STORAGE_TEST_GROUP_MINIMAL(LocalStorageClear, LocalStorageClearTestHandler) namespace { @@ -353,7 +357,8 @@ class SyncStorageTestHandler : public StorageTestHandler { protected: std::string GetStorageApiJS() const override { - return "chrome.storage.sync.set({\"sync_key_1\": \"sync_value_1\"}, function() {" + return "chrome.storage.sync.set({\"sync_key_1\": \"sync_value_1\"}, " + "function() {" "chrome.storage.sync.get(\"sync_key_1\", function (items) {" "if (items[\"sync_key_1\"] == \"sync_value_1\") {" + GetMessageJS(kSuccessMessage) + @@ -367,7 +372,7 @@ class SyncStorageTestHandler : public StorageTestHandler { }; } // namespace -STORAGE_TEST_GROUP_ALL(SyncStorage, SyncStorageTestHandler); +STORAGE_TEST_GROUP_ALL(SyncStorage, SyncStorageTestHandler) namespace { @@ -381,8 +386,10 @@ class SyncStorageGetBytesInUseTestHandler : public StorageTestHandler { protected: std::string GetStorageApiJS() const override { - return "chrome.storage.sync.set({\"sync_key_2\": \"sync_value_2\"}, function() {" - "chrome.storage.sync.getBytesInUse(\"sync_key_2\", function (bytesInUse) {" + return "chrome.storage.sync.set({\"sync_key_2\": \"sync_value_2\"}, " + "function() {" + "chrome.storage.sync.getBytesInUse(\"sync_key_2\", function " + "(bytesInUse) {" "if (bytesInUse == 24) {" + GetMessageJS(kSuccessMessage) + "}});" @@ -396,7 +403,7 @@ class SyncStorageGetBytesInUseTestHandler : public StorageTestHandler { } // namespace STORAGE_TEST_GROUP_MINIMAL(SyncStorageGetBytesInUse, - SyncStorageGetBytesInUseTestHandler); + SyncStorageGetBytesInUseTestHandler) namespace { @@ -409,7 +416,8 @@ class SyncStorageRemoveTestHandler : public StorageTestHandler { protected: std::string GetStorageApiJS() const override { - return "chrome.storage.sync.set({\"sync_key_3\": \"sync_value_3\"}, function() {" + return "chrome.storage.sync.set({\"sync_key_3\": \"sync_value_3\"}, " + "function() {" "chrome.storage.sync.remove(\"sync_key_3\", function () {" "chrome.storage.sync.get(\"sync_key_3\", function(items) {" "if (items[\"sync_key_3\"] == undefined) {" + @@ -424,7 +432,7 @@ class SyncStorageRemoveTestHandler : public StorageTestHandler { }; } // namespace -STORAGE_TEST_GROUP_MINIMAL(SyncStorageRemove, SyncStorageRemoveTestHandler); +STORAGE_TEST_GROUP_MINIMAL(SyncStorageRemove, SyncStorageRemoveTestHandler) namespace { @@ -440,8 +448,8 @@ class SyncStorageClearTestHandler : public StorageTestHandler { "var value2Cleared = false;" "function checkCleared() {" - "if (value1Cleared && value2Cleared) {" - + GetMessageJS(kSuccessMessage) + + "if (value1Cleared && value2Cleared) {" + + GetMessageJS(kSuccessMessage) + "}}" "chrome.storage.sync.set({\"sync_key_4\": \"sync_value_4\"," @@ -469,4 +477,4 @@ class SyncStorageClearTestHandler : public StorageTestHandler { }; } // namespace -STORAGE_TEST_GROUP_MINIMAL(SyncStorageClear, SyncStorageClearTestHandler); +STORAGE_TEST_GROUP_MINIMAL(SyncStorageClear, SyncStorageClearTestHandler) diff --git a/tests/ceftests/extensions/chrome_tabs_unittest.cc b/tests/ceftests/extensions/chrome_tabs_unittest.cc index 0705b4ffe..a22a5fe28 100644 --- a/tests/ceftests/extensions/chrome_tabs_unittest.cc +++ b/tests/ceftests/extensions/chrome_tabs_unittest.cc @@ -529,7 +529,7 @@ class CreateTestHandler : public TabsTestHandler { } // namespace -TABS_TEST_GROUP_ALL(Create, CreateTestHandler); +TABS_TEST_GROUP_ALL(Create, CreateTestHandler) namespace { @@ -577,7 +577,7 @@ class ExecuteScriptNullTabTestHandler : public ExecuteScriptTestHandler { } // namespace -TABS_TEST_GROUP_ALL(ExecuteScriptNullTab, ExecuteScriptNullTabTestHandler); +TABS_TEST_GROUP_ALL(ExecuteScriptNullTab, ExecuteScriptNullTabTestHandler) namespace { @@ -610,7 +610,7 @@ class ExecuteScriptExplicitTabTestHandler : public ExecuteScriptTestHandler { } // namespace TABS_TEST_GROUP_ALL(ExecuteScriptExplicitTab, - ExecuteScriptExplicitTabTestHandler); + ExecuteScriptExplicitTabTestHandler) namespace { @@ -666,7 +666,7 @@ class ExecuteScriptFileTestHandler : public ExecuteScriptTestHandler { } // namespace -TABS_TEST_GROUP_ALL(ExecuteScriptFile, ExecuteScriptFileTestHandler); +TABS_TEST_GROUP_ALL(ExecuteScriptFile, ExecuteScriptFileTestHandler) namespace { @@ -717,8 +717,7 @@ class ExecuteScriptCallbackTestHandler : public ExecuteScriptTestHandler { } // namespace -TABS_TEST_GROUP_MINIMAL(ExecuteScriptCallback, - ExecuteScriptCallbackTestHandler); +TABS_TEST_GROUP_MINIMAL(ExecuteScriptCallback, ExecuteScriptCallbackTestHandler) namespace { @@ -775,7 +774,7 @@ class ExecuteScriptResourceTabTestHandler : public ExecuteScriptTestHandler { } // namespace TABS_TEST_GROUP_MINIMAL(ExecuteScriptResource, - ExecuteScriptResourceTabTestHandler); + ExecuteScriptResourceTabTestHandler) // // chrome.tabs.insertCSS tests. @@ -826,7 +825,7 @@ class InsertCSSNullTabTestHandler : public InsertCSSTestHandler { } // namespace -TABS_TEST_GROUP_ALL(InsertCSSNullTab, InsertCSSNullTabTestHandler); +TABS_TEST_GROUP_ALL(InsertCSSNullTab, InsertCSSNullTabTestHandler) namespace { @@ -858,7 +857,7 @@ class InsertCSSExplicitTabTestHandler : public InsertCSSTestHandler { } // namespace -TABS_TEST_GROUP_ALL(InsertCSSExplicitTab, InsertCSSExplicitTabTestHandler); +TABS_TEST_GROUP_ALL(InsertCSSExplicitTab, InsertCSSExplicitTabTestHandler) namespace { @@ -914,7 +913,7 @@ class InsertCSSFileTestHandler : public InsertCSSTestHandler { } // namespace -TABS_TEST_GROUP_ALL(InsertCSSFile, InsertCSSFileTestHandler); +TABS_TEST_GROUP_ALL(InsertCSSFile, InsertCSSFileTestHandler) namespace { @@ -964,7 +963,7 @@ class InsertCSSCallbackTestHandler : public InsertCSSTestHandler { } // namespace -TABS_TEST_GROUP_MINIMAL(InsertCSSCallback, InsertCSSCallbackTestHandler); +TABS_TEST_GROUP_MINIMAL(InsertCSSCallback, InsertCSSCallbackTestHandler) namespace { @@ -1019,7 +1018,7 @@ class InsertCSSResourceTabTestHandler : public InsertCSSTestHandler { } // namespace -TABS_TEST_GROUP_MINIMAL(InsertCSSResource, InsertCSSResourceTabTestHandler); +TABS_TEST_GROUP_MINIMAL(InsertCSSResource, InsertCSSResourceTabTestHandler) // // chrome.tabs.setZoom/getZoom tests. @@ -1103,7 +1102,7 @@ class ZoomNullTabTestHandler : public ZoomTestHandler { } // namespace -TABS_TEST_GROUP_ALL(ZoomNullTab, ZoomNullTabTestHandler); +TABS_TEST_GROUP_ALL(ZoomNullTab, ZoomNullTabTestHandler) namespace { @@ -1134,7 +1133,7 @@ class ZoomExplicitTabTestHandler : public ZoomTestHandler { } // namespace -TABS_TEST_GROUP_ALL(ZoomExplicitTab, ZoomExplicitTabTestHandler); +TABS_TEST_GROUP_ALL(ZoomExplicitTab, ZoomExplicitTabTestHandler) // // chrome.tabs.setZoomSettings/getZoomSettings tests. @@ -1183,7 +1182,7 @@ class ZoomSettingsNullTabTestHandler : public ZoomSettingsTestHandler { } // namespace -TABS_TEST_GROUP_ALL(ZoomSettingsNullTab, ZoomSettingsNullTabTestHandler); +TABS_TEST_GROUP_ALL(ZoomSettingsNullTab, ZoomSettingsNullTabTestHandler) namespace { @@ -1216,5 +1215,4 @@ class ZoomSettingsExplicitTabTestHandler : public ZoomSettingsTestHandler { } // namespace -TABS_TEST_GROUP_ALL(ZoomSettingsExplicitTab, - ZoomSettingsExplicitTabTestHandler); +TABS_TEST_GROUP_ALL(ZoomSettingsExplicitTab, ZoomSettingsExplicitTabTestHandler) diff --git a/tests/ceftests/extensions/extension_test_handler.h b/tests/ceftests/extensions/extension_test_handler.h index cc68d659d..a2a87e343 100644 --- a/tests/ceftests/extensions/extension_test_handler.h +++ b/tests/ceftests/extensions/extension_test_handler.h @@ -165,7 +165,7 @@ class ExtensionTestHandler : public RoutingTestHandler, // tested functionality the first test should use the ALL macro and the others // should use the MINIMAL macro. #define EXTENSION_TEST_GROUP_ALL(name, test_class) \ - EXTENSION_TEST(name##RCGlobal, test_class, 0); \ + EXTENSION_TEST(name##RCGlobal, test_class, 0) \ EXTENSION_TEST(name##RCGlobalLoadWithHandler, test_class, \ ExtensionTestHandler::RC_TYPE_FLAG_LOAD_WITH_HANDLER) \ EXTENSION_TEST(name##RCGlobalWithHandler, test_class, \ @@ -217,7 +217,7 @@ class ExtensionTestHandler : public RoutingTestHandler, ExtensionTestHandler::RC_TYPE_FLAG_LOAD_WITHOUT_HANDLER) #define EXTENSION_TEST_GROUP_MINIMAL_GLOBAL(name, test_class) \ - EXTENSION_TEST(name##RCGlobal, test_class, 0); \ + EXTENSION_TEST(name##RCGlobal, test_class, 0) \ EXTENSION_TEST(name##RCGlobalWithHandler, test_class, \ ExtensionTestHandler::RC_TYPE_FLAG_WITH_HANDLER) diff --git a/tests/ceftests/extensions/view_unittest.cc b/tests/ceftests/extensions/view_unittest.cc index 94744e526..243bbc4d3 100644 --- a/tests/ceftests/extensions/view_unittest.cc +++ b/tests/ceftests/extensions/view_unittest.cc @@ -214,7 +214,7 @@ class ViewLoadUnloadTestHandler : public ExtensionTestHandler { } // namespace -EXTENSION_TEST_GROUP_ALL(ViewLoadUnload, ViewLoadUnloadTestHandler); +EXTENSION_TEST_GROUP_ALL(ViewLoadUnload, ViewLoadUnloadTestHandler) namespace { @@ -238,4 +238,4 @@ class ViewLoadNoUnloadTestHandler : public ViewLoadUnloadTestHandler { } // namespace EXTENSION_TEST_GROUP_MINIMAL_CUSTOM(ViewLoadNoUnload, - ViewLoadNoUnloadTestHandler); + ViewLoadNoUnloadTestHandler) diff --git a/tests/ceftests/image_unittest.cc b/tests/ceftests/image_unittest.cc index fe6e3f4da..53cc9884d 100644 --- a/tests/ceftests/image_unittest.cc +++ b/tests/ceftests/image_unittest.cc @@ -285,16 +285,16 @@ void SaveJPEGMultiImpl() { #define IMAGE_TEST(name) UI_THREAD_TEST(ImageTest, name) -IMAGE_TEST(Empty); -IMAGE_TEST(Scale1x); -IMAGE_TEST(Scale2x); -IMAGE_TEST(ScaleMulti); -IMAGE_TEST(SaveBitmap1x); -IMAGE_TEST(SaveBitmap2x); -IMAGE_TEST(SaveBitmapMulti); -IMAGE_TEST(SavePNG1x); -IMAGE_TEST(SavePNG2x); -IMAGE_TEST(SavePNGMulti); -IMAGE_TEST(SaveJPEG1x); -IMAGE_TEST(SaveJPEG2x); -IMAGE_TEST(SaveJPEGMulti); +IMAGE_TEST(Empty) +IMAGE_TEST(Scale1x) +IMAGE_TEST(Scale2x) +IMAGE_TEST(ScaleMulti) +IMAGE_TEST(SaveBitmap1x) +IMAGE_TEST(SaveBitmap2x) +IMAGE_TEST(SaveBitmapMulti) +IMAGE_TEST(SavePNG1x) +IMAGE_TEST(SavePNG2x) +IMAGE_TEST(SavePNGMulti) +IMAGE_TEST(SaveJPEG1x) +IMAGE_TEST(SaveJPEG2x) +IMAGE_TEST(SaveJPEGMulti) diff --git a/tests/ceftests/message_router_unittest.cc b/tests/ceftests/message_router_unittest.cc index 84f1d59e4..66a3f9604 100644 --- a/tests/ceftests/message_router_unittest.cc +++ b/tests/ceftests/message_router_unittest.cc @@ -267,7 +267,7 @@ class MRTestHandler : public TestHandler { CefRefPtr GetRouter() const { return message_router_; - }; + } protected: virtual void RunMRTest() = 0; @@ -1953,35 +1953,35 @@ class MultiQuerySingleFrameTestHandler : public SingleLoadTestHandler, // Test the query types individually. MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameSyncSuccess, SUCCESS, - true); + true) MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameAsyncSuccess, SUCCESS, - false); + false) MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameSyncFailure, FAILURE, - true); + true) MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameAsyncFailure, FAILURE, - false); + false) MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameSyncPersistentSuccess, PERSISTENT_SUCCESS, - true); + true) MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameAsyncPersistentSuccess, PERSISTENT_SUCCESS, - false); + false) MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameSyncPersistentFailure, PERSISTENT_FAILURE, - true); + true) MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameAsyncPersistentFailure, PERSISTENT_FAILURE, - false); -MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameCancel, CANCEL, true); + false) +MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameCancel, CANCEL, true) MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFrameAutoCancel, AUTOCANCEL, - true); + true) MULTI_QUERY_SINGLE_FRAME_TYPE_TEST(MultiQuerySingleFramePersistentAutoCancel, PERSISTENT_AUTOCANCEL, - true); + true) // Test that one frame can run some queries successfully in a synchronous // manner. diff --git a/tests/ceftests/os_rendering_unittest.cc b/tests/ceftests/os_rendering_unittest.cc index 239e63429..c809f95b9 100644 --- a/tests/ceftests/os_rendering_unittest.cc +++ b/tests/ceftests/os_rendering_unittest.cc @@ -789,7 +789,7 @@ class OSRTestHandler : public RoutingTestHandler, // first pixel of border #if defined(OS_MACOSX) - EXPECT_EQ(0xff5d99d6U, *(reinterpret_cast(buffer))); + EXPECT_EQ(0xff3979d1U, *(reinterpret_cast(buffer))); #else EXPECT_EQ(0xff6497eaU, *(reinterpret_cast(buffer))); #endif @@ -825,11 +825,18 @@ class OSRTestHandler : public RoutingTestHandler, GetScaledRect(kExpandedSelectRect); EXPECT_EQ(dirtyRects.size(), 1U); // dirtyRects[0] has a 1px inset. - EXPECT_EQ(1, dirtyRects[0].x); - EXPECT_EQ(1, dirtyRects[0].y); +#if defined(OS_MACOSX) + const int inset = GetScaledInt(1); +#else + const int inset = 1; +#endif + EXPECT_EQ(inset, dirtyRects[0].x); + EXPECT_EQ(inset, dirtyRects[0].y); if (ExpectComputedPopupSize()) { - EXPECT_EQ(expanded_select_rect.width - 2, dirtyRects[0].width); - EXPECT_EQ(expanded_select_rect.height - 2, dirtyRects[0].height); + EXPECT_EQ(expanded_select_rect.width - inset * 2, + dirtyRects[0].width); + EXPECT_EQ(expanded_select_rect.height - inset * 2, + dirtyRects[0].height); } else { EXPECT_GT(dirtyRects[0].width, kExpandedSelectRect.width); EXPECT_GT(dirtyRects[0].height, kExpandedSelectRect.height); @@ -1522,79 +1529,79 @@ class OSRTestHandler : public RoutingTestHandler, } // tests -OSR_TEST(Windowless, OSR_TEST_IS_WINDOWLESS, 1.0f); -OSR_TEST(Windowless2x, OSR_TEST_IS_WINDOWLESS, 2.0f); -OSR_TEST(Focus, OSR_TEST_FOCUS, 1.0f); -OSR_TEST(Focus2x, OSR_TEST_FOCUS, 2.0f); -OSR_TEST(TakeFocus, OSR_TEST_TAKE_FOCUS, 1.0f); -OSR_TEST(TakeFocus2x, OSR_TEST_TAKE_FOCUS, 2.0f); -OSR_TEST(GotFocus, OSR_TEST_GOT_FOCUS, 1.0f); -OSR_TEST(GotFocus2x, OSR_TEST_GOT_FOCUS, 2.0f); -OSR_TEST(Paint, OSR_TEST_PAINT, 1.0f); -OSR_TEST(Paint2x, OSR_TEST_PAINT, 2.0f); -OSR_TEST(TransparentPaint, OSR_TEST_TRANSPARENCY, 1.0f); -OSR_TEST(TransparentPaint2x, OSR_TEST_TRANSPARENCY, 2.0f); -OSR_TEST(Cursor, OSR_TEST_CURSOR, 1.0f); -OSR_TEST(Cursor2x, OSR_TEST_CURSOR, 2.0f); -OSR_TEST(MouseMove, OSR_TEST_MOUSE_MOVE, 1.0f); -OSR_TEST(MouseMove2x, OSR_TEST_MOUSE_MOVE, 2.0f); -OSR_TEST(MouseRightClick, OSR_TEST_CLICK_RIGHT, 1.0f); -OSR_TEST(MouseRightClick2x, OSR_TEST_CLICK_RIGHT, 2.0f); -OSR_TEST(MouseLeftClick, OSR_TEST_CLICK_LEFT, 1.0f); -OSR_TEST(MouseLeftClick2x, OSR_TEST_CLICK_LEFT, 2.0f); -OSR_TEST(ScreenPoint, OSR_TEST_SCREEN_POINT, 1.0f); -OSR_TEST(ScreenPoint2x, OSR_TEST_SCREEN_POINT, 2.0f); -OSR_TEST(Resize, OSR_TEST_RESIZE, 1.0f); -OSR_TEST(Resize2x, OSR_TEST_RESIZE, 2.0f); -OSR_TEST(Invalidate, OSR_TEST_INVALIDATE, 1.0f); -OSR_TEST(Invalidate2x, OSR_TEST_INVALIDATE, 2.0f); -OSR_TEST(KeyEvents, OSR_TEST_KEY_EVENTS, 1.0f); -OSR_TEST(KeyEvents2x, OSR_TEST_KEY_EVENTS, 2.0f); -OSR_TEST(Tooltip, OSR_TEST_TOOLTIP, 1.0f); -OSR_TEST(Tooltip2x, OSR_TEST_TOOLTIP, 2.0f); -OSR_TEST(Scrolling, OSR_TEST_SCROLLING, 1.0f); -OSR_TEST(Scrolling2x, OSR_TEST_SCROLLING, 2.0f); -OSR_TEST(ContextMenu, OSR_TEST_CONTEXT_MENU, 1.0f); -OSR_TEST(ContextMenu2x, OSR_TEST_CONTEXT_MENU, 2.0f); -OSR_TEST(PopupPaint, OSR_TEST_POPUP_PAINT, 1.0f); -OSR_TEST(PopupPaint2x, OSR_TEST_POPUP_PAINT, 2.0f); -OSR_TEST(PopupShow, OSR_TEST_POPUP_SHOW, 1.0f); -OSR_TEST(PopupShow2x, OSR_TEST_POPUP_SHOW, 2.0f); -OSR_TEST(PopupSize, OSR_TEST_POPUP_SIZE, 1.0f); -OSR_TEST(PopupSize2x, OSR_TEST_POPUP_SIZE, 2.0f); -OSR_TEST(PopupHideOnBlur, OSR_TEST_POPUP_HIDE_ON_BLUR, 1.0f); -OSR_TEST(PopupHideOnBlur2x, OSR_TEST_POPUP_HIDE_ON_BLUR, 2.0f); -OSR_TEST(PopupHideOnClick, OSR_TEST_POPUP_HIDE_ON_CLICK, 1.0f); -OSR_TEST(PopupHideOnClick2x, OSR_TEST_POPUP_HIDE_ON_CLICK, 2.0f); -OSR_TEST(PopupHideOnScroll, OSR_TEST_POPUP_HIDE_ON_SCROLL, 1.0f); -OSR_TEST(PopupHideOnScroll2x, OSR_TEST_POPUP_HIDE_ON_SCROLL, 2.0f); -OSR_TEST(PopupHideOnEsc, OSR_TEST_POPUP_HIDE_ON_ESC, 1.0f); -OSR_TEST(PopupHideOnEsc2x, OSR_TEST_POPUP_HIDE_ON_ESC, 2.0f); -OSR_TEST(PopupScrollInside, OSR_TEST_POPUP_SCROLL_INSIDE, 1.0f); -OSR_TEST(PopupScrollInside2x, OSR_TEST_POPUP_SCROLL_INSIDE, 2.0f); -OSR_TEST(DragDropStartDragging, OSR_TEST_DRAG_DROP_START_DRAGGING, 1.0f); -OSR_TEST(DragDropStartDragging2x, OSR_TEST_DRAG_DROP_START_DRAGGING, 2.0f); -OSR_TEST(DragDropUpdateCursor, OSR_TEST_DRAG_DROP_UPDATE_CURSOR, 1.0f); -OSR_TEST(DragDropUpdateCursor2x, OSR_TEST_DRAG_DROP_UPDATE_CURSOR, 2.0f); -OSR_TEST(DragDropDropElement, OSR_TEST_DRAG_DROP_DROP, 1.0f); -OSR_TEST(DragDropDropElement2x, OSR_TEST_DRAG_DROP_DROP, 2.0f); -OSR_TEST(IMESetComposition, OSR_TEST_IME_SET_COMPOSITION, 1.0f); -OSR_TEST(IMESetComposition2x, OSR_TEST_IME_SET_COMPOSITION, 2.0f); -OSR_TEST(IMECommitText, OSR_TEST_IME_COMMIT_TEXT, 1.0f); -OSR_TEST(IMECommitText2x, OSR_TEST_IME_COMMIT_TEXT, 2.0f); -OSR_TEST(IMEFinishComposition, OSR_TEST_IME_FINISH_COMPOSITION, 1.0f); -OSR_TEST(IMEFinishComposition2x, OSR_TEST_IME_FINISH_COMPOSITION, 2.0f); -OSR_TEST(IMECancelComposition, OSR_TEST_IME_CANCEL_COMPOSITION, 1.0f); -OSR_TEST(IMECancelComposition2x, OSR_TEST_IME_CANCEL_COMPOSITION, 2.0f); -OSR_TEST(TextSelectionChanged, OSR_TEST_TEXT_SELECTION_CHANGE, 1.0f); -OSR_TEST(TextSelectionChanged2x, OSR_TEST_TEXT_SELECTION_CHANGE, 2.0f); -OSR_TEST(VirtualKeyboard, OSR_TEST_VIRTUAL_KEYBOARD, 1.0f); -OSR_TEST(TouchStart, OSR_TEST_TOUCH_START, 1.0f); -OSR_TEST(TouchStart2X, OSR_TEST_TOUCH_START, 2.0f); -OSR_TEST(TouchMove, OSR_TEST_TOUCH_MOVE, 1.0f); -OSR_TEST(TouchMove2X, OSR_TEST_TOUCH_MOVE, 2.0f); -OSR_TEST(TouchEnd, OSR_TEST_TOUCH_END, 1.0f); -OSR_TEST(TouchEnd2X, OSR_TEST_TOUCH_END, 2.0f); -OSR_TEST(TouchCancel, OSR_TEST_TOUCH_CANCEL, 1.0f); -OSR_TEST(TouchCancel2X, OSR_TEST_TOUCH_CANCEL, 2.0f); -OSR_TEST(PenEvent, OSR_TEST_PEN, 1.0f); +OSR_TEST(Windowless, OSR_TEST_IS_WINDOWLESS, 1.0f) +OSR_TEST(Windowless2x, OSR_TEST_IS_WINDOWLESS, 2.0f) +OSR_TEST(Focus, OSR_TEST_FOCUS, 1.0f) +OSR_TEST(Focus2x, OSR_TEST_FOCUS, 2.0f) +OSR_TEST(TakeFocus, OSR_TEST_TAKE_FOCUS, 1.0f) +OSR_TEST(TakeFocus2x, OSR_TEST_TAKE_FOCUS, 2.0f) +OSR_TEST(GotFocus, OSR_TEST_GOT_FOCUS, 1.0f) +OSR_TEST(GotFocus2x, OSR_TEST_GOT_FOCUS, 2.0f) +OSR_TEST(Paint, OSR_TEST_PAINT, 1.0f) +OSR_TEST(Paint2x, OSR_TEST_PAINT, 2.0f) +OSR_TEST(TransparentPaint, OSR_TEST_TRANSPARENCY, 1.0f) +OSR_TEST(TransparentPaint2x, OSR_TEST_TRANSPARENCY, 2.0f) +OSR_TEST(Cursor, OSR_TEST_CURSOR, 1.0f) +OSR_TEST(Cursor2x, OSR_TEST_CURSOR, 2.0f) +OSR_TEST(MouseMove, OSR_TEST_MOUSE_MOVE, 1.0f) +OSR_TEST(MouseMove2x, OSR_TEST_MOUSE_MOVE, 2.0f) +OSR_TEST(MouseRightClick, OSR_TEST_CLICK_RIGHT, 1.0f) +OSR_TEST(MouseRightClick2x, OSR_TEST_CLICK_RIGHT, 2.0f) +OSR_TEST(MouseLeftClick, OSR_TEST_CLICK_LEFT, 1.0f) +OSR_TEST(MouseLeftClick2x, OSR_TEST_CLICK_LEFT, 2.0f) +OSR_TEST(ScreenPoint, OSR_TEST_SCREEN_POINT, 1.0f) +OSR_TEST(ScreenPoint2x, OSR_TEST_SCREEN_POINT, 2.0f) +OSR_TEST(Resize, OSR_TEST_RESIZE, 1.0f) +OSR_TEST(Resize2x, OSR_TEST_RESIZE, 2.0f) +OSR_TEST(Invalidate, OSR_TEST_INVALIDATE, 1.0f) +OSR_TEST(Invalidate2x, OSR_TEST_INVALIDATE, 2.0f) +OSR_TEST(KeyEvents, OSR_TEST_KEY_EVENTS, 1.0f) +OSR_TEST(KeyEvents2x, OSR_TEST_KEY_EVENTS, 2.0f) +OSR_TEST(Tooltip, OSR_TEST_TOOLTIP, 1.0f) +OSR_TEST(Tooltip2x, OSR_TEST_TOOLTIP, 2.0f) +OSR_TEST(Scrolling, OSR_TEST_SCROLLING, 1.0f) +OSR_TEST(Scrolling2x, OSR_TEST_SCROLLING, 2.0f) +OSR_TEST(ContextMenu, OSR_TEST_CONTEXT_MENU, 1.0f) +OSR_TEST(ContextMenu2x, OSR_TEST_CONTEXT_MENU, 2.0f) +OSR_TEST(PopupPaint, OSR_TEST_POPUP_PAINT, 1.0f) +OSR_TEST(PopupPaint2x, OSR_TEST_POPUP_PAINT, 2.0f) +OSR_TEST(PopupShow, OSR_TEST_POPUP_SHOW, 1.0f) +OSR_TEST(PopupShow2x, OSR_TEST_POPUP_SHOW, 2.0f) +OSR_TEST(PopupSize, OSR_TEST_POPUP_SIZE, 1.0f) +OSR_TEST(PopupSize2x, OSR_TEST_POPUP_SIZE, 2.0f) +OSR_TEST(PopupHideOnBlur, OSR_TEST_POPUP_HIDE_ON_BLUR, 1.0f) +OSR_TEST(PopupHideOnBlur2x, OSR_TEST_POPUP_HIDE_ON_BLUR, 2.0f) +OSR_TEST(PopupHideOnClick, OSR_TEST_POPUP_HIDE_ON_CLICK, 1.0f) +OSR_TEST(PopupHideOnClick2x, OSR_TEST_POPUP_HIDE_ON_CLICK, 2.0f) +OSR_TEST(PopupHideOnScroll, OSR_TEST_POPUP_HIDE_ON_SCROLL, 1.0f) +OSR_TEST(PopupHideOnScroll2x, OSR_TEST_POPUP_HIDE_ON_SCROLL, 2.0f) +OSR_TEST(PopupHideOnEsc, OSR_TEST_POPUP_HIDE_ON_ESC, 1.0f) +OSR_TEST(PopupHideOnEsc2x, OSR_TEST_POPUP_HIDE_ON_ESC, 2.0f) +OSR_TEST(PopupScrollInside, OSR_TEST_POPUP_SCROLL_INSIDE, 1.0f) +OSR_TEST(PopupScrollInside2x, OSR_TEST_POPUP_SCROLL_INSIDE, 2.0f) +OSR_TEST(DragDropStartDragging, OSR_TEST_DRAG_DROP_START_DRAGGING, 1.0f) +OSR_TEST(DragDropStartDragging2x, OSR_TEST_DRAG_DROP_START_DRAGGING, 2.0f) +OSR_TEST(DragDropUpdateCursor, OSR_TEST_DRAG_DROP_UPDATE_CURSOR, 1.0f) +OSR_TEST(DragDropUpdateCursor2x, OSR_TEST_DRAG_DROP_UPDATE_CURSOR, 2.0f) +OSR_TEST(DragDropDropElement, OSR_TEST_DRAG_DROP_DROP, 1.0f) +OSR_TEST(DragDropDropElement2x, OSR_TEST_DRAG_DROP_DROP, 2.0f) +OSR_TEST(IMESetComposition, OSR_TEST_IME_SET_COMPOSITION, 1.0f) +OSR_TEST(IMESetComposition2x, OSR_TEST_IME_SET_COMPOSITION, 2.0f) +OSR_TEST(IMECommitText, OSR_TEST_IME_COMMIT_TEXT, 1.0f) +OSR_TEST(IMECommitText2x, OSR_TEST_IME_COMMIT_TEXT, 2.0f) +OSR_TEST(IMEFinishComposition, OSR_TEST_IME_FINISH_COMPOSITION, 1.0f) +OSR_TEST(IMEFinishComposition2x, OSR_TEST_IME_FINISH_COMPOSITION, 2.0f) +OSR_TEST(IMECancelComposition, OSR_TEST_IME_CANCEL_COMPOSITION, 1.0f) +OSR_TEST(IMECancelComposition2x, OSR_TEST_IME_CANCEL_COMPOSITION, 2.0f) +OSR_TEST(TextSelectionChanged, OSR_TEST_TEXT_SELECTION_CHANGE, 1.0f) +OSR_TEST(TextSelectionChanged2x, OSR_TEST_TEXT_SELECTION_CHANGE, 2.0f) +OSR_TEST(VirtualKeyboard, OSR_TEST_VIRTUAL_KEYBOARD, 1.0f) +OSR_TEST(TouchStart, OSR_TEST_TOUCH_START, 1.0f) +OSR_TEST(TouchStart2X, OSR_TEST_TOUCH_START, 2.0f) +OSR_TEST(TouchMove, OSR_TEST_TOUCH_MOVE, 1.0f) +OSR_TEST(TouchMove2X, OSR_TEST_TOUCH_MOVE, 2.0f) +OSR_TEST(TouchEnd, OSR_TEST_TOUCH_END, 1.0f) +OSR_TEST(TouchEnd2X, OSR_TEST_TOUCH_END, 2.0f) +OSR_TEST(TouchCancel, OSR_TEST_TOUCH_CANCEL, 1.0f) +OSR_TEST(TouchCancel2X, OSR_TEST_TOUCH_CANCEL, 2.0f) +OSR_TEST(PenEvent, OSR_TEST_PEN, 1.0f) diff --git a/tests/ceftests/plugin_unittest.cc b/tests/ceftests/plugin_unittest.cc index f27716472..827655e09 100644 --- a/tests/ceftests/plugin_unittest.cc +++ b/tests/ceftests/plugin_unittest.cc @@ -608,32 +608,32 @@ class PluginTestHandler : public RoutingTestHandler, ReleaseAndWaitForDestructor(handler); \ } -RUN_TEST(GlobalDefaultPdfDirect, GLOBAL_DEFAULT, kPdfDirectUrl); -RUN_TEST(GlobalDefaultPdfHtml, GLOBAL_DEFAULT, kPdfHtmlUrl); +RUN_TEST(GlobalDefaultPdfDirect, GLOBAL_DEFAULT, kPdfDirectUrl) +RUN_TEST(GlobalDefaultPdfHtml, GLOBAL_DEFAULT, kPdfHtmlUrl) -RUN_TEST(GlobalNoHandlerPdfDirect, GLOBAL_NO_HANDLER, kPdfDirectUrl); -RUN_TEST(GlobalNoHandlerPdfHtml, GLOBAL_NO_HANDLER, kPdfHtmlUrl); -RUN_TEST(GlobalAllowPdfDirect, GLOBAL_ALLOW, kPdfDirectUrl); -RUN_TEST(GlobalAllowPdfHtml, GLOBAL_ALLOW, kPdfHtmlUrl); -RUN_TEST(GlobalBlockThenLoadPdfDirect, GLOBAL_BLOCK_LOAD, kPdfDirectUrl); -RUN_TEST(GlobalBlockThenLoadPdfHtml, GLOBAL_BLOCK_LOAD, kPdfHtmlUrl); -RUN_TEST(GlobalBlockThenHidePdfDirect, GLOBAL_BLOCK_HIDE, kPdfDirectUrl); -RUN_TEST(GlobalBlockThenHidePdfHtml, GLOBAL_BLOCK_HIDE, kPdfHtmlUrl); -RUN_TEST(GlobalDisableThenHidePdfDirect, GLOBAL_DISABLE_HIDE, kPdfDirectUrl); -RUN_TEST(GlobalDisableThenHidePdfHtml, GLOBAL_DISABLE_HIDE, kPdfHtmlUrl); -RUN_TEST(GlobalNoListHtml, GLOBAL_NO_LIST, kPdfHtmlUrl); +RUN_TEST(GlobalNoHandlerPdfDirect, GLOBAL_NO_HANDLER, kPdfDirectUrl) +RUN_TEST(GlobalNoHandlerPdfHtml, GLOBAL_NO_HANDLER, kPdfHtmlUrl) +RUN_TEST(GlobalAllowPdfDirect, GLOBAL_ALLOW, kPdfDirectUrl) +RUN_TEST(GlobalAllowPdfHtml, GLOBAL_ALLOW, kPdfHtmlUrl) +RUN_TEST(GlobalBlockThenLoadPdfDirect, GLOBAL_BLOCK_LOAD, kPdfDirectUrl) +RUN_TEST(GlobalBlockThenLoadPdfHtml, GLOBAL_BLOCK_LOAD, kPdfHtmlUrl) +RUN_TEST(GlobalBlockThenHidePdfDirect, GLOBAL_BLOCK_HIDE, kPdfDirectUrl) +RUN_TEST(GlobalBlockThenHidePdfHtml, GLOBAL_BLOCK_HIDE, kPdfHtmlUrl) +RUN_TEST(GlobalDisableThenHidePdfDirect, GLOBAL_DISABLE_HIDE, kPdfDirectUrl) +RUN_TEST(GlobalDisableThenHidePdfHtml, GLOBAL_DISABLE_HIDE, kPdfHtmlUrl) +RUN_TEST(GlobalNoListHtml, GLOBAL_NO_LIST, kPdfHtmlUrl) -RUN_TEST(CustomNoHandlerPdfDirect, CUSTOM_NO_HANDLER, kPdfDirectUrl); -RUN_TEST(CustomNoHandlerPdfHtml, CUSTOM_NO_HANDLER, kPdfHtmlUrl); -RUN_TEST(CustomAllowPdfDirect, CUSTOM_ALLOW, kPdfDirectUrl); -RUN_TEST(CustomAllowPdfHtml, CUSTOM_ALLOW, kPdfHtmlUrl); -RUN_TEST(CustomBlockThenLoadPdfDirect, CUSTOM_BLOCK_LOAD, kPdfDirectUrl); -RUN_TEST(CustomBlockThenLoadPdfHtml, CUSTOM_BLOCK_LOAD, kPdfHtmlUrl); -RUN_TEST(CustomBlockThenHidePdfDirect, CUSTOM_BLOCK_HIDE, kPdfDirectUrl); -RUN_TEST(CustomBlockThenHidePdfHtml, CUSTOM_BLOCK_HIDE, kPdfHtmlUrl); -RUN_TEST(CustomDisableThenHidePdfDirect, CUSTOM_DISABLE_HIDE, kPdfDirectUrl); -RUN_TEST(CustomDisableThenHidePdfHtml, CUSTOM_DISABLE_HIDE, kPdfHtmlUrl); -RUN_TEST(CustomNoListHtml, CUSTOM_NO_LIST, kPdfHtmlUrl); +RUN_TEST(CustomNoHandlerPdfDirect, CUSTOM_NO_HANDLER, kPdfDirectUrl) +RUN_TEST(CustomNoHandlerPdfHtml, CUSTOM_NO_HANDLER, kPdfHtmlUrl) +RUN_TEST(CustomAllowPdfDirect, CUSTOM_ALLOW, kPdfDirectUrl) +RUN_TEST(CustomAllowPdfHtml, CUSTOM_ALLOW, kPdfHtmlUrl) +RUN_TEST(CustomBlockThenLoadPdfDirect, CUSTOM_BLOCK_LOAD, kPdfDirectUrl) +RUN_TEST(CustomBlockThenLoadPdfHtml, CUSTOM_BLOCK_LOAD, kPdfHtmlUrl) +RUN_TEST(CustomBlockThenHidePdfDirect, CUSTOM_BLOCK_HIDE, kPdfDirectUrl) +RUN_TEST(CustomBlockThenHidePdfHtml, CUSTOM_BLOCK_HIDE, kPdfHtmlUrl) +RUN_TEST(CustomDisableThenHidePdfDirect, CUSTOM_DISABLE_HIDE, kPdfDirectUrl) +RUN_TEST(CustomDisableThenHidePdfHtml, CUSTOM_DISABLE_HIDE, kPdfHtmlUrl) +RUN_TEST(CustomNoListHtml, CUSTOM_NO_LIST, kPdfHtmlUrl) // Entry point for creating plugin browser test objects. // Called from client_app_delegates.cc. diff --git a/tests/ceftests/request_context_unittest.cc b/tests/ceftests/request_context_unittest.cc index 02861be69..bbd0b7c35 100644 --- a/tests/ceftests/request_context_unittest.cc +++ b/tests/ceftests/request_context_unittest.cc @@ -877,32 +877,32 @@ class PopupNavTestHandler : public TestHandler { PopupNavTestHandler, test_mode) // Test allowing popups and closing the popup browser first. -POPUP_TEST_GROUP(AllowClosePopupFirst, ALLOW_CLOSE_POPUP_FIRST); +POPUP_TEST_GROUP(AllowClosePopupFirst, ALLOW_CLOSE_POPUP_FIRST) // Test allowing popups and closing the main browser first to verify // that internal objects are tracked correctly (see issue #2162). -POPUP_TEST_GROUP(AllowClosePopupLast, ALLOW_CLOSE_POPUP_LAST); +POPUP_TEST_GROUP(AllowClosePopupLast, ALLOW_CLOSE_POPUP_LAST) // Test denying popups. -POPUP_TEST_GROUP(Deny, DENY); +POPUP_TEST_GROUP(Deny, DENY) // Test navigation to a different origin after popup creation to // verify that internal objects are tracked correctly (see issue // #1392). -POPUP_TEST_GROUP(NavigateAfterCreation, NAVIGATE_AFTER_CREATION); +POPUP_TEST_GROUP(NavigateAfterCreation, NAVIGATE_AFTER_CREATION) // Test destroying the parent browser during or immediately after // popup creation to verify that internal objects are tracked // correctly (see issue #2041). -POPUP_TEST_GROUP(DestroyParentBeforeCreation, DESTROY_PARENT_BEFORE_CREATION); +POPUP_TEST_GROUP(DestroyParentBeforeCreation, DESTROY_PARENT_BEFORE_CREATION) POPUP_TEST_GROUP(DestroyParentBeforeCreationForce, - DESTROY_PARENT_BEFORE_CREATION_FORCE); -POPUP_TEST_GROUP(DestroyParentDuringCreation, DESTROY_PARENT_DURING_CREATION); + DESTROY_PARENT_BEFORE_CREATION_FORCE) +POPUP_TEST_GROUP(DestroyParentDuringCreation, DESTROY_PARENT_DURING_CREATION) POPUP_TEST_GROUP(DestroyParentDuringCreationForce, - DESTROY_PARENT_DURING_CREATION_FORCE); -POPUP_TEST_GROUP(DestroyParentAfterCreation, DESTROY_PARENT_AFTER_CREATION); + DESTROY_PARENT_DURING_CREATION_FORCE) +POPUP_TEST_GROUP(DestroyParentAfterCreation, DESTROY_PARENT_AFTER_CREATION) POPUP_TEST_GROUP(DestroyParentAfterCreationForce, - DESTROY_PARENT_AFTER_CREATION_FORCE); + DESTROY_PARENT_AFTER_CREATION_FORCE) namespace { @@ -993,27 +993,7 @@ class MethodTestHandler : public TestHandler { EXPECT_FALSE(got_completion_callback_); got_completion_callback_.yes(); - if (method_ == METHOD_RESOLVE_HOST) { - // Now try a cached request. - CefPostTask(TID_IO, base::Bind(&MethodTestHandler::ResolveHostCached, - this, browser)); - } else { - DestroyTest(); - } - } - - void ResolveHostCached(CefRefPtr browser) { - EXPECT_IO_THREAD(); - - CefRefPtr context = - browser->GetHost()->GetRequestContext(); - std::vector resolved_ips; - cef_errorcode_t result = - context->ResolveHostCached(kResolveOrigin, resolved_ips); - EXPECT_EQ(ERR_NONE, result); - EXPECT_TRUE(!resolved_ips.empty()); - - CefPostTask(TID_UI, base::Bind(&MethodTestHandler::DestroyTest, this)); + DestroyTest(); } private: diff --git a/tests/ceftests/test_util.h b/tests/ceftests/test_util.h index 3bb601014..c416ffd12 100644 --- a/tests/ceftests/test_util.h +++ b/tests/ceftests/test_util.h @@ -109,24 +109,23 @@ CefRefPtr CreateTestRequestContext( #define RC_TEST_GROUP_IN_MEMORY(test_case_name, test_name, test_class, \ test_mode) \ RC_TEST_BASE(test_case_name, test_name##RCNone, test_class, test_mode, \ - TEST_RC_MODE_NONE, false); \ + TEST_RC_MODE_NONE, false) \ RC_TEST_BASE(test_case_name, test_name##RCGlobal, test_class, test_mode, \ - TEST_RC_MODE_GLOBAL, false); \ + TEST_RC_MODE_GLOBAL, false) \ RC_TEST_BASE(test_case_name, test_name##RCGlobalWithHandler, test_class, \ - test_mode, TEST_RC_MODE_GLOBAL_WITH_HANDLER, false); \ + test_mode, TEST_RC_MODE_GLOBAL_WITH_HANDLER, false) \ RC_TEST_BASE(test_case_name, test_name##RCCustomInMemory, test_class, \ - test_mode, TEST_RC_MODE_CUSTOM, false); \ + test_mode, TEST_RC_MODE_CUSTOM, false) \ RC_TEST_BASE(test_case_name, test_name##RCCustomInMemoryWithHandler, \ - test_class, test_mode, TEST_RC_MODE_CUSTOM_WITH_HANDLER, \ - false); + test_class, test_mode, TEST_RC_MODE_CUSTOM_WITH_HANDLER, false) // RequestContextModes that operate on disk. #define RC_TEST_GROUP_ON_DISK(test_case_name, test_name, test_class, \ test_mode) \ RC_TEST_BASE(test_case_name, test_name##RCCustomOnDisk, test_class, \ - test_mode, TEST_RC_MODE_CUSTOM, true); \ + test_mode, TEST_RC_MODE_CUSTOM, true) \ RC_TEST_BASE(test_case_name, test_name##RCCustomOnDiskWithHandler, \ - test_class, test_mode, TEST_RC_MODE_CUSTOM_WITH_HANDLER, true); + test_class, test_mode, TEST_RC_MODE_CUSTOM_WITH_HANDLER, true) // Helper macro for testing all valid combinations of RequestContextMode values. // For example: diff --git a/tests/ceftests/tracing_unittest.cc b/tests/ceftests/tracing_unittest.cc index d89625494..936be6eda 100644 --- a/tests/ceftests/tracing_unittest.cc +++ b/tests/ceftests/tracing_unittest.cc @@ -353,57 +353,53 @@ class TracingTestHandler : public CefEndTracingCallback, } // Define the tests. -TRACING_TEST(TraceEvent0, TT_TRACE_EVENT0); -TRACING_TEST(TraceEvent1, TT_TRACE_EVENT1); -TRACING_TEST(TraceEvent2, TT_TRACE_EVENT2); -TRACING_TEST(TraceEventInstant0, TT_TRACE_EVENT_INSTANT0); -TRACING_TEST(TraceEventInstant1, TT_TRACE_EVENT_INSTANT1); -TRACING_TEST(TraceEventInstant2, TT_TRACE_EVENT_INSTANT2); -TRACING_TEST(TraceEventCopyInstant0, TT_TRACE_EVENT_COPY_INSTANT0); -TRACING_TEST(TraceEventCopyInstant1, TT_TRACE_EVENT_COPY_INSTANT1); -TRACING_TEST(TraceEventCopyInstant2, TT_TRACE_EVENT_COPY_INSTANT2); -TRACING_TEST(TraceEventBegin0, TT_TRACE_EVENT_BEGIN0); -TRACING_TEST(TraceEventBegin1, TT_TRACE_EVENT_BEGIN1); -TRACING_TEST(TraceEventBegin2, TT_TRACE_EVENT_BEGIN2); -TRACING_TEST(TraceEventCopyBegin0, TT_TRACE_EVENT_COPY_BEGIN0); -TRACING_TEST(TraceEventCopyBegin1, TT_TRACE_EVENT_COPY_BEGIN1); -TRACING_TEST(TraceEventCopyBegin2, TT_TRACE_EVENT_COPY_BEGIN2); -TRACING_TEST(TraceEventEnd0, TT_TRACE_EVENT_END0); -TRACING_TEST(TraceEventEnd1, TT_TRACE_EVENT_END1); -TRACING_TEST(TraceEventEnd2, TT_TRACE_EVENT_END2); -TRACING_TEST(TraceEventCopyEnd0, TT_TRACE_EVENT_COPY_END0); -TRACING_TEST(TraceEventCopyEnd1, TT_TRACE_EVENT_COPY_END1); -TRACING_TEST(TraceEventCopyEnd2, TT_TRACE_EVENT_COPY_END1); -TRACING_TEST(TraceCounter1, TT_TRACE_COUNTER1); -TRACING_TEST(TraceCopyCounter1, TT_TRACE_COPY_COUNTER1); -TRACING_TEST(TraceCounter2, TT_TRACE_COUNTER2); -TRACING_TEST(TraceCopyCounter2, TT_TRACE_COPY_COUNTER2); -TRACING_TEST(TraceCounterId1, TT_TRACE_COUNTER_ID1); -TRACING_TEST(TraceCopyCounterId1, TT_TRACE_COPY_COUNTER_ID1); -TRACING_TEST(TraceCounterId2, TT_TRACE_COUNTER_ID2); -TRACING_TEST(TraceCopyCounterId2, TT_TRACE_COPY_COUNTER_ID1); -TRACING_TEST(TraceEventAsyncBegin0, TT_TRACE_EVENT_ASYNC_BEGIN0); -TRACING_TEST(TraceEventAsyncBegin1, TT_TRACE_EVENT_ASYNC_BEGIN1); -TRACING_TEST(TraceEventAsyncBegin2, TT_TRACE_EVENT_ASYNC_BEGIN2); -TRACING_TEST(TraceEventCopyAsyncBegin0, TT_TRACE_EVENT_COPY_ASYNC_BEGIN0); -TRACING_TEST(TraceEventCopyAsyncBegin1, TT_TRACE_EVENT_COPY_ASYNC_BEGIN1); -TRACING_TEST(TraceEventCopyAsyncBegin2, TT_TRACE_EVENT_COPY_ASYNC_BEGIN2); -TRACING_TEST(TraceEventAsyncStepInto0, TT_TRACE_EVENT_ASYNC_STEP_INTO0); -TRACING_TEST(TraceEventAsyncStepInto1, TT_TRACE_EVENT_ASYNC_STEP_INTO1); -TRACING_TEST(TraceEventCopyAsyncStepInto0, - TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO0); -TRACING_TEST(TraceEventCopyAsyncStepInto1, - TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO1); -TRACING_TEST(TraceEventAsyncStepPast0, TT_TRACE_EVENT_ASYNC_STEP_PAST0); -TRACING_TEST(TraceEventAsyncStepPast1, TT_TRACE_EVENT_ASYNC_STEP_PAST1); -TRACING_TEST(TraceEventCopyAsyncStepPast0, - TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST0); -TRACING_TEST(TraceEventCopyAsyncStepPast1, - TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST1); -TRACING_TEST(TraceEventAsyncEnd0, TT_TRACE_EVENT_ASYNC_END0); -TRACING_TEST(TraceEventAsyncEnd1, TT_TRACE_EVENT_ASYNC_END1); -TRACING_TEST(TraceEventAsyncEnd2, TT_TRACE_EVENT_ASYNC_END2); -TRACING_TEST(TraceEventCopyAsyncEnd0, TT_TRACE_EVENT_COPY_ASYNC_END0); +TRACING_TEST(TraceEvent0, TT_TRACE_EVENT0) +TRACING_TEST(TraceEvent1, TT_TRACE_EVENT1) +TRACING_TEST(TraceEvent2, TT_TRACE_EVENT2) +TRACING_TEST(TraceEventInstant0, TT_TRACE_EVENT_INSTANT0) +TRACING_TEST(TraceEventInstant1, TT_TRACE_EVENT_INSTANT1) +TRACING_TEST(TraceEventInstant2, TT_TRACE_EVENT_INSTANT2) +TRACING_TEST(TraceEventCopyInstant0, TT_TRACE_EVENT_COPY_INSTANT0) +TRACING_TEST(TraceEventCopyInstant1, TT_TRACE_EVENT_COPY_INSTANT1) +TRACING_TEST(TraceEventCopyInstant2, TT_TRACE_EVENT_COPY_INSTANT2) +TRACING_TEST(TraceEventBegin0, TT_TRACE_EVENT_BEGIN0) +TRACING_TEST(TraceEventBegin1, TT_TRACE_EVENT_BEGIN1) +TRACING_TEST(TraceEventBegin2, TT_TRACE_EVENT_BEGIN2) +TRACING_TEST(TraceEventCopyBegin0, TT_TRACE_EVENT_COPY_BEGIN0) +TRACING_TEST(TraceEventCopyBegin1, TT_TRACE_EVENT_COPY_BEGIN1) +TRACING_TEST(TraceEventCopyBegin2, TT_TRACE_EVENT_COPY_BEGIN2) +TRACING_TEST(TraceEventEnd0, TT_TRACE_EVENT_END0) +TRACING_TEST(TraceEventEnd1, TT_TRACE_EVENT_END1) +TRACING_TEST(TraceEventEnd2, TT_TRACE_EVENT_END2) +TRACING_TEST(TraceEventCopyEnd0, TT_TRACE_EVENT_COPY_END0) +TRACING_TEST(TraceEventCopyEnd1, TT_TRACE_EVENT_COPY_END1) +TRACING_TEST(TraceEventCopyEnd2, TT_TRACE_EVENT_COPY_END1) +TRACING_TEST(TraceCounter1, TT_TRACE_COUNTER1) +TRACING_TEST(TraceCopyCounter1, TT_TRACE_COPY_COUNTER1) +TRACING_TEST(TraceCounter2, TT_TRACE_COUNTER2) +TRACING_TEST(TraceCopyCounter2, TT_TRACE_COPY_COUNTER2) +TRACING_TEST(TraceCounterId1, TT_TRACE_COUNTER_ID1) +TRACING_TEST(TraceCopyCounterId1, TT_TRACE_COPY_COUNTER_ID1) +TRACING_TEST(TraceCounterId2, TT_TRACE_COUNTER_ID2) +TRACING_TEST(TraceCopyCounterId2, TT_TRACE_COPY_COUNTER_ID1) +TRACING_TEST(TraceEventAsyncBegin0, TT_TRACE_EVENT_ASYNC_BEGIN0) +TRACING_TEST(TraceEventAsyncBegin1, TT_TRACE_EVENT_ASYNC_BEGIN1) +TRACING_TEST(TraceEventAsyncBegin2, TT_TRACE_EVENT_ASYNC_BEGIN2) +TRACING_TEST(TraceEventCopyAsyncBegin0, TT_TRACE_EVENT_COPY_ASYNC_BEGIN0) +TRACING_TEST(TraceEventCopyAsyncBegin1, TT_TRACE_EVENT_COPY_ASYNC_BEGIN1) +TRACING_TEST(TraceEventCopyAsyncBegin2, TT_TRACE_EVENT_COPY_ASYNC_BEGIN2) +TRACING_TEST(TraceEventAsyncStepInto0, TT_TRACE_EVENT_ASYNC_STEP_INTO0) +TRACING_TEST(TraceEventAsyncStepInto1, TT_TRACE_EVENT_ASYNC_STEP_INTO1) +TRACING_TEST(TraceEventCopyAsyncStepInto0, TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO0) +TRACING_TEST(TraceEventCopyAsyncStepInto1, TT_TRACE_EVENT_COPY_ASYNC_STEP_INTO1) +TRACING_TEST(TraceEventAsyncStepPast0, TT_TRACE_EVENT_ASYNC_STEP_PAST0) +TRACING_TEST(TraceEventAsyncStepPast1, TT_TRACE_EVENT_ASYNC_STEP_PAST1) +TRACING_TEST(TraceEventCopyAsyncStepPast0, TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST0) +TRACING_TEST(TraceEventCopyAsyncStepPast1, TT_TRACE_EVENT_COPY_ASYNC_STEP_PAST1) +TRACING_TEST(TraceEventAsyncEnd0, TT_TRACE_EVENT_ASYNC_END0) +TRACING_TEST(TraceEventAsyncEnd1, TT_TRACE_EVENT_ASYNC_END1) +TRACING_TEST(TraceEventAsyncEnd2, TT_TRACE_EVENT_ASYNC_END2) +TRACING_TEST(TraceEventCopyAsyncEnd0, TT_TRACE_EVENT_COPY_ASYNC_END0) TEST(TracingTest, NowFromSystemTraceTime) { int64 val = CefNowFromSystemTraceTime(); diff --git a/tests/ceftests/urlrequest_unittest.cc b/tests/ceftests/urlrequest_unittest.cc index c24490d05..98a878450 100644 --- a/tests/ceftests/urlrequest_unittest.cc +++ b/tests/ceftests/urlrequest_unittest.cc @@ -2432,101 +2432,101 @@ void RegisterURLRequestCustomSchemes( // Define the tests. #define REQ_TEST_SET(suffix, context_mode, test_server_backend) \ REQ_TEST(BrowserGET##suffix, REQTEST_GET, context_mode, true, \ - test_server_backend); \ + test_server_backend) \ REQ_TEST(BrowserGETNoData##suffix, REQTEST_GET_NODATA, context_mode, true, \ - test_server_backend); \ + test_server_backend) \ REQ_TEST(BrowserGETAllowCookies##suffix, REQTEST_GET_ALLOWCOOKIES, \ - context_mode, true, test_server_backend); \ + context_mode, true, test_server_backend) \ REQ_TEST(BrowserGETRedirect##suffix, REQTEST_GET_REDIRECT, context_mode, \ - true, test_server_backend); \ + true, test_server_backend) \ REQ_TEST(BrowserGETRedirectStop##suffix, REQTEST_GET_REDIRECT_STOP, \ - context_mode, true, test_server_backend); \ + context_mode, true, test_server_backend) \ REQ_TEST(BrowserGETRedirectLocation##suffix, REQTEST_GET_REDIRECT_LOCATION, \ - context_mode, true, test_server_backend); \ + context_mode, true, test_server_backend) \ REQ_TEST(BrowserGETReferrer##suffix, REQTEST_GET_REFERRER, context_mode, \ - true, test_server_backend); \ + true, test_server_backend) \ REQ_TEST(BrowserPOST##suffix, REQTEST_POST, context_mode, true, \ - test_server_backend); \ + test_server_backend) \ REQ_TEST(BrowserPOSTFile##suffix, REQTEST_POST_FILE, context_mode, true, \ - test_server_backend); \ + test_server_backend) \ REQ_TEST(BrowserPOSTWithProgress##suffix, REQTEST_POST_WITHPROGRESS, \ - context_mode, true, test_server_backend); \ + context_mode, true, test_server_backend) \ REQ_TEST(BrowserHEAD##suffix, REQTEST_HEAD, context_mode, true, \ - test_server_backend); \ + test_server_backend) \ REQ_TEST(RendererGET##suffix, REQTEST_GET, context_mode, false, \ - test_server_backend); \ + test_server_backend) \ REQ_TEST(RendererGETNoData##suffix, REQTEST_GET_NODATA, context_mode, false, \ - test_server_backend); \ + test_server_backend) \ REQ_TEST(RendererGETAllowCookies##suffix, REQTEST_GET_ALLOWCOOKIES, \ - context_mode, false, test_server_backend); \ + context_mode, false, test_server_backend) \ REQ_TEST(RendererGETRedirect##suffix, REQTEST_GET_REDIRECT, context_mode, \ - false, test_server_backend); \ + false, test_server_backend) \ REQ_TEST(RendererGETRedirectStop##suffix, REQTEST_GET_REDIRECT_STOP, \ - context_mode, false, test_server_backend); \ + context_mode, false, test_server_backend) \ REQ_TEST(RendererGETRedirectLocation##suffix, REQTEST_GET_REDIRECT_LOCATION, \ - context_mode, false, test_server_backend); \ + context_mode, false, test_server_backend) \ REQ_TEST(RendererGETReferrer##suffix, REQTEST_GET_REFERRER, context_mode, \ - false, test_server_backend); \ + false, test_server_backend) \ REQ_TEST(RendererPOST##suffix, REQTEST_POST, context_mode, false, \ - test_server_backend); \ + test_server_backend) \ REQ_TEST(RendererPOSTWithProgress##suffix, REQTEST_POST_WITHPROGRESS, \ - context_mode, false, test_server_backend); \ + context_mode, false, test_server_backend) \ REQ_TEST(RendererHEAD##suffix, REQTEST_HEAD, context_mode, false, \ test_server_backend) -REQ_TEST_SET(ContextGlobalCustom, CONTEXT_GLOBAL, false); -REQ_TEST_SET(ContextInMemoryCustom, CONTEXT_INMEMORY, false); -REQ_TEST_SET(ContextOnDiskCustom, CONTEXT_ONDISK, false); -REQ_TEST_SET(ContextGlobalServer, CONTEXT_GLOBAL, true); -REQ_TEST_SET(ContextInMemoryServer, CONTEXT_INMEMORY, true); -REQ_TEST_SET(ContextOnDiskServer, CONTEXT_ONDISK, true); +REQ_TEST_SET(ContextGlobalCustom, CONTEXT_GLOBAL, false) +REQ_TEST_SET(ContextInMemoryCustom, CONTEXT_INMEMORY, false) +REQ_TEST_SET(ContextOnDiskCustom, CONTEXT_ONDISK, false) +REQ_TEST_SET(ContextGlobalServer, CONTEXT_GLOBAL, true) +REQ_TEST_SET(ContextInMemoryServer, CONTEXT_INMEMORY, true) +REQ_TEST_SET(ContextOnDiskServer, CONTEXT_ONDISK, true) // Cache tests can only be run with the server backend. #define REQ_TEST_CACHE_SET(suffix, context_mode) \ REQ_TEST(BrowserGETCacheWithControl##suffix, REQTEST_CACHE_WITH_CONTROL, \ - context_mode, true, true); \ + context_mode, true, true) \ REQ_TEST(BrowserGETCacheWithoutControl##suffix, \ - REQTEST_CACHE_WITHOUT_CONTROL, context_mode, true, true); \ + REQTEST_CACHE_WITHOUT_CONTROL, context_mode, true, true) \ REQ_TEST(BrowserGETCacheSkipFlag##suffix, REQTEST_CACHE_SKIP_FLAG, \ - context_mode, true, true); \ + context_mode, true, true) \ REQ_TEST(BrowserGETCacheSkipHeader##suffix, REQTEST_CACHE_SKIP_HEADER, \ - context_mode, true, true); \ + context_mode, true, true) \ REQ_TEST(BrowserGETCacheOnlyFailureFlag##suffix, \ - REQTEST_CACHE_ONLY_FAILURE_FLAG, context_mode, true, true); \ + REQTEST_CACHE_ONLY_FAILURE_FLAG, context_mode, true, true) \ REQ_TEST(BrowserGETCacheOnlyFailureHeader##suffix, \ - REQTEST_CACHE_ONLY_FAILURE_HEADER, context_mode, true, true); \ + REQTEST_CACHE_ONLY_FAILURE_HEADER, context_mode, true, true) \ REQ_TEST(BrowserGETCacheOnlySuccessFlag##suffix, \ REQTEST_CACHE_ONLY_SUCCESS_FLAG, context_mode, true, true) \ REQ_TEST(BrowserGETCacheOnlySuccessHeader##suffix, \ REQTEST_CACHE_ONLY_SUCCESS_HEADER, context_mode, true, true) \ REQ_TEST(BrowserGETCacheDisableFlag##suffix, REQTEST_CACHE_DISABLE_FLAG, \ - context_mode, true, true); \ + context_mode, true, true) \ REQ_TEST(BrowserGETCacheDisableHeader##suffix, REQTEST_CACHE_DISABLE_HEADER, \ - context_mode, true, true); \ + context_mode, true, true) \ REQ_TEST(RendererGETCacheWithControl##suffix, REQTEST_CACHE_WITH_CONTROL, \ - context_mode, false, true); \ + context_mode, false, true) \ REQ_TEST(RendererGETCacheWithoutControl##suffix, \ - REQTEST_CACHE_WITHOUT_CONTROL, context_mode, false, true); \ + REQTEST_CACHE_WITHOUT_CONTROL, context_mode, false, true) \ REQ_TEST(RendererGETCacheSkipFlag##suffix, REQTEST_CACHE_SKIP_FLAG, \ - context_mode, false, true); \ + context_mode, false, true) \ REQ_TEST(RendererGETCacheSkipHeader##suffix, REQTEST_CACHE_SKIP_HEADER, \ - context_mode, false, true); \ + context_mode, false, true) \ REQ_TEST(RendererGETCacheOnlyFailureFlag##suffix, \ - REQTEST_CACHE_ONLY_FAILURE_FLAG, context_mode, false, true); \ + REQTEST_CACHE_ONLY_FAILURE_FLAG, context_mode, false, true) \ REQ_TEST(RendererGETCacheOnlyFailureHeader##suffix, \ - REQTEST_CACHE_ONLY_FAILURE_HEADER, context_mode, false, true); \ + REQTEST_CACHE_ONLY_FAILURE_HEADER, context_mode, false, true) \ REQ_TEST(RendererGETCacheOnlySuccessFlag##suffix, \ - REQTEST_CACHE_ONLY_SUCCESS_FLAG, context_mode, false, true); \ + REQTEST_CACHE_ONLY_SUCCESS_FLAG, context_mode, false, true) \ REQ_TEST(RendererGETCacheOnlySuccessHeader##suffix, \ REQTEST_CACHE_ONLY_SUCCESS_HEADER, context_mode, false, true) \ REQ_TEST(RendererGETCacheDisableFlag##suffix, REQTEST_CACHE_DISABLE_FLAG, \ - context_mode, false, true); \ + context_mode, false, true) \ REQ_TEST(RendererGETCacheDisableHeader##suffix, \ - REQTEST_CACHE_DISABLE_HEADER, context_mode, false, true); + REQTEST_CACHE_DISABLE_HEADER, context_mode, false, true) -REQ_TEST_CACHE_SET(ContextGlobalServer, CONTEXT_GLOBAL); -REQ_TEST_CACHE_SET(ContextInMemoryServer, CONTEXT_INMEMORY); -REQ_TEST_CACHE_SET(ContextOnDiskServer, CONTEXT_ONDISK); +REQ_TEST_CACHE_SET(ContextGlobalServer, CONTEXT_GLOBAL) +REQ_TEST_CACHE_SET(ContextInMemoryServer, CONTEXT_INMEMORY) +REQ_TEST_CACHE_SET(ContextOnDiskServer, CONTEXT_ONDISK) namespace { diff --git a/tests/ceftests/v8_unittest.cc b/tests/ceftests/v8_unittest.cc index 3c455ddc6..97bff8cdb 100644 --- a/tests/ceftests/v8_unittest.cc +++ b/tests/ceftests/v8_unittest.cc @@ -3056,56 +3056,56 @@ void CreateV8RendererTests(ClientAppRenderer::DelegateSet& delegates) { #define V8_TEST(name, test_mode) V8_TEST_EX(name, test_mode, kV8TestUrl) // Define the tests. -V8_TEST(NullCreate, V8TEST_NULL_CREATE); -V8_TEST(BoolCreate, V8TEST_BOOL_CREATE); -V8_TEST(IntCreate, V8TEST_INT_CREATE); -V8_TEST(UIntCreate, V8TEST_UINT_CREATE); -V8_TEST(DoubleCreate, V8TEST_DOUBLE_CREATE); -V8_TEST(DateCreate, V8TEST_DATE_CREATE); -V8_TEST(StringCreate, V8TEST_STRING_CREATE); -V8_TEST(EmptyStringCreate, V8TEST_EMPTY_STRING_CREATE); -V8_TEST(ArrayCreate, V8TEST_ARRAY_CREATE); -V8_TEST(ArrayValue, V8TEST_ARRAY_VALUE); -V8_TEST(ArrayBuffer, V8TEST_ARRAY_BUFFER); -V8_TEST(ArrayBufferValue, V8TEST_ARRAY_BUFFER_VALUE); -V8_TEST(ObjectCreate, V8TEST_OBJECT_CREATE); -V8_TEST(ObjectUserData, V8TEST_OBJECT_USERDATA); -V8_TEST(ObjectAccessor, V8TEST_OBJECT_ACCESSOR); -V8_TEST(ObjectAccessorException, V8TEST_OBJECT_ACCESSOR_EXCEPTION); -V8_TEST(ObjectAccessorFail, V8TEST_OBJECT_ACCESSOR_FAIL); -V8_TEST(ObjectAccessorReadOnly, V8TEST_OBJECT_ACCESSOR_READONLY); -V8_TEST(ObjectInterceptor, V8TEST_OBJECT_INTERCEPTOR); -V8_TEST(ObjectInterceptorFail, V8TEST_OBJECT_INTERCEPTOR_FAIL); -V8_TEST(ObjectInterceptorException, V8TEST_OBJECT_INTERCEPTOR_EXCEPTION); -V8_TEST(ObjectInterceptorAndAccessor, V8TEST_OBJECT_INTERCEPTOR_AND_ACCESSOR); -V8_TEST(ObjectValue, V8TEST_OBJECT_VALUE); -V8_TEST(ObjectValueReadOnly, V8TEST_OBJECT_VALUE_READONLY); -V8_TEST(ObjectValueEnum, V8TEST_OBJECT_VALUE_ENUM); -V8_TEST(ObjectValueDontEnum, V8TEST_OBJECT_VALUE_DONTENUM); -V8_TEST(ObjectValueDelete, V8TEST_OBJECT_VALUE_DELETE); -V8_TEST(ObjectValueDontDelete, V8TEST_OBJECT_VALUE_DONTDELETE); -V8_TEST(ObjectValueEmptyKey, V8TEST_OBJECT_VALUE_EMPTYKEY); -V8_TEST(FunctionCreate, V8TEST_FUNCTION_CREATE); -V8_TEST(FunctionHandler, V8TEST_FUNCTION_HANDLER); -V8_TEST(FunctionHandlerException, V8TEST_FUNCTION_HANDLER_EXCEPTION); -V8_TEST(FunctionHandlerFail, V8TEST_FUNCTION_HANDLER_FAIL); -V8_TEST(FunctionHandlerNoObject, V8TEST_FUNCTION_HANDLER_NO_OBJECT); -V8_TEST(FunctionHandlerWithContext, V8TEST_FUNCTION_HANDLER_WITH_CONTEXT); -V8_TEST(FunctionHandlerEmptyString, V8TEST_FUNCTION_HANDLER_EMPTY_STRING); -V8_TEST(ContextEval, V8TEST_CONTEXT_EVAL); -V8_TEST(ContextEvalException, V8TEST_CONTEXT_EVAL_EXCEPTION); +V8_TEST(NullCreate, V8TEST_NULL_CREATE) +V8_TEST(BoolCreate, V8TEST_BOOL_CREATE) +V8_TEST(IntCreate, V8TEST_INT_CREATE) +V8_TEST(UIntCreate, V8TEST_UINT_CREATE) +V8_TEST(DoubleCreate, V8TEST_DOUBLE_CREATE) +V8_TEST(DateCreate, V8TEST_DATE_CREATE) +V8_TEST(StringCreate, V8TEST_STRING_CREATE) +V8_TEST(EmptyStringCreate, V8TEST_EMPTY_STRING_CREATE) +V8_TEST(ArrayCreate, V8TEST_ARRAY_CREATE) +V8_TEST(ArrayValue, V8TEST_ARRAY_VALUE) +V8_TEST(ArrayBuffer, V8TEST_ARRAY_BUFFER) +V8_TEST(ArrayBufferValue, V8TEST_ARRAY_BUFFER_VALUE) +V8_TEST(ObjectCreate, V8TEST_OBJECT_CREATE) +V8_TEST(ObjectUserData, V8TEST_OBJECT_USERDATA) +V8_TEST(ObjectAccessor, V8TEST_OBJECT_ACCESSOR) +V8_TEST(ObjectAccessorException, V8TEST_OBJECT_ACCESSOR_EXCEPTION) +V8_TEST(ObjectAccessorFail, V8TEST_OBJECT_ACCESSOR_FAIL) +V8_TEST(ObjectAccessorReadOnly, V8TEST_OBJECT_ACCESSOR_READONLY) +V8_TEST(ObjectInterceptor, V8TEST_OBJECT_INTERCEPTOR) +V8_TEST(ObjectInterceptorFail, V8TEST_OBJECT_INTERCEPTOR_FAIL) +V8_TEST(ObjectInterceptorException, V8TEST_OBJECT_INTERCEPTOR_EXCEPTION) +V8_TEST(ObjectInterceptorAndAccessor, V8TEST_OBJECT_INTERCEPTOR_AND_ACCESSOR) +V8_TEST(ObjectValue, V8TEST_OBJECT_VALUE) +V8_TEST(ObjectValueReadOnly, V8TEST_OBJECT_VALUE_READONLY) +V8_TEST(ObjectValueEnum, V8TEST_OBJECT_VALUE_ENUM) +V8_TEST(ObjectValueDontEnum, V8TEST_OBJECT_VALUE_DONTENUM) +V8_TEST(ObjectValueDelete, V8TEST_OBJECT_VALUE_DELETE) +V8_TEST(ObjectValueDontDelete, V8TEST_OBJECT_VALUE_DONTDELETE) +V8_TEST(ObjectValueEmptyKey, V8TEST_OBJECT_VALUE_EMPTYKEY) +V8_TEST(FunctionCreate, V8TEST_FUNCTION_CREATE) +V8_TEST(FunctionHandler, V8TEST_FUNCTION_HANDLER) +V8_TEST(FunctionHandlerException, V8TEST_FUNCTION_HANDLER_EXCEPTION) +V8_TEST(FunctionHandlerFail, V8TEST_FUNCTION_HANDLER_FAIL) +V8_TEST(FunctionHandlerNoObject, V8TEST_FUNCTION_HANDLER_NO_OBJECT) +V8_TEST(FunctionHandlerWithContext, V8TEST_FUNCTION_HANDLER_WITH_CONTEXT) +V8_TEST(FunctionHandlerEmptyString, V8TEST_FUNCTION_HANDLER_EMPTY_STRING) +V8_TEST(ContextEval, V8TEST_CONTEXT_EVAL) +V8_TEST(ContextEvalException, V8TEST_CONTEXT_EVAL_EXCEPTION) V8_TEST_EX(ContextEvalCspBypassUnsafeEval, V8TEST_CONTEXT_EVAL_CSP_BYPASS_UNSAFE_EVAL, - kV8ContextEvalCspBypassUnsafeEval); + kV8ContextEvalCspBypassUnsafeEval) V8_TEST_EX(ContextEvalCspBypassSandbox, V8TEST_CONTEXT_EVAL_CSP_BYPASS_SANDBOX, - kV8ContextEvalCspBypassSandbox); -V8_TEST_EX(ContextEntered, V8TEST_CONTEXT_ENTERED, NULL); -V8_TEST_EX(Binding, V8TEST_BINDING, kV8BindingTestUrl); -V8_TEST(StackTrace, V8TEST_STACK_TRACE); -V8_TEST(OnUncaughtException, V8TEST_ON_UNCAUGHT_EXCEPTION); -V8_TEST(OnUncaughtExceptionDevTools, V8TEST_ON_UNCAUGHT_EXCEPTION_DEV_TOOLS); -V8_TEST(Extension, V8TEST_EXTENSION); + kV8ContextEvalCspBypassSandbox) +V8_TEST_EX(ContextEntered, V8TEST_CONTEXT_ENTERED, NULL) +V8_TEST_EX(Binding, V8TEST_BINDING, kV8BindingTestUrl) +V8_TEST(StackTrace, V8TEST_STACK_TRACE) +V8_TEST(OnUncaughtException, V8TEST_ON_UNCAUGHT_EXCEPTION) +V8_TEST(OnUncaughtExceptionDevTools, V8TEST_ON_UNCAUGHT_EXCEPTION_DEV_TOOLS) +V8_TEST(Extension, V8TEST_EXTENSION) V8_TEST_EX(HandlerCallOnReleasedContext, V8TEST_HANDLER_CALL_ON_RELEASED_CONTEXT, kV8HandlerCallOnReleasedContextUrl) diff --git a/tests/ceftests/views/button_unittest.cc b/tests/ceftests/views/button_unittest.cc index 5614e9e5c..c784a53b9 100644 --- a/tests/ceftests/views/button_unittest.cc +++ b/tests/ceftests/views/button_unittest.cc @@ -146,10 +146,10 @@ void MenuButtonStyleFramelessImpl() { } // namespace // Test Button getters/setters. -BUTTON_TEST(LabelButtonStyleFramed); -BUTTON_TEST(LabelButtonStyleFrameless); -BUTTON_TEST(MenuButtonStyleFramed); -BUTTON_TEST(MenuButtonStyleFrameless); +BUTTON_TEST(LabelButtonStyleFramed) +BUTTON_TEST(LabelButtonStyleFrameless) +BUTTON_TEST(MenuButtonStyleFramed) +BUTTON_TEST(MenuButtonStyleFrameless) namespace { @@ -330,22 +330,22 @@ void LabelButtonClickFramelessNoTextNoImageFramelessWindowImpl( // Test LabelButton functionality. This is primarily to exercise exposed CEF // APIs and is not intended to comprehensively test button-related behavior // (which we presume that Chromium is testing). -BUTTON_TEST_ASYNC(LabelButtonClickFramedWithTextWithImageFramedWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramedWithTextNoImageFramedWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramedWithTextWithImageFramelessWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramedWithTextNoImageFramelessWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramedNoTextWithImageFramedWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramedNoTextNoImageFramedWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramedNoTextWithImageFramelessWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramedNoTextNoImageFramelessWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramelessWithTextWithImageFramedWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramelessWithTextNoImageFramedWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramelessWithTextWithImageFramelessWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramelessWithTextNoImageFramelessWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramelessNoTextWithImageFramedWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramelessNoTextNoImageFramedWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramelessNoTextWithImageFramelessWindow); -BUTTON_TEST_ASYNC(LabelButtonClickFramelessNoTextNoImageFramelessWindow); +BUTTON_TEST_ASYNC(LabelButtonClickFramedWithTextWithImageFramedWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramedWithTextNoImageFramedWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramedWithTextWithImageFramelessWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramedWithTextNoImageFramelessWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramedNoTextWithImageFramedWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramedNoTextNoImageFramedWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramedNoTextWithImageFramelessWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramedNoTextNoImageFramelessWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramelessWithTextWithImageFramedWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramelessWithTextNoImageFramedWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramelessWithTextWithImageFramelessWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramelessWithTextNoImageFramelessWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramelessNoTextWithImageFramedWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramelessNoTextNoImageFramedWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramelessNoTextWithImageFramelessWindow) +BUTTON_TEST_ASYNC(LabelButtonClickFramelessNoTextNoImageFramelessWindow) namespace { @@ -616,22 +616,22 @@ void MenuButtonClickFramelessNoTextNoImageFramelessWindowImpl( // Test MenuButton functionality. This is primarily to exercise exposed CEF // APIs and is not intended to comprehensively test button-related behavior // (which we presume that Chromium is testing). -BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextWithImageFramedWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextNoImageFramedWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextWithImageFramelessWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextNoImageFramelessWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextWithImageFramedWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoImageFramedWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextWithImageFramelessWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoImageFramelessWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextWithImageFramedWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextNoImageFramedWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextWithImageFramelessWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextNoImageFramelessWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextWithImageFramedWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextNoImageFramedWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextWithImageFramelessWindow); -BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextNoImageFramelessWindow); +BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextWithImageFramedWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextNoImageFramedWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextWithImageFramelessWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramedWithTextNoImageFramelessWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextWithImageFramedWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoImageFramedWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextWithImageFramelessWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramedNoTextNoImageFramelessWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextWithImageFramedWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextNoImageFramedWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextWithImageFramelessWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramelessWithTextNoImageFramelessWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextWithImageFramedWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextNoImageFramedWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextWithImageFramelessWindow) +BUTTON_TEST_ASYNC(MenuButtonClickFramelessNoTextNoImageFramelessWindow) namespace { @@ -747,5 +747,5 @@ void MenuButtonCustomPopupNoActivateImpl(CefRefPtr event) { } // namespace -BUTTON_TEST_ASYNC(MenuButtonCustomPopupActivate); -BUTTON_TEST_ASYNC(MenuButtonCustomPopupNoActivate); +BUTTON_TEST_ASYNC(MenuButtonCustomPopupActivate) +BUTTON_TEST_ASYNC(MenuButtonCustomPopupNoActivate) diff --git a/tests/ceftests/views/panel_unittest.cc b/tests/ceftests/views/panel_unittest.cc index 50d8add43..5cd1954cf 100644 --- a/tests/ceftests/views/panel_unittest.cc +++ b/tests/ceftests/views/panel_unittest.cc @@ -81,8 +81,8 @@ void CreatePanelWithDelegateImpl() { } // namespace // Test creation. -PANEL_TEST(CreatePanelNoDelegate); -PANEL_TEST(CreatePanelWithDelegate); +PANEL_TEST(CreatePanelNoDelegate) +PANEL_TEST(CreatePanelWithDelegate) namespace { @@ -580,11 +580,11 @@ void ChildDrawnImpl() { } // namespace // Test child behaviors. -PANEL_TEST(ChildAddRemoveSingle); -PANEL_TEST(ChildAddRemoveMultiple); -PANEL_TEST(ChildOrder); -PANEL_TEST(ChildVisible); -PANEL_TEST(ChildDrawn); +PANEL_TEST(ChildAddRemoveSingle) +PANEL_TEST(ChildAddRemoveMultiple) +PANEL_TEST(ChildOrder) +PANEL_TEST(ChildVisible) +PANEL_TEST(ChildDrawn) namespace { @@ -742,8 +742,8 @@ void SizeWithDelegateImpl() { } // namespace // Test sizing. -PANEL_TEST(SizeNoDelegate); -PANEL_TEST(SizeWithDelegate); +PANEL_TEST(SizeNoDelegate) +PANEL_TEST(SizeWithDelegate) namespace { @@ -913,11 +913,11 @@ void FillLayoutSizeHierarchyFromChildWithDelegateImpl() { } // namespace // Test FillLayout. -PANEL_TEST(FillLayoutCreate); -PANEL_TEST(FillLayoutSizeToPreferredSize); -PANEL_TEST(FillLayoutSizeHierarchy); -PANEL_TEST(FillLayoutSizeHierarchyFromParentWithDelegate); -PANEL_TEST(FillLayoutSizeHierarchyFromChildWithDelegate); +PANEL_TEST(FillLayoutCreate) +PANEL_TEST(FillLayoutSizeToPreferredSize) +PANEL_TEST(FillLayoutSizeHierarchy) +PANEL_TEST(FillLayoutSizeHierarchyFromParentWithDelegate) +PANEL_TEST(FillLayoutSizeHierarchyFromChildWithDelegate) namespace { @@ -1364,24 +1364,24 @@ void BoxLayoutSizeHierarchyHorizontalStretchFlexBothWithDelegateImpl() { // Test BoxLayout. The BoxLayoutSizeHierarchy* tests are representative but not // comprehensive (e.g. not all possible configurations are tested). -PANEL_TEST(BoxLayoutCreate); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretch); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchWithDelegate); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretch); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchWithDelegate); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalCenter); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalCenterWithDelegate); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalCenter); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalCenterWithDelegate); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalCenterCenter); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalCenterCenterWithDelegate); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalCenterCenter); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalCenterCenterWithDelegate); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchFlexOne); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchFlexOneWithDelegate); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchFlexOne); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchFlexOneWithDelegate); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchFlexBoth); -PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchFlexBothWithDelegate); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchFlexBoth); -PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchFlexBothWithDelegate); +PANEL_TEST(BoxLayoutCreate) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretch) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchWithDelegate) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretch) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchWithDelegate) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalCenter) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalCenterWithDelegate) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalCenter) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalCenterWithDelegate) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalCenterCenter) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalCenterCenterWithDelegate) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalCenterCenter) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalCenterCenterWithDelegate) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchFlexOne) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchFlexOneWithDelegate) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchFlexOne) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchFlexOneWithDelegate) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchFlexBoth) +PANEL_TEST(BoxLayoutSizeHierarchyVerticalStretchFlexBothWithDelegate) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchFlexBoth) +PANEL_TEST(BoxLayoutSizeHierarchyHorizontalStretchFlexBothWithDelegate) diff --git a/tests/ceftests/views/scroll_view_unittest.cc b/tests/ceftests/views/scroll_view_unittest.cc index fe0aa344b..5896211da 100644 --- a/tests/ceftests/views/scroll_view_unittest.cc +++ b/tests/ceftests/views/scroll_view_unittest.cc @@ -148,5 +148,5 @@ void ScrollViewLayoutNoDelegateImpl(CefRefPtr event) { // Test ScrollView layout. This is primarily to exercise exposed CEF APIs and is // not intended to comprehensively test ScrollView-related behavior (which we // presume that Chromium is testing). -SCROLL_VIEW_TEST_ASYNC(ScrollViewLayoutWithDelegate); -SCROLL_VIEW_TEST_ASYNC(ScrollViewLayoutNoDelegate); +SCROLL_VIEW_TEST_ASYNC(ScrollViewLayoutWithDelegate) +SCROLL_VIEW_TEST_ASYNC(ScrollViewLayoutNoDelegate) diff --git a/tests/ceftests/views/textfield_unittest.cc b/tests/ceftests/views/textfield_unittest.cc index a57509de9..a5b6b1a0c 100644 --- a/tests/ceftests/views/textfield_unittest.cc +++ b/tests/ceftests/views/textfield_unittest.cc @@ -163,8 +163,8 @@ void TextfieldStyleImpl() { } // namespace // Test Textfield getters/setters. -TEXTFIELD_TEST(TextfieldContents); -TEXTFIELD_TEST(TextfieldStyle); +TEXTFIELD_TEST(TextfieldContents) +TEXTFIELD_TEST(TextfieldStyle) namespace { @@ -287,4 +287,4 @@ void TextfieldKeyEventImpl(CefRefPtr event) { // Test Textfield input and events. This is primarily to exercise exposed CEF // APIs and is not intended to comprehensively test Textfield-related behavior // (which we presume that Chromium is testing). -TEXTFIELD_TEST_ASYNC(TextfieldKeyEvent); +TEXTFIELD_TEST_ASYNC(TextfieldKeyEvent) diff --git a/tests/ceftests/views/window_unittest.cc b/tests/ceftests/views/window_unittest.cc index 9d23707ec..a2be32135 100644 --- a/tests/ceftests/views/window_unittest.cc +++ b/tests/ceftests/views/window_unittest.cc @@ -258,8 +258,11 @@ void VerifyMinimize(CefRefPtr window) { EXPECT_TRUE(window->IsMinimized()); EXPECT_FALSE(window->IsMaximized()); EXPECT_FALSE(window->IsFullscreen()); - EXPECT_FALSE(window->IsVisible()); - EXPECT_FALSE(window->IsDrawn()); + + // This result is a bit unexpected, but I guess the platform considers a + // window to be visible even when it's minimized. + EXPECT_TRUE(window->IsVisible()); + EXPECT_TRUE(window->IsDrawn()); window->Restore(); CefPostDelayedTask(TID_UI, base::Bind(VerifyRestore, window), kStateDelayMS); @@ -476,18 +479,18 @@ void WindowAcceleratorImpl(CefRefPtr event) { // Test window functionality. This is primarily to exercise exposed CEF APIs // and is not intended to comprehensively test window-related behavior (which // we presume that Chromium is testing). -WINDOW_TEST_ASYNC(WindowCreate); -WINDOW_TEST_ASYNC(WindowCreateFrameless); -WINDOW_TEST_ASYNC(WindowShowHide); -WINDOW_TEST_ASYNC(WindowShowHideFrameless); -WINDOW_TEST_ASYNC(WindowLayoutAndCoords); -WINDOW_TEST_ASYNC(WindowLayoutAndCoordsFrameless); -WINDOW_TEST_ASYNC(WindowMaximize); -WINDOW_TEST_ASYNC(WindowMaximizeFrameless); -WINDOW_TEST_ASYNC(WindowMinimize); -WINDOW_TEST_ASYNC(WindowMinimizeFrameless); -WINDOW_TEST_ASYNC(WindowFullscreen); -WINDOW_TEST_ASYNC(WindowFullscreenFrameless); -WINDOW_TEST_ASYNC(WindowIcon); -WINDOW_TEST_ASYNC(WindowIconFrameless); -WINDOW_TEST_ASYNC(WindowAccelerator); +WINDOW_TEST_ASYNC(WindowCreate) +WINDOW_TEST_ASYNC(WindowCreateFrameless) +WINDOW_TEST_ASYNC(WindowShowHide) +WINDOW_TEST_ASYNC(WindowShowHideFrameless) +WINDOW_TEST_ASYNC(WindowLayoutAndCoords) +WINDOW_TEST_ASYNC(WindowLayoutAndCoordsFrameless) +WINDOW_TEST_ASYNC(WindowMaximize) +WINDOW_TEST_ASYNC(WindowMaximizeFrameless) +WINDOW_TEST_ASYNC(WindowMinimize) +WINDOW_TEST_ASYNC(WindowMinimizeFrameless) +WINDOW_TEST_ASYNC(WindowFullscreen) +WINDOW_TEST_ASYNC(WindowFullscreenFrameless) +WINDOW_TEST_ASYNC(WindowIcon) +WINDOW_TEST_ASYNC(WindowIconFrameless) +WINDOW_TEST_ASYNC(WindowAccelerator) diff --git a/tests/ceftests/webui_unittest.cc b/tests/ceftests/webui_unittest.cc index 40ba77e52..00a5bc764 100644 --- a/tests/ceftests/webui_unittest.cc +++ b/tests/ceftests/webui_unittest.cc @@ -179,24 +179,24 @@ void RunWebUITest(const std::string& url) { RunWebUITest("chrome://" + name_str + "/"); \ } -WEBUI_TEST(appcache_internals); -WEBUI_TEST(accessibility); -WEBUI_TEST(blob_internals); -WEBUI_TEST(credits); -WEBUI_TEST(extensions_support); -WEBUI_TEST(gpu); -WEBUI_TEST(histograms); -WEBUI_TEST(indexeddb_internals); -WEBUI_TEST(license); -WEBUI_TEST(media_internals); -WEBUI_TEST(net_export); -WEBUI_TEST(network_errors); -WEBUI_TEST(serviceworker_internals); -WEBUI_TEST(system); -WEBUI_TEST(tracing); -WEBUI_TEST(version); -WEBUI_TEST(webrtc_internals); -WEBUI_TEST(webui_hosts); +WEBUI_TEST(appcache_internals) +WEBUI_TEST(accessibility) +WEBUI_TEST(blob_internals) +WEBUI_TEST(credits) +WEBUI_TEST(extensions_support) +WEBUI_TEST(gpu) +WEBUI_TEST(histograms) +WEBUI_TEST(indexeddb_internals) +WEBUI_TEST(license) +WEBUI_TEST(media_internals) +WEBUI_TEST(net_export) +WEBUI_TEST(network_errors) +WEBUI_TEST(serviceworker_internals) +WEBUI_TEST(system) +WEBUI_TEST(tracing) +WEBUI_TEST(version) +WEBUI_TEST(webrtc_internals) +WEBUI_TEST(webui_hosts) // Test hosts with multiple URLs.