diff --git a/BUILD.gn b/BUILD.gn index 8e635e8a3..563b9c951 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -706,8 +706,7 @@ static_library("libcef_static") { "//media", "//media/blink", "//net", - "//net:net_browser_services", - "//net:net_utility_services", + "//net/dns:mojo_client", "//net:net_with_v8", "//pdf", "//ppapi/buildflags", @@ -1450,7 +1449,6 @@ if (is_mac) { deps = [ ":libcef_static", - "//build/config:exe_and_shlib_deps", ] if (is_win) { @@ -1845,7 +1843,6 @@ if (is_mac) { deps = [ ":libcef", ":libcef_dll_wrapper", - "//build/config:exe_and_shlib_deps", ] if (is_win) { @@ -1919,7 +1916,6 @@ if (is_mac) { deps = [ ":libcef", ":libcef_dll_wrapper", - "//build/config:exe_and_shlib_deps", ] if (is_win) { @@ -1988,7 +1984,6 @@ if (is_mac) { deps = [ ":libcef", ":libcef_dll_wrapper", - "//build/config:exe_and_shlib_deps", "//testing/gtest", ] diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 936765ce6..3a3a6e369 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/68.0.3440.0', + 'chromium_checkout': 'refs/tags/69.0.3453.0', } diff --git a/CHROMIUM_UPDATE.txt b/CHROMIUM_UPDATE.txt index 5dcc946cc..67722fa00 100644 --- a/CHROMIUM_UPDATE.txt +++ b/CHROMIUM_UPDATE.txt @@ -41,6 +41,7 @@ 'chrome/renderer/chrome_content_renderer_client.*', 'chrome/renderer/extensions/chrome_extensions_renderer_client.*', 'content/browser/renderer_host/render_widget_host_view_base.*', + 'content/public/browser/content_browser_client.*', 'content/public/browser/render_widget_host_view.h', 'content/public/browser/storage_partition.h', 'content/public/browser/web_contents_delegate.h', diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index e423c1d16..599e2c853 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -2900,13 +2900,13 @@ bool CefBrowserHostImpl::OnMessageReceived( } void CefBrowserHostImpl::AccessibilityEventReceived( - const std::vector& eventData) { + const content::AXEventNotificationDetails& content_event_bundle) { // Only needed in windowless mode. if (IsWindowless()) { if (!web_contents() || !platform_delegate_) return; - platform_delegate_->AccessibilityEventReceived(eventData); + platform_delegate_->AccessibilityEventReceived(content_event_bundle); } } diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index e9e80fbfe..382d27f93 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -506,8 +506,7 @@ class CefBrowserHostImpl : public CefBrowserHost, bool OnMessageReceived(const IPC::Message& message, content::RenderFrameHost* render_frame_host) override; void AccessibilityEventReceived( - const std::vector& eventData) - override; + const content::AXEventNotificationDetails& content_event_bundle) override; void AccessibilityLocationChangesReceived( const std::vector& locData) override; diff --git a/libcef/browser/browser_platform_delegate.cc b/libcef/browser/browser_platform_delegate.cc index c247d7d31..22ef13039 100644 --- a/libcef/browser/browser_platform_delegate.cc +++ b/libcef/browser/browser_platform_delegate.cc @@ -196,7 +196,7 @@ void CefBrowserPlatformDelegate::DragSourceSystemDragEnded() { } void CefBrowserPlatformDelegate::AccessibilityEventReceived( - const std::vector& eventData) { + const content::AXEventNotificationDetails& eventData) { NOTREACHED(); } diff --git a/libcef/browser/browser_platform_delegate.h b/libcef/browser/browser_platform_delegate.h index b4fb0a173..13c78a92c 100644 --- a/libcef/browser/browser_platform_delegate.h +++ b/libcef/browser/browser_platform_delegate.h @@ -262,7 +262,7 @@ class CefBrowserPlatformDelegate { virtual void DragSourceEndedAt(int x, int y, cef_drag_operations_mask_t op); virtual void DragSourceSystemDragEnded(); virtual void AccessibilityEventReceived( - const std::vector& eventData); + const content::AXEventNotificationDetails& eventData); virtual void AccessibilityLocationChangesReceived( const std::vector& locData); diff --git a/libcef/browser/content_browser_client.cc b/libcef/browser/content_browser_client.cc index bd6d03b0b..eeb8f79d6 100644 --- a/libcef/browser/content_browser_client.cc +++ b/libcef/browser/content_browser_client.cc @@ -1060,6 +1060,7 @@ void CefContentBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories( } bool CefContentBrowserClient::WillCreateURLLoaderFactory( + content::BrowserContext* browser_context, content::RenderFrameHost* frame, bool is_navigation, network::mojom::URLLoaderFactoryRequest* factory_request) { @@ -1068,7 +1069,7 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory( auto* web_request_api = extensions::BrowserContextKeyedAPIFactory::Get( - frame->GetProcess()->GetBrowserContext()); + browser_context); return web_request_api->MaybeProxyURLLoaderFactory(frame, is_navigation, factory_request); } diff --git a/libcef/browser/content_browser_client.h b/libcef/browser/content_browser_client.h index 0ab1d4b88..0c3bd55b3 100644 --- a/libcef/browser/content_browser_client.h +++ b/libcef/browser/content_browser_client.h @@ -137,6 +137,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient { int render_frame_id, NonNetworkURLLoaderFactoryMap* factories) override; bool WillCreateURLLoaderFactory( + content::BrowserContext* browser_context, content::RenderFrameHost* frame, bool is_navigation, network::mojom::URLLoaderFactoryRequest* factory_request) override; diff --git a/libcef/browser/devtools_frontend.cc b/libcef/browser/devtools_frontend.cc index 74e0518d2..8f41f4cf6 100644 --- a/libcef/browser/devtools_frontend.cc +++ b/libcef/browser/devtools_frontend.cc @@ -299,9 +299,9 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( setting: "It's not possible to disable this feature from settings." chrome_policy { - DeveloperToolsDisabled { + DeveloperToolsAvailability { policy_options {mode: MANDATORY} - DeveloperToolsDisabled: true + DeveloperToolsAvailability: 2 } } })"); diff --git a/libcef/browser/extensions/chrome_api_registration.cc b/libcef/browser/extensions/chrome_api_registration.cc index 3dc677191..fe48e529f 100644 --- a/libcef/browser/extensions/chrome_api_registration.cc +++ b/libcef/browser/extensions/chrome_api_registration.cc @@ -3,13 +3,15 @@ // found in the LICENSE file. // APIs must also be registered in -// libcef/common/extensions/api/_*_features.json files. See +// libcef/common/extensions/api/_*_features.json files and possibly +// CefExtensionsDispatcherDelegate::PopulateSourceMap. See // libcef/common/extensions/api/README.txt for additional details. #include "libcef/browser/extensions/chrome_api_registration.h" #include "libcef/browser/extensions/api/tabs/tabs_api.h" +#include "chrome/browser/extensions/api/content_settings/content_settings_api.h" #include "chrome/browser/extensions/api/resources_private/resources_private_api.h" #include "chrome/browser/extensions/api/streams_private/streams_private_api.h" #include "extensions/browser/api/alarms/alarms_api.h" @@ -37,6 +39,12 @@ const char* const kSupportedAPIs[] = { EXTENSION_FUNCTION_NAME(AlarmsGetAllFunction), EXTENSION_FUNCTION_NAME(AlarmsClearFunction), EXTENSION_FUNCTION_NAME(AlarmsClearAllFunction), + "contentSettings", + EXTENSION_FUNCTION_NAME(ContentSettingsContentSettingClearFunction), + EXTENSION_FUNCTION_NAME(ContentSettingsContentSettingGetFunction), + EXTENSION_FUNCTION_NAME(ContentSettingsContentSettingSetFunction), + EXTENSION_FUNCTION_NAME( + ContentSettingsContentSettingGetResourceIdentifiersFunction), "storage", EXTENSION_FUNCTION_NAME(StorageStorageAreaGetFunction), EXTENSION_FUNCTION_NAME(StorageStorageAreaSetFunction), @@ -75,6 +83,11 @@ void ChromeFunctionRegistry::RegisterAll(ExtensionFunctionRegistry* registry) { registry->RegisterFunction(); registry->RegisterFunction(); registry->RegisterFunction(); + registry->RegisterFunction(); + registry->RegisterFunction(); + registry->RegisterFunction(); + registry->RegisterFunction< + ContentSettingsContentSettingGetResourceIdentifiersFunction>(); registry->RegisterFunction(); registry->RegisterFunction(); registry->RegisterFunction(); diff --git a/libcef/browser/extensions/extension_function_details.cc b/libcef/browser/extensions/extension_function_details.cc index 66940bfa8..13b2e15eb 100644 --- a/libcef/browser/extensions/extension_function_details.cc +++ b/libcef/browser/extensions/extension_function_details.cc @@ -160,8 +160,9 @@ CefRefPtr CefExtensionFunctionDetails::GetCurrentBrowser() CefRefPtr handler = GetCefExtension()->GetHandler(); if (handler) { // Give the handler an opportunity to specify a different browser. - CefRefPtr active_browser = handler->GetActiveBrowser( - GetCefExtension(), browser.get(), function_->include_incognito()); + CefRefPtr active_browser = + handler->GetActiveBrowser(GetCefExtension(), browser.get(), + function_->include_incognito_information()); if (active_browser && active_browser != browser) { CefRefPtr active_browser_impl = static_cast(active_browser.get()); @@ -200,8 +201,9 @@ bool CefExtensionFunctionDetails::CanAccessBrowser( if (browser && browser->client()) { CefRefPtr handler = GetCefExtension()->GetHandler(); if (handler) { - return handler->CanAccessBrowser(GetCefExtension(), browser.get(), - function_->include_incognito(), target); + return handler->CanAccessBrowser( + GetCefExtension(), browser.get(), + function_->include_incognito_information(), target); } } @@ -425,7 +427,7 @@ std::unique_ptr CefExtensionFunctionDetails::CreateTabObject( tab_object->selected = true; tab_object->highlighted = true; tab_object->pinned = false; - tab_object->audible = std::make_unique(contents->WasRecentlyAudible()); + // TODO(extensions): Use RecentlyAudibleHelper to populate |audible|. tab_object->discarded = false; tab_object->auto_discardable = false; tab_object->muted_info = CreateMutedInfo(contents); diff --git a/libcef/browser/net/chrome_scheme_handler.cc b/libcef/browser/net/chrome_scheme_handler.cc index 81bd95a7d..834390284 100644 --- a/libcef/browser/net/chrome_scheme_handler.cc +++ b/libcef/browser/net/chrome_scheme_handler.cc @@ -36,6 +36,7 @@ #include "content/browser/frame_host/debug_urls.h" #include "content/browser/webui/content_web_ui_controller_factory.h" #include "content/public/browser/browser_url_handler.h" +#include "content/public/browser/web_ui_controller.h" #include "content/public/common/url_constants.h" #include "content/public/common/url_utils.h" #include "content/public/common/user_agent.h" @@ -211,24 +212,20 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory { return false; } - content::WebUIController* CreateWebUIControllerForURL( + std::unique_ptr CreateWebUIControllerForURL( content::WebUI* web_ui, const GURL& url) const override { - content::WebUIController* controller = nullptr; + std::unique_ptr controller; if (!AllowWebUIForURL(url)) return controller; controller = content::ContentWebUIControllerFactory::GetInstance() ->CreateWebUIControllerForURL(web_ui, url); - if (controller != nullptr) + if (controller.get()) return controller; - controller = ChromeWebUIControllerFactory::GetInstance() - ->CreateWebUIControllerForURL(web_ui, url); - if (controller != nullptr) - return controller; - - return nullptr; + return ChromeWebUIControllerFactory::GetInstance() + ->CreateWebUIControllerForURL(web_ui, url); } content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context, diff --git a/libcef/browser/net/url_request_context_getter_impl.cc b/libcef/browser/net/url_request_context_getter_impl.cc index b468c64d8..22f941cae 100644 --- a/libcef/browser/net/url_request_context_getter_impl.cc +++ b/libcef/browser/net/url_request_context_getter_impl.cc @@ -358,18 +358,12 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() { supported_schemes.push_back("ntlm"); supported_schemes.push_back("negotiate"); - io_state_->http_auth_preferences_.reset(new net::HttpAuthPreferences( - supported_schemes -#if defined(OS_POSIX) && !defined(OS_ANDROID) - , - io_state_->gsapi_library_name_ -#endif - )); + io_state_->http_auth_preferences_.reset(new net::HttpAuthPreferences()); io_state_->storage_->set_http_auth_handler_factory( net::HttpAuthHandlerRegistryFactory::Create( - io_state_->http_auth_preferences_.get(), - io_state_->url_request_context_->host_resolver())); + io_state_->url_request_context_->host_resolver(), + io_state_->http_auth_preferences_.get(), supported_schemes)); io_state_->storage_->set_http_server_properties( base::WrapUnique(new net::HttpServerPropertiesImpl)); diff --git a/libcef/browser/osr/browser_platform_delegate_osr.cc b/libcef/browser/osr/browser_platform_delegate_osr.cc index 470c5ee20..beb4ab1a0 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.cc +++ b/libcef/browser/osr/browser_platform_delegate_osr.cc @@ -535,7 +535,7 @@ void CefBrowserPlatformDelegateOsr::DragSourceSystemDragEnded() { } void CefBrowserPlatformDelegateOsr::AccessibilityEventReceived( - const std::vector& eventData) { + const content::AXEventNotificationDetails& eventData) { CefRefPtr handler = browser_->client()->GetRenderHandler(); if (handler.get()) { CefRefPtr acchandler = diff --git a/libcef/browser/osr/browser_platform_delegate_osr.h b/libcef/browser/osr/browser_platform_delegate_osr.h index 47b5d422a..e30947161 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.h +++ b/libcef/browser/osr/browser_platform_delegate_osr.h @@ -90,8 +90,7 @@ class CefBrowserPlatformDelegateOsr void DragSourceEndedAt(int x, int y, cef_drag_operations_mask_t op) override; void DragSourceSystemDragEnded() override; void AccessibilityEventReceived( - const std::vector& eventData) - override; + const content::AXEventNotificationDetails& eventData) override; void AccessibilityLocationChangesReceived( const std::vector& locData) override; diff --git a/libcef/browser/osr/osr_accessibility_util.cc b/libcef/browser/osr/osr_accessibility_util.cc index 1b8660108..5a6f9854e 100644 --- a/libcef/browser/osr/osr_accessibility_util.cc +++ b/libcef/browser/osr/osr_accessibility_util.cc @@ -380,24 +380,53 @@ CefRefPtr ToCefValue(const ui::AXTreeUpdate& update) { return value; } +// Converts AXEvent to CefDictionaryValue. +CefRefPtr ToCefValue(const ui::AXEvent& event) { + CefRefPtr value = CefDictionaryValue::Create(); + + if (event.event_type != ax::mojom::Event::kNone) + value->SetString("event_type", ToString(event.event_type)); + + if (event.id != -1) + value->SetInt("id", event.id); + + if (event.event_from != ax::mojom::EventFrom::kNone) + value->SetString("event_from", ToString(event.event_from)); + + if (event.action_request_id != -1) + value->SetInt("action_request_id", event.action_request_id); + + return value; +} + // Convert AXEventNotificationDetails to CefDictionaryValue. CefRefPtr ToCefValue( const content::AXEventNotificationDetails& eventData) { CefRefPtr value = CefDictionaryValue::Create(); - if (eventData.id != -1) - value->SetInt("id", eventData.id); - if (eventData.ax_tree_id != -1) value->SetInt("ax_tree_id", eventData.ax_tree_id); - if (eventData.event_type != ax::mojom::Event::kNone) - value->SetString("event_type", ToString(eventData.event_type)); + if (eventData.updates.size() > 0) { + CefRefPtr updates = CefListValue::Create(); + updates->SetSize(eventData.updates.size()); + size_t i = 0; + for (const auto& update : eventData.updates) { + updates->SetDictionary(i++, ToCefValue(update)); + } + value->SetList("updates", updates); + } - if (eventData.event_from != ax::mojom::EventFrom::kNone) - value->SetString("event_from", ToString(eventData.event_from)); + if (eventData.events.size() > 0) { + CefRefPtr events = CefListValue::Create(); + events->SetSize(eventData.events.size()); + size_t i = 0; + for (const auto& event : eventData.events) { + events->SetDictionary(i++, ToCefValue(event)); + } + value->SetList("events", events); + } - value->SetDictionary("update", ToCefValue(eventData.update)); return value; } @@ -419,7 +448,7 @@ CefRefPtr ToCefValue(const ui::AXRelativeBounds& location) { return value; } -// Convert AXEventNotificationDetails to CefDictionaryValue. +// Convert AXLocationChangeNotificationDetails to CefDictionaryValue. CefRefPtr ToCefValue( const content::AXLocationChangeNotificationDetails& locData) { CefRefPtr value = CefDictionaryValue::Create(); @@ -450,9 +479,9 @@ CefRefPtr ToCefValue(const std::vector& vecData) { namespace osr_accessibility_util { CefRefPtr ParseAccessibilityEventData( - const std::vector& data) { + const content::AXEventNotificationDetails& data) { CefRefPtr value = CefValue::Create(); - value->SetList(ToCefValue(data)); + value->SetDictionary(ToCefValue(data)); return value; } diff --git a/libcef/browser/osr/osr_accessibility_util.h b/libcef/browser/osr/osr_accessibility_util.h index cdae4e13f..486c91aae 100644 --- a/libcef/browser/osr/osr_accessibility_util.h +++ b/libcef/browser/osr/osr_accessibility_util.h @@ -19,7 +19,7 @@ namespace osr_accessibility_util { // Convert Accessibility Event and location updates to CefValue, which may be // consumed or serialized with CefJSONWrite. CefRefPtr ParseAccessibilityEventData( - const std::vector& data); + const content::AXEventNotificationDetails& data); CefRefPtr ParseAccessibilityLocationData( const std::vector& data); diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 04ced3c2c..233ee66d5 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -362,14 +362,14 @@ void CefRenderWidgetHostViewOSR::Show() { browser_compositor_->SetRenderWidgetHostIsHidden(false); #else delegated_frame_host_->SetCompositor(compositor_.get()); - delegated_frame_host_->WasShown( - GetLocalSurfaceId(), GetRootLayer()->bounds().size(), ui::LatencyInfo()); + delegated_frame_host_->WasShown(GetLocalSurfaceId(), + GetRootLayer()->bounds().size(), false); #endif // Note that |render_widget_host_| will retrieve size parameters from the // DelegatedFrameHost, so it must have WasShown called after. if (render_widget_host_) - render_widget_host_->WasShown(ui::LatencyInfo()); + render_widget_host_->WasShown(false); } void CefRenderWidgetHostViewOSR::Hide() { @@ -679,10 +679,6 @@ void CefRenderWidgetHostViewOSR::SetTooltipText( } } -gfx::Size CefRenderWidgetHostViewOSR::GetRequestedRendererSize() const { - return GetDelegatedFrameHost()->GetRequestedRendererSize(); -} - gfx::Size CefRenderWidgetHostViewOSR::GetCompositorViewportPixelSize() const { return gfx::ScaleToCeiledSize(GetRequestedRendererSize(), current_device_scale_factor_); @@ -1374,7 +1370,7 @@ void CefRenderWidgetHostViewOSR::ResizeRootLayer(bool force) { PlatformResizeCompositorWidget(size_in_pixels); bool resized = true; - GetDelegatedFrameHost()->SynchronizeVisualProperties( + GetDelegatedFrameHost()->EmbedSurface( local_surface_id_, size, cc::DeadlinePolicy::UseDefaultDeadline()); #endif // !defined(OS_MACOSX) diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index d1d41d794..5be8b8011 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -147,7 +147,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, void Destroy() override; void SetTooltipText(const base::string16& tooltip_text) override; - gfx::Size GetRequestedRendererSize() const override; gfx::Size GetCompositorViewportPixelSize() const override; void CopyFromSurface( const gfx::Rect& src_rect, diff --git a/libcef/browser/speech_recognition_manager_delegate.cc b/libcef/browser/speech_recognition_manager_delegate.cc index cb9fcb163..0d58abb71 100644 --- a/libcef/browser/speech_recognition_manager_delegate.cc +++ b/libcef/browser/speech_recognition_manager_delegate.cc @@ -21,8 +21,6 @@ #include "content/public/browser/speech_recognition_manager.h" #include "content/public/browser/speech_recognition_session_context.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/speech_recognition_error.h" -#include "content/public/common/speech_recognition_result.h" using content::BrowserThread; using content::SpeechRecognitionManager; @@ -52,11 +50,11 @@ void CefSpeechRecognitionManagerDelegate::OnAudioEnd(int session_id) {} void CefSpeechRecognitionManagerDelegate::OnRecognitionResults( int session_id, - const content::SpeechRecognitionResults& result) {} + const std::vector& result) {} void CefSpeechRecognitionManagerDelegate::OnRecognitionError( int session_id, - const content::SpeechRecognitionError& error) {} + const content::mojom::SpeechRecognitionError& error) {} void CefSpeechRecognitionManagerDelegate::OnAudioLevelsChange( int session_id, diff --git a/libcef/browser/speech_recognition_manager_delegate.h b/libcef/browser/speech_recognition_manager_delegate.h index bb8bb86f8..cfc7d6a98 100644 --- a/libcef/browser/speech_recognition_manager_delegate.h +++ b/libcef/browser/speech_recognition_manager_delegate.h @@ -31,10 +31,11 @@ class CefSpeechRecognitionManagerDelegate void OnRecognitionEnd(int session_id) override; void OnRecognitionResults( int session_id, - const content::SpeechRecognitionResults& result) override; + const std::vector& result) + override; void OnRecognitionError( int session_id, - const content::SpeechRecognitionError& error) override; + const content::mojom::SpeechRecognitionError& error) override; void OnAudioLevelsChange(int session_id, float volume, float noise_volume) override; diff --git a/libcef/common/extensions/api/_api_features.json b/libcef/common/extensions/api/_api_features.json index 74724b5c4..565166262 100644 --- a/libcef/common/extensions/api/_api_features.json +++ b/libcef/common/extensions/api/_api_features.json @@ -12,6 +12,10 @@ { // From chrome/common/extensions/api/_api_features.json. // Required by the PDF extension which is hosted in a guest view. + "contentSettings": { + "dependencies": ["permission:contentSettings"], + "contexts": ["blessed_extension"] + }, "mimeHandlerViewGuestInternal": { "internal": true, "contexts": "all", diff --git a/libcef/common/extensions/api/_permission_features.json b/libcef/common/extensions/api/_permission_features.json index e5a310010..54458e087 100644 --- a/libcef/common/extensions/api/_permission_features.json +++ b/libcef/common/extensions/api/_permission_features.json @@ -12,6 +12,10 @@ { // From chrome/common/extensions/api/_permission_features.json. // Required by the PDF extension which is hosted in a guest view. + "contentSettings": { + "channel": "stable", + "extension_types": ["extension", "legacy_packaged_app"] + }, "resourcesPrivate": { "channel": "stable", "extension_types": [ diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index 0933b76ad..519446b5c 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -687,9 +687,6 @@ void CefMainDelegate::InitializeResourceBundle() { std::string locale = command_line->GetSwitchValueASCII(switches::kLang); DCHECK(!locale.empty()); - // Avoid DCHECK() in ui::ResourceBundle::LoadChromeResources(). - ui::MaterialDesignController::Initialize(); - const std::string loaded_locale = ui::ResourceBundle::InitSharedInstanceWithLocale( locale, &content_client_, ui::ResourceBundle::LOAD_COMMON_RESOURCES); diff --git a/libcef/renderer/blink_glue.cc b/libcef/renderer/blink_glue.cc index 624da47b8..fae309692 100644 --- a/libcef/renderer/blink_glue.cc +++ b/libcef/renderer/blink_glue.cc @@ -18,6 +18,7 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/bindings/core/v8/script_source_code.h" #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_code_cache.h" #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/dom/element.h" #include "third_party/blink/renderer/core/dom/node.h" @@ -180,15 +181,15 @@ v8::MaybeLocal ExecuteV8ScriptAndReturnValue( // Based on V8ScriptRunner::CompileAndRunInternalScript: v8::ScriptCompiler::CompileOptions compile_options; - blink::V8ScriptRunner::ProduceCacheOptions produce_cache_options; + blink::V8CodeCache::ProduceCacheOptions produce_cache_options; v8::ScriptCompiler::NoCacheReason no_cache_reason; std::tie(compile_options, produce_cache_options, no_cache_reason) = - blink::V8ScriptRunner::GetCompileOptions(v8CacheOptions, ssc); + blink::V8CodeCache::GetCompileOptions(v8CacheOptions, ssc); // Currently internal scripts don't have cache handlers, so we should not // produce cache for them. DCHECK_EQ(produce_cache_options, - blink::V8ScriptRunner::ProduceCacheOptions::kNoProduceCache); + blink::V8CodeCache::ProduceCacheOptions::kNoProduceCache); v8::Local script; // Use default ReferrerScriptInfo here: diff --git a/libcef/renderer/browser_impl.cc b/libcef/renderer/browser_impl.cc index 4cac29295..dba284de3 100644 --- a/libcef/renderer/browser_impl.cc +++ b/libcef/renderer/browser_impl.cc @@ -110,7 +110,8 @@ void CefBrowserImpl::Reload() { if (render_view()->GetWebView()) { WebFrame* main_frame = render_view()->GetWebView()->MainFrame(); if (main_frame && main_frame->IsWebLocalFrame()) { - main_frame->ToWebLocalFrame()->Reload(blink::WebFrameLoadType::kReload); + main_frame->ToWebLocalFrame()->StartReload( + blink::WebFrameLoadType::kReload); } } } @@ -121,7 +122,7 @@ void CefBrowserImpl::ReloadIgnoreCache() { if (render_view()->GetWebView()) { WebFrame* main_frame = render_view()->GetWebView()->MainFrame(); if (main_frame && main_frame->IsWebLocalFrame()) { - main_frame->ToWebLocalFrame()->Reload( + main_frame->ToWebLocalFrame()->StartReload( blink::WebFrameLoadType::kReloadBypassingCache); } } @@ -313,7 +314,7 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) { blink::WebURLRequest request; CefRequestImpl::Get(params, request); - web_frame->LoadRequest(request); + web_frame->StartNavigation(request); } bool CefBrowserImpl::SendProcessMessage(CefProcessId target_process, diff --git a/libcef/renderer/extensions/extensions_dispatcher_delegate.cc b/libcef/renderer/extensions/extensions_dispatcher_delegate.cc index 71c425011..1a8a09efd 100644 --- a/libcef/renderer/extensions/extensions_dispatcher_delegate.cc +++ b/libcef/renderer/extensions/extensions_dispatcher_delegate.cc @@ -4,10 +4,24 @@ #include "libcef/renderer/extensions/extensions_dispatcher_delegate.h" +#include "base/feature_list.h" +#include "chrome/grit/renderer_resources.h" +#include "extensions/common/extension_features.h" +#include "extensions/renderer/resource_bundle_source_map.h" + namespace extensions { CefExtensionsDispatcherDelegate::CefExtensionsDispatcherDelegate() {} CefExtensionsDispatcherDelegate::~CefExtensionsDispatcherDelegate() {} +void CefExtensionsDispatcherDelegate::PopulateSourceMap( + extensions::ResourceBundleSourceMap* source_map) { + // These bindings are unnecessary with native bindings enabled. + if (!base::FeatureList::IsEnabled(extensions::features::kNativeCrxBindings)) { + // Custom types sources. + source_map->RegisterSource("ContentSetting", IDR_CONTENT_SETTING_JS); + } +} + } // namespace extensions diff --git a/libcef/renderer/extensions/extensions_dispatcher_delegate.h b/libcef/renderer/extensions/extensions_dispatcher_delegate.h index 2ab7e0b5d..3730f8fd9 100644 --- a/libcef/renderer/extensions/extensions_dispatcher_delegate.h +++ b/libcef/renderer/extensions/extensions_dispatcher_delegate.h @@ -15,6 +15,9 @@ class CefExtensionsDispatcherDelegate : public DispatcherDelegate { CefExtensionsDispatcherDelegate(); ~CefExtensionsDispatcherDelegate() override; + void PopulateSourceMap( + extensions::ResourceBundleSourceMap* source_map) override; + private: DISALLOW_COPY_AND_ASSIGN(CefExtensionsDispatcherDelegate); }; diff --git a/patch/patches/browser_compositor_mac.patch b/patch/patches/browser_compositor_mac.patch index 382bcdeca..f8132fd28 100644 --- a/patch/patches/browser_compositor_mac.patch +++ b/patch/patches/browser_compositor_mac.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h -index bc9eba153a6a..f6d2856e8eab 100644 +index 18c9e514c3b5..e3730ce40046 100644 --- content/browser/renderer_host/browser_compositor_view_mac.h +++ content/browser/renderer_host/browser_compositor_view_mac.h @@ -58,6 +58,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient, @@ -19,7 +19,7 @@ index bc9eba153a6a..f6d2856e8eab 100644 void DidCreateNewRendererCompositorFrameSink( viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink); diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm -index bc1492dee443..7ebf4188f2c8 100644 +index 65f1326ef578..446e93703e7b 100644 --- content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm @@ -240,6 +240,12 @@ BrowserCompositorMac::~BrowserCompositorMac() { diff --git a/patch/patches/browser_plugin_guest_1565.patch b/patch/patches/browser_plugin_guest_1565.patch index a747ff84a..82b6e8ae5 100644 --- a/patch/patches/browser_plugin_guest_1565.patch +++ b/patch/patches/browser_plugin_guest_1565.patch @@ -266,7 +266,7 @@ index d05dd5421458..fa13775f0512 100644 // a BrowserPlugin even when we are using cross process frames for guests. It // should be removed after resolving https://crbug.com/642826). diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index 8aa4bd7ffca6..0a649863f381 100644 +index 0c4649ffaa91..2fa0631063ed 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 @@ -193,6 +193,8 @@ void MimeHandlerViewGuest::CreateWebContents( @@ -277,7 +277,7 @@ index 8aa4bd7ffca6..0a649863f381 100644 + delegate_->OverrideWebContentsCreateParams(¶ms); // TODO(erikchen): Fix ownership semantics for guest views. // https://crbug.com/832879. - callback.Run(WebContents::Create(params).release()); + std::move(callback).Run(WebContents::Create(params).release()); @@ -228,6 +230,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { return true; } @@ -298,7 +298,7 @@ index 8aa4bd7ffca6..0a649863f381 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 7f0df3d7dc3a..82e2e8a8cdc6 100644 +index adcb0864ba28..f0ba4efc277a 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 @@ -108,6 +108,10 @@ class MimeHandlerViewGuest : diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 40c310617..95e038423 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 b8a22d99f3cf..da1d8cfcf86a 100644 +index fa2126cb222c..e8544c6dff5a 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/features.gni") @@ -10,7 +10,7 @@ index b8a22d99f3cf..da1d8cfcf86a 100644 import("//chrome/common/features.gni") import("//components/feature_engagement/features.gni") import("//components/feed/features.gni") -@@ -1594,6 +1595,7 @@ jumbo_split_static_library("browser") { +@@ -1616,6 +1617,7 @@ jumbo_split_static_library("browser") { "//base:i18n", "//base/allocator:buildflags", "//cc", @@ -18,7 +18,7 @@ index b8a22d99f3cf..da1d8cfcf86a 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -1860,6 +1862,10 @@ jumbo_split_static_library("browser") { +@@ -1885,6 +1887,10 @@ jumbo_split_static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index 0b007cfda..59cc18bed 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc -index 607dfe4d4c99..27e55b7f6b2d 100644 +index eae14e50a894..62da11525b4f 100644 --- chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -7,6 +7,7 @@ @@ -36,7 +36,7 @@ index 607dfe4d4c99..27e55b7f6b2d 100644 #endif } -@@ -87,9 +98,15 @@ scoped_refptr +@@ -87,10 +98,16 @@ scoped_refptr /*store_last_modified=*/true)); #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -45,7 +45,8 @@ index 607dfe4d4c99..27e55b7f6b2d 100644 +#endif // These must be registered before before the HostSettings are passed over to // the IOThread. Simplest to do this on construction. - ExtensionService::RegisterContentSettings(settings_map.get(), profile); + extensions::ExtensionService::RegisterContentSettings(settings_map.get(), + profile); +#if BUILDFLAG(ENABLE_CEF) + } +#endif diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index cc418e715..568d8aa3c 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -70,10 +70,10 @@ 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 fc316ed90cfd..eef294ac6985 100644 +index 447db8165e88..c0d93c351580 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -379,7 +379,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -382,7 +382,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, content::NotificationService::AllSources()); diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index c31e6aa6e..d22b227db 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -157,10 +157,10 @@ index 484e07af5a98..0e62e20095c7 100644 // If we broke out of the loop, we have found an enabled plugin. bool enabled = i < matching_plugins.size(); diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index 64a3c7982c9f..a336bbd7f98b 100644 +index f0a93eb48969..a4e12d0ec28e 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -765,6 +765,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -762,6 +762,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -168,7 +168,7 @@ index 64a3c7982c9f..a336bbd7f98b 100644 observer->IsPluginTemporarilyAllowed(identifier)) { status = chrome::mojom::PluginStatus::kAllowed; } -@@ -952,7 +953,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -949,7 +950,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( &plugin_auth_host); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -178,7 +178,7 @@ index 64a3c7982c9f..a336bbd7f98b 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -961,7 +963,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -958,7 +960,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -188,7 +188,7 @@ index 64a3c7982c9f..a336bbd7f98b 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -971,7 +974,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -968,7 +971,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -198,7 +198,7 @@ index 64a3c7982c9f..a336bbd7f98b 100644 break; } case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -979,7 +983,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -976,7 +980,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( IDR_BLOCKED_PLUGIN_HTML, l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, group_name)); diff --git a/patch/patches/compositor_1368.patch b/patch/patches/compositor_1368.patch index c9c0cd83c..344a451fd 100644 --- a/patch/patches/compositor_1368.patch +++ b/patch/patches/compositor_1368.patch @@ -1,8 +1,8 @@ diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc -index e679dbb02a81..d90a276fc0e1 100644 +index 32cd0a269af4..31d419d3e14d 100644 --- content/browser/compositor/gpu_process_transport_factory.cc +++ content/browser/compositor/gpu_process_transport_factory.cc -@@ -507,10 +507,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( +@@ -494,10 +494,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( // surfaces as they are not following the correct mode. DisableGpuCompositing(compositor.get()); } @@ -26,7 +26,7 @@ index e679dbb02a81..d90a276fc0e1 100644 } else { DCHECK(context_provider); diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index eb250697ebd6..24910afc962c 100644 +index c2f670f2726f..98282dc3fc70 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -24,6 +24,7 @@ @@ -37,8 +37,8 @@ index eb250697ebd6..24910afc962c 100644 #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkMatrix44.h" #include "ui/compositor/compositor_animation_observer.h" -@@ -183,6 +184,17 @@ class COMPOSITOR_EXPORT ContextFactory { - virtual void RemoveObserver(ContextFactoryObserver* observer) = 0; +@@ -190,6 +191,17 @@ class COMPOSITOR_EXPORT ContextFactory { + virtual bool SyncTokensRequiredForDisplayCompositor() = 0; }; +class COMPOSITOR_EXPORT CompositorDelegate { @@ -55,7 +55,7 @@ index eb250697ebd6..24910afc962c 100644 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -222,6 +234,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -229,6 +241,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -65,7 +65,7 @@ index eb250697ebd6..24910afc962c 100644 // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -447,6 +462,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -457,6 +472,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, ui::ContextFactory* context_factory_; ui::ContextFactoryPrivate* context_factory_private_; diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 79efea01f..1267bcb4e 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -94,10 +94,10 @@ index b23698013a09..d60eb48c6efd 100644 "WillFailRequest state should come before WillProcessResponse"); return render_frame_host_; diff --git content/browser/frame_host/render_frame_host_impl.cc content/browser/frame_host/render_frame_host_impl.cc -index 2ef1f5b667fa..c0296f748648 100644 +index 968f4bfd098f..035c093e5a2c 100644 --- content/browser/frame_host/render_frame_host_impl.cc +++ content/browser/frame_host/render_frame_host_impl.cc -@@ -1568,6 +1568,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( +@@ -1593,6 +1593,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( if (GetNavigationHandle()) { GetNavigationHandle()->set_net_error_code( static_cast(params.error_code)); @@ -105,20 +105,7 @@ index 2ef1f5b667fa..c0296f748648 100644 } frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); -@@ -3328,9 +3329,9 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() { - BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); - - if (base::FeatureList::IsEnabled(network::features::kNetworkService)) { -- StoragePartitionImpl* storage_partition = -- static_cast(BrowserContext::GetStoragePartition( -- GetSiteInstance()->GetBrowserContext(), GetSiteInstance())); -+ StoragePartition* storage_partition = -+ BrowserContext::GetStoragePartition( -+ GetSiteInstance()->GetBrowserContext(), GetSiteInstance()); - // TODO(https://crbug.com/813479): Investigate why we need to explicitly - // specify task runner for BrowserThread::IO here. - // Bind calls to the BindRegistry should come on to the IO thread by -@@ -3606,9 +3607,9 @@ void RenderFrameHostImpl::CommitNavigation( +@@ -3612,9 +3613,9 @@ void RenderFrameHostImpl::CommitNavigation( // however only do this for cross-document navigations, because the // alternative would be redundant effort. network::mojom::URLLoaderFactoryPtrInfo default_factory_info; @@ -131,7 +118,7 @@ index 2ef1f5b667fa..c0296f748648 100644 if (subresource_loader_params && subresource_loader_params->loader_factory_info.is_valid()) { // If the caller has supplied a default URLLoaderFactory override (for -@@ -4300,8 +4301,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve( +@@ -4334,8 +4335,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve( RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory( this, false /* is_navigation */, false /* is_download */, &default_factory_request); @@ -142,6 +129,17 @@ index 2ef1f5b667fa..c0296f748648 100644 if (g_create_network_factory_callback_for_test.Get().is_null()) { storage_partition->GetNetworkContext()->CreateURLLoaderFactory( std::move(default_factory_request), std::move(params)); +@@ -4622,8 +4623,8 @@ void RenderFrameHostImpl::ConnectToPrefetchURLLoaderService( + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService)); + auto* storage_partition = +- static_cast(BrowserContext::GetStoragePartition( +- GetSiteInstance()->GetBrowserContext(), GetSiteInstance())); ++ BrowserContext::GetStoragePartition( ++ GetSiteInstance()->GetBrowserContext(), GetSiteInstance()); + auto subresource_factories = CloneSubresourceFactories(); + // Make sure that file: URL is available only when the origin of the last + // commited URL is for file:. This should be always true as far as diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc index 91bf248a67a5..ede635e9ef44 100644 --- content/browser/frame_host/render_frame_message_filter.cc @@ -275,10 +273,10 @@ index 4e11056a3dc9..973ad50975e1 100644 const std::string& mime_type, bool allow_wildcard, diff --git content/common/frame_messages.h content/common/frame_messages.h -index 3ed93bdae0e3..c03780d69cfb 100644 +index 6375b644540c..b9ccfdb14dea 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -1363,8 +1363,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -1369,8 +1369,9 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, // Used to get the list of plugins. |main_frame_origin| is used to handle // exceptions for plugin content settings. @@ -289,7 +287,7 @@ index 3ed93bdae0e3..c03780d69cfb 100644 url::Origin /* main_frame_origin */, std::vector /* plugins */) -@@ -1372,9 +1373,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins, +@@ -1378,9 +1379,10 @@ IPC_SYNC_MESSAGE_CONTROL2_1(FrameHostMsg_GetPlugins, // type. If there is no matching plugin, |found| is false. // |actual_mime_type| is the actual mime type supported by the // found plugin. @@ -302,10 +300,10 @@ index 3ed93bdae0e3..c03780d69cfb 100644 std::string /* mime_type */, bool /* found */, diff --git content/ppapi_plugin/ppapi_blink_platform_impl.cc content/ppapi_plugin/ppapi_blink_platform_impl.cc -index cdfffa0cab11..5b61d86d5d42 100644 +index 5f6c08be7e96..2bc2d6659810 100644 --- content/ppapi_plugin/ppapi_blink_platform_impl.cc +++ content/ppapi_plugin/ppapi_blink_platform_impl.cc -@@ -189,6 +189,7 @@ blink::WebThemeEngine* PpapiBlinkPlatformImpl::ThemeEngine() { +@@ -196,6 +196,7 @@ blink::WebThemeEngine* PpapiBlinkPlatformImpl::ThemeEngine() { void PpapiBlinkPlatformImpl::GetPluginList( bool refresh, @@ -350,7 +348,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 6dd2589d653a..2a604fb6b14f 100644 +index 5395f8eb0736..8543081de7d0 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -74,6 +74,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -363,7 +361,7 @@ index 6dd2589d653a..2a604fb6b14f 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -351,6 +354,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -352,6 +355,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -389,10 +387,10 @@ index 74a031ad10c3..3b3f9e292f4b 100644 virtual void FocusedNodeChanged(const blink::WebNode& node) {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index fd8ec4750c17..714c46e6f3ed 100644 +index ae67d75b76b8..98b38322e68c 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -3253,7 +3253,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -3292,7 +3292,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -402,7 +400,7 @@ index fd8ec4750c17..714c46e6f3ed 100644 params.mime_type.Utf8(), &found, &info, &mime_type)); if (!found) return nullptr; -@@ -3610,6 +3611,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { +@@ -3650,6 +3651,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) { void RenderFrameImpl::FrameFocused() { Send(new FrameHostMsg_FrameFocused(routing_id_)); @@ -412,10 +410,10 @@ index fd8ec4750c17..714c46e6f3ed 100644 void RenderFrameImpl::WillCommitProvisionalLoad() { diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index 1e68c2fee634..75d5dfade01f 100644 +index 204a30082489..e091b7d8feab 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -876,6 +876,8 @@ void RenderThreadImpl::Init( +@@ -866,6 +866,8 @@ void RenderThreadImpl::Init( StartServiceManagerConnection(); @@ -425,10 +423,10 @@ index 1e68c2fee634..75d5dfade01f 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 4205c92765af..5541af8b7b7e 100644 +index 635a6c368466..38c8aef73844 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -767,6 +767,7 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor( +@@ -787,12 +787,14 @@ RendererBlinkPlatformImpl::CreateMIDIAccessor( void RendererBlinkPlatformImpl::GetPluginList( bool refresh, @@ -436,9 +434,7 @@ index 4205c92765af..5541af8b7b7e 100644 const blink::WebSecurityOrigin& mainFrameOrigin, blink::WebPluginListBuilder* builder) { #if BUILDFLAG(ENABLE_PLUGINS) -@@ -774,7 +775,8 @@ void RendererBlinkPlatformImpl::GetPluginList( - if (!plugin_refresh_allowed_) - refresh = false; + std::vector plugins; RenderThread::Get()->Send( - new FrameHostMsg_GetPlugins(refresh, mainFrameOrigin, &plugins)); + new FrameHostMsg_GetPlugins(refresh, isMainFrame, mainFrameOrigin, @@ -446,7 +442,7 @@ index 4205c92765af..5541af8b7b7e 100644 for (const WebPluginInfo& plugin : plugins) { builder->AddPlugin(WebString::FromUTF16(plugin.name), WebString::FromUTF16(plugin.desc), -@@ -1264,6 +1266,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() { +@@ -1214,6 +1216,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() { base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); } @@ -462,18 +458,18 @@ index 4205c92765af..5541af8b7b7e 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 ecb5ce6d6aa0..0733b16b5cd3 100644 +index 8fa06edcbd6f..e6a3da8f46d0 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h @@ -122,6 +122,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { - viz::FrameSinkId GenerateFrameSinkId() override; + bool IsLockedToSite() const override; void GetPluginList(bool refresh, + bool isMainFrame, const blink::WebSecurityOrigin& mainFrameOrigin, blink::WebPluginListBuilder* builder) override; blink::WebPublicSuffixList* PublicSuffixList() override; -@@ -241,6 +242,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -236,6 +237,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { mojo::ScopedDataPipeConsumerHandle handle) override; void RequestPurgeMemory() override; @@ -532,7 +528,7 @@ index 84bed37848d9..1a66c0757437 100644 const std::string& mime_type, bool allow_wildcard, diff --git content/test/test_blink_web_unit_test_support.cc content/test/test_blink_web_unit_test_support.cc -index 84fcd3a10415..230ad9a26961 100644 +index 72e440c2c083..6a88a8ca4fbc 100644 --- content/test/test_blink_web_unit_test_support.cc +++ content/test/test_blink_web_unit_test_support.cc @@ -336,6 +336,7 @@ blink::WebThread* TestBlinkWebUnitTestSupport::CurrentThread() { @@ -544,7 +540,7 @@ index 84fcd3a10415..230ad9a26961 100644 blink::WebPluginListBuilder* builder) { builder->AddPlugin("pdf", "pdf", "pdf-files", SkColorSetRGB(38, 38, 38)); diff --git content/test/test_blink_web_unit_test_support.h content/test/test_blink_web_unit_test_support.h -index 3e9fdf28d72f..94880b599ada 100644 +index 3d0c7df795d9..dee79a34eb66 100644 --- content/test/test_blink_web_unit_test_support.h +++ content/test/test_blink_web_unit_test_support.h @@ -62,6 +62,7 @@ class TestBlinkWebUnitTestSupport : public BlinkPlatformImpl { diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 3d6bb24b7..5eb91d119 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -45,7 +45,7 @@ index bcf172e645a2..f879aa745adf 100644 // on the given |command_line|. void SetCrashKeysFromCommandLine(const base::CommandLine& command_line); diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn -index 6cdabcb46a36..1e70786f8317 100644 +index c4744fbd2a78..05d10cc09d69 100644 --- chrome_elf/BUILD.gn +++ chrome_elf/BUILD.gn @@ -7,6 +7,7 @@ diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index 8e795d2d5..7fd661899 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 f94e4e744e96..91786643298f 100644 +index cf4f3e8463ba..8d0d261df1ec 100644 --- third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn @@ -12,6 +12,7 @@ diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index c3f9d1b01..2e01880a7 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -27,10 +27,10 @@ index 53c7404ef1f9..ac33df7cfe0e 100644 auto* browser_context = web_contents->GetBrowserContext(); StreamsPrivateAPI* streams_private = GetStreamsPrivateAPI(browser_context); diff --git content/browser/frame_host/render_frame_host_manager.cc content/browser/frame_host/render_frame_host_manager.cc -index 7f6e27181267..26080b6d61e0 100644 +index 1afa9972b8ad..ad51e305b31e 100644 --- content/browser/frame_host/render_frame_host_manager.cc +++ content/browser/frame_host/render_frame_host_manager.cc -@@ -897,10 +897,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( +@@ -907,10 +907,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 7f6e27181267..26080b6d61e0 100644 return true; } -@@ -1041,7 +1042,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( +@@ -1051,7 +1052,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( // Double-check that the new SiteInstance is associated with the right // BrowserContext. @@ -57,10 +57,10 @@ index 7f6e27181267..26080b6d61e0 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 e9c6b810e050..e5dbbc6dbc02 100644 +index 8bcced1f4bf8..c17119e455de 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -373,6 +373,13 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -375,6 +375,13 @@ class CONTENT_EXPORT ContentBrowserClient { // Returns true if error page should be isolated in its own process. virtual bool ShouldIsolateErrorPage(bool in_main_frame); @@ -75,7 +75,7 @@ index e9c6b810e050..e5dbbc6dbc02 100644 // current SiteInstance, if it does not yet have a site. virtual bool ShouldAssignSiteForURL(const GURL& url); diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc -index 294243d2e7de..867bbf9ac3a2 100644 +index ea08a7efdbe2..e01b98fd4552 100644 --- extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc @@ -68,11 +68,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, @@ -219,10 +219,10 @@ index 9e8ebb1a4d59..b42e88b11f6a 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 fec28715c0fe..74564954904f 100644 +index 73a77af25cfc..27d940d5b46c 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -351,9 +351,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -350,9 +350,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, return true; // TODO(kalman): return false here? It might break things... DVLOG(1) << "CreateBackgroundHost " << extension->id(); diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index f27abaf2b..5a95cb86d 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -77,7 +77,7 @@ index 4d9d1f45f870..c668f93a50f3 100644 goma_prefix = "" } diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py -index d63b131aea35..6aca4e2cc56e 100644 +index 7405c61df323..4df7c57fe72f 100644 --- build/toolchain/win/setup_toolchain.py +++ build/toolchain/win/setup_toolchain.py @@ -134,25 +134,28 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store): @@ -129,7 +129,7 @@ index d63b131aea35..6aca4e2cc56e 100644 diff --git build/vs_toolchain.py build/vs_toolchain.py -index 0abf143029cc..7e163f846982 100755 +index aeb7bdadc73e..84b8541f1ff3 100755 --- build/vs_toolchain.py +++ build/vs_toolchain.py @@ -82,11 +82,18 @@ def SetEnvironmentAndGetRuntimeDllDirs(): @@ -165,7 +165,7 @@ index fde31eb044ed..b4fd21636719 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 5c940dde6d9c..1cc058e51c5b 100644 +index 7189a44f5c31..1a83b3ea6325 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -133,7 +133,7 @@ template("generate_mini_installer") { diff --git a/patch/patches/linux_build.patch b/patch/patches/linux_build.patch index 836b1d3c1..294b7856c 100644 --- a/patch/patches/linux_build.patch +++ b/patch/patches/linux_build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index 83337d52e4b9..384edb6623a4 100644 +index b7ad87f06562..e3ccb39deb36 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -155,7 +155,7 @@ declare_args() { +@@ -152,7 +152,7 @@ declare_args() { !(is_android && use_order_profiling) && (use_lld || (use_gold && diff --git a/patch/patches/net_filter_515.patch b/patch/patches/net_filter_515.patch index 95b0cb90a..f86e61ff1 100644 --- a/patch/patches/net_filter_515.patch +++ b/patch/patches/net_filter_515.patch @@ -22,10 +22,10 @@ index e3b6502ff7ee..a3b4b2d40d5f 100644 THREAD_CHECKER(thread_checker_); diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc -index 2dad8a230652..71666b08a212 100644 +index ce35b438d7a2..3cc110b6fd4c 100644 --- net/url_request/url_request_job.cc +++ net/url_request/url_request_job.cc -@@ -450,6 +450,12 @@ void URLRequestJob::NotifyHeadersComplete() { +@@ -460,6 +460,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 c0c945ee6..c5315b85a 100644 --- a/patch/patches/net_urlrequest_1327.patch +++ b/patch/patches/net_urlrequest_1327.patch @@ -1,10 +1,10 @@ diff --git net/url_request/url_request.h net/url_request/url_request.h -index 57273101f211..cbd357b4d910 100644 +index 13b7326d6d50..d9b1dac19cd8 100644 --- net/url_request/url_request.h +++ net/url_request/url_request.h -@@ -712,10 +712,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { - void set_socket_tag(const SocketTag& socket_tag); - const SocketTag& socket_tag() const { return socket_tag_; } +@@ -723,10 +723,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { + } + bool upgrade_if_insecure() const { return upgrade_if_insecure_; } - protected: // Allow the URLRequestJob class to control the is_pending() flag. diff --git a/patch/patches/pdfium_print_549365.patch b/patch/patches/pdfium_print_549365.patch index e607147ff..3ea210c64 100644 --- a/patch/patches/pdfium_print_549365.patch +++ b/patch/patches/pdfium_print_549365.patch @@ -1,8 +1,8 @@ diff --git BUILD.gn BUILD.gn -index 0535423d8..8fdbc5c84 100644 +index 3422b8153..c3bba36c1 100644 --- BUILD.gn +++ BUILD.gn -@@ -244,6 +244,10 @@ jumbo_static_library("pdfium") { +@@ -248,6 +248,10 @@ jumbo_static_library("pdfium") { complete_static_lib = true configs -= [ "//build/config/compiler:thin_archive" ] } @@ -14,10 +14,10 @@ index 0535423d8..8fdbc5c84 100644 jumbo_static_library("test_support") { diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp -index 6c4ad6020..bb069b005 100644 +index 96de5d56e..f4ec36618 100644 --- fpdfsdk/fpdf_view.cpp +++ fpdfsdk/fpdf_view.cpp -@@ -37,6 +37,7 @@ +@@ -38,6 +38,7 @@ #include "fpdfsdk/cpdfsdk_memoryaccess.h" #include "fpdfsdk/cpdfsdk_pageview.h" #include "fpdfsdk/ipdfsdk_pauseadapter.h" @@ -25,7 +25,7 @@ index 6c4ad6020..bb069b005 100644 #include "fxjs/ijs_runtime.h" #include "public/fpdf_formfill.h" #include "third_party/base/ptr_util.h" -@@ -193,6 +194,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() { +@@ -198,6 +199,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() { CPDF_ModuleMgr::Destroy(); CFX_GEModule::Destroy(); diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index ee0019a41..5b4f40ca3 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -1,8 +1,8 @@ diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h -index e3c46fdf48c7..8ca2e54e13a3 100644 +index 57f03dc1ed38..061bf10c07aa 100644 --- content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h -@@ -189,6 +189,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) +@@ -190,6 +190,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) @@ -11,7 +11,7 @@ index e3c46fdf48c7..8ca2e54e13a3 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 c5f6d0b03ba6..4951f816e407 100644 +index 8ecb8383f9f6..fa6d9bef0ffb 100644 --- content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc @@ -178,6 +178,7 @@ WebPreferences::WebPreferences() @@ -23,7 +23,7 @@ index c5f6d0b03ba6..4951f816e407 100644 record_whole_document(false), save_previous_document_resources(SavePreviousDocumentResources::NEVER), diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h -index a1e9fba06a66..c37d89755744 100644 +index 78cbf5f3db86..9a4906a32336 100644 --- content/public/common/web_preferences.h +++ content/public/common/web_preferences.h @@ -198,6 +198,7 @@ struct CONTENT_EXPORT WebPreferences { @@ -35,10 +35,10 @@ index a1e9fba06a66..c37d89755744 100644 bool record_whole_document; SavePreviousDocumentResources save_previous_document_resources; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index 4aba7a9e290e..3a26dab9d31d 100644 +index 4a2a3fac30ae..79f1e8192c9d 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -1194,6 +1194,7 @@ void RenderViewImpl::ApplyWebPreferencesInternal( +@@ -1227,6 +1227,7 @@ void RenderViewImpl::ApplyWebPreferencesInternal( blink::WebView* web_view, CompositorDependencies* compositor_deps) { ApplyWebPreferences(prefs, web_view); diff --git a/patch/patches/print_header_footer_1478_1565.patch b/patch/patches/print_header_footer_1478_1565.patch index 5e416b6c1..314e04412 100644 --- a/patch/patches/print_header_footer_1478_1565.patch +++ b/patch/patches/print_header_footer_1478_1565.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 3b9eb8dc8ca7..c37db3071302 100644 +index 5734c8471ba4..2eadc767d8fe 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn -@@ -894,6 +894,7 @@ split_static_library("ui") { +@@ -896,6 +896,7 @@ split_static_library("ui") { "//base:i18n", "//base/allocator:buildflags", "//cc/paint", @@ -242,10 +242,10 @@ index cd3fe2986af2..6b377d0ad476 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 af18233bc509..56da4e5a3ed9 100644 +index a1ca0fcadf3d..acd81619b0f6 100644 --- components/printing/renderer/print_render_frame_helper.cc +++ components/printing/renderer/print_render_frame_helper.cc -@@ -338,7 +338,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, +@@ -340,7 +340,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, return plugin && plugin->SupportsPaginatedPrint(); } @@ -253,7 +253,7 @@ index af18233bc509..56da4e5a3ed9 100644 // Returns true if the current destination printer is PRINT_TO_PDF. bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) { bool print_to_pdf = false; -@@ -360,7 +359,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, +@@ -362,7 +361,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, } return frame_has_custom_page_size_style; } @@ -261,7 +261,7 @@ index af18233bc509..56da4e5a3ed9 100644 #if BUILDFLAG(ENABLE_PRINTING) // Disable scaling when either: -@@ -415,7 +413,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, +@@ -417,7 +415,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, : PRINTABLE_AREA_MARGINS; } @@ -269,7 +269,7 @@ index af18233bc509..56da4e5a3ed9 100644 bool FitToPageEnabled(const base::DictionaryValue& job_settings) { bool fit_to_paper_size = false; if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) { -@@ -457,7 +454,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( +@@ -459,7 +456,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( } return blink::kWebPrintScalingOptionFitToPrintableArea; } diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index 6dcd46788..f2cc5de0e 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 aefe11960955..7d5cdbead3f8 100644 +index 9987ac296f63..829b7fe0decc 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -726,10 +726,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { +@@ -718,10 +718,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -19,7 +19,7 @@ index aefe11960955..7d5cdbead3f8 100644 } void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -1924,6 +1926,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -1917,6 +1919,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { if (frame_sink_id_.is_valid()) window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/service_manager_654986.patch b/patch/patches/service_manager_654986.patch index e0129ae71..017ccd0c7 100644 --- a/patch/patches/service_manager_654986.patch +++ b/patch/patches/service_manager_654986.patch @@ -1,5 +1,5 @@ diff --git services/service_manager/embedder/main.cc services/service_manager/embedder/main.cc -index fdff39ef3345..60f8a1dc7545 100644 +index 80d366e269b2..9ba957a08e65 100644 --- services/service_manager/embedder/main.cc +++ services/service_manager/embedder/main.cc @@ -300,13 +300,30 @@ int RunService(MainDelegate* delegate) { @@ -136,7 +136,7 @@ index fdff39ef3345..60f8a1dc7545 100644 } diff --git services/service_manager/embedder/main.h services/service_manager/embedder/main.h -index e86697a26d0f..771acd80a3e1 100644 +index d2359a7723df..14cc0078619a 100644 --- services/service_manager/embedder/main.h +++ services/service_manager/embedder/main.h @@ -5,9 +5,15 @@ diff --git a/patch/patches/storage_partition_1973.patch b/patch/patches/storage_partition_1973.patch index 28e035807..340c7fcfe 100644 --- a/patch/patches/storage_partition_1973.patch +++ b/patch/patches/storage_partition_1973.patch @@ -111,10 +111,10 @@ index 69271e39f274..529af0b12e20 100644 CHECK(GetUserData(kMojoWasInitialized)) << "Attempting to destroy a BrowserContext that never called " diff --git content/browser/devtools/protocol/network_handler.cc content/browser/devtools/protocol/network_handler.cc -index b8ea9fc92052..a27ec3fb7607 100644 +index 65d2b979fc14..8efcf3d986c0 100644 --- content/browser/devtools/protocol/network_handler.cc +++ content/browser/devtools/protocol/network_handler.cc -@@ -902,8 +902,7 @@ class BackgroundSyncRestorer { +@@ -945,8 +945,7 @@ class BackgroundSyncRestorer { scoped_refptr service_worker_host = static_cast(host.get()); scoped_refptr sync_context = @@ -161,10 +161,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 081c7a2c2f13..0699f88da38b 100644 +index d9873b33fb85..998d35106dca 100644 --- content/browser/download/download_manager_impl.cc +++ content/browser/download/download_manager_impl.cc -@@ -84,9 +84,9 @@ +@@ -86,9 +86,9 @@ namespace content { namespace { @@ -177,7 +177,7 @@ index 081c7a2c2f13..0699f88da38b 100644 DCHECK_CURRENTLY_ON(BrowserThread::UI); SiteInstance* site_instance = nullptr; -@@ -96,8 +96,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context, +@@ -98,8 +98,7 @@ StoragePartitionImpl* GetStoragePartition(BrowserContext* context, if (render_frame_host_) site_instance = render_frame_host_->GetSiteInstance(); } @@ -187,7 +187,7 @@ index 081c7a2c2f13..0699f88da38b 100644 } bool CanRequestURLFromRenderer(int render_process_id, GURL url) { -@@ -250,7 +249,7 @@ base::FilePath GetTemporaryDownloadDirectory() { +@@ -252,7 +251,7 @@ base::FilePath GetTemporaryDownloadDirectory() { #endif scoped_refptr @@ -196,7 +196,7 @@ index 081c7a2c2f13..0699f88da38b 100644 RenderFrameHost* rfh, bool is_download) { network::mojom::URLLoaderFactoryPtrInfo proxy_factory_ptr_info; -@@ -267,7 +266,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition, +@@ -269,7 +268,7 @@ CreateDownloadURLLoaderFactoryGetter(StoragePartitionImpl* storage_partition, } } return base::MakeRefCounted( @@ -205,7 +205,7 @@ index 081c7a2c2f13..0699f88da38b 100644 std::move(proxy_factory_ptr_info), std::move(proxy_factory_request)); } -@@ -1004,7 +1003,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( +@@ -1018,7 +1017,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( tab_referrer_url = entry->GetReferrer().url; } } @@ -214,9 +214,9 @@ index 081c7a2c2f13..0699f88da38b 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, -@@ -1050,10 +1049,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( - base::MakeRefCounted( - params->url(), std::move(blob_data_handle)); +@@ -1068,10 +1067,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( + base::MakeRefCounted( + params->url(), browser_context_->GetPath()); } else { - StoragePartitionImpl* storage_partition = - static_cast( @@ -228,10 +228,10 @@ index 081c7a2c2f13..0699f88da38b 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 3dc150704988..4fb316246c4a 100644 +index ea9f9f31fa80..dceece69c291 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -936,7 +936,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController +@@ -987,7 +987,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_, @@ -240,7 +240,7 @@ index 3dc150704988..4fb316246c4a 100644 false /* allow_wildcard */, &stale, &plugin, nullptr); if (stale) { -@@ -1263,7 +1263,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( +@@ -1323,7 +1323,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( network::mojom::URLLoaderFactoryPtrInfo proxied_factory_info; network::mojom::URLLoaderFactoryRequest proxied_factory_request; @@ -249,7 +249,7 @@ index 3dc150704988..4fb316246c4a 100644 if (frame_tree_node) { // |frame_tree_node| may be null in some unit test environments. GetContentClient() -@@ -1311,7 +1311,8 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( +@@ -1371,7 +1371,8 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( DCHECK(!request_controller_); request_controller_ = std::make_unique( std::move(initial_interceptors), std::move(new_request), resource_context, @@ -276,10 +276,10 @@ index 6a6e31bdb070..dce0433e1775 100644 partition->GetPaymentAppContext(); diff --git content/browser/payments/payment_app_provider_impl.cc content/browser/payments/payment_app_provider_impl.cc -index dd0af046aec4..f5ad5b37c1f3 100644 +index 1c36dd8f388c..c294ba21ebdb 100644 --- content/browser/payments/payment_app_provider_impl.cc +++ content/browser/payments/payment_app_provider_impl.cc -@@ -371,10 +371,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context, +@@ -368,10 +368,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context, ServiceWorkerStartCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -294,7 +294,7 @@ index dd0af046aec4..f5ad5b37c1f3 100644 BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, -@@ -451,8 +452,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps( +@@ -448,8 +449,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps( GetAllPaymentAppsCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -306,10 +306,10 @@ index dd0af046aec4..f5ad5b37c1f3 100644 partition->GetPaymentAppContext(); diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc -index deece35f627d..2c29eaf50bc9 100644 +index 11d5369b25bf..8351c27b2806 100644 --- content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -721,11 +721,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, +@@ -728,11 +728,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, // Gets the correct render process to use for this SiteInstance. RenderProcessHost* GetProcessHost(SiteInstance* site_instance, bool is_for_guests_only) { @@ -325,7 +325,7 @@ index deece35f627d..2c29eaf50bc9 100644 // Is this the default storage partition? If it isn't, then just give it its // own non-shared process. -@@ -1332,7 +1331,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { +@@ -1344,7 +1343,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { // static RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( BrowserContext* browser_context, @@ -334,7 +334,7 @@ index deece35f627d..2c29eaf50bc9 100644 SiteInstance* site_instance, bool is_for_guests_only) { if (g_render_process_host_factory_) { -@@ -1341,8 +1340,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( +@@ -1353,8 +1352,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( } if (!storage_partition_impl) { @@ -345,7 +345,7 @@ index deece35f627d..2c29eaf50bc9 100644 } // If we've made a StoragePartition for guests (e.g., for the tag), // stash the Site URL on it. This way, when we start a service worker inside -@@ -1367,7 +1366,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = +@@ -1379,7 +1378,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = RenderProcessHostImpl::RenderProcessHostImpl( BrowserContext* browser_context, @@ -354,7 +354,7 @@ index deece35f627d..2c29eaf50bc9 100644 bool is_for_guests_only) : fast_shutdown_started_(false), deleting_soon_(false), -@@ -1400,7 +1399,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1412,7 +1411,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( indexed_db_factory_(new IndexedDBDispatcherHost( id_, storage_partition_impl_->GetURLRequestContext(), @@ -364,7 +364,7 @@ index deece35f627d..2c29eaf50bc9 100644 ChromeBlobStorageContext::GetFor(browser_context_))), channel_connected_(false), sent_render_process_ready_(false), -@@ -1435,7 +1435,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1447,7 +1447,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( } push_messaging_manager_.reset(new PushMessagingManager( @@ -374,7 +374,7 @@ index deece35f627d..2c29eaf50bc9 100644 AddObserver(indexed_db_factory_.get()); #if defined(OS_MACOSX) -@@ -1768,6 +1769,17 @@ void RenderProcessHostImpl::ResetChannelProxy() { +@@ -1773,6 +1774,17 @@ void RenderProcessHostImpl::ResetChannelProxy() { void RenderProcessHostImpl::CreateMessageFilters() { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -392,7 +392,7 @@ index deece35f627d..2c29eaf50bc9 100644 AddFilter(new ResourceSchedulerFilter(GetID())); MediaInternals* media_internals = MediaInternals::GetInstance(); // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages -@@ -1781,8 +1793,8 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1786,8 +1798,8 @@ void RenderProcessHostImpl::CreateMessageFilters() { new RenderMessageFilter( GetID(), GetBrowserContext(), request_context.get(), widget_helper_.get(), media_internals, @@ -403,7 +403,7 @@ index deece35f627d..2c29eaf50bc9 100644 AddFilter(render_message_filter.get()); render_frame_message_filter_ = new RenderFrameMessageFilter( -@@ -1809,10 +1821,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1814,10 +1826,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { ChromeBlobStorageContext::GetFor(browser_context); resource_message_filter_ = new ResourceMessageFilter( @@ -416,7 +416,7 @@ index deece35f627d..2c29eaf50bc9 100644 storage_partition_impl_->GetPrefetchURLLoaderService(), std::move(get_contexts_callback), BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); -@@ -1821,8 +1833,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1826,8 +1838,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter( new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service())); @@ -426,17 +426,16 @@ index deece35f627d..2c29eaf50bc9 100644 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); AddFilter(peer_connection_tracker_host_.get()); -@@ -1840,8 +1851,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1845,7 +1856,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { auto service_worker_filter = - base::MakeRefCounted(GetID()); -- service_worker_filter->Init( -- storage_partition_impl_->GetServiceWorkerContext()); -+ service_worker_filter->Init(service_worker_context); + base::MakeRefCounted( +- storage_partition_impl_->GetServiceWorkerContext(), GetID()); ++ service_worker_context, GetID()); AddFilter(service_worker_filter.get()); p2p_socket_dispatcher_host_ = new P2PSocketDispatcherHost( -@@ -1850,10 +1860,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1854,10 +1865,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter(new TraceMessageFilter(GetID())); AddFilter(new ResolveProxyMsgHelper(request_context.get())); @@ -447,7 +446,7 @@ index deece35f627d..2c29eaf50bc9 100644 } void RenderProcessHostImpl::BindCacheStorage( -@@ -1865,7 +1871,8 @@ void RenderProcessHostImpl::BindCacheStorage( +@@ -1869,7 +1876,8 @@ void RenderProcessHostImpl::BindCacheStorage( cache_storage_dispatcher_host_ = base::MakeRefCounted(); cache_storage_dispatcher_host_->Init( @@ -457,7 +456,7 @@ index deece35f627d..2c29eaf50bc9 100644 } // Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO // thread entirely. -@@ -1996,7 +2003,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -1995,7 +2003,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { registry->AddInterface(base::BindRepeating( &AppCacheDispatcherHost::Create, @@ -468,7 +467,7 @@ index deece35f627d..2c29eaf50bc9 100644 AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create)); diff --git content/browser/renderer_host/render_process_host_impl.h content/browser/renderer_host/render_process_host_impl.h -index 60a1958f3ca9..922e2100f7c9 100644 +index 036658008228..e7e77c3016e3 100644 --- content/browser/renderer_host/render_process_host_impl.h +++ content/browser/renderer_host/render_process_host_impl.h @@ -89,7 +89,6 @@ class ResourceMessageFilter; @@ -488,7 +487,7 @@ index 60a1958f3ca9..922e2100f7c9 100644 SiteInstance* site_instance, bool is_for_guests_only); -@@ -435,7 +434,7 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -439,7 +438,7 @@ class CONTENT_EXPORT RenderProcessHostImpl // Use CreateRenderProcessHost() instead of calling this constructor // directly. RenderProcessHostImpl(BrowserContext* browser_context, @@ -497,7 +496,7 @@ index 60a1958f3ca9..922e2100f7c9 100644 bool is_for_guests_only); // Initializes a new IPC::ChannelProxy in |channel_|, which will be connected -@@ -700,10 +699,10 @@ class CONTENT_EXPORT RenderProcessHostImpl +@@ -703,10 +702,10 @@ class CONTENT_EXPORT RenderProcessHostImpl // called. int instance_id_ = 1; @@ -511,10 +510,10 @@ index 60a1958f3ca9..922e2100f7c9 100644 // The observers watching our lifetime. base::ObserverList observers_; diff --git content/browser/renderer_interface_binders.cc content/browser/renderer_interface_binders.cc -index e306536aa57e..e8e860b6bb7a 100644 +index ad1e6306dc26..f5b894c64850 100644 --- content/browser/renderer_interface_binders.cc +++ content/browser/renderer_interface_binders.cc -@@ -145,7 +145,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { +@@ -139,7 +139,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { parameterized_binder_registry_.AddInterface( base::Bind([](payments::mojom::PaymentManagerRequest request, RenderProcessHost* host, const url::Origin& origin) { @@ -523,7 +522,7 @@ index e306536aa57e..e8e860b6bb7a 100644 ->GetPaymentAppContext() ->CreatePaymentManager(std::move(request)); })); -@@ -165,16 +165,17 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { +@@ -159,16 +159,17 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { parameterized_binder_registry_.AddInterface(base::BindRepeating( [](blink::mojom::LockManagerRequest request, RenderProcessHost* host, const url::Origin& origin) { @@ -545,7 +544,7 @@ index e306536aa57e..e8e860b6bb7a 100644 })); parameterized_binder_registry_.AddInterface( base::BindRepeating(&BackgroundFetchServiceImpl::Create)); -@@ -185,7 +186,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { +@@ -179,7 +180,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { parameterized_binder_registry_.AddInterface(base::BindRepeating( [](blink::mojom::CookieStoreRequest request, RenderProcessHost* host, const url::Origin& origin) { @@ -570,10 +569,10 @@ index 4b08ffd8b662..a09bdc7cb892 100644 std::move(client), creation_context_type, blink::MessagePortChannel(std::move(message_port))); diff --git content/browser/shared_worker/shared_worker_service_impl.cc content/browser/shared_worker/shared_worker_service_impl.cc -index 8140ae678d37..245d0bffd69e 100644 +index 469c8b3aa8d9..d1f7eb1f9571 100644 --- content/browser/shared_worker/shared_worker_service_impl.cc +++ content/browser/shared_worker/shared_worker_service_impl.cc -@@ -253,8 +253,8 @@ void SharedWorkerServiceImpl::CreateWorker( +@@ -293,8 +293,8 @@ void SharedWorkerServiceImpl::CreateWorker( BrowserThread::IO, FROM_HERE, base::BindOnce( &CreateScriptLoaderOnIO, @@ -581,11 +580,11 @@ index 8140ae678d37..245d0bffd69e 100644 - ->url_loader_factory_getter(), + base::WrapRefCounted(service_worker_context_->storage_partition() + ->url_loader_factory_getter()), - std::move(factory_bundle), service_worker_context_, process_id, - base::BindOnce(&SharedWorkerServiceImpl::StartWorker, - weak_factory_.GetWeakPtr(), std::move(instance), + std::move(factory_bundle_for_browser), + std::move(factory_bundle_for_renderer), service_worker_context_, + process_id, diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h -index 102e3ff8e474..382162210f9a 100644 +index e80daeffae73..ca80581c021c 100644 --- content/browser/storage_partition_impl.h +++ content/browser/storage_partition_impl.h @@ -96,7 +96,7 @@ class CONTENT_EXPORT StoragePartitionImpl diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index b10ae82be..e82afd50c 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -295,10 +295,10 @@ index 1d35afeda78f..333f9c0f778d 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index 00590f09d91f..028a0af16d5e 100644 +index 7feb65bfdd66..c970760173ab 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -2410,8 +2410,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( +@@ -2411,8 +2411,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -313,7 +313,7 @@ index 00590f09d91f..028a0af16d5e 100644 MenuItemView* to_select = NULL; if (item->GetSubmenu()->GetMenuItemCount() > 0) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2426,8 +2431,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2427,8 +2432,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -373,10 +373,10 @@ index 4dea63f9f286..ef50b710c5af 100644 virtual int GetMaxWidthForMenu(MenuItemView* menu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index 22a219b46605..a475cb45b03f 100644 +index f058ad626438..70df455a7c5d 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -900,7 +900,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { +@@ -905,7 +905,12 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) { // only need the background when we want it to look different, as when we're // selected. ui::NativeTheme* native_theme = GetNativeTheme(); @@ -390,7 +390,7 @@ index 22a219b46605..a475cb45b03f 100644 gfx::Rect item_bounds(0, 0, width(), height()); if (type_ == ACTIONABLE_SUBMENU) { if (submenu_area_of_actionable_submenu_selected_) { -@@ -1019,6 +1024,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { +@@ -1024,6 +1029,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { SkColor MenuItemView::GetTextColor(bool minor, bool render_selection, bool emphasized) const { @@ -528,7 +528,7 @@ index abcc8e28e7e5..574d46d03505 100644 content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc -index 9e16b4c88177..3d660e406709 100644 +index 3ec1dcbdf822..e2658cec8095 100644 --- ui/views/test/ui_controls_factory_desktop_aurax11.cc +++ ui/views/test/ui_controls_factory_desktop_aurax11.cc @@ -140,10 +140,6 @@ class UIControlsDesktopX11 : public UIControlsAura { 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 2af39cc77..e0668bba1 100644 --- a/patch/patches/views_widget_180_1481_1565_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1565_1677_1749.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index d52e0e45d4e1..4cc91095d9c9 100644 +index 6e0db4cb107e..1cdb23dd3ae8 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -422,6 +422,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { +@@ -446,6 +446,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { return screen_info.device_scale_factor; } @@ -18,7 +18,7 @@ index d52e0e45d4e1..4cc91095d9c9 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 be17cb811c58..d06168e39008 100644 +index ff771b902dce..5495543fab1a 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 be17cb811c58..d06168e39008 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; -@@ -454,6 +460,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -456,6 +462,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 be17cb811c58..d06168e39008 100644 // Sets the cursor for this view to the one associated with the specified // cursor_type. virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -651,6 +663,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -660,6 +672,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase bool use_viz_hit_test_ = false; @@ -135,10 +135,10 @@ 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 288b92c3eadf..e9689bddfab9 100644 +index 7e422e82abe3..423d04d7226f 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -86,6 +86,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin( +@@ -87,6 +87,7 @@ DesktopWindowTreeHostWin::DesktopWindowTreeHostWin( should_animate_window_close_(false), pending_close_(false), has_non_client_view_(false), @@ -146,7 +146,7 @@ index 288b92c3eadf..e9689bddfab9 100644 tooltip_(NULL) { } -@@ -120,8 +121,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { +@@ -121,8 +122,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { native_widget_delegate_); HWND parent_hwnd = NULL; diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index b0f293afb..6da8fb201 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 dde4f26a40c3..9249b0cbb6a1 100644 +index 59f3a5069faa..8b47e7a5b9f3 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -1797,21 +1797,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1862,21 +1862,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 dde4f26a40c3..9249b0cbb6a1 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -2418,6 +2427,15 @@ void WebContentsImpl::CreateNewWindow( +@@ -2484,6 +2493,15 @@ void WebContentsImpl::CreateNewWindow( create_params.renderer_initiated_creation = main_frame_route_id != MSG_ROUTING_NONE; @@ -61,7 +61,7 @@ index dde4f26a40c3..9249b0cbb6a1 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -2448,7 +2466,7 @@ void WebContentsImpl::CreateNewWindow( +@@ -2514,7 +2532,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 dde4f26a40c3..9249b0cbb6a1 100644 } // Save the created window associated with the route so we can show it // later. -@@ -5742,7 +5760,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { +@@ -5814,7 +5832,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( RenderViewHost* render_view_host) { RenderWidgetHostViewBase* rwh_view = @@ -80,13 +80,13 @@ index dde4f26a40c3..9249b0cbb6a1 100644 // Now that the RenderView has been created, we need to tell it its size. if (rwh_view) diff --git content/public/browser/web_contents.cc content/public/browser/web_contents.cc -index 53d56abb35a3..d7b955f42ca5 100644 +index df508da0aef2..f6f4bf42b108 100644 --- content/public/browser/web_contents.cc +++ content/public/browser/web_contents.cc @@ -30,7 +30,9 @@ WebContents::CreateParams::CreateParams(BrowserContext* context, context(nullptr), renderer_initiated_creation(false), - initialize_renderer(false), + desired_renderer_state(kOkayToHaveRendererProcess), - starting_sandbox_flags(blink::WebSandboxFlags::kNone) {} + starting_sandbox_flags(blink::WebSandboxFlags::kNone), + view(nullptr), @@ -95,10 +95,10 @@ index 53d56abb35a3..d7b955f42ca5 100644 WebContents::CreateParams::CreateParams(const CreateParams& other) = default; diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index c4a7f3173b98..d42beefe4589 100644 +index f7a44dd2bbe1..0e4954c46f2a 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h -@@ -74,9 +74,11 @@ class BrowserPluginGuestDelegate; +@@ -75,9 +75,11 @@ class BrowserPluginGuestDelegate; class InterstitialPage; class RenderFrameHost; class RenderViewHost; @@ -110,7 +110,7 @@ index c4a7f3173b98..d42beefe4589 100644 struct CustomContextMenuContext; struct DropData; struct MHTMLGenerationParams; -@@ -178,6 +180,10 @@ class WebContents : public PageNavigator, +@@ -216,6 +218,10 @@ class WebContents : public PageNavigator, // Sandboxing flags set on the new WebContents. blink::WebSandboxFlags starting_sandbox_flags; @@ -122,7 +122,7 @@ index c4a7f3173b98..d42beefe4589 100644 // Creates a new WebContents. diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index 4fc457c9e413..79a6dbf5b3a5 100644 +index a4d4d079fbaa..4f5f626846bc 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -47,10 +47,12 @@ class ColorChooser; @@ -138,7 +138,7 @@ index 4fc457c9e413..79a6dbf5b3a5 100644 struct ContextMenuParams; struct DropData; struct FileChooserParams; -@@ -313,6 +315,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -310,6 +312,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 9da9f7046..e90fe2e2a 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index f3ec52975650..4922837a169e 100644 +index a1595fbd3904..62a0c1b4e10d 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -353,6 +353,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -376,6 +376,7 @@ class BLINK_PLATFORM_EXPORT Platform { // satisfy this call. mainFrameOrigin is used by the browser process to // filter plugins from the plugin list based on content settings. virtual void GetPluginList(bool refresh, @@ -10,7 +10,7 @@ index f3ec52975650..4922837a169e 100644 const WebSecurityOrigin& main_frame_origin, WebPluginListBuilder*) {} -@@ -704,6 +705,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -727,6 +728,11 @@ class BLINK_PLATFORM_EXPORT Platform { // runs during Chromium's build step). virtual bool IsTakingV8ContextSnapshot() { return false; } @@ -62,10 +62,10 @@ index f98ae01cd46d..bba0b1930bff 100644 void WebDevToolsAgentImpl::Session::SendProtocolResponse(int session_id, diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc -index f0c55c05da71..9f0ede2594e4 100644 +index bfd4da31b97d..56acd87eb3d9 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc -@@ -1228,7 +1228,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { +@@ -1230,7 +1230,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -75,10 +75,10 @@ index f0c55c05da71..9f0ede2594e4 100644 } diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc -index a6a36fb4b38b..9b3bbb8fdb9b 100644 +index 877d500ed7a2..bc548efe2032 100644 --- third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc -@@ -152,7 +152,8 @@ Page::Page(PageClients& page_clients) +@@ -157,7 +157,8 @@ Page::Page(PageClients& page_clients) overscroll_controller_( OverscrollController::Create(GetVisualViewport(), GetChromeClient())), main_frame_(nullptr), @@ -88,8 +88,8 @@ index a6a36fb4b38b..9b3bbb8fdb9b 100644 use_counter_(page_clients.chrome_client && page_clients.chrome_client->IsSVGImageChromeClient() ? UseCounter::kSVGImageContext -@@ -322,21 +323,40 @@ void Page::RefreshPlugins() { - PluginData::RefreshBrowserSidePluginCache(); +@@ -323,21 +324,40 @@ void Page::InitialStyleChanged() { + } } -PluginData* Page::GetPluginData(const SecurityOrigin* main_frame_origin) { @@ -138,7 +138,7 @@ index a6a36fb4b38b..9b3bbb8fdb9b 100644 page->NotifyPluginsChanged(); } } -@@ -708,7 +728,8 @@ void Page::Trace(blink::Visitor* visitor) { +@@ -709,7 +729,8 @@ void Page::Trace(blink::Visitor* visitor) { visitor->Trace(visual_viewport_); visitor->Trace(overscroll_controller_); visitor->Trace(main_frame_); @@ -149,10 +149,10 @@ index a6a36fb4b38b..9b3bbb8fdb9b 100644 visitor->Trace(use_counter_); visitor->Trace(plugins_changed_observers_); diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h -index eba08dbfa108..846ad08241bd 100644 +index 821b8c58c38a..96194ac3f10d 100644 --- third_party/blink/renderer/core/page/page.h +++ third_party/blink/renderer/core/page/page.h -@@ -137,7 +137,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, +@@ -138,7 +138,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, ViewportDescription GetViewportDescription() const; // Returns the plugin data associated with |main_frame_origin|. @@ -160,9 +160,9 @@ index eba08dbfa108..846ad08241bd 100644 + PluginData* GetPluginData(bool is_main_frame, + const SecurityOrigin* main_frame_origin); - // Refreshes the browser-side plugin cache. - static void RefreshPlugins(); -@@ -369,7 +370,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, + // Resets the plugin data for all pages in the renderer process and notifies + // PluginsChangedObservers. +@@ -367,7 +368,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, // longer needed. Member main_frame_; @@ -173,17 +173,15 @@ index eba08dbfa108..846ad08241bd 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 73d10a188b27..8af05af0dc76 100644 +index a06a41fda418..b786f8cafe2c 100644 --- third_party/blink/renderer/platform/plugins/plugin_data.cc +++ third_party/blink/renderer/platform/plugins/plugin_data.cc -@@ -83,16 +83,18 @@ void PluginData::Trace(blink::Visitor* visitor) { - // static +@@ -84,15 +84,16 @@ void PluginData::Trace(blink::Visitor* visitor) { void PluginData::RefreshBrowserSidePluginCache() { PluginListBuilder builder(nullptr); -- Platform::Current()->GetPluginList(true, WebSecurityOrigin::CreateUnique(), -+ Platform::Current()->GetPluginList(true, true, -+ WebSecurityOrigin::CreateUnique(), - &builder); + Platform::Current()->GetPluginList( +- true, WebSecurityOrigin::CreateUniqueOpaque(), &builder); ++ true, true, WebSecurityOrigin::CreateUniqueOpaque(), &builder); } -void PluginData::UpdatePluginList(const SecurityOrigin* main_frame_origin) { diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index df0dfae86..0538526fb 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -20,10 +20,10 @@ index f7c3e651b3ce..ce3e42c6900d 100644 // Call these methods before and after running a nested, modal event loop diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index 80ba4c18ebc9..2f76f1e8df40 100644 +index 224122471b0e..92aad351f293 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -248,8 +248,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { +@@ -246,8 +246,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { g_should_use_external_popup_menus = use_external_popup_menus; } @@ -39,7 +39,7 @@ index 80ba4c18ebc9..2f76f1e8df40 100644 } namespace { -@@ -340,6 +345,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, +@@ -338,6 +343,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, enable_fake_page_scale_animation_for_testing_(false), fake_page_scale_animation_page_scale_factor_(0), fake_page_scale_animation_use_anchor_(false), @@ -48,7 +48,7 @@ index 80ba4c18ebc9..2f76f1e8df40 100644 suppress_next_keypress_event_(false), ime_accept_events_(true), diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index 58f8ff5cc826..0decc98d44f8 100644 +index 69f1438873b2..86443bf1f05e 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h @@ -105,7 +105,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -70,7 +70,7 @@ index 58f8ff5cc826..0decc98d44f8 100644 void SetBaseBackgroundColorOverride(SkColor); void ClearBaseBackgroundColorOverride(); void SetBackgroundColorOverride(SkColor); -@@ -620,6 +621,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -617,6 +618,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_; bool fake_page_scale_animation_use_anchor_; @@ -80,7 +80,7 @@ index 58f8ff5cc826..0decc98d44f8 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 50350ccbc3f7..6b73415761a9 100644 +index d1d042242009..d2a78831921c 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc @@ -774,7 +774,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index b00ab1e96..3353bab33 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -60,10 +60,10 @@ index 509b62c78375..f48dd53e30c3 100644 render_process_host->GetBrowserContext(); extensions::ExtensionRegistry* extension_registry = diff --git chrome/browser/ui/webui/net_internals/net_internals_ui.cc chrome/browser/ui/webui/net_internals/net_internals_ui.cc -index 12c2eb2e1271..0de1335e91c7 100644 +index 488d0c70949f..d95b2e9b3cf9 100644 --- chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ chrome/browser/ui/webui/net_internals/net_internals_ui.cc -@@ -552,41 +552,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache( +@@ -527,41 +527,31 @@ void NetInternalsMessageHandler::OnClearBrowserCache( void NetInternalsMessageHandler::OnGetPrerenderInfo( const base::ListValue* list) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -110,7 +110,7 @@ index 12c2eb2e1271..0de1335e91c7 100644 } //////////////////////////////////////////////////////////////////////////////// -@@ -666,9 +656,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( +@@ -641,9 +631,17 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady( PrePopulateEventList(); @@ -131,7 +131,7 @@ index 12c2eb2e1271..0de1335e91c7 100644 } void NetInternalsMessageHandler::IOThreadImpl::OnGetNetInfo( -@@ -1179,7 +1177,8 @@ void NetInternalsMessageHandler::IOThreadImpl::PrePopulateEventList() { +@@ -1139,7 +1137,8 @@ void NetInternalsMessageHandler::IOThreadImpl::PrePopulateEventList() { std::set contexts; for (const auto& getter : context_getters_) contexts.insert(getter->GetURLRequestContext()); diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index 4c77be2ca..f6f4ad674 100644 --- a/patch/patches/webview_plugin_2020.patch +++ b/patch/patches/webview_plugin_2020.patch @@ -1,5 +1,5 @@ diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd -index d1d9d62e4af3..e673f8763006 100644 +index bf7c0f302d68..42f43506c444 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd @@ -4602,7 +4602,7 @@ Keep your key file in a safe place. You will need it to create new versions of y diff --git a/patch/patches/win_rt_2274.patch b/patch/patches/win_rt_2274.patch index 8dfa849cc..7aa14d6d0 100644 --- a/patch/patches/win_rt_2274.patch +++ b/patch/patches/win_rt_2274.patch @@ -1,8 +1,8 @@ diff --git services/service_manager/sandbox/win/sandbox_win.cc services/service_manager/sandbox/win/sandbox_win.cc -index 197090f0f500..69e1e24f41e3 100644 +index 31edb20931f1..eb9c43e69ec0 100644 --- services/service_manager/sandbox/win/sandbox_win.cc +++ services/service_manager/sandbox/win/sandbox_win.cc -@@ -865,8 +865,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( +@@ -882,8 +882,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( #endif // Post-startup mitigations. diff --git a/tests/ceftests/osr_accessibility_unittest.cc b/tests/ceftests/osr_accessibility_unittest.cc index f97da47c5..a2f6fe129 100644 --- a/tests/ceftests/osr_accessibility_unittest.cc +++ b/tests/ceftests/osr_accessibility_unittest.cc @@ -127,20 +127,18 @@ class AccessibilityTestHandler : public TestHandler, case TEST_LOCATION_CHANGE: { // find accessibility id of the edit box, before setting focus if (edit_box_id_ == -1) { - EXPECT_TRUE(value.get()); - CefRefPtr list = value->GetList(); - EXPECT_TRUE(list.get()); - EXPECT_GT(list->GetSize(), (size_t)0); - - // Get the first update dict and validate event type - CefRefPtr dict = list->GetDictionary(0); + CefRefPtr update, event; + GetFirstUpdateAndEvent(value, update, event); + EXPECT_TRUE(update.get()); // Ignore other events. - if (dict->GetString("event_type") != "layoutComplete") + if (!event.get() || + event->GetString("event_type") != "layoutComplete") { break; + } - SetEditBoxIdAndRect(dict->GetDictionary("update")); - EXPECT_TRUE(edit_box_id_ != -1); + SetEditBoxIdAndRect(update); + EXPECT_NE(edit_box_id_, -1); // Post a delayed task to hide the span and trigger location change CefPostDelayedTask(TID_UI, base::Bind(&AccessibilityTestHandler::HideEditBox, @@ -151,21 +149,19 @@ class AccessibilityTestHandler : public TestHandler, case TEST_FOCUS_CHANGE: { // find accessibility id of the edit box, before setting focus if (edit_box_id_ == -1) { - EXPECT_TRUE(value.get()); - CefRefPtr list = value->GetList(); - EXPECT_TRUE(list.get()); - EXPECT_GT(list->GetSize(), (size_t)0); - - // Get the first update dict and validate event type - CefRefPtr dict = list->GetDictionary(0); + CefRefPtr update, event; + GetFirstUpdateAndEvent(value, update, event); + EXPECT_TRUE(update.get()); // Ignore other events. - if (dict->GetString("event_type") != "layoutComplete") + if (!event.get() || + event->GetString("event_type") != "layoutComplete") { break; + } // Now post a delayed task to trigger focus to edit box - SetEditBoxIdAndRect(dict->GetDictionary("update")); - EXPECT_TRUE(edit_box_id_ != -1); + SetEditBoxIdAndRect(update); + EXPECT_NE(edit_box_id_, -1); CefPostDelayedTask( TID_UI, @@ -173,22 +169,17 @@ class AccessibilityTestHandler : public TestHandler, GetBrowser()), 200); } else { - EXPECT_TRUE(value.get()); - // Change has a valid non empty list - EXPECT_TRUE(value->GetType() == VTYPE_LIST); - CefRefPtr list = value->GetList(); - EXPECT_TRUE(list.get()); - EXPECT_GT(list->GetSize(), (size_t)0); - - // Get the first update dict and validate event type - CefRefPtr dict = list->GetDictionary(0); + CefRefPtr update, event; + GetFirstUpdateAndEvent(value, update, event); + EXPECT_TRUE(update.get()); // Ignore other events. - if (dict->GetString("event_type") != "focus") + if (!event.get() || event->GetString("event_type") != "focus") { return; + } // And Focus is set to expected element edit_box - EXPECT_TRUE(edit_box_id_ == dict->GetInt("id")); + EXPECT_EQ(edit_box_id_, event->GetInt("id")); // Now Post a delayed task to destroy the test giving // sufficient time for any accessibility updates to come through @@ -202,11 +193,11 @@ class AccessibilityTestHandler : public TestHandler, void OnAccessibilityLocationChange(CefRefPtr value) override { if (test_type_ == TEST_LOCATION_CHANGE) { - EXPECT_TRUE(edit_box_id_ != -1); + EXPECT_NE(edit_box_id_, -1); EXPECT_TRUE(value.get()); // Change has a valid list - EXPECT_TRUE(value->GetType() == VTYPE_LIST); + EXPECT_EQ(VTYPE_LIST, value->GetType()); CefRefPtr list = value->GetList(); EXPECT_TRUE(list.get()); // Ignore empty events @@ -214,7 +205,7 @@ class AccessibilityTestHandler : public TestHandler, return; // Hiding edit box should only change position of subsequent button - EXPECT_EQ(list->GetSize(), (size_t)1); + EXPECT_EQ(1U, list->GetSize()); CefRefPtr dict = list->GetDictionary(0); EXPECT_TRUE(dict.get()); @@ -285,24 +276,42 @@ class AccessibilityTestHandler : public TestHandler, TID_UI, base::Bind(&AccessibilityTestHandler::DestroyTest, this), 500); } - void TestEnableAccessibilityUpdate(CefRefPtr value) { - // Validate enabling accessibility change returns valid accessibility tree. - // Change has a valid non empty list. - EXPECT_TRUE(value->GetType() == VTYPE_LIST); - CefRefPtr list = value->GetList(); - EXPECT_TRUE(list.get()); - EXPECT_GT(list->GetSize(), (size_t)0); + void GetFirstUpdateAndEvent(CefRefPtr value, + CefRefPtr& update, + CefRefPtr& event) { + EXPECT_TRUE(value.get()); + EXPECT_EQ(value->GetType(), VTYPE_DICTIONARY); + CefRefPtr topLevel = value->GetDictionary(); + EXPECT_TRUE(topLevel.get()); - // Get the first update dict and validate event type. - CefRefPtr dict = list->GetDictionary(0); + // Get the first update dict. + CefRefPtr updates = topLevel->GetList("updates"); + if (updates.get()) { + EXPECT_GT(updates->GetSize(), 0U); + update = updates->GetDictionary(0); + EXPECT_TRUE(update.get()); + } + + // Get the first event dict. + CefRefPtr events = topLevel->GetList("events"); + if (events.get()) { + EXPECT_GT(events->GetSize(), 0U); + event = events->GetDictionary(0); + EXPECT_TRUE(event.get()); + } + } + + void TestEnableAccessibilityUpdate(CefRefPtr value) { + CefRefPtr update, event; + GetFirstUpdateAndEvent(value, update, event); + EXPECT_TRUE(update.get()); // Ignore other events. - if (dict->GetString("event_type") != "layoutComplete") + if (!event.get() || event->GetString("event_type") != "layoutComplete") { return; + } // Get update and validate it has tree data - CefRefPtr update = dict->GetDictionary("update"); - EXPECT_TRUE(update.get()); EXPECT_TRUE(update->GetBool("has_tree_data")); CefRefPtr treeData = update->GetDictionary("tree_data"); @@ -314,7 +323,7 @@ class AccessibilityTestHandler : public TestHandler, // Validate node data CefRefPtr nodes = update->GetList("nodes"); EXPECT_TRUE(nodes.get()); - EXPECT_GT(nodes->GetSize(), (size_t)0); + EXPECT_GT(nodes->GetSize(), 0U); // Update has a valid root CefRefPtr root; @@ -330,7 +339,7 @@ class AccessibilityTestHandler : public TestHandler, // One div containing the tree elements. CefRefPtr childIDs = root->GetList("child_ids"); EXPECT_TRUE(childIDs.get()); - EXPECT_EQ(childIDs->GetSize(), (size_t)1); + EXPECT_EQ(1U, childIDs->GetSize()); // A parent Group div containing the child. CefRefPtr group; @@ -347,7 +356,7 @@ class AccessibilityTestHandler : public TestHandler, CefRefPtr parentdiv = group->GetList("child_ids"); EXPECT_TRUE(parentdiv.get()); - EXPECT_EQ(parentdiv->GetSize(), (size_t)3); + EXPECT_EQ(3U, parentdiv->GetSize()); int tipId = parentdiv->GetInt(0); int editBoxId = parentdiv->GetInt(1); @@ -397,7 +406,7 @@ class AccessibilityTestHandler : public TestHandler, // Validate node data. CefRefPtr nodes = value->GetList("nodes"); EXPECT_TRUE(nodes.get()); - EXPECT_GT(nodes->GetSize(), (size_t)0); + EXPECT_GT(nodes->GetSize(), 0U); // Find accessibility id for the text field. for (size_t index = 0; index < nodes->GetSize(); index++) { diff --git a/tests/ceftests/scheme_handler_unittest.cc b/tests/ceftests/scheme_handler_unittest.cc index 37f70bc6a..a7ad61706 100644 --- a/tests/ceftests/scheme_handler_unittest.cc +++ b/tests/ceftests/scheme_handler_unittest.cc @@ -1441,8 +1441,8 @@ TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginRedirectSync) { EXPECT_TRUE(g_TestResults.got_read); EXPECT_TRUE(g_TestResults.got_output); EXPECT_TRUE(g_TestResults.got_sub_redirect); - EXPECT_FALSE(g_TestResults.got_sub_request); - EXPECT_FALSE(g_TestResults.got_sub_read); + EXPECT_TRUE(g_TestResults.got_sub_request); + EXPECT_TRUE(g_TestResults.got_sub_read); EXPECT_FALSE(g_TestResults.got_sub_success); ClearTestSchemes(); @@ -1476,10 +1476,8 @@ TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginRedirectAsync) { ClearTestSchemes(); } -// Test that a custom standard scheme cannot generate cross-domain XHR requests -// that perform redirects when using the cross-origin whitelist. This is due to -// an explicit check in SyncResourceHandler::OnRequestRedirected() and does not -// represent ideal behavior. +// Test that a custom standard scheme can generate cross-domain XHR requests +// that perform redirects when using the cross-origin whitelist. TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginRedirectWithWhitelistSync) { RegisterTestScheme("customstd", "test1"); @@ -1503,9 +1501,9 @@ TEST(SchemeHandlerTest, EXPECT_TRUE(g_TestResults.got_read); EXPECT_TRUE(g_TestResults.got_output); EXPECT_TRUE(g_TestResults.got_sub_redirect); - EXPECT_FALSE(g_TestResults.got_sub_request); - EXPECT_FALSE(g_TestResults.got_sub_read); - EXPECT_FALSE(g_TestResults.got_sub_success); + EXPECT_TRUE(g_TestResults.got_sub_request); + EXPECT_TRUE(g_TestResults.got_sub_read); + EXPECT_TRUE(g_TestResults.got_sub_success); EXPECT_TRUE(CefClearCrossOriginWhitelist()); WaitForUIThread();