зеркало из https://github.com/electron/electron.git
chore: bump chromium to 117.0.5923.0 (main) (#39304)
* chore: bump chromium in DEPS to 117.0.5921.0 * chore: update chromium patches * 4721409: Remove redundant ARC configuration in /components | https://chromium-review.googlesource.com/c/chromium/src/+/4721409 * 4643750: Add V8_LOW_PRIORITY_TQ for main thread | https://chromium-review.googlesource.com/c/chromium/src/+/4643750 * 4022621: Re-register status item when owner of status watcher is changed | https://chromium-review.googlesource.com/c/chromium/src/+/4022621 * chore: update V8/boringssl patches * fixup! 4643750: Add V8_LOW_PRIORITY_TQ for main thread | https://chromium-review.googlesource.com/c/chromium/src/+/4643750 * chore: bump chromium in DEPS to 117.0.5923.0 * build [debug]: remove assert 4722125: Update enterprise content analysis buildflags usage | https://chromium-review.googlesource.com/c/chromium/src/+/4722125 * chore: manually rollback to 117.0.5921.0 * build [arc]: ARC conversion in auto_updater * build [arc]: ARC conversion in browser/api * build [arc]: ARC conversion in notifications/mac * build [arc]: ARC conversion in in_app_purchase * build [arc]: ARC conversion in browser/ui * build [arc]: ARC conversion in ui/cocoa * build [arc]: ARC conversion in shell/common * build [arc]: ARC conversion in OSR * build [arc]: ARC conversion in login_helper * build [arc]: ARC conversion in app_mas * build [arc]: fix up ARC syntax (thanks @codebytere!) * 4726946: [Extensions] Work around dangling BrowserContext pointer. | https://chromium-review.googlesource.com/c/chromium/src/+/4726946 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
This commit is contained in:
Родитель
6d0e8044eb
Коммит
c5b9f766f3
2
DEPS
2
DEPS
|
@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
|||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'117.0.5911.0',
|
||||
'117.0.5921.0',
|
||||
'node_version':
|
||||
'v18.16.1',
|
||||
'nan_version':
|
||||
|
|
|
@ -52,3 +52,7 @@ use_perfetto_client_library = false
|
|||
|
||||
# Disables the builtins PGO for V8
|
||||
v8_builtins_profiling_log_file = ""
|
||||
|
||||
# https://chromium.googlesource.com/chromium/src/+/main/docs/dangling_ptr.md
|
||||
# TODO(vertedinde): hunt down dangling pointers on Linux
|
||||
enable_dangling_raw_ptr_checks = false
|
||||
|
|
|
@ -20,7 +20,7 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57
|
|||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index 26ffd5036cb9b15b741d20d83fc9143f1bb4e835..5446aecd69a7bac07f8f9d9d8c88e3ae881ac830 100644
|
||||
index 5a2ac2a8f586f2b90e4eb2989b05406a5e434769..2cac586039713df70e57eee5ecedbfc9f8d33510 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1333,7 +1333,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
|
@ -32,7 +32,7 @@ index 26ffd5036cb9b15b741d20d83fc9143f1bb4e835..5446aecd69a7bac07f8f9d9d8c88e3ae
|
|||
return SSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
// An EOF was observed which violates the protocol, and the underlying
|
||||
@@ -2695,13 +2695,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
@@ -2697,13 +2697,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,6 @@ preconnect_manager.patch
|
|||
fix_remove_caption-removing_style_call.patch
|
||||
build_allow_electron_to_use_exec_script.patch
|
||||
build_only_use_the_mas_build_config_in_the_required_components.patch
|
||||
fix_tray_icon_gone_on_lock_screen.patch
|
||||
chore_introduce_blocking_api_for_electron.patch
|
||||
chore_patch_out_partition_attribute_dcheck_for_webviews.patch
|
||||
expose_v8initializer_codegenerationcheckcallbackinmainthread.patch
|
||||
|
@ -132,3 +131,4 @@ fix_return_v8_value_from_localframe_requestexecutescript.patch
|
|||
fix_harden_blink_scriptstate_maybefrom.patch
|
||||
chore_add_buildflag_guard_around_new_include.patch
|
||||
fix_use_delegated_generic_capturer_when_available.patch
|
||||
build_remove_ent_content_analysis_assert.patch
|
||||
|
|
|
@ -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 6aecc6c215cb33bf4b0f2cd38a79ebeef6be527d..a1a8cde301a8ea24bae61f816cb0325a04f4994f 100644
|
||||
index abaf6b2c59058b670d1989be3693d7d69557e850..8866b3d54dc8c044a4bb08c6e233701207597cbb 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4474,6 +4474,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4476,6 +4476,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ index 6aecc6c215cb33bf4b0f2cd38a79ebeef6be527d..a1a8cde301a8ea24bae61f816cb0325a
|
|||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 8c1f15b99b3b41b97d8ba54699b0ee77fbf35735..0db3fc212093fbf372c569db3db8d9ef1042fb32 100644
|
||||
index 91a8fdd2b9b931b21f725208cfc78a2fd4c0818e..26758f9fefd09ad75841b5fcba0c7aeabcbd3ce2 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -611,6 +611,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
|
|
|
@ -7,12 +7,12 @@ 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 c728df1b5421b749af10a076fdbd8ffe691114b9..51c538ad91482f2b164016e2de8946aba2bb6ac9 100755
|
||||
index 81dd367a1a3f0b59832406e97e3eb0b869741a34..2fbe3091c32dd1b3771711b84c86eaab67fd7a0e 100755
|
||||
--- a/tools/licenses/licenses.py
|
||||
+++ b/tools/licenses/licenses.py
|
||||
@@ -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",
|
||||
|
|
|
@ -7,10 +7,10 @@ This is used by editors to obtain the filesystem path from a dragged file. See
|
|||
documentation at https://electronjs.org/docs/api/file-object
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
|
||||
index 2cc436a725f13d3fdf5b5eed6af73695d3c19953..b11c146fc86e55324b61a057d45b96e8c96b304b 100644
|
||||
index 355ce2e090c60a38cd22750958710e138009d1f5..a9b1b7307f7f91d50d9a750455503381961c7cf7 100644
|
||||
--- a/third_party/blink/renderer/core/fileapi/file.h
|
||||
+++ b/third_party/blink/renderer/core/fileapi/file.h
|
||||
@@ -206,6 +206,9 @@ class CORE_EXPORT File final : public Blob {
|
||||
@@ -215,6 +215,9 @@ class CORE_EXPORT File final : public Blob {
|
||||
}
|
||||
const String& name() const { return name_; }
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ 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 5f5b127adaa95894722768a3300455f6c086bba7..8cb40ed9c41d438463e18793ee6dd112b59d823c 100644
|
||||
index 84372d274225a4ef5787def680fecf6e50ef7c96..280fbb5608ffcd5bec33483c99a1a112a16a0c24 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -665,10 +665,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
|
|
@ -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 eb2393eb9a6459a2d7dfdcfe6379817be3139074..ef99c6bc6c1cd16cc8ef1bd88da55bf6961f31fd 100644
|
||||
index db3cf20b2951445986474e9f54981715ad3cd613..ab2bf2dbb35d6360a773881cb619507405222e81 100644
|
||||
--- a/third_party/boringssl/BUILD.gn
|
||||
+++ b/third_party/boringssl/BUILD.gn
|
||||
@@ -49,6 +49,20 @@ config("no_asm_config") {
|
||||
|
|
|
@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
|
|||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index da966a58b11be318770fccdd14986efd2a92ccf8..2a7ea1edd970a205ec5f16c66b5722282f2bcf59 100644
|
||||
index 1ddaeafd2779a40a56c11b2e0b22e057c578bd0a..0f52af2a437c548fd85b82b313cf2826f4dea590 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -80,6 +80,8 @@
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script
|
|||
This is similar to the //build usecase so we're OK adding ourselves here
|
||||
|
||||
diff --git a/.gn b/.gn
|
||||
index a9b0a5a827fc831f73ea9866d2411a05a3783144..58c13358cac40340f4fa51c9fce531c334a68fb0 100644
|
||||
index 16bf620b7c2ee2d2a850f892ad232f7c888f2649..8a428da676bfb993cf8f6c85cd966fa79925011d 100644
|
||||
--- a/.gn
|
||||
+++ b/.gn
|
||||
@@ -165,4 +165,6 @@ exec_script_whitelist =
|
||||
@@ -159,4 +159,6 @@ exec_script_whitelist =
|
||||
|
||||
"//tools/grit/grit_rule.gni",
|
||||
"//tools/gritsettings/BUILD.gn",
|
||||
|
|
|
@ -9,7 +9,7 @@ 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 161dfbb8ab6071417202daeaa859951c3e59719b..94182390984fd2d4e8384b2476862373fc97afd0 100644
|
||||
index 622af2267251b3161f500e10ec667c184139285a..0c1a4e12483838ae3cbfb425173d8cd892eeee94 100644
|
||||
--- a/build_overrides/partition_alloc.gni
|
||||
+++ b/build_overrides/partition_alloc.gni
|
||||
@@ -46,7 +46,7 @@ _disable_partition_alloc_everywhere =
|
||||
|
|
|
@ -13,7 +13,7 @@ This patch can be removed when enable_print_content_analysis can be more
|
|||
easily enabled or disabled by default with buildflags.
|
||||
|
||||
diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni
|
||||
index a826dfe8918d70293b001acfd4fc7f4af83e5cdb..436e19e7f0ebc77440583fd16ba2aa740be044ae 100644
|
||||
index 8d1aa0153c7b33066fbeb2679fcf1a32549389c3..a96831301d9e60e73092a095d42fecc0a8019144 100644
|
||||
--- a/printing/buildflags/buildflags.gni
|
||||
+++ b/printing/buildflags/buildflags.gni
|
||||
@@ -48,7 +48,7 @@ declare_args() {
|
||||
|
|
|
@ -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 2153df7bef066da7851bd1cc6375faaeee2f4537..1c138a0f3dfc9c99333aababe4d36b215992e731 100644
|
||||
index 7e99d7493ac1f9281668eb3283f7475769245021..3b11f490c77fb667e40c30e7d61e484df1e9972f 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -202,11 +202,16 @@ if (!is_android && !is_mac) {
|
||||
|
@ -33,10 +33,10 @@ index 2153df7bef066da7851bd1cc6375faaeee2f4537..1c138a0f3dfc9c99333aababe4d36b21
|
|||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 07f0f0f97e0dc608513e7f532746f0f9a78e6a94..2dcfb98422d580908882540c01efc3cd05f164ae 100644
|
||||
index 20c93fe2fff92b9cb3989ce6d0639f018f121c33..85df12f08f7b5a131d00b871ae533c0bc88f1634 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4652,7 +4652,7 @@ static_library("browser") {
|
||||
@@ -4651,7 +4651,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 07f0f0f97e0dc608513e7f532746f0f9a78e6a94..2dcfb98422d580908882540c01efc3cd
|
|||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 974ec1a5cd3f06d63b4453dc719446c8b1af5787..1fe92ce6472ef393716d75ec17ee9e56d043ec4e 100644
|
||||
index c72ffb36b34ae3c7b2939a316e9d960a079a70fe..3056493bad516a97d4b4678ca7ff68918a27c150 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6716,7 +6716,6 @@ test("unit_tests") {
|
||||
@@ -6715,7 +6715,6 @@ test("unit_tests") {
|
||||
|
||||
deps += [
|
||||
"//chrome:other_version",
|
||||
|
@ -57,7 +57,7 @@ index 974ec1a5cd3f06d63b4453dc719446c8b1af5787..1fe92ce6472ef393716d75ec17ee9e56
|
|||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -6742,6 +6741,10 @@ test("unit_tests") {
|
||||
@@ -6741,6 +6740,10 @@ test("unit_tests") {
|
||||
"//ui/resources",
|
||||
]
|
||||
|
||||
|
@ -68,7 +68,7 @@ index 974ec1a5cd3f06d63b4453dc719446c8b1af5787..1fe92ce6472ef393716d75ec17ee9e56
|
|||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
@@ -7695,7 +7698,6 @@ test("unit_tests") {
|
||||
@@ -7696,7 +7699,6 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
|
@ -76,7 +76,7 @@ index 974ec1a5cd3f06d63b4453dc719446c8b1af5787..1fe92ce6472ef393716d75ec17ee9e56
|
|||
"//chrome/browser/apps:icon_standardizer",
|
||||
"//chrome/browser/apps/app_service",
|
||||
"//chrome/browser/apps/app_service:test_support",
|
||||
@@ -7781,6 +7783,10 @@ test("unit_tests") {
|
||||
@@ -7782,6 +7784,10 @@ test("unit_tests") {
|
||||
"//ui/webui/resources/js/browser_command:mojo_bindings",
|
||||
]
|
||||
|
||||
|
@ -86,4 +86,4 @@ index 974ec1a5cd3f06d63b4453dc719446c8b1af5787..1fe92ce6472ef393716d75ec17ee9e56
|
|||
+
|
||||
data += [ "//ash/components/arc/test/data/icons/" ]
|
||||
|
||||
if (include_js_tests) {
|
||||
if (include_js2gtest_tests) {
|
||||
|
|
|
@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
|
|||
rebuild the entire tree.
|
||||
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 6ee83a41a05488f016f86f90b026835f4b19ea54..63b32e52a11af599dbc5154ed353e2bf7250e9d3 100644
|
||||
index b7c498f5b29a7fe8f674257dc9c912514a25253a..968276e781288e92ed87eaba43dba67b4475115c 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
|
|
|
@ -6,7 +6,7 @@ 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 173283fa984ed8a6d4fc24287e70450d2806a321..2f5b2b23a33924d8d80d2bc3ce5d9d9f550df3bf 100644
|
||||
index ac26cc76c6e78a241b8fb29aa98250b2b99c76cd..8671ecc36caff3a253b2f097f5912298b6ebdf8d 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1034,6 +1034,7 @@ component("base") {
|
||||
|
@ -18,7 +18,7 @@ index 173283fa984ed8a6d4fc24287e70450d2806a321..2f5b2b23a33924d8d80d2bc3ce5d9d9f
|
|||
|
||||
deps = [
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 63b32e52a11af599dbc5154ed353e2bf7250e9d3..fc6ed0cdbe211cb29dd5a1dded36b3b0a6912ce9 100644
|
||||
index 968276e781288e92ed87eaba43dba67b4475115c..05f2f3084cac5bf3e806a03401475667848afd04 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -355,7 +355,6 @@ default_compiler_configs = [
|
||||
|
@ -30,20 +30,19 @@ index 63b32e52a11af599dbc5154ed353e2bf7250e9d3..fc6ed0cdbe211cb29dd5a1dded36b3b0
|
|||
|
||||
if (is_win) {
|
||||
diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn
|
||||
index 7ed10085264af6f50b05e51dd93c49e3828d5b3b..d8c77f52376a13af7636e64ff0b5cf58f4fbcf97 100644
|
||||
index f3e2ea6d0430df493fcebab6d6271299a2307b69..d01a9f2cbd5aa8de768c9c1e765c464bd31a115a 100644
|
||||
--- a/components/os_crypt/sync/BUILD.gn
|
||||
+++ b/components/os_crypt/sync/BUILD.gn
|
||||
@@ -48,6 +48,8 @@ component("os_crypt") {
|
||||
@@ -47,6 +47,7 @@ component("os_crypt") {
|
||||
"keychain_password_mac.mm",
|
||||
"os_crypt_mac.mm",
|
||||
]
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
+
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn
|
||||
index c52c741205d140fbe8b3be02974c89ea22c2365f..9460c656f71e24044ffccc55053a04b8f23f15e9 100644
|
||||
index 0625f07f317de46af619fdb279be78d9ecdc0029..5897820839d6d57ada22a83fe753e3a6b3d752de 100644
|
||||
--- a/components/remote_cocoa/app_shim/BUILD.gn
|
||||
+++ b/components/remote_cocoa/app_shim/BUILD.gn
|
||||
@@ -16,6 +16,7 @@ component("app_shim") {
|
||||
|
@ -55,10 +54,10 @@ index c52c741205d140fbe8b3be02974c89ea22c2365f..9460c656f71e24044ffccc55053a04b8
|
|||
"alert.h",
|
||||
"alert.mm",
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index fa72a9170a7e41ae475b05653be99af59d4eaebb..b5c39b57a61a6595b842c52da8489bdbf2420b2c 100644
|
||||
index 440fa0b3ff9b08016ff19ab54c70a453dc8c5f86..2e2f358829bf0492fd3e44173eeb7d0b5507b388 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -332,6 +332,7 @@ viz_component("service") {
|
||||
@@ -331,6 +331,7 @@ viz_component("service") {
|
||||
"frame_sinks/external_begin_frame_source_mac.h",
|
||||
]
|
||||
}
|
||||
|
@ -66,17 +65,16 @@ index fa72a9170a7e41ae475b05653be99af59d4eaebb..b5c39b57a61a6595b842c52da8489bdb
|
|||
}
|
||||
|
||||
if (is_android || use_ozone) {
|
||||
@@ -590,6 +591,8 @@ viz_source_set("unit_tests") {
|
||||
@@ -588,6 +589,7 @@ viz_source_set("unit_tests") {
|
||||
"display_embedder/software_output_device_mac_unittest.mm",
|
||||
]
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
frameworks = [ "IOSurface.framework" ]
|
||||
+
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 183c520baa855d3065f34f3bc90c8c590237192c..7f587f6e743e312898ca81908d1f85856ef3bd09 100644
|
||||
index 88eca71122353752154a29e4f54693c3ac13f930..4540aff3ac4a06f76d332322fe87618f8a5cb6d0 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -56,6 +56,7 @@ source_set("browser") {
|
||||
|
@ -88,7 +86,7 @@ index 183c520baa855d3065f34f3bc90c8c590237192c..7f587f6e743e312898ca81908d1f8585
|
|||
libs = []
|
||||
frameworks = []
|
||||
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
|
||||
index aa1ae523aee045fb1db412a42af8aadb97e9ee2a..e5fe6c0212721a67d67b17ee8871eb92e339f845 100644
|
||||
index dce27cfa39b52e39a95cee658584ed80ab1953ef..366edd2e86edcdbb30ae4c0fa952b5d9aab38f8a 100644
|
||||
--- a/content/common/BUILD.gn
|
||||
+++ b/content/common/BUILD.gn
|
||||
@@ -174,6 +174,7 @@ source_set("common") {
|
||||
|
@ -100,10 +98,10 @@ index aa1ae523aee045fb1db412a42af8aadb97e9ee2a..e5fe6c0212721a67d67b17ee8871eb92
|
|||
public_deps = [
|
||||
":mojo_bindings",
|
||||
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
|
||||
index 65714a5dca013794527640645d8eb2ce36049ac6..b2df50b4cd64816ddf9c5b7e222c47b60304f01e 100644
|
||||
index 62117d9c83972003d0483ed9fc6efad6a4490a75..246d7289fd5727886054e182e17520c5ce5a7916 100644
|
||||
--- a/content/renderer/BUILD.gn
|
||||
+++ b/content/renderer/BUILD.gn
|
||||
@@ -228,6 +228,7 @@ target(link_target_type, "renderer") {
|
||||
@@ -224,6 +224,7 @@ target(link_target_type, "renderer") {
|
||||
}
|
||||
|
||||
configs += [ "//content:content_implementation" ]
|
||||
|
@ -112,10 +110,10 @@ index 65714a5dca013794527640645d8eb2ce36049ac6..b2df50b4cd64816ddf9c5b7e222c47b6
|
|||
|
||||
public_deps = [
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
index a779b02aefe3d26e5193d6cecef1675ef5937a4d..34ddd9c1b0ef8cd6ed866cd1ba1e033b9fef6023 100644
|
||||
index 23b9f9008046f957c19bc169cc87defa49af46b3..72a11a958c3aecec43737d41d3a2219ac7416f8a 100644
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -475,6 +475,7 @@ static_library("test_support") {
|
||||
@@ -477,6 +477,7 @@ static_library("test_support") {
|
||||
configs += [
|
||||
"//build/config:precompiled_headers",
|
||||
"//v8:external_startup_data",
|
||||
|
@ -124,7 +122,7 @@ index a779b02aefe3d26e5193d6cecef1675ef5937a4d..34ddd9c1b0ef8cd6ed866cd1ba1e033b
|
|||
|
||||
public_deps = [
|
||||
diff --git a/content/web_test/BUILD.gn b/content/web_test/BUILD.gn
|
||||
index 382a502c61183862bc2c943f7f8ac3958311754d..79610173fa83cc4d2c2041bd6e8a124836b3a844 100644
|
||||
index 5fcb135fdcdee5022e5caed46dece4e304495bfe..83cc95b1086b0619be019d7b797f3395910884b7 100644
|
||||
--- a/content/web_test/BUILD.gn
|
||||
+++ b/content/web_test/BUILD.gn
|
||||
@@ -145,6 +145,8 @@ static_library("web_test_browser") {
|
||||
|
@ -133,26 +131,26 @@ index 382a502c61183862bc2c943f7f8ac3958311754d..79610173fa83cc4d2c2041bd6e8a1248
|
|||
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
+
|
||||
if (is_apple) {
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
}
|
||||
if (is_mac) {
|
||||
sources += [
|
||||
"browser/web_test_browser_main_platform_support_mac.mm",
|
||||
diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn
|
||||
index f619de1d332d7f0c5d6d30be17f5c6b94dadf6a3..4b1bbe5a804ef0d844eaf246942129e7753ea0f5 100644
|
||||
index 1a8164c2ef7d6b24c4feb19ce3f3b5e970885541..e9122ac24b7b5f9359a89953fa24364a0115bdf6 100644
|
||||
--- a/device/bluetooth/BUILD.gn
|
||||
+++ b/device/bluetooth/BUILD.gn
|
||||
@@ -242,6 +242,7 @@ component("bluetooth") {
|
||||
@@ -241,6 +241,7 @@ component("bluetooth") {
|
||||
"IOKit.framework",
|
||||
"Foundation.framework",
|
||||
]
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn
|
||||
index 911cc3f4764a7a61e599a41a2dd2812d07b867f7..1257e7de947195ed6f8a9906b5a9e26a7bd6216b 100644
|
||||
index 550cf601dcb65e710e9dab6fb5023119b52b5278..18e60732057a3695858b17d6faef13927f869726 100644
|
||||
--- a/gpu/ipc/service/BUILD.gn
|
||||
+++ b/gpu/ipc/service/BUILD.gn
|
||||
@@ -139,6 +139,7 @@ component("service") {
|
||||
@@ -138,6 +138,7 @@ component("service") {
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
defines += [ "GL_SILENCE_DEPRECATION" ]
|
||||
|
@ -161,10 +159,10 @@ index 911cc3f4764a7a61e599a41a2dd2812d07b867f7..1257e7de947195ed6f8a9906b5a9e26a
|
|||
if (is_ios) {
|
||||
sources += [ "image_transport_surface_ios.mm" ]
|
||||
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
|
||||
index fbed855d14713ec3507b62d86d37b7be9969581e..b08bdea30ad4e5caf26f59c66c34fd63cd6207e4 100644
|
||||
index 93cf87a37792691f41d7c611104a378d9af45195..2d3a0f923f4991be41534e7f951fe5dfcceda5c9 100644
|
||||
--- a/media/audio/BUILD.gn
|
||||
+++ b/media/audio/BUILD.gn
|
||||
@@ -203,6 +203,7 @@ source_set("audio") {
|
||||
@@ -199,6 +199,7 @@ source_set("audio") {
|
||||
"mac/coreaudio_dispatch_override.h",
|
||||
]
|
||||
frameworks += [ "AudioUnit.framework" ]
|
||||
|
@ -214,10 +212,10 @@ 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 6c01341efc1e8a7f3ae13ea5c0abab5f757b104c..2299d118d763193a2500978541d12d5f1aa712ab 100644
|
||||
index 7b327be8a003ae01f79f71f00979ef0b2f45ac2a..ab84abb8c6ad1250de2beac0370427f84e1cbb41 100644
|
||||
--- a/third_party/blink/renderer/core/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/core/BUILD.gn
|
||||
@@ -307,6 +307,7 @@ component("core") {
|
||||
@@ -308,6 +308,7 @@ component("core") {
|
||||
configs -= core_config_remove
|
||||
configs += core_config_add
|
||||
configs += [ "//v8:external_startup_data" ]
|
||||
|
@ -226,10 +224,10 @@ index 6c01341efc1e8a7f3ae13ea5c0abab5f757b104c..2299d118d763193a2500978541d12d5f
|
|||
public_deps = [
|
||||
":core_generated",
|
||||
diff --git a/ui/accelerated_widget_mac/BUILD.gn b/ui/accelerated_widget_mac/BUILD.gn
|
||||
index d361b9686e66014f2333f8a4f6b6819bb52ececd..a67c517acbd1d25fe1ac114ef3ca8d481b2184ad 100644
|
||||
index 3ead42e14ad9d41a30c5637678a3ac49296ce2a6..8dec61ee6a62e54ec3c8c5dd5e08601c28d04dfe 100644
|
||||
--- a/ui/accelerated_widget_mac/BUILD.gn
|
||||
+++ b/ui/accelerated_widget_mac/BUILD.gn
|
||||
@@ -35,6 +35,8 @@ component("accelerated_widget_mac") {
|
||||
@@ -33,6 +33,8 @@ component("accelerated_widget_mac") {
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
|
||||
|
@ -239,10 +237,10 @@ index d361b9686e66014f2333f8a4f6b6819bb52ececd..a67c517acbd1d25fe1ac114ef3ca8d48
|
|||
sources += [ "ca_layer_frame_sink_provider.h" ]
|
||||
}
|
||||
diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn
|
||||
index 0d3fdc9b8cdff853b54e413de98800142be332d2..de65225a25ce6d6d3ff531c5c53d225993f7170a 100644
|
||||
index 4e23c38763184840a393589b3f55dcabb0db8121..e4ad30d0d7acecdca3a22fe05935a3406d784a95 100644
|
||||
--- a/ui/accessibility/platform/BUILD.gn
|
||||
+++ b/ui/accessibility/platform/BUILD.gn
|
||||
@@ -253,6 +253,7 @@ component("platform") {
|
||||
@@ -251,6 +251,7 @@ component("platform") {
|
||||
weak_frameworks = [
|
||||
"Accessibility.framework", # macOS 11
|
||||
]
|
||||
|
@ -251,7 +249,7 @@ index 0d3fdc9b8cdff853b54e413de98800142be332d2..de65225a25ce6d6d3ff531c5c53d2259
|
|||
|
||||
if (use_atk) {
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 0d07c88cb9fec014b727b5294a03671d183943ea..0d869fbc084773630f63380bb87e2ae6ee5b1ea9 100644
|
||||
index 614ae2d72c934f0f6650a501b7d132f5745f767e..ff4302c344ede0021c7379efeb17e2a1111cdce0 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -355,6 +355,7 @@ component("base") {
|
||||
|
@ -263,7 +261,7 @@ index 0d07c88cb9fec014b727b5294a03671d183943ea..0d869fbc084773630f63380bb87e2ae6
|
|||
|
||||
if (is_apple) {
|
||||
diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn
|
||||
index e37e8a6f980a9eb522eea2191be2691d49a9638d..8fcfcfdec68e0c591abd58dbde957d2dbccf491f 100644
|
||||
index 7e17546f658ce0e6908f7dea499eac31e5295895..85c5fe7e25a84de5342d3d9b8cd20d195dd2b159 100644
|
||||
--- a/ui/display/BUILD.gn
|
||||
+++ b/ui/display/BUILD.gn
|
||||
@@ -67,6 +67,10 @@ component("display") {
|
||||
|
@ -278,7 +276,7 @@ index e37e8a6f980a9eb522eea2191be2691d49a9638d..8fcfcfdec68e0c591abd58dbde957d2d
|
|||
|
||||
if (is_win) {
|
||||
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
|
||||
index e66e2339ea3cb8b2b80ef3f0b09dcc53a2240339..07e11afb172ecbb24c04f25f87c11bdc5c91cd58 100644
|
||||
index 0829ee9a58400dea171c99e0784607305092aa92..eaa938d159ed43539ca29c863318cd35b94a5531 100644
|
||||
--- a/ui/gfx/BUILD.gn
|
||||
+++ b/ui/gfx/BUILD.gn
|
||||
@@ -194,6 +194,7 @@ component("gfx") {
|
||||
|
@ -290,10 +288,10 @@ index e66e2339ea3cb8b2b80ef3f0b09dcc53a2240339..07e11afb172ecbb24c04f25f87c11bdc
|
|||
if (is_win) {
|
||||
sources += [
|
||||
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
|
||||
index 002c180d97ced4c5711f6d432c2c09108bcbc69c..6d52e99b6f9414a907fa3b74fc2930795510d086 100644
|
||||
index 06cc420c752d1690ef2864b203721ba4c38e7f89..0fe2cb7ea7f15edd31db9e047fcb0cd9ddb5d1ed 100644
|
||||
--- a/ui/views/BUILD.gn
|
||||
+++ b/ui/views/BUILD.gn
|
||||
@@ -686,6 +686,7 @@ component("views") {
|
||||
@@ -685,6 +685,7 @@ component("views") {
|
||||
"IOSurface.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
|
@ -301,7 +299,7 @@ index 002c180d97ced4c5711f6d432c2c09108bcbc69c..6d52e99b6f9414a907fa3b74fc293079
|
|||
}
|
||||
|
||||
if (is_win) {
|
||||
@@ -1105,6 +1106,8 @@ source_set("test_support") {
|
||||
@@ -1104,6 +1105,8 @@ source_set("test_support") {
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
|
@ -311,14 +309,13 @@ index 002c180d97ced4c5711f6d432c2c09108bcbc69c..6d52e99b6f9414a907fa3b74fc293079
|
|||
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 349d94b5b14e346d5bb73b53567fbfee12198dc6..998178845e241c8b45a3ef8ad542d10a4e687831 100644
|
||||
index e3dd4fab3a1cac0138f8dac60247e0ea3343e87e..998178845e241c8b45a3ef8ad542d10a4e687831 100644
|
||||
--- a/ui/views/controls/webview/BUILD.gn
|
||||
+++ b/ui/views/controls/webview/BUILD.gn
|
||||
@@ -19,7 +19,10 @@ component("webview") {
|
||||
@@ -19,6 +19,10 @@ component("webview") {
|
||||
|
||||
if (is_mac) {
|
||||
sources += [ "unhandled_keyboard_event_handler_mac.mm" ]
|
||||
- configs += [ "//build/config/compiler:enable_arc" ]
|
||||
+ configs += [
|
||||
+ "//build/config/compiler:enable_arc",
|
||||
+ "//electron/build/config:mas_build",
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Keeley Hammond <vertedinde@electronjs.org>
|
||||
Date: Tue, 1 Aug 2023 11:27:30 -0700
|
||||
Subject: build: remove enterprise content analysis assert
|
||||
|
||||
Chromium is using enterprise content analysis, which is something
|
||||
Electron is not concerned with. Remove this assert before building.
|
||||
This patch can be removed when we decide how we want to handle
|
||||
enterprise content analysis.
|
||||
|
||||
diff --git a/components/enterprise/buildflags/buildflags.gni b/components/enterprise/buildflags/buildflags.gni
|
||||
index 7653c1c9e8fb18ce2c471af11468583d2da0cfb0..f63c1c7263b40d4344ef4b8468acb77d9718e19c 100644
|
||||
--- a/components/enterprise/buildflags/buildflags.gni
|
||||
+++ b/components/enterprise/buildflags/buildflags.gni
|
||||
@@ -31,4 +31,4 @@ declare_args() {
|
||||
# These two flags are equivalent, but `enable_print_content_analysis` still
|
||||
# needs to exist separately as it lives under //printing which cannot depend
|
||||
# on //components.
|
||||
-assert(enterprise_content_analysis == enable_print_content_analysis)
|
||||
+# assert(enterprise_content_analysis == enable_print_content_analysis)
|
|
@ -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 337c990b8a5fcce3526be405500b538ea62c2dba..587d3594c54bb395db7074b0c2e2f10fa61d682b 100644
|
||||
index 00b57b62ce1d6de6fd12accb082282c1325ad801..81b495cce7891a30c3ea1acc9160566d66acaef0 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -8034,6 +8034,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -8042,6 +8042,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,7 +21,7 @@ index 337c990b8a5fcce3526be405500b538ea62c2dba..587d3594c54bb395db7074b0c2e2f10f
|
|||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index cd8824f971af6fd092e3ac3ea2ffc80a9dc3aa44..e262b0d1b1c50b81345d6333c5190769dd35c4a8 100644
|
||||
index 9a2acf6b3a661705c740de6bd84cc0abcba7973f..f362dc586802e47f45558b0cc068e2bf44cb796e 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4301,6 +4301,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
@ -51,7 +51,7 @@ index cd8824f971af6fd092e3ac3ea2ffc80a9dc3aa44..e262b0d1b1c50b81345d6333c5190769
|
|||
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 b0b0236d58b97bae0c80998c5eff4ede5879de00..c92546b9853219bf601f550416ce392aad399bbf 100644
|
||||
index a1757960b139dea126e34776e9ec7768d9e3d89d..a3226c9a8080537daa2454b8014a691967bde058 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -619,6 +619,10 @@ struct CreateNewWindowParams {
|
||||
|
@ -100,10 +100,10 @@ index 738cf91eca91de2732d1b3d2cfef7a482a768db3..e942f9cf1fb664591264e75e80d5d93a
|
|||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 0e348f7ca57e3004c1f85435ecd0c66896c5a8fb..8019a5c687a87a4257f9f7c0581781095fc20043 100644
|
||||
index 688fac1fd874438ad9bc6494691b0eadca7e5bb2..db12930a449b38966e63c2274275b1157f38bea7 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -28,6 +28,17 @@ namespace content {
|
||||
@@ -29,6 +29,17 @@ namespace content {
|
||||
|
||||
WebContentsDelegate::WebContentsDelegate() = default;
|
||||
|
||||
|
@ -122,7 +122,7 @@ index 0e348f7ca57e3004c1f85435ecd0c66896c5a8fb..8019a5c687a87a4257f9f7c058178109
|
|||
const OpenURLParams& params) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index c5bda327264c330345baf7b44b4ba5c478e58952..989778079d5dc91127989e43f3ce6b25a9df56d4 100644
|
||||
index 5a764b2f531e79bf31ab4c3c24b0f8adca241985..413419ac25d62f5058003480bc79d7a75c32a410 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -16,6 +16,7 @@
|
||||
|
@ -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 f8e6dce7f67424322a6d14c0a188e5ebb7daea7d..6aecc6c215cb33bf4b0f2cd38a79ebeef6be527d 100644
|
||||
index 9acd28becf42c2d25f6863df365003b0367e09ae..abaf6b2c59058b670d1989be3693d7d69557e850 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6371,6 +6371,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6373,6 +6373,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
|
@ -210,7 +210,7 @@ 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 22811c82015f2ab2b7715ac503c9b5106cfd9d73..cd2336506d5826c827ce0e0fd8e17ad28217e6f7 100644
|
||||
index efeac59aa515706fd4b3c0e5654d60f3185b62fd..c99c355f52a84256286ca0cd130085b4e54d356a 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2192,6 +2192,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
|
|
|
@ -9,7 +9,7 @@ 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 4aca3728a4a3a49d41bbb1b8f036024b2afec52a..ab8f07dafa915be32fe4cc93aa6c1c8ae3801b2a 100644
|
||||
index 502c0a7ffc25f1b9c1077734a77b16dd23f7942a..c4ecee6f375a1dc5adbd87023ff4130f29636553 100644
|
||||
--- a/chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ b/chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -43,7 +43,6 @@
|
||||
|
|
|
@ -18,10 +18,10 @@ index 6241dd501bd423350accd2a2f0b69b5d8b7e45bd..08befddc25e17bfde46bb11e94b646e8
|
|||
/google_apis/internal
|
||||
/googleurl
|
||||
diff --git a/third_party/.gitignore b/third_party/.gitignore
|
||||
index 414cd656ba3c210d346f0b2e84aa7a414a3754c3..c2a18f684fb82fea298b11d946946d685c23e753 100644
|
||||
index 5464e9e25c767ceefef15553c546687d2ab5fdd3..1b82a4e3e9763b59cba4efc4044abcaa7e6c956f 100644
|
||||
--- a/third_party/.gitignore
|
||||
+++ b/third_party/.gitignore
|
||||
@@ -94,6 +94,7 @@
|
||||
@@ -95,6 +95,7 @@
|
||||
/directxsdk
|
||||
/dom_distiller_js/dist
|
||||
/eigen3/src
|
||||
|
@ -29,7 +29,7 @@ index 414cd656ba3c210d346f0b2e84aa7a414a3754c3..c2a18f684fb82fea298b11d946946d68
|
|||
/elfutils/src
|
||||
/emoji-metadata/src
|
||||
/emoji-segmenter/src
|
||||
@@ -204,6 +205,7 @@
|
||||
@@ -205,6 +206,7 @@
|
||||
/mocha
|
||||
/mockito/src
|
||||
/nacl_sdk_binaries/
|
||||
|
@ -37,7 +37,7 @@ index 414cd656ba3c210d346f0b2e84aa7a414a3754c3..c2a18f684fb82fea298b11d946946d68
|
|||
/nasm
|
||||
/nearby/src
|
||||
/neon_2_sse/src
|
||||
@@ -271,6 +273,7 @@
|
||||
@@ -272,6 +274,7 @@
|
||||
/speex
|
||||
/sqlite/src
|
||||
/sqlite4java/lib/
|
||||
|
|
|
@ -9,10 +9,10 @@ Electron does not support Profiles, so this Profile::FromBrowserContext()
|
|||
call is not needed and will not link. This change patches it out.
|
||||
|
||||
diff --git a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
|
||||
index 080e5b64e5fbbe9c126996549dddf7ce312998ee..47a026798a6be7ec8b7cde5b55b29d505d4f2e4c 100644
|
||||
index 33efdcfbc8ae731440f53ea270db4718f54b167a..139ef2300a521ed9552c3849e8836a4ee83a53eb 100644
|
||||
--- a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
|
||||
+++ b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
|
||||
@@ -39,6 +39,7 @@ namespace {
|
||||
@@ -41,6 +41,7 @@ namespace {
|
||||
// hierarchy is: enterprise policy > user choice > finch experiment.
|
||||
bool ShouldEnableSkiaRenderer(content::WebContents* contents) {
|
||||
CHECK(contents);
|
||||
|
@ -20,7 +20,7 @@ index 080e5b64e5fbbe9c126996549dddf7ce312998ee..47a026798a6be7ec8b7cde5b55b29d50
|
|||
const PrefService* prefs =
|
||||
Profile::FromBrowserContext(contents->GetBrowserContext())->GetPrefs();
|
||||
|
||||
@@ -46,6 +47,7 @@ bool ShouldEnableSkiaRenderer(content::WebContents* contents) {
|
||||
@@ -48,6 +49,7 @@ bool ShouldEnableSkiaRenderer(content::WebContents* contents) {
|
||||
if (prefs->IsManagedPreference(prefs::kPdfUseSkiaRendererEnabled)) {
|
||||
return prefs->GetBoolean(prefs::kPdfUseSkiaRendererEnabled);
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ 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 a41d8c314019ddd26e7c549149053bae25080d68..c302ba2e69b71b58faf40bc3e622b22183b17f26 100644
|
||||
index d95743b1ab3461f69326ca904448636de88ea070..a32f963654763cc0c706f752eca96e8cf5d0be54 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4208,8 +4208,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
@ -232,10 +232,10 @@ index a41d8c314019ddd26e7c549149053bae25080d68..c302ba2e69b71b58faf40bc3e622b221
|
|||
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
|
||||
opener, source_site_instance, is_new_browsing_instance,
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 8019a5c687a87a4257f9f7c0581781095fc20043..d7ccb0f7a7b15fb19640b1b0491750b179a77693 100644
|
||||
index db12930a449b38966e63c2274275b1157f38bea7..2d770e9c0c88e5ad1fac15fd13b70e6b5be824c8 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -136,8 +136,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -137,8 +137,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
SiteInstance* source_site_instance,
|
||||
mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
@ -246,7 +246,7 @@ index 8019a5c687a87a4257f9f7c0581781095fc20043..d7ccb0f7a7b15fb19640b1b0491750b1
|
|||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 989778079d5dc91127989e43f3ce6b25a9df56d4..71b5a7c30f6546e3172ea31f9b0572c0e6a9f660 100644
|
||||
index 413419ac25d62f5058003480bc79d7a75c32a410..009a3d55f59a1ac80402327b43de45b13d5d8cfe 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -322,8 +322,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
|
|
|
@ -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 f9d1b5d75d88eddc51bbabca4cb0571d8f5882ab..9bcc38946c670b807e8835be5bf28c00bb0c2668 100644
|
||||
index a9b4caaa4da3bee1a22db976a8ec71dc7d5400ed..4dda552f4dc50e6e3a184e95e771b7141e19e736 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -532,7 +532,11 @@
|
||||
@@ -540,7 +540,11 @@
|
||||
return;
|
||||
|
||||
host()->WasHidden();
|
||||
|
|
|
@ -9,7 +9,7 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead
|
|||
of the default V8 allocator. This probably can't be usptreamed.
|
||||
|
||||
diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h
|
||||
index 565f531328041edaac847d02881cce6e1e4f7d54..5a40be3acb11c5851daa9f8001e6a176c2d20ab1 100644
|
||||
index df59829cbb31a5a7d8aa72df6dd8a9e623cbf60a..841cf5877f199bd77e4c84921ddddf83bf849d8a 100644
|
||||
--- a/gin/public/v8_platform.h
|
||||
+++ b/gin/public/v8_platform.h
|
||||
@@ -32,6 +32,7 @@ class GIN_EXPORT V8Platform : public v8::Platform {
|
||||
|
@ -21,7 +21,7 @@ index 565f531328041edaac847d02881cce6e1e4f7d54..5a40be3acb11c5851daa9f8001e6a176
|
|||
ThreadIsolatedAllocator* GetThreadIsolatedAllocator() override;
|
||||
#endif
|
||||
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
|
||||
index a0bc00a3d1397934276517c19e0a76098b7099f5..7432989344148480bc4ff5f8808cf588ec45b868 100644
|
||||
index 2491bf34cffd22f580d1c18bedfcf061e84abc4c..73469c926f69b4a7b7e982263307b2aab24c81a6 100644
|
||||
--- a/gin/v8_platform.cc
|
||||
+++ b/gin/v8_platform.cc
|
||||
@@ -338,6 +338,10 @@ ThreadIsolatedAllocator* V8Platform::GetThreadIsolatedAllocator() {
|
||||
|
|
|
@ -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 4a0ae5a492e35b8f11d9f4f98083a63050e0bbe0..653eaaddb8bd69de392695894fabfdacddc7de90 100644
|
||||
index 60e8ed950dad31a220bbe8a9197fbe25f429fe83..b8b20d8c8340c63bd3039a0683446ef1eb4fdf0d 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,
|
||||
|
|
|
@ -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 8a132fc9721ca1145249e0ccfaf019c3babf2739..411662674b0ad47e273957aacc80ddcafe0e84ab 100644
|
||||
index c54b0c7b80a95564a30672784ee3ba2edbbf0a87..0336b15775e3bb96f54c776d673601931cce7d8a 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 8a132fc9721ca1145249e0ccfaf019c3babf2739..411662674b0ad47e273957aacc80ddca
|
|||
mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
|
||||
return static_cast<ChildProcessHostImpl*>(process_->GetHost())
|
||||
->child_process();
|
||||
@@ -445,9 +465,22 @@ bool UtilityProcessHost::StartProcess() {
|
||||
@@ -443,9 +463,22 @@ bool UtilityProcessHost::StartProcess() {
|
||||
}
|
||||
#endif // BUILDFLAG(IS_LINUX)
|
||||
|
||||
|
@ -627,10 +627,10 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
|
|||
#if BUILDFLAG(IS_MAC)
|
||||
// Whether or not to disclaim TCC responsibility for the process, defaults to
|
||||
diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
|
||||
index 8a130451b14772e2f4280403576b4d3d3d5827ff..c5aab674d99f7c8b38e477eea56dad33bc234930 100644
|
||||
index 2ee0182088f41846f352fae0b67fc90448855355..9dc5630e1e858ef4de91680ad119e5bf5696e1e3 100644
|
||||
--- a/sandbox/policy/win/sandbox_win.cc
|
||||
+++ b/sandbox/policy/win/sandbox_win.cc
|
||||
@@ -697,11 +697,9 @@ ResultCode GenerateConfigForSandboxedProcess(const base::CommandLine& cmd_line,
|
||||
@@ -706,11 +706,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
|
||||
// command line flag.
|
||||
ResultCode LaunchWithoutSandbox(
|
||||
const base::CommandLine& cmd_line,
|
||||
|
@ -643,7 +643,7 @@ index 8a130451b14772e2f4280403576b4d3d3d5827ff..c5aab674d99f7c8b38e477eea56dad33
|
|||
// Network process runs in a job even when unsandboxed. This is to ensure it
|
||||
// does not outlive the browser, which could happen if there is a lot of I/O
|
||||
// on process shutdown, in which case TerminateProcess can fail. See
|
||||
@@ -930,7 +928,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
|
||||
@@ -938,7 +936,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
|
||||
ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
const base::CommandLine& cmd_line,
|
||||
const std::string& process_type,
|
||||
|
@ -652,7 +652,7 @@ index 8a130451b14772e2f4280403576b4d3d3d5827ff..c5aab674d99f7c8b38e477eea56dad33
|
|||
SandboxDelegate* delegate,
|
||||
TargetPolicy* policy) {
|
||||
const base::CommandLine& launcher_process_command_line =
|
||||
@@ -944,7 +942,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
@@ -952,7 +950,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
}
|
||||
|
||||
// Add any handles to be inherited to the policy.
|
||||
|
@ -661,7 +661,7 @@ index 8a130451b14772e2f4280403576b4d3d3d5827ff..c5aab674d99f7c8b38e477eea56dad33
|
|||
policy->AddHandleToShare(handle);
|
||||
|
||||
if (!policy->GetConfig()->IsConfigured()) {
|
||||
@@ -959,6 +957,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
@@ -967,6 +965,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
// have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
|
||||
policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
|
||||
policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
|
||||
|
@ -675,7 +675,7 @@ index 8a130451b14772e2f4280403576b4d3d3d5827ff..c5aab674d99f7c8b38e477eea56dad33
|
|||
#endif
|
||||
|
||||
if (!delegate->PreSpawnTarget(policy))
|
||||
@@ -971,7 +976,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
@@ -979,7 +984,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
|
||||
ResultCode SandboxWin::StartSandboxedProcess(
|
||||
const base::CommandLine& cmd_line,
|
||||
const std::string& process_type,
|
||||
|
@ -684,7 +684,7 @@ index 8a130451b14772e2f4280403576b4d3d3d5827ff..c5aab674d99f7c8b38e477eea56dad33
|
|||
SandboxDelegate* delegate,
|
||||
base::Process* process) {
|
||||
const base::ElapsedTimer timer;
|
||||
@@ -979,13 +984,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
@@ -987,13 +992,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
|
||||
// Avoid making a policy if we won't use it.
|
||||
if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line,
|
||||
*base::CommandLine::ForCurrentProcess())) {
|
||||
|
|
|
@ -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 7d16c747af4b807b9084ff8f9d00e576ed83949b..fa72a9170a7e41ae475b05653be99af59d4eaebb 100644
|
||||
index ade4e4973a0e9bd47604262c76bfbd0ee3c9dc38..440fa0b3ff9b08016ff19ab54c70a453dc8c5f86 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -141,6 +141,8 @@ viz_component("service") {
|
||||
|
|
|
@ -37,7 +37,7 @@ index d5239af9a83d408ed8e6e71daa3e2458318ed0df..2fdaf6813ccec6e7cba074ffd7e3c01f
|
|||
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 9ccc46def23013c59a7e32a8395976896d313fac..1dc6a0b40d5790bc5491c2e530536297d5dd2ced 100644
|
||||
index bf16ec49862bd3c13e052a737ffd1a7f258cb124..5d7f4708b41bc40eacd3a1a6282cf62aa72c65f8 100644
|
||||
--- a/services/network/public/cpp/resource_request.h
|
||||
+++ b/services/network/public/cpp/resource_request.h
|
||||
@@ -69,6 +69,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
|
|
|
@ -6,7 +6,7 @@ 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 6a119a6179cc242a63cb6fcc7c4974dd15b721df..1ef7b6fc8de9200c88da456c7eda6de9c5eee9a4 100644
|
||||
index 998357b01a55def3d9c1e37d09f52d61b5ecd6f2..3872ee9b4e3182b8a39c51f13d577776eeccd2b1 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3705,7 +3705,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
|
|
|
@ -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 4c87713a727a2552ad4c8d06ad6ac08a4e92f89a..972f1b9152fc74ed34012971e7671a9b49ce3244 100644
|
||||
index a051e2465abbd3efcad566e8dbb57f4e97555817..20a6765d68405b365217eba5b6fa8cd7f331470f 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -7383,10 +7383,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
@@ -7450,10 +7450,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
if (IsForMhtmlSubframe())
|
||||
return origin_with_debug_info;
|
||||
|
||||
|
@ -37,10 +37,10 @@ index 4c87713a727a2552ad4c8d06ad6ac08a4e92f89a..972f1b9152fc74ed34012971e7671a9b
|
|||
}
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h
|
||||
index 93ebbbccba69fa1090feb8c02138f25471bf89d9..556ed4f9bb392de7e88519aa87a2a13a5158647d 100644
|
||||
index cf2e1594a41c95d7ac1bffc06df6331cb6dd31e0..aaebfc7fe6f06114b3bc6accceefdba0d3f97408 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.h
|
||||
@@ -2952,6 +2952,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
@@ -2959,6 +2959,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
// last committed document.
|
||||
CookieChangeListener::CookieChangeInfo GetCookieChangeInfo();
|
||||
|
||||
|
@ -58,7 +58,7 @@ index 93ebbbccba69fa1090feb8c02138f25471bf89d9..556ed4f9bb392de7e88519aa87a2a13a
|
|||
// 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.
|
||||
@@ -3343,17 +3354,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
@@ -3350,17 +3361,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
// relevant.
|
||||
void ResetWaitingState();
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ 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 1ef7b6fc8de9200c88da456c7eda6de9c5eee9a4..a784ffaf63b3b395ad2d0c8d712c434643066291 100644
|
||||
index 3872ee9b4e3182b8a39c51f13d577776eeccd2b1..0a583dce74161eb5a4543a2678ccc80aefd3582b 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -8268,7 +8268,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
|
|
|
@ -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 8cb40ed9c41d438463e18793ee6dd112b59d823c..5152b1ec34e2bcbec693ffa386f50dfcf8ff7656 100644
|
||||
index 280fbb5608ffcd5bec33483c99a1a112a16a0c24..8232e87607f9af31e7608d3385c6853e87efa5e2 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -2782,6 +2782,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -2809,6 +2809,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
mojom::blink::EvaluationTiming evaluation_timing,
|
||||
mojom::blink::LoadEventBlockingOption blocking_option,
|
||||
WebScriptExecutionCallback callback,
|
||||
|
@ -75,7 +75,7 @@ index 8cb40ed9c41d438463e18793ee6dd112b59d823c..5152b1ec34e2bcbec693ffa386f50dfc
|
|||
BackForwardCacheAware back_forward_cache_aware,
|
||||
mojom::blink::WantResultOption want_result_option,
|
||||
mojom::blink::PromiseResultOption promise_behavior) {
|
||||
@@ -2815,7 +2816,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -2842,7 +2843,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
PausableScriptExecutor::CreateAndRun(
|
||||
script_state, std::move(script_sources), execute_script_policy,
|
||||
user_gesture, evaluation_timing, blocking_option, want_result_option,
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: fix: select the first menu item when opened via keyboard
|
|||
This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed.
|
||||
|
||||
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
|
||||
index 8042e113c85f475d44463df93e8c80a19b322d16..3d6b6b45a142419379a574701a0629b5f061dbfd 100644
|
||||
index 7abc296e283f15eeec32de1e94b66c24d71ebe13..c0053ae1abb38be03611cf5246d482c6391bd3bc 100644
|
||||
--- a/ui/views/controls/menu/menu_controller.cc
|
||||
+++ b/ui/views/controls/menu/menu_controller.cc
|
||||
@@ -564,6 +564,7 @@ void MenuController::Run(Widget* parent,
|
||||
|
@ -32,7 +32,7 @@ index 8042e113c85f475d44463df93e8c80a19b322d16..3d6b6b45a142419379a574701a0629b5
|
|||
if (button_controller) {
|
||||
pressed_lock_ = button_controller->TakeLock(
|
||||
false, ui::LocatedEvent::FromIfValid(event));
|
||||
@@ -2251,19 +2260,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
|
||||
@@ -2266,19 +2275,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
|
||||
}
|
||||
item->GetSubmenu()->ShowAt(params);
|
||||
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cheng Zhao <zcbenz@gmail.com>
|
||||
Date: Tue, 15 Nov 2022 09:38:25 +0900
|
||||
Subject: Re-register status item when owner of status watcher is changed
|
||||
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/4022621
|
||||
|
||||
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
||||
index e7e710d58e2bdf1f0bc042f479add048f3aa1ffb..dc0d69a726f389e4925001fc2c817fe0f0f83508 100644
|
||||
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
||||
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
||||
@@ -361,6 +361,13 @@ void StatusIconLinuxDbus::OnInitialized(bool success) {
|
||||
return;
|
||||
}
|
||||
|
||||
+ watcher_->SetNameOwnerChangedCallback(
|
||||
+ base::BindRepeating(&StatusIconLinuxDbus::NameOwnerChangedReceived,
|
||||
+ weak_factory_.GetWeakPtr()));
|
||||
+ RegisterStatusNotifierItem();
|
||||
+}
|
||||
+
|
||||
+void StatusIconLinuxDbus::RegisterStatusNotifierItem() {
|
||||
dbus::MethodCall method_call(kInterfaceStatusNotifierWatcher,
|
||||
kMethodRegisterStatusNotifierItem);
|
||||
dbus::MessageWriter writer(&method_call);
|
||||
@@ -376,6 +383,14 @@ void StatusIconLinuxDbus::OnRegistered(dbus::Response* response) {
|
||||
delegate_->OnImplInitializationFailed();
|
||||
}
|
||||
|
||||
+void StatusIconLinuxDbus::NameOwnerChangedReceived(
|
||||
+ const std::string& old_owner,
|
||||
+ const std::string& new_owner) {
|
||||
+ // Re-register the item when the StatusNotifierWatcher has a new owner.
|
||||
+ if (!new_owner.empty())
|
||||
+ RegisterStatusNotifierItem();
|
||||
+}
|
||||
+
|
||||
void StatusIconLinuxDbus::OnActivate(
|
||||
dbus::MethodCall* method_call,
|
||||
dbus::ExportedObject::ResponseSender sender) {
|
||||
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
||||
index 2c0df96d2840e6198604041fe1e1b63c89251208..09df6bb9fab6cffbab6302a04b7343b75568cdc3 100644
|
||||
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
||||
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
||||
@@ -71,10 +71,16 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
|
||||
const std::string& method_name,
|
||||
bool success);
|
||||
void OnInitialized(bool success);
|
||||
+ void RegisterStatusNotifierItem();
|
||||
|
||||
// Step 5: register the StatusNotifierItem with the StatusNotifierWatcher.
|
||||
void OnRegistered(dbus::Response* response);
|
||||
|
||||
+ // Called when the name owner of StatusNotifierWatcher has changed, which
|
||||
+ // can happen when lock/unlock screen.
|
||||
+ void NameOwnerChangedReceived(const std::string& old_owner,
|
||||
+ const std::string& new_owner);
|
||||
+
|
||||
// DBus methods.
|
||||
// Action -> KDE behavior:
|
||||
// Left-click -> Activate
|
|
@ -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 4cd7183825cadbc50c9e54bb11a174f26ef29858..8cf9b35580bdf925253e52db04bf3a2e1b6dbd61 100644
|
||||
index cf0cc0d010cdd38272a5262e2cbb0719b4595039..190c46d245f32d2ba093390cab7477165785e1ed 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -4080,6 +4080,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -4082,6 +4082,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ We don't use gin to create the V8 platform, because we need to inject Node
|
|||
things.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index e8608bb868c82c9af5426cd6f8512ce6b18ff39f..6268851494a0bbc0b3e693782dae6171f6347657 100644
|
||||
index 4cb88241eeaaacdd1c1e419759fd56bc003dbaf3..1c3536a183aad1965e834b1681e36a3fc46ae419 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -136,9 +136,10 @@ void IsolateHolder::Initialize(ScriptMode mode,
|
||||
@@ -140,9 +140,10 @@ void IsolateHolder::Initialize(ScriptMode mode,
|
||||
const intptr_t* reference_table,
|
||||
const std::string js_command_line_flags,
|
||||
v8::FatalErrorCallback fatal_error_callback,
|
||||
|
@ -24,10 +24,10 @@ 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 2ec6d9820b4cb8d91d47ab319fe6bf89be60300c..12ddcc30397a02df78727f16a02b8e81fd1d9c8e 100644
|
||||
index c19eb72e8d37fe8145b813d07875addf793e12dc..a5db8841773618814ac90f740201d4d7e9057b3c 100644
|
||||
--- a/gin/public/isolate_holder.h
|
||||
+++ b/gin/public/isolate_holder.h
|
||||
@@ -109,7 +109,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
@@ -113,7 +113,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
const intptr_t* reference_table = nullptr,
|
||||
const std::string js_command_line_flags = {},
|
||||
v8::FatalErrorCallback fatal_error_callback = nullptr,
|
||||
|
|
|
@ -40,10 +40,10 @@ index c57305681efb469d296c90df68b6cdbea927580d..6dda1a5465e08df64b539ee203b7c403
|
|||
// Called from BrowserMainLoop::PostCreateThreads().
|
||||
// TODO(content/browser/gpu/OWNERS): This should probably use a
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
index 6b5d083400e10497a05b7813a453a3df03af1486..566bcdfe7241d0eb61ee1856fa6896a8fd408059 100644
|
||||
index 019554cca7d25be443b75271278865e09a763a31..cc7e01260891c5d42ef590b040209f01943e1feb 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -1195,6 +1195,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
@@ -1199,6 +1199,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
if (host)
|
||||
host->ForceShutdown();
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ index 6b5d083400e10497a05b7813a453a3df03af1486..566bcdfe7241d0eb61ee1856fa6896a8
|
|||
|
||||
void GpuDataManagerImplPrivate::PostCreateThreads() {
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
index cc93bb117b67c8dc656c1850c3c5f41b5bc31c82..c3a5c24ac664bf4701612f7c7f2e1586625c5b78 100644
|
||||
index 790e72f12c7f1cf6e49d2a51949769a5d14bd4db..e02c3033231f93792fe2b456c08cfc2ac0f3d49e 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
@@ -86,6 +86,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
||||
|
|
|
@ -6,10 +6,10 @@ 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 77800eeb69b67daa40685d85e0ef50a90cb0aab8..33176b70e23c39fec0be4086efee319ac159fbce 100644
|
||||
index a327136986b82869f394f47e4609e431c9f3a3ac..28cca57152b6168b008c27c1e82f560ba16b56b4 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1193,6 +1193,11 @@
|
||||
@@ -1197,6 +1197,11 @@
|
||||
"includes": [7440],
|
||||
},
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@ 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 f6c143483a9bdc5e5b320786356d329d40feba4f..2288deb727523171438ac0b2f636e3dd62d79756 100755
|
||||
index 134f0a172751c2e0aa769f10965a21895d8b1b8f..a86b25f708292bade341bbf25b94ab7e14bed995 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -306,6 +306,8 @@ def GetDefaultHostOs():
|
||||
@@ -307,6 +307,8 @@ def GetDefaultHostOs():
|
||||
'win32': 'win',
|
||||
}
|
||||
default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform)
|
||||
|
|
|
@ -15,65 +15,68 @@ for us to register the isolate in between Isolate::Allocate and
|
|||
Isolate::Initialize.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 6268851494a0bbc0b3e693782dae6171f6347657..87ae3db7aec96577856804aa3718e53e3ccf66d3 100644
|
||||
index 1c3536a183aad1965e834b1681e36a3fc46ae419..1923f18cf2d4fff5094e6fe60bbef06b3e2cb06b 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -72,7 +72,8 @@ IsolateHolder::IsolateHolder(
|
||||
IsolateType isolate_type,
|
||||
@@ -73,7 +73,8 @@ IsolateHolder::IsolateHolder(
|
||||
IsolateCreationMode isolate_creation_mode,
|
||||
v8::CreateHistogramCallback create_histogram_callback,
|
||||
- v8::AddHistogramSampleCallback add_histogram_sample_callback)
|
||||
+ v8::AddHistogramSampleCallback add_histogram_sample_callback,
|
||||
v8::AddHistogramSampleCallback add_histogram_sample_callback,
|
||||
- scoped_refptr<base::SingleThreadTaskRunner> low_priority_task_runner)
|
||||
+ scoped_refptr<base::SingleThreadTaskRunner> low_priority_task_runner,
|
||||
+ v8::Isolate* isolate)
|
||||
: IsolateHolder(task_runner,
|
||||
: IsolateHolder(std::move(task_runner),
|
||||
access_mode,
|
||||
isolate_type,
|
||||
@@ -80,14 +81,16 @@ IsolateHolder::IsolateHolder(
|
||||
atomics_wait_mode,
|
||||
@@ -82,7 +83,8 @@ IsolateHolder::IsolateHolder(
|
||||
create_histogram_callback,
|
||||
add_histogram_sample_callback),
|
||||
- isolate_creation_mode) {}
|
||||
+ isolate_creation_mode,
|
||||
isolate_creation_mode,
|
||||
- std::move(low_priority_task_runner)) {}
|
||||
+ std::move(low_priority_task_runner),
|
||||
+ isolate) {}
|
||||
|
||||
IsolateHolder::IsolateHolder(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
||||
AccessMode access_mode,
|
||||
@@ -90,7 +92,8 @@ IsolateHolder::IsolateHolder(
|
||||
IsolateType isolate_type,
|
||||
std::unique_ptr<v8::Isolate::CreateParams> params,
|
||||
- IsolateCreationMode isolate_creation_mode)
|
||||
+ IsolateCreationMode isolate_creation_mode,
|
||||
IsolateCreationMode isolate_creation_mode,
|
||||
- scoped_refptr<base::SingleThreadTaskRunner> low_priority_task_runner)
|
||||
+ scoped_refptr<base::SingleThreadTaskRunner> low_priority_task_runner,
|
||||
+ v8::Isolate* isolate)
|
||||
: access_mode_(access_mode), isolate_type_(isolate_type) {
|
||||
CHECK(Initialized())
|
||||
<< "You need to invoke gin::IsolateHolder::Initialize first";
|
||||
@@ -98,7 +101,7 @@ IsolateHolder::IsolateHolder(
|
||||
@@ -101,7 +104,7 @@ IsolateHolder::IsolateHolder(
|
||||
v8::ArrayBuffer::Allocator* allocator = params->array_buffer_allocator;
|
||||
DCHECK(allocator);
|
||||
|
||||
- isolate_ = v8::Isolate::Allocate();
|
||||
+ isolate_ = isolate ? isolate : v8::Isolate::Allocate();
|
||||
isolate_data_ = std::make_unique<PerIsolateData>(isolate_, allocator,
|
||||
access_mode_, task_runner);
|
||||
// TODO(https://crbug.com/1347092): Refactor such that caller need not
|
||||
isolate_data_ = std::make_unique<PerIsolateData>(
|
||||
isolate_, allocator, access_mode_, task_runner,
|
||||
std::move(low_priority_task_runner));
|
||||
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
|
||||
index 12ddcc30397a02df78727f16a02b8e81fd1d9c8e..6629c29328354c911679fc6bb2af982611ecce10 100644
|
||||
index a5db8841773618814ac90f740201d4d7e9057b3c..1368ab8bfbf9e69437b394a8376bf7c956ca13ce 100644
|
||||
--- a/gin/public/isolate_holder.h
|
||||
+++ b/gin/public/isolate_holder.h
|
||||
@@ -83,13 +83,15 @@ class GIN_EXPORT IsolateHolder {
|
||||
IsolateType isolate_type,
|
||||
IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal,
|
||||
@@ -85,7 +85,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
v8::CreateHistogramCallback create_histogram_callback = nullptr,
|
||||
- v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr);
|
||||
+ v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr,
|
||||
v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> low_priority_task_runner =
|
||||
- nullptr);
|
||||
+ nullptr,
|
||||
+ v8::Isolate* isolate = nullptr);
|
||||
IsolateHolder(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
||||
AccessMode access_mode,
|
||||
IsolateType isolate_type,
|
||||
@@ -93,7 +94,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
std::unique_ptr<v8::Isolate::CreateParams> params,
|
||||
- IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal);
|
||||
+ IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal,
|
||||
IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal,
|
||||
scoped_refptr<base::SingleThreadTaskRunner> low_priority_task_runner =
|
||||
- nullptr);
|
||||
+ nullptr,
|
||||
+ v8::Isolate* isolate = nullptr);
|
||||
IsolateHolder(const IsolateHolder&) = delete;
|
||||
IsolateHolder& operator=(const IsolateHolder&) = delete;
|
||||
|
|
|
@ -75,7 +75,7 @@ index 2d4be7e4df5a0f6de9046593434eb276e28232f9..c727984807d555b8e6ab8fe37d9a6daa
|
|||
+
|
||||
@end
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
|
||||
index 58e974137f318b0f990e0b77630fe3a51db62c8c..8638f9ee32bea5fca67a377f27f3e24b00982e44 100644
|
||||
index 841358dd85201f4972e4c91a334e55b81867d2ec..0069d4f904c527fa3c280c723574fe2c62c282b8 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
|
||||
@@ -17,6 +17,7 @@ class NativeWidgetNSWindowBridge;
|
||||
|
@ -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 85ec900639c308ce62f13eae1230d0597e8e9604..247568ccdfbaaf2f72612cbe738758e640472db1 100644
|
||||
index 8a89e3e1759b9785f069546aa564520a9375f0c2..fd09550a2f1fe59ba0d38a258107573a052fd784 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
@@ -101,7 +101,9 @@ void OrderChildWindow(NSWindow* child_window,
|
||||
@@ -106,7 +106,9 @@ void OrderChildWindow(NSWindow* child_window,
|
||||
} // namespace
|
||||
|
||||
@interface NSWindow (Private)
|
||||
|
@ -108,7 +108,7 @@ index 85ec900639c308ce62f13eae1230d0597e8e9604..247568ccdfbaaf2f72612cbe738758e6
|
|||
- (BOOL)hasKeyAppearance;
|
||||
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
|
||||
- (BOOL)_isConsideredOpenForPersistentState;
|
||||
@@ -139,6 +141,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
|
||||
@@ -150,6 +152,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -117,7 +117,7 @@ index 85ec900639c308ce62f13eae1230d0597e8e9604..247568ccdfbaaf2f72612cbe738758e6
|
|||
@implementation NativeWidgetMacNSWindowTitledFrame
|
||||
- (void)mouseDown:(NSEvent*)event {
|
||||
if (self.window.isMovable)
|
||||
@@ -165,6 +169,8 @@ - (BOOL)usesCustomDrawing {
|
||||
@@ -176,6 +180,8 @@ - (BOOL)usesCustomDrawing {
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -126,7 +126,7 @@ index 85ec900639c308ce62f13eae1230d0597e8e9604..247568ccdfbaaf2f72612cbe738758e6
|
|||
@implementation NativeWidgetMacNSWindow {
|
||||
@private
|
||||
CommandDispatcher* __strong _commandDispatcher;
|
||||
@@ -358,6 +364,8 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
@@ -381,6 +387,8 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
|
||||
// NSWindow overrides.
|
||||
|
||||
|
@ -135,7 +135,7 @@ index 85ec900639c308ce62f13eae1230d0597e8e9604..247568ccdfbaaf2f72612cbe738758e6
|
|||
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
if (windowStyle & NSWindowStyleMaskTitled) {
|
||||
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
|
||||
@@ -369,6 +377,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
@@ -392,6 +400,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
return [super frameViewClassForStyleMask:windowStyle];
|
||||
}
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ index 1411678acc567b4d6368d0e2e6224f0974d61825..b9495cc1a391603b2c223ab1cf2d75b1
|
|||
|
||||
} // 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 10032ea5829e7dfc610db23f0f8f12021fe466f6..2b3f68f8e92e00caab15c048fcc2fc02f54a21fc 100644
|
||||
index 1eb8f76dba28861d002d5e8d0271d8bb54c157c6..d7356834e1c714024dc6b6c6147043a8afa98c08 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
|
||||
@@ -591,10 +591,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
@@ -603,10 +603,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
// this should be treated as an error and caught early.
|
||||
CHECK(bridged_view_);
|
||||
|
||||
|
@ -147,10 +147,10 @@ index 43f288af24064365999da0904dcb63bd3157497d..ae67c1ab9a1d6ca8d3aa373b7ae73986
|
|||
// 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 be1cba15f2f1d219b9aa897c6af580e827f22211..f9d1b5d75d88eddc51bbabca4cb0571d8f5882ab 100644
|
||||
index 87c6840293a63ad6c77a07952444965d6fe80d1e..a9b4caaa4da3bee1a22db976a8ec71dc7d5400ed 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -259,8 +259,10 @@
|
||||
@@ -267,8 +267,10 @@
|
||||
void RenderWidgetHostViewMac::MigrateNSViewBridge(
|
||||
remote_cocoa::mojom::Application* remote_cocoa_application,
|
||||
uint64_t parent_ns_view_id) {
|
||||
|
@ -161,7 +161,7 @@ index be1cba15f2f1d219b9aa897c6af580e827f22211..f9d1b5d75d88eddc51bbabca4cb0571d
|
|||
|
||||
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
|
||||
// pointers. `ns_view_` gets reinitialized later in this method.
|
||||
@@ -1599,8 +1601,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1616,8 +1618,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
|
@ -172,7 +172,7 @@ index be1cba15f2f1d219b9aa897c6af580e827f22211..f9d1b5d75d88eddc51bbabca4cb0571d
|
|||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1644,9 +1648,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1661,9 +1665,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
|
@ -184,7 +184,7 @@ index be1cba15f2f1d219b9aa897c6af580e827f22211..f9d1b5d75d88eddc51bbabca4cb0571d
|
|||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -2148,12 +2154,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -2165,12 +2171,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
|
||||
const std::vector<uint8_t>& window_token) {
|
||||
|
@ -200,7 +200,7 @@ index be1cba15f2f1d219b9aa897c6af580e827f22211..f9d1b5d75d88eddc51bbabca4cb0571d
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 3b64831839a4c333dbb0c6c172344d6fd0d7b771..0d07c88cb9fec014b727b5294a03671d183943ea 100644
|
||||
index b521b461456dac293972ded8cafd6b253c8b3f4d..614ae2d72c934f0f6650a501b7d132f5745f767e 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -372,6 +372,13 @@ component("base") {
|
||||
|
|
|
@ -11,7 +11,7 @@ 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 357647127147f797663a7ae3b82449f58991c388..cbbb8bc6df74fb932bc669fad2dac950c9d8661f 100644
|
||||
index 83530a3a22a75ec4010ed2ffb20e7a6f4751b835..f7b75fa8f943861b211cbe9a981face8317cc8f0 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -971,7 +971,6 @@ if (is_win) {
|
||||
|
@ -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 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b568dbb0cd 100644
|
||||
index 0c4e987c5bf3298c3600e248f0213fb9288a59c7..8ae1217098b15f1634612945a6f10508025af64c 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -23,7 +23,9 @@
|
||||
|
@ -209,7 +209,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -313,12 +344,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
|
||||
@@ -327,12 +358,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
|
||||
}
|
||||
PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
|
||||
<< print_settings->requested_media().vendor_id;
|
||||
|
@ -224,7 +224,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
base::Value::Dict job_settings,
|
||||
std::unique_ptr<PrintSettings> print_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
@@ -326,7 +358,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
@@ -340,7 +372,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
settings->pages = GetPageRangesFromJobSettings(job_settings);
|
||||
settings->params = mojom::PrintParams::New();
|
||||
RenderParamsFromPrintSettings(*print_settings, settings->params.get());
|
||||
|
@ -234,7 +234,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
if (!PrintMsgPrintParamsIsValid(*settings->params)) {
|
||||
mojom::PrinterType printer_type = static_cast<mojom::PrinterType>(
|
||||
*job_settings.FindInt(kSettingPrinterType));
|
||||
@@ -338,6 +371,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
@@ -352,6 +385,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
set_cookie(settings->params->document_cookie);
|
||||
std::move(callback).Run(std::move(settings));
|
||||
}
|
||||
@@ -442,7 +479,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
@@ -487,7 +524,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
void PrintViewManagerBase::ScriptedPrintReply(
|
||||
ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
|
@ -255,7 +255,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
@@ -457,12 +495,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
@@ -502,12 +540,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
}
|
||||
}
|
||||
|
||||
@@ -599,10 +640,12 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -647,10 +688,12 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@ -286,7 +286,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
|
||||
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
|
||||
@@ -654,10 +697,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -702,10 +745,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value::Dict job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
@ -299,7 +299,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
|
||||
absl::optional<int> printer_type_value =
|
||||
job_settings.FindInt(kSettingPrinterType);
|
||||
@@ -668,6 +713,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -716,6 +761,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
|
||||
mojom::PrinterType printer_type =
|
||||
static_cast<mojom::PrinterType>(*printer_type_value);
|
||||
|
@ -307,7 +307,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
if (printer_type != mojom::PrinterType::kExtension &&
|
||||
printer_type != mojom::PrinterType::kPdf &&
|
||||
printer_type != mojom::PrinterType::kLocal) {
|
||||
@@ -687,6 +733,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -735,6 +781,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
if (value > 0)
|
||||
job_settings.Set(kSettingRasterizePdfDpi, value);
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
|
||||
std::unique_ptr<PrintSettings> print_settings =
|
||||
PrintSettingsFromJobSettings(job_settings);
|
||||
@@ -706,7 +753,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -754,7 +801,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -338,7 +338,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
// TODO(crbug.com/1424368): Remove this if the printable areas can be made
|
||||
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
|
||||
// for in-browser queries.
|
||||
@@ -728,15 +789,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -776,15 +837,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -355,7 +355,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -752,14 +811,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -800,14 +859,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 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -795,6 +854,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -843,6 +902,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
|
||||
PrintManager::PrintingFailed(cookie, reason);
|
||||
|
||||
|
@ -380,7 +380,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
// `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
|
||||
@@ -804,7 +864,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -852,7 +912,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
print_job_->document()->cookie() == cookie) {
|
||||
ShowPrintErrorDialogForGenericError();
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
ReleasePrinterQuery();
|
||||
}
|
||||
|
||||
@@ -816,15 +876,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
|
||||
@@ -864,15 +924,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
|
||||
test_observers_.RemoveObserver(&observer);
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
}
|
||||
|
||||
void PrintViewManagerBase::RenderFrameDeleted(
|
||||
@@ -876,7 +945,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -924,7 +993,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 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -885,9 +959,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
@@ -933,9 +1007,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::OnFailed() {
|
||||
|
@ -440,7 +440,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
TerminatePrintJob(true);
|
||||
}
|
||||
|
||||
@@ -897,7 +972,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
@@ -945,7 +1020,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
|
@ -449,7 +449,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -945,7 +1020,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -993,7 +1068,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
|
||||
// Disconnect the current `print_job_`.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -461,7 +461,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -966,7 +1044,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -1014,7 +1092,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
#endif
|
||||
print_job_->AddObserver(*this);
|
||||
|
||||
|
@ -470,7 +470,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -1034,6 +1112,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1082,6 +1160,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -482,7 +482,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -1041,7 +1124,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1089,7 +1172,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 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
}
|
||||
|
||||
print_job_->RemoveObserver(*this);
|
||||
@@ -1083,7 +1166,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1131,7 +1214,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
|
@ -500,7 +500,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1227,7 +1310,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
@@ -1277,7 +1360,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
|
||||
|
@ -509,8 +509,8 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
|
||||
for (auto& observer : GetTestObservers()) {
|
||||
observer.OnPrintNow(rfh);
|
||||
@@ -1277,7 +1360,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
set_analyzing_content(/*analyzing*/ false);
|
||||
@@ -1327,7 +1410,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
set_analyzing_content(/*analyzing=*/false);
|
||||
if (!allowed || !printing_rfh_ || IsCrashed() ||
|
||||
!printing_rfh_->IsRenderFrameLive()) {
|
||||
- std::move(callback).Run(nullptr);
|
||||
|
@ -519,7 +519,7 @@ index 97847278fc73e3a8fc80bef1bfbea5a9d0497b36..9f0e7a1e8b7e0c22623d6f681ebcd6b5
|
|||
}
|
||||
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 fcee7b58a8eebd9fc044bab51a5d0e540de0de7d..160b5a6ad2d5cb6e0292f9ff1d16ee556d950880 100644
|
||||
index 78c9218049835cafdc9a0d7719bc073a81432c81..f233546a63a3b0f3531042b055a0011cc1980958 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 {
|
||||
|
@ -569,7 +569,7 @@ index fcee7b58a8eebd9fc044bab51a5d0e540de0de7d..160b5a6ad2d5cb6e0292f9ff1d16ee55
|
|||
protected:
|
||||
explicit PrintViewManagerBase(content::WebContents* web_contents);
|
||||
|
||||
@@ -275,6 +290,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -285,6 +300,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
bool success);
|
||||
#endif
|
||||
void CompleteUpdatePrintSettings(
|
||||
|
@ -577,7 +577,7 @@ index fcee7b58a8eebd9fc044bab51a5d0e540de0de7d..160b5a6ad2d5cb6e0292f9ff1d16ee55
|
|||
base::Value::Dict job_settings,
|
||||
std::unique_ptr<PrintSettings> print_settings,
|
||||
UpdatePrintSettingsCallback callback);
|
||||
@@ -304,7 +320,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -320,7 +336,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 fcee7b58a8eebd9fc044bab51a5d0e540de0de7d..160b5a6ad2d5cb6e0292f9ff1d16ee55
|
|||
|
||||
// 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
|
||||
@@ -374,8 +391,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -401,8 +418,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;
|
||||
|
||||
|
@ -680,10 +680,10 @@ index ca71560874a0189068dd11fbc039f5673bf6bd96..a8551d95e64da2afbc1685b2df8f1fc3
|
|||
mojom::PrintFailureReason reason) override;
|
||||
|
||||
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
|
||||
index c97825d05cb7d132c9af489998f4ed8c32603c00..fde20b8a6c4811ce728abfee26b2ab7b53027a94 100644
|
||||
index c46e272beafd30a089b06d0920f0e94d8736b81b..b5d61250dc58d20e9c17958ac26a519b7c888ccc 100644
|
||||
--- a/components/printing/common/print.mojom
|
||||
+++ b/components/printing/common/print.mojom
|
||||
@@ -296,7 +296,7 @@ union PrintWithParamsResult {
|
||||
@@ -302,7 +302,7 @@ union PrintWithParamsResult {
|
||||
interface PrintRenderFrame {
|
||||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page, and then switch back the CSS to display media type.
|
||||
|
@ -692,7 +692,7 @@ index c97825d05cb7d132c9af489998f4ed8c32603c00..fde20b8a6c4811ce728abfee26b2ab7b
|
|||
|
||||
// Requests the frame to be printed with specified parameters. This is used
|
||||
// to programmatically produce PDF by request from the browser (e.g. over
|
||||
@@ -390,7 +390,10 @@ interface PrintManagerHost {
|
||||
@@ -396,7 +396,10 @@ interface PrintManagerHost {
|
||||
// UI to the user to select the final print settings. If the user cancels or
|
||||
// an error occurs, return null.
|
||||
[Sync]
|
||||
|
@ -705,7 +705,7 @@ index c97825d05cb7d132c9af489998f4ed8c32603c00..fde20b8a6c4811ce728abfee26b2ab7b
|
|||
// Tells the browser printing failed.
|
||||
PrintingFailed(int32 cookie, PrintFailureReason reason);
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad2997824a27 100644
|
||||
index bc7a6f8d4fb1778af3b56f2c336e8941567ad4a7..d7811ae12c6828ecbe28824a46c139e0b645513a 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -46,6 +46,7 @@
|
||||
|
@ -716,7 +716,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
#include "printing/units.h"
|
||||
#include "services/metrics/public/cpp/ukm_source_id.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
@@ -1382,7 +1383,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -1384,7 +1385,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
if (!weak_this)
|
||||
return;
|
||||
|
||||
|
@ -726,7 +726,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
if (!weak_this)
|
||||
return;
|
||||
|
||||
@@ -1414,7 +1416,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1416,7 +1418,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
|
@ -735,7 +735,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
@@ -1430,7 +1432,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
@@ -1432,7 +1434,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
// plugin node and print that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
||||
|
@ -744,7 +744,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
|
||||
if (!render_frame_gone_) {
|
||||
RecordBeforeAfterPrintEventForDebugging(__LINE__);
|
||||
@@ -1514,7 +1516,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
@@ -1516,7 +1518,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
}
|
||||
|
||||
Print(frame, print_preview_context_.source_node(),
|
||||
|
@ -754,7 +754,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
if (!render_frame_gone_) {
|
||||
RecordBeforeAfterPrintEventForDebugging(__LINE__);
|
||||
print_preview_context_.DispatchAfterPrintEvent();
|
||||
@@ -1567,6 +1570,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
@@ -1570,6 +1573,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
|
||||
|
@ -763,7 +763,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -2183,7 +2188,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2193,7 +2198,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
return;
|
||||
|
||||
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
|
||||
|
@ -773,7 +773,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
// Check if |this| is still valid.
|
||||
if (!weak_this)
|
||||
return;
|
||||
@@ -2199,7 +2205,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2209,7 +2215,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
|
@ -784,16 +784,16 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
// If still not finished with earlier print request simply ignore.
|
||||
if (prep_frame_view_)
|
||||
return;
|
||||
@@ -2207,7 +2215,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2217,7 +2225,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
FrameReference frame_ref(frame);
|
||||
|
||||
uint32_t expected_page_count = 0;
|
||||
- if (!CalculateNumberOfPages(frame, node, &expected_page_count)) {
|
||||
+ if (!CalculateNumberOfPages(frame, node, &expected_page_count, std::move(settings))) {
|
||||
DidFinishPrinting(FAIL_PRINT_INIT);
|
||||
DidFinishPrinting(PrintingResult::kFailPrintInit);
|
||||
return; // Failed to init print page settings.
|
||||
}
|
||||
@@ -2226,8 +2234,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2236,8 +2244,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
print_pages_params_->params->print_scaling_option;
|
||||
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
|
@ -810,7 +810,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2460,35 +2475,47 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2480,35 +2495,47 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -868,7 +868,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
return false;
|
||||
}
|
||||
|
||||
@@ -2592,7 +2619,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
@@ -2613,7 +2640,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
std::move(params),
|
||||
base::BindOnce(
|
||||
[](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
|
||||
|
@ -878,7 +878,7 @@ index 59c7a51279bdb703a84c13154a810f268062c345..a1e9f3e25589bc6436b18a550609ad29
|
|||
std::move(quit_closure).Run();
|
||||
},
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
|
||||
index 0fea424325081a0ef6720000841ea321b89024d0..c700de4b81fc0c157946e76faedaca6b59aeac0c 100644
|
||||
index 54241ff910b7198761fd76a21e4fe4bd42cc7ce2..51735091523fdd208b2c799a1c7910fdcc703e44 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.h
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.h
|
||||
@@ -247,7 +247,7 @@ class PrintRenderFrameHelper
|
||||
|
@ -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 e83a8746c00800ef8236a696ea1052a76ae6b2fb..183c520baa855d3065f34f3bc90c8c590237192c 100644
|
||||
index 904c0ef40a0fa23e0f3b7d0023e6418500ce45e9..88eca71122353752154a29e4f54693c3ac13f930 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -2913,8 +2913,9 @@ source_set("browser") {
|
||||
@@ -2916,8 +2916,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ index 7a84a4e6c65eb5b9373b0667166188d93948ad68..e621a92c42c5cd2d818bcbc99d9b3e7a
|
|||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index e262b0d1b1c50b81345d6333c5190769dd35c4a8..a41d8c314019ddd26e7c549149053bae25080d68 100644
|
||||
index f362dc586802e47f45558b0cc068e2bf44cb796e..d95743b1ab3461f69326ca904448636de88ea070 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4902,6 +4902,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
|
@ -60,7 +60,7 @@ index e262b0d1b1c50b81345d6333c5190769dd35c4a8..a41d8c314019ddd26e7c549149053bae
|
|||
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 5a95c202b96ee5e2e4a519e27c2a96b181248c07..9c55246c605adaa1f4edaa6f3396fab55328ac9e 100644
|
||||
index 7893e253691ef0e51b1ba619c4579cb0e39e2ff1..0be4c605413b9a7a27deafc9c13d1e45885e92fe 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -994,6 +994,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
|
|
|
@ -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 75d9891502495a10262dad85f90f2c286b146be1..2153df7bef066da7851bd1cc6375faaeee2f4537 100644
|
||||
index 61f07f736047732cc631c713fafa507df48ebb90..7e99d7493ac1f9281668eb3283f7475769245021 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1617,7 +1617,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1616,7 +1616,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ index 75d9891502495a10262dad85f90f2c286b146be1..2153df7bef066da7851bd1cc6375faae
|
|||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1646,6 +1646,12 @@ if (!is_android) {
|
||||
@@ -1645,6 +1645,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
|
|||
Patch to make scrollBounce option work.
|
||||
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index 9bdebf527329f163260a4f300316a0b44f1082a6..abe4e33ef816221eb177c7ad789878dd49125c8c 100644
|
||||
index d1f8638d390858b0872c56a62168acb7eef04db4..6193cefd3e98ca550dc3a5ac7b78925b89aebd71 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1332,7 +1332,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
@@ -1334,7 +1334,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabled() {
|
||||
|
|
|
@ -9,7 +9,7 @@ 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 c302ba2e69b71b58faf40bc3e622b22183b17f26..6a119a6179cc242a63cb6fcc7c4974dd15b721df 100644
|
||||
index a32f963654763cc0c706f752eca96e8cf5d0be54..998357b01a55def3d9c1e37d09f52d61b5ecd6f2 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3314,6 +3314,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
|
@ -35,7 +35,7 @@ index c302ba2e69b71b58faf40bc3e622b22183b17f26..6a119a6179cc242a63cb6fcc7c4974dd
|
|||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 31a816804ebb81089c8fee6e3a00420b786e0632..42cb935abb67d9c4ede682bbb3c87277d95ad93b 100644
|
||||
index f80a1a82e14a0c9f6c43897e649b60a87f5f5aa6..a58eb20fdd278fac7f89862a4817cbf57c6a0381 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -98,10 +98,13 @@ class BrowserContext;
|
||||
|
|
|
@ -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 587d3594c54bb395db7074b0c2e2f10fa61d682b..2a8fe8ef8381f93cf1b4f6a504ad4384fd5aa26e 100644
|
||||
index 81b495cce7891a30c3ea1acc9160566d66acaef0..e4925235a152e15bb38a680b3ed428b65e289404 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -7255,6 +7255,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -7263,6 +7263,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 8242f2e7121568404723be5fba05a073ad1a157e..f2bfbef1d12e06bbe9e0fcf84d89bda46edcbb8b 100644
|
||||
index 72e11bf5ff1468545e2ae3f59ba06edca96678e2..5b9abb1eb2f61499f22c4502ffa2deb254931b97 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -741,7 +741,7 @@ config("internal_config") {
|
||||
@@ -743,7 +743,7 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
|
@ -21,7 +21,7 @@ index 8242f2e7121568404723be5fba05a073ad1a157e..f2bfbef1d12e06bbe9e0fcf84d89bda4
|
|||
defines += [ "BUILDING_V8_SHARED" ]
|
||||
}
|
||||
|
||||
@@ -6698,7 +6698,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -6706,7 +6706,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
"src/interpreter/bytecodes.h",
|
||||
]
|
||||
|
||||
|
@ -30,7 +30,7 @@ index 8242f2e7121568404723be5fba05a073ad1a157e..f2bfbef1d12e06bbe9e0fcf84d89bda4
|
|||
|
||||
deps = [
|
||||
":v8_libbase",
|
||||
@@ -6710,7 +6710,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -6718,7 +6718,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
|
||||
if (current_toolchain == v8_snapshot_toolchain) {
|
||||
v8_executable("mksnapshot") {
|
||||
|
|
|
@ -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 f2bfbef1d12e06bbe9e0fcf84d89bda46edcbb8b..6eb42a315950627a85ad55aa8d760e4cf3fda398 100644
|
||||
index 5b9abb1eb2f61499f22c4502ffa2deb254931b97..2de11af08a8f20c0b04a7f7454b10cb7141837e2 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -741,6 +741,10 @@ config("internal_config") {
|
||||
@@ -743,6 +743,10 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
NSArray* pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents];
|
||||
pathComponents = [pathComponents
|
||||
subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)];
|
||||
NSString* path = [NSString pathWithComponents:pathComponents];
|
||||
[[NSWorkspace sharedWorkspace] launchApplication:path];
|
||||
[pool drain];
|
||||
return 0;
|
||||
@autoreleasepool {
|
||||
NSArray* pathComponents =
|
||||
[[[NSBundle mainBundle] bundlePath] pathComponents];
|
||||
pathComponents = [pathComponents
|
||||
subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)];
|
||||
NSString* path = [NSString pathWithComponents:pathComponents];
|
||||
[[NSWorkspace sharedWorkspace] launchApplication:path];
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ namespace electron::api {
|
|||
// Callback passed to js which will stop accessing the given bookmark.
|
||||
void OnStopAccessingSecurityScopedResource(NSURL* bookmarkUrl) {
|
||||
[bookmarkUrl stopAccessingSecurityScopedResource];
|
||||
[bookmarkUrl release];
|
||||
}
|
||||
|
||||
// Get base64 encoded NSData, create a bookmark for it and start accessing it.
|
||||
|
@ -54,9 +53,6 @@ base::RepeatingCallback<void()> App::StartAccessingSecurityScopedResource(
|
|||
[bookmarkUrl startAccessingSecurityScopedResource];
|
||||
}
|
||||
|
||||
// Stop the NSURL from being GC'd.
|
||||
[bookmarkUrl retain];
|
||||
|
||||
// Return a js callback which will close the bookmark.
|
||||
return base::BindRepeating(&OnStopAccessingSecurityScopedResource,
|
||||
bookmarkUrl);
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
|
||||
- (void)dealloc {
|
||||
[[NSDistributedNotificationCenter defaultCenter] removeObserver:self];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)addEmitter:(electron::api::PowerMonitor*)monitor_ {
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace auto_updater {
|
|||
namespace {
|
||||
|
||||
// The global SQRLUpdater object.
|
||||
SQRLUpdater* g_updater = nil;
|
||||
SQRLUpdater* __strong g_updater = nil;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
@ -87,7 +87,7 @@ void AutoUpdater::SetFeedURL(gin::Arguments* args) {
|
|||
}
|
||||
|
||||
if (g_updater)
|
||||
[g_updater release];
|
||||
g_updater = nil;
|
||||
|
||||
// Initialize the SQRLUpdater.
|
||||
@try {
|
||||
|
|
|
@ -97,7 +97,7 @@ gin::IsolateHolder CreateIsolateHolder(v8::Isolate* isolate) {
|
|||
base::SingleThreadTaskRunner::GetCurrentDefault(),
|
||||
gin::IsolateHolder::kSingleThread,
|
||||
gin::IsolateHolder::IsolateType::kUtility, std::move(create_params),
|
||||
gin::IsolateHolder::IsolateCreationMode::kNormal, isolate);
|
||||
gin::IsolateHolder::IsolateCreationMode::kNormal, nullptr, isolate);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -84,9 +84,6 @@
|
|||
*/
|
||||
- (void)productsRequest:(SKProductsRequest*)request
|
||||
didReceiveResponse:(SKProductsResponse*)response {
|
||||
// Release request object.
|
||||
[request release];
|
||||
|
||||
// Get the first product.
|
||||
NSArray* products = response.products;
|
||||
SKProduct* product = [products count] == 1 ? [products firstObject] : nil;
|
||||
|
@ -129,13 +126,10 @@
|
|||
content::GetUIThreadTaskRunner({})->PostTask(
|
||||
FROM_HERE, base::BindOnce(std::move(callback_), isProductValid));
|
||||
}
|
||||
// Release this delegate.
|
||||
[self release];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[username_ release];
|
||||
[super dealloc];
|
||||
username_ = nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -57,7 +57,6 @@ using InAppTransactionCallback = base::RepeatingCallback<void(
|
|||
*/
|
||||
- (void)dealloc {
|
||||
[[SKPaymentQueue defaultQueue] removeTransactionObserver:self];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -226,7 +225,7 @@ TransactionObserver::TransactionObserver() {
|
|||
}
|
||||
|
||||
TransactionObserver::~TransactionObserver() {
|
||||
[observer_ release];
|
||||
observer_ = nil;
|
||||
}
|
||||
|
||||
} // namespace in_app_purchase
|
||||
|
|
|
@ -67,9 +67,6 @@
|
|||
*/
|
||||
- (void)productsRequest:(SKProductsRequest*)request
|
||||
didReceiveResponse:(SKProductsResponse*)response {
|
||||
// Release request object.
|
||||
[request release];
|
||||
|
||||
// Get the products.
|
||||
NSArray* products = response.products;
|
||||
|
||||
|
@ -84,8 +81,6 @@
|
|||
// Send the callback to the browser thread.
|
||||
content::GetUIThreadTaskRunner({})->PostTask(
|
||||
FROM_HERE, base::BindOnce(std::move(callback_), converted));
|
||||
|
||||
[self release];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "shell/browser/notifications/notification.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -36,7 +35,7 @@ class CocoaNotification : public Notification {
|
|||
private:
|
||||
void LogAction(const char* action);
|
||||
|
||||
base::scoped_nsobject<NSUserNotification> notification_;
|
||||
NSUserNotification* __strong notification_;
|
||||
std::map<std::string, unsigned> additional_action_indices_;
|
||||
unsigned action_index_;
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@ CocoaNotification::~CocoaNotification() {
|
|||
}
|
||||
|
||||
void CocoaNotification::Show(const NotificationOptions& options) {
|
||||
notification_.reset([[NSUserNotification alloc] init]);
|
||||
notification_ = [[NSUserNotification alloc] init];
|
||||
|
||||
NSString* identifier =
|
||||
[NSString stringWithFormat:@"%@:notification:%@",
|
||||
|
@ -71,8 +71,7 @@ void CocoaNotification::Show(const NotificationOptions& options) {
|
|||
|
||||
int i = 0;
|
||||
action_index_ = UINT_MAX;
|
||||
NSMutableArray* additionalActions =
|
||||
[[[NSMutableArray alloc] init] autorelease];
|
||||
NSMutableArray* additionalActions = [[NSMutableArray alloc] init];
|
||||
for (const auto& action : options.actions) {
|
||||
if (action.type == u"button") {
|
||||
// If the notification has both a reply and actions,
|
||||
|
@ -118,7 +117,7 @@ void CocoaNotification::Dismiss() {
|
|||
|
||||
NotificationDismissed();
|
||||
|
||||
notification_.reset(nil);
|
||||
notification_ = nil;
|
||||
}
|
||||
|
||||
void CocoaNotification::NotificationDisplayed() {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_
|
||||
#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_
|
||||
|
||||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "shell/browser/notifications/mac/notification_center_delegate.h"
|
||||
#include "shell/browser/notifications/notification_presenter.h"
|
||||
|
||||
|
@ -25,8 +24,7 @@ class NotificationPresenterMac : public NotificationPresenter {
|
|||
Notification* CreateNotificationObject(
|
||||
NotificationDelegate* delegate) override;
|
||||
|
||||
base::scoped_nsobject<NotificationCenterDelegate>
|
||||
notification_center_delegate_;
|
||||
NotificationCenterDelegate* __strong notification_center_delegate_;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -14,14 +14,13 @@
|
|||
- (void)drawRect:(NSRect)dirtyRect {
|
||||
NSString* str = @"No content under offscreen mode";
|
||||
NSMutableParagraphStyle* paragraphStyle =
|
||||
[[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease];
|
||||
[[NSParagraphStyle defaultParagraphStyle] mutableCopy];
|
||||
[paragraphStyle setAlignment:NSTextAlignmentCenter];
|
||||
NSDictionary* attributes =
|
||||
[NSDictionary dictionaryWithObject:paragraphStyle
|
||||
forKey:NSParagraphStyleAttributeName];
|
||||
NSAttributedString* text =
|
||||
[[[NSAttributedString alloc] initWithString:str
|
||||
attributes:attributes] autorelease];
|
||||
[[NSAttributedString alloc] initWithString:str attributes:attributes];
|
||||
NSRect frame = NSMakeRect(0, (self.frame.size.height - text.size.height) / 2,
|
||||
self.frame.size.width, text.size.height);
|
||||
[str drawInRect:frame withAttributes:attributes];
|
||||
|
@ -48,7 +47,7 @@ void OffScreenWebContentsView::PlatformCreate() {
|
|||
}
|
||||
|
||||
void OffScreenWebContentsView::PlatformDestroy() {
|
||||
[offScreenView_ release];
|
||||
offScreenView_ = nil;
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -42,12 +42,9 @@
|
|||
@implementation TrustDelegate
|
||||
|
||||
- (void)dealloc {
|
||||
[panel_ release];
|
||||
CFRelease(trust_);
|
||||
CFRelease(cert_chain_);
|
||||
CFRelease(sec_policy_);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id)initWithPromise:(gin_helper::Promise<void>)promise
|
||||
|
@ -77,7 +74,6 @@
|
|||
cert_db->NotifyObserversTrustStoreChanged();
|
||||
|
||||
promise_->Resolve();
|
||||
[self autorelease];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "content/public/common/color_parser.h"
|
||||
#include "shell/browser/ui/cocoa/NSString+ANSI.h"
|
||||
#include "skia/ext/skia_utils_mac.h"
|
||||
|
@ -149,12 +148,11 @@
|
|||
- (NSMutableAttributedString*)attributedStringParsingANSICodes {
|
||||
NSMutableAttributedString* result = [[NSMutableAttributedString alloc] init];
|
||||
|
||||
base::scoped_nsobject<NSMutableDictionary> attributes(
|
||||
[[NSMutableDictionary alloc] init]);
|
||||
NSMutableDictionary* attributes([[NSMutableDictionary alloc] init]);
|
||||
NSArray* parts = [self componentsSeparatedByString:@"\033["];
|
||||
[result appendAttributedString:[[[NSAttributedString alloc]
|
||||
[result appendAttributedString:[[NSAttributedString alloc]
|
||||
initWithString:parts.firstObject
|
||||
attributes:nil] autorelease]];
|
||||
attributes:nil]];
|
||||
|
||||
for (NSString* part in
|
||||
[parts subarrayWithRange:NSMakeRange(1, parts.count - 1)]) {
|
||||
|
@ -165,18 +163,16 @@
|
|||
NSString* text = sequence.lastObject;
|
||||
|
||||
if (sequence.count < 2) {
|
||||
[result
|
||||
appendAttributedString:[[[NSAttributedString alloc]
|
||||
initWithString:text
|
||||
attributes:attributes] autorelease]];
|
||||
[result appendAttributedString:[[NSAttributedString alloc]
|
||||
initWithString:text
|
||||
attributes:attributes]];
|
||||
} else if (sequence.count >= 2) {
|
||||
text = [[sequence subarrayWithRange:NSMakeRange(1, sequence.count - 1)]
|
||||
componentsJoinedByString:@"m"];
|
||||
[attributes modifyAttributesForANSICodes:sequence[0]];
|
||||
[result
|
||||
appendAttributedString:[[[NSAttributedString alloc]
|
||||
initWithString:text
|
||||
attributes:attributes] autorelease]];
|
||||
[result appendAttributedString:[[NSAttributedString alloc]
|
||||
initWithString:text
|
||||
attributes:attributes]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ NSString* ContainingDiskImageDevice(NSString* bundlePath) {
|
|||
stringWithFileSystemRepresentation:fs.f_mntfromname
|
||||
length:strlen(fs.f_mntfromname)];
|
||||
|
||||
NSTask* hdiutil = [[[NSTask alloc] init] autorelease];
|
||||
NSTask* hdiutil = [[NSTask alloc] init];
|
||||
[hdiutil setLaunchPath:@"/usr/bin/hdiutil"];
|
||||
[hdiutil setArguments:[NSArray arrayWithObjects:@"info", @"-plist", nil]];
|
||||
[hdiutil setStandardOutput:[NSPipe pipe]];
|
||||
|
@ -286,8 +286,8 @@ tell application "Finder"
|
|||
move theFile to trash
|
||||
end tell
|
||||
)str";
|
||||
NSAppleScript* appleScript = [[[NSAppleScript alloc]
|
||||
initWithSource:[NSString stringWithFormat:@(code), path]] autorelease];
|
||||
NSAppleScript* appleScript = [[NSAppleScript alloc]
|
||||
initWithSource:[NSString stringWithFormat:@(code), path]];
|
||||
NSDictionary* errorDict = nil;
|
||||
NSAppleEventDescriptor* scriptResult =
|
||||
[appleScript executeAndReturnError:&errorDict];
|
||||
|
|
|
@ -26,11 +26,10 @@ ElectronNativeWidgetMac::~ElectronNativeWidgetMac() = default;
|
|||
NativeWidgetMacNSWindow* ElectronNativeWidgetMac::CreateNSWindow(
|
||||
const remote_cocoa::mojom::CreateWindowParams* params) {
|
||||
if (window_type_ == "panel") {
|
||||
return [[[ElectronNSPanel alloc] initWithShell:shell_
|
||||
styleMask:style_mask_] autorelease];
|
||||
return [[ElectronNSPanel alloc] initWithShell:shell_ styleMask:style_mask_];
|
||||
} else {
|
||||
return [[[ElectronNSWindow alloc] initWithShell:shell_
|
||||
styleMask:style_mask_] autorelease];
|
||||
return [[ElectronNSWindow alloc] initWithShell:shell_
|
||||
styleMask:style_mask_];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
- (void)dealloc {
|
||||
if (hover_view_)
|
||||
[hover_view_ removeFromSuperview];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)setVisible:(BOOL)visible {
|
||||
|
|
|
@ -54,8 +54,8 @@ void DragFileItems(const std::vector<base::FilePath>& files,
|
|||
NSMutableArray* file_items = [NSMutableArray array];
|
||||
for (auto const& file : files) {
|
||||
NSURL* file_url = base::mac::FilePathToNSURL(file);
|
||||
NSDraggingItem* file_item = [[[NSDraggingItem alloc]
|
||||
initWithPasteboardWriter:file_url] autorelease];
|
||||
NSDraggingItem* file_item =
|
||||
[[NSDraggingItem alloc] initWithPasteboardWriter:file_url];
|
||||
NSImage* file_image = icon.ToNSImage();
|
||||
NSSize image_size = file_image.size;
|
||||
NSRect image_rect = NSMakeRect(current_position.x - image_size.width / 2,
|
||||
|
|
|
@ -73,8 +73,7 @@
|
|||
- (void)dealloc {
|
||||
auto* popupButton =
|
||||
static_cast<NSPopUpButton*>([[self subviews] objectAtIndex:1]);
|
||||
[[popupButton target] release];
|
||||
[super dealloc];
|
||||
popupButton.target = nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -148,10 +147,10 @@ void SetAllowedFileTypes(NSSavePanel* dialog, const Filters& filters) {
|
|||
[popupButton setTarget:popUpButtonHandler];
|
||||
[popupButton setAction:@selector(selectFormat:)];
|
||||
|
||||
[accessoryView addSubview:[label autorelease]];
|
||||
[accessoryView addSubview:[popupButton autorelease]];
|
||||
[accessoryView addSubview:label];
|
||||
[accessoryView addSubview:popupButton];
|
||||
|
||||
[dialog setAccessoryView:[accessoryView autorelease]];
|
||||
[dialog setAccessoryView:accessoryView];
|
||||
}
|
||||
|
||||
void SetupDialog(NSSavePanel* dialog, const DialogSettings& settings) {
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "base/containers/contains.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/mac/mac_util.h"
|
||||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
|
@ -106,7 +105,7 @@ NSAlert* CreateNSAlert(const MessageBoxSettings& settings) {
|
|||
if (settings.text_width > 0) {
|
||||
NSRect rect = NSMakeRect(0, 0, settings.text_width, 0);
|
||||
NSView* accessoryView = [[NSView alloc] initWithFrame:rect];
|
||||
[alert setAccessoryView:[accessoryView autorelease]];
|
||||
[alert setAccessoryView:accessoryView];
|
||||
}
|
||||
|
||||
return alert;
|
||||
|
@ -115,7 +114,7 @@ NSAlert* CreateNSAlert(const MessageBoxSettings& settings) {
|
|||
} // namespace
|
||||
|
||||
int ShowMessageBoxSync(const MessageBoxSettings& settings) {
|
||||
base::scoped_nsobject<NSAlert> alert(CreateNSAlert(settings));
|
||||
NSAlert* alert(CreateNSAlert(settings));
|
||||
|
||||
// Use runModal for synchronous alert without parent, since we don't have a
|
||||
// window to wait for. Also use it when window is provided but it is not
|
||||
|
@ -145,7 +144,7 @@ void ShowMessageBox(const MessageBoxSettings& settings,
|
|||
// Use runModal for synchronous alert without parent, since we don't have a
|
||||
// window to wait for.
|
||||
if (!settings.parent_window) {
|
||||
int ret = [[alert autorelease] runModal];
|
||||
int ret = [alert runModal];
|
||||
std::move(callback).Run(
|
||||
ret, alert.suppressionButton.state == NSControlStateValueOn);
|
||||
} else {
|
||||
|
@ -175,7 +174,6 @@ void ShowMessageBox(const MessageBoxSettings& settings,
|
|||
if (response < 0)
|
||||
response = cancel_id;
|
||||
bool suppressed = alert.suppressionButton.state == NSControlStateValueOn;
|
||||
[alert release];
|
||||
// The completionHandler runs inside a transaction commit, and we should
|
||||
// not do any runModal inside it. However since we can not control what
|
||||
// users will run in the callback, we have to delay running the callback
|
||||
|
@ -204,7 +202,6 @@ void ShowErrorBox(const std::u16string& title, const std::u16string& content) {
|
|||
[alert setInformativeText:base::SysUTF16ToNSString(content)];
|
||||
[alert setAlertStyle:NSAlertStyleCritical];
|
||||
[alert runModal];
|
||||
[alert release];
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#import <QuickLookThumbnailing/QuickLookThumbnailing.h>
|
||||
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "gin/arguments.h"
|
||||
#include "shell/common/gin_converters/image_converter.h"
|
||||
|
@ -66,13 +65,11 @@ v8::Local<v8::Promise> NativeImage::CreateThumbnailFromPath(
|
|||
}
|
||||
|
||||
NSScreen* screen = [[NSScreen screens] firstObject];
|
||||
base::scoped_nsobject<QLThumbnailGenerationRequest> request(
|
||||
[[QLThumbnailGenerationRequest alloc]
|
||||
initWithFileAtURL:nsurl
|
||||
size:cg_size
|
||||
scale:[screen backingScaleFactor]
|
||||
representationTypes:
|
||||
QLThumbnailGenerationRequestRepresentationTypeAll]);
|
||||
QLThumbnailGenerationRequest* request([[QLThumbnailGenerationRequest alloc]
|
||||
initWithFileAtURL:nsurl
|
||||
size:cg_size
|
||||
scale:[screen backingScaleFactor]
|
||||
representationTypes:QLThumbnailGenerationRequestRepresentationTypeAll]);
|
||||
__block gin_helper::Promise<gfx::Image> p = std::move(promise);
|
||||
[[QLThumbnailGenerator sharedGenerator]
|
||||
generateBestRepresentationForRequest:request
|
||||
|
@ -89,9 +86,9 @@ v8::Local<v8::Promise> NativeImage::CreateThumbnailFromPath(
|
|||
err_msg);
|
||||
});
|
||||
} else {
|
||||
NSImage* result = [[[NSImage alloc]
|
||||
NSImage* result = [[NSImage alloc]
|
||||
initWithCGImage:[thumbnail CGImage]
|
||||
size:cg_size] autorelease];
|
||||
size:cg_size];
|
||||
gfx::Image image(result);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
p.Resolve(image);
|
||||
|
|
|
@ -20,8 +20,7 @@ std::string ApplicationInfoDictionaryValue(NSString* key) {
|
|||
}
|
||||
|
||||
std::string ApplicationInfoDictionaryValue(CFStringRef key) {
|
||||
NSString* key_ns =
|
||||
const_cast<NSString*>(reinterpret_cast<const NSString*>(key));
|
||||
NSString* key_ns = const_cast<NSString*>((__bridge const NSString*)(key));
|
||||
return ApplicationInfoDictionaryValue(key_ns);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace {
|
|||
// thread safe, including LSGetApplicationForURL (> 10.2) and
|
||||
// NSWorkspace#openURLs.
|
||||
std::string OpenURL(NSURL* ns_url, bool activate) {
|
||||
CFURLRef cf_url = reinterpret_cast<CFURLRef>(ns_url);
|
||||
CFURLRef cf_url = (__bridge CFURLRef)(ns_url);
|
||||
CFURLRef ref =
|
||||
LSCopyDefaultApplicationURLForURL(cf_url, kLSRolesAll, nullptr);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче