diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index ab160dad7..85a20cf90 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/69.0.3489.0', + 'chromium_checkout': 'refs/tags/69.0.3497.0', } diff --git a/CHROMIUM_UPDATE.txt b/CHROMIUM_UPDATE.txt index 67722fa00..812386a91 100644 --- a/CHROMIUM_UPDATE.txt +++ b/CHROMIUM_UPDATE.txt @@ -45,6 +45,7 @@ 'content/public/browser/render_widget_host_view.h', 'content/public/browser/storage_partition.h', 'content/public/browser/web_contents_delegate.h', + 'content/public/common/content_features.cc', 'content/shell/BUILD.gn', 'content/shell/app/*', 'content/shell/browser/shell_*', diff --git a/libcef/browser/browser_context.cc b/libcef/browser/browser_context.cc index b2d3fbc23..2234cca4b 100644 --- a/libcef/browser/browser_context.cc +++ b/libcef/browser/browser_context.cc @@ -130,6 +130,12 @@ ChromeZoomLevelPrefs* CefBrowserContext::GetZoomLevelPrefs() { GetStoragePartition(this, NULL)->GetZoomLevelDelegate()); } +scoped_refptr +CefBrowserContext::GetURLLoaderFactory() { + return GetDefaultStoragePartition(this) + ->GetURLLoaderFactoryForBrowserProcess(); +} + void CefBrowserContext::OnRenderFrameDeleted(int render_process_id, int render_frame_id, bool is_main_frame, diff --git a/libcef/browser/browser_context.h b/libcef/browser/browser_context.h index c1a442dbe..0678ef31c 100644 --- a/libcef/browser/browser_context.h +++ b/libcef/browser/browser_context.h @@ -146,6 +146,7 @@ class CefBrowserContext : public ChromeProfileStub { // Profile methods. ChromeZoomLevelPrefs* GetZoomLevelPrefs() override; + scoped_refptr GetURLLoaderFactory() override; // Returns a RequestContext associated with this object. If this object is a // *Proxy then it will return the single associated proxy RequestContext. If diff --git a/libcef/browser/browser_context_impl.cc b/libcef/browser/browser_context_impl.cc index 986d4a09e..c8338844f 100644 --- a/libcef/browser/browser_context_impl.cc +++ b/libcef/browser/browser_context_impl.cc @@ -418,7 +418,8 @@ CefBrowserContextImpl::GetSSLHostStateDelegate() { return ssl_host_state_delegate_.get(); } -content::PermissionManager* CefBrowserContextImpl::GetPermissionManager() { +content::PermissionControllerDelegate* +CefBrowserContextImpl::GetPermissionControllerDelegate() { return nullptr; } diff --git a/libcef/browser/browser_context_impl.h b/libcef/browser/browser_context_impl.h index bd8558a9b..917c5b14c 100644 --- a/libcef/browser/browser_context_impl.h +++ b/libcef/browser/browser_context_impl.h @@ -67,7 +67,8 @@ class CefBrowserContextImpl : public CefBrowserContext, storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; content::PushMessagingService* GetPushMessagingService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; - content::PermissionManager* GetPermissionManager() override; + content::PermissionControllerDelegate* GetPermissionControllerDelegate() + override; content::BackgroundFetchDelegate* GetBackgroundFetchDelegate() override; content::BackgroundSyncController* GetBackgroundSyncController() override; content::BrowsingDataRemoverDelegate* GetBrowsingDataRemoverDelegate() diff --git a/libcef/browser/browser_context_proxy.cc b/libcef/browser/browser_context_proxy.cc index e4645fadb..dcbbed450 100644 --- a/libcef/browser/browser_context_proxy.cc +++ b/libcef/browser/browser_context_proxy.cc @@ -153,8 +153,9 @@ CefBrowserContextProxy::GetSSLHostStateDelegate() { return parent_->GetSSLHostStateDelegate(); } -content::PermissionManager* CefBrowserContextProxy::GetPermissionManager() { - return parent_->GetPermissionManager(); +content::PermissionControllerDelegate* +CefBrowserContextProxy::GetPermissionControllerDelegate() { + return parent_->GetPermissionControllerDelegate(); } content::BackgroundFetchDelegate* diff --git a/libcef/browser/browser_context_proxy.h b/libcef/browser/browser_context_proxy.h index 814bb1b11..899609f91 100644 --- a/libcef/browser/browser_context_proxy.h +++ b/libcef/browser/browser_context_proxy.h @@ -42,7 +42,8 @@ class CefBrowserContextProxy : public CefBrowserContext { storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; content::PushMessagingService* GetPushMessagingService() override; content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; - content::PermissionManager* GetPermissionManager() override; + content::PermissionControllerDelegate* GetPermissionControllerDelegate() + override; content::BackgroundFetchDelegate* GetBackgroundFetchDelegate() override; content::BackgroundSyncController* GetBackgroundSyncController() override; content::BrowsingDataRemoverDelegate* GetBrowsingDataRemoverDelegate() diff --git a/libcef/browser/browser_urlrequest_impl.cc b/libcef/browser/browser_urlrequest_impl.cc index 9e8934326..7ce9536d1 100644 --- a/libcef/browser/browser_urlrequest_impl.cc +++ b/libcef/browser/browser_urlrequest_impl.cc @@ -20,7 +20,6 @@ #include "base/message_loop/message_loop.h" #include "base/strings/string_util.h" #include "content/public/browser/browser_thread.h" -#include "content/public/common/url_fetcher.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/http/http_response_headers.h" diff --git a/libcef/browser/extensions/extensions_browser_client.cc b/libcef/browser/extensions/extensions_browser_client.cc index 6e774df01..93dc92512 100644 --- a/libcef/browser/extensions/extensions_browser_client.cc +++ b/libcef/browser/extensions/extensions_browser_client.cc @@ -254,6 +254,10 @@ bool CefExtensionsBrowserClient::DidVersionUpdate(BrowserContext* context) { void CefExtensionsBrowserClient::PermitExternalProtocolHandler() {} +bool CefExtensionsBrowserClient::IsInDemoMode() { + return false; +} + bool CefExtensionsBrowserClient::IsRunningInForcedAppMode() { return false; } diff --git a/libcef/browser/extensions/extensions_browser_client.h b/libcef/browser/extensions/extensions_browser_client.h index 82394fee7..1b0b95b47 100644 --- a/libcef/browser/extensions/extensions_browser_client.h +++ b/libcef/browser/extensions/extensions_browser_client.h @@ -84,6 +84,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient { ExtensionHost** host) override; bool DidVersionUpdate(content::BrowserContext* context) override; void PermitExternalProtocolHandler() override; + bool IsInDemoMode() override; bool IsRunningInForcedAppMode() override; bool IsAppModeForcedForApp(const ExtensionId& extension_id) override; bool IsLoggedInAsPublicAccount() override; diff --git a/libcef/browser/net/url_request_context_getter_impl.cc b/libcef/browser/net/url_request_context_getter_impl.cc index 22f941cae..e4762bf79 100644 --- a/libcef/browser/net/url_request_context_getter_impl.cc +++ b/libcef/browser/net/url_request_context_getter_impl.cc @@ -350,7 +350,7 @@ net::URLRequestContext* CefURLRequestContextGetterImpl::GetURLRequestContext() { std::move(system_proxy_service)); io_state_->storage_->set_ssl_config_service( - new net::SSLConfigServiceDefaults); + std::make_unique()); std::vector supported_schemes; supported_schemes.push_back("basic"); diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 5383fbcef..1edc172fc 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -731,9 +731,8 @@ void CefRenderWidgetHostViewOSR::GetScreenInfo( *results = ScreenInfoFrom(screen_info); } -gfx::Vector2d CefRenderWidgetHostViewOSR::GetOffsetFromRootSurface() { - return gfx::Vector2d(); -} +void CefRenderWidgetHostViewOSR::TransformPointToRootSurface( + gfx::PointF* point) {} gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() { if (!browser_impl_.get()) @@ -857,12 +856,13 @@ void CefRenderWidgetHostViewOSR::SelectionChanged(const base::string16& text, } #if !defined(OS_MACOSX) -viz::LocalSurfaceId CefRenderWidgetHostViewOSR::GetLocalSurfaceId() const { +const viz::LocalSurfaceId& CefRenderWidgetHostViewOSR::GetLocalSurfaceId() + const { return local_surface_id_; } #endif -viz::FrameSinkId CefRenderWidgetHostViewOSR::GetFrameSinkId() { +const viz::FrameSinkId& CefRenderWidgetHostViewOSR::GetFrameSinkId() const { return GetDelegatedFrameHost()->frame_sink_id(); } diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 78add1121..b932714fd 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -154,7 +154,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, const gfx::Size& output_size, base::OnceCallback callback) override; void GetScreenInfo(content::ScreenInfo* results) const override; - gfx::Vector2d GetOffsetFromRootSurface() override; + void TransformPointToRootSurface(gfx::PointF* point) override; gfx::Rect GetBoundsInRootWindow() override; viz::SurfaceId GetCurrentSurfaceId() const override; content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager( @@ -187,8 +187,8 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, size_t offset, const gfx::Range& range) override; - viz::LocalSurfaceId GetLocalSurfaceId() const override; - viz::FrameSinkId GetFrameSinkId() override; + const viz::LocalSurfaceId& GetLocalSurfaceId() const override; + const viz::FrameSinkId& GetFrameSinkId() const override; // ui::CompositorDelegate implementation. std::unique_ptr CreateSoftwareOutputDevice( @@ -254,6 +254,12 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, } ui::Layer* GetRootLayer() const; +#if defined(OS_MACOSX) + content::BrowserCompositorMac* browser_compositor() const { + return browser_compositor_.get(); + } +#endif + private: content::DelegatedFrameHost* GetDelegatedFrameHost() const; diff --git a/libcef/browser/osr/render_widget_host_view_osr_mac.mm b/libcef/browser/osr/render_widget_host_view_osr_mac.mm index a3c614d52..c1d65e576 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_mac.mm +++ b/libcef/browser/osr/render_widget_host_view_osr_mac.mm @@ -59,7 +59,23 @@ class MacHelper : public content::BrowserCompositorMacClient, void DestroyCompositorForShutdown() override {} - bool SynchronizeVisualProperties() override { + bool SynchronizeVisualProperties( + const base::Optional& + child_allocated_local_surface_id) override { + auto* browser_compositor = view_->browser_compositor(); + if (child_allocated_local_surface_id) { + browser_compositor->UpdateRendererLocalSurfaceIdFromChild( + *child_allocated_local_surface_id); + } else { + browser_compositor->AllocateNewRendererLocalSurfaceId(); + } + + if (auto* host = browser_compositor->GetDelegatedFrameHost()) { + host->EmbedSurface(browser_compositor->GetRendererLocalSurfaceId(), + browser_compositor->GetRendererSize(), + cc::DeadlinePolicy::UseDefaultDeadline()); + } + return view_->render_widget_host()->SynchronizeVisualProperties(); } @@ -84,7 +100,8 @@ bool CefRenderWidgetHostViewOSR::ShouldContinueToPauseForFrame() { return browser_compositor_->ShouldContinueToPauseForFrame(); } -viz::LocalSurfaceId CefRenderWidgetHostViewOSR::GetLocalSurfaceId() const { +const viz::LocalSurfaceId& CefRenderWidgetHostViewOSR::GetLocalSurfaceId() + const { return browser_compositor_->GetRendererLocalSurfaceId(); } diff --git a/libcef/browser/resource_context.cc b/libcef/browser/resource_context.cc index 41c1418cc..30077dd3c 100644 --- a/libcef/browser/resource_context.cc +++ b/libcef/browser/resource_context.cc @@ -66,11 +66,6 @@ void CefResourceContext::RemoveUserData(const void* key) { content::ResourceContext::RemoveUserData(key); } -net::HostResolver* CefResourceContext::GetHostResolver() { - CHECK(getter_.get()); - return getter_->GetHostResolver(); -} - net::URLRequestContext* CefResourceContext::GetRequestContext() { CHECK(getter_.get()); return getter_->GetURLRequestContext(); diff --git a/libcef/browser/resource_context.h b/libcef/browser/resource_context.h index 238733f5b..a81d81ad3 100644 --- a/libcef/browser/resource_context.h +++ b/libcef/browser/resource_context.h @@ -38,7 +38,6 @@ class CefResourceContext : public content::ResourceContext { void RemoveUserData(const void* key) override; // ResourceContext implementation. - net::HostResolver* GetHostResolver() override; net::URLRequestContext* GetRequestContext() override; std::unique_ptr CreateClientCertStore(); diff --git a/libcef/common/extensions/api/BUILD.gn b/libcef/common/extensions/api/BUILD.gn index ac47083f8..7d1b7d33f 100644 --- a/libcef/common/extensions/api/BUILD.gn +++ b/libcef/common/extensions/api/BUILD.gn @@ -43,45 +43,34 @@ import("//tools/json_schema_compiler/json_features.gni") json_features("cef_api_features") { feature_type = "APIFeature" - provider_class = "CefAPIFeatureProvider" + method_name = "AddCEFAPIFeatures" sources = [ - "//extensions/common/api/_api_features.json", "_api_features.json", ] } json_features("cef_permission_features") { feature_type = "PermissionFeature" - provider_class = "CefPermissionFeatureProvider" + method_name = "AddCEFPermissionFeatures" sources = [ - "//extensions/common/api/_permission_features.json", "_permission_features.json", ] } json_features("cef_manifest_features") { feature_type = "ManifestFeature" - provider_class = "CefManifestFeatureProvider" + method_name = "AddCEFManifestFeatures" sources = [ # Use the same manifest features as Chrome. "//chrome/common/extensions/api/_manifest_features.json", - "//extensions/common/api/_manifest_features.json", - ] -} - -json_features("cef_behavior_features") { - feature_type = "BehaviorFeature" - provider_class = "CefBehaviorFeatureProvider" - sources = [ - "//extensions/common/api/_behavior_features.json", ] } group("extensions_features") { public_deps = [ ":cef_api_features", - ":cef_behavior_features", ":cef_manifest_features", ":cef_permission_features", + "//extensions/common/api:extensions_features", ] } diff --git a/libcef/common/extensions/extensions_client.cc b/libcef/common/extensions/extensions_client.cc index d9d955712..fbecaba5d 100644 --- a/libcef/common/extensions/extensions_client.cc +++ b/libcef/common/extensions/extensions_client.cc @@ -14,16 +14,20 @@ #include "cef/grit/cef_resources.h" //#include "cef/libcef/common/extensions/api/generated_schemas.h" #include "cef/libcef/common/extensions/api/cef_api_features.h" -#include "cef/libcef/common/extensions/api/cef_behavior_features.h" #include "cef/libcef/common/extensions/api/cef_manifest_features.h" #include "cef/libcef/common/extensions/api/cef_permission_features.h" #include "chrome/common/extensions/chrome_aliases.h" #include "chrome/common/extensions/chrome_manifest_handlers.h" #include "chrome/grit/common_resources.h" +#include "extensions/common/api/api_features.h" +#include "extensions/common/api/behavior_features.h" #include "extensions/common/api/generated_schemas.h" +#include "extensions/common/api/manifest_features.h" +#include "extensions/common/api/permission_features.h" #include "extensions/common/common_manifest_handlers.h" #include "extensions/common/extension_urls.h" #include "extensions/common/extensions_aliases.h" +#include "extensions/common/features/feature_provider.h" #include "extensions/common/features/json_feature_provider_source.h" #include "extensions/common/features/simple_feature.h" #include "extensions/common/manifest_handler.h" @@ -77,15 +81,19 @@ const std::string CefExtensionsClient::GetProductName() { std::unique_ptr CefExtensionsClient::CreateFeatureProvider( const std::string& name) const { - std::unique_ptr provider; + auto provider = std::make_unique(); if (name == "api") { - provider.reset(new CefAPIFeatureProvider()); + AddCoreAPIFeatures(provider.get()); + AddCEFAPIFeatures(provider.get()); } else if (name == "manifest") { - provider.reset(new CefManifestFeatureProvider()); + AddCoreManifestFeatures(provider.get()); + AddCEFManifestFeatures(provider.get()); } else if (name == "permission") { - provider.reset(new CefPermissionFeatureProvider()); + AddCorePermissionFeatures(provider.get()); + AddCEFPermissionFeatures(provider.get()); } else if (name == "behavior") { - provider.reset(new CefBehaviorFeatureProvider()); + // Note: There are no CEF-specific behavior features. + AddCoreBehaviorFeatures(provider.get()); } else { NOTREACHED(); } diff --git a/libcef/common/main_delegate.cc b/libcef/common/main_delegate.cc index c13c66247..cacdd6ba2 100644 --- a/libcef/common/main_delegate.cc +++ b/libcef/common/main_delegate.cc @@ -31,6 +31,7 @@ #include "content/browser/browser_process_sub_thread.h" #include "content/public/browser/browser_main_runner.h" #include "content/public/browser/render_process_host.h" +#include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" #include "content/public/common/main_function_params.h" #include "extensions/common/constants.h" @@ -435,6 +436,29 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) { switches::kUncaughtExceptionStackSize, base::IntToString(settings.uncaught_exception_stack_size)); } + +#if defined(OS_MACOSX) + std::vector disable_features; + + // TODO: Remove once MacV2Sandbox is supported. See issue #2459. + if (features::kMacV2Sandbox.default_state == + base::FEATURE_ENABLED_BY_DEFAULT) { + disable_features.push_back(features::kMacV2Sandbox.name); + } + + if (!disable_features.empty()) { + DCHECK(!base::FeatureList::GetInstance()); + std::string disable_features_str = + command_line->GetSwitchValueASCII(switches::kDisableFeatures); + for (auto feature_str : disable_features) { + if (!disable_features_str.empty()) + disable_features_str += ","; + disable_features_str += feature_str; + } + command_line->AppendSwitchASCII(switches::kDisableFeatures, + disable_features_str); + } +#endif // defined(OS_MACOSX) } if (content_client_.application().get()) { diff --git a/libcef/common/service_manifests/browser_manifest_overlay.json b/libcef/common/service_manifests/browser_manifest_overlay.json index 41e13a9e3..a733ccb0c 100644 --- a/libcef/common/service_manifests/browser_manifest_overlay.json +++ b/libcef/common/service_manifests/browser_manifest_overlay.json @@ -20,6 +20,7 @@ "renderer": [ "blink.mojom.BudgetService", "extensions.KeepAlive", + "extensions.mime_handler.BeforeUnloadControl", "extensions.mime_handler.MimeHandlerService" ] } diff --git a/patch/patches/DEPS.patch b/patch/patches/DEPS.patch index 76cc1a6c7..031c17ae6 100644 --- a/patch/patches/DEPS.patch +++ b/patch/patches/DEPS.patch @@ -1,5 +1,5 @@ diff --git tools/clang/scripts/update.py tools/clang/scripts/update.py -index 03132fe9ba9b..aee7538e5902 100755 +index f69d2eb8915b..04d97b47dbe9 100755 --- tools/clang/scripts/update.py +++ tools/clang/scripts/update.py @@ -392,7 +392,10 @@ def GetWinSDKDir(): diff --git a/patch/patches/browser_compositor_mac.patch b/patch/patches/browser_compositor_mac.patch index 59454b3c7..e026110a2 100644 --- a/patch/patches/browser_compositor_mac.patch +++ b/patch/patches/browser_compositor_mac.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/browser_compositor_view_mac.h content/browser/renderer_host/browser_compositor_view_mac.h -index 4be07e30cf30..103bf0917a40 100644 +index 513e70d2b738..f821043e0a4e 100644 --- content/browser/renderer_host/browser_compositor_view_mac.h +++ content/browser/renderer_host/browser_compositor_view_mac.h -@@ -58,6 +58,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient, +@@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient, // These will not return nullptr until Destroy is called. DelegatedFrameHost* GetDelegatedFrameHost(); @@ -12,10 +12,10 @@ index 4be07e30cf30..103bf0917a40 100644 // Ensure that the currect compositor frame be cleared (even if it is // potentially visible). diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm -index a641f135dc10..64d38c7c1be7 100644 +index 72ad272b4d1a..0b4cd87019bf 100644 --- content/browser/renderer_host/browser_compositor_view_mac.mm +++ content/browser/renderer_host/browser_compositor_view_mac.mm -@@ -245,6 +245,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { +@@ -87,6 +87,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() { return delegated_frame_host_.get(); } diff --git a/patch/patches/browser_plugin_guest_1565.patch b/patch/patches/browser_plugin_guest_1565.patch index f83b1dab2..e880acd61 100644 --- a/patch/patches/browser_plugin_guest_1565.patch +++ b/patch/patches/browser_plugin_guest_1565.patch @@ -208,10 +208,10 @@ index 9e3511a9dabc..83dfee968d59 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h -index cf3305f96ddb..a44341905909 100644 +index 2e3f4f8a56d4..75ef26b5381a 100644 --- content/browser/web_contents/web_contents_view_mac.h +++ content/browser/web_contents/web_contents_view_mac.h -@@ -93,7 +93,7 @@ class WebContentsViewMac : public WebContentsView, +@@ -96,7 +96,7 @@ class WebContentsViewMac : public WebContentsView, gfx::NativeView context) override; RenderWidgetHostViewBase* CreateViewForWidget( RenderWidgetHost* render_widget_host, @@ -221,7 +221,7 @@ index cf3305f96ddb..a44341905909 100644 RenderWidgetHost* render_widget_host) override; void SetPageTitle(const base::string16& title) override; diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm -index 082b74eff5b2..6f477ecba11e 100644 +index 03d7c9c7dcce..e84c1787a84d 100644 --- content/browser/web_contents/web_contents_view_mac.mm +++ content/browser/web_contents/web_contents_view_mac.mm @@ -345,7 +345,8 @@ void WebContentsViewMac::CreateView( @@ -266,10 +266,10 @@ index d05dd5421458..fa13775f0512 100644 // a BrowserPlugin even when we are using cross process frames for guests. It // should be removed after resolving https://crbug.com/642826). diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index a2a8e427b231..01d59c063d07 100644 +index 1930af130f24..77695f7844d7 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( +@@ -198,6 +198,8 @@ void MimeHandlerViewGuest::CreateWebContents( WebContents::CreateParams params(browser_context(), guest_site_instance.get()); params.guest_delegate = this; @@ -278,7 +278,7 @@ index a2a8e427b231..01d59c063d07 100644 // TODO(erikchen): Fix ownership semantics for guest views. // https://crbug.com/832879. std::move(callback).Run( -@@ -232,6 +234,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { +@@ -239,6 +241,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const { return true; } @@ -298,10 +298,10 @@ index a2a8e427b231..01d59c063d07 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 2a74abb320d5..16db064fb4a3 100644 +index 477ea3c85631..665a95b7665e 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 : +@@ -112,6 +112,10 @@ class MimeHandlerViewGuest bool ZoomPropagatesFromEmbedderToGuest() const final; bool ShouldDestroyOnDetach() const final; diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 4e310a448..e2a0c46ce 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 a73a10627a5a..b6cf1c0b5608 100644 +index 343c8a0fbfeb..68c73fa1c5f0 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/features.gni") @@ -10,7 +10,7 @@ index a73a10627a5a..b6cf1c0b5608 100644 import("//chrome/common/features.gni") import("//components/feature_engagement/features.gni") import("//components/feed/features.gni") -@@ -1646,6 +1647,7 @@ jumbo_split_static_library("browser") { +@@ -1659,6 +1660,7 @@ jumbo_split_static_library("browser") { "//base:i18n", "//base/allocator:buildflags", "//cc", @@ -18,7 +18,7 @@ index a73a10627a5a..b6cf1c0b5608 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -1918,6 +1920,10 @@ jumbo_split_static_library("browser") { +@@ -1931,6 +1933,10 @@ jumbo_split_static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 21721c329..e2caf6a8d 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -70,7 +70,7 @@ index e8e76ce5b954..1dd338dd0142 100644 content::BrowserContext* GetBrowserContextRedirectedInIncognito( content::BrowserContext* context); diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index e1bf8abb1644..1876b68e3cd1 100644 +index be5d79034fea..617ab398fff8 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc @@ -383,7 +383,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 4907174fa..7796b5770 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 6a15716bb62f..60883d8e1031 100644 +index 2951ee282f4c..f692717d5712 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -761,6 +761,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 6a15716bb62f..60883d8e1031 100644 observer->IsPluginTemporarilyAllowed(identifier)) { status = chrome::mojom::PluginStatus::kAllowed; } -@@ -948,7 +949,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 6a15716bb62f..60883d8e1031 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -957,7 +959,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 6a15716bb62f..60883d8e1031 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -967,7 +970,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -968,7 +971,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -198,7 +198,7 @@ index 6a15716bb62f..60883d8e1031 100644 break; } case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -975,7 +979,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/content_2015.patch b/patch/patches/content_2015.patch index 3020e86d2..c0aafe8e6 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -94,10 +94,21 @@ index 201f23b9b422..4664c6b32c22 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 412fc31e185c..66ee1f2fbd86 100644 +index 36b5e3bf6853..9303e53b9094 100644 --- content/browser/frame_host/render_frame_host_impl.cc +++ content/browser/frame_host/render_frame_host_impl.cc -@@ -1614,6 +1614,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( +@@ -842,8 +842,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactory( + RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory( + this, false /* is_navigation */, false /* is_download */, + &default_factory_request); +- StoragePartitionImpl* storage_partition = static_cast( +- BrowserContext::GetStoragePartition(context, GetSiteInstance())); ++ StoragePartition* storage_partition = ++ BrowserContext::GetStoragePartition(context, GetSiteInstance()); + if (g_create_network_factory_callback_for_test.Get().is_null()) { + storage_partition->GetNetworkContext()->CreateURLLoaderFactory( + std::move(default_factory_request), std::move(params)); +@@ -1672,6 +1672,7 @@ void RenderFrameHostImpl::OnDidFailProvisionalLoadWithError( if (GetNavigationHandle()) { GetNavigationHandle()->set_net_error_code( static_cast(params.error_code)); @@ -105,7 +116,7 @@ index 412fc31e185c..66ee1f2fbd86 100644 } frame_tree_node_->navigator()->DidFailProvisionalLoadWithError(this, params); -@@ -3799,9 +3800,9 @@ void RenderFrameHostImpl::CommitNavigation( +@@ -4050,9 +4051,9 @@ void RenderFrameHostImpl::CommitNavigation( // is used. Currently we have this here to make sure we have non-racy // situation (https://crbug.com/849929). DCHECK(base::FeatureList::IsEnabled(network::features::kNetworkService)); @@ -117,22 +128,11 @@ index 412fc31e185c..66ee1f2fbd86 100644 BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::BindOnce(&PrefetchURLLoaderService::GetFactory, -@@ -4413,8 +4414,8 @@ void RenderFrameHostImpl::CreateNetworkServiceDefaultFactoryAndObserve( - RenderFrameDevToolsAgentHost::WillCreateURLLoaderFactory( - this, false /* is_navigation */, false /* is_download */, - &default_factory_request); -- StoragePartitionImpl* storage_partition = static_cast( -- BrowserContext::GetStoragePartition(context, GetSiteInstance())); -+ auto* storage_partition = -+ BrowserContext::GetStoragePartition(context, GetSiteInstance()); - if (g_create_network_factory_callback_for_test.Get().is_null()) { - storage_partition->GetNetworkContext()->CreateURLLoaderFactory( - std::move(default_factory_request), std::move(params)); diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc -index e39784552c5a..f9f520211e48 100644 +index 2f32390f0b45..6324f0f738e8 100644 --- content/browser/frame_host/render_frame_message_filter.cc +++ content/browser/frame_host/render_frame_message_filter.cc -@@ -626,6 +626,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id, +@@ -629,6 +629,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id, void RenderFrameMessageFilter::OnGetPluginInfo( int render_frame_id, const GURL& url, @@ -140,7 +140,7 @@ index e39784552c5a..f9f520211e48 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool* found, -@@ -634,8 +635,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo( +@@ -637,8 +638,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo( bool allow_wildcard = true; *found = plugin_service_->GetPluginInfo( render_process_id_, render_frame_id, resource_context_, url, @@ -152,10 +152,10 @@ index e39784552c5a..f9f520211e48 100644 void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin( diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h -index 5bd44e2d538d..11cd8b0f9237 100644 +index 9716b2008062..362990246f97 100644 --- content/browser/frame_host/render_frame_message_filter.h +++ content/browser/frame_host/render_frame_message_filter.h -@@ -143,6 +143,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter +@@ -144,6 +144,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter #if BUILDFLAG(ENABLE_PLUGINS) void OnGetPluginInfo(int render_frame_id, const GURL& url, @@ -285,10 +285,10 @@ index 3009401dac6b..b4c5a9e2db50 100644 }; diff --git content/common/frame_messages.h content/common/frame_messages.h -index 94c3c6bfc0d4..ce424e1eaced 100644 +index 67a66d040a08..76867658db44 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -1381,9 +1381,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -1382,9 +1382,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, // type. If there is no matching plugin, |found| is false. // |actual_mime_type| is the actual mime type supported by the // found plugin. @@ -364,7 +364,7 @@ index 2f1f46075b27..94f300dfea5d 100644 virtual void FocusedNodeChanged(const blink::WebNode& node) {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index 39f42d884dff..e40852fe5b84 100644 +index 61ee2a0d203a..f03a4ff9ee98 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc @@ -3471,7 +3471,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( @@ -387,7 +387,7 @@ index 39f42d884dff..e40852fe5b84 100644 void RenderFrameImpl::WillCommitProvisionalLoad() { diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index ed9ecdafb96e..23e547afaedd 100644 +index ca6a21b03082..a090b13d65e5 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc @@ -866,6 +866,8 @@ void RenderThreadImpl::Init( @@ -400,10 +400,10 @@ index ed9ecdafb96e..23e547afaedd 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 e586e93c934c..dcc761353829 100644 +index a9b86c68fe50..41dc5202b0e4 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1123,6 +1123,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() { +@@ -1121,6 +1121,14 @@ void RendererBlinkPlatformImpl::RequestPurgeMemory() { base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory(); } @@ -419,10 +419,10 @@ index e586e93c934c..dcc761353829 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 11a3acd664b3..1167382c3bd1 100644 +index bebcd933b8ce..d2deaab2d114 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -235,6 +235,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -225,6 +225,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { mojo::ScopedDataPipeConsumerHandle handle) override; void RequestPurgeMemory() override; diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 293a3e1bd..6a0b480b1 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 1b1823b87cc5..eb70d0f5d587 100644 +index d0949dc9693e..afe19e4f3ec4 100644 --- chrome_elf/BUILD.gn +++ chrome_elf/BUILD.gn @@ -7,6 +7,7 @@ diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 147e067f2..3d2288ee4 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 301b0d075284..02109eee22f8 100644 +index 29386263f0db..11fa39c54d43 100644 --- content/browser/frame_host/render_frame_host_manager.cc +++ content/browser/frame_host/render_frame_host_manager.cc -@@ -922,10 +922,11 @@ bool RenderFrameHostManager::ShouldSwapBrowsingInstancesForNavigation( +@@ -928,10 +928,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 301b0d075284..02109eee22f8 100644 return true; } -@@ -1064,7 +1065,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( +@@ -1070,7 +1071,8 @@ RenderFrameHostManager::GetSiteInstanceForNavigation( // Double-check that the new SiteInstance is associated with the right // BrowserContext. @@ -57,10 +57,10 @@ index 301b0d075284..02109eee22f8 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 9ada95562d77..e0ebf0289097 100644 +index fd5d62fee117..b86f2d84457e 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -382,6 +382,13 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -394,6 +394,13 @@ class CONTENT_EXPORT ContentBrowserClient { // Returns true if error page should be isolated in its own process. virtual bool ShouldIsolateErrorPage(bool in_main_frame); @@ -180,7 +180,7 @@ index 369f4451607e..1849f3a7bcb7 100644 // A weak pointer to the current or pending RenderViewHost. We don't access // this through the host_contents because we want to deal with the pending diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index 9e8ebb1a4d59..b42e88b11f6a 100644 +index bb45a8acc909..d4b3fcb3dae5 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h @@ -54,6 +54,7 @@ class ComponentExtensionResourceManager; diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index ef7f7c843..29aee6a25 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index 87fb8815433e..f19fba48f06c 100644 +index ec3d38717a85..fbf80cae5500 100644 --- .gn +++ .gn -@@ -247,6 +247,8 @@ exec_script_whitelist = +@@ -248,6 +248,8 @@ exec_script_whitelist = # in the Chromium repo outside of //build. "//build_overrides/build.gni", @@ -12,7 +12,7 @@ index 87fb8815433e..f19fba48f06c 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index eca00a816913..d892e01835fe 100644 +index 9d067467e5d2..b40fb00c35a9 100644 --- BUILD.gn +++ BUILD.gn @@ -186,6 +186,7 @@ group("gn_all") { diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 5bff3c65f..9d7ca5a2e 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,5 +1,5 @@ diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids -index 15d8fdc55f91..d860b4ad4a8e 100644 +index efa6e5c90b88..afa269910ce6 100644 --- tools/gritsettings/resource_ids +++ tools/gritsettings/resource_ids @@ -414,4 +414,11 @@ diff --git a/patch/patches/linux_build.patch b/patch/patches/linux_build.patch index 6d91b46a3..8cb2f11ec 100644 --- a/patch/patches/linux_build.patch +++ b/patch/patches/linux_build.patch @@ -1,5 +1,5 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index 6e38ad782d38..a384f8b79c04 100644 +index 959a59231746..67335e852219 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn @@ -152,7 +152,7 @@ declare_args() { diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 8c2bd78a5..983993d55 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,8 +1,8 @@ diff --git base/message_loop/message_loop.cc base/message_loop/message_loop.cc -index 3c715c8e6ae9..d1622d2e87c9 100644 +index 4571c726ec4a..ad1479647400 100644 --- base/message_loop/message_loop.cc +++ base/message_loop/message_loop.cc -@@ -701,6 +701,9 @@ MessageLoopForUI::MessageLoopForUI(Type type) : MessageLoop(type) { +@@ -573,6 +573,9 @@ MessageLoopForUI::MessageLoopForUI(Type type) : MessageLoop(type) { #endif } @@ -13,10 +13,10 @@ index 3c715c8e6ae9..d1622d2e87c9 100644 MessageLoopCurrentForUI MessageLoopForUI::current() { return MessageLoopCurrentForUI::Get(); diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h -index f34416015fee..9727efbe288f 100644 +index 6010333616eb..f9479daaa4b8 100644 --- base/message_loop/message_loop.h +++ base/message_loop/message_loop.h -@@ -352,6 +352,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate, +@@ -343,6 +343,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate, class BASE_EXPORT MessageLoopForUI : public MessageLoop { public: explicit MessageLoopForUI(Type type = TYPE_UI); @@ -60,7 +60,7 @@ index 61d1607e31e7..656b3a9c9f68 100644 #if !defined(OS_NACL) diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 8dad64cbeb3a..63fa0e1a2be7 100644 +index c95f85abfee1..b28ac0a0faa1 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -11,6 +11,7 @@ @@ -71,7 +71,7 @@ index 8dad64cbeb3a..63fa0e1a2be7 100644 #include "base/metrics/histogram_macros.h" #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event.h" -@@ -381,20 +382,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) { +@@ -375,20 +376,28 @@ bool MessagePumpForUI::ProcessMessageHelper(const MSG& msg) { } bool MessagePumpForUI::ProcessPumpReplacementMessage() { diff --git a/patch/patches/net_urlrequest_1327.patch b/patch/patches/net_urlrequest_1327.patch index 34e4ee810..78de0cfc7 100644 --- a/patch/patches/net_urlrequest_1327.patch +++ b/patch/patches/net_urlrequest_1327.patch @@ -1,8 +1,8 @@ diff --git net/url_request/url_request.h net/url_request/url_request.h -index 8551e92a205d..0bc5443c9f2e 100644 +index 6f23eedfd4f9..82d1f81e4081 100644 --- net/url_request/url_request.h +++ net/url_request/url_request.h -@@ -724,10 +724,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { +@@ -734,10 +734,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData { } bool upgrade_if_insecure() const { return upgrade_if_insecure_; } diff --git a/patch/patches/pdfium_print_549365.patch b/patch/patches/pdfium_print_549365.patch index 4d9fc2588..5e49f973c 100644 --- a/patch/patches/pdfium_print_549365.patch +++ b/patch/patches/pdfium_print_549365.patch @@ -1,5 +1,5 @@ diff --git BUILD.gn BUILD.gn -index 222784f36..a492d6735 100644 +index 135d392e0..a14fec518 100644 --- BUILD.gn +++ BUILD.gn @@ -239,6 +239,10 @@ jumbo_static_library("pdfium") { @@ -14,7 +14,7 @@ index 222784f36..a492d6735 100644 jumbo_static_library("test_support") { diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp -index 8aca6fb9f..db703ef24 100644 +index 5fdc82af7..47a3cdaab 100644 --- fpdfsdk/fpdf_view.cpp +++ fpdfsdk/fpdf_view.cpp @@ -38,6 +38,7 @@ diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index a5c9753d2..e5e8d4d2d 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -35,12 +35,12 @@ index 78cbf5f3db86..9a4906a32336 100644 bool record_whole_document; SavePreviousDocumentResources save_previous_document_resources; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index 1fdb7ccfaa8f..55ec8b11b070 100644 +index 03d9cda9f95d..b5e24523bb1c 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -1222,6 +1222,7 @@ void RenderViewImpl::ApplyWebPreferencesInternal( - blink::WebView* web_view, - CompositorDependencies* compositor_deps) { +@@ -1222,6 +1222,7 @@ void RenderViewImpl::SendFrameStateUpdates() { + void RenderViewImpl::ApplyWebPreferencesInternal(const WebPreferences& prefs, + blink::WebView* web_view) { ApplyWebPreferences(prefs, web_view); + web_view->SetBaseBackgroundColor(prefs.base_background_color); } diff --git a/patch/patches/print_header_footer_1478_1565.patch b/patch/patches/print_header_footer_1478_1565.patch index fc67865a5..757a5da0c 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 8f0a3e469f58..3520b34a3b22 100644 +index c6d7d9d076a9..79fe6745a829 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn -@@ -890,6 +890,7 @@ split_static_library("ui") { +@@ -901,6 +901,7 @@ split_static_library("ui") { "//base:i18n", "//base/allocator:buildflags", "//cc/paint", @@ -253,10 +253,10 @@ index d29bb6aedecd..db7110ce80be 100644 #endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_ diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc -index 6d106fa56134..7fd9e87e9ea4 100644 +index c7ea5cf76aa6..ce0d1d10cd07 100644 --- components/printing/renderer/print_render_frame_helper.cc +++ components/printing/renderer/print_render_frame_helper.cc -@@ -340,7 +340,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, +@@ -341,7 +341,6 @@ bool PrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame, return plugin && plugin->SupportsPaginatedPrint(); } @@ -264,7 +264,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 // Returns true if the current destination printer is PRINT_TO_PDF. bool IsPrintToPdfRequested(const base::DictionaryValue& job_settings) { bool print_to_pdf = false; -@@ -362,7 +361,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, +@@ -363,7 +362,6 @@ bool PrintingFrameHasPageSizeStyle(blink::WebLocalFrame* frame, } return frame_has_custom_page_size_style; } @@ -272,7 +272,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 #if BUILDFLAG(ENABLE_PRINTING) // Disable scaling when either: -@@ -417,7 +415,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, +@@ -418,7 +416,6 @@ MarginType GetMarginsForPdf(blink::WebLocalFrame* frame, : PRINTABLE_AREA_MARGINS; } @@ -280,7 +280,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 bool FitToPageEnabled(const base::DictionaryValue& job_settings) { bool fit_to_paper_size = false; if (!job_settings.GetBoolean(kSettingFitToPageEnabled, &fit_to_paper_size)) { -@@ -459,7 +456,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( +@@ -460,7 +457,6 @@ blink::WebPrintScalingOption GetPrintScalingOption( } return blink::kWebPrintScalingOptionFitToPrintableArea; } @@ -288,7 +288,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 // Helper function to scale and round an integer value with a double valued // scaling. -@@ -970,6 +966,7 @@ PrintRenderFrameHelper::PrintRenderFrameHelper( +@@ -975,6 +971,7 @@ PrintRenderFrameHelper::PrintRenderFrameHelper( notify_browser_of_print_failure_(true), delegate_(std::move(delegate)), print_node_in_progress_(false), @@ -296,7 +296,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 is_loading_(false), is_scripted_preview_delayed_(false), ipc_nesting_level_(0), -@@ -1031,10 +1028,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1036,10 +1033,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { return; if (g_is_preview_enabled) { @@ -307,7 +307,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 } else { auto weak_this = weak_ptr_factory_.GetWeakPtr(); web_frame->DispatchBeforePrintEvent(); -@@ -1062,10 +1057,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { +@@ -1067,10 +1062,10 @@ bool PrintRenderFrameHelper::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(PrintRenderFrameHelper, message) IPC_MESSAGE_HANDLER(PrintMsg_PrintPages, OnPrintPages) IPC_MESSAGE_HANDLER(PrintMsg_PrintForSystemDialog, OnPrintForSystemDialog) @@ -319,7 +319,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 IPC_MESSAGE_HANDLER(PrintMsg_ClosePrintPreviewDialog, OnClosePrintPreviewDialog) #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -1147,7 +1142,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( +@@ -1152,7 +1147,6 @@ void PrintRenderFrameHelper::UpdateFrameMarginsCssInfo( ignore_css_margins_ = (margins_type != DEFAULT_MARGINS); } @@ -327,15 +327,15 @@ index 6d106fa56134..7fd9e87e9ea4 100644 void PrintRenderFrameHelper::OnPrintPreview( const base::DictionaryValue& settings) { if (ipc_nesting_level_ > 1) -@@ -1396,7 +1390,6 @@ bool PrintRenderFrameHelper::FinalizePrintReadyDocument() { - ids)); - return true; +@@ -1407,7 +1401,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor( + printable_height / static_cast(uniform_page_size.height); + return static_cast(100.0f * std::min(scale_width, scale_height)); } -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintRenderFrameHelper::OnPrintingDone(bool success) { if (ipc_nesting_level_ > 1) -@@ -1411,7 +1404,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { +@@ -1422,7 +1415,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) { is_printing_enabled_ = enabled; } @@ -343,7 +343,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { if (ipc_nesting_level_ > 1) return; -@@ -1422,7 +1414,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1433,7 +1425,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { // that instead. auto plugin = delegate_->GetPdfElement(frame); if (!plugin.IsNull()) { @@ -353,7 +353,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 return; } print_preview_context_.InitWithFrame(frame); -@@ -1431,6 +1425,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { +@@ -1442,6 +1436,7 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) { : PRINT_PREVIEW_USER_INITIATED_ENTIRE_FRAME); } @@ -361,7 +361,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 void PrintRenderFrameHelper::OnClosePrintPreviewDialog() { print_preview_context_.source_frame()->DispatchAfterPrintEvent(); } -@@ -1518,11 +1513,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1529,11 +1524,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { print_node_in_progress_ = true; @@ -374,7 +374,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 } else { // Make a copy of the node, in case RenderView::OnContextMenuClosed() resets // its |context_menu_node_|. -@@ -1598,13 +1591,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1609,13 +1602,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { int cookie = print_pages_params_ ? print_pages_params_->params.document_cookie : 0; @@ -388,7 +388,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 switch (result) { case OK: break; -@@ -1619,7 +1610,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1630,7 +1621,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { } break; @@ -396,7 +396,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 case FAIL_PREVIEW: if (!is_print_ready_metafile_sent_) { if (notify_browser_of_print_failure_) { -@@ -1637,7 +1627,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { +@@ -1648,7 +1638,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) { cookie, ids)); print_preview_context_.Failed(false); break; @@ -404,7 +404,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 } prep_frame_view_.reset(); print_pages_params_.reset(); -@@ -1809,7 +1798,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, +@@ -1820,7 +1809,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame, return true; } @@ -412,7 +412,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 bool PrintRenderFrameHelper::SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options) { blink::WebLocalFrame* source_frame = print_preview_context_.source_frame(); -@@ -1903,7 +1891,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( +@@ -1914,7 +1902,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings( print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS); return false; } @@ -420,7 +420,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 void PrintRenderFrameHelper::GetPrintSettingsFromUser( blink::WebLocalFrame* frame, -@@ -2060,7 +2047,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( +@@ -2071,7 +2058,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem( return true; } @@ -428,7 +428,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 void PrintRenderFrameHelper::ShowScriptedPrintPreview() { if (is_scripted_preview_delayed_) { is_scripted_preview_delayed_ = false; -@@ -2186,7 +2172,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( +@@ -2197,7 +2183,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered( Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids)); return true; } @@ -437,7 +437,7 @@ index 6d106fa56134..7fd9e87e9ea4 100644 PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext() : total_page_count_(0), diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h -index 8915d8c7caf0..26b67583bbf1 100644 +index 6e2d7e1467b7..50b22292d021 100644 --- components/printing/renderer/print_render_frame_helper.h +++ components/printing/renderer/print_render_frame_helper.h @@ -149,10 +149,8 @@ class PrintRenderFrameHelper @@ -470,15 +470,15 @@ index 8915d8c7caf0..26b67583bbf1 100644 // Prepare frame for creating preview document. void PrepareFrameForPreviewDocument(); -@@ -223,7 +220,6 @@ class PrintRenderFrameHelper +@@ -226,7 +223,6 @@ class PrintRenderFrameHelper - // Finalize the print ready preview document. - bool FinalizePrintReadyDocument(); + // Helper method to calculate the scale factor for fit-to-page. + int GetFitToPageScaleFactor(const gfx::Rect& printable_area_in_points); -#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) // Enable/Disable printing. void OnSetPrintingEnabled(bool enabled); -@@ -251,7 +247,6 @@ class PrintRenderFrameHelper +@@ -254,7 +250,6 @@ class PrintRenderFrameHelper const blink::WebNode& node, int* number_of_pages); @@ -486,7 +486,7 @@ index 8915d8c7caf0..26b67583bbf1 100644 // Set options for print preset from source PDF document. bool SetOptionsFromPdfDocument( PrintHostMsg_SetOptionsFromDocument_Params* options); -@@ -262,7 +257,6 @@ class PrintRenderFrameHelper +@@ -265,7 +260,6 @@ class PrintRenderFrameHelper bool UpdatePrintSettings(blink::WebLocalFrame* frame, const blink::WebNode& node, const base::DictionaryValue& passed_job_settings); @@ -494,7 +494,7 @@ index 8915d8c7caf0..26b67583bbf1 100644 // Get final print settings from the user. // WARNING: |this| may be gone after this method returns. -@@ -347,7 +341,6 @@ class PrintRenderFrameHelper +@@ -350,7 +344,6 @@ class PrintRenderFrameHelper bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame, bool user_initiated); @@ -502,7 +502,7 @@ index 8915d8c7caf0..26b67583bbf1 100644 // Shows scripted print preview when options from plugin are available. void ShowScriptedPrintPreview(); -@@ -366,7 +359,6 @@ class PrintRenderFrameHelper +@@ -369,7 +362,6 @@ class PrintRenderFrameHelper // Returns true if print preview should continue, false on failure. bool PreviewPageRendered(int page_number, std::unique_ptr metafile); @@ -510,7 +510,7 @@ index 8915d8c7caf0..26b67583bbf1 100644 void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings); -@@ -520,6 +512,7 @@ class PrintRenderFrameHelper +@@ -523,6 +515,7 @@ class PrintRenderFrameHelper ScriptingThrottler scripting_throttler_; bool print_node_in_progress_; diff --git a/patch/patches/renderer_preferences_util_545103.patch b/patch/patches/renderer_preferences_util_545103.patch index 7c40504fe..acd9ea7c8 100644 --- a/patch/patches/renderer_preferences_util_545103.patch +++ b/patch/patches/renderer_preferences_util_545103.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc -index e0fa371f0a8a..7309acfc729d 100644 +index 41a85d938028..0128b9f0d98b 100644 --- chrome/browser/renderer_preferences_util.cc +++ chrome/browser/renderer_preferences_util.cc -@@ -32,7 +32,8 @@ +@@ -31,7 +31,8 @@ #include "ui/base/cocoa/defaults_utils.h" #endif @@ -12,7 +12,7 @@ index e0fa371f0a8a..7309acfc729d 100644 #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" #include "ui/views/linux_ui/linux_ui.h" -@@ -132,7 +133,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs, +@@ -130,7 +131,8 @@ void UpdateFromSystemSettings(content::RendererPreferences* prefs, prefs->caret_blink_interval = interval; #endif diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index 91038639f..a3c2d1014 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 236b40392445..c7eb7f728120 100644 +index 09168578786f..aa889848f83c 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -718,10 +718,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { +@@ -719,10 +719,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() const { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -19,7 +19,7 @@ index 236b40392445..c7eb7f728120 100644 } void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -1920,6 +1922,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -1922,6 +1924,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_factory_1680.patch b/patch/patches/service_factory_1680.patch index 6ff40c8e3..675ace414 100644 --- a/patch/patches/service_factory_1680.patch +++ b/patch/patches/service_factory_1680.patch @@ -97,7 +97,7 @@ index 2907619549ba..f941fba363b5 100644 SupervisedUserSettingsServiceFactory(); diff --git chrome/browser/ui/prefs/prefs_tab_helper.cc chrome/browser/ui/prefs/prefs_tab_helper.cc -index c778758ced62..80d84ef4f6a6 100644 +index b9b2f059f694..a7b11cb75f22 100644 --- chrome/browser/ui/prefs/prefs_tab_helper.cc +++ chrome/browser/ui/prefs/prefs_tab_helper.cc @@ -11,8 +11,8 @@ diff --git a/patch/patches/service_manager_654986.patch b/patch/patches/service_manager_654986.patch index 8b553a6b0..7dbcfa719 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 3480d43aee55..310d9e0b4833 100644 +index ac130bf48678..e454f166eecf 100644 --- services/service_manager/embedder/main.cc +++ services/service_manager/embedder/main.cc @@ -300,22 +300,36 @@ int RunService(MainDelegate* delegate) { diff --git a/patch/patches/storage_partition_1973.patch b/patch/patches/storage_partition_1973.patch index 812cdaa4f..7846ecee1 100644 --- a/patch/patches/storage_partition_1973.patch +++ b/patch/patches/storage_partition_1973.patch @@ -73,10 +73,10 @@ index f061eca7c86b..0fc07c9c4eb8 100644 partition->GetBluetoothAllowedDevicesMap(); return allowed_devices_map->GetOrCreateAllowedDevices(GetOrigin()); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index 6793401c6c72..4d7289299585 100644 +index 199a676de558..9d49cde507ac 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc -@@ -150,11 +150,18 @@ StoragePartition* GetStoragePartitionFromConfig( +@@ -152,11 +152,18 @@ StoragePartition* GetStoragePartitionFromConfig( StoragePartitionImplMap* partition_map = GetStoragePartitionMap(browser_context); @@ -98,7 +98,7 @@ index 6793401c6c72..4d7289299585 100644 } void SaveSessionStateOnIOThread( -@@ -615,6 +622,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor( +@@ -637,6 +644,11 @@ ServiceManagerConnection* BrowserContext::GetServiceManagerConnectionFor( BrowserContext::BrowserContext() : unique_id_(base::UnguessableToken::Create().ToString()) {} @@ -161,7 +161,7 @@ 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 091031a3464b..e609953bb69f 100644 +index f8c137fe6d7a..235f9b93295e 100644 --- content/browser/download/download_manager_impl.cc +++ content/browser/download/download_manager_impl.cc @@ -86,9 +86,9 @@ @@ -205,7 +205,7 @@ index 091031a3464b..e609953bb69f 100644 std::move(proxy_factory_ptr_info), std::move(proxy_factory_request)); } -@@ -1060,7 +1059,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( +@@ -1079,7 +1078,7 @@ void DownloadManagerImpl::InterceptNavigationOnChecksComplete( tab_referrer_url = entry->GetReferrer().url; } } @@ -214,7 +214,7 @@ index 091031a3464b..e609953bb69f 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, -@@ -1110,10 +1109,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( +@@ -1129,10 +1128,8 @@ void DownloadManagerImpl::BeginResourceDownloadOnChecksComplete( base::MakeRefCounted( rfh, params->url()); } else { @@ -228,10 +228,10 @@ index 091031a3464b..e609953bb69f 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 50860abcf28b..20768bd83153 100644 +index 0fb15c7c1bec..6fef758dc5a6 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -1029,7 +1029,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController +@@ -1012,7 +1012,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 50860abcf28b..20768bd83153 100644 false /* allow_wildcard */, &stale, &plugin, nullptr); if (stale) { -@@ -1361,7 +1361,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( +@@ -1344,7 +1344,7 @@ NavigationURLLoaderImpl::NavigationURLLoaderImpl( network::mojom::URLLoaderFactoryPtrInfo proxied_factory_info; network::mojom::URLLoaderFactoryRequest proxied_factory_request; @@ -266,7 +266,7 @@ 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 6d28562bd1b9..544566b60192 100644 +index 3cfa0bde2bca..96da49496944 100644 --- content/browser/payments/payment_app_provider_impl.cc +++ content/browser/payments/payment_app_provider_impl.cc @@ -369,10 +369,11 @@ void StartServiceWorkerForDispatch(BrowserContext* browser_context, @@ -284,7 +284,7 @@ index 6d28562bd1b9..544566b60192 100644 BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, -@@ -449,8 +450,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps( +@@ -446,8 +447,8 @@ void PaymentAppProviderImpl::GetAllPaymentApps( GetAllPaymentAppsCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -296,10 +296,10 @@ index 6d28562bd1b9..544566b60192 100644 partition->GetPaymentAppContext(); diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc -index 137bf0134739..df0e72929b73 100644 +index 3887d68c6d22..629c16724145 100644 --- content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -740,11 +740,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, +@@ -739,11 +739,10 @@ class DefaultSubframeProcessHostHolder : public base::SupportsUserData::Data, // Gets the correct render process to use for this SiteInstance. RenderProcessHost* GetProcessHost(SiteInstance* site_instance, bool is_for_guests_only) { @@ -315,7 +315,7 @@ index 137bf0134739..df0e72929b73 100644 // Is this the default storage partition? If it isn't, then just give it its // own non-shared process. -@@ -1342,7 +1341,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { +@@ -1341,7 +1340,7 @@ int RenderProcessHost::GetCurrentRenderProcessCountForTesting() { // static RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( BrowserContext* browser_context, @@ -324,7 +324,7 @@ index 137bf0134739..df0e72929b73 100644 SiteInstance* site_instance, bool is_for_guests_only) { if (g_render_process_host_factory_) { -@@ -1351,8 +1350,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( +@@ -1350,8 +1349,8 @@ RenderProcessHost* RenderProcessHostImpl::CreateRenderProcessHost( } if (!storage_partition_impl) { @@ -335,7 +335,7 @@ index 137bf0134739..df0e72929b73 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 -@@ -1377,7 +1376,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = +@@ -1376,7 +1375,7 @@ const unsigned int RenderProcessHostImpl::kMaxFrameDepthForPriority = RenderProcessHostImpl::RenderProcessHostImpl( BrowserContext* browser_context, @@ -344,7 +344,7 @@ index 137bf0134739..df0e72929b73 100644 bool is_for_guests_only) : fast_shutdown_started_(false), deleting_soon_(false), -@@ -1410,10 +1409,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1409,10 +1408,12 @@ RenderProcessHostImpl::RenderProcessHostImpl( indexed_db_factory_(new IndexedDBDispatcherHost( id_, storage_partition_impl_->GetURLRequestContext(), @@ -359,7 +359,7 @@ index 137bf0134739..df0e72929b73 100644 id_)), channel_connected_(false), sent_render_process_ready_(false), -@@ -1448,7 +1449,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( +@@ -1447,7 +1448,8 @@ RenderProcessHostImpl::RenderProcessHostImpl( } push_messaging_manager_.reset(new PushMessagingManager( @@ -369,7 +369,7 @@ index 137bf0134739..df0e72929b73 100644 AddObserver(indexed_db_factory_.get()); AddObserver(service_worker_dispatcher_host_.get()); -@@ -1779,6 +1781,17 @@ void RenderProcessHostImpl::ResetChannelProxy() { +@@ -1780,6 +1782,17 @@ void RenderProcessHostImpl::ResetChannelProxy() { void RenderProcessHostImpl::CreateMessageFilters() { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -387,7 +387,7 @@ index 137bf0134739..df0e72929b73 100644 MediaInternals* media_internals = MediaInternals::GetInstance(); // Add BrowserPluginMessageFilter to ensure it gets the first stab at messages // from guests. -@@ -1791,7 +1804,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1792,7 +1805,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { base::MakeRefCounted( GetID(), GetBrowserContext(), request_context.get(), widget_helper_.get(), media_internals, @@ -396,7 +396,7 @@ index 137bf0134739..df0e72929b73 100644 AddFilter(render_message_filter.get()); render_frame_message_filter_ = new RenderFrameMessageFilter( -@@ -1818,10 +1831,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1819,10 +1832,10 @@ void RenderProcessHostImpl::CreateMessageFilters() { ChromeBlobStorageContext::GetFor(browser_context); resource_message_filter_ = new ResourceMessageFilter( @@ -409,7 +409,7 @@ index 137bf0134739..df0e72929b73 100644 storage_partition_impl_->GetPrefetchURLLoaderService(), std::move(get_contexts_callback), BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); -@@ -1830,8 +1843,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1831,8 +1844,7 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter( new MidiHost(GetID(), BrowserMainLoop::GetInstance()->midi_service())); @@ -419,7 +419,7 @@ index 137bf0134739..df0e72929b73 100644 peer_connection_tracker_host_ = new PeerConnectionTrackerHost(GetID()); AddFilter(peer_connection_tracker_host_.get()); -@@ -1853,10 +1865,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { +@@ -1854,10 +1866,6 @@ void RenderProcessHostImpl::CreateMessageFilters() { AddFilter(new TraceMessageFilter(GetID())); AddFilter(new ResolveProxyMsgHelper(request_context.get())); @@ -430,7 +430,7 @@ index 137bf0134739..df0e72929b73 100644 } void RenderProcessHostImpl::BindCacheStorage( -@@ -1868,7 +1876,8 @@ void RenderProcessHostImpl::BindCacheStorage( +@@ -1869,7 +1877,8 @@ void RenderProcessHostImpl::BindCacheStorage( cache_storage_dispatcher_host_ = base::MakeRefCounted(); cache_storage_dispatcher_host_->Init( @@ -440,7 +440,7 @@ index 137bf0134739..df0e72929b73 100644 } // Send the binding to IO thread, because Cache Storage handles Mojo IPC on IO // thread entirely. -@@ -2020,7 +2029,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2019,7 +2028,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { registry->AddInterface(base::BindRepeating( &AppCacheDispatcherHost::Create, @@ -450,7 +450,7 @@ index 137bf0134739..df0e72929b73 100644 GetID())); AddUIThreadInterface(registry.get(), base::Bind(&FieldTrialRecorder::Create)); -@@ -2051,6 +2061,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { +@@ -2050,6 +2060,9 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() { plugin_registry_.reset( new PluginRegistryImpl(GetBrowserContext()->GetResourceContext())); } @@ -576,7 +576,7 @@ index 0727104684b1..ea180eca8131 100644 std::move(factory_bundle_for_renderer), service_worker_context_, blob_url_loader_factory ? blob_url_loader_factory->Clone() diff --git content/browser/storage_partition_impl.h content/browser/storage_partition_impl.h -index 18c46a2e40e2..fb86e45d4198 100644 +index e79f8775a1be..ab08f9adfc93 100644 --- content/browser/storage_partition_impl.h +++ content/browser/storage_partition_impl.h @@ -94,7 +94,7 @@ class CONTENT_EXPORT StoragePartitionImpl @@ -588,9 +588,9 @@ index 18c46a2e40e2..fb86e45d4198 100644 IndexedDBContextImpl* GetIndexedDBContext() override; CacheStorageContextImpl* GetCacheStorageContext() override; ServiceWorkerContextWrapper* GetServiceWorkerContext() override; -@@ -133,14 +133,14 @@ class CONTENT_EXPORT StoragePartitionImpl - void FlushNetworkInterfaceForTesting() override; +@@ -134,14 +134,14 @@ class CONTENT_EXPORT StoragePartitionImpl void WaitForDeletionTasksForTesting() override; + void ResetURLLoaderFactoryForBrowserProcessForTesting() override; - BackgroundFetchContext* GetBackgroundFetchContext(); - BackgroundSyncContext* GetBackgroundSyncContext(); @@ -611,7 +611,7 @@ index 18c46a2e40e2..fb86e45d4198 100644 // blink::mojom::StoragePartitionService interface. void OpenLocalStorage(const url::Origin& origin, -@@ -149,18 +149,19 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -150,18 +150,19 @@ class CONTENT_EXPORT StoragePartitionImpl const std::string& namespace_id, blink::mojom::SessionStorageNamespaceRequest request) override; @@ -635,7 +635,7 @@ index 18c46a2e40e2..fb86e45d4198 100644 auto& bindings_for_testing() { return bindings_; } -@@ -171,10 +172,11 @@ class CONTENT_EXPORT StoragePartitionImpl +@@ -172,10 +173,11 @@ class CONTENT_EXPORT StoragePartitionImpl // one must use the "chrome-guest://blahblah" site URL to ensure that the // service worker stays in this StoragePartition. This is an empty GURL if // this StoragePartition is not for guests. @@ -709,10 +709,10 @@ index 653e22e0ee58..7b38a3ebd626 100644 RenderFrameHost* render_frame_host_; diff --git content/public/browser/browser_context.h content/public/browser/browser_context.h -index faf278e97fe0..4cf94f032385 100644 +index 4f794e25ac79..8f828995a4cc 100644 --- content/public/browser/browser_context.h +++ content/public/browser/browser_context.h -@@ -208,6 +208,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { +@@ -213,6 +213,8 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { BrowserContext(); @@ -721,7 +721,7 @@ index faf278e97fe0..4cf94f032385 100644 ~BrowserContext() override; // Shuts down the storage partitions associated to this browser context. -@@ -296,6 +298,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { +@@ -304,6 +306,14 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData { const base::FilePath& partition_path, bool in_memory) = 0; @@ -737,7 +737,7 @@ index faf278e97fe0..4cf94f032385 100644 std::map; diff --git content/public/browser/storage_partition.h content/public/browser/storage_partition.h -index 28e2c251a117..1fa41e0eecbd 100644 +index fe4b7cc8d990..1e533ebbbd07 100644 --- content/public/browser/storage_partition.h +++ content/public/browser/storage_partition.h @@ -14,8 +14,10 @@ @@ -788,9 +788,9 @@ index 28e2c251a117..1fa41e0eecbd 100644 virtual IndexedDBContext* GetIndexedDBContext() = 0; virtual ServiceWorkerContext* GetServiceWorkerContext() = 0; virtual SharedWorkerService* GetSharedWorkerService() = 0; -@@ -224,6 +243,26 @@ class CONTENT_EXPORT StoragePartition { - // Wait until all deletions tasks are finished. For test use only. - virtual void WaitForDeletionTasksForTesting() = 0; +@@ -228,6 +247,26 @@ class CONTENT_EXPORT StoragePartition { + // a way to work-around https://crbug.com/857577. + virtual void ResetURLLoaderFactoryForBrowserProcessForTesting() {} + virtual BackgroundFetchContext* GetBackgroundFetchContext() = 0; + virtual BackgroundSyncContext* GetBackgroundSyncContext() = 0; diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index 5ef3c1165..0080e9a68 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -39,7 +39,7 @@ index a19e6e937f87..817b7eada253 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index a60952af55e0..7934c02ea3bb 100644 +index 0754968fae7f..e3c0d9b81459 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc @@ -524,6 +524,14 @@ void RenderText::SetElideBehavior(ElideBehavior elide_behavior) { @@ -57,7 +57,7 @@ index a60952af55e0..7934c02ea3bb 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -1489,6 +1497,19 @@ void RenderText::OnTextAttributeChanged() { +@@ -1505,6 +1513,19 @@ void RenderText::OnTextAttributeChanged() { if (!multiline_ && replace_newline_chars_with_symbols_) base::ReplaceChars(layout_text_, kNewline, kNewlineSymbol, &layout_text_); @@ -78,10 +78,10 @@ index a60952af55e0..7934c02ea3bb 100644 } diff --git ui/gfx/render_text.h ui/gfx/render_text.h -index 5032b215594e..6c5edfedb251 100644 +index 76c0db086c66..ed123ef02279 100644 --- ui/gfx/render_text.h +++ ui/gfx/render_text.h -@@ -300,6 +300,10 @@ class GFX_EXPORT RenderText { +@@ -307,6 +307,10 @@ class GFX_EXPORT RenderText { void SetElideBehavior(ElideBehavior elide_behavior); ElideBehavior elide_behavior() const { return elide_behavior_; } @@ -92,7 +92,7 @@ index 5032b215594e..6c5edfedb251 100644 const Rect& display_rect() const { return display_rect_; } void SetDisplayRect(const Rect& r); -@@ -886,6 +890,8 @@ class GFX_EXPORT RenderText { +@@ -903,6 +907,8 @@ class GFX_EXPORT RenderText { // Extra spacing placed between glyphs; used for obscured text styling. int glyph_spacing_ = 0; 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 3e72c728d..e33fdd411 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 c7e802e7ac68..bf1d28904f49 100644 +index c61199d5dd8f..f2c19e4e5f3c 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -468,6 +468,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { +@@ -480,6 +480,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() const { return screen_info.device_scale_factor; } @@ -18,7 +18,7 @@ index c7e802e7ac68..bf1d28904f49 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 1b2563d6bca0..cf6717aaeb98 100644 +index 8ed6ffd3a284..91db6f55c396 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; @@ -39,7 +39,7 @@ index 1b2563d6bca0..cf6717aaeb98 100644 // Returns the focused RenderWidgetHost inside this |view|'s RWH. RenderWidgetHostImpl* GetFocusedWidget() const; -@@ -139,6 +143,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -141,6 +145,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase void DisableAutoResize(const gfx::Size& new_size) override; bool IsScrollOffsetAtTop() const override; float GetDeviceScaleFactor() const final; @@ -48,7 +48,7 @@ index 1b2563d6bca0..cf6717aaeb98 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; -@@ -458,6 +464,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -459,6 +465,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 1b2563d6bca0..cf6717aaeb98 100644 // Sets the cursor for this view to the one associated with the specified // cursor_type. virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -649,6 +661,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -650,6 +662,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase bool use_viz_hit_test_ = false; @@ -73,7 +73,7 @@ index 1b2563d6bca0..cf6717aaeb98 100644 void SynchronizeVisualProperties(); diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc -index c079001bb4e5..da93acec6e60 100644 +index 0f9d0a1c4269..cd9a314887cb 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc @@ -30,6 +30,10 @@ @@ -87,7 +87,7 @@ index c079001bb4e5..da93acec6e60 100644 #if defined(OS_WIN) #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/public/common/context_menu_params.h" -@@ -883,6 +887,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { +@@ -889,6 +893,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { ::SetFocus(hwnd); } } @@ -103,10 +103,10 @@ index c079001bb4e5..da93acec6e60 100644 // TODO(wjmaclean): can host_ ever be null? if (host_ && set_focus_on_mouse_down_or_key_event_) { diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h -index 0f2bbdcf4b2b..2ba0761cd680 100644 +index c4b21150bbcf..fad3d9e3ebbd 100644 --- content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h -@@ -246,6 +246,14 @@ class CONTENT_EXPORT RenderWidgetHostView { +@@ -253,6 +253,14 @@ class CONTENT_EXPORT RenderWidgetHostView { // This must always return the same device scale factor as GetScreenInfo. virtual float GetDeviceScaleFactor() const = 0; @@ -387,7 +387,7 @@ index e4e7fc6ce96c..9123f688646f 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index 482ab928bdec..d06cd234da9d 100644 +index 6862cfb45d08..d0674041b075 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h @@ -252,6 +252,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -427,10 +427,10 @@ index c7296fed234d..244d0034a1c4 100644 if (native_widget_delegate->IsDialogBox()) { *style |= DS_MODALFRAME; diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index 19f7ed4252dc..6acb123adc30 100644 +index 65ee52f582c9..b8f60b87ce21 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -2809,10 +2809,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -2817,10 +2817,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } else if (event.type() == ui::ET_MOUSEWHEEL) { ui::MouseWheelEvent mouse_wheel_event(msg); // Reroute the mouse wheel to the window under the pointer if applicable. diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index 7cdebe85b..57e68dd22 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 58eedf0d0bd8..b51742b98834 100644 +index 26384f823b51..0582c1a753af 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -2033,21 +2033,30 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1931,21 +1931,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 58eedf0d0bd8..b51742b98834 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -2730,6 +2739,15 @@ void WebContentsImpl::CreateNewWindow( +@@ -2622,6 +2631,15 @@ void WebContentsImpl::CreateNewWindow( create_params.renderer_initiated_creation = main_frame_route_id != MSG_ROUTING_NONE; @@ -61,7 +61,7 @@ index 58eedf0d0bd8..b51742b98834 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -2760,7 +2778,7 @@ void WebContentsImpl::CreateNewWindow( +@@ -2652,7 +2670,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 58eedf0d0bd8..b51742b98834 100644 } // Save the created window associated with the route so we can show it // later. -@@ -6092,7 +6110,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { +@@ -5983,7 +6001,7 @@ InterstitialPageImpl* WebContentsImpl::GetInterstitialForRenderManager() { void WebContentsImpl::CreateRenderWidgetHostViewForRenderManager( RenderViewHost* render_view_host) { RenderWidgetHostViewBase* rwh_view = @@ -95,7 +95,7 @@ index df508da0aef2..f6f4bf42b108 100644 WebContents::CreateParams::CreateParams(const CreateParams& other) = default; diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index d6945dc2f810..51564cbc9b2a 100644 +index 0f82f91e437c..1c1e5e8f60bd 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h @@ -76,9 +76,11 @@ class BrowserPluginGuestDelegate; @@ -122,7 +122,7 @@ index d6945dc2f810..51564cbc9b2a 100644 // the value that'll be returned by GetLastActiveTime(). If this is left // default initialized then the value is not passed on to the WebContents diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index fd745277f942..27d5fa9c7b41 100644 +index f7e72b32ee78..5a0a3ad770b8 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -47,10 +47,12 @@ class ColorChooser; diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index e8a596b2e..1f8f7a4a1 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -10,10 +10,10 @@ index 92e9cb865204..4628c56882b4 100644 + GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array plugins); }; diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index 27c4bdcdfd37..a6773b8093c2 100644 +index f927253a7e0b..c537ed1b117b 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -697,6 +697,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -710,6 +710,11 @@ class BLINK_PLATFORM_EXPORT Platform { // runs during Chromium's build step). virtual bool IsTakingV8ContextSnapshot() { return false; } @@ -44,7 +44,7 @@ index a2fbf84747aa..8ab120155ccd 100644 .Top() .GetSecurityContext() diff --git third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc -index 5494706514d7..6663b2edd897 100644 +index 976bae9c792b..10fb75b0af57 100644 --- third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc +++ third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.cc @@ -324,6 +324,8 @@ WebDevToolsAgentImpl::Session::Session( @@ -65,10 +65,10 @@ index 5494706514d7..6663b2edd897 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 a0aa62ce4632..7d6ebb8b3ee5 100644 +index 464a41e6f278..7e29a6a66bf4 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc -@@ -1250,7 +1250,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { +@@ -1264,7 +1264,7 @@ FrameResourceCoordinator* LocalFrame::GetFrameResourceCoordinator() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -78,20 +78,20 @@ index a0aa62ce4632..7d6ebb8b3ee5 100644 } diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc -index c22147fa70b0..f222dcb0820e 100644 +index 0f42c3e762d3..4836763bfff9 100644 --- third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc -@@ -162,7 +162,8 @@ Page::Page(PageClients& page_clients) - visual_viewport_(VisualViewport::Create(*this)), +@@ -164,7 +164,8 @@ Page::Page(PageClients& page_clients) overscroll_controller_( OverscrollController::Create(GetVisualViewport(), GetChromeClient())), + link_highlights_(LinkHighlights::Create(*this)), - plugin_data_(nullptr), + plugin_data_main_frame_(nullptr), + plugin_data_sub_frame_(nullptr), opened_by_dom_(false), tab_key_cycles_through_elements_(true), paused_(false), -@@ -324,21 +325,40 @@ void Page::InitialStyleChanged() { +@@ -330,21 +331,40 @@ void Page::InitialStyleChanged() { } } @@ -141,9 +141,9 @@ index c22147fa70b0..f222dcb0820e 100644 page->NotifyPluginsChanged(); } } -@@ -726,7 +746,8 @@ void Page::Trace(blink::Visitor* visitor) { - visitor->Trace(visual_viewport_); +@@ -733,7 +753,8 @@ void Page::Trace(blink::Visitor* visitor) { visitor->Trace(overscroll_controller_); + visitor->Trace(link_highlights_); visitor->Trace(main_frame_); - visitor->Trace(plugin_data_); + visitor->Trace(plugin_data_main_frame_); @@ -152,10 +152,10 @@ index c22147fa70b0..f222dcb0820e 100644 visitor->Trace(plugins_changed_observers_); visitor->Trace(next_related_page_); diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h -index c2cc3cceb57c..1b3dcd6052f0 100644 +index 1be040296b6e..d3472a25c1ff 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|. @@ -165,9 +165,9 @@ index c2cc3cceb57c..1b3dcd6052f0 100644 // Resets the plugin data for all pages in the renderer process and notifies // PluginsChangedObservers. -@@ -364,7 +365,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, - const Member visual_viewport_; +@@ -368,7 +369,8 @@ class CORE_EXPORT Page final : public GarbageCollectedFinalized, const Member overscroll_controller_; + const Member link_highlights_; - Member plugin_data_; + Member plugin_data_main_frame_; @@ -176,7 +176,7 @@ index c2cc3cceb57c..1b3dcd6052f0 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 0ae2fafa2498..1ed863662584 100644 +index 02d54d5f2dbf..0b2b11e601c6 100644 --- third_party/blink/renderer/platform/plugins/plugin_data.cc +++ third_party/blink/renderer/platform/plugins/plugin_data.cc @@ -88,10 +88,12 @@ void PluginData::RefreshBrowserSidePluginCache() { @@ -194,12 +194,12 @@ index 0ae2fafa2498..1ed863662584 100644 ResetPluginData(); main_frame_origin_ = main_frame_origin; -@@ -99,7 +101,7 @@ void PluginData::UpdatePluginList(const SecurityOrigin* main_frame_origin) { +@@ -106,7 +108,7 @@ void PluginData::UpdatePluginList(const SecurityOrigin* main_frame_origin) { Platform::Current()->GetInterfaceProvider()->GetInterface( mojo::MakeRequest(®istry)); Vector plugins; -- registry->GetPlugins(false, main_frame_origin_, &plugins); -+ registry->GetPlugins(false, is_main_frame, main_frame_origin_, &plugins); +- registry->GetPlugins(false, legacy_origin, &plugins); ++ registry->GetPlugins(false, is_main_frame, legacy_origin, &plugins); for (const auto& plugin : plugins) { auto* plugin_info = new PluginInfo(plugin->name, FilePathToWebString(plugin->filename), diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 242de2454..c95e424cc 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h -index f4cbe0e0e245..eaabea055764 100644 +index fcba33880932..ef0bf66f8a2b 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -352,6 +352,7 @@ class WebView : protected WebWidget { +@@ -354,6 +354,7 @@ class WebView : protected WebWidget { // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void SetUseExternalPopupMenus(bool); @@ -10,7 +10,7 @@ index f4cbe0e0e245..eaabea055764 100644 // Hides any popup (suggestions, selects...) that might be showing. virtual void HidePopups() = 0; -@@ -382,6 +383,8 @@ class WebView : protected WebWidget { +@@ -384,6 +385,8 @@ class WebView : protected WebWidget { unsigned inactive_background_color, unsigned inactive_foreground_color) = 0; @@ -20,10 +20,10 @@ index f4cbe0e0e245..eaabea055764 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 355d0393070c..7c0d32c6d237 100644 +index 2acc5921abeb..3e0c07dd6aa3 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -242,8 +242,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { +@@ -241,8 +241,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { g_should_use_external_popup_menus = use_external_popup_menus; } @@ -39,7 +39,7 @@ index 355d0393070c..7c0d32c6d237 100644 } namespace { -@@ -334,6 +339,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, +@@ -337,6 +342,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client, enable_fake_page_scale_animation_for_testing_(false), fake_page_scale_animation_page_scale_factor_(0), fake_page_scale_animation_use_anchor_(false), @@ -48,10 +48,10 @@ index 355d0393070c..7c0d32c6d237 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 f35cbf267757..39b276fb65ba 100644 +index 9055bbe708a8..dc51d1db9921 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h -@@ -104,7 +104,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -105,7 +105,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, static HashSet& AllInstances(); // Returns true if popup menus should be rendered by the browser, false if // they should be rendered by WebKit (which is the default). @@ -70,7 +70,7 @@ index f35cbf267757..39b276fb65ba 100644 void SetBaseBackgroundColorOverride(SkColor); void ClearBaseBackgroundColorOverride(); void SetBackgroundColorOverride(SkColor); -@@ -612,6 +613,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -608,6 +609,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_; bool fake_page_scale_animation_use_anchor_; @@ -80,10 +80,10 @@ index f35cbf267757..39b276fb65ba 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 e8dffb24f6f9..beadd792985b 100644 +index 5656f762955e..d3ce4ebaf088 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -807,7 +807,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -809,7 +809,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index bd6f8153d..7d1b9f36c 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -index 91bd4c2aeae2..129d92a32c50 100644 +index 25f26dda33cf..d041b972461c 100644 --- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc @@ -18,6 +18,7 @@ diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index e113373b4..1557355c6 100644 --- a/patch/patches/webview_plugin_2020.patch +++ b/patch/patches/webview_plugin_2020.patch @@ -1,8 +1,8 @@ diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd -index 91c0cc979f0e..1945f8843707 100644 +index 45d8533d283f..71e3b67d2554 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -4483,7 +4483,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -4457,7 +4457,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 767dad6a8..4e7357c21 100644 --- a/patch/patches/win_rt_2274.patch +++ b/patch/patches/win_rt_2274.patch @@ -1,5 +1,5 @@ diff --git services/service_manager/sandbox/win/sandbox_win.cc services/service_manager/sandbox/win/sandbox_win.cc -index be4d747ae8cc..a32cbbaf4630 100644 +index 7beb41460e7d..335e25b64552 100644 --- services/service_manager/sandbox/win/sandbox_win.cc +++ services/service_manager/sandbox/win/sandbox_win.cc @@ -883,8 +883,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( @@ -15,4 +15,4 @@ index be4d747ae8cc..a32cbbaf4630 100644 + } if (!cmd_line->HasSwitch(switches::kAllowThirdPartyModules)) mitigations |= sandbox::MITIGATION_FORCE_MS_SIGNED_BINS; - if (sandbox_type == SANDBOX_TYPE_NETWORK) + if (sandbox_type == SANDBOX_TYPE_NETWORK || diff --git a/tests/ceftests/navigation_unittest.cc b/tests/ceftests/navigation_unittest.cc index df3d9cd73..596dcf234 100644 --- a/tests/ceftests/navigation_unittest.cc +++ b/tests/ceftests/navigation_unittest.cc @@ -3035,20 +3035,7 @@ class CancelBeforeNavTestHandler : public TestHandler { ErrorCode errorCode, const CefString& errorText, const CefString& failedUrl) override { - EXPECT_TRUE(got_loading_state_changed_start_); - EXPECT_TRUE(got_before_browse_); - EXPECT_TRUE(got_get_resource_handler_); - EXPECT_FALSE(got_load_start_); - EXPECT_TRUE(got_cancel_load_); - EXPECT_FALSE(got_load_error_); - EXPECT_FALSE(got_load_end_); - EXPECT_FALSE(got_loading_state_changed_end_); - - const std::string& url = failedUrl; - EXPECT_STREQ(kCancelPageUrl, url.c_str()); - EXPECT_EQ(GetBrowserId(), browser->GetIdentifier()); - EXPECT_TRUE(frame->IsMain()); - + EXPECT_TRUE(false); // Not reached. got_load_error_.yes(); } @@ -3077,7 +3064,7 @@ class CancelBeforeNavTestHandler : public TestHandler { EXPECT_TRUE(got_get_resource_handler_); EXPECT_FALSE(got_load_start_); EXPECT_TRUE(got_cancel_load_); - EXPECT_TRUE(got_load_error_); + EXPECT_FALSE(got_load_error_); EXPECT_FALSE(got_load_end_); EXPECT_FALSE(got_loading_state_changed_end_); @@ -3103,7 +3090,7 @@ class CancelBeforeNavTestHandler : public TestHandler { EXPECT_TRUE(got_get_resource_handler_); EXPECT_FALSE(got_load_start_); EXPECT_TRUE(got_cancel_load_); - EXPECT_TRUE(got_load_error_); + EXPECT_FALSE(got_load_error_); EXPECT_FALSE(got_load_end_); EXPECT_TRUE(got_loading_state_changed_end_); diff --git a/tests/ceftests/osr_accessibility_unittest.cc b/tests/ceftests/osr_accessibility_unittest.cc index a2f6fe129..7a09ef4ae 100644 --- a/tests/ceftests/osr_accessibility_unittest.cc +++ b/tests/ceftests/osr_accessibility_unittest.cc @@ -200,35 +200,16 @@ class AccessibilityTestHandler : public TestHandler, EXPECT_EQ(VTYPE_LIST, value->GetType()); CefRefPtr list = value->GetList(); EXPECT_TRUE(list.get()); - // Ignore empty events - if (!list->GetSize()) - return; + // Always empty events after https://crrev.com/c101cb728a. + EXPECT_EQ(0U, list->GetSize()); - // Hiding edit box should only change position of subsequent button - EXPECT_EQ(1U, list->GetSize()); + got_accessibility_location_change_.yes(); + } - CefRefPtr dict = list->GetDictionary(0); - EXPECT_TRUE(dict.get()); - - // New location of button should be same as older location of edit box - // as that is hidden now - CefRefPtr location = - dict->GetDictionary("new_location"); - EXPECT_TRUE(location.get()); - - CefRefPtr bounds = location->GetDictionary("bounds"); - EXPECT_TRUE(bounds.get()); - - EXPECT_EQ(bounds->GetInt("x"), edit_box_rect_.x); - EXPECT_EQ(bounds->GetInt("y"), edit_box_rect_.y); - EXPECT_EQ(bounds->GetInt("width"), edit_box_rect_.width); - EXPECT_EQ(bounds->GetInt("height"), edit_box_rect_.height); - - // Now Post a delayed task to destroy the test - // giving sufficient time for any accessibility updates to come through - CefPostDelayedTask( - TID_UI, base::Bind(&AccessibilityTestHandler::DestroyTest, this), - 500); + if (got_hide_edit_box_) { + // Now destroy the test. + CefPostTask(TID_UI, + base::Bind(&AccessibilityTestHandler::DestroyTest, this)); } } @@ -250,11 +231,13 @@ class AccessibilityTestHandler : public TestHandler, } void HideEditBox(CefRefPtr browser) { - // Set focus on edit box + // Hide the edit box. // This should trigger Location update if enabled browser->GetMainFrame()->ExecuteJavaScript( "document.getElementById('editbox').style.display = 'none';", kTestUrl, 0); + + got_hide_edit_box_.yes(); } void SetFocusOnEditBox(CefRefPtr browser) { @@ -415,19 +398,29 @@ class AccessibilityTestHandler : public TestHandler, edit_box_id_ = node->GetInt("id"); CefRefPtr loc = node->GetDictionary("location"); EXPECT_TRUE(loc.get()); - edit_box_rect_.x = loc->GetInt("x"); - edit_box_rect_.y = loc->GetInt("y"); - edit_box_rect_.width = loc->GetInt("width"); - edit_box_rect_.height = loc->GetInt("height"); + EXPECT_GT(loc->GetDouble("x"), 0); + EXPECT_GT(loc->GetDouble("y"), 0); + EXPECT_GT(loc->GetDouble("width"), 0); + EXPECT_GT(loc->GetDouble("height"), 0); break; } } } + void DestroyTest() override { + if (test_type_ == TEST_LOCATION_CHANGE) { + EXPECT_GT(edit_box_id_, 0); + EXPECT_TRUE(got_hide_edit_box_); + EXPECT_TRUE(got_accessibility_location_change_); + } + TestHandler::DestroyTest(); + } + AccessibilityTestType test_type_; int edit_box_id_; - CefRect edit_box_rect_; bool accessibility_disabled_; + TrackCallback got_hide_edit_box_; + TrackCallback got_accessibility_location_change_; IMPLEMENT_REFCOUNTING(AccessibilityTestHandler); }; diff --git a/tests/shared/resources/osr_test.html b/tests/shared/resources/osr_test.html index 4a3944897..0f776a4c4 100644 --- a/tests/shared/resources/osr_test.html +++ b/tests/shared/resources/osr_test.html @@ -139,7 +139,7 @@
  • Click here with SendMouseClickEvent to navigate:
  • + value='Click here to navigate' />
  • Mouse over this element will trigger show a tooltip
  • SELECTED_TEXT_RANGE