chore: bump chromium to 143.0.7485.0 (main) (#48618)

* chore: bump chromium in DEPS to 143.0.7485.0

* chore: update allow_disabling_blink_scheduler_throttling_per_renderview.patch

Move SetSupportsDraggableRegions mojom IPC from chrome/ and extensions/ to blink/ | https://chromium-review.googlesource.com/c/chromium/src/+/7043264

Patch applied manually due to context shear

* Move SetSupportsDraggableRegions mojom IPC from chrome/ and extensions/ to blink/ | https://chromium-review.googlesource.com/c/chromium/src/+/7043264

* chore: e patches all

* chore: check for file existence before setting utime

* chore: stop disabling kWinDelaySpellcheckServiceInit

[cleanup] Remove feature WinDelaySpellcheckServiceInit | https://chromium-review.googlesource.com/c/chromium/src/+/7012087

This flag has been removed upstream. We've used it since c2d7164 (#38248)
to fix a crash originally described in 97b353a (#34993):

> Delaying spell check initialization is causing specs for
> 'custom dictionary word list API' to fail in Electron.

Since we haven't touched this in a few years, and since there's a
clear success criteria (a passing/failing spec), and since the patch
to restore this flag would be pretty large (~750 lines), I'm going
to try just removing the flag from our source to see if the spec
passes or fails.

* Revert "chore: stop disabling kWinDelaySpellcheckServiceInit"

This reverts commit e688880396.

Unfortunately, the crash persists.

* Revert [cleanup] Remove feature WinDelaySpellcheckServiceInit | https://chromium-review.googlesource.com/c/chromium/src/+/7012087

We currently need this feature

* fixup! chore: check for file existence before setting utime

* fixup! Move SetSupportsDraggableRegions mojom IPC from chrome/ and extensions/ to blink/ | https://chromium-review.googlesource.com/c/chromium/src/+/7043264

Address Robo's code review @ 64c7fd21ed

* fixup! fixup! chore: check for file existence before setting utime

fix: oops typo

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
electron-roller[bot]
2025-10-23 08:30:29 -05:00
committed by GitHub
parent f784ea6f4f
commit 9235dc0159
32 changed files with 922 additions and 132 deletions

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = { vars = {
'chromium_version': 'chromium_version':
'143.0.7483.0', '143.0.7485.0',
'node_version': 'node_version':
'v22.20.0', 'v22.20.0',
'nan_version': 'nan_version':

View File

@@ -141,3 +141,5 @@ revert_partial_remove_unused_prehandlemouseevent.patch
allow_electron_to_depend_on_components_os_crypt_sync.patch allow_electron_to_depend_on_components_os_crypt_sync.patch
expose_referrerscriptinfo_hostdefinedoptionsindex.patch expose_referrerscriptinfo_hostdefinedoptionsindex.patch
chore_disable_protocol_handler_dcheck.patch chore_disable_protocol_handler_dcheck.patch
fix_check_for_file_existence_before_setting_mtime.patch
revert_cleanup_remove_feature_windelayspellcheckserviceinit.patch

View File

@@ -40,10 +40,10 @@ index 792ecdf43c810d19641251d3f5eeddccc4c621e9..99d368046177dd92c8b36743f461d348
int world_id) { int world_id) {
for (auto& observer : observers_) for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index b0528c4f02bdbf54dc490f9163fbf4f24e3471db..542eddb03c98eac5c03c9bc208af2c863d552b2d 100644 index ce1d8807d624b35fa63ef83e3a95c7cba8f1f22f..61d4ef338cc4c0e99c144d6d95bbe0adba9d3556 100644
--- a/content/renderer/render_frame_impl.h --- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -604,6 +604,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -603,6 +603,8 @@ class CONTENT_EXPORT RenderFrameImpl
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override; void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
void DidCreateScriptContext(v8::Local<v8::Context> context, void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override; int world_id) override;

View File

@@ -6,11 +6,11 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows. This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
index 94a67b61edb0bc2f3faa5db44e99d1493f38d5a0..e4a953c199f8c1e5d68e552f73c593d308946957 100644 index 74b39146bbb8151a66ecb4f138f769fffc2525b2..a54948fa36c85c5c5dd04b9836951b1ce1279038 100644
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc --- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc +++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast { @@ -173,6 +173,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
(std::optional<blink::NoiseToken> canvas_noise_token), (bool supports_draggable_regions),
(override)); (override));
+ MOCK_METHOD( + MOCK_METHOD(
@@ -51,10 +51,10 @@ index 7944fe64e0da112fc670358b75506bb199bb5e4a..0e3c16c6af2a078943e9f39808134ab2
void SendRendererPreferencesToRenderer( void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences); const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 08fc2be8e60d16de952ca7f76701ca4eea722c4b..8ad61a86598ac2249496e44113f31ebb21dc616b 100644 index d97cbb4fd8e12bcbff19bf8cc8378997110c60c0..1041d25d5ef78abdcf7b85fe8457ec2a20e2a759 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -578,8 +578,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) { @@ -632,8 +632,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
// OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown, // OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
// which updates `visibility_`, unless the host is hidden. Make sure no update // which updates `visibility_`, unless the host is hidden. Make sure no update
// is needed. // is needed.
@@ -80,31 +80,31 @@ index 782bed0fdc08d57eceb059f398f253fab9233b1b..f1ab5b981ea68af1b11313e67f2c5060
// This interface should only be implemented inside content. // This interface should only be implemented inside content.
friend class RenderViewHostImpl; friend class RenderViewHostImpl;
diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h
index 82ae7ab6279427e492ead6d1d386608eb9d3d844..2b79149bfcc0de968ffb45e310d697c5393f0d43 100644 index 8762811ec25069ddd0c57e3ffb50d158532a39b1..f5cdae891cc3b98371ae18dbc119b5e7f379f2bf 100644
--- a/content/test/test_page_broadcast.h --- a/content/test/test_page_broadcast.h
+++ b/content/test/test_page_broadcast.h +++ b/content/test/test_page_broadcast.h
@@ -53,6 +53,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast { @@ -54,6 +54,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
const blink::ColorProviderColorMaps& color_provider_colors) override;
void UpdateCanvasNoiseToken( void UpdateCanvasNoiseToken(
std::optional<blink::NoiseToken> canvas_noise_token) override; std::optional<blink::NoiseToken> canvas_noise_token) override;
void SetSupportsDraggableRegions(bool supports_draggable_regions) override;
+ void SetSchedulerThrottling(bool allowed) override {} + void SetSchedulerThrottling(bool allowed) override {}
mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_; mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_;
}; };
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
index e7be05ec6dc5f517b4a6f849a262d12dc6c1ca3d..5f4f425c77c8aadf269edfaec658a8d2ad74b2cd 100644 index fb846303b126c0bbaa252b8b6c5b9b2971100c62..e6dcf94dcde8515e9cf73656d6c1659492aac4b4 100644
--- a/third_party/blink/public/mojom/page/page.mojom --- a/third_party/blink/public/mojom/page/page.mojom
+++ b/third_party/blink/public/mojom/page/page.mojom +++ b/third_party/blink/public/mojom/page/page.mojom
@@ -182,4 +182,7 @@ interface PageBroadcast { @@ -186,4 +186,7 @@ interface PageBroadcast {
// the noise token at ReadyToCommit time and update blink::WebViews that // Indicates that the page's main frame should collect draggable regions set
// were made at request time. // using the app-region CSS property.
UpdateCanvasNoiseToken(blink.mojom.NoiseToken? canvas_noise_token); SetSupportsDraggableRegions(bool supports_draggable_regions);
+ +
+ // Whether to enable the Renderer scheduler background throttling. + // Whether to enable the Renderer scheduler background throttling.
+ SetSchedulerThrottling(bool allowed); + SetSchedulerThrottling(bool allowed);
}; };
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index 9c0fe6ad62872f05cfb1179b4b979139008976d2..6aca43e61ef7f1caea74c30e5c3ce4496d4c4188 100644 index 11a31c9ed26b5abde0ea812eae6b219340ed711c..a72cf76b820cb86b9495ea147efbdcf53b8a9845 100644
--- a/third_party/blink/public/web/web_view.h --- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h
@@ -366,6 +366,7 @@ class BLINK_EXPORT WebView { @@ -366,6 +366,7 @@ class BLINK_EXPORT WebView {
@@ -155,7 +155,7 @@ index 071ede882b2503e22ff97967a7f9cbfd96d048bd..baf06a06756ac7cdcd7f7aef15f812d5
// Do not throttle if the page should be painting. // Do not throttle if the page should be painting.
bool is_visible = bool is_visible =
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index 83e4be6692496d1d05dcd4110009c68763683128..f8deed2f22387c5dcc35d93c7b45ba54a77625e5 100644 index 9b9dd237525793b149f1e79d26e9e8043131c363..ec1d8054289b1ae6eb5a579fc82b90a92fe438ff 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h --- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -452,6 +452,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -452,6 +452,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,

View File

@@ -33,10 +33,10 @@ index e7ee2d88b136be97e0668874a309085554041a5a..1ed28fa85bf906bea9628da146627067
"//base", "//base",
"//build:branding_buildflags", "//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 7ad4a62c8bfb97d36fbd86a08d5deccdc77da129..0e281fc366c4ee35efdec3625425f2fc8ced135a 100644 index 03767f1fa536107112eee7106323238caeeedf2c..0df5df319e4d84daed9d9017691950579fce7ae3 100644
--- a/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -4813,7 +4813,7 @@ static_library("browser") { @@ -4811,7 +4811,7 @@ static_library("browser") {
] ]
} }
@@ -46,10 +46,10 @@ index 7ad4a62c8bfb97d36fbd86a08d5deccdc77da129..0e281fc366c4ee35efdec3625425f2fc
# than here in :chrome_dll. # than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ] deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 5befc9056f87e389a296ebf2bbbc6faad96d0b67..76f632121c7a6f3582cdcbbb076df979be749cb8 100644 index 932793506ca9259d6c4f67f6e2bbbd654b2c7be3..eff32d19f785d871e9ec9a63fe52151ee485dc1e 100644
--- a/chrome/test/BUILD.gn --- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -7557,9 +7557,12 @@ test("unit_tests") { @@ -7563,9 +7563,12 @@ test("unit_tests") {
"//chrome/notification_helper", "//chrome/notification_helper",
] ]
@@ -63,7 +63,7 @@ index 5befc9056f87e389a296ebf2bbbc6faad96d0b67..76f632121c7a6f3582cdcbbb076df979
"//chrome//services/util_win:unit_tests", "//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources", "//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests", "//chrome/app:win_unit_tests",
@@ -8493,6 +8496,10 @@ test("unit_tests") { @@ -8499,6 +8502,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
] ]
@@ -74,7 +74,7 @@ index 5befc9056f87e389a296ebf2bbbc6faad96d0b67..76f632121c7a6f3582cdcbbb076df979
sources += [ sources += [
# The importer code is not used on Android. # The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc", "../common/importer/firefox_importer_utils_unittest.cc",
@@ -8549,7 +8556,6 @@ test("unit_tests") { @@ -8555,7 +8562,6 @@ test("unit_tests") {
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above? # TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
deps += [ deps += [
"../browser/screen_ai:screen_ai_install_state", "../browser/screen_ai:screen_ai_install_state",

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken. TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index e2a33a8275974c726148b73aae61ed23fa524a31..6635ed3b341ffc63d80d895dc5746c79092f53ab 100644 index 55ba21754555cccb095707d30fcefeaf15ea13c6..e76cccefbbf77fcfb886c41d501bcff4fd27be2f 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9854,6 +9854,7 @@ void RenderFrameHostImpl::CreateNewWindow( @@ -9861,6 +9861,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type, last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(), params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features, params->frame_name, params->disposition, *params->features,
@@ -21,10 +21,10 @@ index e2a33a8275974c726148b73aae61ed23fa524a31..6635ed3b341ffc63d80d895dc5746c79
&no_javascript_access); &no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index cd6abd23d61ea7f12ac4caf9f9c5d5c1822c6c05..4472f8020547631c921860a07637c110c1d8f080 100644 index 49d18f7595e463cc98c888a942f837757a27a596..a7ea73a46936ab4f82880121767376383864959b 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5338,6 +5338,10 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5350,6 +5350,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.initially_hidden = renderer_started_hidden; create_params.initially_hidden = renderer_started_hidden;
create_params.initial_popup_url = params.target_url; create_params.initial_popup_url = params.target_url;
@@ -35,7 +35,7 @@ index cd6abd23d61ea7f12ac4caf9f9c5d5c1822c6c05..4472f8020547631c921860a07637c110
// Even though all codepaths leading here are in response to a renderer // Even though all codepaths leading here are in response to a renderer
// trying to open a new window, if the new window ends up in a different // trying to open a new window, if the new window ends up in a different
// browsing instance, then the RenderViewHost, RenderWidgetHost, // browsing instance, then the RenderViewHost, RenderWidgetHost,
@@ -5392,6 +5396,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5404,6 +5408,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// Sets the newly created WebContents WindowOpenDisposition. // Sets the newly created WebContents WindowOpenDisposition.
new_contents_impl->original_window_open_disposition_ = params.disposition; new_contents_impl->original_window_open_disposition_ = params.disposition;
@@ -48,7 +48,7 @@ index cd6abd23d61ea7f12ac4caf9f9c5d5c1822c6c05..4472f8020547631c921860a07637c110
// If the new frame has a name, make sure any SiteInstances that can find // If the new frame has a name, make sure any SiteInstances that can find
// this named frame have proxies for it. Must be called after // this named frame have proxies for it. Must be called after
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses // SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -5433,12 +5443,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5445,12 +5455,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl); AddWebContentsDestructionObserver(new_contents_impl);
} }

View File

@@ -52,10 +52,10 @@ index 99d368046177dd92c8b36743f461d348bbf19a2e..b0a1859d22063cf6d5a73b5ccd5ea6fb
void RenderFrameImpl::DidChangeScrollOffset() { void RenderFrameImpl::DidChangeScrollOffset() {
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 542eddb03c98eac5c03c9bc208af2c863d552b2d..e91c0f20d4e401a43936a9de9b6a6b6c1199612c 100644 index 61d4ef338cc4c0e99c144d6d95bbe0adba9d3556..ce7ba31d2a2ebab213be4b123f6af93c99b74149 100644
--- a/content/renderer/render_frame_impl.h --- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -606,7 +606,8 @@ class CONTENT_EXPORT RenderFrameImpl @@ -605,7 +605,8 @@ class CONTENT_EXPORT RenderFrameImpl
int world_id) override; int world_id) override;
void DidInstallConditionalFeatures(v8::Local<v8::Context> context, void DidInstallConditionalFeatures(v8::Local<v8::Context> context,
int world_id) override; int world_id) override;

View File

@@ -34,10 +34,10 @@ index 2dc44d4787d5198cff7be2cf98ad5acf2d3a9a0b..27a0335aac2bd4239616cf71f5d015c9
class ScrollEvent; class ScrollEvent;
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index d2651f4fcbb7991e9ec8f164e5bee51dab405c5a..d58b59288d881a2d74ea357f1e9e27870d24ac72 100644 index 5dd2b9b0897131897596e88e74701293c69e012d..89287b68398e9121959e7750644d37072e8e489b 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -1378,6 +1378,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() { @@ -1382,6 +1382,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
return background_paint_brush_; return background_paint_brush_;
} }
@@ -49,10 +49,10 @@ index d2651f4fcbb7991e9ec8f164e5bee51dab405c5a..d58b59288d881a2d74ea357f1e9e2787
DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() { DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
return new DesktopNativeCursorManagerWin(); return new DesktopNativeCursorManagerWin();
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index b65ced55f997d5064b9d9338190567f8c264fce8..e8acd2828ed05deefa335ce2bb461f0c3be8d7b7 100644 index 8b34b44095ba7884947d5e83da847783126b3e62..1e30bce5ca5bf47726fd846f2f26705d52a8ce57 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -273,6 +273,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -274,6 +274,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
void HandleWindowScaleFactorChanged(float window_scale_factor) override; void HandleWindowScaleFactorChanged(float window_scale_factor) override;
void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override; void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override;
HBRUSH GetBackgroundPaintBrush() override; HBRUSH GetBackgroundPaintBrush() override;

View File

@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
by changing something in Electron. by changing something in Electron.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0d2e6fb394799980c61c0855d4cb4c1933719a6e..8f7467af5365f7ea0a76027256748d62b6cb7531 100644 index 2636b49a902570bf3b92675db7792893fcc949f9..b489867c2567739ac200cd1e4c4863b3a0aa8235 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5309,7 +5309,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5321,7 +5321,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
: IsGuest(); : IsGuest();
// While some guest types do not have a guest SiteInstance, the ones that // While some guest types do not have a guest SiteInstance, the ones that
// don't all override WebContents creation above. // don't all override WebContents creation above.

View File

@@ -84,7 +84,7 @@ index bc0bad82ebcdceadc505e912ff27202b452fefab..6b77c57fccc4619a1df3b4ed661d2bdd
ProfileSelection ProfileSelections::GetProfileSelection( ProfileSelection ProfileSelections::GetProfileSelection(
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index 4c52386f9ddf13f1453903cda3954b6c596028f2..8fbb2025d157e58c90c701f9e3478f6c99b88aa1 100644 index eba2400655be58628ad1dbf37692a963cc031bf8..02da80b42f936f347c9043f4499d9a324bdf43d2 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc --- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -21,8 +21,10 @@ @@ -21,8 +21,10 @@

View File

@@ -80,10 +80,10 @@ index 39fa45f0a0f9076bd7ac0be6f455dd540a276512..3d0381d463eed73470b28085830f2a23
content::WebContents* source, content::WebContents* source,
const content::OpenURLParams& params, const content::OpenURLParams& params,
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index a66f503e1ffcf5c7435d3bfa5b8af6eda707f125..9af4329932a838c05a3ef7aa5f5da884a501c342 100644 index 78a55026a56c5c2846c7cf13a6080456f8022ddc..f507a45212491b46954e1e30f8fc8c525aff0b25 100644
--- a/chrome/browser/ui/browser.cc --- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc
@@ -2373,7 +2373,8 @@ bool Browser::IsWebContentsCreationOverridden( @@ -2378,7 +2378,8 @@ bool Browser::IsWebContentsCreationOverridden(
content::mojom::WindowContainerType window_container_type, content::mojom::WindowContainerType window_container_type,
const GURL& opener_url, const GURL& opener_url,
const std::string& frame_name, const std::string& frame_name,
@@ -93,7 +93,7 @@ index a66f503e1ffcf5c7435d3bfa5b8af6eda707f125..9af4329932a838c05a3ef7aa5f5da884
if (HasActorTask(profile(), opener)) { if (HasActorTask(profile(), opener)) {
// If an ExecutionEngine is acting on the opener, prevent it from creating a // If an ExecutionEngine is acting on the opener, prevent it from creating a
// new WebContents. We'll instead force the navigation to happen in the same // new WebContents. We'll instead force the navigation to happen in the same
@@ -2386,7 +2387,7 @@ bool Browser::IsWebContentsCreationOverridden( @@ -2391,7 +2392,7 @@ bool Browser::IsWebContentsCreationOverridden(
return (window_container_type == return (window_container_type ==
content::mojom::WindowContainerType::BACKGROUND && content::mojom::WindowContainerType::BACKGROUND &&
ShouldCreateBackgroundContents(source_site_instance, opener_url, ShouldCreateBackgroundContents(source_site_instance, opener_url,
@@ -103,7 +103,7 @@ index a66f503e1ffcf5c7435d3bfa5b8af6eda707f125..9af4329932a838c05a3ef7aa5f5da884
WebContents* Browser::CreateCustomWebContents( WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 370f70ca0cce817fa396b284f95cda3e814eeed0..bcc9b602d361df1307a7d4a67315900a167a716d 100644 index 12b5a5ca3603b815182621f81827635667528ca0..0bfd322dd59de0247a7e8bd09b462b943e206f3c 100644
--- a/chrome/browser/ui/browser.h --- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h
@@ -943,8 +943,7 @@ class Browser : public TabStripModelObserver, @@ -943,8 +943,7 @@ class Browser : public TabStripModelObserver,
@@ -222,10 +222,10 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5
content::WebContents* AddNewContents( content::WebContents* AddNewContents(
content::WebContents* source, content::WebContents* source,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3897ca794fd23f337b73c7305b37da7a97f9c550..2451f06b6b6dc96da44494da1db5e1f47654dad4 100644 index 6efc40408fb64d4e4c4e6671b606912edc013a41..35fe43c6ac99666d070036f7d862529ad364a359 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5272,8 +5272,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5284,8 +5284,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && if (delegate_ &&
delegate_->IsWebContentsCreationOverridden( delegate_->IsWebContentsCreationOverridden(
opener, source_site_instance, params.window_container_type, opener, source_site_instance, params.window_container_type,

View File

@@ -34,10 +34,10 @@ index 2d32d91eb98fe749ae262ba06a1a399813aa7bab..8ebf542046ffba6823804b797e373c80
// |routing_id| must not be IPC::mojom::kRoutingIdNone. // |routing_id| must not be IPC::mojom::kRoutingIdNone.
// If this object outlives |delegate|, DetachDelegate() must be called when // If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index e5eb88eaed395182081a387fee2a13c3b60adf23..08fc2be8e60d16de952ca7f76701ca4eea722c4b 100644 index 816bb7c6f1c00c121f66e67d20d709008c33f02f..d97cbb4fd8e12bcbff19bf8cc8378997110c60c0 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -642,7 +642,7 @@ void RenderWidgetHostViewAura::HideImpl() { @@ -696,7 +696,7 @@ void RenderWidgetHostViewAura::HideImpl() {
CHECK(visibility_ == Visibility::HIDDEN || CHECK(visibility_ == Visibility::HIDDEN ||
visibility_ == Visibility::OCCLUDED); visibility_ == Visibility::OCCLUDED);

View File

@@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null. Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 35469ecb01a680315b2f92e2599a3b56b5fc7549..d2651f4fcbb7991e9ec8f164e5bee51dab405c5a 100644 index 55caef964e9302e939a1580494e753fac347c99e..5dd2b9b0897131897596e88e74701293c69e012d 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -614,7 +614,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { @@ -618,7 +618,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
void DesktopWindowTreeHostWin::SetAspectRatio( void DesktopWindowTreeHostWin::SetAspectRatio(
const gfx::SizeF& aspect_ratio, const gfx::SizeF& aspect_ratio,
const gfx::Size& excluded_margin) { const gfx::Size& excluded_margin) {

View File

@@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell
This patch is used by Electron to implement spellchecker events. This patch is used by Electron to implement spellchecker events.
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index 3928d6fdbda8aac5fb89ab148adaa18218e135f8..4c52386f9ddf13f1453903cda3954b6c596028f2 100644 index dbc05afd488118396c191c61a37692aba1fe858b..eba2400655be58628ad1dbf37692a963cc031bf8 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc --- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -478,6 +478,8 @@ void SpellcheckService::LoadDictionaries() { @@ -476,6 +476,8 @@ void SpellcheckService::LoadDictionaries() {
std::make_unique<SpellcheckHunspellDictionary>( std::make_unique<SpellcheckHunspellDictionary>(
dictionary, platform_spellcheck_language, context_, this)); dictionary, platform_spellcheck_language, context_, this));
hunspell_dictionaries_.back()->AddObserver(this); hunspell_dictionaries_.back()->AddObserver(this);
@@ -19,7 +19,7 @@ index 3928d6fdbda8aac5fb89ab148adaa18218e135f8..4c52386f9ddf13f1453903cda3954b6c
hunspell_dictionaries_.back()->Load(); hunspell_dictionaries_.back()->Load();
} }
@@ -532,6 +534,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { @@ -526,6 +528,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
(!hunspell_dictionaries_.empty() || enable_if_uninitialized); (!hunspell_dictionaries_.empty() || enable_if_uninitialized);
} }

View File

@@ -45,10 +45,10 @@ index e189d584f05f2ce6354c03a9b19f56985df8a15e..41b430e8f2416be098494f5c49fb97ca
'internal-forced-visited-'): 'internal-forced-visited-'):
internal_visited_order = 0 internal_visited_order = 0
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
index 5e4e2becfabf4a85d9253b590ecc86297aa37ce4..a916e3dd149f33ad2a98d031303a38f9c673c9b8 100644 index 122347f812e07a1843914b2c160922433712b7c8..3a619b6e6a970609431ecf67801c05f1d401e807 100644
--- a/third_party/blink/renderer/core/css/css_properties.json5 --- a/third_party/blink/renderer/core/css/css_properties.json5
+++ b/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -9040,6 +9040,26 @@ @@ -9036,6 +9036,26 @@
property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"],
}, },
@@ -312,7 +312,7 @@ index 1d6b8160e8db2a94ee61ed41ac9a74db5b1bfb17..373bcd30c6a4526262912021aaf2b560
auto DrawAsSinglePath = [&]() { auto DrawAsSinglePath = [&]() {
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index c5c94ad6f34aa3bd060224ae01ccc705354e5158..0331b41978697787c0ea2cf6360ac9d2b5ed85a1 100644 index 34c13ec5ff7ed98c9472abb5840c164a5ce5456d..3fe2753c8bba305a51fa5992e7ff9f1e2daf1e0c 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -214,6 +214,10 @@ @@ -214,6 +214,10 @@

View File

@@ -19,7 +19,7 @@ https://chromium-review.googlesource.com/c/chromium/src/+/6936895
as we depend on the removed functionality in this patch. as we depend on the removed functionality in this patch.
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index f651286bc85f3640ec072b05eb2f0d118e02417a..94ee607bc9de2bf388a736c438613b51de1a5ac2 100644 index ce52245628c72018da8ec4a3155dafa74e42c8e3..89a078d1ce00667bd83def21e341b03ca6c79ee3 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -522,7 +522,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { @@ -522,7 +522,7 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -45,10 +45,10 @@ index 11954a3adfb6d517b6dc8e780a4a9aba8a0bf98a..1ddc1f34055c8b42177703ccc2f0d006
// window's workspace and fullscreen state, and can be retrieved from or // window's workspace and fullscreen state, and can be retrieved from or
// applied to a window. // applied to a window.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index e523151fb670af28cf2c54548c5009825fdbed92..66d5724f848b328a19362a3c0f6346704ddb50ac 100644 index 2239b085ac7fd87fe06aef1001551f8afe8e21e4..9ead3ab0755fe5c3500893325f0597e07e7241cc 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -554,6 +554,7 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost @@ -556,6 +556,7 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
bool is_miniaturized_ = false; bool is_miniaturized_ = false;
bool is_window_key_ = false; bool is_window_key_ = false;
bool is_mouse_capture_active_ = false; bool is_mouse_capture_active_ = false;
@@ -57,10 +57,10 @@ index e523151fb670af28cf2c54548c5009825fdbed92..66d5724f848b328a19362a3c0f634670
gfx::Rect window_bounds_before_fullscreen_; gfx::Rect window_bounds_before_fullscreen_;
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index e1a1cdb2ec192d2ee5a555ecccf041f757336f79..68a210eaf34d6d410a14478ad5bf0c78faa30388 100644 index ae113be147f5bfe9d6218a20495897600cc5299d..cb67460205f4db04a3256151d49a2713688c7627 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -465,6 +465,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -467,6 +467,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
if (!is_tooltip) { if (!is_tooltip) {
tooltip_manager_ = std::make_unique<TooltipManagerMac>(GetNSWindowMojo()); tooltip_manager_ = std::make_unique<TooltipManagerMac>(GetNSWindowMojo());
} }
@@ -68,7 +68,7 @@ index e1a1cdb2ec192d2ee5a555ecccf041f757336f79..68a210eaf34d6d410a14478ad5bf0c78
if (params.workspace.length()) { if (params.workspace.length()) {
std::string restoration_data; std::string restoration_data;
@@ -482,6 +483,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -484,6 +485,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
window_params->modal_type = widget->widget_delegate()->GetModalType(); window_params->modal_type = widget->widget_delegate()->GetModalType();
window_params->is_translucent = window_params->is_translucent =
params.opacity == Widget::InitParams::WindowOpacity::kTranslucent; params.opacity == Widget::InitParams::WindowOpacity::kTranslucent;
@@ -76,7 +76,7 @@ index e1a1cdb2ec192d2ee5a555ecccf041f757336f79..68a210eaf34d6d410a14478ad5bf0c78
window_params->is_tooltip = is_tooltip; window_params->is_tooltip = is_tooltip;
// macOS likes to put shadows on most things. However, frameless windows // macOS likes to put shadows on most things. However, frameless windows
@@ -663,9 +665,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -665,9 +667,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
// case it will never become visible but we want its compositor to produce // case it will never become visible but we want its compositor to produce
// frames for screenshooting and screencasting. // frames for screenshooting and screencasting.
UpdateCompositorProperties(); UpdateCompositorProperties();
@@ -90,7 +90,7 @@ index e1a1cdb2ec192d2ee5a555ecccf041f757336f79..68a210eaf34d6d410a14478ad5bf0c78
// Register the CGWindowID (used to identify this window for video capture) // Register the CGWindowID (used to identify this window for video capture)
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 566acaeff6b746c97db606cbda71b29e82570453..28f14b53aa9f2daf25431231539a5dbfc3c42b95 100644 index 45c684170a028198ec12b75dfe8f51c1271d55f6..f52d5bdfbdd108b55d7e9b2882eb8d5039ef279c 100644
--- a/ui/views/widget/widget.cc --- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc +++ b/ui/views/widget/widget.cc
@@ -222,6 +222,18 @@ ui::ZOrderLevel Widget::InitParams::EffectiveZOrderLevel() const { @@ -222,6 +222,18 @@ ui::ZOrderLevel Widget::InitParams::EffectiveZOrderLevel() const {
@@ -121,7 +121,7 @@ index 566acaeff6b746c97db606cbda71b29e82570453..28f14b53aa9f2daf25431231539a5dbf
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index ce34d038564570f4edc8e36fd29524bd93c0b462..808abf2ce1c797591304a8ece9e8a169f034273e 100644 index e2ea4ca2fb5f10045466d2ece7e9148c01b84f29..7cd620467634d267d1c1b0806cea338edfe5837d 100644
--- a/ui/views/widget/widget.h --- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h
@@ -324,6 +324,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -324,6 +324,11 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -158,7 +158,7 @@ index ce34d038564570f4edc8e36fd29524bd93c0b462..808abf2ce1c797591304a8ece9e8a169
// True if the window size will follow the content preferred size. // True if the window size will follow the content preferred size.
bool is_autosized() const { return is_autosized_; } bool is_autosized() const { return is_autosized_; }
@@ -1715,6 +1728,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -1716,6 +1729,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// If true, the mouse is currently down. // If true, the mouse is currently down.
bool is_mouse_button_pressed_ = false; bool is_mouse_button_pressed_ = false;

View File

@@ -0,0 +1,27 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Tue, 21 Oct 2025 18:44:52 -0500
Subject: fix: check for file existence before setting mtime
Check for broken links by confirming the file exists before setting its utime.
This patch should be upstreamed & removed.
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index bcf4c9b192234aa1d470662e4036ac7a23ce2262..724ccef88dc6d798bb948d3fc89a84640d863174 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -201,10 +201,9 @@ def DownloadAndUnpack(url, output_dir, path_prefixes=None, is_known_zip=False):
# The nicest way to do this would be by passing a filter to extractall,
# but that functionality is not available in macOS system Python (3.9.6).
for m in members:
- # Confusingly, this checks if you're allowed to _not_ follow symlinks.
- if os.utime in os.supports_follow_symlinks:
- os.utime(os.path.join(output_dir, m.name), follow_symlinks=False)
- else:
+ # check for broken links before setting the file's utime
+ member_path = os.path.join(output_dir, m.name)
+ if os.path.exists(member_path):
os.utime(os.path.join(output_dir, m.name))

View File

@@ -9,10 +9,10 @@ focus node change via TextInputManager.
chromium-bug: https://crbug.com/1369605 chromium-bug: https://crbug.com/1369605
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 8ad61a86598ac2249496e44113f31ebb21dc616b..36eb119c30531faffb85c4456572f22a9735316d 100644 index 1041d25d5ef78abdcf7b85fe8457ec2a20e2a759..f91f346c93749ff77844143b53d27d14735a6a06 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -3248,6 +3248,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged( @@ -3332,6 +3332,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
} }
} }
@@ -26,10 +26,10 @@ index 8ad61a86598ac2249496e44113f31ebb21dc616b..36eb119c30531faffb85c4456572f22a
RenderWidgetHostViewAura* popup_child_host_view) { RenderWidgetHostViewAura* popup_child_host_view) {
popup_child_host_view_ = popup_child_host_view; popup_child_host_view_ = popup_child_host_view;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 943006033c5f9c6d5cfdbc50ede2723fa8494834..49eb7cb18d1fa114d78048a6e41b8883afdcf674 100644 index da64a2093e5ab60b320a1ea2b12a920956ef9605..9f1e856d0947c3ce1f21e001c5278f61cbda05d3 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h --- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -657,6 +657,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura @@ -664,6 +664,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
RenderWidgetHostViewBase* updated_view) override; RenderWidgetHostViewBase* updated_view) override;
void OnTextSelectionChanged(TextInputManager* text_input_mangager, void OnTextSelectionChanged(TextInputManager* text_input_mangager,
RenderWidgetHostViewBase* updated_view) override; RenderWidgetHostViewBase* updated_view) override;
@@ -87,10 +87,10 @@ index 75df43e3cd2721a92c90c18154d53d5c203e2465..ce42c75c8face36d21f53f44c0201ac4
// The view with active text input state, i.e., a focused <input> element. // The view with active text input state, i.e., a focused <input> element.
// It will be nullptr if no such view exists. Note that the active view // It will be nullptr if no such view exists. Note that the active view
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 208fe58f95557ee103555858c2cda39e732ca991..0d2e6fb394799980c61c0855d4cb4c1933719a6e 100644 index cbfa2ec56627994541548a49a4afe33b6e42c2d7..2636b49a902570bf3b92675db7792893fcc949f9 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -10143,7 +10143,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( @@ -10142,7 +10142,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame", "WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame); "render_frame_host", frame);
RenderWidgetHostViewBase* root_view = RenderWidgetHostViewBase* root_view =

View File

@@ -8,7 +8,7 @@ such as the background turning black when maximizing the window and
dynamic background material settings not taking effect. dynamic background material settings not taking effect.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index 956dc87cb07559038a63cec0b5174cec09619bdb..68635b0c0153c3464ab6c7d317177098a7ec644c 100644 index 29bf4dfbe2cf0af5a1369c4d3e17e50a198c78c6..40a405af0ecde4f649e1fc27d7e4bf739fe0efd0 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -183,6 +183,10 @@ void DesktopWindowTreeHostWin::FinishTouchDrag(gfx::Point screen_point) { @@ -183,6 +183,10 @@ void DesktopWindowTreeHostWin::FinishTouchDrag(gfx::Point screen_point) {
@@ -23,7 +23,7 @@ index 956dc87cb07559038a63cec0b5174cec09619bdb..68635b0c0153c3464ab6c7d317177098
void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 0cd07fd5fb55dcc0d972de4c027fcb895d156592..0f4d335e1d54b5e92fc217080d86513db94d4122 100644 index 2529a00eb6ec30e4269f19c685997a778647bd51..c3e59f3cfefb965c39482539b06c964166e8b78e 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -93,6 +93,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -93,6 +93,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin

View File

@@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority. system priority.
diff --git a/base/BUILD.gn b/base/BUILD.gn diff --git a/base/BUILD.gn b/base/BUILD.gn
index d73ee1145fa64c309eddd02c62af6ee735c62e00..99810c2a0bd3550385ca2be80e4286eb78f201c9 100644 index e6625d8ecf9274c00fe450cc2c7c479914eb0dd6..853cbd806f2fb16ad724767b15b6c6a7f5c4a286 100644
--- a/base/BUILD.gn --- a/base/BUILD.gn
+++ b/base/BUILD.gn +++ b/base/BUILD.gn
@@ -1069,6 +1069,7 @@ component("base") { @@ -1069,6 +1069,7 @@ component("base") {
@@ -452,7 +452,7 @@ index 433f12928857e288b6b0d4f4dd3d1f29da08cf6c..bb95aabec2e0d5c7b3a5d315c9a3f8cb
bool shouldShowWindowTitle = YES; bool shouldShowWindowTitle = YES;
if (_bridge) if (_bridge)
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index f9f453e713b1beff8fda2fcd2a21907640c19817..f651286bc85f3640ec072b05eb2f0d118e02417a 100644 index f3ea2bf2d15d815a2409441a9033a92d5d8967c1..ce52245628c72018da8ec4a3155dafa74e42c8e3 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -42,6 +42,7 @@ @@ -42,6 +42,7 @@
@@ -986,10 +986,10 @@ index 6cde211f88439af0925296b0c8c9500aecadc034..08e7053117478ea898264040eea119dc
} // namespace } // namespace
#endif #endif
diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
index 4428896957be15908ce992189db2a0fe95ba3bbd..07987fad41d194bf38a6f4265ccbd853c1273689 100644 index 5ed1605df7339b504838dfd949772b47ed72a89f..07ccbd74e0835f20edfeef76d0e5e1241a48a65c 100644
--- a/net/dns/BUILD.gn --- a/net/dns/BUILD.gn
+++ b/net/dns/BUILD.gn +++ b/net/dns/BUILD.gn
@@ -195,6 +195,8 @@ source_set("dns") { @@ -197,6 +197,8 @@ source_set("dns") {
":host_resolver_manager", ":host_resolver_manager",
":mdns_client", ":mdns_client",
] ]
@@ -1882,7 +1882,7 @@ index dd2fcedc84417c324021e4aba4e78a84ff098803..ed3b4b5b8e9d931e7b7f9b5d91f93f5f
sources += [ sources += [
"test/desktop_window_tree_host_win_test_api.cc", "test/desktop_window_tree_host_win_test_api.cc",
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index e855d05f466059f20a31022a1a2810eeadeb4fff..e523151fb670af28cf2c54548c5009825fdbed92 100644 index fdc7eb4e4c5e8338c725f7d317559b091d8b38fe..2239b085ac7fd87fe06aef1001551f8afe8e21e4 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
@@ -1903,7 +1903,7 @@ index e855d05f466059f20a31022a1a2810eeadeb4fff..e523151fb670af28cf2c54548c500982
@class NSView; @class NSView;
namespace remote_cocoa { namespace remote_cocoa {
@@ -504,10 +507,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost @@ -506,10 +509,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow> mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
remote_ns_window_remote_; remote_ns_window_remote_;
@@ -1917,7 +1917,7 @@ index e855d05f466059f20a31022a1a2810eeadeb4fff..e523151fb670af28cf2c54548c500982
// Used to force the NSApplication's focused accessibility element to be the // Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused. // views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index ac4257215c61f3cb388e14f4439e23ac29f1307d..e1a1cdb2ec192d2ee5a555ecccf041f757336f79 100644 index 99bac834cb77f16b061c7dcf209b4f90cc6da8d8..ae113be147f5bfe9d6218a20495897600cc5299d 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
@@ -1928,7 +1928,7 @@ index ac4257215c61f3cb388e14f4439e23ac29f1307d..e1a1cdb2ec192d2ee5a555ecccf041f7
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h" #include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
#include "ui/accelerated_widget_mac/window_resize_helper_mac.h" #include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
#include "ui/accessibility/accessibility_features.h" #include "ui/accessibility/accessibility_features.h"
@@ -360,8 +361,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -362,8 +363,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
if (in_process_ns_window_bridge_) { if (in_process_ns_window_bridge_) {
return gfx::NativeViewAccessible(in_process_ns_window_bridge_->ns_view()); return gfx::NativeViewAccessible(in_process_ns_window_bridge_->ns_view());
} }
@@ -1941,7 +1941,7 @@ index ac4257215c61f3cb388e14f4439e23ac29f1307d..e1a1cdb2ec192d2ee5a555ecccf041f7
} }
gfx::NativeViewAccessible gfx::NativeViewAccessible
@@ -377,8 +382,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -379,8 +384,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
[in_process_ns_window_bridge_->ns_view() window]); [in_process_ns_window_bridge_->ns_view() window]);
} }
@@ -1954,7 +1954,7 @@ index ac4257215c61f3cb388e14f4439e23ac29f1307d..e1a1cdb2ec192d2ee5a555ecccf041f7
} }
remote_cocoa::mojom::NativeWidgetNSWindow* remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1445,9 +1454,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -1447,9 +1456,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
// for PWAs. However this breaks accessibility on in-process windows, // for PWAs. However this breaks accessibility on in-process windows,
// so set it back to NO when a local window gains focus. See // so set it back to NO when a local window gains focus. See
// https://crbug.com/41485830. // https://crbug.com/41485830.
@@ -1966,7 +1966,7 @@ index ac4257215c61f3cb388e14f4439e23ac29f1307d..e1a1cdb2ec192d2ee5a555ecccf041f7
// Explicitly set the keyboard accessibility state on regaining key // Explicitly set the keyboard accessibility state on regaining key
// window status. // window status.
if (is_key && is_content_first_responder) { if (is_key && is_content_first_responder) {
@@ -1588,17 +1599,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -1602,17 +1613,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token, const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) { const std::vector<uint8_t>& view_token) {
@@ -1987,7 +1987,7 @@ index ac4257215c61f3cb388e14f4439e23ac29f1307d..e1a1cdb2ec192d2ee5a555ecccf041f7
*pid = getpid(); *pid = getpid();
id element_id = GetNativeViewAccessible(); id element_id = GetNativeViewAccessible();
@@ -1611,6 +1625,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -1625,6 +1639,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
} }
*token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id); *token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);

View File

@@ -133,7 +133,7 @@ index 5be62a3fb27e37f3c1db6b811172f6dfebe18f61..34349f9832fe4b9a3d48db613a789afb
const GURL& document_url, const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr, const WeakDocumentPtr& weak_document_ptr,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 659d42adfea710b9ff9e315cffa6268a61d68243..e4df51e2fac09cd2c97bb125b9187aede4138f23 100644 index d689ab09609595e9738a771d723f2923f629d6cb..ae46fafbb67668d3c0a147cb0d8cf8fda958409a 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc --- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2314,7 +2314,7 @@ void RenderProcessHostImpl::CreateNotificationService( @@ -2314,7 +2314,7 @@ void RenderProcessHostImpl::CreateNotificationService(

View File

@@ -44,10 +44,10 @@ index 3a820b1b9c9aab336c724ef8c0d823eddb330e1e..9a24c153e47b3f3878fa6ea92fb99d14
void RenderWidgetHostImpl::ShowContextMenuAtPoint( void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 4472f8020547631c921860a07637c110c1d8f080..3897ca794fd23f337b73c7305b37da7a97f9c550 100644 index a7ea73a46936ab4f82880121767376383864959b..6efc40408fb64d4e4c4e6671b606912edc013a41 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -6149,6 +6149,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { @@ -6161,6 +6161,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get(); return text_input_manager_.get();
} }
@@ -60,10 +60,10 @@ index 4472f8020547631c921860a07637c110c1d8f080..3897ca794fd23f337b73c7305b37da7a
RenderWidgetHostImpl* render_widget_host) { RenderWidgetHostImpl* render_widget_host) {
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 8e26b26988f910aefd3775f56b024f3fae331fce..247e71fa9a43116b40cfffd8da0169223272d9c9 100644 index 82c714ebe0e18cd7715e028836c396c214283d24..9b065992fc577084ef16aaef1436fd0855e32981 100644
--- a/content/browser/web_contents/web_contents_impl.h --- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h
@@ -1176,6 +1176,7 @@ class CONTENT_EXPORT WebContentsImpl @@ -1183,6 +1183,7 @@ class CONTENT_EXPORT WebContentsImpl
void SendScreenRects() override; void SendScreenRects() override;
void SendActiveState(bool active) override; void SendActiveState(bool active) override;
TextInputManager* GetTextInputManager() override; TextInputManager* GetTextInputManager() override;
@@ -72,10 +72,10 @@ index 8e26b26988f910aefd3775f56b024f3fae331fce..247e71fa9a43116b40cfffd8da016922
RenderWidgetHostImpl* render_widget_host) override; RenderWidgetHostImpl* render_widget_host) override;
bool IsShowingContextMenuOnPage() const override; bool IsShowingContextMenuOnPage() const override;
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 4faff4e44a441cd9e95ee926d6e62a9249424433..bf06dcb8b69001f914541423824a144ac331f190 100644 index 8e0a8b0e3e005d81c7fec493eca9e8262edb2853..1fb13e811d5ee2875b6c4162c6b9843d3e59d431 100644
--- a/content/public/browser/web_contents_observer.h --- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h
@@ -34,6 +34,7 @@ @@ -33,6 +33,7 @@
#include "third_party/blink/public/mojom/frame/viewport_intersection_state.mojom-forward.h" #include "third_party/blink/public/mojom/frame/viewport_intersection_state.mojom-forward.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom-forward.h" #include "third_party/blink/public/mojom/loader/resource_load_info.mojom-forward.h"
#include "third_party/blink/public/mojom/media/capture_handle_config.mojom-forward.h" #include "third_party/blink/public/mojom/media/capture_handle_config.mojom-forward.h"
@@ -83,7 +83,7 @@ index 4faff4e44a441cd9e95ee926d6e62a9249424433..bf06dcb8b69001f914541423824a144a
#include "ui/base/page_transition_types.h" #include "ui/base/page_transition_types.h"
#include "ui/base/window_open_disposition.h" #include "ui/base/window_open_disposition.h"
@@ -642,6 +643,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { @@ -641,6 +642,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
// Invoked when the primary main frame changes size. // Invoked when the primary main frame changes size.
virtual void PrimaryMainFrameWasResized(bool width_changed) {} virtual void PrimaryMainFrameWasResized(bool width_changed) {}

View File

@@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
accessed from our JS event. The filtering is moved into Electron's code. accessed from our JS event. The filtering is moved into Electron's code.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8f7467af5365f7ea0a76027256748d62b6cb7531..a9813ead175b478227bb91daf0d23cffc1bedca6 100644 index b489867c2567739ac200cd1e4c4863b3a0aa8235..6edd4d673dd61b396aaf121ff3e6810fd0b4ba00 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -10281,25 +10281,13 @@ void WebContentsImpl::RendererUnresponsive( @@ -10291,25 +10291,13 @@ void WebContentsImpl::RendererUnresponsive(
base::RepeatingClosure hang_monitor_restarter) { base::RepeatingClosure hang_monitor_restarter) {
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive", OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
"render_widget_host", render_widget_host); "render_widget_host", render_widget_host);

View File

@@ -0,0 +1,765 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Tue, 21 Oct 2025 21:45:33 -0500
Subject: Revert "[cleanup] Remove feature WinDelaySpellcheckServiceInit"
This reverts commit 5fe1e59226f59c4d6fb70e7410d1a0ab83688ae2.
Our codebase currently needs the ability to delay this service.
It was added in c2d7164 (#38248) to fix a crash originally
described in 97b353a (#34993):
> Delaying spell check initialization is causing specs for
> 'custom dictionary word list API' to fail in Electron.
This patch can be removed when we fix that crash.
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 9cb826530cf567e98baf91a60ca1f7496aca9431..2d0e92f9f373f8ef6ffa3c292811df957d457c95 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1412,6 +1412,17 @@ void ChromeBrowserMainParts::PostProfileInit(Profile* profile,
profile->GetPath()));
}
+#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
+ // Create the spellcheck service. This will asynchronously retrieve the
+ // Windows platform spellcheck dictionary language tags used to populate the
+ // context menu for editable content.
+ if (spellcheck::UseBrowserSpellChecker() &&
+ profile->GetPrefs()->GetBoolean(spellcheck::prefs::kSpellCheckEnable) &&
+ !base::FeatureList::IsEnabled(
+ spellcheck::kWinDelaySpellcheckServiceInit)) {
+ SpellcheckServiceFactory::GetForContext(profile);
+ }
+#endif
#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc
index 5bad748fdfc7944a44dbe4dd7891eda31e3128d3..c1701b71a76695c3e941009bdd55777167907834 100644
--- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc
+++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api.cc
@@ -275,15 +275,21 @@ LanguageSettingsPrivateGetLanguageListFunction::Run() {
#if BUILDFLAG(IS_WIN)
if (spellcheck::UseBrowserSpellChecker()) {
- // Asynchronously load the dictionaries to determine platform support.
- SpellcheckService* service =
- SpellcheckServiceFactory::GetForContext(browser_context());
- AddRef(); // Balanced in OnDictionariesInitialized
- service->InitializeDictionaries(
- base::BindOnce(&LanguageSettingsPrivateGetLanguageListFunction::
- OnDictionariesInitialized,
- base::Unretained(this)));
- return RespondLater();
+ if (!base::FeatureList::IsEnabled(
+ spellcheck::kWinDelaySpellcheckServiceInit)) {
+ // Platform dictionary support already determined at browser startup.
+ UpdateSupportedPlatformDictionaries();
+ } else {
+ // Asynchronously load the dictionaries to determine platform support.
+ SpellcheckService* service =
+ SpellcheckServiceFactory::GetForContext(browser_context());
+ AddRef(); // Balanced in OnDictionariesInitialized
+ service->InitializeDictionaries(
+ base::BindOnce(&LanguageSettingsPrivateGetLanguageListFunction::
+ OnDictionariesInitialized,
+ base::Unretained(this)));
+ return RespondLater();
+ }
}
#endif // BUILDFLAG(IS_WIN)
diff --git a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
index 272d50c9b060a8984a15d2dfbf2297e931482b57..e74b37ed7e596ea57728694eab9a398e94bde08c 100644
--- a/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
+++ b/chrome/browser/extensions/api/language_settings_private/language_settings_private_api_unittest.cc
@@ -116,6 +116,8 @@ class LanguageSettingsPrivateApiTest : public ExtensionServiceTestBase {
protected:
void RunGetLanguageListTest();
+ virtual void InitFeatures() {}
+
#if BUILDFLAG(IS_WIN)
virtual void AddSpellcheckLanguagesForTesting(
const std::vector<std::string>& spellcheck_languages_for_testing) {
@@ -134,6 +136,8 @@ class LanguageSettingsPrivateApiTest : public ExtensionServiceTestBase {
EventRouterFactory::GetInstance()->SetTestingFactory(
profile(), base::BindRepeating(&BuildEventRouter));
+ InitFeatures();
+
LanguageSettingsPrivateDelegateFactory::GetInstance()->SetTestingFactory(
profile(), base::BindRepeating(&BuildLanguageSettingsPrivateDelegate));
@@ -291,6 +295,28 @@ TEST_F(LanguageSettingsPrivateApiTest, GetNeverTranslateLanguagesListTest) {
}
}
+class LanguageSettingsPrivateApiGetLanguageListTest
+ : public LanguageSettingsPrivateApiTest {
+ public:
+ LanguageSettingsPrivateApiGetLanguageListTest() = default;
+ ~LanguageSettingsPrivateApiGetLanguageListTest() override = default;
+
+ protected:
+ void InitFeatures() override {
+#if BUILDFLAG(IS_WIN)
+ // Disable the delayed init feature since that case is tested in
+ // LanguageSettingsPrivateApiTestDelayInit below.
+ feature_list_.InitAndDisableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+#endif // BUILDFLAG(IS_WIN)
+ }
+};
+
+TEST_F(LanguageSettingsPrivateApiGetLanguageListTest, GetLanguageList) {
+ translate::TranslateDownloadManager::GetInstance()->ResetForTesting();
+ RunGetLanguageListTest();
+}
+
void LanguageSettingsPrivateApiTest::RunGetLanguageListTest() {
struct LanguageToTest {
std::string accept_language;
@@ -700,6 +726,13 @@ class LanguageSettingsPrivateApiTestDelayInit
LanguageSettingsPrivateApiTestDelayInit() = default;
protected:
+ void InitFeatures() override {
+ // Force Windows hybrid spellcheck and delayed initialization of the
+ // spellcheck service to be enabled.
+ feature_list_.InitAndEnableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+ }
+
void AddSpellcheckLanguagesForTesting(
const std::vector<std::string>& spellcheck_languages_for_testing)
override {
diff --git a/chrome/browser/renderer_context_menu/spelling_menu_observer_browsertest.cc b/chrome/browser/renderer_context_menu/spelling_menu_observer_browsertest.cc
index bd0d77323277ee422ec4f75cee9f7d4e9bf198b3..d0ed451fe104b9671d6002ca72e8ca3a620cb111 100644
--- a/chrome/browser/renderer_context_menu/spelling_menu_observer_browsertest.cc
+++ b/chrome/browser/renderer_context_menu/spelling_menu_observer_browsertest.cc
@@ -30,7 +30,7 @@ namespace {
// accesses resources.
class SpellingMenuObserverTest : public InProcessBrowserTest {
public:
- SpellingMenuObserverTest() = default;
+ SpellingMenuObserverTest();
void SetUpOnMainThread() override {
Reset(false);
@@ -54,12 +54,6 @@ class SpellingMenuObserverTest : public InProcessBrowserTest {
content::BrowserContext* context) {
auto spellcheck_service = std::make_unique<SpellcheckService>(context);
- // With delayed initialization, we need to initialize dictionaries.
- spellcheck_service->InitializeDictionaries(
- base::BindOnce(&SpellingMenuObserverTest::OnSuggestionsComplete,
- base::Unretained(this)));
- RunUntilCallbackReceived();
-
// Call SetLanguage to assure that the platform spellchecker is initialized.
spellcheck_platform::SetLanguage(
spellcheck_service->platform_spell_checker(), "en-US",
@@ -173,6 +167,16 @@ class SpellingMenuObserverTest : public InProcessBrowserTest {
#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
};
+#if BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
+SpellingMenuObserverTest::SpellingMenuObserverTest() {
+ feature_list_.InitWithFeatures(
+ /*enabled_features=*/{},
+ /*disabled_features=*/{spellcheck::kWinDelaySpellcheckServiceInit});
+}
+#else
+SpellingMenuObserverTest::SpellingMenuObserverTest() = default;
+#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
+
SpellingMenuObserverTest::~SpellingMenuObserverTest() = default;
} // namespace
diff --git a/chrome/browser/site_isolation/spellcheck_per_process_browsertest.cc b/chrome/browser/site_isolation/spellcheck_per_process_browsertest.cc
index 8aef94fbd6788d1216648d873cdea3136d8e51c0..1a18086f01c21b34e1ce5ecf750591456a8f3d32 100644
--- a/chrome/browser/site_isolation/spellcheck_per_process_browsertest.cc
+++ b/chrome/browser/site_isolation/spellcheck_per_process_browsertest.cc
@@ -133,21 +133,26 @@ class MockSpellCheckHost : spellcheck::mojom::SpellCheckHost {
#if BUILDFLAG(IS_WIN)
void InitializeDictionaries(
InitializeDictionariesCallback callback) override {
- SpellcheckService* spellcheck = SpellcheckServiceFactory::GetForContext(
- process_host()->GetBrowserContext());
-
- if (!spellcheck) { // Teardown.
- std::move(callback).Run(/*dictionaries=*/{}, /*custom_words=*/{},
- /*enable=*/false);
+ if (base::FeatureList::IsEnabled(
+ spellcheck::kWinDelaySpellcheckServiceInit)) {
+ SpellcheckService* spellcheck = SpellcheckServiceFactory::GetForContext(
+ process_host()->GetBrowserContext());
+
+ if (!spellcheck) { // Teardown.
+ std::move(callback).Run(/*dictionaries=*/{}, /*custom_words=*/{},
+ /*enable=*/false);
+ return;
+ }
+
+ dictionaries_loaded_callback_ = std::move(callback);
+
+ spellcheck->InitializeDictionaries(
+ base::BindOnce(&MockSpellCheckHost::OnDictionariesInitialized,
+ base::Unretained(this)));
return;
}
- dictionaries_loaded_callback_ = std::move(callback);
-
- spellcheck->InitializeDictionaries(
- base::BindOnce(&MockSpellCheckHost::OnDictionariesInitialized,
- base::Unretained(this)));
- return;
+ NOTREACHED();
}
void OnDictionariesInitialized() {
@@ -259,7 +264,17 @@ class ChromeSitePerProcessSpellCheckTest : public ChromeSitePerProcessTest {
public:
ChromeSitePerProcessSpellCheckTest() = default;
- void SetUp() override { ChromeSitePerProcessTest::SetUp(); }
+ void SetUp() override {
+#if BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
+ // When delayed initialization of the spellcheck service is enabled by
+ // default, want to maintain test coverage for the older code path that
+ // initializes spellcheck on browser startup.
+ feature_list_.InitAndDisableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
+
+ ChromeSitePerProcessTest::SetUp();
+ }
protected:
// Tests that spelling in out-of-process subframes is checked.
@@ -366,3 +381,29 @@ IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessSpellCheckTest,
EXPECT_TRUE(host->SpellingPanelVisible());
}
#endif // BUILDFLAG(HAS_SPELLCHECK_PANEL)
+
+#if BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
+class ChromeSitePerProcessSpellCheckTestDelayInit
+ : public ChromeSitePerProcessSpellCheckTest {
+ public:
+ ChromeSitePerProcessSpellCheckTestDelayInit() = default;
+
+ void SetUp() override {
+ // Don't initialize the SpellcheckService on browser launch.
+ feature_list_.InitAndEnableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+
+ ChromeSitePerProcessTest::SetUp();
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessSpellCheckTestDelayInit,
+ OOPIFSpellCheckTest) {
+ RunOOPIFSpellCheckTest();
+}
+
+IN_PROC_BROWSER_TEST_F(ChromeSitePerProcessSpellCheckTestDelayInit,
+ OOPIFDisabledSpellCheckTest) {
+ RunOOPIFDisabledSpellCheckTest();
+}
+#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
diff --git a/chrome/browser/spellchecker/spell_check_host_chrome_impl.cc b/chrome/browser/spellchecker/spell_check_host_chrome_impl.cc
index c51c5747f45010548fe0cb7d31016605cf43c8e3..a99eb10c4ba77a1d3a89a308acffb5064d690b4a 100644
--- a/chrome/browser/spellchecker/spell_check_host_chrome_impl.cc
+++ b/chrome/browser/spellchecker/spell_check_host_chrome_impl.cc
@@ -186,21 +186,27 @@ void SpellCheckHostChromeImpl::InitializeDictionaries(
InitializeDictionariesCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- // Initialize the spellcheck service if needed. Initialization must
- // happen on UI thread.
- SpellcheckService* spellcheck = GetSpellcheckService();
+ if (base::FeatureList::IsEnabled(
+ spellcheck::kWinDelaySpellcheckServiceInit)) {
+ // Initialize the spellcheck service if needed. Initialization must
+ // happen on UI thread.
+ SpellcheckService* spellcheck = GetSpellcheckService();
+
+ if (!spellcheck) { // Teardown.
+ std::move(callback).Run(/*dictionaries=*/{}, /*custom_words=*/{},
+ /*enable=*/false);
+ return;
+ }
- if (!spellcheck) { // Teardown.
- std::move(callback).Run(/*dictionaries=*/{}, /*custom_words=*/{},
- /*enable=*/false);
+ dictionaries_loaded_callback_ = std::move(callback);
+
+ spellcheck->InitializeDictionaries(
+ base::BindOnce(&SpellCheckHostChromeImpl::OnDictionariesInitialized,
+ weak_factory_.GetWeakPtr()));
return;
}
- dictionaries_loaded_callback_ = std::move(callback);
-
- spellcheck->InitializeDictionaries(
- base::BindOnce(&SpellCheckHostChromeImpl::OnDictionariesInitialized,
- weak_factory_.GetWeakPtr()));
+ NOTREACHED();
}
void SpellCheckHostChromeImpl::OnDictionariesInitialized() {
diff --git a/chrome/browser/spellchecker/spell_check_host_chrome_impl_win_browsertest.cc b/chrome/browser/spellchecker/spell_check_host_chrome_impl_win_browsertest.cc
index 31ab441aedd69c08c6f1beefa2129e60bd44a7f3..308c90516a9881b82da5cedec5d80208dbccdced 100644
--- a/chrome/browser/spellchecker/spell_check_host_chrome_impl_win_browsertest.cc
+++ b/chrome/browser/spellchecker/spell_check_host_chrome_impl_win_browsertest.cc
@@ -32,7 +32,12 @@ class SpellCheckHostChromeImplWinBrowserTest : public InProcessBrowserTest {
public:
SpellCheckHostChromeImplWinBrowserTest() = default;
- void SetUp() override { InProcessBrowserTest::SetUp(); }
+ void SetUp() override {
+ // Don't delay initialization of the SpellcheckService on browser launch.
+ feature_list_.InitAndDisableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+ InProcessBrowserTest::SetUp();
+ }
void SetUpOnMainThread() override {
content::BrowserContext* context = browser()->profile();
@@ -50,22 +55,7 @@ class SpellCheckHostChromeImplWinBrowserTest : public InProcessBrowserTest {
void TearDownOnMainThread() override { renderer_.reset(); }
- void InitializeSpellcheckService() {
- spell_check_host_->InitializeDictionaries(base::BindOnce(
- &SpellCheckHostChromeImplWinBrowserTest::InitializeDictionariesCallback,
- base::Unretained(this)));
- RunUntilResultReceived();
- }
-
- void InitializeDictionariesCallback(
- std::vector<spellcheck::mojom::SpellCheckBDictLanguagePtr> dictionaries,
- const std::vector<std::string>& custom_words,
- bool enable) {
- received_result_ = true;
- if (quit_) {
- std::move(quit_).Run();
- }
- }
+ virtual void InitializeSpellcheckService() {}
void OnSpellcheckResult(const std::vector<SpellCheckResult>& result) {
received_result_ = true;
@@ -139,3 +129,41 @@ void SpellCheckHostChromeImplWinBrowserTest::RunSpellCheckReturnMessageTest() {
EXPECT_EQ(result_[0].length, 2);
EXPECT_EQ(result_[0].decoration, SpellCheckResult::SPELLING);
}
+
+class SpellCheckHostChromeImplWinBrowserTestDelayInit
+ : public SpellCheckHostChromeImplWinBrowserTest {
+ public:
+ SpellCheckHostChromeImplWinBrowserTestDelayInit() = default;
+
+ void SetUp() override {
+ // Don't initialize the SpellcheckService on browser launch.
+ feature_list_.InitAndEnableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+ InProcessBrowserTest::SetUp();
+ }
+
+ void InitializeSpellcheckService() override {
+ // With the kWinDelaySpellcheckServiceInit feature flag set, the spellcheck
+ // service is not initialized when instantiated. Call InitializeDictionaries
+ // to load the dictionaries.
+ spell_check_host_->InitializeDictionaries(
+ base::BindOnce(&SpellCheckHostChromeImplWinBrowserTestDelayInit::
+ InitializeDictionariesCallback,
+ base::Unretained(this)));
+ RunUntilResultReceived();
+ }
+
+ void InitializeDictionariesCallback(
+ std::vector<spellcheck::mojom::SpellCheckBDictLanguagePtr> dictionaries,
+ const std::vector<std::string>& custom_words,
+ bool enable) {
+ received_result_ = true;
+ if (quit_)
+ std::move(quit_).Run();
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(SpellCheckHostChromeImplWinBrowserTestDelayInit,
+ SpellCheckReturnMessage) {
+ RunSpellCheckReturnMessageTest();
+}
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index 02da80b42f936f347c9043f4499d9a324bdf43d2..8fbb2025d157e58c90c701f9e3478f6c99b88aa1 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -170,7 +170,9 @@ SpellcheckService::SpellcheckService(content::BrowserContext* context)
custom_dictionary_->Load();
#if BUILDFLAG(IS_WIN)
- if (spellcheck::UseBrowserSpellChecker()) {
+ if (spellcheck::UseBrowserSpellChecker() &&
+ base::FeatureList::IsEnabled(
+ spellcheck::kWinDelaySpellcheckServiceInit)) {
// If initialization of the spellcheck service is on-demand, it is up to the
// instantiator of the spellcheck service to call InitializeDictionaries
// with a callback.
@@ -492,7 +494,9 @@ void SpellcheckService::LoadDictionaries() {
}
#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
- if (spellcheck::UseBrowserSpellChecker()) {
+ if (base::FeatureList::IsEnabled(
+ spellcheck::kWinDelaySpellcheckServiceInit) &&
+ spellcheck::UseBrowserSpellChecker()) {
// Only want to fire the callback on first call to LoadDictionaries
// originating from InitializeDictionaries, since supported platform
// dictionaries are cached throughout the browser session and not
@@ -520,7 +524,9 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
bool enable_if_uninitialized = false;
#if BUILDFLAG(IS_WIN)
- if (spellcheck::UseBrowserSpellChecker()) {
+ if (spellcheck::UseBrowserSpellChecker() &&
+ base::FeatureList::IsEnabled(
+ spellcheck::kWinDelaySpellcheckServiceInit)) {
// If initialization of the spellcheck service is on-demand, the
// renderer-side SpellCheck object needs to start out as enabled in order
// for a click on editable content to initialize the spellcheck service.
diff --git a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
index d99667b86795215717dbb25dfefdf0a32f7cd089..5a6dd4dcc4467601a3197f5b273231b2c95d8cdf 100644
--- a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
@@ -712,6 +712,32 @@ class SpellcheckServiceWindowsHybridBrowserTest
: SpellcheckServiceBrowserTest(/* use_browser_spell_checker=*/true) {}
};
+IN_PROC_BROWSER_TEST_F(SpellcheckServiceWindowsHybridBrowserTest,
+ WindowsHybridSpellcheck) {
+ // This test specifically covers the case where spellcheck delayed
+ // initialization is not enabled, so return early if it is. Other tests
+ // cover the case where delayed initialization is enabled.
+ if (base::FeatureList::IsEnabled(spellcheck::kWinDelaySpellcheckServiceInit))
+ return;
+
+ ASSERT_TRUE(spellcheck::UseBrowserSpellChecker());
+
+ // Note that the base class forces dictionary sync to not be performed, which
+ // on its own would have created a SpellcheckService object. So testing here
+ // that we are still instantiating the SpellcheckService as a browser startup
+ // task to support hybrid spellchecking.
+ SpellcheckService* service = static_cast<SpellcheckService*>(
+ SpellcheckServiceFactory::GetInstance()->GetServiceForBrowserContext(
+ GetContext(), /* create */ false));
+ ASSERT_NE(nullptr, service);
+
+ // The list of Windows spellcheck languages should have been populated by at
+ // least one language. This assures that the spellcheck context menu will
+ // include Windows spellcheck languages that lack Hunspell support.
+ EXPECT_TRUE(service->dictionaries_loaded());
+ EXPECT_FALSE(service->windows_spellcheck_dictionary_map_.empty());
+}
+
class SpellcheckServiceWindowsHybridBrowserTestDelayInit
: public SpellcheckServiceBrowserTest {
public:
@@ -719,6 +745,10 @@ class SpellcheckServiceWindowsHybridBrowserTestDelayInit
: SpellcheckServiceBrowserTest(/* use_browser_spell_checker=*/true) {}
void SetUp() override {
+ // Don't initialize the SpellcheckService on browser launch.
+ feature_list_.InitAndEnableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+
// Add command line switch that forces first run state, to test whether
// primary preferred language has its spellcheck dictionary enabled by
// default for non-Hunspell languages.
@@ -808,9 +838,10 @@ IN_PROC_BROWSER_TEST_F(SpellcheckServiceWindowsHybridBrowserTestDelayInit,
WindowsHybridSpellcheckDelayInit) {
ASSERT_TRUE(spellcheck::UseBrowserSpellChecker());
- // The base class forces dictionary sync to be skipped, so the
- // SpellcheckService object should not have been created on browser startup
- // because. Verify this is the case.
+ // Note that the base class forces dictionary sync to not be performed, and
+ // the kWinDelaySpellcheckServiceInit flag is set, which together should
+ // prevent creation of a SpellcheckService object on browser startup. So
+ // testing here that this is indeed the case.
SpellcheckService* service = static_cast<SpellcheckService*>(
SpellcheckServiceFactory::GetInstance()->GetServiceForBrowserContext(
GetContext(), /* create */ false));
diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
index be073ddd362c6a8e9b93961eba2c5a7d4a978b5e..68c479ca1e8fd93ef661258823122cbc6277ad95 100644
--- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
@@ -181,11 +181,15 @@ class SpellcheckServiceHybridUnitTestBase
protected:
void SetUp() override {
+ InitFeatures();
+
// Use SetTestingFactoryAndUse to force creation and initialization.
SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
&profile_, base::BindRepeating(&BuildSpellcheckService));
}
+ virtual void InitFeatures() {}
+
virtual void InitializeSpellcheckService(
const std::vector<std::string>& spellcheck_languages_for_testing) {
// Fake the presence of Windows spellcheck dictionaries.
@@ -215,6 +219,8 @@ class SpellcheckServiceHybridUnitTestBase
static const std::vector<std::string>
windows_spellcheck_languages_for_testing_;
+ base::test::ScopedFeatureList feature_list_;
+
raw_ptr<SpellcheckService> spellcheck_service_;
};
@@ -327,6 +333,18 @@ const std::vector<std::string> SpellcheckServiceHybridUnitTestBase::
// dictionaries.
};
+class GetDictionariesHybridUnitTestNoDelayInit
+ : public SpellcheckServiceHybridUnitTestBase,
+ public testing::WithParamInterface<TestCase> {
+ protected:
+ void InitFeatures() override {
+ // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled
+ // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit.
+ feature_list_.InitAndDisableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+ }
+};
+
static const TestCase kHybridGetDictionariesParams[] = {
// Galician (gl) has only Windows support, no Hunspell dictionary. Croatian
// (hr) has only Hunspell support, no local Windows dictionary. First
@@ -379,6 +397,16 @@ static const TestCase kHybridGetDictionariesParams[] = {
TestCase("it,it-IT", {"it", "it-IT"}, {"it", "it-IT"}, {"it", "it-IT"}),
};
+INSTANTIATE_TEST_SUITE_P(TestCases,
+ GetDictionariesHybridUnitTestNoDelayInit,
+ testing::ValuesIn(kHybridGetDictionariesParams));
+
+TEST_P(GetDictionariesHybridUnitTestNoDelayInit, GetDictionaries) {
+ RunGetDictionariesTest(GetParam().accept_languages,
+ GetParam().spellcheck_dictionaries,
+ GetParam().expected_dictionaries);
+}
+
struct DictionaryMappingTestCase {
std::string full_tag;
std::string expected_accept_language;
@@ -401,6 +429,18 @@ std::ostream& operator<<(std::ostream& out,
return out;
}
+class SpellcheckServiceWindowsDictionaryMappingUnitTest
+ : public SpellcheckServiceHybridUnitTestBase,
+ public testing::WithParamInterface<DictionaryMappingTestCase> {
+ protected:
+ void InitFeatures() override {
+ // Disable kWinDelaySpellcheckServiceInit, as the case where it's enabled
+ // is tested in SpellcheckServiceWindowsDictionaryMappingUnitTestDelayInit.
+ feature_list_.InitAndDisableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+ }
+};
+
static const DictionaryMappingTestCase kHybridDictionaryMappingsParams[] = {
DictionaryMappingTestCase({"en-CA", "en-CA", "en-CA", "en", "en"}),
DictionaryMappingTestCase({"en-PH", "en", "en", "", ""}),
@@ -423,6 +463,18 @@ static const DictionaryMappingTestCase kHybridDictionaryMappingsParams[] = {
DictionaryMappingTestCase({"pt-BR", "pt-BR", "pt-BR", "pt", "pt"}),
};
+INSTANTIATE_TEST_SUITE_P(TestCases,
+ SpellcheckServiceWindowsDictionaryMappingUnitTest,
+ testing::ValuesIn(kHybridDictionaryMappingsParams));
+
+TEST_P(SpellcheckServiceWindowsDictionaryMappingUnitTest, CheckMappings) {
+ RunDictionaryMappingTest(
+ GetParam().full_tag, GetParam().expected_accept_language,
+ GetParam().expected_tag_passed_to_spellcheck,
+ GetParam().expected_accept_language_generic,
+ GetParam().expected_tag_passed_to_spellcheck_generic);
+}
+
class SpellcheckServiceHybridUnitTestDelayInitBase
: public SpellcheckServiceHybridUnitTestBase {
public:
@@ -435,6 +487,12 @@ class SpellcheckServiceHybridUnitTestDelayInitBase
}
protected:
+ void InitFeatures() override {
+ // Don't initialize the SpellcheckService on browser launch.
+ feature_list_.InitAndEnableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+ }
+
void InitializeSpellcheckService(
const std::vector<std::string>& spellcheck_languages_for_testing)
override {
diff --git a/components/spellcheck/common/spellcheck_features.cc b/components/spellcheck/common/spellcheck_features.cc
index ab07d966779449efcb0bad95ebe05e6018300048..527fa5d72369bb1194684527312eb093946d41c0 100644
--- a/components/spellcheck/common/spellcheck_features.cc
+++ b/components/spellcheck/common/spellcheck_features.cc
@@ -41,6 +41,8 @@ ScopedDisableBrowserSpellCheckerForTesting::
g_browser_spell_checker_enabled = previous_value_;
}
+BASE_FEATURE(kWinDelaySpellcheckServiceInit, base::FEATURE_ENABLED_BY_DEFAULT);
+
#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_ANDROID)
diff --git a/components/spellcheck/common/spellcheck_features.h b/components/spellcheck/common/spellcheck_features.h
index 01e193221c74f0e0bd8620627455f92741448075..7929156c59d078b3d4299bb44ea28bc61bbe0086 100644
--- a/components/spellcheck/common/spellcheck_features.h
+++ b/components/spellcheck/common/spellcheck_features.h
@@ -30,6 +30,25 @@ class ScopedDisableBrowserSpellCheckerForTesting {
const bool previous_value_;
};
+// If the kWinDelaySpellcheckServiceInit feature flag is enabled, don't
+// initialize the spellcheck dictionaries when the SpellcheckService is
+// instantiated. With this flag set: (1) Completing the initialization of the
+// spellcheck service is on-demand, invoked by calling
+// SpellcheckService::InitializeDictionaries with a callback to indicate when
+// the operation completes. (2) The call to create the spellcheck service in
+// ChromeBrowserMainParts::PreMainMessageLoopRunImpl will be skipped. Chromium
+// will still by default instantiate the spellcheck service on startup for
+// custom dictionary synchronization, but will not load Windows spellcheck
+// dictionaries. The command line for launching the browser with Windows hybrid
+// spellchecking enabled but no initialization of the spellcheck service is:
+// chrome
+// --enable-features=WinDelaySpellcheckServiceInit
+// and if instantiation of the spellcheck service needs to be completely
+// disabled:
+// chrome
+// --enable-features=WinDelaySpellcheckServiceInit
+// --disable-sync-types="Dictionary"
+BASE_DECLARE_FEATURE(kWinDelaySpellcheckServiceInit);
#endif // BUILDFLAG(IS_WIN)
#if BUILDFLAG(IS_ANDROID)
diff --git a/components/spellcheck/renderer/spellcheck_provider.cc b/components/spellcheck/renderer/spellcheck_provider.cc
index 20e73dd66865f1d7573adc092d8747e3b3252cfd..0bec57f9a7276c3623edd4fcf009d7b35e453df4 100644
--- a/components/spellcheck/renderer/spellcheck_provider.cc
+++ b/components/spellcheck/renderer/spellcheck_provider.cc
@@ -126,7 +126,9 @@ void SpellCheckProvider::RequestTextChecking(
#if BUILDFLAG(USE_BROWSER_SPELLCHECKER)
if (spellcheck::UseBrowserSpellChecker()) {
#if BUILDFLAG(IS_WIN)
- if (!dictionaries_loaded_) {
+ if (base::FeatureList::IsEnabled(
+ spellcheck::kWinDelaySpellcheckServiceInit) &&
+ !dictionaries_loaded_) {
// Initialize the spellcheck service on demand (this spellcheck request
// could be the result of the first click in editable content), then
// complete the text check request when the dictionaries are loaded.
diff --git a/components/spellcheck/renderer/spellcheck_provider_test.cc b/components/spellcheck/renderer/spellcheck_provider_test.cc
index 04dcb599f5dd93d3e381c243e5ba81fbec8a3790..12c32fd631ff93f1d1ff3c7d2a19924e8909c099 100644
--- a/components/spellcheck/renderer/spellcheck_provider_test.cc
+++ b/components/spellcheck/renderer/spellcheck_provider_test.cc
@@ -188,8 +188,14 @@ void TestingSpellCheckProvider::FillSuggestionList(const std::u16string&,
#if BUILDFLAG(IS_WIN)
void TestingSpellCheckProvider::InitializeDictionaries(
InitializeDictionariesCallback callback) {
- std::move(callback).Run(/*dictionaries=*/{}, /*custom_words=*/{},
- /*enable=*/false);
+ if (base::FeatureList::IsEnabled(
+ spellcheck::kWinDelaySpellcheckServiceInit)) {
+ std::move(callback).Run(/*dictionaries=*/{}, /*custom_words=*/{},
+ /*enable=*/false);
+ return;
+ }
+
+ NOTREACHED();
}
#endif // BUILDFLAG(IS_WIN)
#endif // BUILDFLAG(USE_BROWSER_SPELLCHECKER)
diff --git a/components/spellcheck/renderer/spellcheck_provider_unittest.cc b/components/spellcheck/renderer/spellcheck_provider_unittest.cc
index 487cdb1f871868a7fed8ae2ba1adc816c581d0e2..6e1da0564754063e78ad69997be71bbc95e27b39 100644
--- a/components/spellcheck/renderer/spellcheck_provider_unittest.cc
+++ b/components/spellcheck/renderer/spellcheck_provider_unittest.cc
@@ -65,12 +65,34 @@ class HybridSpellCheckTest
HybridSpellCheckTest() : provider_(&embedder_provider_) {}
~HybridSpellCheckTest() override = default;
+ void SetUp() override {
+ // Don't delay initialization of the SpellcheckService on browser launch.
+ feature_list_.InitAndDisableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+ }
+
+ void RunShouldUseBrowserSpellCheckOnlyWhenNeededTest();
+
protected:
+ base::test::ScopedFeatureList feature_list_;
base::test::SingleThreadTaskEnvironment task_environment_;
spellcheck::EmptyLocalInterfaceProvider embedder_provider_;
TestingSpellCheckProvider provider_;
};
+// Test fixture for testing hybrid check cases with delayed initialization of
+// the spellcheck service.
+class HybridSpellCheckTestDelayInit : public HybridSpellCheckTest {
+ public:
+ HybridSpellCheckTestDelayInit() = default;
+
+ void SetUp() override {
+ // Don't initialize the SpellcheckService on browser launch.
+ feature_list_.InitAndEnableFeature(
+ spellcheck::kWinDelaySpellcheckServiceInit);
+ }
+};
+
// Test fixture for testing combining results from both the native spell checker
// and Hunspell.
class CombineSpellCheckResultsTest
@@ -173,6 +195,10 @@ INSTANTIATE_TEST_SUITE_P(
testing::ValuesIn(kSpellCheckProviderHybridTestsParams));
TEST_P(HybridSpellCheckTest, ShouldUseBrowserSpellCheckOnlyWhenNeeded) {
+ RunShouldUseBrowserSpellCheckOnlyWhenNeededTest();
+}
+
+void HybridSpellCheckTest::RunShouldUseBrowserSpellCheckOnlyWhenNeededTest() {
const auto& test_case = GetParam();
FakeTextCheckingResult completion;
@@ -191,6 +217,20 @@ TEST_P(HybridSpellCheckTest, ShouldUseBrowserSpellCheckOnlyWhenNeeded) {
EXPECT_EQ(completion.cancellation_count_, 0U);
}
+// Tests that the SpellCheckProvider calls into the native spell checker only
+// when needed when the code path through
+// SpellCheckProvider::RequestTextChecking is that used when the spellcheck
+// service is initialized on demand.
+INSTANTIATE_TEST_SUITE_P(
+ SpellCheckProviderHybridTests,
+ HybridSpellCheckTestDelayInit,
+ testing::ValuesIn(kSpellCheckProviderHybridTestsParams));
+
+TEST_P(HybridSpellCheckTestDelayInit,
+ ShouldUseBrowserSpellCheckOnlyWhenNeeded) {
+ RunShouldUseBrowserSpellCheckOnlyWhenNeededTest();
+}
+
// Tests that the SpellCheckProvider can correctly combine results from the
// native spell checker and Hunspell.
INSTANTIATE_TEST_SUITE_P(

View File

@@ -254,10 +254,10 @@ index 17d6d7d935f93afefa9123f56ef9c138c3070f93..8dfa7501a6a2998e107bf9b51f5e5c3d
} }
diff --git a/content/common/features.cc b/content/common/features.cc diff --git a/content/common/features.cc b/content/common/features.cc
index 942f204b4c09787870c14e068dba543e7b64d442..6ccd0081e3c3ef88794ab82fc1282a1d91e047ea 100644 index 4419e36c81aca962e85892cc2e0af3dee31a86c3..5b1bfeba20bd5dde48145ab2f94632735d63d316 100644
--- a/content/common/features.cc --- a/content/common/features.cc
+++ b/content/common/features.cc +++ b/content/common/features.cc
@@ -305,6 +305,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT); @@ -306,6 +306,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kIOSurfaceCapturer, base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kIOSurfaceCapturer, base::FEATURE_ENABLED_BY_DEFAULT);
#endif #endif
@@ -273,10 +273,10 @@ index 942f204b4c09787870c14e068dba543e7b64d442..6ccd0081e3c3ef88794ab82fc1282a1d
BASE_FEATURE(kKeepChildProcessAfterIPCReset, base::FEATURE_DISABLED_BY_DEFAULT); BASE_FEATURE(kKeepChildProcessAfterIPCReset, base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/content/common/features.h b/content/common/features.h diff --git a/content/common/features.h b/content/common/features.h
index 243c4b57083c58c889e9e9d8034dc109420e2fc2..13b7a0c529e7214369c4affebe8fb95e2ddc256e 100644 index faef439b47b162b75a26a5979ae31dc0532bb214..39e283445c643e11847b0ffdc8c06f79028988c7 100644
--- a/content/common/features.h --- a/content/common/features.h
+++ b/content/common/features.h +++ b/content/common/features.h
@@ -107,6 +107,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan); @@ -110,6 +110,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);
#if BUILDFLAG(IS_MAC) #if BUILDFLAG(IS_MAC)
CONTENT_EXPORT BASE_DECLARE_FEATURE(kIOSurfaceCapturer); CONTENT_EXPORT BASE_DECLARE_FEATURE(kIOSurfaceCapturer);
#endif #endif

View File

@@ -54,10 +54,10 @@ index 5b0f0b28c3f36315d5bb12ad7e35f21c91a1e8b6..08ca1a3fc2add9cf93b078b9136d9aa6
if (mouse_event_callback.Run(mouse_event)) { if (mouse_event_callback.Run(mouse_event)) {
return; return;
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a9813ead175b478227bb91daf0d23cffc1bedca6..4777db11f1fbde96c7b117dfe0241bb5c34db126 100644 index 6edd4d673dd61b396aaf121ff3e6810fd0b4ba00..3c25f0d1111eaebf4fb62c9241d237dea3c2a416 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4466,6 +4466,12 @@ void WebContentsImpl::RenderWidgetWasResized( @@ -4478,6 +4478,12 @@ void WebContentsImpl::RenderWidgetWasResized(
width_changed); width_changed);
} }
@@ -71,10 +71,10 @@ index a9813ead175b478227bb91daf0d23cffc1bedca6..4777db11f1fbde96c7b117dfe0241bb5
const gfx::PointF& client_pt) { const gfx::PointF& client_pt) {
if (delegate_) { if (delegate_) {
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 247e71fa9a43116b40cfffd8da0169223272d9c9..48ac6629a904a135f3e3ca7e1f924807e575675a 100644 index 9b065992fc577084ef16aaef1436fd0855e32981..0f230a7ecaa04e8050899525d606541432dada1e 100644
--- a/content/browser/web_contents/web_contents_impl.h --- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h
@@ -1107,6 +1107,7 @@ class CONTENT_EXPORT WebContentsImpl @@ -1114,6 +1114,7 @@ class CONTENT_EXPORT WebContentsImpl
double GetPendingZoomLevel(RenderWidgetHostImpl* rwh) override; double GetPendingZoomLevel(RenderWidgetHostImpl* rwh) override;

View File

@@ -10,10 +10,10 @@ on Windows. We should refactor our code so that this patch isn't
necessary. necessary.
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index 7884bdff1cce1a7a52221f1d7bf5933cd4518b83..be66b04538b2969ba3f8ada0f63660eea586c42b 100644 index 6d478df9ae82edc4bf6994e775a4d716770fdad1..5b7c4a7e4baef8a2dab1a41ff9962f2bbbbd95a9 100644
--- a/testing/variations/fieldtrial_testing_config.json --- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -25301,6 +25301,21 @@ @@ -25347,6 +25347,21 @@
] ]
} }
], ],
@@ -67,7 +67,7 @@ index c1d8107ec3e32d31811572aa1d7a7c7a242da7d9..463abf871c7e169dc1ca9f523d74fc14
} // namespace views::features } // namespace views::features
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index d58b59288d881a2d74ea357f1e9e27870d24ac72..956dc87cb07559038a63cec0b5174cec09619bdb 100644 index 89287b68398e9121959e7750644d37072e8e489b..29bf4dfbe2cf0af5a1369c4d3e17e50a198c78c6 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -84,6 +84,23 @@ namespace { @@ -84,6 +84,23 @@ namespace {
@@ -94,7 +94,7 @@ index d58b59288d881a2d74ea357f1e9e27870d24ac72..956dc87cb07559038a63cec0b5174cec
// Updates the cursor clip region. Used for mouse locking. // Updates the cursor clip region. Used for mouse locking.
void UpdateMouseLockRegion(aura::Window* window, bool locked) { void UpdateMouseLockRegion(aura::Window* window, bool locked) {
if (!locked) { if (!locked) {
@@ -329,9 +346,14 @@ bool DesktopWindowTreeHostWin::IsVisible() const { @@ -333,9 +350,14 @@ bool DesktopWindowTreeHostWin::IsVisible() const {
} }
void DesktopWindowTreeHostWin::SetSize(const gfx::Size& size) { void DesktopWindowTreeHostWin::SetSize(const gfx::Size& size) {
@@ -111,7 +111,7 @@ index d58b59288d881a2d74ea357f1e9e27870d24ac72..956dc87cb07559038a63cec0b5174cec
} }
void DesktopWindowTreeHostWin::StackAbove(aura::Window* window) { void DesktopWindowTreeHostWin::StackAbove(aura::Window* window) {
@@ -346,30 +368,40 @@ void DesktopWindowTreeHostWin::StackAtTop() { @@ -350,30 +372,40 @@ void DesktopWindowTreeHostWin::StackAtTop() {
} }
void DesktopWindowTreeHostWin::CenterWindow(const gfx::Size& size) { void DesktopWindowTreeHostWin::CenterWindow(const gfx::Size& size) {
@@ -154,7 +154,7 @@ index d58b59288d881a2d74ea357f1e9e27870d24ac72..956dc87cb07559038a63cec0b5174cec
return display::win::GetScreenWin()->ScreenToDIPRect(GetHWND(), pixel_bounds); return display::win::GetScreenWin()->ScreenToDIPRect(GetHWND(), pixel_bounds);
} }
@@ -677,37 +709,44 @@ void DesktopWindowTreeHostWin::HideImpl() { @@ -681,37 +713,44 @@ void DesktopWindowTreeHostWin::HideImpl() {
// other get/set methods work in DIP. // other get/set methods work in DIP.
gfx::Rect DesktopWindowTreeHostWin::GetBoundsInPixels() const { gfx::Rect DesktopWindowTreeHostWin::GetBoundsInPixels() const {
@@ -219,7 +219,7 @@ index d58b59288d881a2d74ea357f1e9e27870d24ac72..956dc87cb07559038a63cec0b5174cec
} }
gfx::Rect gfx::Rect
@@ -917,21 +956,29 @@ int DesktopWindowTreeHostWin::GetNonClientComponent( @@ -921,21 +960,29 @@ int DesktopWindowTreeHostWin::GetNonClientComponent(
void DesktopWindowTreeHostWin::GetWindowMask(const gfx::Size& size_px, void DesktopWindowTreeHostWin::GetWindowMask(const gfx::Size& size_px,
SkPath* path) { SkPath* path) {
@@ -264,10 +264,10 @@ index d58b59288d881a2d74ea357f1e9e27870d24ac72..956dc87cb07559038a63cec0b5174cec
} }
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index e8acd2828ed05deefa335ce2bb461f0c3be8d7b7..0cd07fd5fb55dcc0d972de4c027fcb895d156592 100644 index 1e30bce5ca5bf47726fd846f2f26705d52a8ce57..2529a00eb6ec30e4269f19c685997a778647bd51 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -175,7 +175,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -176,7 +176,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
void ShowImpl() override; void ShowImpl() override;
void HideImpl() override; void HideImpl() override;
gfx::Rect GetBoundsInPixels() const override; gfx::Rect GetBoundsInPixels() const override;
@@ -276,7 +276,7 @@ index e8acd2828ed05deefa335ce2bb461f0c3be8d7b7..0cd07fd5fb55dcc0d972de4c027fcb89
gfx::Rect GetBoundsInAcceleratedWidgetPixelCoordinates() override; gfx::Rect GetBoundsInAcceleratedWidgetPixelCoordinates() override;
gfx::Point GetLocationOnScreenInPixels() const override; gfx::Point GetLocationOnScreenInPixels() const override;
void SetCapture() override; void SetCapture() override;
@@ -328,6 +328,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin @@ -329,6 +329,12 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
gfx::Vector2d window_expansion_top_left_delta_; gfx::Vector2d window_expansion_top_left_delta_;
gfx::Vector2d window_expansion_bottom_right_delta_; gfx::Vector2d window_expansion_bottom_right_delta_;

View File

@@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class. does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index e4df51e2fac09cd2c97bb125b9187aede4138f23..20a9e4536e722e5f0c8f5bdb55504b7c19d2a29e 100644 index ae46fafbb67668d3c0a147cb0d8cf8fda958409a..3cda71f0b6c606b9df9b457e3f94ee7d3af051b6 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc --- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1905,6 +1905,10 @@ bool RenderProcessHostImpl::Init() { @@ -1905,6 +1905,10 @@ bool RenderProcessHostImpl::Init() {

View File

@@ -9,10 +9,10 @@ is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226. Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 2451f06b6b6dc96da44494da1db5e1f47654dad4..ee597638585d787617b5a1d7b9ccac6782fb93ef 100644 index 35fe43c6ac99666d070036f7d862529ad364a359..825dd5a2cda02d88f17c04e50b05b89157439538 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4197,6 +4197,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, @@ -4209,6 +4209,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy, params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create()); base::UnguessableToken::Create());
@@ -26,7 +26,7 @@ index 2451f06b6b6dc96da44494da1db5e1f47654dad4..ee597638585d787617b5a1d7b9ccac67
std::unique_ptr<WebContentsViewDelegate> delegate = std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this); GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -4207,6 +4214,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, @@ -4219,6 +4226,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate), view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_); &render_view_host_delegate_view_);
} }
@@ -35,7 +35,7 @@ index 2451f06b6b6dc96da44494da1db5e1f47654dad4..ee597638585d787617b5a1d7b9ccac67
CHECK(view_.get()); CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index c7efc2aba74899b239140c77126666f571c127c3..e620d4c33e95c247495f3ed78952b8fc365cfb99 100644 index ef60f27657953a92f720a0342c8bb08f24684b54..8d614d26117ec41dfe1ecffecbcfb2170c534c9a 100644
--- a/content/public/browser/web_contents.h --- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h
@@ -130,11 +130,14 @@ class PrerenderHandle; @@ -130,11 +130,14 @@ class PrerenderHandle;

View File

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value. `api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 6635ed3b341ffc63d80d895dc5746c79092f53ab..5a3acb372b87ed34a62478967c72aeeec83e9db9 100644 index e76cccefbbf77fcfb886c41d501bcff4fd27be2f..d4f0278019e7d5ea43d6989b48fbefcbd5b05482 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8960,6 +8960,17 @@ void RenderFrameHostImpl::EnterFullscreen( @@ -8967,6 +8967,17 @@ void RenderFrameHostImpl::EnterFullscreen(
} }
} }
@@ -37,10 +37,10 @@ index 6635ed3b341ffc63d80d895dc5746c79092f53ab..5a3acb372b87ed34a62478967c72aeee
if (had_fullscreen_token && !GetView()->HasFocus()) if (had_fullscreen_token && !GetView()->HasFocus())
GetView()->Focus(); GetView()->Focus();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index ee597638585d787617b5a1d7b9ccac6782fb93ef..208fe58f95557ee103555858c2cda39e732ca991 100644 index 825dd5a2cda02d88f17c04e50b05b89157439538..cbfa2ec56627994541548a49a4afe33b6e42c2d7 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4483,21 +4483,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( @@ -4495,21 +4495,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
const input::NativeWebKeyboardEvent& event) { const input::NativeWebKeyboardEvent& event) {
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
"WebContentsImpl::PreHandleKeyboardEvent"); "WebContentsImpl::PreHandleKeyboardEvent");
@@ -80,7 +80,7 @@ index ee597638585d787617b5a1d7b9ccac6782fb93ef..208fe58f95557ee103555858c2cda39e
} }
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -4656,7 +4660,7 @@ void WebContentsImpl::EnterFullscreenMode( @@ -4668,7 +4672,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame)); DCHECK(CanEnterFullscreenMode(requesting_frame));
DCHECK(requesting_frame->IsActive()); DCHECK(requesting_frame->IsActive());

View File

@@ -1770,14 +1770,15 @@ void WebContents::RenderFrameCreated(
return; return;
} }
content::RenderFrameHost::LifecycleState lifecycle_state = if (render_frame_host->GetLifecycleState() ==
render_frame_host->GetLifecycleState(); content::RenderFrameHost::LifecycleState::kActive) {
if (lifecycle_state == content::RenderFrameHost::LifecycleState::kActive) {
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope{isolate};
auto details = gin_helper::Dictionary::CreateEmpty(isolate); auto details = gin_helper::Dictionary::CreateEmpty(isolate);
details.SetGetter("frame", render_frame_host); details.SetGetter("frame", render_frame_host);
Emit("frame-created", details); Emit("frame-created", details);
content::WebContents::FromRenderFrameHost(render_frame_host)
->SetSupportsDraggableRegions(true);
} }
} }

View File

@@ -59,11 +59,6 @@ ElectronRenderFrameObserver::ElectronRenderFrameObserver(
renderer_client_(renderer_client) { renderer_client_(renderer_client) {
// Initialise resource for directory listing. // Initialise resource for directory listing.
net::NetModule::SetResourceProvider(NetResourceProvider); net::NetModule::SetResourceProvider(NetResourceProvider);
// In Chrome, app regions are only supported in the main frame.
// However, we need to support draggable regions on other
// local frames/windows, so extend support beyond the main frame.
render_frame_->GetWebView()->SetSupportsDraggableRegions(true);
} }
void ElectronRenderFrameObserver::DidClearWindowObject() { void ElectronRenderFrameObserver::DidClearWindowObject() {