chore: bump chromium to 117.0.5884.1 (main) (#38969)

* chore: bump chromium in DEPS to 117.0.5866.0

* chore: bump chromium in DEPS to 117.0.5868.0

* chore: update mas_no_private_api.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4634925

Minor manual patch syncing due to upstream code shear

* chore: update mas_disable_remote_layer.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4647191

Manually sync patch to minor upstream code shear

* chore: update mas_disable_remote_accessibility.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4641746

No manual changes; patch applied with fuzz

* chore: update mas_avoid_usage_of_private_macos_apis.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4634925

Manually sync base/process/launch_mac.cc to minor upstream shear

Manually sync base/mac/foundation_util.mm to upstream changes:
_CFIsObjC use has been removed upstream, so we no longer need
to remove it 🎉

* chore: update printing.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4658496

Manually sync patch to minor upstream code shear

* chore: update disable_color_correct_rendering.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4625254

Manually sync patch to minor upstream code shear

* chore: update feat_expose_raw_response_headers_from_urlloader.patch

Xref: services/network/public/cpp/resource_request.cc

No manual changes; patch applied with fuzz

* chore: update add_electron_deps_to_license_credits_file.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4634961

No manual changes; patch applied with fuzz

* chore: update build_only_use_the_mas_build_config_in_the_required_components.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4648411

No manual changes; patch applied with fuzz

* chore: update patches

* fixup! chore: update add_electron_deps_to_license_credits_file.patch

chore: license files must be an array

* chore: bump chromium in DEPS to 117.0.5870.0

* chore: update patches

* chore: run ./script/gen-libc++-filenames.js

* chore: update json_parse_errors_made_user-friendly.patch

Xref: https://chromium-review.googlesource.com/c/v8/v8/+/4652014

v8 error message changed upstream; update Node test to match it

* chore: bump chromium in DEPS to 117.0.5872.0

* chore: update patches

* chore: explicitly cast x11::Window to unsigned int

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4661049

This is an `enum class Window : uint32_t` defined in ui/gfx/x/xproto.h.
Previous versions of clang let this implicit cast happen,
but it generates a warning in the new clang roll.

* chore: remove unused #include

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4650453

header was removed upstream, so FTBFS unless removed here

* chore: add include guard patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4628373

h/t @jkleinsc

* chore: bump chromium in DEPS to 117.0.5874.0

* chore: update render_widget_host_view_mac.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4661244

Manually sync patch to minor upstream code

* chore: update mas_disable_remote_accessibility.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4653209

Manually sync patch to upstream code shear

* chore: update build_only_use_the_mas_build_config_in_the_required_components.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4653209

Manually sync patch to minor upstream code shear

* chore: update GetInitiatorProcessId()

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4641991

trivial upstream naming change: s/ProcessID/ProcessId/

* chore: sync to upstream SetInputRegion() changes

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4665245

Simple upstream chang: SetInputRegion() used to take a gfx::Rect* where
`nullptr` meant "no opaque region". The function signature changed to
absl::optional<gfx::Rect> w/the same meaning.

* chore: sync to upstream SetOpaqueRegion() changes

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4656738

Simple upstream chang: SetOpaqueRegion() used to take a vector<Rect>* where
`nullptr` meant "no opaque region". The function signature changed to
absl::optional<std::vector<gfx::Rect>> w/the same meaning.

* chore: update patches

* chore: bump chromium in DEPS to 117.0.5876.0

* chore: update mas_disable_remote_accessibility.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4658375

We no longer need to patch out a field that's now removed upstream.
RenderWidgetHostNSViewBridgeOwner.remote_accessibility_element_

* chore: update feat_filter_out_non-shareable_windows_in_the_current_application_in.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4658680

Manually sync patch to upstream code shear (ARC adoption).

* chore: update patches

* fix: -Werror,-Wshadow error in Node.js

* chore: bump chromium in DEPS to 117.0.5878.0

* chore: bump chromium in DEPS to 117.0.5880.0

* chore: bump chromium in DEPS to 117.0.5880.4

* chore: update patches

* 4658680: Convert /content/browser to use ARC

https://chromium-review.googlesource.com/c/chromium/src/+/4658680

* 4669995: Remove CFToNSCast and NSToCFCast

https://chromium-review.googlesource.com/c/chromium/src/+/4669995

* WIP: 4658680: Convert /content/browser to use ARC

https://chromium-review.googlesource.com/c/chromium/src/+/4658680

* chore: update printing patch after rebase

* chore: bump chromium in DEPS to 117.0.5882.0

* Revert "WIP: 4658680: Convert /content/browser to use ARC"

This reverts commit c8559ea448ad93123865a6fa8af6fe2767e43396.

* Revert "4669995: Remove CFToNSCast and NSToCFCast"

This reverts commit 38e145f33d844e077b09e1fb119fae9d5d7bbc3e.

* chore: bump chromium in DEPS to 117.0.5874.0

* 4661244: Convert /content/browser/renderer_host to use ARC

https://chromium-review.googlesource.com/c/chromium/src/+/4661244

* 4653209: Convert /ui/views:views to use ARC

https://chromium-review.googlesource.com/c/chromium/src/+/4653209

* chore: fixup mas_disable_remote_accessibility.patch

* chore: fixup render_widget_host_view_mac.patch

* chore: update to newer clang

* chore: bump chromium in DEPS to 117.0.5884.1

(cherry picked from commit a3879acfde8f3d962d58d6ad0632164ccb88ee63)

* 4669995: Remove CFToNSCast and NSToCFCast

https://chromium-review.googlesource.com/c/chromium/src/+/4669995
(cherry picked from commit 38e145f33d844e077b09e1fb119fae9d5d7bbc3e)
(cherry picked from commit b1224ab7e00aedbd0e5dc78ebb3c6162573b28c4)

* 4658680: Convert /content/browser to use ARC

https://chromium-review.googlesource.com/c/chromium/src/+/4658680
(cherry picked from commit 77039a323b9ebb3e8edb3a92a3b94a8d7d026a32)

* Rename and cleanup ExtensionsBrowserClient functions

| https://chromium-review.googlesource.com/c/chromium/src/+/4665670

(cherry picked from commit 677a2e646a8d82da60dc252b08b320c3ddff6be6)

* chore: bump chromium in DEPS to 117.0.5886.0

* chore: update patches

* Revert "chore: update patches"

This reverts commit db9294f9446492d4a3d63f5f3ecc551aeeeb2e26.

* Revert "chore: bump chromium in DEPS to 117.0.5886.0"

This reverts commit a7de0276e6e0eeecfdbb17f9bbc27c01b4bbfc24.

* build: use built toolchains instead of locally installed VSCode

* fixup: build: use built toolchains instead of locally installed VSCode

* chore: add missing mojo dep

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
electron-roller[bot] 2023-07-16 16:14:43 +02:00 committed by GitHub
parent f61425efdb
commit 9645f7f6d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
97 changed files with 632 additions and 589 deletions

View file

@ -748,20 +748,34 @@ if (is_mac) {
source_set("electron_lib_arc") {
include_dirs = [ "." ]
sources = [
"shell/browser/browser_mac.mm",
"shell/browser/mac/dict_util.h",
"shell/browser/mac/dict_util.mm",
"shell/browser/mac/electron_application.h",
"shell/browser/mac/electron_application.mm",
"shell/browser/mac/electron_application_delegate.h",
"shell/browser/mac/electron_application_delegate.mm",
"shell/browser/native_window_mac.h",
"shell/browser/native_window_mac.mm",
"shell/browser/ui/cocoa/electron_ns_window_delegate.h",
"shell/browser/ui/cocoa/electron_ns_window_delegate.mm",
]
deps = [
"buildflags",
"shell/common/api:mojo",
"//base",
"//skia",
"//third_party/electron_node:node_lib",
"//third_party/webrtc_overrides:webrtc_component",
"//v8",
]
configs += [ "//build/config/compiler:enable_arc" ]
configs += [
"//build/config/compiler:enable_arc",
"//electron/build/config:mas_build",
"//third_party/electron_node:node_internals",
]
}
}

2
DEPS
View file

@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'117.0.5852.0',
'117.0.5884.1',
'node_version':
'v18.16.1',
'nan_version':

View file

@ -38,7 +38,9 @@ environment:
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, tap"
GOMA_FALLBACK_ON_AUTH_FAILURE: true
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
DEPOT_TOOLS_WIN_TOOLCHAIN: 1
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
GYP_MSVS_HASH_27370823e7: 28622d16b1
PYTHONIOENCODING: UTF-8
matrix:

View file

@ -38,7 +38,9 @@ environment:
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, tap"
GOMA_FALLBACK_ON_AUTH_FAILURE: true
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
DEPOT_TOOLS_WIN_TOOLCHAIN: 1
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
GYP_MSVS_HASH_27370823e7: 28622d16b1
PYTHONIOENCODING: UTF-8
matrix:

View file

@ -127,10 +127,7 @@ filenames = {
"shell/browser/api/electron_api_system_preferences_mac.mm",
"shell/browser/api/electron_api_web_contents_mac.mm",
"shell/browser/auto_updater_mac.mm",
"shell/browser/browser_mac.mm",
"shell/browser/electron_browser_main_parts_mac.mm",
"shell/browser/mac/electron_application.h",
"shell/browser/mac/electron_application.mm",
"shell/browser/mac/in_app_purchase_observer.h",
"shell/browser/mac/in_app_purchase_observer.mm",
"shell/browser/mac/in_app_purchase_product.h",
@ -139,8 +136,6 @@ filenames = {
"shell/browser/mac/in_app_purchase.mm",
"shell/browser/native_browser_view_mac.h",
"shell/browser/native_browser_view_mac.mm",
"shell/browser/native_window_mac.h",
"shell/browser/native_window_mac.mm",
"shell/browser/notifications/mac/cocoa_notification.h",
"shell/browser/notifications/mac/cocoa_notification.mm",
"shell/browser/notifications/mac/notification_center_delegate.h",
@ -161,8 +156,6 @@ filenames = {
"shell/browser/ui/cocoa/electron_menu_controller.mm",
"shell/browser/ui/cocoa/electron_native_widget_mac.h",
"shell/browser/ui/cocoa/electron_native_widget_mac.mm",
"shell/browser/ui/cocoa/electron_ns_window_delegate.h",
"shell/browser/ui/cocoa/electron_ns_window_delegate.mm",
"shell/browser/ui/cocoa/electron_ns_panel.h",
"shell/browser/ui/cocoa/electron_ns_panel.mm",
"shell/browser/ui/cocoa/electron_ns_window.h",

View file

@ -92,6 +92,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__algorithm/pstl_for_each.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/pstl_frontend_dispatch.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/pstl_generate.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/pstl_is_partitioned.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/pstl_merge.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/pstl_replace.h",
"//buildtools/third_party/libc++/trunk/include/__algorithm/pstl_stable_sort.h",
@ -503,6 +504,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__memory/temp_value.h",
"//buildtools/third_party/libc++/trunk/include/__memory/temporary_buffer.h",
"//buildtools/third_party/libc++/trunk/include/__memory/uninitialized_algorithms.h",
"//buildtools/third_party/libc++/trunk/include/__memory/uninitialized_buffer.h",
"//buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h",
"//buildtools/third_party/libc++/trunk/include/__memory/uses_allocator.h",
"//buildtools/third_party/libc++/trunk/include/__memory/uses_allocator_construction.h",
@ -611,7 +613,6 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__ranges/common_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/concepts.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/container_compatible_range.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/copyable_box.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/counted.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/dangling.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/data.h",
@ -628,6 +629,7 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__ranges/istream_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/join_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/lazy_split_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/movable_box.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/non_propagating_cache.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/owning_view.h",
"//buildtools/third_party/libc++/trunk/include/__ranges/range_adaptor.h",
@ -675,7 +677,10 @@ libcxx_headers = [
"//buildtools/third_party/libc++/trunk/include/__system_error/error_code.h",
"//buildtools/third_party/libc++/trunk/include/__system_error/error_condition.h",
"//buildtools/third_party/libc++/trunk/include/__system_error/system_error.h",
"//buildtools/third_party/libc++/trunk/include/__thread/formatter.h",
"//buildtools/third_party/libc++/trunk/include/__thread/poll_with_backoff.h",
"//buildtools/third_party/libc++/trunk/include/__thread/this_thread.h",
"//buildtools/third_party/libc++/trunk/include/__thread/thread.h",
"//buildtools/third_party/libc++/trunk/include/__thread/timed_backoff_policy.h",
"//buildtools/third_party/libc++/trunk/include/__threading_support",
"//buildtools/third_party/libc++/trunk/include/__tree",

View file

@ -130,3 +130,4 @@ fix_crash_on_nativetheme_change_during_context_menu_close.patch
fix_select_the_first_menu_item_when_opened_via_keyboard.patch
fix_return_v8_value_from_localframe_requestexecutescript.patch
fix_harden_blink_scriptstate_maybefrom.patch
chore_add_buildflag_guard_around_new_include.patch

View file

@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 280c8b9d08a35c7fbe9e352f2f71ed104cbde955..12bbcb8518110a5f4873e4f4a89e43c8920ec7b6 100644
index a5a5cfcb4abda8c4642d2904728a882e1e85db23..f238d61c8e78ffdae82613133ba67b2a6a640b04 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -260,6 +260,10 @@ int GpuMain(MainFunctionParams parameters) {

View file

@ -23,10 +23,10 @@ index 103a9d9fb17e954ecaf0acecaa3eeafc23e39c94..de299316216dba204decba3b0eb57f5c
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 9a078bafa73976d9abb53a9a31ef8b30b1033a0c..3cccad1404a08e99e02f7a7d8f4f8ce7a803fed0 100644
index 84a3c22188a4dd94b9bd348f0be4a7bf532c46ba..deac08ba0dbd74c8bb6485b91447610e3c9f029a 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4438,6 +4438,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4477,6 +4477,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@ -40,7 +40,7 @@ index 9a078bafa73976d9abb53a9a31ef8b30b1033a0c..3cccad1404a08e99e02f7a7d8f4f8ce7
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 268c6c6f4b22c64ffcbaf715728e8da6f46d3b88..884b315d7fbdc57b20ee1508d352eb1e6825481e 100644
index 8c1f15b99b3b41b97d8ba54699b0ee77fbf35735..0db3fc212093fbf372c569db3db8d9ef1042fb32 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -611,6 +611,8 @@ class CONTENT_EXPORT RenderFrameImpl
@ -67,10 +67,10 @@ index 93acf68fbb7ff9b3bfc414a33fa1cdda4fe73bb1..90ec3437c2c94e87cfd0b25b200729c1
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index efaf1870cb579119724f0723ffae3165e0aec3c7..9ebd6fc8dd9084ff3c87c10be886e1dfc882d356 100644
index fbd5c929b323ee9d943615ed8c890d869345165d..af11f266db8d626dfbba6f16d0a906e643e8c337 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -198,6 +198,7 @@ void LocalWindowProxy::Initialize() {
@@ -200,6 +200,7 @@ void LocalWindowProxy::Initialize() {
}
InstallConditionalFeatures();

View file

@ -7,24 +7,24 @@ Ensure that licenses for the dependencies introduced by Electron
are included in `LICENSES.chromium.html`
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
index 2a6a4733128dfc5916163c1c91c26f27da1d2f0a..f248f68e22d94b5762f0a64e0fe6804eef1d61d1 100755
index dfb1bda193c8fae8aa21ef80a567628937365b9e..95159ef629d08256a6acc891e7df57f6631468be 100755
--- a/tools/licenses/licenses.py
+++ b/tools/licenses/licenses.py
@@ -413,6 +413,31 @@ SPECIAL_CASES = {
@@ -424,6 +424,31 @@ SPECIAL_CASES = {
"License": "Apache 2.0",
"License File": "/third_party/selenium-atoms/LICENSE.closure",
"License File": ["/third_party/selenium-atoms/LICENSE.closure"],
},
+ os.path.join('third_party', 'electron_node'): {
+ "Name": "Node.js",
+ "URL": "https://github.com/nodejs/node",
+ "License": "MIT",
+ "License File": "/third_party/electron_node/LICENSE",
+ "License File": ["/third_party/electron_node/LICENSE"],
+ },
+ os.path.join('third_party', 'squirrel.mac'): {
+ "Name": "Squirrel",
+ "URL": "https://github.com/Squirrel/Squirrel.Mac",
+ "License": "MIT",
+ "License File": "/third_party/squirrel.mac/LICENSE",
+ "License File": ["/third_party/squirrel.mac/LICENSE"],
+ },
+ os.path.join('third_party', 'squirrel.mac', 'vendor', 'mantle'): {
+ "Name": "Mantle",
@ -37,8 +37,8 @@ index 2a6a4733128dfc5916163c1c91c26f27da1d2f0a..f248f68e22d94b5762f0a64e0fe6804e
+ "URL": "https://github.com/ReactiveCocoa/ReactiveObjC",
+ "License": "MIT",
+ "License File":
+ "/third_party/squirrel.mac/vendor/ReactiveObjC/LICENSE.md",
+ ["/third_party/squirrel.mac/vendor/ReactiveObjC/LICENSE.md"],
+ },
}
# Soon-to-be-deprecated special value for 'License File' field used to indicate
# The delimiter used to separate license files specified in the 'License File'

View file

@ -84,10 +84,10 @@ index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..6bb4074e033e045de164bc776f75f152
// Visibility -----------------------------------------------------------
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index de21b67b41dc24626fdedd0b8f74e94bc37a64d9..779dc1c05a58f23517a9375bfed59b7e9337199e 100644
index 980108560a9d044be4f2feefa36a6d49e38bfc73..891f1f8f11b2bbdb19e260428f84ec658bfb166d 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3853,13 +3853,21 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3852,13 +3852,21 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}

View file

@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
index 73bdc6d0788463ef7a8656e8902fde62cbbb5464..7d49d9928fcbb23361a63eb458d6841e4adcbf41 100644
index ddd0810cdb1d4859052455e032e108cf89b41ef1..71f5a015c1313cb267d6801714e4eeff1f375e70 100644
--- a/ui/base/models/simple_menu_model.cc
+++ b/ui/base/models/simple_menu_model.cc
@@ -48,6 +48,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
@ -21,7 +21,7 @@ index 73bdc6d0788463ef7a8656e8902fde62cbbb5464..7d49d9928fcbb23361a63eb458d6841e
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
int command_id) const {
return ImageModel();
@@ -313,6 +318,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
@@ -333,6 +338,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
MenuItemsChanged();
}
@ -33,7 +33,7 @@ index 73bdc6d0788463ef7a8656e8902fde62cbbb5464..7d49d9928fcbb23361a63eb458d6841e
void SimpleMenuModel::SetMinorText(size_t index,
const std::u16string& minor_text) {
items_[ValidateItemIndex(index)].minor_text = minor_text;
@@ -406,6 +416,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
@@ -426,6 +436,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
return items_[ValidateItemIndex(index)].label;
}
@ -47,7 +47,7 @@ index 73bdc6d0788463ef7a8656e8902fde62cbbb5464..7d49d9928fcbb23361a63eb458d6841e
return items_[ValidateItemIndex(index)].minor_text;
}
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index 5ffe7891e71c24a0f31f758c1f467eff645bb658..7c4d37c8b05c64866bc41b38596ffb06e16d69f4 100644
index 37ae910505f1d9be97972718c160ff6ce5c979f4..ef38ce51995f07fd7a090f54387e1c6cd2f162ed 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@ -58,7 +58,7 @@ index 5ffe7891e71c24a0f31f758c1f467eff645bb658..7c4d37c8b05c64866bc41b38596ffb06
// Gets the icon for the item with the specified id.
virtual ImageModel GetIconForCommandId(int command_id) const;
@@ -168,6 +169,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -169,6 +170,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
// Sets the label for the item at |index|.
void SetLabel(size_t index, const std::u16string& label);
@ -68,7 +68,7 @@ index 5ffe7891e71c24a0f31f758c1f467eff645bb658..7c4d37c8b05c64866bc41b38596ffb06
// Sets the minor text for the item at |index|.
void SetMinorText(size_t index, const std::u16string& minor_text);
@@ -207,6 +211,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -208,6 +212,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
ui::MenuSeparatorType GetSeparatorTypeAt(size_t index) const override;
int GetCommandIdAt(size_t index) const override;
std::u16string GetLabelAt(size_t index) const override;
@ -76,7 +76,7 @@ index 5ffe7891e71c24a0f31f758c1f467eff645bb658..7c4d37c8b05c64866bc41b38596ffb06
std::u16string GetMinorTextAt(size_t index) const override;
ImageModel GetMinorIconAt(size_t index) const override;
bool IsItemDynamicAt(size_t index) const override;
@@ -246,6 +251,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -247,6 +252,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
int command_id = 0;
ItemType type = TYPE_COMMAND;
std::u16string label;

View file

@ -49,10 +49,10 @@ index 22c4d4e9718a503d9c7ca26a40c97149b0f8986a..6bdc2757c96a28022fda9e6f5e3b74a0
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 5e87e9b9d958de1c5ff9e36da7645415a2319c50..c0c82737679ea9b92fb3195c465bc1083e86e710 100644
index 3c3f6f7f920eb990de6a143807c520478ac9e842..3db87d746c1be999509e0cbabae6071878471b23 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -669,10 +669,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -665,10 +665,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@ -63,7 +63,7 @@ index 5e87e9b9d958de1c5ff9e36da7645415a2319c50..c0c82737679ea9b92fb3195c465bc108
if (!Client())
return false;
@@ -720,6 +716,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -716,6 +712,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View file

@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn
Build BoringSSL with some extra functions that nodejs needs.
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index 6fb13437c6bcca2aff102b04f3a46d2ad6a791c5..c61c60c7cb968c2b730a14de9ac0629aaceb73d3 100644
index 1aeccd473017be4f810317366d10402adeb6057c..9aba852521acd70c5bfbfaa559e2b409bc0c0068 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -49,6 +49,20 @@ config("no_asm_config") {

View file

@ -9,10 +9,10 @@ and can be removed when the crash in fork is resolved.
Related issue: https://github.com/electron/electron/issues/32718
diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni
index 0574216aabe93171e8f59eedc480178a0e1ac3ce..a6c5dc4b48b83c965e04fa0c31b36e009f76798f 100644
index 161dfbb8ab6071417202daeaa859951c3e59719b..94182390984fd2d4e8384b2476862373fc97afd0 100644
--- a/build_overrides/partition_alloc.gni
+++ b/build_overrides/partition_alloc.gni
@@ -51,7 +51,7 @@ _disable_partition_alloc_everywhere =
@@ -46,7 +46,7 @@ _disable_partition_alloc_everywhere =
if (is_ios) {
_is_partition_alloc_everywhere_platform = ios_partition_alloc_enabled
} else {

View file

@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 884bccba58c66861b43b3b50a7535cba543302e2..82e7bf534aa6b998cee8df53be3ca7db450f38c0 100644
index bfb799ebe63f9134604c1343a215405d0dff0cca..4d5d3b4876cab294d4347ffcf0c877811fa9aead 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -202,11 +202,16 @@ if (!is_android && !is_mac) {
@ -33,10 +33,10 @@ index 884bccba58c66861b43b3b50a7535cba543302e2..82e7bf534aa6b998cee8df53be3ca7db
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 34c95081fe1f74f75878135854cc2e776ddd4026..f32310c3869058bceb0ef803b6ff017038cfd7a7 100644
index a21ac39e8ad1f9c4d6dbc25e3ab3a077ce439920..ccdbcf77d4c6347099721af5106a7372e35e6779 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4602,7 +4602,7 @@ static_library("browser") {
@@ -4635,7 +4635,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
@ -46,10 +46,10 @@ index 34c95081fe1f74f75878135854cc2e776ddd4026..f32310c3869058bceb0ef803b6ff0170
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 3a6fba25d3badbce7da1ca27a38d65562dabc3c9..7ade86387a567de7689b10b2bce4c03dd930a7d2 100644
index a0568bdcc5b1722ceab811fea4b85788e202ce75..f640077ed4cfba57680647fd29ddf7f9004e49cf 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -6615,7 +6615,6 @@ test("unit_tests") {
@@ -6645,7 +6645,6 @@ test("unit_tests") {
deps += [
"//chrome:other_version",
@ -57,7 +57,7 @@ index 3a6fba25d3badbce7da1ca27a38d65562dabc3c9..7ade86387a567de7689b10b2bce4c03d
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -6641,6 +6640,10 @@ test("unit_tests") {
@@ -6671,6 +6670,10 @@ test("unit_tests") {
"//ui/resources",
]
@ -68,7 +68,7 @@ index 3a6fba25d3badbce7da1ca27a38d65562dabc3c9..7ade86387a567de7689b10b2bce4c03d
ldflags = [
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
@@ -7566,7 +7569,6 @@ test("unit_tests") {
@@ -7612,7 +7615,6 @@ test("unit_tests") {
}
deps += [
@ -76,7 +76,7 @@ index 3a6fba25d3badbce7da1ca27a38d65562dabc3c9..7ade86387a567de7689b10b2bce4c03d
"//chrome/browser/apps:icon_standardizer",
"//chrome/browser/apps/app_service",
"//chrome/browser/apps/app_service:test_support",
@@ -7653,6 +7655,10 @@ test("unit_tests") {
@@ -7698,6 +7700,10 @@ test("unit_tests") {
"//ui/webui/resources/js/browser_command:mojo_bindings",
]

View file

@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass
nan tests
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
index 306b38c22f23ea962b530c5569b52d76c69c2643..294176e4a8a8e5803d2be33f40fddd01bcd61136 100644
index 069fdba14a56808c8db3cf76c8245dff527b0add..4a20bed0985b0f4200a7e88f9f85ad93cb7dd6c3 100644
--- a/buildtools/third_party/libc++/BUILD.gn
+++ b/buildtools/third_party/libc++/BUILD.gn
@@ -44,7 +44,11 @@ config("winver") {

View file

@ -6,18 +6,10 @@ Subject: build: only use the mas build config in the required components
Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 7ea132b9a57dcd59e993a656973e40211c1528f1..f95939e8e6af4d38c5d6741e8366017d905eec90 100644
index eb9bc951061a48d25e4b87c8ba2c1740163f2a6c..042b9aa295c78246c907b560ba0401431230123d 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -228,6 +228,7 @@ if (is_apple) {
]
defines = [ "BASE_IMPLEMENTATION" ]
configs += [ "//build/config/compiler:enable_arc" ]
+ configs += [ "//electron/build/config:mas_build" ]
deps = [
"//base:base_static",
"//base/numerics:base_numerics",
@@ -1083,6 +1084,7 @@ component("base") {
@@ -1031,6 +1031,7 @@ component("base") {
"//build/config/compiler:prevent_unsafe_narrowing",
"//build/config/compiler:wexit_time_destructors",
"//build/config/compiler:wglobal_constructors",
@ -51,18 +43,10 @@ index 7ed10085264af6f50b05e51dd93c49e3828d5b3b..d8c77f52376a13af7636e64ff0b5cf58
if (is_win) {
diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn
index 3bc799978ea24e2f6e566dcc7f8638789e18d61d..cd8910dbc57813d41cd0fa28bb2ad61aaa014bc9 100644
index c52c741205d140fbe8b3be02974c89ea22c2365f..9460c656f71e24044ffccc55053a04b8f23f15e9 100644
--- a/components/remote_cocoa/app_shim/BUILD.gn
+++ b/components/remote_cocoa/app_shim/BUILD.gn
@@ -17,6 +17,7 @@ source_set("app_shim_arc") {
configs += [
":app_shim_warnings",
"//build/config/compiler:enable_arc",
+ "//electron/build/config:mas_build"
]
sources = [
"immersive_mode_controller.h",
@@ -56,6 +57,7 @@ component("app_shim") {
@@ -16,6 +16,7 @@ component("app_shim") {
assert(is_mac)
configs += [ ":app_shim_warnings" ]
@ -71,10 +55,10 @@ index 3bc799978ea24e2f6e566dcc7f8638789e18d61d..cd8910dbc57813d41cd0fa28bb2ad61a
"alert.h",
"alert.mm",
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 488abc9ed0d61a4b73f4bec34cbca416abfbf715..7b1b36d6ab787e2c43d7556b1e4bb1d39c279879 100644
index ebc723289104f2d6e0684586214cfeb7a64aeb69..2b708fe7ba36755f93816f8d19801bb06484e8c7 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -331,6 +331,7 @@ viz_component("service") {
@@ -332,6 +332,7 @@ viz_component("service") {
"frame_sinks/external_begin_frame_source_mac.h",
]
}
@ -82,9 +66,9 @@ index 488abc9ed0d61a4b73f4bec34cbca416abfbf715..7b1b36d6ab787e2c43d7556b1e4bb1d3
}
if (is_android || use_ozone) {
@@ -587,6 +588,8 @@ viz_source_set("unit_tests") {
"display_embedder/software_output_device_mac_unittest.mm",
@@ -589,6 +590,8 @@ viz_source_set("unit_tests") {
]
configs += [ "//build/config/compiler:enable_arc" ]
frameworks = [ "IOSurface.framework" ]
+
+ configs += ["//electron/build/config:mas_build"]
@ -92,7 +76,7 @@ index 488abc9ed0d61a4b73f4bec34cbca416abfbf715..7b1b36d6ab787e2c43d7556b1e4bb1d3
if (is_win) {
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 723e937150ce59cf72cc5800ca2af82b0686a534..a43e8995dab378fdb3a1774cbf91a273d2d98a6c 100644
index 9f8f97981311eb58ccc57118fdab978b080f34b6..cb0361c3ab6fed0b397909210692bfe4dec4cc96 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -56,6 +56,7 @@ source_set("browser") {
@ -128,7 +112,7 @@ index 65714a5dca013794527640645d8eb2ce36049ac6..b2df50b4cd64816ddf9c5b7e222c47b6
public_deps = [
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index d0c494bb1943b6f634f703b6f1a697cc3a105b91..601535c2483b9385f9f7866c496d4c4a16ae1ffc 100644
index 3ae0f5f3a941a4edfb73c9d1b6ebf87c6ec2cc62..136b36295e669f423a6539a444b4de42c26c81cb 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -475,6 +475,7 @@ static_library("test_support") {
@ -140,10 +124,10 @@ index d0c494bb1943b6f634f703b6f1a697cc3a105b91..601535c2483b9385f9f7866c496d4c4a
public_deps = [
diff --git a/content/web_test/BUILD.gn b/content/web_test/BUILD.gn
index 9d47887dd255187ffe49f5d9dbd01aff5b1de15e..7cde88462e0fc57f9f19badbf1042153708ed423 100644
index 2b276af9c910c21db947469ef8b4ebb74c4f74e9..28a16ada8d70758b6feb90a8a1269e4bae5fc389 100644
--- a/content/web_test/BUILD.gn
+++ b/content/web_test/BUILD.gn
@@ -143,6 +143,8 @@ static_library("web_test_browser") {
@@ -145,6 +145,8 @@ static_library("web_test_browser") {
"browser/web_test_tts_platform.h",
]
@ -165,17 +149,17 @@ index 52940b9bc43aa96dc0a7f90e63ec123ca41c5fab..7c71b07ca2d4b1418b305e876b6be519
if (is_mac) {
diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn
index ed977f540a2920858a05292f823bf49c669aa6d2..9acd66a086654d77f2a2f84b917795197ac12810 100644
index 5cd85e75040ab619eed724eace4ade1e10b0f4bb..d95c2bb18c624054f2b0702a4fbc339e7aa3c98b 100644
--- a/gpu/ipc/service/BUILD.gn
+++ b/gpu/ipc/service/BUILD.gn
@@ -130,6 +130,7 @@ component("service") {
@@ -135,6 +135,7 @@ component("service") {
"QuartzCore.framework",
]
defines += [ "GL_SILENCE_DEPRECATION" ]
+ configs += ["//electron/build/config:mas_build"]
}
if (is_ios) {
sources += [
sources += [ "image_transport_surface_ios.mm" ]
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
index fbed855d14713ec3507b62d86d37b7be9969581e..b08bdea30ad4e5caf26f59c66c34fd63cd6207e4 100644
--- a/media/audio/BUILD.gn
@ -230,7 +214,7 @@ index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a980
source_set("sandbox_unittests") {
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
index cec00272736c844246aabbf688b13d631af41236..82de763b603baf242aec6c82ac20e3abc8bf808f 100644
index 670903698c899df678a16218d8c373d94a7f2b9e..15c0c7125434c13c5a4b8c74dee937f542cc16fd 100644
--- a/third_party/blink/renderer/core/BUILD.gn
+++ b/third_party/blink/renderer/core/BUILD.gn
@@ -308,6 +308,7 @@ component("core") {
@ -242,10 +226,10 @@ index cec00272736c844246aabbf688b13d631af41236..82de763b603baf242aec6c82ac20e3ab
public_deps = [
":core_generated",
diff --git a/ui/accelerated_widget_mac/BUILD.gn b/ui/accelerated_widget_mac/BUILD.gn
index 7637db0ce03b9e8d242e47f5aff85c21967a541f..e66fdb98adb035a917942432806e0dfaff19e471 100644
index d361b9686e66014f2333f8a4f6b6819bb52ececd..a67c517acbd1d25fe1ac114ef3ca8d481b2184ad 100644
--- a/ui/accelerated_widget_mac/BUILD.gn
+++ b/ui/accelerated_widget_mac/BUILD.gn
@@ -32,6 +32,8 @@ component("accelerated_widget_mac") {
@@ -35,6 +35,8 @@ component("accelerated_widget_mac") {
"QuartzCore.framework",
]
@ -255,10 +239,10 @@ index 7637db0ce03b9e8d242e47f5aff85c21967a541f..e66fdb98adb035a917942432806e0dfa
sources += [ "ca_layer_frame_sink_provider.h" ]
}
diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn
index 46dedcc0be88eb0abe461efef1f99928397d6d89..ac2711e76aebb765a14794d550f6ef7e5cf740f4 100644
index 0d3fdc9b8cdff853b54e413de98800142be332d2..de65225a25ce6d6d3ff531c5c53d225993f7170a 100644
--- a/ui/accessibility/platform/BUILD.gn
+++ b/ui/accessibility/platform/BUILD.gn
@@ -248,6 +248,7 @@ component("platform") {
@@ -253,6 +253,7 @@ component("platform") {
weak_frameworks = [
"Accessibility.framework", # macOS 11
]
@ -267,7 +251,7 @@ index 46dedcc0be88eb0abe461efef1f99928397d6d89..ac2711e76aebb765a14794d550f6ef7e
if (use_atk) {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index e6a0ca42d0fa2446b300714372986da7e2013f16..fd651028ead9103dabcbb3686e412c12ba8e7952 100644
index 7d0a002dba31c5e5bdc4bbec0ef396280f0f3d89..fe61909e6228b8c2f982035ef2ccee2bef45e4e3 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -355,6 +355,7 @@ component("base") {
@ -279,7 +263,7 @@ index e6a0ca42d0fa2446b300714372986da7e2013f16..fd651028ead9103dabcbb3686e412c12
if (is_apple) {
diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn
index e7e52516cec15d41abb9f9c9458c5f3420de7dc0..2e13ca6442c616944577b3374fae082554e585c0 100644
index 11ff80e18ea42b290f96a90fecb9cfbc0f78a51c..6a01260f2ad2e9e8c05a4a44613bdf2a75c2a8ea 100644
--- a/ui/display/BUILD.gn
+++ b/ui/display/BUILD.gn
@@ -67,6 +67,10 @@ component("display") {
@ -294,10 +278,10 @@ index e7e52516cec15d41abb9f9c9458c5f3420de7dc0..2e13ca6442c616944577b3374fae0825
if (is_win) {
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
index f5038c6478eeccc17e061681dbee0f384dac4911..bf23c3576bb7b2d10a840e6eb2a420b739b4f4d7 100644
index e66e2339ea3cb8b2b80ef3f0b09dcc53a2240339..07e11afb172ecbb24c04f25f87c11bdc5c91cd58 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -193,6 +193,7 @@ component("gfx") {
@@ -194,6 +194,7 @@ component("gfx") {
"scoped_ns_graphics_context_save_gstate_mac.h",
"scoped_ns_graphics_context_save_gstate_mac.mm",
]
@ -306,10 +290,10 @@ index f5038c6478eeccc17e061681dbee0f384dac4911..bf23c3576bb7b2d10a840e6eb2a420b7
if (is_win) {
sources += [
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index c2c93302e51f629594583e5c2f2b89fe084f819e..363892cfe0d359579cff47f85a0bc60794cee22f 100644
index a7d46bc8bbf09db6d96a2139850ca940a79ea4b5..a1579cb5aef391480d511ad1541302c19cde0e65 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -682,6 +682,7 @@ component("views") {
@@ -686,6 +686,7 @@ component("views") {
"IOSurface.framework",
"QuartzCore.framework",
]
@ -317,7 +301,7 @@ index c2c93302e51f629594583e5c2f2b89fe084f819e..363892cfe0d359579cff47f85a0bc607
}
if (is_win) {
@@ -1098,6 +1099,8 @@ source_set("test_support") {
@@ -1102,6 +1103,8 @@ source_set("test_support") {
"//testing/gtest",
]
@ -327,14 +311,18 @@ index c2c93302e51f629594583e5c2f2b89fe084f819e..363892cfe0d359579cff47f85a0bc607
sources += [
"test/desktop_window_tree_host_win_test_api.cc",
diff --git a/ui/views/controls/webview/BUILD.gn b/ui/views/controls/webview/BUILD.gn
index e3dd4fab3a1cac0138f8dac60247e0ea3343e87e..61ce57a66ec9d686816446c7f05ce82ee7ee442e 100644
index 349d94b5b14e346d5bb73b53567fbfee12198dc6..998178845e241c8b45a3ef8ad542d10a4e687831 100644
--- a/ui/views/controls/webview/BUILD.gn
+++ b/ui/views/controls/webview/BUILD.gn
@@ -19,6 +19,7 @@ component("webview") {
@@ -19,7 +19,10 @@ component("webview") {
if (is_mac) {
sources += [ "unhandled_keyboard_event_handler_mac.mm" ]
+ configs += ["//electron/build/config:mas_build"]
- configs += [ "//build/config/compiler:enable_arc" ]
+ configs += [
+ "//build/config/compiler:enable_arc",
+ "//electron/build/config:mas_build",
+ ]
}
if (is_win) {

View file

@ -9,10 +9,10 @@ potentially prevent a window from being created.
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
index 4b0be7f7f79de3f7aa4d7ce5ee2b267da8f558e2..b52964fe166e60d5104cabc524a0b36502839927 100644
index ce2480803d2fcacedc93e11dd61457d2fca30ed4..99fb67d9d2e9c0018fef2df765de1d8546bbb93d 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -7844,6 +7844,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -8000,6 +8000,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@ -21,10 +21,10 @@ index 4b0be7f7f79de3f7aa4d7ce5ee2b267da8f558e2..b52964fe166e60d5104cabc524a0b365
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 010061b7efaf3ae52eb9cc5509976bcf711e0cbe..e1650b721e8c0c444347879f324014becc7f8223 100644
index 9c371b7c539fc3ce703215d84588fdaafe2bb102..2b888be4850f4fad3bb9c43102dbb4da57227208 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4207,6 +4207,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4257,6 +4257,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
auto* new_contents_impl = new_contents.get();
@ -37,7 +37,7 @@ index 010061b7efaf3ae52eb9cc5509976bcf711e0cbe..e1650b721e8c0c444347879f324014be
// 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
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -4248,12 +4254,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4298,12 +4304,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@ -51,10 +51,10 @@ index 010061b7efaf3ae52eb9cc5509976bcf711e0cbe..e1650b721e8c0c444347879f324014be
new_contents_impl, opener, params.target_url,
params.referrer.To<Referrer>(), params.disposition,
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 455703114d540328fafccdec7c9caafa838fdbee..5e37edd4295b501b21d5fe1cad31c9930e96a9f9 100644
index b0b0236d58b97bae0c80998c5eff4ede5879de00..c92546b9853219bf601f550416ce392aad399bbf 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -605,6 +605,10 @@ struct CreateNewWindowParams {
@@ -619,6 +619,10 @@ struct CreateNewWindowParams {
// The navigation initiator's user activation and ad status.
blink.mojom.NavigationInitiatorActivationAndAdStatus
initiator_activation_and_ad_status;
@ -66,10 +66,10 @@ index 455703114d540328fafccdec7c9caafa838fdbee..5e37edd4295b501b21d5fe1cad31c993
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 36989f60674cb05aedfdd391d445b00e57369dd6..bf36e251479c6c205aaa4257ccc9cbc1be3ed306 100644
index 13db98964e6576de3aba7b9162f8fa70b7e25dd9..f306edea7dc1123e2cf5be895874361f144cdfcf 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -666,6 +666,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -672,6 +672,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -79,7 +79,7 @@ index 36989f60674cb05aedfdd391d445b00e57369dd6..bf36e251479c6c205aaa4257ccc9cbc1
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 359fb9cb9bd508e4ebb0116a370e9c83bd078ccc..3ce0a6acc811d0dd46fc341ef0ce88ae123a4e62 100644
index 421df3e1f6d23bee5e47dfade763c507eeccf53e..48efe9da1fe1234162b9f9d3909630d5b04897b5 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -169,6 +169,7 @@ class NetworkService;
@ -90,7 +90,7 @@ index 359fb9cb9bd508e4ebb0116a370e9c83bd078ccc..3ce0a6acc811d0dd46fc341ef0ce88ae
} // namespace network
namespace sandbox {
@@ -1077,6 +1078,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1087,6 +1088,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -148,10 +148,10 @@ index c5bda327264c330345baf7b44b4ba5c478e58952..989778079d5dc91127989e43f3ce6b25
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 09d28c8993294d134e983fe96be8b63029b9a5ff..9a078bafa73976d9abb53a9a31ef8b30b1033a0c 100644
index b992054d64fd8acc8bbc8433726a8d1016365aa3..84a3c22188a4dd94b9bd348f0be4a7bf532c46ba 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6316,6 +6316,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6355,6 +6355,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
blink::GetNavigationInitiatorActivationAndAdStatus(
request.HasUserGesture(), GetWebFrame()->IsAdScriptInStack());
@ -163,10 +163,10 @@ index 09d28c8993294d134e983fe96be8b63029b9a5ff..9a078bafa73976d9abb53a9a31ef8b30
// moved on send.
bool is_background_tab =
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
index e4ee6ba03a5683ce7b1a72ac643b5b2520a2f998..44ac0ad92d22b2db8992c67910e420029f005433 100644
index e0f55d75e7f39425c72a01a8117c3671a1ff98e3..2697f6e2a6343aa87d84fc6b87357787e9e57173 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -504,6 +504,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -505,6 +505,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -176,10 +176,10 @@ index e4ee6ba03a5683ce7b1a72ac643b5b2520a2f998..44ac0ad92d22b2db8992c67910e42002
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
index d17a2d7f09d1899f2e8888c4747ecffbc5b5ff9a..894795fe392013e66513f1f578970908ec652d5d 100644
index e6b2df55b872f4cf7208aaa5755955a27e0c3eef..57a7944e476f5a287447467134f2d7a83de024a6 100644
--- a/content/web_test/browser/web_test_content_browser_client.h
+++ b/content/web_test/browser/web_test_content_browser_client.h
@@ -83,6 +83,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -84,6 +84,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -210,10 +210,10 @@ index bef5a989bac50c177f15f52fe87ac3790d553e85..65dcd2e3b51929400c8bfb6a98a4fb59
} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
index 710c475946e9512db62ec049dc11f22acc74678b..3ce044d008b2f56c4d76bdbd59e99dff09aefd21 100644
index 674d053ca30dfd4e4979e9378a5c67f3b56a407a..9996267c84bd44ea4e6abd807736b73d0a13b2fc 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2194,6 +2194,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2192,6 +2192,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);

View file

@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Wed, 5 Jul 2023 16:28:30 -0500
Subject: chore: add BUILDFLAG guard around new include
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4628373
This is an experimental commit; but if it's successful,
This patch should be upstreamed and then removed from electron's code.
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index e149a732b5d0652c87c7a9dd24119561ffa2401f..b86f1ed64c586ef6add9c2c0ab383dffdaf67439 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -43,7 +43,6 @@
#include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"
#include "chrome/common/buildflags.h"
#include "components/infobars/core/infobar_container.h"
-#include "components/segmentation_platform/public/result.h"
#include "components/user_education/common/feature_promo_controller.h"
#include "components/user_education/common/feature_promo_handle.h"
#include "components/webapps/browser/banners/app_banner_manager.h"
@@ -62,6 +61,10 @@
#include "ui/views/widget/widget_observer.h"
#include "ui/views/window/client_view.h"
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+#include "components/segmentation_platform/public/result.h"
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ui/compositor/throughput_tracker.h"
#endif

View file

@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
Makes things like "git status" quicker when developing electron locally
diff --git a/.gitignore b/.gitignore
index 7141c8b3de3bc419d536499ce775d98b619a7bdb..d316050668a44ccfd033a56cd1de490176759740 100644
index bd657c899e9e3bd234a77b592ee0dc12d94fb646..0c2661706a0801acb08eb98c649823f3cd66941d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -240,6 +240,7 @@ vs-chromium-project.txt
@@ -241,6 +241,7 @@ vs-chromium-project.txt
/delegate_execute
/device/serial/device_serial_mojo.xml
/docs/website
@ -18,7 +18,7 @@ index 7141c8b3de3bc419d536499ce775d98b619a7bdb..d316050668a44ccfd033a56cd1de4901
/google_apis/internal
/googleurl
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 971a366f4db719ac6893bac6d6bf27cc5c8c458f..f6044f9457967fb8dd77038d9b14b0e24c1d96ad 100644
index 71fde6424ea0c2220cb79c5c170275874373722b..9fc6e97aa109be0c455614c10bf4bb5c21302fc1 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -94,6 +94,7 @@

View file

@ -34,10 +34,10 @@ index 2e4bacce52a45b5d9d7829c1f88f82aa0bb1b4bb..f3537e89191bd2c6d9b06c9b741a1680
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 86ee9cae68bfbccc1eec83422c3a62db4eecf536..8099940abae264e80eef29b2fa6227a28b801500 100644
index 68953ca1a30ef5a497e6e4708f9e6891d4511e6e..24b6bb99bd477eeb7ed2e672df3327dcd3ea5d7b 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3229,15 +3229,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3246,15 +3246,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
SetMsgHandled(FALSE);
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.

View file

@ -99,7 +99,7 @@ index 9125b6d7e3e8771458eaa1675bf0dac8f53f7be2..11fbe3bb7d9ee7b0b1c594c5ae325733
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 2cbbda0614965a9f78c7e682d9fe41e1958a59ec..222a88cd616c673cfe8016ca01127e92c1475bb8 100644
index 55d2b674f847b9e1eddc08b32ae46503cadb1df5..0c20fa453f36cd6bec50bb704f07ba0e543f9379 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -864,8 +864,7 @@ class Browser : public TabStripModelObserver,
@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7
void AddNewContents(content::WebContents* source,
std::unique_ptr<content::WebContents> new_contents,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3c3c9912b747f4b5f4b8b72f070f39de66c21bfd..a8dfcc826dd3a74c15e2699a59bde9e9867cc69e 100644
index 4893c65e3046b393532bbd2f372c4321a6e87560..a974151f5880e1a78d5cde849b637e2d512a3d78 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4114,8 +4114,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4164,8 +4164,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,

View file

@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 336705c28ca960d8e7d9af82bb56b009e49bc733..af5406b48c11ea859805a46b1167f475825cacca 100644
index a294093a5534d9602b76f8496e6d5f8d4b10c96e..22245a4c2204b9965fd39e93ed48fc3e32df463e 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -39,6 +39,7 @@
@ -102,10 +102,10 @@ index d4bb0e9a017a833b403916e1d6e64fb058f40f86..35ba35a95e39700824d6e0b480b99bc3
friend class ContentClientCreator;
friend class ContentClientInitializer;
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 4c2a4783f894c2dc62d87dfc51e2ebb8a0b51b2e..603fab0ef4b7f15a94805f897369d0940eeb1042 100644
index 3914c2b9bfa945b0baf1a40970b592cec1a91dc7..ae0c94535c027850a44afffa7593205987d29a2c 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -532,8 +532,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
@@ -533,8 +533,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
@ -115,7 +115,7 @@ index 4c2a4783f894c2dc62d87dfc51e2ebb8a0b51b2e..603fab0ef4b7f15a94805f897369d094
if (g_mapped_snapshot) {
// TODO(crbug.com/802962): Confirm not loading different type of snapshot
// files in a process.
@@ -542,10 +541,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
@@ -543,10 +542,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
base::MemoryMappedFile::Region file_region;
base::File file =

View file

@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 698c94642b98b03570fef8f7a5956486eacacbdc..7983abad9a78a115dfd7b9513c6f57be2cd40811 100644
index e22a9f481b83e04e923cbf4d6878416b958af5c6..855732eedaeef2790fb79102a5778d1226ee192d 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1839,6 +1839,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1852,6 +1852,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
loader_factory_bundle_info =
context()->loader_factory_bundle_for_update_check()->Clone();
@ -38,7 +38,7 @@ index 698c94642b98b03570fef8f7a5956486eacacbdc..7983abad9a78a115dfd7b9513c6f57be
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
browser_context(), scope_origin)) {
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
@@ -1858,9 +1878,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1871,9 +1891,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeScheme) &&
scope.scheme_piece() == kChromeUIScheme) {
config->RegisterURLDataSource(browser_context());
@ -49,7 +49,7 @@ index 698c94642b98b03570fef8f7a5956486eacacbdc..7983abad9a78a115dfd7b9513c6f57be
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
browser_context(), kChromeUIScheme,
base::flat_set<std::string>()));
@@ -1868,9 +1886,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1881,9 +1899,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeUntrusted) &&
scope.scheme_piece() == kChromeUIUntrustedScheme) {
config->RegisterURLDataSource(browser_context());

View file

@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 256f599f8ad93578a7b56697070b1d0630b04897..3c1723ed20ab6a673df7e0ebf0119c2150b472bf 100644
index 394d0a39a6c86c68c868eeca0e0d9a4108e1dafc..a1b91f3ce3e28cb7afc7bae7a3eef0fdc5b6f292 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1868,6 +1868,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -1867,6 +1867,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
gfx::ContentColorUsage content_color_usage) const {
TargetColorParams params;
@ -35,10 +35,10 @@ index 256f599f8ad93578a7b56697070b1d0630b04897..3c1723ed20ab6a673df7e0ebf0119c21
// If we are likely to software composite the resource, we use sRGB because
// software compositing is unable to perform color conversion.
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 0d966e045669ee0423d6a486fa8e619938a32de2..1e46ecc1aa8447b3fd0f4e5a66f92ca5ef148887 100644
index 46ea5b77442eb577de068ee90f06fe55733ee93e..f832306bc4a38b743cff2eb525badb7e383a8241 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -96,6 +96,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -102,6 +102,8 @@ class CC_EXPORT LayerTreeSettings {
bool use_rgba_4444 = false;
bool unpremultiply_and_dither_low_bit_depth_tiles = false;
@ -48,19 +48,19 @@ index 0d966e045669ee0423d6a486fa8e619938a32de2..1e46ecc1aa8447b3fd0f4e5a66f92ca5
// Image Decode Service and raster tiles without images until the decode is
// ready.
diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h
index a398a5d597946d804fff199859f85e03ff9960fc..621d08a28c5f1967343669bc805f7fb8a0ffb24d 100644
index 66564fbc928d28af97d7afaa2cfea03ce7ebc04c..cdd32d25eab50cbc2910f92eca92b9f6c8c7b5fe 100644
--- a/components/viz/common/display/renderer_settings.h
+++ b/components/viz/common/display/renderer_settings.h
@@ -24,6 +24,7 @@ class VIZ_COMMON_EXPORT RendererSettings {
RendererSettings(const RendererSettings& other);
~RendererSettings();
bool apply_simple_frame_rate_throttling = false;
+ bool enable_color_correct_rendering = true;
bool allow_antialiasing = true;
bool force_antialiasing = false;
bool force_blending_with_shaders = false;
diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc
index c7ca2458708dd9577afdaef7fbcafaaa68046904..c4a1f1368ef053830c86cf86c3bec7ced31730d3 100644
index e4deb71ea3afa1ef9d6ddac9c61f5916ff608514..d2e6854ac2aaa3cc83c0b72ebc03193b5dc54149 100644
--- a/components/viz/host/renderer_settings_creation.cc
+++ b/components/viz/host/renderer_settings_creation.cc
@@ -17,6 +17,7 @@
@ -81,7 +81,7 @@ index c7ca2458708dd9577afdaef7fbcafaaa68046904..c4a1f1368ef053830c86cf86c3bec7ce
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index b7df289e4546fd5d33266223f4b678c1ab0e26e2..af4fdec439ebe630d43a60cfa53d3addfca052bd 100644
index 7891c0d116ef4e9b080746698be0c71b6f9a8595..e5a2ac168bf1fdbfc2c0c64f5c8b03efb56db347 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@ -93,10 +93,10 @@ index b7df289e4546fd5d33266223f4b678c1ab0e26e2..af4fdec439ebe630d43a60cfa53d3add
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
sandbox::policy::switches::kGpuSandboxFailuresFatal,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 865769b29edd5b2651f3baaecca2d0fcfde9ab8d..79b6dacb1e1cf198d8deeda0ff85ae8277282d50 100644
index 37fdd04d9738c699db8c9140600f90e8523de93e..945ba0d61888d8c9f4eb139246150c4fd180e5ab 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3517,6 +3517,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3527,6 +3527,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
// Propagate the following switches to the renderer command line (along
// with any associated values) if present in the browser command line.
static const char* const kSwitchNames[] = {
@ -105,7 +105,7 @@ index 865769b29edd5b2651f3baaecca2d0fcfde9ab8d..79b6dacb1e1cf198d8deeda0ff85ae82
sandbox::policy::switches::kDisableSeccompFilterSandbox,
sandbox::policy::switches::kNoSandbox,
diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
index 318005b66e04ed03ce6d44931d9360c0e009cb94..0d622fddb95720141ccf8a285ace47142060c9d1 100644
index 6892376fa33d006453977c354734d880a7ef7c91..4cd7b762d5fe1c54f5b06cc0d8f50560d6431a2f 100644
--- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
+++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
@@ -4,6 +4,7 @@
@ -114,9 +114,9 @@ index 318005b66e04ed03ce6d44931d9360c0e009cb94..0d622fddb95720141ccf8a285ace4714
+#include "base/command_line.h"
#include "cc/paint/skia_paint_canvas.h"
#include "components/viz/common/resources/resource_format_utils.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
@@ -12,6 +13,7 @@
#include "third_party/khronos/GLES2/gl2.h"
@@ -11,6 +12,7 @@
#include "third_party/khronos/GLES3/gl3.h"
#include "third_party/skia/include/core/SkSurfaceProps.h"
#include "ui/gfx/color_space.h"
@ -124,7 +124,7 @@ index 318005b66e04ed03ce6d44931d9360c0e009cb94..0d622fddb95720141ccf8a285ace4714
namespace blink {
@@ -19,6 +21,10 @@ namespace blink {
@@ -18,6 +20,10 @@ namespace blink {
// Level 4 specification.
gfx::ColorSpace PredefinedColorSpaceToGfxColorSpace(
PredefinedColorSpace color_space) {
@ -135,7 +135,7 @@ index 318005b66e04ed03ce6d44931d9360c0e009cb94..0d622fddb95720141ccf8a285ace4714
switch (color_space) {
case PredefinedColorSpace::kSRGB:
return gfx::ColorSpace::CreateSRGB();
@@ -118,6 +124,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
@@ -117,6 +123,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
}
gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const {
@ -148,10 +148,10 @@ index 318005b66e04ed03ce6d44931d9360c0e009cb94..0d622fddb95720141ccf8a285ace4714
}
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
index 2a31606b1f5814d57ffe59026cc5735fa7cee597..272ae9f414f8d0873e30479b5bfd237c13a69dd9 100644
index 59c0bf7f6d4a7b4206d9e588b460ebe40ccbef11..f0c06b9cfb4febf4d80c6d22c2505ef20a263e26 100644
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
@@ -25,6 +25,7 @@
@@ -30,6 +30,7 @@
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "ui/base/ui_base_features.h"
#include "ui/base/ui_base_switches.h"
@ -159,7 +159,7 @@ index 2a31606b1f5814d57ffe59026cc5735fa7cee597..272ae9f414f8d0873e30479b5bfd237c
#include "ui/native_theme/native_theme_features.h"
#include "ui/native_theme/overlay_scrollbar_constants_aura.h"
@@ -210,6 +211,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
@@ -240,6 +241,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
settings.main_frame_before_activation_enabled =
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
@ -170,7 +170,7 @@ index 2a31606b1f5814d57ffe59026cc5735fa7cee597..272ae9f414f8d0873e30479b5bfd237c
// is what the renderer uses if its not threaded.
settings.enable_checker_imaging =
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index 4336e255385b4f5ec86e7bfa710b5caaf22adb6b..578ea22f1c29512fd58e631629d5ee03aeb10b38 100644
index 487e029c46d9b516740abf4f9b8acb4db4d8426f..038f3d77b18e98f8a328d79cd8a8197d20733f7a 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -20,6 +20,7 @@
@ -196,7 +196,7 @@ index 4336e255385b4f5ec86e7bfa710b5caaf22adb6b..578ea22f1c29512fd58e631629d5ee03
// Allow but ignore invalid color spaces.
if (!color_space.IsValid())
return true;
@@ -319,6 +328,15 @@ base::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
@@ -317,6 +326,15 @@ base::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
DCHECK_EQ(kIOReturnSuccess, r);
}

View file

@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 4dce73888703a5db8fe7ae2a0e0745ee813ab9b0..e995e9b652397a67ca0b89e107975ab04bae7725 100644
index 726d2c933c8f72ae364ce55c76abeec33caaa2b5..82546a3dc008276ad2fe5e792d3202953cd2adf8 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -528,7 +528,11 @@
@@ -532,7 +532,11 @@
return;
host()->WasHidden();

View file

@ -6,7 +6,7 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 95d27f99acc0e59c8660054eea9e2b221af0e0f3..2d705b183b1014a6f8dc89672b327d619ac52b1a 100644
index f54d14751b4885b2fa6483e81aaa8f495cc1fc8c..025965f6171b3ddd77d6adcf4eb4c711544c81db 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -800,6 +800,9 @@ void RenderWidgetHostImpl::WasHidden() {
@ -33,7 +33,7 @@ index e74883df0950b2e462a7ebdde8a476259cf0f231..3033d9d9efd3302fba1698a8b8f549c4
protected:
// |routing_id| must not be MSG_ROUTING_NONE.
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 c01cc787de463b8dc7afb633c939c5b7afbdf822..97840e12fee6f7b378d812d8906a780be52bdf90 100644
index fc773d1601a7fae8bf4a70b0d277f36e1f091a6f..02a3d39508397e90133eb4adad79515d507f14ea 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -606,7 +606,7 @@ void RenderWidgetHostViewAura::HideImpl() {

View file

@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
should continue seeking for a real fix.
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
index 1fbe639e7ed61da629920bd5271cc7404054ee56..4bb33afce9b885b343bea523d819c2a76f6108ff 100644
index 91a343f61358f6328098d4d9f66aa6ccca3a0186..2824634af8d01fac7e658fa7435bb2f64c7b1f6b 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1282,6 +1282,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1297,6 +1297,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@ -35,7 +35,7 @@ index 1fbe639e7ed61da629920bd5271cc7404054ee56..4bb33afce9b885b343bea523d819c2a7
// If this is a same-process navigation and we have timestamps for unload
// durations, fill those metrics out as well.
if (params.unload_start && params.unload_end &&
@@ -1331,6 +1332,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1346,6 +1347,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

View file

@ -19,10 +19,10 @@ index 53c1d25e3f56daa9d7929089620c9df7971ceda6..d90c652d7c572686bf54c4d282960ea4
excluded_margin);
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index f13408019906af072686001c63d9d2782daa5179..e7dea84e6302ffd5d8824755e3cbf51766418a61 100644
index a1bd556e733fa7984effd2a43c810e3ebb6dc7da..f382e6eec48440eefb9a91642792cbf21a504275 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1141,8 +1141,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
@@ -1154,8 +1154,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
const gfx::Size& excluded_margin) {

View file

@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index ea54a2ac9530b2872ecb213c6057a5f0abfb1c08..73171e36a08fbff64f64f6eecc5a75916b206cff 100644
index 9f677b43d5cde549045bd0cf54e4ca0ba2faa9fb..6f11aaeb534c23db8cd575a8717dc06bac29f6be 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1490,6 +1490,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1504,6 +1504,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@ -51,10 +51,10 @@ index ea54a2ac9530b2872ecb213c6057a5f0abfb1c08..73171e36a08fbff64f64f6eecc5a7591
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index f10414f382b48ecc162b22d9638d948e3e719733..47d13dbe9efd501efabe096607e53cb80744cd42 100644
index c0b9be2dcf8ea32af184e7bb93a1577ae369ee27..03960c8074910b17bf8be49c0f477e92ed192c6f 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -316,6 +316,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -317,6 +317,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override;
@ -63,10 +63,10 @@ index f10414f382b48ecc162b22d9638d948e3e719733..47d13dbe9efd501efabe096607e53cb8
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CHROMEOS)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 1ced7811390f72e4c29d998dadcc8c92fbeea818..9e16219871c14d135a4ce2902bc96b3a36f906da 100644
index 5551b9a414585a2f303d1368a83871b98ec46232..6a1a39daf2ef0fecef686d08811844fd0a632b31 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1163,6 +1163,9 @@ interface NetworkContext {
@@ -1213,6 +1213,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);
@ -77,7 +77,7 @@ index 1ced7811390f72e4c29d998dadcc8c92fbeea818..9e16219871c14d135a4ce2902bc96b3a
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index cb96f73d57ba886ecb2f5a55244e5aa40b0e6c2d..2f5a09ea09c8cdea901c27c06a154b19c00b852d 100644
index bddc13960e66d6190366637fb1ad1e49731f2100..7385408d9d9cf08567b829c68e96bc462101393c 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -144,6 +144,7 @@ class TestNetworkContext : public mojom::NetworkContext {

View file

@ -6,7 +6,7 @@ Subject: expose V8Initializer::CodeGenerationCheckCallbackInMainThread
This is needed to blend Blink and Node's policy for code generation policy.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 6cc93de0150bebc10cee83aadc3a643eb8e84ce7..ec992270b6aa54e4507ad0bad501793f72353834 100644
index 4a0ae5a492e35b8f11d9f4f98083a63050e0bbe0..653eaaddb8bd69de392695894fabfdacddc7de90 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -439,8 +439,9 @@ TrustedTypesCodeGenerationCheck(v8::Local<v8::Context> context,

View file

@ -12,10 +12,10 @@ Ideally we could add an embedder observer pattern here but that can be
done in future work.
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index 779dc1c05a58f23517a9375bfed59b7e9337199e..6b3ed3105636b7fcccc1d4994733b0e49b307a44 100644
index 891f1f8f11b2bbdb19e260428f84ec658bfb166d..afb5d11c97e4297f459f39415c22cbef32f066f6 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -166,6 +166,7 @@
@@ -165,6 +165,7 @@
#include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h"
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
#include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h"
@ -23,7 +23,7 @@ index 779dc1c05a58f23517a9375bfed59b7e9337199e..6b3ed3105636b7fcccc1d4994733b0e4
#include "third_party/blink/renderer/platform/graphics/image.h"
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
@@ -1771,6 +1772,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
@@ -1770,6 +1771,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
#if BUILDFLAG(IS_MAC)
web_view_impl->SetMaximumLegibleScale(
prefs.default_maximum_page_scale_factor);

View file

@ -13,10 +13,10 @@ uses internally for things like menus and devtools.
We can remove this patch once it has in some shape been upstreamed.
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index bbc44e2e130d7de88d12a283ee69b83bfde8962e..7d5c401fe5909551a42509ea3b14f263ccab5d0f 100644
index 15212061cd15887273c2a694dae8587c3cc235e0..04978a5bffbdf1207424cd1c8d9ed4272a29c99c 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -145,6 +145,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
@@ -151,6 +151,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
NativeTheme::~NativeTheme() = default;
bool NativeTheme::ShouldUseDarkColors() const {
@ -26,10 +26,10 @@ index bbc44e2e130d7de88d12a283ee69b83bfde8962e..7d5c401fe5909551a42509ea3b14f263
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index f39f9910371d1108146e6dde96ef853f5f7cba2d..8eed5c3d6b04b9dbdbc06ce384e8d91ac562f1a6 100644
index bbfd486558ff4beeae37a1cbe458293544653542..c86ae57535d72b2021b17a8573c25b5d97f3c57b 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -405,6 +405,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -417,6 +417,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
bool use_custom_frame = true) const;
@ -53,7 +53,7 @@ index f39f9910371d1108146e6dde96ef853f5f7cba2d..8eed5c3d6b04b9dbdbc06ce384e8d91a
// Returns a shared instance of the native theme that should be used for web
// rendering. Do not use it in a normal application context (i.e. browser).
// The returned object should not be deleted by the caller. This function is
@@ -600,6 +617,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -612,6 +629,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
PageColors page_colors_ = PageColors::kOff;
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;

View file

@ -183,7 +183,7 @@ index 01e62d7e8df65efb900e9cd0d34bcd8e0ed3e7da..9af6784707f125046d9a734165fc2b08
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
}
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
index 4a5df7babed52c05f453a264d724dd2d89f7a0c6..3e11e84f5a42b3758ff0662eff249b6ad6ded77b 100644
index 5aa0119ef7cc8d47e978566db56567fc2843797f..fc211d8e7341078b47bf4d1c54ef2c42fb71d32e 100644
--- a/content/browser/utility_process_host.cc
+++ b/content/browser/utility_process_host.cc
@@ -156,11 +156,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
@ -227,7 +227,7 @@ index 4a5df7babed52c05f453a264d724dd2d89f7a0c6..3e11e84f5a42b3758ff0662eff249b6a
mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
return static_cast<ChildProcessHostImpl*>(process_->GetHost())
->child_process();
@@ -442,9 +462,22 @@ bool UtilityProcessHost::StartProcess() {
@@ -444,9 +464,22 @@ bool UtilityProcessHost::StartProcess() {
}
#endif // BUILDFLAG(IS_LINUX)
@ -252,7 +252,7 @@ index 4a5df7babed52c05f453a264d724dd2d89f7a0c6..3e11e84f5a42b3758ff0662eff249b6a
#if BUILDFLAG(IS_WIN)
if (!preload_libraries_.empty()) {
diff --git a/content/browser/utility_process_host.h b/content/browser/utility_process_host.h
index 45b85c90b5d01a0b1311e15705794ab4c9369fa1..d13dbd7a917e53a4dbee21ad0f98a5bd2ab1d1b9 100644
index 012069cada2220f6c1976107bc2e4ca6dcb7d7ca..a52a197eb51f8c00d7321f03ccb436ec7d009d47 100644
--- a/content/browser/utility_process_host.h
+++ b/content/browser/utility_process_host.h
@@ -35,6 +35,10 @@

View file

@ -87,7 +87,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index ef3c8ba80dd3438277a2b96903baec12783381fc..488abc9ed0d61a4b73f4bec34cbca416abfbf715 100644
index c99250739b9aa9ab2d7dcae4adfa5034ef3921c2..ebc723289104f2d6e0684586214cfeb7a64aeb69 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -141,6 +141,8 @@ viz_component("service") {
@ -514,10 +514,10 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index 36673e93a8380d4e6d086fe3029a53fa483ccddb..ad91be73ec89f45c2ce083eaa3a8aba6b6f53877 100644
index ad8357c34da5f34b8583c6bc037e3fc861c6351a..9d3e20b9dedd43e3f3c13462402c147b5b7fd0a1 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -94,7 +94,8 @@ RootCompositorFrameSinkImpl::Create(
@@ -96,7 +96,8 @@ RootCompositorFrameSinkImpl::Create(
params->gpu_compositing, params->widget);
auto output_surface = output_surface_provider->CreateOutputSurface(
params->widget, params->gpu_compositing, display_client.get(),
@ -577,7 +577,7 @@ index c86f1e090cb844fb555098d128391ae66de2d594..1f20ff61a66f9a269fe5d5257470ef99
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController>
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
index 350fa67c492490bbd5e8d13ea4368df798261071..d5718735b288d27055af05411a160377c473d27b 100644
index 29936bca703b86fee89e2b7f35c64a47cd60770b..7fb5a0082bae7d8e06ca8588129d34e866f043bf 100644
--- a/services/viz/privileged/mojom/compositing/display_private.mojom
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom
@@ -114,7 +114,6 @@ interface DisplayClient {

View file

@ -17,10 +17,10 @@ headers, moving forward we should find a way in upstream to provide
access to these headers for loader clients created on the browser process.
diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
index 1e15e62d01b6cf620a84e8bf218706b4eb05d073..07d7eb6117a38138f65db97dedda193c4ee2bd8e 100644
index d5239af9a83d408ed8e6e71daa3e2458318ed0df..2fdaf6813ccec6e7cba074ffd7e3c01ff7966cac 100644
--- a/services/network/public/cpp/resource_request.cc
+++ b/services/network/public/cpp/resource_request.cc
@@ -137,6 +137,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
@@ -151,6 +151,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
disable_secure_dns = other.disable_secure_dns;
has_user_activation = other.has_user_activation;
allow_cookies_from_browser = other.allow_cookies_from_browser;
@ -28,7 +28,7 @@ index 1e15e62d01b6cf620a84e8bf218706b4eb05d073..07d7eb6117a38138f65db97dedda193c
cookie_observer =
Clone(&const_cast<mojo::PendingRemote<mojom::CookieAccessObserver>&>(
other.cookie_observer));
@@ -160,6 +161,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting(
@@ -177,6 +178,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting(
const TrustedParams& other) const {
return isolation_info.IsEqualForTesting(other.isolation_info) &&
disable_secure_dns == other.disable_secure_dns &&
@ -37,10 +37,10 @@ index 1e15e62d01b6cf620a84e8bf218706b4eb05d073..07d7eb6117a38138f65db97dedda193c
allow_cookies_from_browser == other.allow_cookies_from_browser &&
client_security_state == other.client_security_state;
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
index 185c4ba2dad840a35dd06ab874c8e2b2f5c1730c..9b3107a616d68d02065470a3b8e517b1cfe02c20 100644
index 220b29c9806b3446602b943780a7d28d45d0dfa0..278e3396e9a3507b38936e4818fec931b3bf212a 100644
--- a/services/network/public/cpp/resource_request.h
+++ b/services/network/public/cpp/resource_request.h
@@ -66,6 +66,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@@ -69,6 +69,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
bool disable_secure_dns = false;
bool has_user_activation = false;
bool allow_cookies_from_browser = false;
@ -49,7 +49,7 @@ index 185c4ba2dad840a35dd06ab874c8e2b2f5c1730c..9b3107a616d68d02065470a3b8e517b1
mojo::PendingRemote<mojom::TrustTokenAccessObserver> trust_token_observer;
mojo::PendingRemote<mojom::URLLoaderNetworkServiceObserver>
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
index b60c907a5ab72a618c7675844626f425a045af68..53f5e2535db83c68bb808571619da22adea7ba4e 100644
index 826e4f94538f9130d2af89c47828755396286e3b..15c41429fbeeff49cdc9dec6baebe2acfd7c9179 100644
--- a/services/network/public/cpp/url_request_mojom_traits.cc
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
@@ -93,6 +93,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
@ -61,10 +61,10 @@ index b60c907a5ab72a618c7675844626f425a045af68..53f5e2535db83c68bb808571619da22a
mojo::PendingRemote<network::mojom::CookieAccessObserver>>();
out->trust_token_observer = data.TakeTrustTokenObserver<
diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
index 549b0da0d4790e0ced3048e7167fe1a74ab3f78a..71bc5c45d4f2ecf0abb7f6045bd9945e1f4b9b07 100644
index 30ed2e17dce5fb4edf2460e1ada2eb6224206908..1793afebe4b98c086932810bae6ed45df59d5ff7 100644
--- a/services/network/public/cpp/url_request_mojom_traits.h
+++ b/services/network/public/cpp/url_request_mojom_traits.h
@@ -72,6 +72,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
@@ -73,6 +73,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
const network::ResourceRequest::TrustedParams& trusted_params) {
return trusted_params.allow_cookies_from_browser;
}
@ -76,10 +76,10 @@ index 549b0da0d4790e0ced3048e7167fe1a74ab3f78a..71bc5c45d4f2ecf0abb7f6045bd9945e
cookie_observer(
const network::ResourceRequest::TrustedParams& trusted_params) {
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
index fa378b77ccfe9de4e4152352705e7bb1c9fcabee..b7687fed1cb3a9db028f19913c34696e28e23ff3 100644
index 40fa3f76df8e43d9d78232ea3d88efc77cf4a5ee..fa06e397abd87156e0a32da3629ec566444d0305 100644
--- a/services/network/public/mojom/url_request.mojom
+++ b/services/network/public/mojom/url_request.mojom
@@ -73,6 +73,9 @@ struct TrustedUrlRequestParams {
@@ -74,6 +74,9 @@ struct TrustedUrlRequestParams {
// FollowRedirect().
bool allow_cookies_from_browser;
@ -112,10 +112,10 @@ index 3464dcf4713762ede8ca5ef4918c935c0c1ae1d1..b47cc49c8691acbe03fd23a773e23ffe
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index cc6bbf3a41a96a2218164d5b87863566e02a0d1c..03fd58c761af81102645eee609e80a815e8d94d4 100644
index 388ce3171a7495b96baadbe4b0730de08b331fa1..b2bcb4941c4237aa007f9f27057002b5a72c0ba6 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -655,6 +655,7 @@ URLLoader::URLLoader(
@@ -658,6 +658,7 @@ URLLoader::URLLoader(
has_user_activation_ = request.trusted_params->has_user_activation;
allow_cookies_from_browser_ =
request.trusted_params->allow_cookies_from_browser;
@ -123,16 +123,16 @@ index cc6bbf3a41a96a2218164d5b87863566e02a0d1c..03fd58c761af81102645eee609e80a81
}
// Store any cookies passed from the browser process to later attach them to
@@ -730,7 +731,7 @@ URLLoader::URLLoader(
url_request_->SetRequestHeadersCallback(base::BindRepeating(
&URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this)));
@@ -743,7 +744,7 @@ URLLoader::URLLoader(
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
}
- if (devtools_request_id()) {
+ if (devtools_request_id() || report_raw_headers_) {
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1624,6 +1625,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1638,6 +1639,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();
@ -153,10 +153,10 @@ index cc6bbf3a41a96a2218164d5b87863566e02a0d1c..03fd58c761af81102645eee609e80a81
// Parse and remove the Trust Tokens response headers, if any are expected,
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index c2a4bf76d1fa990890f50ee592215883e6352048..e33a3c599c93f0d1687f230daf1c0d76e006a121 100644
index 7e15cbf136dbe5a7d7997e5fcbebec170cc41cf6..e65e32d66b8fc04e9530ddf7a293043b5dce2044 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -580,6 +580,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -583,6 +583,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
resource_scheduler_request_handle_;

View file

@ -7,13 +7,13 @@ Subject: feat: filter out non-shareable windows in the current application in
This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases.
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index ffc09580be4f78c10dab2f02bc6b89855c4f80ae..92a9f4e4d256a329b9ad2378819289abe1cc8d66 100644
index dabbd20a3b92d874c80e0b4016ce2361d5b93564..e15d904bc2823c3b441e4491bff7fe43c17fad82 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -170,7 +170,15 @@ void OnShareableContentCreated(
@@ -174,7 +174,15 @@ void OnShareableContentCreated(SCShareableContent* content) {
case DesktopMediaID::TYPE_SCREEN:
for (SCDisplay* display : [content displays]) {
if (source_.id == [display displayID]) {
for (SCDisplay* display in content.displays) {
if (source_.id == display.displayID) {
- NSArray<SCWindow*>* exclude_windows = nil;
+ NSArray<NSWindow*>* exclude_ns_windows = [[[NSApplication sharedApplication] windows] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(NSWindow* win, NSDictionary *bindings) {
+ return [win sharingType] == NSWindowSharingNone;
@ -24,6 +24,6 @@ index ffc09580be4f78c10dab2f02bc6b89855c4f80ae..92a9f4e4d256a329b9ad2378819289ab
+ }
+ return false;
+ }]];
filter.reset([[SCContentFilter alloc]
initWithDisplay:display
excludingWindows:exclude_windows]);
filter = [[SCContentFilter alloc] initWithDisplay:display
excludingWindows:exclude_windows];
stream_config_content_size_ =

View file

@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen
This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 8560ba622ae17bbd89944c67ab951652cc1835ff..0773633ba568c5f723149df8af30fa685c18c6c0 100644
index d806c7b3feb19c94de4622c543ba39b728423524..75059c0404f60e7a6e075b15452ed39914050075 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3634,7 +3634,7 @@ void WebContentsImpl::EnterFullscreenMode(
@@ -3661,7 +3661,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame, options));
DCHECK(requesting_frame->IsActive());

View file

@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
BrowserWindow.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index e7dea84e6302ffd5d8824755e3cbf51766418a61..86ee9cae68bfbccc1eec83422c3a62db4eecf536 100644
index f382e6eec48440eefb9a91642792cbf21a504275..68953ca1a30ef5a497e6e4708f9e6891d4511e6e 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3780,14 +3780,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
@@ -3797,14 +3797,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
min_window_size = delegate_->DIPToScreenSize(min_window_size);
max_window_size = delegate_->DIPToScreenSize(max_window_size);

View file

@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 860422baf9918b83bdac88eb97a6a029333eb97a..985a4daf7fa6ba07bfc5b176aeb9a1968814c605 100644
index c4c884d3adfc97cd89ce8ce27af201c3b15fbf70..d2a13a45f274ad58e956d1434b72d805fe5ce4c9 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -7353,10 +7353,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
@@ -7373,10 +7373,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
if (IsForMhtmlSubframe())
return origin_with_debug_info;
@ -37,10 +37,10 @@ index 860422baf9918b83bdac88eb97a6a029333eb97a..985a4daf7fa6ba07bfc5b176aeb9a196
}
diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h
index b82987cdc645d74340d5297d1355235c8cfc633c..c02c8a889f75cbb4905eb57285dfdeb219cf271a 100644
index 8b5c6a5b57770043b4fdec580ef208760cfdb24d..62dbb7d88de5cc30d3944f3e8c5944f7e0a71f99 100644
--- a/content/browser/renderer_host/render_frame_host_impl.h
+++ b/content/browser/renderer_host/render_frame_host_impl.h
@@ -2936,6 +2936,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
@@ -2944,6 +2944,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
// last committed document.
CookieChangeListener::CookieChangeInfo GetCookieChangeInfo();
@ -58,7 +58,7 @@ index b82987cdc645d74340d5297d1355235c8cfc633c..c02c8a889f75cbb4905eb57285dfdeb2
// Sets a ResourceCache in the renderer. `this` must be active and there must
// be no pending navigation. `remote` must have the same and process
// isolation policy.
@@ -3318,17 +3329,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
@@ -3326,17 +3337,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
// relevant.
void ResetWaitingState();

View file

@ -50,7 +50,7 @@ upstream would also hit this DCHECK, so give it a try with content_shell or
chrome and that would help reporting upstream crbug.
diff --git a/services/device/device_service.cc b/services/device/device_service.cc
index eaee3293f9df6c2fa237684206fda50793aee1ae..b5a9e57452703ceb686a408f0d48bf62185343d5 100644
index b776f44abe450c1320ce3f1b89529805422c905d..3861d64f84c482b83bef400b931ee73ddd052262 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -158,7 +158,7 @@ DeviceService::~DeviceService() {

View file

@ -6,10 +6,10 @@ Subject: fix: export zlib symbols
This patch sets ZLIB_DLL so that we properly export zlib symbols.
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
index 9b3971041dffa06d74999986dbacaf6fce89e49f..62834b3b9a7dc49f72172ffb5480c9c12c3635b4 100644
index 074c2720fa460d9b7106e09eb7ee53efcb13af4c..b88649b77805d045f80a346a2d9a0a4438f0afa3 100644
--- a/third_party/zlib/BUILD.gn
+++ b/third_party/zlib/BUILD.gn
@@ -326,6 +326,10 @@ component("zlib") {
@@ -321,6 +321,10 @@ component("zlib") {
defines = []
deps = []

View file

@ -45,10 +45,10 @@ index ed0641b888c6421b1791c086466bd9c158e9109d..3760b3823d5af3325017bb53f5b1d38e
// RenderFrameMetadataProvider::Observer implementation.
void OnRenderFrameMetadataChangedBeforeActivation(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0773633ba568c5f723149df8af30fa685c18c6c0..0b7f856436344c7a86ca2d3889596eafcebfcf39 100644
index 75059c0404f60e7a6e075b15452ed39914050075..88830e9c75fafe7ab8a191dee7887944fc6a6d24 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -8164,7 +8164,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -8212,7 +8212,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame);
RenderWidgetHostViewBase* root_view =

View file

@ -25,10 +25,10 @@ index 3f6289a9cee6d94349ef30760aad4a2b0a015c25..63b833fb3473f526be21ebe4549e17ee
// Returns true if duplex mode is set.
bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode);
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index 2748468ba184dca7befd1a1411dc3a27e2df7175..e1230b5df685a04c60404ff4345c6ec9ef86e98c 100644
index ce528252965ad10325659a099e046b119c72cf12..67427b928705ad0049c5f0035de6bd0a171d65c7 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -204,7 +204,8 @@ PMPaper MatchPaper(CFArrayRef paper_list,
@@ -213,7 +213,8 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) {
!SetCollateInPrintSettings(settings_->collate()) ||
!SetDuplexModeInPrintSettings(settings_->duplex_mode()) ||
!SetOutputColor(static_cast<int>(settings_->color())) ||
@ -38,7 +38,7 @@ index 2748468ba184dca7befd1a1411dc3a27e2df7175..e1230b5df685a04c60404ff4345c6ec9
return OnError();
}
}
@@ -357,6 +358,22 @@ PMPaper MatchPaper(CFArrayRef paper_list,
@@ -366,6 +367,22 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) {
return PMSetCopies(print_settings, copies, false) == noErr;
}

View file

@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue
for opaque frameless windows even with that block commented out.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 8099940abae264e80eef29b2fa6227a28b801500..575877b4fb0929d0cdd22af399f7078fcd713584 100644
index 24b6bb99bd477eeb7ed2e672df3327dcd3ea5d7b..a87ccfe3ed5a4b4329775968981c598912f4184a 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1860,7 +1860,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
@@ -1873,7 +1873,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS),
0);

View file

@ -20,10 +20,10 @@ index 34777e89362b14587979cef76d8cd71b634cca8c..3d5e44883bab30eebdfaba70f3933435
injector_->ExpectsResults(), injector_->ShouldWaitForPromise());
}
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 2aeb74dbcf1721d29bc57e7f227122c213ec52b4..db1eab9a06cf2bf1affe05b054558e7d3db1c209 100644
index 3a0077b7130ca36e5441b28a7574c39f7bf7df49..593abf09011d26e369dc2551fc939249e92f1029 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -444,6 +444,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
@@ -442,6 +442,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
mojom::EvaluationTiming,
mojom::LoadEventBlockingOption,
WebScriptExecutionCallback,
@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index c0c82737679ea9b92fb3195c465bc1083e86e710..a7e5ce39727b70f93cca50c0f1a8162171cc32d8 100644
index 3db87d746c1be999509e0cbabae6071878471b23..0f53c0939687fce3b933e71c1484ed21419b8357 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -2775,6 +2775,7 @@ void LocalFrame::RequestExecuteScript(
@@ -2771,6 +2771,7 @@ void LocalFrame::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@ -75,7 +75,7 @@ index c0c82737679ea9b92fb3195c465bc1083e86e710..a7e5ce39727b70f93cca50c0f1a81621
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::WantResultOption want_result_option,
mojom::blink::PromiseResultOption promise_behavior) {
@@ -2808,7 +2809,7 @@ void LocalFrame::RequestExecuteScript(
@@ -2804,7 +2805,7 @@ void LocalFrame::RequestExecuteScript(
PausableScriptExecutor::CreateAndRun(
script_state, std::move(script_sources), execute_script_policy,
user_gesture, evaluation_timing, blocking_option, want_result_option,
@ -85,10 +85,10 @@ index c0c82737679ea9b92fb3195c465bc1083e86e710..a7e5ce39727b70f93cca50c0f1a81621
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index efc13a430de1ec3b2bb0f84d6bf713699e4536f4..aa13b2a7dc3f0b7bb3d05d83169d1208345cd2b6 100644
index 7e5cdb3f09323fbb2d4e5f2bd31123a99b2a1bbe..ed69dc75e33503706ce0d93b102685c733a5b52f 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -805,6 +805,7 @@ class CORE_EXPORT LocalFrame final
@@ -796,6 +796,7 @@ class CORE_EXPORT LocalFrame final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
@ -204,10 +204,10 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0
const mojom::blink::UserActivationOption user_activation_option_;
const mojom::blink::LoadEventBlockingOption blocking_option_;
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index 4cf1d423da07ee405748674eb44b83ac8c0a336d..c6325aeb196aa697b238493c490072b8c26e1062 100644
index bc5c09998a9c47f5328d46711f265d6fb80d9256..ccf72a687f9e4da8a91a1b2ad5b597cd31a2531c 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -1155,14 +1155,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@@ -1148,14 +1148,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@ -226,7 +226,7 @@ index 4cf1d423da07ee405748674eb44b83ac8c0a336d..c6325aeb196aa697b238493c490072b8
v8::MaybeLocal<v8::Value> WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled(
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index cc487e218fc55e451a8c6da4e75b5afcc59777a9..a9f46b3d4f52d9a28f209e732af2da768bd6392c 100644
index a7469d4d292921620a66dab1ef76edb276bfb70d..d0ae9a6a66435bda1b21d39d2fd7b2f7a13b560d 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final

View file

@ -145,10 +145,10 @@ index e6587d2208a13576af1831b94724a6286f0e0607..91223ef3f099e20aee5cf1d685c45d2c
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
void Cancel() override;
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.h b/ui/views/controls/menu/menu_runner_impl_cocoa.h
index 50291eb07440a35173410336927490f44aae604b..febdb941ff72f7e8e9cc9b36e04c35b0f4c0227d 100644
index 68c01b93a973a1910c1cce1e581b5c5e38a8c787..fd82c908886f646327e59a2f4ee8dc3476fb7db1 100644
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.h
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.h
@@ -42,6 +42,7 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface {
@@ -45,6 +45,7 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface {
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,
@ -157,10 +157,10 @@ index 50291eb07440a35173410336927490f44aae604b..febdb941ff72f7e8e9cc9b36e04c35b0
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
void Cancel() override;
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.mm b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
index 46a50f5a808c3bda24f44c1ce3a9944327f22fa4..0bfdf45ed43b0701d927940ca78be765b9184b4f 100644
index c4c1f9b517927cff4fc573504f8e707433a6c1cc..32ab57972c8935a08919dfffab1ad59a4724b67c 100644
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.mm
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
@@ -192,6 +192,7 @@
@@ -193,6 +193,7 @@
const gfx::Rect& bounds,
MenuAnchorPosition anchor,
int32_t run_types,

View file

@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index 02c8f132c266a599c335f83474b3322700a0e5d1..19f731476a2a2beacef7c4493a586c4a6cd69dd0 100644
index 2bf760cd665cf3ec91568f593d72b25aeaf79dcc..141b9764a59e733b7895aff697fa4e77a380f5bd 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -3984,6 +3984,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -4024,6 +4024,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@ -20,7 +20,7 @@ index 02c8f132c266a599c335f83474b3322700a0e5d1..19f731476a2a2beacef7c4493a586c4a
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 3ce0a6acc811d0dd46fc341ef0ce88ae123a4e62..af1319b60be5bf1fc32262de1998e9705bd34642 100644
index 48efe9da1fe1234162b9f9d3909630d5b04897b5..61a94528dda9a833e30640a65803d2298b390e72 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -306,6 +306,11 @@ class CONTENT_EXPORT ContentBrowserClient {

View file

@ -24,7 +24,7 @@ index e8608bb868c82c9af5426cd6f8512ce6b18ff39f..6268851494a0bbc0b3e693782dae6171
g_reference_table = reference_table;
g_fatal_error_callback = fatal_error_callback;
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index 10caab6d9ef3345332c163a55dcef991248ab4ea..c9bc6e5dd7e1cf8d198afcd21cbb24970337a50f 100644
index 39f3c07b4a3cae39106a27fb7f867f285b1d0562..6d9dfd15e0d0589b5974afa6bb7418e499954d87 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -109,7 +109,8 @@ class GIN_EXPORT IsolateHolder {
@ -38,10 +38,10 @@ index 10caab6d9ef3345332c163a55dcef991248ab4ea..c9bc6e5dd7e1cf8d198afcd21cbb2497
// Returns whether `Initialize` has already been invoked in the process.
// Initialization is a one-way operation (i.e., this method cannot return
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 45da70dd0d164bd5be17ef4e3731f2a3c597571f..4c2a4783f894c2dc62d87dfc51e2ebb8a0b51b2e 100644
index de46465bdaa8b4ed3dc4cf2a88553471fe3270b1..3914c2b9bfa945b0baf1a40970b592cec1a91dc7 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -420,7 +420,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
@@ -421,7 +421,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
// static
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
const std::string js_command_line_flags,
@ -51,7 +51,7 @@ index 45da70dd0d164bd5be17ef4e3731f2a3c597571f..4c2a4783f894c2dc62d87dfc51e2ebb8
static bool v8_is_initialized = false;
if (v8_is_initialized)
return;
@@ -430,7 +431,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
@@ -431,7 +432,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
// See https://crbug.com/v8/11043
SetFlags(mode, js_command_line_flags);

View file

@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index aa2e705856410072ef9b6d1016f17652b5ecd50a..a19589246ad8fdec6e66bd4be26c612ff900cf78 100644
index 7e09b901412911af89d39ff46a2c824399a2b25d..46acd3cb20e414849718f199f4f32589e38088c4 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1185,6 +1185,11 @@

View file

@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index d963dd9049043eb79bc48b41ddc7fd616ce221bc..566540e62b802218790267d0f75ff0d55118f39f 100755
index f6c143483a9bdc5e5b320786356d329d40feba4f..2288deb727523171438ac0b2f636e3dd62d79756 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -306,6 +306,8 @@ def GetDefaultHostOs():

View file

@ -21,7 +21,7 @@ index bf0365da219530780ec232e477f13ed216e6d5b9..84b137b0bff80f63db58b08d6c97ed52
properties->supports_global_application_menus = true;
properties->app_modal_dialogs_use_event_blocker = true;
diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
index b7991d9efb0076487fee7698debd6958b9e5177e..58215c5cb86a0d5d3f6699c84f680e65db3dcab3 100644
index 9b342b4b189530061dd77c9bf7ea3e4387a41da1..f6d378e90a0280ed1b1da009b966fa790bc24b1d 100644
--- a/ui/ozone/public/ozone_platform.h
+++ b/ui/ozone/public/ozone_platform.h
@@ -121,6 +121,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {

View file

@ -57,7 +57,7 @@ index 6268851494a0bbc0b3e693782dae6171f6347657..87ae3db7aec96577856804aa3718e53e
access_mode_, task_runner);
// TODO(https://crbug.com/1347092): Refactor such that caller need not
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index c9bc6e5dd7e1cf8d198afcd21cbb24970337a50f..688f10fa48511818848f6177a1a20a19ebd54f99 100644
index 6d9dfd15e0d0589b5974afa6bb7418e499954d87..ea0b44b8e693fcbec3a2c8c0c0ed63780f8841e1 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -83,13 +83,15 @@ class GIN_EXPORT IsolateHolder {

View file

@ -9,7 +9,7 @@ but due to the nature of electron, we need to load the v8 snapshot
in the browser process.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index ab6bc68812e36afba65248d56bd1b7e9e453850a..336705c28ca960d8e7d9af82bb56b009e49bc733 100644
index 6cb42330a794c8cee18b65ef42c3b5388b61f8a0..a294093a5534d9602b76f8496e6d5f8d4b10c96e 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -273,11 +273,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {

View file

@ -6,10 +6,10 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray
Removes usage of the CGDisplayUsesForceToGray private API.
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
index eac90f20353e52ee676302b39ae5cb204c0a9dcb..1c3eb1dbd4417c675d4592cad126a7fe75cd1e3c 100644
index d2defe11d4d6fdb880679af8f33cec043c106be6..21d2ea643a3e5118cf527386c11c1d89a33f22b0 100644
--- a/ui/display/mac/screen_mac.mm
+++ b/ui/display/mac/screen_mac.mm
@@ -268,7 +268,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
@@ -163,7 +163,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
display.set_color_depth(Display::kDefaultBitsPerPixel);
display.set_depth_per_component(Display::kDefaultBitsPerComponent);
}

View file

@ -38,35 +38,11 @@ index 09e99c33ba9f0fe739a26757aa9018d4dcf180aa..6ac1f2ea2aeff8e640d0307dc7ad4c28
+#endif
} // namespace base
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index d3cd2a2324e3da84d80778bc251d8e4e1feee93b..8c9a9518eab32569a550c9fbf7085917c49caf27 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -371,8 +371,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
DCHECK(!cf_val ||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
- (_CFIsObjC(CTFontGetTypeID(), cf_val) &&
- [ns_val isKindOfClass:[NSFont class]]));
+ ([ns_val isKindOfClass:[NSFont class]]));
return ns_val;
}
@@ -445,9 +444,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
return (CTFontRef)(cf_val);
}
- if (!_CFIsObjC(CTFontGetTypeID(), cf_val))
- return NULL;
-
id<NSObject> ns_val = reinterpret_cast<id>(const_cast<void*>(cf_val));
if ([ns_val isKindOfClass:[NSFont class]]) {
return (CTFontRef)(cf_val);
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
index de77363ffcb89e0b8c7b7033d973b89eb0dd28ae..fc02c33ccd023c366c73a21b87711a61b0b6eb10 100644
index b267bc2272fa82334a70d897a900f1ea37b1a598..967e22699bf565368704972c021f9b425a570f08 100644
--- a/base/process/launch_mac.cc
+++ b/base/process/launch_mac.cc
@@ -21,14 +21,19 @@
@@ -21,13 +21,18 @@
#include "base/threading/scoped_blocking_call.h"
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/base_tracing.h"
@ -76,19 +52,18 @@ index de77363ffcb89e0b8c7b7033d973b89eb0dd28ae..fc02c33ccd023c366c73a21b87711a61
extern "C" {
// Changes the current thread's directory to a path or directory file
// descriptor. libpthread only exposes a syscall wrapper starting in
// macOS 10.12, but the system call dates back to macOS 10.5. On older OSes,
// the syscall is issued directly.
// descriptor.
+#if !IS_MAS_BUILD()
int pthread_chdir_np(const char* dir) API_AVAILABLE(macosx(10.12));
int pthread_fchdir_np(int fd) API_AVAILABLE(macosx(10.12));
int pthread_chdir_np(const char* dir);
int pthread_fchdir_np(int fd);
+#endif
int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim)
API_AVAILABLE(macosx(10.14));
int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs,
int disclaim);
@@ -99,13 +104,27 @@ class PosixSpawnFileActions {
};
#if !BUILDFLAG(IS_MAC)
int ChangeCurrentThreadDirectory(const char* path) {
+#if IS_MAS_BUILD()
+ #pragma clang diagnostic push
@ -112,17 +87,17 @@ index de77363ffcb89e0b8c7b7033d973b89eb0dd28ae..fc02c33ccd023c366c73a21b87711a61
return pthread_fchdir_np(-1);
+#endif
}
#endif
struct GetAppOutputOptions {
@@ -225,7 +244,7 @@ Process LaunchProcess(const std::vector<std::string>& argv,
@@ -226,7 +245,7 @@ Process LaunchProcess(const std::vector<std::string>& argv,
file_actions.Inherit(STDERR_FILENO);
}
-#if BUILDFLAG(IS_MAC)
+#if 0
if (options.disclaim_responsibility) {
if (__builtin_available(macOS 10.14, *)) {
DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
}
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index 6e73be2bd964aa8cf743c1ae01ce8e188dbcac8e..58a7eb1e982a90d6197579ffdb9545340356a65c 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
@ -180,7 +155,7 @@ index f52f1d1da4d431505b1a55df4764f37a70e0b29d..2406f5d4342dafc0d2c398f03ac23907
// |error| is strerror(errno) when a P* logging function is called. Pass
diff --git a/sandbox/mac/system_services.cc b/sandbox/mac/system_services.cc
index 92b84121da46b692b89f70a46e36f5d1991383b8..8de2556bb59c70f229d35da05fd0718ba81696b5 100644
index 175cbb4a23a4ab5f86c4bfa8158f8e0ada5454ed..ce44db60ba61394bbadacc4b85c94643a6e0261f 100644
--- a/sandbox/mac/system_services.cc
+++ b/sandbox/mac/system_services.cc
@@ -9,6 +9,7 @@
@ -192,8 +167,8 @@ index 92b84121da46b692b89f70a46e36f5d1991383b8..8de2556bb59c70f229d35da05fd0718b
OSStatus SetApplicationIsDaemon(Boolean isDaemon);
void _LSSetApplicationLaunchServicesServerConnectionStatus(
@@ -19,10 +20,12 @@ void _LSSetApplicationLaunchServicesServerConnectionStatus(
// https://github.com/WebKit/webkit/commit/8da694b0b3febcc262653d01a45e946ce91845ed.
void _CSCheckFixDisable() API_AVAILABLE(macosx(10.15));
// https://github.com/WebKit/WebKit/blob/24aaedc770d192d03a07ba4a71727274aaa8fc07/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm#L840
void _CSCheckFixDisable();
} // extern "C"
+#endif
@ -204,7 +179,7 @@ index 92b84121da46b692b89f70a46e36f5d1991383b8..8de2556bb59c70f229d35da05fd0718b
// Allow the process to continue without a LaunchServices ASN. The
// INIT_Process function in HIServices will abort if it cannot connect to
// launchservicesd to get an ASN. By setting this flag, HIServices skips
@@ -36,12 +39,15 @@ void DisableLaunchServices() {
@@ -36,10 +39,13 @@ void DisableLaunchServices() {
0, ^bool(CFDictionaryRef options) {
return false;
});
@ -213,9 +188,7 @@ index 92b84121da46b692b89f70a46e36f5d1991383b8..8de2556bb59c70f229d35da05fd0718b
void DisableCoreServicesCheckFix() {
+#if !IS_MAS_BUILD()
if (__builtin_available(macOS 10.15, *)) {
_CSCheckFixDisable();
}
_CSCheckFixDisable();
+#endif
}

View file

@ -7,18 +7,18 @@ Disable private window frame APIs (NSNextStepFrame and NSThemeFrame) for MAS
build.
diff --git a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
index b31c3be1895f7ca4a0f5c61f06a66eb1e1fbc5a6..ad4a1ecb02573bb5d34d134c61ec71f3fb092f42 100644
index 3234ed46122056d58f33d17f33c8083a0e8e9d0a..6a7c75cddeaf46275a1628e187fd3907aaf53e75 100644
--- a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
+++ b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
@@ -9,6 +9,7 @@
#include "components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h"
#include "components/remote_cocoa/common/native_widget_ns_window_host.mojom.h"
@@ -13,6 +13,7 @@
#error "This file requires ARC support."
#endif
+#if !IS_MAS_BUILD()
@interface NSWindow (PrivateBrowserNativeWidgetAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -69,10 +70,13 @@ - (BOOL)_shouldCenterTrafficLights {
@@ -73,10 +74,13 @@ - (BOOL)_shouldCenterTrafficLights {
@end
@ -32,7 +32,7 @@ index b31c3be1895f7ca4a0f5c61f06a66eb1e1fbc5a6..ad4a1ecb02573bb5d34d134c61ec71f3
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
// - NSThemeFrame and its subclasses will be nil if it's missing at runtime.
if ([BrowserWindowFrame class])
@@ -87,6 +91,8 @@ - (BOOL)_usesCustomDrawing {
@@ -91,6 +95,8 @@ - (BOOL)_usesCustomDrawing {
return NO;
}
@ -42,19 +42,19 @@ index b31c3be1895f7ca4a0f5c61f06a66eb1e1fbc5a6..ad4a1ecb02573bb5d34d134c61ec71f3
// Keyboard -> Shortcuts -> Keyboard. Usually Ctrl+F5. The argument (|unknown|)
// tends to just be nil.
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_frameless_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_frameless_nswindow.mm
index 3a815ebf505bd95fa7f6b61ba433d98fbfe20225..dbbebbdc1735bc14224dfcde0b7fe3a6fd9f9e40 100644
index 2d4be7e4df5a0f6de9046593434eb276e28232f9..c727984807d555b8e6ab8fe37d9a6daa8c091663 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_frameless_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_frameless_nswindow.mm
@@ -4,6 +4,8 @@
#import "components/remote_cocoa/app_shim/native_widget_mac_frameless_nswindow.h"
@@ -8,6 +8,8 @@
#error "This file requires ARC support."
#endif
+#if !IS_MAS_BUILD()
+
@interface NSWindow (PrivateAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -18,8 +20,12 @@ - (CGFloat)_titlebarHeight {
@@ -22,8 +24,12 @@ - (CGFloat)_titlebarHeight {
}
@end
@ -67,7 +67,7 @@ index 3a815ebf505bd95fa7f6b61ba433d98fbfe20225..dbbebbdc1735bc14224dfcde0b7fe3a6
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
if ([NativeWidgetMacFramelessNSWindowFrame class]) {
return [NativeWidgetMacFramelessNSWindowFrame class];
@@ -27,4 +33,6 @@ + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
@@ -31,4 +37,6 @@ + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
return [super frameViewClassForStyleMask:windowStyle];
}
@ -95,10 +95,10 @@ index 58e974137f318b0f990e0b77630fe3a51db62c8c..8638f9ee32bea5fca67a377f27f3e24b
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
// can only be accomplished by overriding methods.
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
index ac6d18837e81339fd885ce93079362147406b595..669520e8782e5cab7bd53eb547f5faf78910a700 100644
index 85ec900639c308ce62f13eae1230d0597e8e9604..247568ccdfbaaf2f72612cbe738758e640472db1 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
@@ -97,7 +97,9 @@ void OrderChildWindow(NSWindow* child_window,
@@ -101,7 +101,9 @@ void OrderChildWindow(NSWindow* child_window,
} // namespace
@interface NSWindow (Private)
@ -108,7 +108,7 @@ index ac6d18837e81339fd885ce93079362147406b595..669520e8782e5cab7bd53eb547f5faf7
- (BOOL)hasKeyAppearance;
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
- (BOOL)_isConsideredOpenForPersistentState;
@@ -135,6 +137,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
@@ -139,6 +141,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
}
@end
@ -117,7 +117,7 @@ index ac6d18837e81339fd885ce93079362147406b595..669520e8782e5cab7bd53eb547f5faf7
@implementation NativeWidgetMacNSWindowTitledFrame
- (void)mouseDown:(NSEvent*)event {
if (self.window.isMovable)
@@ -161,6 +165,8 @@ - (BOOL)usesCustomDrawing {
@@ -165,6 +169,8 @@ - (BOOL)usesCustomDrawing {
}
@end
@ -125,8 +125,8 @@ index ac6d18837e81339fd885ce93079362147406b595..669520e8782e5cab7bd53eb547f5faf7
+
@implementation NativeWidgetMacNSWindow {
@private
base::scoped_nsobject<CommandDispatcher> _commandDispatcher;
@@ -357,6 +363,8 @@ - (NSAccessibilityRole)accessibilityRole {
CommandDispatcher* __strong _commandDispatcher;
@@ -358,6 +364,8 @@ - (NSAccessibilityRole)accessibilityRole {
// NSWindow overrides.
@ -135,7 +135,7 @@ index ac6d18837e81339fd885ce93079362147406b595..669520e8782e5cab7bd53eb547f5faf7
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
if (windowStyle & NSWindowStyleMaskTitled) {
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
@@ -368,6 +376,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
@@ -369,6 +377,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
return [super frameViewClassForStyleMask:windowStyle];
}

View file

@ -11,10 +11,10 @@ needs to think it's coming from the PWA process). I think it can just be chopped
out -- if there are any side-effects, we should be able to work around them.
diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm
index 88e4b9b878b59014dc3c4e875eb2acb1b72e7559..b5bdb96a05ab084166d64d4ca69ff9179cef6fba 100644
index 1411678acc567b4d6368d0e2e6224f0974d61825..b9495cc1a391603b2c223ab1cf2d75b19b23d52e 100644
--- a/components/remote_cocoa/app_shim/application_bridge.mm
+++ b/components/remote_cocoa/app_shim/application_bridge.mm
@@ -52,6 +52,7 @@
@@ -55,6 +55,7 @@
// NativeWidgetNSWindowHostHelper:
id GetNativeViewAccessible() override {
@ -22,32 +22,31 @@ index 88e4b9b878b59014dc3c4e875eb2acb1b72e7559..b5bdb96a05ab084166d64d4ca69ff917
if (!remote_accessibility_element_) {
int64_t browser_pid = 0;
std::vector<uint8_t> element_token;
@@ -63,6 +64,9 @@ id GetNativeViewAccessible() override {
base::scoped_policy::RETAIN);
@@ -65,6 +66,9 @@ id GetNativeViewAccessible() override {
ui::RemoteAccessibility::GetRemoteElementFromToken(element_token);
}
return remote_accessibility_element_.get();
return remote_accessibility_element_;
+#else
+ return nil;
+#endif
}
void DispatchKeyEvent(ui::KeyEvent* event) override {
bool event_handled = false;
@@ -101,8 +105,10 @@ void GetWordAt(const gfx::Point& location_in_content,
@@ -103,7 +107,9 @@ void GetWordAt(const gfx::Point& location_in_content,
mojo::AssociatedRemote<mojom::TextInputHost> text_input_host_remote_;
std::unique_ptr<NativeWidgetNSWindowBridge> bridge_;
+#if !IS_MAS_BUILD()
base::scoped_nsobject<NSAccessibilityRemoteUIElement>
remote_accessibility_element_;
NSAccessibilityRemoteUIElement* __strong remote_accessibility_element_;
+#endif
};
} // namespace
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 f31f2245a586079d5125a514e05e41e6cee478a2..16b9132250a2850a5c09cc4268c7ce9f400f158e 100644
index 10032ea5829e7dfc610db23f0f8f12021fe466f6..2b3f68f8e92e00caab15c048fcc2fc02f54a21fc 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -571,10 +571,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -591,10 +591,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
// this should be treated as an error and caught early.
CHECK(bridged_view_);
@ -59,12 +58,12 @@ index f31f2245a586079d5125a514e05e41e6cee478a2..16b9132250a2850a5c09cc4268c7ce9f
+#endif
// Beware: This view was briefly removed (in favor of a bare CALayer) in
// crrev/c/1236675. The ordering of unassociated layers relative to NSView
// https://crrev.com/c/1236675. The ordering of unassociated layers relative
diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
index 34f794f084bb418f9aa0f14f793ac5df348eb1b8..82efb222617d16d3f5d6a9860cb85dd2d11d42ee 100644
index ba279439ae7029f202a2282aca835462b335205b..7f3b2373dcb5cd31af972cbe8571a9d50a64ae4f 100644
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
@@ -87,8 +87,10 @@ id GetFocusedBrowserAccessibilityElement() override {
@@ -90,8 +90,10 @@ id GetFocusedBrowserAccessibilityElement() override {
return nil;
}
void SetAccessibilityWindow(NSWindow* window) override {
@ -75,22 +74,11 @@ index 34f794f084bb418f9aa0f14f793ac5df348eb1b8..82efb222617d16d3f5d6a9860cb85dd2
}
void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
@@ -150,8 +152,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
mojo::AssociatedRemote<mojom::RenderWidgetHostNSViewHost> host_;
std::unique_ptr<RenderWidgetHostNSViewBridge> bridge_;
+#if !IS_MAS_BUILD()
base::scoped_nsobject<NSAccessibilityRemoteUIElement>
remote_accessibility_element_;
+#endif
};
}
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 3a81bbe5542f39c82f6ccf6643f491cb73ecb2aa..6b156ac4c514855f73fedc85fb9b0080e8e61463 100644
index b803e5f1e87b183d857195c007d7116ccc8e8ed7..71984ec1fe0b801041f3544c1b596a6f1a50489a 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -22,7 +22,9 @@
@@ -21,7 +21,9 @@
#include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
#include "ui/accessibility/ax_role_properties.h"
#include "ui/accessibility/platform/ax_private_webkit_constants_mac.h"
@ -98,9 +86,9 @@ index 3a81bbe5542f39c82f6ccf6643f491cb73ecb2aa..6b156ac4c514855f73fedc85fb9b0080
#include "ui/base/cocoa/remote_accessibility_api.h"
+#endif
namespace {
@@ -225,6 +227,7 @@ void PostAnnouncementNotification(NSString* announcement,
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
@@ -228,6 +230,7 @@ void PostAnnouncementNotification(NSString* announcement,
return;
}
@ -108,15 +96,15 @@ index 3a81bbe5542f39c82f6ccf6643f491cb73ecb2aa..6b156ac4c514855f73fedc85fb9b0080
BrowserAccessibilityManager* root_manager = GetManagerForRootFrame();
if (root_manager) {
BrowserAccessibilityManagerMac* root_manager_mac =
@@ -247,6 +250,7 @@ void PostAnnouncementNotification(NSString* announcement,
@@ -250,6 +253,7 @@ void PostAnnouncementNotification(NSString* announcement,
return;
}
}
+#endif
if (base::mac::IsOS10_13()) {
// Use the announcement API to get around OS <= 10.13 VoiceOver bug
@@ -643,6 +647,7 @@ void PostAnnouncementNotification(NSString* announcement,
// Use native VoiceOver support for live regions.
BrowserAccessibilityCocoa* retained_node = native_node;
@@ -631,6 +635,7 @@ void PostAnnouncementNotification(NSString* announcement,
if ([NSApp isActive])
return window == [NSApp accessibilityFocusedWindow];
@ -124,7 +112,7 @@ index 3a81bbe5542f39c82f6ccf6643f491cb73ecb2aa..6b156ac4c514855f73fedc85fb9b0080
// TODO(accessibility): We need a solution to the problem described below.
// If the window is NSAccessibilityRemoteUIElement, there are some challenges:
// 1. NSApp is the browser which spawned the PWA, and what it considers the
@@ -670,6 +675,7 @@ void PostAnnouncementNotification(NSString* announcement,
@@ -658,6 +663,7 @@ void PostAnnouncementNotification(NSString* announcement,
// from within the app shim content.
if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]])
return true;
@ -133,10 +121,10 @@ index 3a81bbe5542f39c82f6ccf6643f491cb73ecb2aa..6b156ac4c514855f73fedc85fb9b0080
return false;
}
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 5fb7f2af49a3bd505840d2c118dfee9abf808c24..3f86c68811a90890255c7ac88bb251da60b40fdb 100644
index 8ae8e06566ceab66bdb4226b02706df6f963e81a..b6570e0d051a021bfb5984b100712b8ec62988f3 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -51,7 +51,9 @@ class ScopedPasswordInputEnabler;
@@ -53,7 +53,9 @@ class ScopedPasswordInputEnabler;
@protocol RenderWidgetHostViewMacDelegate;
@ -146,75 +134,73 @@ index 5fb7f2af49a3bd505840d2c118dfee9abf808c24..3f86c68811a90890255c7ac88bb251da
@class RenderWidgetHostViewCocoa;
namespace content {
@@ -666,10 +668,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
@@ -668,9 +670,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// EnsureSurfaceSynchronizedForWebTest().
uint32_t latest_capture_sequence_number_ = 0u;
+#if !IS_MAS_BUILD()
// Remote accessibility objects corresponding to the NSWindow that this is
// displayed to the user in.
base::scoped_nsobject<NSAccessibilityRemoteUIElement>
remote_window_accessible_;
NSAccessibilityRemoteUIElement* __strong remote_window_accessible_;
+#endif
// Used to force the NSApplication's focused accessibility element to be the
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index b436ccf7a4ee0271d6f15226b9f195b5ffb6b24b..4dce73888703a5db8fe7ae2a0e0745ee813ab9b0 100644
index 18c5ba6664280bcce962cc06c85984034e15345f..726d2c933c8f72ae364ce55c76abeec33caaa2b5 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -255,8 +255,10 @@
@@ -259,8 +259,10 @@
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
+#if !IS_MAS_BUILD()
// Destroy the previous remote accessibility element.
remote_window_accessible_.reset();
remote_window_accessible_ = nil;
+#endif
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
// pointers. `ns_view_` gets reinitialized later in this method.
@@ -1572,8 +1574,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1576,8 +1578,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
+#if !IS_MAS_BUILD()
if (remote_window_accessible_)
return remote_window_accessible_.get();
return remote_window_accessible_;
+#endif
return [GetInProcessNSView() window];
}
@@ -1617,9 +1621,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1621,9 +1625,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
+#if !IS_MAS_BUILD()
// When running in-process, just use the NSView's NSWindow as its own
// accessibility element.
remote_window_accessible_.reset();
remote_window_accessible_ = nil;
+#endif
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2121,6 +2127,7 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2125,12 +2131,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
+#if !IS_MAS_BUILD()
if (window_token.empty()) {
remote_window_accessible_.reset();
remote_window_accessible_ = nil;
} else {
@@ -2128,6 +2135,7 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token),
base::scoped_policy::RETAIN);
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
}
+#endif
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index f85c1f22203a7f8a9dd7e7844ab022ed5efc2dc1..e6a0ca42d0fa2446b300714372986da7e2013f16 100644
index be8942dcde0a1d7832e9f5256e9f4f317f2ae9a7..7d0a002dba31c5e5bdc4bbec0ef396280f0f3d89 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -372,6 +372,13 @@ component("base") {
@ -252,11 +238,11 @@ index 835cce73b7ab8b38c37d3e2650e12303d9d918e3..4460a00497dfaee0ba90cd5d14888055
+
#endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_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 4b06ace2dac87685a3a5b26ead3d977e035a9c21..faa5b59e81c463d93000b23dc2697192e9cedb1f 100644
index 3dd3793920853cff31ce62c833aefff58826f88c..bc00d9099c9033a09d97e19df37ca38e94b54713 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -31,7 +31,9 @@
#include "ui/views/window/dialog_observer.h"
@@ -34,7 +34,9 @@
#endif
@class NativeWidgetMacNSWindow;
+#if !IS_MAS_BUILD()
@ -265,60 +251,58 @@ index 4b06ace2dac87685a3a5b26ead3d977e035a9c21..faa5b59e81c463d93000b23dc2697192
@class NSView;
namespace remote_cocoa {
@@ -451,11 +453,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
@@ -454,10 +456,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
remote_ns_window_remote_;
+#if !IS_MAS_BUILD()
// Remote accessibility objects corresponding to the NSWindow and its root
// NSView.
base::scoped_nsobject<NSAccessibilityRemoteUIElement>
remote_window_accessible_;
base::scoped_nsobject<NSAccessibilityRemoteUIElement> remote_view_accessible_;
NSAccessibilityRemoteUIElement* __strong remote_window_accessible_;
NSAccessibilityRemoteUIElement* __strong remote_view_accessible_;
+#endif
// Used to force the NSApplication's focused accessibility element to be the
// 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
index b45cb06827fe2a7a6758c2abfaaa229b76dbd89d..fbef0073eb726349d39419d422d4519f258bb3a7 100644
index 5071b3625faecc8856d13227b2ec43eedca8e906..fdfaef4c1f2d4498134010d984cadb24999b4f87 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -340,7 +340,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -343,7 +343,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
if (in_process_ns_window_bridge_)
return in_process_ns_window_bridge_->ns_view();
+#if !IS_MAS_BUILD()
return remote_view_accessible_.get();
return remote_view_accessible_;
+#else
+ return nullptr;
+#endif
}
gfx::NativeViewAccessible
@@ -355,7 +359,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -358,7 +362,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
return [in_process_ns_window_bridge_->ns_view() window];
}
+#if !IS_MAS_BUILD()
return remote_window_accessible_.get();
return remote_window_accessible_;
+#else
+ return nullptr;
+#endif
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1327,6 +1335,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1330,20 +1338,24 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
+#if !IS_MAS_BUILD()
remote_window_accessible_.reset(
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token),
base::scoped_policy::RETAIN);
@@ -1336,14 +1345,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
[remote_view_accessible_
setTopLevelUIElement:remote_window_accessible_.get()];
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
remote_view_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(view_token);
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_];
[remote_view_accessible_ setTopLevelUIElement:remote_window_accessible_];
+#endif
}

View file

@ -16,11 +16,11 @@ cases where performance improves when disabling remote CoreAnimation (remote
CoreAnimation is really only about battery usage).
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h
index 6c0ab25b4faeee4095beaa10a57932021d690785..09fa4b7fb10790c2349edab7108e9d21536b35bf 100644
index c4eda85ebb59f2f9fc440c93590b99d1e8a16447..5f518ffa672ef62a94dd043e5bc4a53c8775defa 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.h
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
@@ -25,7 +25,9 @@
#include "gpu/ipc/service/gpu_vsync_mac.h"
@@ -28,7 +28,9 @@
#error "This file requires ARC support."
#endif
+#if !IS_MAS_BUILD()
@ -29,22 +29,22 @@ index 6c0ab25b4faeee4095beaa10a57932021d690785..09fa4b7fb10790c2349edab7108e9d21
@class CALayer;
namespace ui {
@@ -80,8 +82,10 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::Presenter {
@@ -83,8 +85,10 @@ class ImageTransportSurfaceOverlayMacEGL : public gl::Presenter {
base::WeakPtr<ImageTransportSurfaceDelegate> delegate_;
+#if !IS_MAS_BUILD()
const bool use_remote_layer_api_;
base::scoped_nsobject<CAContext> ca_context_;
CAContext* __strong ca_context_;
+#endif
std::unique_ptr<ui::CALayerTreeCoordinator> ca_layer_tree_coordinator_;
gfx::Size pixel_size_;
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
index 8c2c3758cdd7fb194db1360b98b59a08c781fc7b..bc05822738f3984b8c116fac9c152de3d1bee6d3 100644
index 02e4b8db0ff115cff405373529b417e982d79b4c..d136a2fa73afc891b5f2d9db0d5c53b0ed1790e2 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -55,7 +55,9 @@
@@ -57,7 +57,9 @@
ImageTransportSurfaceOverlayMacEGL::ImageTransportSurfaceOverlayMacEGL(
base::WeakPtr<ImageTransportSurfaceDelegate> delegate)
: delegate_(delegate),
@ -54,7 +54,7 @@ index 8c2c3758cdd7fb194db1360b98b59a08c781fc7b..bc05822738f3984b8c116fac9c152de3
scale_factor_(1),
weak_ptr_factory_(this) {
static bool av_disabled_at_command_line =
@@ -67,6 +69,7 @@
@@ -69,6 +71,7 @@
->workarounds()
.disable_av_sample_buffer_display_layer;
@ -62,9 +62,9 @@ index 8c2c3758cdd7fb194db1360b98b59a08c781fc7b..bc05822738f3984b8c116fac9c152de3
ca_layer_tree_coordinator_ = std::make_unique<ui::CALayerTreeCoordinator>(
use_remote_layer_api_, allow_av_sample_buffer_display_layer);
@@ -87,6 +90,10 @@
@@ -89,6 +92,10 @@
#endif
[ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()];
ca_context_.layer = ca_layer_tree_coordinator_->GetCALayerForDisplay();
}
+#else
+ ca_layer_tree_coordinator_ = std::make_unique<ui::CALayerTreeCoordinator>(
@ -73,7 +73,7 @@ index 8c2c3758cdd7fb194db1360b98b59a08c781fc7b..bc05822738f3984b8c116fac9c152de3
#if BUILDFLAG(IS_MAC)
if (features::UseGpuVsync()) {
@@ -177,9 +184,13 @@
@@ -180,9 +187,13 @@
TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers", TRACE_EVENT_SCOPE_THREAD,
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
"width", pixel_size_.width());
@ -88,20 +88,20 @@ index 8c2c3758cdd7fb194db1360b98b59a08c781fc7b..bc05822738f3984b8c116fac9c152de3
ca_layer_tree_coordinator_->GetIOSurfaceForDisplay();
if (io_surface) {
diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
index 8cd4cd65a02b3ca332f1d4164ff7c16cda10cdb8..bcd99c491085d3bfca4434c65ad53d2f6da51831 100644
index 9f4869f00f31c6d3ad5081b1e7b67c4cf495fbdd..228b8d2e8835dc3a4f0454521a2bbd523cfd8933 100644
--- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm
+++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
@@ -119,6 +119,7 @@ - (void)setContentsChanged;
@@ -124,6 +124,7 @@ - (void)setContentsChanged;
}
void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
+#if !IS_MAS_BUILD()
// Early-out if the remote layer has not changed.
if ([remote_layer_ contextId] == ca_context_id)
if (remote_layer_.contextId == ca_context_id) {
return;
@@ -149,6 +150,9 @@ - (void)setContentsChanged;
@@ -153,6 +154,9 @@ - (void)setContentsChanged;
[io_surface_layer_ removeFromSuperlayer];
io_surface_layer_.reset();
io_surface_layer_ = nil;
}
+#else
+ NOTREACHED() << "Remote layer is being used in MAS build";

View file

@ -7,17 +7,16 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be
excluded for people who want to submit their apps to the Mac App store.
diff --git a/base/process/process_info_mac.cc b/base/process/process_info_mac.cc
index 6840358c3187522c63dff66b5a85567aaadc5c12..72c57fbc5fbb267f96ff9e21915fb801ed5bf24e 100644
index 94a028be3c315edc0056408ab9ab41b6b001a1c1..0d830234edb5621f57e39f4a951d357a23f677c1 100644
--- a/base/process/process_info_mac.cc
+++ b/base/process/process_info_mac.cc
@@ -9,18 +9,22 @@
@@ -8,15 +8,21 @@
#include <stdlib.h>
#include <unistd.h>
+#if !IS_MAS_BUILD()
extern "C" {
pid_t responsibility_get_pid_responsible_for_pid(pid_t)
API_AVAILABLE(macosx(10.12));
pid_t responsibility_get_pid_responsible_for_pid(pid_t);
}
+#endif
@ -25,14 +24,14 @@ index 6840358c3187522c63dff66b5a85567aaadc5c12..72c57fbc5fbb267f96ff9e21915fb801
bool IsProcessSelfResponsible() {
+#if !IS_MAS_BUILD()
if (__builtin_available(macOS 10.14, *)) {
const pid_t pid = getpid();
return responsibility_get_pid_responsible_for_pid(pid) == pid;
}
const pid_t pid = getpid();
return responsibility_get_pid_responsible_for_pid(pid) == pid;
+#else
+ return true;
+#endif
return true;
}
} // namespace base
diff --git a/content/renderer/renderer_main_platform_delegate_mac.mm b/content/renderer/renderer_main_platform_delegate_mac.mm
index 22c7e07dffab64061d546aa537620c50948afec0..bf7f32fe6908ad5bf0186b0ad7a5e5ced88f21a5 100644
--- a/content/renderer/renderer_main_platform_delegate_mac.mm
@ -102,7 +101,7 @@ index b9788cf84caf5e151b124e4b3bea81cc906e0673..e4a884a2715be084d0d5ae8d75a3e613
} // namespace content
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index 79bf09102ab4ca9b0a5830132d98b7bd844b1c26..e2b20c0cda169d7b4af5c05b8797188955df8e3c 100644
index aa93fcc4de03d8032e9090ca8b66019eeb7be8b0..721e7083e94fa977908858c908274c8db49c07a0 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -41,6 +41,7 @@
@ -132,7 +131,7 @@ index 79bf09102ab4ca9b0a5830132d98b7bd844b1c26..e2b20c0cda169d7b4af5c05b87971889
classic_discovery_manager_(
BluetoothDiscoveryManagerMac::CreateClassic(this)),
device_paired_status_callback_(
@@ -253,8 +257,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
@@ -247,8 +251,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
}
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {

View file

@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement
session.setCertificateVerifyCallback.
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 5928eca7c9ef8ddf6ec6bdb949228d7bfc280b22..ea54a2ac9530b2872ecb213c6057a5f0abfb1c08 100644
index 1361678479bcfd74eb404e51fa703856a282689f..9f677b43d5cde549045bd0cf54e4ca0ba2faa9fb 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -142,6 +142,11 @@
@@ -145,6 +145,11 @@
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "url/gurl.h"
@ -22,7 +22,7 @@ index 5928eca7c9ef8ddf6ec6bdb949228d7bfc280b22..ea54a2ac9530b2872ecb213c6057a5f0
#if BUILDFLAG(IS_CT_SUPPORTED)
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
@@ -434,6 +439,99 @@ bool GetFullDataFilePath(
@@ -437,6 +442,99 @@ bool GetFullDataFilePath(
} // namespace
@ -122,7 +122,7 @@ index 5928eca7c9ef8ddf6ec6bdb949228d7bfc280b22..ea54a2ac9530b2872ecb213c6057a5f0
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
@@ -757,6 +855,13 @@ void NetworkContext::SetClient(
@@ -772,6 +870,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@ -136,7 +136,7 @@ index 5928eca7c9ef8ddf6ec6bdb949228d7bfc280b22..ea54a2ac9530b2872ecb213c6057a5f0
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2288,6 +2393,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2302,6 +2407,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
std::move(cert_verifier));
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
#endif // BUILDFLAG(IS_CHROMEOS)
@ -147,10 +147,10 @@ index 5928eca7c9ef8ddf6ec6bdb949228d7bfc280b22..ea54a2ac9530b2872ecb213c6057a5f0
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 9cac607573e5411c6dd8c2a6309ae78c2a1784f4..f10414f382b48ecc162b22d9638d948e3e719733 100644
index a8d304c683e42840ed4fa8e0521ca588af7c355e..c0b9be2dcf8ea32af184e7bb93a1577ae369ee27 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -114,6 +114,7 @@ class URLMatcher;
@@ -115,6 +115,7 @@ class URLMatcher;
namespace network {
class CertVerifierWithTrustAnchors;
@ -158,7 +158,7 @@ index 9cac607573e5411c6dd8c2a6309ae78c2a1784f4..f10414f382b48ecc162b22d9638d948e
class CookieManager;
class HostResolver;
class MdnsResponderManager;
@@ -247,6 +248,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -248,6 +249,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) override;
@ -167,7 +167,7 @@ index 9cac607573e5411c6dd8c2a6309ae78c2a1784f4..f10414f382b48ecc162b22d9638d948e
void ResetURLLoaderFactories() override;
void GetViaObliviousHttp(
mojom::ObliviousHttpRequestPtr request,
@@ -857,6 +860,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -878,6 +881,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::vector<base::OnceClosure> dismount_closures_;
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
@ -177,10 +177,10 @@ index 9cac607573e5411c6dd8c2a6309ae78c2a1784f4..f10414f382b48ecc162b22d9638d948e
std::unique_ptr<HostResolver> internal_host_resolver_;
// Map values set to non-null only if that HostResolver has its own private
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 85973a2d03302701e4429515d1629e3f2090177a..1ced7811390f72e4c29d998dadcc8c92fbeea818 100644
index 0be4cf9c74e82713dfaa81e8aa34f8ff507a6d6c..5551b9a414585a2f303d1368a83871b98ec46232 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -307,6 +307,17 @@ struct NetworkContextFilePaths {
@@ -311,6 +311,17 @@ struct NetworkContextFilePaths {
bool trigger_migration = false;
};
@ -198,7 +198,7 @@ index 85973a2d03302701e4429515d1629e3f2090177a..1ced7811390f72e4c29d998dadcc8c92
// Parameters for constructing a network context.
struct NetworkContextParams {
// The user agent string.
@@ -877,6 +888,9 @@ interface NetworkContext {
@@ -922,6 +933,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

View file

@ -113,7 +113,7 @@ index 9814861ab18fa88bc781f83acb602129b6f3de1f..1c5a2efc2749697aa3d38247f491eabf
}
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
index bbd2aa78722fc0a14ac815ca0243b83965ad8d7c..b6e0a2fce3a0fb9c449aa1bef6a0f970ef5c2d07 100644
index 64de8c4a00a3297b34ca052db7ce7b4778e8407f..9742a4c069679900c3dbbe6e36e0e959f8445b42 100644
--- a/content/browser/notifications/platform_notification_context_impl.h
+++ b/content/browser/notifications/platform_notification_context_impl.h
@@ -45,6 +45,7 @@ struct NotificationDatabaseData;
@ -133,10 +133,10 @@ index bbd2aa78722fc0a14ac815ca0243b83965ad8d7c..b6e0a2fce3a0fb9c449aa1bef6a0f970
const GURL& document_url,
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
index 7a873293b0ec83da11241e0ae407583d86efde8b..994b153f6e7e576d31456e2e63c58457c044c1bd 100644
index 75aec0b8a254543b8f0aa8dc9f3dab7aaac90f1f..69b48c4ae7c169af84922d7bc7e6f63429a238d5 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2220,7 +2220,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2230,7 +2230,7 @@ void RenderProcessHostImpl::CreateNotificationService(
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@ -145,7 +145,7 @@ index 7a873293b0ec83da11241e0ae407583d86efde8b..994b153f6e7e576d31456e2e63c58457
creator_type, std::move(receiver));
break;
}
@@ -2228,7 +2228,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2238,7 +2238,7 @@ void RenderProcessHostImpl::CreateNotificationService(
CHECK(rfh);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

View file

@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be
our autofill implementation to work like Chromium's.
diff --git a/ui/color/color_id.h b/ui/color/color_id.h
index 713dacb89ef7770449383cb8c5c83e679741a78d..0eaef82b4416e3fd4b51c71a544adb328084be39 100644
index ca8afffa9d67e1039a53e5867202d2d7bbc43f7e..71b47780514bd8a31d24cae91544a38ca7eff589 100644
--- a/ui/color/color_id.h
+++ b/ui/color/color_id.h
@@ -371,6 +371,10 @@
@@ -377,6 +377,10 @@
E_CPONLY(kColorScrollbarThumbInactive) \
E_CPONLY(kColorScrollbarThumbPressed) \
E_CPONLY(kColorScrollbarTrack) \
@ -22,7 +22,7 @@ index 713dacb89ef7770449383cb8c5c83e679741a78d..0eaef82b4416e3fd4b51c71a544adb32
E_CPONLY(kColorSegmentedButtonBorder) \
E_CPONLY(kColorSegmentedButtonFocus) \
E_CPONLY(kColorSegmentedButtonForegroundChecked) \
@@ -458,6 +462,7 @@
@@ -464,6 +468,7 @@
E_CPONLY(kColorTreeNodeForeground) \
E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \
@ -31,10 +31,10 @@ index 713dacb89ef7770449383cb8c5c83e679741a78d..0eaef82b4416e3fd4b51c71a544adb32
#if BUILDFLAG(IS_CHROMEOS)
diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc
index bd00e5b1a74e00bf9827c08f3ef615da827a328f..9d50c292c808688de27b4b173e07afd3e2887d4a 100644
index b1381d60447be969d3cf6d7027f1d88f00029826..86822f5483a25e606ac340d673682049616ca8ab 100644
--- a/ui/color/ui_color_mixer.cc
+++ b/ui/color/ui_color_mixer.cc
@@ -217,6 +217,17 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) {
@@ -224,6 +224,17 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) {
: SkColorSetA(SK_ColorBLACK, 0x80)};
mixer[kColorScrollbarTrack] = {dark_mode ? SkColorSetRGB(0x42, 0x42, 0x42)
: SkColorSetRGB(0xF1, 0xF1, 0xF1)};
@ -52,7 +52,7 @@ index bd00e5b1a74e00bf9827c08f3ef615da827a328f..9d50c292c808688de27b4b173e07afd3
mixer[kColorSeparator] = {kColorMidground};
mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800};
mixer[kColorShadowValueAmbientShadowElevationThree] =
@@ -315,6 +326,7 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) {
@@ -322,6 +333,7 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) {
mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground};
mixer[kColorTreeNodeForegroundSelectedUnfocused] = {
kColorTreeNodeForegroundSelectedFocused};
@ -61,10 +61,10 @@ index bd00e5b1a74e00bf9827c08f3ef615da827a328f..9d50c292c808688de27b4b173e07afd3
}
diff --git a/ui/color/win/native_color_mixers_win.cc b/ui/color/win/native_color_mixers_win.cc
index 186870aad74c0244c171f2dac28f6d4956fd8b2d..cb9a47b1988a30229b99f236b19cb49cc3e6cfa1 100644
index c698b842b496db488e9fd17a180d339ed5073a6c..8fc856f69cc6bbf06382c1873e9327255feeb8b6 100644
--- a/ui/color/win/native_color_mixers_win.cc
+++ b/ui/color/win/native_color_mixers_win.cc
@@ -201,6 +201,10 @@ void AddNativeUiColorMixer(ColorProvider* provider,
@@ -202,6 +202,10 @@ void AddNativeUiColorMixer(ColorProvider* provider,
SetAlpha(kColorNotificationInputForeground, gfx::kGoogleGreyAlpha700);
mixer[kColorSliderTrack] = AlphaBlend(
kColorNativeHighlight, kColorNativeWindow, gfx::kGoogleGreyAlpha400);
@ -75,7 +75,7 @@ index 186870aad74c0244c171f2dac28f6d4956fd8b2d..cb9a47b1988a30229b99f236b19cb49c
// Window Background
mixer[kColorBubbleFooterBackground] = {kColorNativeWindow};
@@ -209,6 +213,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
@@ -210,6 +214,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
mixer[kColorFrameInactive] = {ui::kColorNativeWindow};
mixer[kColorPrimaryBackground] = {kColorNativeWindow};
mixer[kColorTooltipBackground] = {kColorNativeWindow};
@ -83,7 +83,7 @@ index 186870aad74c0244c171f2dac28f6d4956fd8b2d..cb9a47b1988a30229b99f236b19cb49c
// Window Text
mixer[kColorAlertLowSeverity] = {kColorNativeWindowText};
@@ -222,6 +227,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
@@ -223,6 +228,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
mixer[kColorTableGroupingIndicator] = {kColorNativeWindowText};
mixer[kColorThrobber] = {kColorNativeWindowText};
mixer[kColorTooltipForeground] = {kColorNativeWindowText};
@ -91,7 +91,7 @@ index 186870aad74c0244c171f2dac28f6d4956fd8b2d..cb9a47b1988a30229b99f236b19cb49c
// Hyperlinks
mixer[kColorLinkForegroundDefault] = {kColorNativeHotlight};
@@ -264,6 +270,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
@@ -265,6 +271,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
mixer[kColorTextfieldForeground] = {kColorNativeBtnText};
mixer[kColorTextfieldForegroundPlaceholder] = {kColorNativeBtnText};
mixer[kColorTextfieldForegroundDisabled] = {kColorNativeBtnText};

View file

@ -10,7 +10,7 @@ in favor of defining PreconnectRequest in this file since we don't build
the header.
diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc
index 95e93892ba9c9e3b413a9551e117ceb5fe98dfe2..6d0dfc9053e8d4be6ee7e6ce11e1b62238dff123 100644
index 5f3823dac0ea94885b16bcc5d3b851500c7262d8..8a6f94536e87ad2fb1ff2428cf9174b77db90bf3 100644
--- a/chrome/browser/predictors/preconnect_manager.cc
+++ b/chrome/browser/predictors/preconnect_manager.cc
@@ -10,9 +10,11 @@

View file

@ -11,10 +11,10 @@ majority of changes originally come from these PRs:
This patch also fixes callback for manual user cancellation and success.
diff --git a/BUILD.gn b/BUILD.gn
index 08dae2813066a22c16c7cd524fa2c9747bf6ff40..de224c63c242c38b9d12c445a46483a1b2778944 100644
index 79cc0c5a844bf7a21b0b1910a3c7b6477f0c082a..d75a7b18de626d836a9044ebb6839ca9b3f2dfb7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -971,7 +971,6 @@ if (is_win) {
@@ -973,7 +973,6 @@ if (is_win) {
"//media:media_unittests",
"//media/midi:midi_unittests",
"//net:net_unittests",
@ -22,7 +22,7 @@ index 08dae2813066a22c16c7cd524fa2c9747bf6ff40..de224c63c242c38b9d12c445a46483a1
"//sql:sql_unittests",
"//third_party/breakpad:symupload($host_toolchain)",
"//ui/base:ui_base_unittests",
@@ -980,6 +979,10 @@ if (is_win) {
@@ -982,6 +981,10 @@ if (is_win) {
"//ui/views:views_unittests",
"//url:url_unittests",
]
@ -91,7 +91,7 @@ index 3a66a52b8d3c6da9cd8d7e9afdc8d59f528ec3d5..facaa6fbca8ee7c04f83607e62b81b95
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef43b693b0c 100644
index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b568dbb0cd 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -23,7 +23,9 @@
@ -245,7 +245,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
set_cookie(settings->params->document_cookie);
std::move(callback).Run(std::move(settings));
}
@@ -441,7 +478,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
@@ -442,7 +479,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
void PrintViewManagerBase::ScriptedPrintReply(
ScriptedPrintCallback callback,
int process_id,
@ -255,7 +255,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
#if BUILDFLAG(ENABLE_OOP_PRINTING)
@@ -456,12 +494,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
@@ -457,12 +495,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
return;
}
@ -267,13 +267,13 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
- std::move(callback).Run(std::move(params));
+ std::move(callback).Run(std::move(params), canceled);
} else {
set_cookie(0);
set_cookie(PrintSettings::NewInvalidCookie());
- std::move(callback).Run(nullptr);
+ std::move(callback).Run(nullptr, false);
}
}
@@ -598,10 +639,12 @@ void PrintViewManagerBase::DidPrintDocument(
@@ -599,10 +640,12 @@ void PrintViewManagerBase::DidPrintDocument(
void PrintViewManagerBase::GetDefaultPrintSettings(
GetDefaultPrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -286,7 +286,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
#if BUILDFLAG(ENABLE_OOP_PRINTING)
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
@@ -652,10 +695,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -654,10 +697,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
base::Value::Dict job_settings,
UpdatePrintSettingsCallback callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -299,7 +299,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
absl::optional<int> printer_type_value =
job_settings.FindInt(kSettingPrinterType);
@@ -666,6 +711,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -668,6 +713,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
mojom::PrinterType printer_type =
static_cast<mojom::PrinterType>(*printer_type_value);
@ -307,7 +307,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
if (printer_type != mojom::PrinterType::kExtension &&
printer_type != mojom::PrinterType::kPdf &&
printer_type != mojom::PrinterType::kLocal) {
@@ -685,6 +731,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -687,6 +733,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
if (value > 0)
job_settings.Set(kSettingRasterizePdfDpi, value);
}
@ -315,7 +315,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
std::unique_ptr<PrintSettings> print_settings =
PrintSettingsFromJobSettings(job_settings);
@@ -704,7 +751,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -706,7 +753,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
}
}
@ -338,7 +338,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
// TODO(crbug.com/1424368): Remove this if the printable areas can be made
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
// for in-browser queries.
@@ -726,15 +787,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
@@ -728,15 +789,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
}
#endif
@ -355,7 +355,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
}
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
@@ -750,14 +809,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
@@ -752,14 +811,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
// didn't happen for some reason.
bad_message::ReceivedBadMessage(
render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
@ -372,7 +372,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
return;
}
#endif
@@ -792,6 +851,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
@@ -795,6 +854,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
PrintManager::PrintingFailed(cookie, reason);
@ -380,7 +380,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
// `PrintingFailed()` can occur because asynchronous compositing results
// don't complete until after a print job has already failed and been
// destroyed. In such cases the error notification to the user will
@@ -801,7 +861,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
@@ -804,7 +864,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
print_job_->document()->cookie() == cookie) {
ShowPrintErrorDialogForGenericError();
}
@ -389,7 +389,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
ReleasePrinterQuery();
}
@@ -813,15 +873,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
@@ -816,15 +876,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
test_observers_.RemoveObserver(&observer);
}
@ -414,7 +414,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
}
void PrintViewManagerBase::RenderFrameDeleted(
@@ -873,7 +942,12 @@ void PrintViewManagerBase::OnJobDone() {
@@ -876,7 +945,12 @@ void PrintViewManagerBase::OnJobDone() {
// Printing is done, we don't need it anymore.
// print_job_->is_job_pending() may still be true, depending on the order
// of object registration.
@ -428,7 +428,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
ReleasePrintJob();
}
@@ -882,9 +956,10 @@ void PrintViewManagerBase::OnCanceling() {
@@ -885,9 +959,10 @@ void PrintViewManagerBase::OnCanceling() {
}
void PrintViewManagerBase::OnFailed() {
@ -440,7 +440,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
TerminatePrintJob(true);
}
@@ -894,7 +969,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
@@ -897,7 +972,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
// Is the document already complete?
if (print_job_->document() && print_job_->document()->IsComplete()) {
@ -449,7 +449,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
return true;
}
@@ -942,7 +1017,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -945,7 +1020,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
// Disconnect the current `print_job_`.
auto weak_this = weak_ptr_factory_.GetWeakPtr();
@ -461,7 +461,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
if (!weak_this)
return false;
@@ -963,7 +1041,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -966,7 +1044,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
#endif
print_job_->AddObserver(*this);
@ -470,7 +470,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
return true;
}
@@ -1031,6 +1109,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -1034,6 +1112,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
}
#endif
@ -482,7 +482,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
if (!print_job_)
return;
@@ -1038,7 +1121,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -1041,7 +1124,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
// printing_rfh_ should only ever point to a RenderFrameHost with a live
// RenderFrame.
DCHECK(rfh->IsRenderFrameLive());
@ -491,7 +491,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
}
print_job_->RemoveObserver(*this);
@@ -1080,7 +1163,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
@@ -1083,7 +1166,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
}
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@ -500,7 +500,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
return true;
if (!cookie) {
@@ -1224,7 +1307,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
@@ -1227,7 +1310,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
}
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
@ -509,7 +509,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
for (auto& observer : GetTestObservers()) {
observer.OnPrintNow(rfh);
@@ -1274,7 +1357,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
@@ -1277,7 +1360,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
set_analyzing_content(/*analyzing*/ false);
if (!allowed || !printing_rfh_ || IsCrashed() ||
!printing_rfh_->IsRenderFrameLive()) {
@ -519,7 +519,7 @@ index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef4
}
CompleteScriptedPrint(printing_rfh_, std::move(params), std::move(callback));
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49cfa1c003f 100644
index fcee7b58a8eebd9fc044bab51a5d0e540de0de7d..160b5a6ad2d5cb6e0292f9ff1d16ee556d950880 100644
--- a/chrome/browser/printing/print_view_manager_base.h
+++ b/chrome/browser/printing/print_view_manager_base.h
@@ -47,6 +47,8 @@ namespace printing {
@ -531,7 +531,7 @@ index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49c
// Base class for managing the print commands for a WebContents.
class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
public:
@@ -80,7 +82,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -83,7 +85,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// Prints the current document immediately. Since the rendering is
// asynchronous, the actual printing will not be completed on the return of
// this function. Returns false if printing is impossible at the moment.
@ -543,7 +543,7 @@ index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49c
// Like PrintNow(), but for the node under the context menu, instead of the
// entire frame.
@@ -136,8 +141,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -139,8 +144,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
void IsPrintingEnabled(IsPrintingEnabledCallback callback) override;
void ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
ScriptedPrintCallback callback) override;
@ -554,7 +554,7 @@ index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49c
// Adds and removes observers for `PrintViewManagerBase` events. The order in
// which notifications are sent to observers is undefined. Observers must be
@@ -145,6 +152,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -148,6 +155,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
void AddTestObserver(TestObserver& observer);
void RemoveTestObserver(TestObserver& observer);
@ -569,7 +569,7 @@ index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49c
protected:
explicit PrintViewManagerBase(content::WebContents* web_contents);
@@ -272,6 +287,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -275,6 +290,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
bool success);
#endif
void CompleteUpdatePrintSettings(
@ -577,7 +577,7 @@ index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49c
base::Value::Dict job_settings,
std::unique_ptr<PrintSettings> print_settings,
UpdatePrintSettingsCallback callback);
@@ -301,7 +317,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -304,7 +320,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// Runs `callback` with `params` to reply to ScriptedPrint().
void ScriptedPrintReply(ScriptedPrintCallback callback,
int process_id,
@ -587,7 +587,7 @@ index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49c
// Requests the RenderView to render all the missing pages for the print job.
// No-op if no print job is pending. Returns true if at least one page has
@@ -371,8 +388,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
@@ -374,8 +391,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
// The current RFH that is printing with a system printing dialog.
raw_ptr<content::RenderFrameHost> printing_rfh_ = nullptr;
@ -601,7 +601,7 @@ index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49c
// Indication that the job is getting canceled.
bool canceling_job_ = false;
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
index 0b6ff160cc0537d4e75ecfdc3ab3fc881888bbc9..8ca904943942de2d5ff4b194976e606a60ced16c 100644
index 85e2d8c9161b4c6b122371a5a17b844c0660bb39..7bcedc3c75e5c77c1c00f0124b44e9d145646e08 100644
--- a/chrome/browser/printing/printer_query.cc
+++ b/chrome/browser/printing/printer_query.cc
@@ -355,17 +355,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
@ -919,10 +919,10 @@ index 0fea424325081a0ef6720000841ea321b89024d0..c700de4b81fc0c157946e76faedaca6b
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Set options for print preset from source PDF document.
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 853c976d87eb2bc571a270bfe2ca5922ed21a6ee..723e937150ce59cf72cc5800ca2af82b0686a534 100644
index 8e96ddd9e574d162f00814a7ae311c49d396819a..9f8f97981311eb58ccc57118fdab978b080f34b6 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -2905,8 +2905,9 @@ source_set("browser") {
@@ -2907,8 +2907,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]

View file

@ -30,10 +30,10 @@ index fe010b1f001130fbdeaf4ef9ce7798e4baf958b5..28f1305f439be7f669e482ac0e4804c0
// RenderWidgetHost on the primary main frame, and false otherwise.
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 2d705b183b1014a6f8dc89672b327d619ac52b1a..7107c17a8f36688d245b4cad5ee92dfcedd2485e 100644
index 025965f6171b3ddd77d6adcf4eb4c711544c81db..0501178b4ec494cbeccd95428ecdd85623503c81 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2118,6 +2118,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
@@ -2107,6 +2107,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_) {
view_->UpdateCursor(cursor);
}
@ -44,10 +44,10 @@ index 2d705b183b1014a6f8dc89672b327d619ac52b1a..7107c17a8f36688d245b4cad5ee92dfc
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index e1650b721e8c0c444347879f324014becc7f8223..3c3c9912b747f4b5f4b8b72f070f39de66c21bfd 100644
index 2b888be4850f4fad3bb9c43102dbb4da57227208..4893c65e3046b393532bbd2f372c4321a6e87560 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4799,6 +4799,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -4849,6 +4849,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@ -60,10 +60,10 @@ index e1650b721e8c0c444347879f324014becc7f8223..3c3c9912b747f4b5f4b8b72f070f39de
RenderWidgetHostImpl* render_widget_host) {
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
index f96c4b958d4d69d11bb00cd0b0cd4ee8aed9e0b5..bac4973df0890fbd29d015573550898056d552ec 100644
index 03e5d14ace4bac50fefba5513359305fcf0e2f6b..ef178f74c75b917318f4ebdcf098ac123dc0bc16 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -977,6 +977,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
@@ -993,6 +993,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
void SendScreenRects() override;
void SendActiveState(bool active) override;
TextInputManager* GetTextInputManager() override;
@ -72,7 +72,7 @@ index f96c4b958d4d69d11bb00cd0b0cd4ee8aed9e0b5..bac4973df0890fbd29d0155735508980
RenderWidgetHostImpl* render_widget_host) override;
bool IsShowingContextMenuOnPage() const override;
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 9694d1854873eaea76807ee761c43f21137f0bd2..fc70e75b3b6edcddd95a9960219ffc9b5ec798cc 100644
index 73efe4a951d560e0f7a3d1271b6b7b18fb87b49c..952a56513e7c3f4db019964d8a90f604deaa498e 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -30,6 +30,7 @@
@ -83,7 +83,7 @@ index 9694d1854873eaea76807ee761c43f21137f0bd2..fc70e75b3b6edcddd95a9960219ffc9b
#include "ui/base/page_transition_types.h"
#include "ui/base/window_open_disposition.h"
@@ -560,6 +561,9 @@ class CONTENT_EXPORT WebContentsObserver {
@@ -571,6 +572,9 @@ class CONTENT_EXPORT WebContentsObserver {
// Invoked when the primary main frame changes size.
virtual void PrimaryMainFrameWasResized(bool width_changed) {}

View file

@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch
... something to do with OSR? and maybe <webview> as well? terrifying.
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index d7ff9f7303d80635de3add7477cd8611b6aa0afc..4650d3074a9ae3b8936ba37a1204b748e464c64e 100644
index f1d50fba17a0a7be9e183467863ad9555438d1f6..8ebc730affa1ecd09426aa23c22f55f95bf07162 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -683,6 +683,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
@@ -684,6 +684,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
return false;
}

View file

@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
Additionally, disables usage of some private APIs in MAS builds.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index fffe1327634f7bad0ccbd4022f157b03c03ea87a..becb4fddc31bf7778a3bb61fa64251747ef4103d 100644
index df227a4f7a6717d4c60102f44b6457b1d619baa3..4472a474a7e5771698e53c9e89618352c58d8c0e 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -156,6 +156,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -161,6 +161,15 @@ void ExtractUnderlines(NSAttributedString* string,
} // namespace
@ -29,7 +29,7 @@ index fffe1327634f7bad0ccbd4022f157b03c03ea87a..becb4fddc31bf7778a3bb61fa6425174
// RenderWidgetHostViewCocoa ---------------------------------------------------
// Private methods:
@@ -595,6 +604,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
@@ -748,6 +757,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@ -39,7 +39,7 @@ index fffe1327634f7bad0ccbd4022f157b03c03ea87a..becb4fddc31bf7778a3bb61fa6425174
return [self acceptsMouseEventsWhenInactive];
}
@@ -671,6 +683,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
@@ -824,6 +836,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
// its parent view.
BOOL hitSelf = NO;
while (view) {
@ -50,7 +50,7 @@ index fffe1327634f7bad0ccbd4022f157b03c03ea87a..becb4fddc31bf7778a3bb61fa6425174
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -990,6 +1006,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -1143,6 +1159,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSEventTypeKeyDown &&
!(modifierFlags & NSEventModifierFlagCommand);
@ -61,7 +61,7 @@ index fffe1327634f7bad0ccbd4022f157b03c03ea87a..becb4fddc31bf7778a3bb61fa6425174
// We only handle key down events and just simply forward other events.
if (eventType != NSEventTypeKeyDown) {
_hostHelper->ForwardKeyboardEvent(event, latency_info);
@@ -1820,9 +1840,11 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -1974,15 +1994,21 @@ - (NSAccessibilityRole)accessibilityRole {
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@ -73,15 +73,13 @@ index fffe1327634f7bad0ccbd4022f157b03c03ea87a..becb4fddc31bf7778a3bb61fa6425174
- (NSArray*)validAttributesForMarkedText {
// This code is just copied from WebKit except renaming variables.
@@ -1831,7 +1853,10 @@ - (NSArray*)validAttributesForMarkedText {
initWithObjects:NSUnderlineStyleAttributeName,
NSUnderlineColorAttributeName,
NSMarkedClauseSegmentAttributeName,
- NSTextInputReplacementRangeAttributeName, nil]);
static NSArray* const kAttributes = @[
NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName,
+#if !IS_MAS_BUILD()
+ NSTextInputReplacementRangeAttributeName,
NSMarkedClauseSegmentAttributeName, NSTextInputReplacementRangeAttributeName
+#else
+ NSMarkedClauseSegmentAttributeName
+#endif
+ nil]);
}
return _validAttributesForMarkedText.get();
];
return kAttributes;
}

View file

@ -52,10 +52,10 @@ Some alternatives to this patch:
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index a0db274a53134fb1f1085185fc1030f6bc78917b..884bccba58c66861b43b3b50a7535cba543302e2 100644
index 1940c81f4acb9fdaee605abe64adf424bd6e3632..bfb799ebe63f9134604c1343a215405d0dff0cca 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1599,7 +1599,7 @@ if (is_chrome_branded && !is_android) {
@@ -1617,7 +1617,7 @@ if (is_chrome_branded && !is_android) {
}
}
@ -64,7 +64,7 @@ index a0db274a53134fb1f1085185fc1030f6bc78917b..884bccba58c66861b43b3b50a7535cba
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1628,6 +1628,12 @@ if (!is_android) {
@@ -1646,6 +1646,12 @@ if (!is_android) {
}
}

View file

@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
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
index 994b153f6e7e576d31456e2e63c58457c044c1bd..865769b29edd5b2651f3baaecca2d0fcfde9ab8d 100644
index 69b48c4ae7c169af84922d7bc7e6f63429a238d5..37fdd04d9738c699db8c9140600f90e8523de93e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1905,9 +1905,15 @@ bool RenderProcessHostImpl::Init() {
@@ -1915,9 +1915,15 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
*cmd_line, IsPdf(), IsJitDisabled());

View file

@ -9,10 +9,10 @@ is needed for OSR.
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
index a8dfcc826dd3a74c15e2699a59bde9e9867cc69e..8560ba622ae17bbd89944c67ab951652cc1835ff 100644
index a974151f5880e1a78d5cde849b637e2d512a3d78..d806c7b3feb19c94de4622c543ba39b728423524 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3243,6 +3243,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3270,6 +3270,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create());
@ -26,7 +26,7 @@ index a8dfcc826dd3a74c15e2699a59bde9e9867cc69e..8560ba622ae17bbd89944c67ab951652
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3253,6 +3260,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3280,6 +3287,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}

View file

@ -24,10 +24,10 @@ index 18ad2b559dc7a19a75747f4a722b1df49f718990..5917786d2809860f2b1e6e302920e59e
////////////////////////////////////////////////////////////////////////////////
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
index 786f17d53f81bd534b156e9959cfd9ed1c28d725..68adff99738dc2c215cf5f9532e95266e6239faa 100644
index a9c529375474c66c35ed509f77b20cd0f4464057..4a461468cea5e3ee210d0ab3916a6f493b428b93 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -386,9 +386,7 @@ - (void)resetDragStartTrackers {
@@ -426,9 +426,7 @@ - (void)resetDragStartTrackers {
}
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {

View file

@ -14,10 +14,10 @@ Note that we also need to manually update embedder's
`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
index b52964fe166e60d5104cabc524a0b36502839927..4eedf6d5033d68c309a94cffbe575daa9e1222f7 100644
index 99fb67d9d2e9c0018fef2df765de1d8546bbb93d..0c0e7a0269ad029238c5a58ef6ec7326df30b355 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -7061,6 +7061,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -7217,6 +7217,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}

View file

@ -26,10 +26,10 @@ index a4130ad4dc8158f8256b55fdd87f577687135626..3139aa65807cee23f0e8dbc85243566e
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 134a4b1f1ce8f4771bfaaf7592343f59f851e1c7..f5faa3686173ffd22c3b106872a4b86ab8cbe3de 100644
index 1b248fb88e20b37c85736eaa89306dc94d907d2d..6a26fc9b7ed3334fa8333e53d07bd8b35c878998 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -792,6 +792,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -795,6 +795,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}

View file

@ -35,10 +35,10 @@ index 3139aa65807cee23f0e8dbc85243566ef9de89b9..19707edb1283f2432f3c0059f80fabd5
// from the worker thread.
virtual void WillDestroyWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index f5faa3686173ffd22c3b106872a4b86ab8cbe3de..d303895c4f6a94e0c518178d01e7947247b70ed6 100644
index 6a26fc9b7ed3334fa8333e53d07bd8b35c878998..8143ebc389d95489beef0856fb9fc397f9264696 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -804,6 +804,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -807,6 +807,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}

View file

@ -36,10 +36,10 @@ index b22591ee606ef449817aef1f9bd5ff0c024d1c05..a14c0e0a381ae838d44d4c7f2cc252c2
import '../../ui/legacy/components/source_frame/source_frame-meta.js';
import '../../panels/console_counters/console_counters-meta.js';
diff --git a/front_end/ui/legacy/BUILD.gn b/front_end/ui/legacy/BUILD.gn
index c0ff2a3161a654589c90077e2c1d50cfa8a0aba0..1e1204d315736c44d2299aeb33052e735efc08fa 100644
index 38efc67f3e34aead6e80730736353672dbf8e5b8..0368f531ea70efcbb51c9433bcdf8e3e6d69c19b 100644
--- a/front_end/ui/legacy/BUILD.gn
+++ b/front_end/ui/legacy/BUILD.gn
@@ -185,5 +185,6 @@ devtools_entrypoint("legacy") {
@@ -187,5 +187,6 @@ devtools_entrypoint("legacy") {
visibility = [
"../..:legacy_entrypoints",
"../../legacy_test_runner/*",

View file

@ -36,3 +36,4 @@ fix_preventing_potential_oob_in_ada_no_scheme_parsing.patch
chore_remove_--no-harmony-atomics_related_code.patch
fix_account_for_createexternalizablestring_v8_global.patch
fix_wunreachable-code_warning_in_ares_init_rand_engine.patch
fix_-wshadow_warning.patch

View file

@ -0,0 +1,46 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Fri, 7 Jul 2023 11:28:19 -0500
Subject: fix: -Wshadow warning
In utils.h's `ERROR_AND_ABORT` macro, rename the static local variable
`args` to avoid -Wshadow warnings in code that calls `ERROR_AND_ABORT()`
or `CHECK()` from a function that already has an `args` variable.
This patch could be removed after upstreaming to Node.js.
Example warning:
In file included from ../../third_party/electron_node/src/inspector/runtime_agent.cc:3:
In file included from ../../third_party/electron_node/src/env-inl.h:32:
../../third_party/electron_node/src/node_internals.h:72:3: error: declaration shadows a local variable [-Werror,-Wshadow]
72 | CHECK(args[0]->IsObject());
| ^
../../third_party/electron_node/src/util.h:154:7: note: expanded from macro 'CHECK'
154 | ERROR_AND_ABORT(expr); \
| ^
../../third_party/electron_node/src/util.h:132:38: note: expanded from macro 'ERROR_AND_ABORT'
132 | static const node::AssertionInfo args = { \
| ^
../../third_party/electron_node/src/node_internals.h:67:67: note: previous declaration is here
67 | void GetSockOrPeerName(const v8::FunctionCallbackInfo<v8::Value>& args) {
| ^
1 error generated.
diff --git a/src/util.h b/src/util.h
index b1750f7b718f664153a96aa90be6efd94a46cda0..aef06b22076f4a288b00d348ee47d5978d41e75b 100644
--- a/src/util.h
+++ b/src/util.h
@@ -129,10 +129,10 @@ void DumpBacktrace(FILE* fp);
do { \
/* Make sure that this struct does not end up in inline code, but */ \
/* rather in a read-only data section when modifying this code. */ \
- static const node::AssertionInfo args = { \
+ static const node::AssertionInfo error_and_abort_args = { \
__FILE__ ":" STRINGIFY(__LINE__), #expr, PRETTY_FUNCTION_NAME \
}; \
- node::Assert(args); \
+ node::Assert(error_and_abort_args); \
} while (0)
#ifdef __GNUC__

View file

@ -6,7 +6,7 @@ Subject: JSON.parse errors made user-friendly
Update tests for https://chromium-review.googlesource.com/c/v8/v8/+/3513684
diff --git a/test/es-module/test-esm-data-urls.js b/test/es-module/test-esm-data-urls.js
index 5be45d0f7af3b6dd483fe3b185c76e41a1bf533b..c20dd4f9067203bf40d35c92c2ef1bb27ec14b99 100644
index 5be45d0f7af3b6dd483fe3b185c76e41a1bf533b..a99dde30c3d977dfc226a33f632f5f69638892af 100644
--- a/test/es-module/test-esm-data-urls.js
+++ b/test/es-module/test-esm-data-urls.js
@@ -76,7 +76,7 @@ function createBase64URL(mime, body) {
@ -14,7 +14,7 @@ index 5be45d0f7af3b6dd483fe3b185c76e41a1bf533b..c20dd4f9067203bf40d35c92c2ef1bb2
{ assert: { type: 'json' } }), {
name: 'SyntaxError',
- message: /Unexpected end of JSON input/
+ message: 'data:application/json;foo="test,",0: Unterminated string in JSON at position 3'
+ message: 'data:application/json;foo="test,",0: Unterminated string in JSON at position 3 (line 1 column 4)'
});
}
{

View file

@ -9,10 +9,10 @@ necessary for native modules to load.
Also change visibility on mksnapshot in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index d0194c7215176cf00a69bfeca826e08b386223d2..c9484114c5d359d0a783572eb80278615528a92e 100644
index 5ad9387ca5db2f41d5040e82ddead0e7dc94c980..f42d82ee866d26123d64cafcc78ce64dfb203c05 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -729,7 +729,7 @@ config("internal_config") {
@@ -732,7 +732,7 @@ config("internal_config") {
":cppgc_header_features",
]
@ -21,7 +21,7 @@ index d0194c7215176cf00a69bfeca826e08b386223d2..c9484114c5d359d0a783572eb8027861
defines += [ "BUILDING_V8_SHARED" ]
}
@@ -6620,7 +6620,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6674,7 +6674,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@ -30,7 +30,7 @@ index d0194c7215176cf00a69bfeca826e08b386223d2..c9484114c5d359d0a783572eb8027861
deps = [
":v8_libbase",
@@ -6632,7 +6632,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6686,7 +6686,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View file

@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
contain any standard C++ library exports (e.g. `std::ostringstream`).
diff --git a/BUILD.gn b/BUILD.gn
index c9484114c5d359d0a783572eb80278615528a92e..4f10220aa95caee26e09d6a483a2239036e5c1bb 100644
index f42d82ee866d26123d64cafcc78ce64dfb203c05..17b6241d4428eb27cf478193909bde21ee99e50f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -729,6 +729,10 @@ config("internal_config") {
@@ -732,6 +732,10 @@ config("internal_config") {
":cppgc_header_features",
]

View file

@ -1865,7 +1865,7 @@ bool WebContents::EmitNavigationEvent(
content::RenderFrameHost* initiator_frame_host =
navigation_handle->GetInitiatorFrameToken().has_value()
? content::RenderFrameHost::FromFrameToken(
navigation_handle->GetInitiatorProcessID(),
navigation_handle->GetInitiatorProcessId(),
navigation_handle->GetInitiatorFrameToken().value())
: nullptr;

View file

@ -8,9 +8,9 @@
#include <string>
#include <utility>
#include "base/apple/bridging.h"
#include "base/apple/bundle_locations.h"
#include "base/i18n/rtl.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#include "base/mac/mac_util.mm"
#include "base/mac/scoped_cftyperef.h"
@ -36,6 +36,10 @@
#include "ui/gfx/image/image.h"
#include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
namespace {
@ -52,14 +56,15 @@ NSString* GetAppPathForProtocol(const GURL& url) {
URLWithString:base::SysUTF8ToNSString(url.possibly_invalid_spec())];
base::ScopedCFTypeRef<CFErrorRef> out_err;
base::ScopedCFTypeRef<CFURLRef> openingApp(LSCopyDefaultApplicationURLForURL(
(CFURLRef)ns_url, kLSRolesAll, out_err.InitializeInto()));
base::ScopedCFTypeRef<CFURLRef> openingApp(
LSCopyDefaultApplicationURLForURL(base::apple::NSToCFPtrCast(ns_url),
kLSRolesAll, out_err.InitializeInto()));
if (out_err) {
// likely kLSApplicationNotFoundErr
return nullptr;
}
NSString* app_path = [base::mac::CFToNSCast(openingApp.get()) path];
NSString* app_path = [base::apple::CFToNSPtrCast(openingApp.get()) path];
return app_path;
}
@ -178,7 +183,7 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
return false;
NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()];
CFStringRef protocol_cf = base::mac::NSToCFCast(protocol_ns);
CFStringRef protocol_cf = base::apple::NSToCFPtrCast(protocol_ns);
// TODO(codebytere): Use -[NSWorkspace URLForApplicationToOpenURL:] instead
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@ -200,7 +205,7 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
// No other app was found set it to none instead of setting it back to itself.
if ([identifier isEqualToString:(__bridge NSString*)other]) {
other = base::mac::NSToCFCast(@"None");
other = base::apple::NSToCFPtrCast(@"None");
}
OSStatus return_code = LSSetDefaultHandlerForURLScheme(protocol_cf, other);
@ -217,8 +222,9 @@ bool Browser::SetAsDefaultProtocolClient(const std::string& protocol,
return false;
NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()];
OSStatus return_code = LSSetDefaultHandlerForURLScheme(
base::mac::NSToCFCast(protocol_ns), base::mac::NSToCFCast(identifier));
OSStatus return_code =
LSSetDefaultHandlerForURLScheme(base::apple::NSToCFPtrCast(protocol_ns),
base::apple::NSToCFPtrCast(identifier));
return return_code == noErr;
}
@ -236,8 +242,8 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
// TODO(codebytere): Use -[NSWorkspace URLForApplicationToOpenURL:] instead
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
base::ScopedCFTypeRef<CFStringRef> bundleId(
LSCopyDefaultHandlerForURLScheme(base::mac::NSToCFCast(protocol_ns)));
base::ScopedCFTypeRef<CFStringRef> bundleId(LSCopyDefaultHandlerForURLScheme(
base::apple::NSToCFPtrCast(protocol_ns)));
#pragma clang diagnostic pop
if (!bundleId)
return false;
@ -245,7 +251,7 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
// Ensure the comparison is case-insensitive
// as LS does not persist the case of the bundle id.
NSComparisonResult result =
[base::mac::CFToNSCast(bundleId) caseInsensitiveCompare:identifier];
[base::apple::CFToNSPtrCast(bundleId) caseInsensitiveCompare:identifier];
return result == NSOrderedSame;
}

View file

@ -121,25 +121,22 @@ BrowserContext* ElectronExtensionsBrowserClient::GetOriginalContext(
}
content::BrowserContext*
ElectronExtensionsBrowserClient::GetRedirectedContextInIncognito(
ElectronExtensionsBrowserClient::GetContextRedirectedToOriginal(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) {
bool force_guest_profile) {
return GetOriginalContext(context);
}
content::BrowserContext*
ElectronExtensionsBrowserClient::GetContextForRegularAndIncognito(
content::BrowserContext* ElectronExtensionsBrowserClient::GetContextOwnInstance(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) {
bool force_guest_profile) {
return context;
}
content::BrowserContext* ElectronExtensionsBrowserClient::GetRegularProfile(
content::BrowserContext*
ElectronExtensionsBrowserClient::GetContextForOriginalOnly(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) {
bool force_guest_profile) {
return context->IsOffTheRecord() ? nullptr : context;
}

View file

@ -56,18 +56,15 @@ class ElectronExtensionsBrowserClient
content::BrowserContext* context) override;
content::BrowserContext* GetOriginalContext(
content::BrowserContext* context) override;
content::BrowserContext* GetRedirectedContextInIncognito(
content::BrowserContext* GetContextRedirectedToOriginal(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) override;
content::BrowserContext* GetContextForRegularAndIncognito(
bool force_guest_profile) override;
content::BrowserContext* GetContextOwnInstance(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) override;
content::BrowserContext* GetRegularProfile(
bool force_guest_profile) override;
content::BrowserContext* GetContextForOriginalOnly(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) override;
bool force_guest_profile) override;
bool IsGuestSession(content::BrowserContext* context) const override;
bool IsExtensionIncognitoEnabled(
const std::string& extension_id,

View file

@ -17,11 +17,11 @@
#include "base/supports_user_data.h"
#include "content/public/browser/desktop_media_id.h"
#include "content/public/browser/web_contents_user_data.h"
#include "electron/shell/common/api/api.mojom.h"
#include "extensions/browser/app_window/size_constraints.h"
#include "shell/browser/draggable_region_provider.h"
#include "shell/browser/native_window_observer.h"
#include "shell/browser/ui/inspectable_web_contents_view.h"
#include "shell/common/api/api.mojom.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/views/widget/widget_delegate.h"

View file

@ -12,8 +12,8 @@
#include <vector>
#include "base/mac/scoped_nsobject.h"
#include "electron/shell/common/api/api.mojom.h"
#include "shell/browser/native_window.h"
#include "shell/common/api/api.mojom.h"
#include "ui/display/display_observer.h"
#include "ui/native_theme/native_theme_observer.h"
#include "ui/views/controls/native/native_view_host.h"

View file

@ -52,6 +52,10 @@
#include "ui/views/widget/widget.h"
#include "ui/views/window/native_frame_view_mac.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@interface ElectronProgressBar : NSProgressIndicator
@end
@ -450,12 +454,6 @@ void NativeWindowMac::Close() {
void NativeWindowMac::CloseImmediately() {
RemoveChildFromParentWindow(this);
// Retain the child window before closing it. If the last reference to the
// NSWindow goes away inside -[NSWindow close], then bad stuff can happen.
// See e.g. http://crbug.com/616701.
base::scoped_nsobject<NSWindow> child_window(window_,
base::scoped_policy::RETAIN);
[window_ close];
}
@ -1330,13 +1328,13 @@ void NativeWindowMac::SetProgressBar(double progress,
// For the first time API invoked, we need to create a ContentView in
// DockTile.
if (first_time) {
NSImageView* image_view = [[[NSImageView alloc] init] autorelease];
NSImageView* image_view = [[NSImageView alloc] init];
[image_view setImage:[NSApp applicationIconImage]];
[dock_tile setContentView:image_view];
NSRect frame = NSMakeRect(0.0f, 0.0f, dock_tile.size.width, 15.0);
NSProgressIndicator* progress_indicator =
[[[ElectronProgressBar alloc] initWithFrame:frame] autorelease];
[[ElectronProgressBar alloc] initWithFrame:frame];
[progress_indicator setStyle:NSProgressIndicatorStyleBar];
[progress_indicator setIndeterminate:NO];
[progress_indicator setBezeled:YES];
@ -1483,8 +1481,8 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
vibrancy_type_ = type;
if (vibrantView == nil) {
vibrantView = [[[NSVisualEffectView alloc]
initWithFrame:[[window_ contentView] bounds]] autorelease];
vibrantView = [[NSVisualEffectView alloc]
initWithFrame:[[window_ contentView] bounds]];
[window_ setVibrantView:vibrantView];
[vibrantView

View file

@ -6,7 +6,6 @@
#include <utility>
#include "components/viz/common/resources/resource_format.h"
#include "components/viz/common/resources/resource_sizes.h"
#include "mojo/public/cpp/system/platform_handle.h"
#include "skia/ext/platform_canvas.h"

View file

@ -17,6 +17,10 @@
#include "ui/views/cocoa/native_widget_mac_ns_window_host.h"
#include "ui/views/widget/native_widget_mac.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
using TitleBarStyle = electron::NativeWindowMac::TitleBarStyle;
using FullScreenTransitionState =
electron::NativeWindow::FullScreenTransitionState;
@ -324,9 +328,9 @@ using FullScreenTransitionState =
NSWindow* window = shell_->GetNativeWindow().GetNativeNSWindow();
NSWindow* sheetParent = [window sheetParent];
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
FROM_HERE, base::BindOnce(base::RetainBlock(^{
FROM_HERE, base::BindOnce(^{
[sheetParent endSheet:window];
})));
}));
}
// Clears the delegate when window is going to be closed, since EL Capitan it

View file

@ -8,7 +8,7 @@
#include <memory>
#include <vector>
#include "shell/common/api/api.mojom.h"
#include "electron/shell/common/api/api.mojom.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/image/image.h"

View file

@ -181,8 +181,7 @@ void ElectronDesktopWindowTreeHostLinux::UpdateClientDecorationHints(
gfx::Rect input_bounds(view->GetWidget()->GetWindowBoundsInScreen().size());
input_bounds.Inset(insets + input_insets);
gfx::Rect scaled_bounds = gfx::ScaleToEnclosingRect(input_bounds, scale);
window->SetInputRegion(&scaled_bounds);
window->SetInputRegion(gfx::ScaleToEnclosingRect(input_bounds, scale));
if (should_set_opaque_region) {
// The opaque region is a list of rectangles that contain only fully
@ -224,8 +223,8 @@ void ElectronDesktopWindowTreeHostLinux::UpdateClientDecorationHints(
// Convert the region to a list of rectangles.
std::vector<gfx::Rect> opaque_region;
for (SkRegion::Iterator i(region); !i.done(); i.next())
opaque_region.push_back(gfx::SkIRectToRect(i.rect()));
window->SetOpaqueRegion(&opaque_region);
opaque_region.emplace_back(gfx::SkIRectToRect(i.rect()));
window->SetOpaqueRegion(opaque_region);
}
}

View file

@ -9,7 +9,7 @@
#include <string>
#include "base/memory/raw_ptr.h"
#include "shell/common/api/api.mojom.h"
#include "electron/shell/common/api/api.mojom.h"
#include "ui/gfx/native_widget_types.h"
class DevToolsContentsResizingStrategy;

View file

@ -194,7 +194,8 @@ GlobalMenuBarX11::~GlobalMenuBarX11() {
// static
std::string GlobalMenuBarX11::GetPathForWindow(x11::Window window) {
return base::StringPrintf("/com/canonical/menu/%X", window);
return base::StringPrintf("/com/canonical/menu/%X",
static_cast<uint>(window));
}
void GlobalMenuBarX11::SetMenu(ElectronMenuModel* menu_model) {

View file

@ -20,7 +20,9 @@ std::string ApplicationInfoDictionaryValue(NSString* key) {
}
std::string ApplicationInfoDictionaryValue(CFStringRef key) {
return ApplicationInfoDictionaryValue(base::mac::CFToNSCast(key));
NSString* key_ns =
const_cast<NSString*>(reinterpret_cast<const NSString*>(key));
return ApplicationInfoDictionaryValue(key_ns);
}
} // namespace

View file

@ -30,8 +30,9 @@ namespace {
// thread safe, including LSGetApplicationForURL (> 10.2) and
// NSWorkspace#openURLs.
std::string OpenURL(NSURL* ns_url, bool activate) {
CFURLRef ref = LSCopyDefaultApplicationURLForURL(
base::mac::NSToCFCast(ns_url), kLSRolesAll, nullptr);
CFURLRef cf_url = reinterpret_cast<CFURLRef>(ns_url);
CFURLRef ref =
LSCopyDefaultApplicationURLForURL(cf_url, kLSRolesAll, nullptr);
// If no application could be found, NULL is returned and outError
// (if not NULL) is populated with kLSApplicationNotFoundErr.