chore: bump chromium to 134.0.6968.0 (main) (#45172)

* chore: bump chromium in DEPS to 134.0.6948.0

* chore: update can_create_window.patch

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

no patch code changes, but had to manually apply due to upstream context shear

* chore: update proxy_config_monitor.patch

no manual changes; patch applied with fuzz 2

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

* chore: update build_add_electron_tracing_category.patch

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

* chore: update adjust_accessibility_ui_for_electron.patch

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

no patch code changes, but had to manually apply due to upstream context shear

* chore: e patches all

* chore: use fully-qualified path for all.gn

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

* chore: do not use a variable when assigning rtc_use_h264

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

* Move GlobalShortcutListenerLinux to //ui/base

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

* [MPArch Guest View] Make WebPreferences queried per frame tree root

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

* [Status Icons] Allow vector resources

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

* [Extensions] Move MatchOriginAsFallbackBehavior to Mojom

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

* Remove StrongAlias::Hasher

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

* Rename text-change and select-change methods and related stuff

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

* [Code Health] Remove stale feature EnableWebUsbOnExtensionServiceWorker

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

* [Extensions Cleanup] Move creation of tab-based ports to factory method

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

* refactor: add StatusIconGtk::SetIcon()

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

copied from chrome/browser/status_icons/status_icon.cc

* refactor: add TrayIconLinux::GetIcon()

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

* chore: update feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch

remove unused filter_ field

* chore: bump chromium in DEPS to 134.0.6950.0

* chore: bump chromium in DEPS to 134.0.6952.0

* chore: bump chromium in DEPS to 134.0.6954.0

* chore: bump chromium in DEPS to 134.0.6956.0

* chore: update Chromium patches

* 6165749: Check scanout support in RenderableGpuMemoryBufferPool | https://chromium-review.googlesource.com/c/chromium/src/+/6165749

* 6106730: [Win] Use DXGI swapchains and DCOMP visuals in software mode | https://chromium-review.googlesource.com/c/chromium/src/+/6106730

* chore: update patches

* chore: bump chromium in DEPS to 134.0.6958.0

* chore: bump chromium in DEPS to 134.0.6960.0

* chore: update chromium patches

* 6168371: Remove extensions GlobalShortcutListener wrapper | https://chromium-review.googlesource.com/c/chromium/src/+/6168371

* chore: update patches

* 6161637: WebUI: Leverage build_webui() in chrome://translate-internals | https://chromium-review.googlesource.com/c/chromium/src/+/6161637

* chore: bump chromium in DEPS to 134.0.6962.0

* 6177329: Remove policy.used_policy_certificates pref on ChromeOS | https://chromium-review.googlesource.com/c/chromium/src/+/6177329

* 6180524: Simplify logic in components/os_crypt/sync/BUILD.gn | https://chromium-review.googlesource.com/c/chromium/src/+/6180524

* 6144831: Enforce --disallow-v8-feature-flag-overrides in the renderer | https://chromium-review.googlesource.com/c/chromium/src/+/6144831

* chore: update patches

* chore: bump chromium in DEPS to 134.0.6964.0

* 6181010: Ensure busy cursor does not show via LaunchWithoutSandbox | https://chromium-review.googlesource.com/c/chromium/src/+/6181010

* chore: update patches

* chore: bump chromium in DEPS to 134.0.6966.0

* 6180598: [api] Remove Reallocate | https://chromium-review.googlesource.com/c/v8/v8/+/6180598

* 6170781: [Refactor] Move UninstallExtension to ExtensionRegistrar. | https://chromium-review.googlesource.com/c/chromium/src/+/6170781

* chore: update filenames.libcxx.gni

* 6168207: cdm: Remove widevine_cdm_version.h | https://chromium-review.googlesource.com/c/chromium/src/+/6168207

* chore: bump chromium in DEPS to 134.0.6968.0

* 6030552: [macOS] Allow using vibrancy with NativeWidgetNSWindowBridge | https://chromium-review.googlesource.com/c/chromium/src/+/6030552

* fix: use explicit copy to replace realloc impl

https://chromium-review.googlesource.com/c/v8/v8/+/6180598
https://issues.chromium.org/issues/331326406

As per recommendation, "File an issue with Node to explicitly copy,because they copy under the hood anyway"

* fixup! 6106730: [Win] Use DXGI swapchains and DCOMP visuals in software mode | https://chromium-review.googlesource.com/c/chromium/src/+/6106730

* fix: undefine win32 StrCat
https://chromium-review.googlesource.com/c/chromium/src/+/6172292

* fix: //device/vr:directx_helpers breaking the build
https://chromium-review.googlesource.com/c/chromium/src/+/6064548

Upstreamed in https://chromium-review.googlesource.com/c/chromium/src/+/6186102

* fix: avoid calling ui::Layer::SetFillsBoundsOpaquely
https://chromium-review.googlesource.com/c/chromium/src/+/6175787

The layer opacity is determined by the background color's alpha value

* fix: build with proprietary_codecs

The explicit setting of rtc_use_h264 is no longer needed since
https://webrtc-review.googlesource.com/c/src/+/62380

* fix: increase empty trace file size threshold

https://chromium-review.googlesource.com/c/chromium/src/+/6176642
Traces now contain a net-constants property to allow them to be converted to a net log.
These contain ~1240 new properties with formatted JSON data.

* fix: node tests missing resource management globals
https://chromium-review.googlesource.com/c/chromium/src/+/6174695

* fixup! fix: use explicit copy to replace realloc impl

* chore: disable focus handling test due to win32/ia32 regression

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: Samuel Maddock <samuelmaddock@electronjs.org>
This commit is contained in:
electron-roller[bot] 2025-01-23 23:07:43 -05:00 коммит произвёл GitHub
Родитель 996477152d
Коммит 75eac86506
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
122 изменённых файлов: 680 добавлений и 1118 удалений

2
DEPS
Просмотреть файл

@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'133.0.6920.0',
'134.0.6968.0',
'node_version':
'v22.11.0',
'nan_version':

Просмотреть файл

@ -14,8 +14,8 @@ v8_enable_snapshot_native_code_counters = false
v8_enable_javascript_promise_hooks = true
enable_cdm_host_verification = false
proprietary_codecs = true
ffmpeg_branding = "Chrome"
proprietary_codecs = true
enable_printing = true

Просмотреть файл

@ -1,7 +1,7 @@
import("all.gn")
import("//electron/build/args/all.gn")
is_component_build = false
is_component_ffmpeg = true
is_official_build = true
proprietary_codecs = false
ffmpeg_branding = "Chromium"
enable_dsyms = false
proprietary_codecs = false

Просмотреть файл

@ -1,14 +1,7 @@
import("all.gn")
import("//electron/build/args/all.gn")
is_component_build = false
is_official_build = true
# This may be guarded behind is_chrome_branded alongside
# proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321,
# explicitly override here to build OpenH264 encoder/FFmpeg decoder.
# The initialization of the decoder depends on whether ffmpeg has
# been built with H.264 support.
rtc_use_h264 = proprietary_codecs
# By default, Electron builds ffmpeg with proprietary codecs enabled. In order
# to facilitate users who don't want to ship proprietary codecs in ffmpeg, or
# who have an LGPL requirement to ship ffmpeg as a dynamically linked library,

Просмотреть файл

@ -1,14 +1,7 @@
import("all.gn")
import("//electron/build/args/all.gn")
is_debug = false
is_component_build = false
is_component_ffmpeg = true
is_official_build = false
dcheck_always_on = true
symbol_level = 1
# This may be guarded behind is_chrome_branded alongside
# proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321,
# explicitly override here to build OpenH264 encoder/FFmpeg decoder.
# The initialization of the decoder depends on whether ffmpeg has
# been built with H.264 support.
rtc_use_h264 = proprietary_codecs

Просмотреть файл

@ -34,8 +34,6 @@ static_library("chrome") {
"//chrome/browser/devtools/features.h",
"//chrome/browser/devtools/visual_logging.cc",
"//chrome/browser/devtools/visual_logging.h",
"//chrome/browser/extensions/global_shortcut_listener.cc",
"//chrome/browser/extensions/global_shortcut_listener.h",
"//chrome/browser/file_system_access/file_system_access_features.cc",
"//chrome/browser/file_system_access/file_system_access_features.h",
"//chrome/browser/icon_loader.cc",
@ -146,6 +144,8 @@ static_library("chrome") {
"//chrome/browser/ui/webui/accessibility/accessibility_ui.h",
"//extensions/browser/app_window/size_constraints.cc",
"//extensions/browser/app_window/size_constraints.h",
"//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.cc",
"//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h",
"//ui/views/native_window_tracker.h",
]
@ -176,7 +176,6 @@ static_library("chrome") {
}
public_deps = [
"//chrome/browser:dev_ui_browser_resources",
"//chrome/browser/resources/accessibility:resources",
"//chrome/browser/ui/color:color_headers",
"//chrome/browser/ui/color:mixers",
@ -219,9 +218,9 @@ static_library("chrome") {
if (is_linux) {
sources += [
"//chrome/browser/extensions/global_shortcut_listener_linux.cc",
"//chrome/browser/extensions/global_shortcut_listener_linux.h",
"//chrome/browser/icon_loader_auralinux.cc",
"//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc",
"//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.h",
]
sources += [
"//chrome/browser/ui/views/status_icons/concat_menu_model.cc",

Просмотреть файл

@ -55,7 +55,6 @@ template("electron_extra_paks") {
"$root_gen_dir/chrome/accessibility_resources.pak",
"$root_gen_dir/chrome/browser_resources.pak",
"$root_gen_dir/chrome/common_resources.pak",
"$root_gen_dir/chrome/dev_ui_browser_resources.pak",
"$root_gen_dir/components/components_resources.pak",
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
"$root_gen_dir/content/browser/tracing/tracing_resources.pak",
@ -69,7 +68,6 @@ template("electron_extra_paks") {
"$target_gen_dir/electron_resources.pak",
]
deps = [
"//chrome/browser:dev_ui_browser_resources",
"//chrome/browser:resources",
"//chrome/browser/resources/accessibility:resources",
"//chrome/common:resources",

Просмотреть файл

@ -74,6 +74,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__algorithm/prev_permutation.h",
"//third_party/libc++/src/include/__algorithm/pstl.h",
"//third_party/libc++/src/include/__algorithm/push_heap.h",
"//third_party/libc++/src/include/__algorithm/radix_sort.h",
"//third_party/libc++/src/include/__algorithm/ranges_adjacent_find.h",
"//third_party/libc++/src/include/__algorithm/ranges_all_of.h",
"//third_party/libc++/src/include/__algorithm/ranges_any_of.h",
@ -1517,7 +1518,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__iterator/wrap_iter.h",
"//third_party/libc++/src/include/__locale",
"//third_party/libc++/src/include/__locale_dir/locale_base_api/android.h",
"//third_party/libc++/src/include/__locale_dir/locale_base_api/bsd_locale_defaults.h",
"//third_party/libc++/src/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h",
"//third_party/libc++/src/include/__locale_dir/locale_base_api/fuchsia.h",
"//third_party/libc++/src/include/__locale_dir/locale_base_api/ibm.h",

Просмотреть файл

@ -9,11 +9,11 @@ with node.js that allows exposing additional digests without patching,
this patch is required to provide ripemd160 support in the nodejs crypto
module.
diff --git a/crypto/digest_extra/digest_extra.cc b/crypto/digest_extra/digest_extra.cc
index 0b30897db59bdfc9ada43cf44af21bc54b6d8442..d6ecbc05d7beb6efea79166004137f7cab4ce425 100644
--- a/crypto/digest_extra/digest_extra.cc
+++ b/crypto/digest_extra/digest_extra.cc
@@ -87,6 +87,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
diff --git a/crypto/digest/digest_extra.cc b/crypto/digest/digest_extra.cc
index 8e26b987b783edd5bb399a6ef5a2c5c7b8d4a547..c925cc14eb7a0b2e30f5cad421cd225bee17985e 100644
--- a/crypto/digest/digest_extra.cc
+++ b/crypto/digest/digest_extra.cc
@@ -40,6 +40,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
{NID_sha512, EVP_sha512, SN_sha512, LN_sha512},
{NID_sha512_256, EVP_sha512_256, SN_sha512_256, LN_sha512_256},
{NID_md5_sha1, EVP_md5_sha1, SN_md5_sha1, LN_md5_sha1},
@ -22,10 +22,10 @@ index 0b30897db59bdfc9ada43cf44af21bc54b6d8442..d6ecbc05d7beb6efea79166004137f7c
// hash function when given a signature OID. To avoid unintended lax parsing
// of hash OIDs, this is no longer supported for lookup by OID or NID.
diff --git a/crypto/fipsmodule/digest/digests.cc.inc b/crypto/fipsmodule/digest/digests.cc.inc
index e1b08fa2f2e2e3afca95b1f8b719220c5436903b..90a5d1895b9d5dff2748ef638c06c127ef84797b 100644
index 61dc524d4a7bb788f5ac8b39121a5e85d86d54b4..a7ce0306e9b942bc793a29a9362917d634ede98b 100644
--- a/crypto/fipsmodule/digest/digests.cc.inc
+++ b/crypto/fipsmodule/digest/digests.cc.inc
@@ -60,6 +60,7 @@
@@ -13,6 +13,7 @@
#include <string.h>
#include <openssl/nid.h>
@ -33,7 +33,7 @@ index e1b08fa2f2e2e3afca95b1f8b719220c5436903b..90a5d1895b9d5dff2748ef638c06c127
#include "../../internal.h"
#include "../bcm_interface.h"
@@ -217,4 +218,27 @@ DEFINE_METHOD_FUNCTION(EVP_MD, EVP_sha512_256) {
@@ -170,4 +171,27 @@ DEFINE_METHOD_FUNCTION(EVP_MD, EVP_sha512_256) {
out->ctx_size = sizeof(SHA512_CTX);
}
@ -82,10 +82,10 @@ index e199e10ca6602f231df4d83e1efe5254ee20e98f..9fd0e0225fa48b0afb90b525236e54cf
void EVP_MD_do_all(void (*callback)(const EVP_MD *cipher, const char *name,
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
index c3130dc9baf4e28b9eef383a22707a561129ec16..2d046ece0705e8bec17aa1f164e1f9702b2f325b 100644
index 19d517785976041e62fa533d8d97745b6dc074dd..30fab7cd264edb0f17b164d3e685773a5c741aea 100644
--- a/include/openssl/digest.h
+++ b/include/openssl/digest.h
@@ -90,6 +90,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);
@@ -43,6 +43,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);
// MD5 and SHA-1, as used in TLS 1.1 and below.
OPENSSL_EXPORT const EVP_MD *EVP_md5_sha1(void);

Просмотреть файл

@ -27,11 +27,11 @@ RC2 Ciphers: rc2-40-cbc
It's unclear whether this would be accepted upstream. We should try regardless.
diff --git a/crypto/cipher_extra/cipher_extra.cc b/crypto/cipher_extra/cipher_extra.cc
index 62850ab6a216d401d023f81007fb59a33b4585f3..95bd172c99874610ec9157c52df4fe0232e78c7f 100644
--- a/crypto/cipher_extra/cipher_extra.cc
+++ b/crypto/cipher_extra/cipher_extra.cc
@@ -73,6 +73,7 @@ static const struct {
diff --git a/crypto/cipher/get_cipher.cc b/crypto/cipher/get_cipher.cc
index 2d0f369bdeba84b157db82bd87c293ae2344c560..9088a0f29a95fe7abbb98cbf7e8be2577e5617ac 100644
--- a/crypto/cipher/get_cipher.cc
+++ b/crypto/cipher/get_cipher.cc
@@ -26,6 +26,7 @@ static const struct {
const EVP_CIPHER *(*func)(void);
} kCiphers[] = {
{NID_aes_128_cbc, "aes-128-cbc", EVP_aes_128_cbc},
@ -39,7 +39,7 @@ index 62850ab6a216d401d023f81007fb59a33b4585f3..95bd172c99874610ec9157c52df4fe02
{NID_aes_128_ctr, "aes-128-ctr", EVP_aes_128_ctr},
{NID_aes_128_ecb, "aes-128-ecb", EVP_aes_128_ecb},
{NID_aes_128_gcm, "aes-128-gcm", EVP_aes_128_gcm},
@@ -83,17 +84,23 @@ static const struct {
@@ -36,17 +37,23 @@ static const struct {
{NID_aes_192_gcm, "aes-192-gcm", EVP_aes_192_gcm},
{NID_aes_192_ofb128, "aes-192-ofb", EVP_aes_192_ofb},
{NID_aes_256_cbc, "aes-256-cbc", EVP_aes_256_cbc},
@ -118,10 +118,10 @@ index 9fd0e0225fa48b0afb90b525236e54cff17c1c84..dded715011ac8c1dd9e4525f0bdd6408
callback(EVP_des_ede3_cbc(), "des-ede3-cbc", NULL, arg);
callback(EVP_rc2_cbc(), "rc2-cbc", NULL, arg);
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
index 18c1e708a42d7802b7d52564bceb93a53b7ab9c5..08b830a40e4587435b4e026dee4b205b4813c357 100644
index ad0f13919299a036d1e1121a05f62e096406a6c5..7baea6a73d3da02e2834c33e5579b8ad2b984221 100644
--- a/include/openssl/cipher.h
+++ b/include/openssl/cipher.h
@@ -476,6 +476,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
@@ -429,6 +429,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
// EVP_aes_128_cfb128 is only available in decrepit.
OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void);

Просмотреть файл

@ -20,10 +20,10 @@ index 76c74e2941d9912ca93a69254f540a6a6ddd9e74..3baf5043800c8cbca73efa4d8a65a68e
case ssl_open_record_error:
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
index 4ede3ad282b30b84df70a24ed9b89c516cddae4e..4d8fe9eb9a2138da994e54da6fa00ffa6a62a71d 100644
index a77b50b0f7cec57a2ce5bfcf76f5f543e6a9618a..51ee5c3546f3c803eae58da0b8ef8248efe560eb 100644
--- a/ssl/ssl_lib.cc
+++ b/ssl/ssl_lib.cc
@@ -1323,7 +1323,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
@@ -1193,7 +1193,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
}
if (ret_code == 0) {
@ -32,7 +32,7 @@ index 4ede3ad282b30b84df70a24ed9b89c516cddae4e..4d8fe9eb9a2138da994e54da6fa00ffa
return SSL_ERROR_ZERO_RETURN;
}
// An EOF was observed which violates the protocol, and the underlying
@@ -2690,13 +2690,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
@@ -2560,13 +2560,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
}

Просмотреть файл

@ -134,9 +134,8 @@ feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
chore_partial_revert_of.patch
fix_software_compositing_infinite_loop.patch
fix_add_method_which_disables_headless_mode_on_native_widget.patch
fix_put_nsvisualeffectview_before_viewscompositorsuperview.patch
refactor_unfilter_unresponsive_events.patch
build_disable_thin_lto_mac.patch
build_add_public_config_simdutf_config.patch
revert_code_health_clean_up_stale_macwebcontentsocclusion.patch
check_for_unit_to_activate_before_notifying_about_success.patch
build_remove_vr_directx_helpers_dependency.patch

Просмотреть файл

@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index d4ba7601d9e92972b86aa0ca97c33ceb97cd5d10..531a031e69b1a70a9e2c22f8ee72d952abcea7fe 100644
index 5480d568880a74ab41edfeee98eafdb893889e98..88269b39898481f1dfc2549f4d73040256c0bb43 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -265,6 +265,10 @@ int GpuMain(MainFunctionParams parameters) {
@@ -263,6 +263,10 @@ int GpuMain(MainFunctionParams parameters) {
// to the GpuProcessHost once the GpuServiceImpl has started.
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
@ -24,7 +24,7 @@ index d4ba7601d9e92972b86aa0ca97c33ceb97cd5d10..531a031e69b1a70a9e2c22f8ee72d952
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -375,7 +379,6 @@ int GpuMain(MainFunctionParams parameters) {
@@ -373,7 +377,6 @@ int GpuMain(MainFunctionParams parameters) {
#endif
const bool dead_on_arrival = !init_success;

Просмотреть файл

@ -23,10 +23,10 @@ index dbfaa28f2424f5b109816cfe951d734fc116a39f..d25cece2f5bef606307d44d4fc45eab0
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 2f3190e81c665cdfbf75ffee9bf09c5936b4a760..2df3bedc57b27afd2d63a0c726f0479246228d33 100644
index 87504441dc14eaec8a0aa9fa9197eab17efc4eb9..be511a377d2d5e2df3e7c73a1c54ef52998f1c95 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4794,6 +4794,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4798,6 +4798,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@ -40,10 +40,10 @@ index 2f3190e81c665cdfbf75ffee9bf09c5936b4a760..2df3bedc57b27afd2d63a0c726f04792
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 1994dc767874809091f478efe298aa88e0de9bb7..a4c9ae4e92906aa114e25994951b50816ca78489 100644
index 3d9cd1f42b1c604ae322d30d56ef113c61f4e84f..11ac3f0ae7dd13f6c74b1038f4eede257e57fd8e 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -650,6 +650,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -653,6 +653,8 @@ class CONTENT_EXPORT RenderFrameImpl
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;

Просмотреть файл

@ -7,7 +7,7 @@ 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 a54e35161454fdf3d7dcb20ffcf05acbe394f315..5ff512afad6527b1c409c4f5b5d87a7af6dcd835 100755
index 7500f633b4672cecbe3f5015724b5f9c9b35f953..6f83a2fe35b6695120b37b298dcd80179601af53 100755
--- a/tools/licenses/licenses.py
+++ b/tools/licenses/licenses.py
@@ -336,6 +336,31 @@ SPECIAL_CASES = {

Просмотреть файл

@ -8,7 +8,7 @@ was removed as part of the Raw Clipboard API scrubbing.
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
index bbdd3598894f5455f890ffde1d3cf8076b9a9176..7b2724f8c2baa2461645e85c07b6487b93540251 100644
index 48f0b7a7812a073c31ac1d7af156470efbb1b051..296ee0b51e3bdd68ceb63df4fbe5813a91669b7c 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
@@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteData(const std::u16string& format,
@ -27,9 +27,9 @@ index bbdd3598894f5455f890ffde1d3cf8076b9a9176..7b2724f8c2baa2461645e85c07b6487b
+
void ScopedClipboardWriter::Reset() {
objects_.clear();
platform_representations_.clear();
raw_objects_.clear();
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
index af932ade8d50f304be850dc1ff4f77b618c12c1f..a907fdebfa901938abded0eae203c093d8387f5b 100644
index e63c08b06c00dc0b1bd9c8339d3c6375e952e4f7..9e35ab7e6512c749fdea75fa863a97318541d350 100644
--- a/ui/base/clipboard/scoped_clipboard_writer.h
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
@@ -88,6 +88,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {

Просмотреть файл

@ -10,18 +10,18 @@ usage of BrowserList and Browser as we subclass related methods and use our
WindowList.
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f27c8a7d7b 100644
index 9e860989fc3196599ebb181b17e356c3ac991d08..232f89902c4c3f839d8dfc1101a0e52f72c80da5 100644
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
@@ -43,6 +43,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
@@ -48,6 +48,7 @@
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
#include "content/public/browser/web_ui_data_source.h"
+#include "electron/shell/browser/electron_browser_context.h"
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_updates_and_events.h"
#include "ui/accessibility/platform/ax_platform_node.h"
@@ -166,7 +167,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
@@ -171,7 +172,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
rvh->GetRoutingID(), accessibility_mode);
}
@ -30,7 +30,7 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
base::Value::Dict target_data;
target_data.Set(kSessionIdField, browser->session_id().id());
@@ -187,7 +188,7 @@ void HandleAccessibilityRequestCallback(
@@ -192,7 +193,7 @@ void HandleAccessibilityRequestCallback(
DCHECK(ShouldHandleAccessibilityRequestCallback(path));
base::Value::Dict data;
@ -39,7 +39,7 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
ui::AXMode mode =
content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode();
bool is_native_enabled = content::BrowserAccessibilityState::GetInstance()
@@ -216,7 +217,7 @@ void HandleAccessibilityRequestCallback(
@@ -221,7 +222,7 @@ void HandleAccessibilityRequestCallback(
data.Set(kPDFPrinting, pdf_printing ? kOn : kOff);
std::string pref_api_type =
@ -48,7 +48,7 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
bool pref_api_type_supported = false;
std::vector<ui::AXApiType::Type> supported_api_types =
@@ -283,11 +284,11 @@ void HandleAccessibilityRequestCallback(
@@ -288,11 +289,11 @@ void HandleAccessibilityRequestCallback(
data.Set(kPagesField, std::move(page_list));
base::Value::List browser_list;
@ -62,7 +62,7 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
data.Set(kBrowsersField, std::move(browser_list));
std::string json_string;
@@ -606,7 +607,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
@@ -762,7 +763,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
const std::string value = CheckJSValue(data.FindString(kValueField));
if (string_name == kApiTypeField) {
@ -72,7 +72,7 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
pref->SetString(prefs::kShownAccessibilityApiType, value);
}
}
@@ -659,7 +661,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
@@ -816,7 +818,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@ -82,7 +82,7 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
ui::AXApiType::Type api_type =
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
std::string accessibility_contents =
@@ -686,6 +689,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -843,6 +846,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@ -90,7 +90,7 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
for (Browser* browser : *BrowserList::GetInstance()) {
if (browser->session_id().id() == session_id) {
base::Value::Dict result = BuildTargetDescriptor(browser);
@@ -698,6 +702,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -855,6 +859,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
return;
}
}
@ -98,7 +98,7 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
#endif // !BUILDFLAG(IS_ANDROID)
// No browser with the specified |session_id| was found.
base::Value::Dict result;
@@ -741,11 +746,13 @@ void AccessibilityUIMessageHandler::StopRecording(
@@ -898,11 +903,13 @@ void AccessibilityUIMessageHandler::StopRecording(
}
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
@ -115,7 +115,7 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
// Check to see if it is in the supported types list.
if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
supported_types.end()) {
@@ -815,8 +822,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
@@ -972,8 +979,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
// static
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
@ -128,10 +128,10 @@ index 4693833f389b54d6c62efdbd8343df8c1f33795d..4bd07712e551162c8df1bad29137f8f2
+#endif
}
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.h b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
index d9ae654c8405621925e39f0b28b9288c0ea151f6..ab5b4249b4f5c01be04ed27cf53e8c286548f6db 100644
index b171afc941b2b3ef4aeba04a2b1c6eef2774d442..8f431aae69365bc8756e515c603332a7f1648148 100644
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.h
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
@@ -30,6 +30,8 @@ class ScopedAccessibilityMode;
@@ -27,6 +27,8 @@ namespace content {
class WebContents;
} // namespace content
@ -140,12 +140,12 @@ index d9ae654c8405621925e39f0b28b9288c0ea151f6..ab5b4249b4f5c01be04ed27cf53e8c28
namespace user_prefs {
class PrefRegistrySyncable;
} // namespace user_prefs
@@ -80,6 +82,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
@@ -77,6 +79,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
private:
+ friend class ElectronAccessibilityUIMessageHandler;
+
// Applies `mode` to `web_contents` for the lifetime of the accessibility
// UI page.
void SetAccessibilityModeForWebContents(content::WebContents* web_contents,
void ToggleAccessibilityForWebContents(const base::Value::List& args);
void SetGlobalFlag(const base::Value::List& args);
void SetGlobalString(const base::Value::List& args);

Просмотреть файл

@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
index 63470e0c3d77a2aeeab80e25580b5ccc081cb2b9..e652131f10aa6c74ea9581fcc66a6ffae82d3d86 100644
index 994850cb7737aa8787504f37ab91037b28df5690..fd9d07ac3953ded9a4f36e62721eb16097e77dba 100644
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
@@ -163,6 +163,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
@ -23,7 +23,7 @@ index 63470e0c3d77a2aeeab80e25580b5ccc081cb2b9..e652131f10aa6c74ea9581fcc66a6ffa
return receiver_.BindNewEndpointAndPassDedicatedRemote();
}
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 1dc919585dd11d70402f1a054f9f7c82a7a4e703..7807defd0ed367b2d4f815ea5df65777fd1d89ca 100644
index 0b5f50023e642845807712c6f8736d4d99e00d68..d4f280e7e7a6c5ed5a59499fd933f3d6448872b4 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -754,6 +754,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@ -51,7 +51,7 @@ index 5fb8a3dc69dc5fc5bfa08e01d8f03707a23c9274..41774b60b8cb7e0a22cedc597dc07ad1
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index e65c2b9ed1d6d3cc53ee5ba145aa22cb149d9dde..50cac7b36d6e83dea6686636b5e7a2943c44ceac 100644
index fe691a1ae2126409b23649824e32bc2a2dd711e6..47d375776347948b08702b733f5a5d051d63c015 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -579,8 +579,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {

Просмотреть файл

@ -49,7 +49,7 @@ index e662d4d61595735a30d5c721147a95698d4da3d9..6a0388aad469422dd1c0c2164f8aa858
// 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 9dbccdb33f73d25416c6c94d59afe9c3261f4875..d43ee5ce7695a7c41cc4f8dc96e066422553b1dd 100644
index ddfe1b5566e44c062b32cb6d98ee854922943867..c87ebb8fb68dc8355c37066002148dc67fe9089f 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -748,10 +748,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {

Просмотреть файл

@ -8,14 +8,14 @@ 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 0370dff555cc5bd12f5e2a1b000707aa0d4aae74..1ff235570cb61a3288ddc70802b29a63b2e39f64 100644
index c428a5f8d79e826077ab05fb6c56ae8e0e4ff609..c5fd8782fc1343f04f9e2c2c0414245d20696193 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -93,6 +93,7 @@
X("drm") \
X("drmcursor") \
X("dwrite") \
+ X("electron") \
X("evdev") \
X("event") \
X("exo") \
@@ -91,6 +91,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
perfetto::Category("drm"),
perfetto::Category("drmcursor"),
perfetto::Category("dwrite"),
+ perfetto::Category("electron"),
perfetto::Category("evdev"),
perfetto::Category("event"),
perfetto::Category("exo"),

Просмотреть файл

@ -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 44a11ec90ec9b67cf22b6d529c6843e6b6af12bc..7c706405eee1f11224e3b016670a6410ebfd853a 100644
index 3f6571828197301361ebde2e19e8e3138597c276..9effa81a564c3d2afae3eb2bb7438635e45f124a 100644
--- a/.gn
+++ b/.gn
@@ -172,4 +172,26 @@ exec_script_whitelist =
@@ -172,4 +172,26 @@ exec_script_allowlist =
"//tools/grit/grit_rule.gni",
"//tools/gritsettings/BUILD.gn",

Просмотреть файл

@ -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 0a236366b3f5050fa5d07971404afa111e699ce8..fb0f867dcf846f64887abc11f1aec67ccb7c5145 100644
index d786e8e50d8145ce5ca3734c50c2907328021e10..ea991fd04cce48e42670625619db923e6f8c302b 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
@ -33,10 +33,10 @@ index 0a236366b3f5050fa5d07971404afa111e699ce8..fb0f867dcf846f64887abc11f1aec67c
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 9f35905480ebcbacc724b60a35fe6ecc5f55fa7d..250d9f581018b02ee0e5b1e9630ff292ca3c91c2 100644
index daf0aeb76388b4942f477876ef896aa6fc736248..abc81a107edf7f1ad5c46a200734c5b727ba8289 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4527,7 +4527,7 @@ static_library("browser") {
@@ -4506,7 +4506,7 @@ static_library("browser") {
[ "//chrome/browser/ui/webui/signin:profile_impl" ]
}
@ -46,10 +46,10 @@ index 9f35905480ebcbacc724b60a35fe6ecc5f55fa7d..250d9f581018b02ee0e5b1e9630ff292
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 44ac256b44bee638e91b8322d549eedebf762b5a..745f1cf8153d93876c3246b3f4e951cb6ae25098 100644
index c4136cd79ccb3c7542dc44dadc56e1c891d76b0c..c48c98b2da0629d06cfc1ed7c36fa6ad9f8466e8 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -6913,9 +6913,12 @@ test("unit_tests") {
@@ -6996,9 +6996,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@ -63,7 +63,7 @@ index 44ac256b44bee638e91b8322d549eedebf762b5a..745f1cf8153d93876c3246b3f4e951cb
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -7855,6 +7858,10 @@ test("unit_tests") {
@@ -7950,6 +7953,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@ -74,7 +74,7 @@ index 44ac256b44bee638e91b8322d549eedebf762b5a..745f1cf8153d93876c3246b3f4e951cb
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -7908,7 +7915,6 @@ test("unit_tests") {
@@ -8004,7 +8011,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target.
deps += [
"../browser/screen_ai:screen_ai_install_state",

Просмотреть файл

@ -7,10 +7,10 @@ Allows implementing electron::mojom::ElectronPluginInfoHost interface
which provides plugin details between browser<->renderer.
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
index bfb8b8a712274e7326bbfd0f7c2c8e60106ea135..ce7abdc8dbf30f63694f5f576851a6d6259e3ec0 100644
index 659f500a47eb0f2d1f753dee2b234bb7bf1027d4..46e4714e14a5992b30ea8bfa99c126e5f1d2c3eb 100644
--- a/content/public/common/BUILD.gn
+++ b/content/public/common/BUILD.gn
@@ -372,6 +372,7 @@ mojom("interfaces") {
@@ -379,6 +379,7 @@ mojom("interfaces") {
"//content/common/*",
"//extensions/common:mojom",
"//extensions/common:mojom_blink",

Просмотреть файл

@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: samuelmaddock <samuel.maddock@gmail.com>
Date: Tue, 21 Jan 2025 19:04:46 -0500
Subject: build: remove vr directx_helpers dependency
This removes the //device/vr:directx_helpers dependency which
otherwise breaks the build due to enable_vr being disabled.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/6186102
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index c48c98b2da0629d06cfc1ed7c36fa6ad9f8466e8..f7711333244b7e85267df6dcfba82b53b324839d 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -12414,7 +12414,7 @@ source_set("xr_browser_tests_common") {
if (enable_vr) {
deps += [ "//device/vr" ]
}
- if (is_win) {
+ if (enable_vr && is_win) {
deps += [ "//device/vr:directx_helpers" ]
}

Просмотреть файл

@ -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 ea77770f7412bc4507897d6edf423966b2111eb4..88396edf058aaf6f18ae8cf09cb7175de5ae8d1c 100644
index f604daf3753e169af539a44596abc467ca352cf7..d2b27b93fcb9de1c78606a3a83df4e07e8c8629d 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9244,6 +9244,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9311,6 +9311,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@ -21,10 +21,10 @@ index ea77770f7412bc4507897d6edf423966b2111eb4..88396edf058aaf6f18ae8cf09cb7175d
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index e131c77f42a7f5183319ff41ec57118981fe76f7..9175a4958c80451dc80205d10856cac40785140e 100644
index 5fb0b6b6b52776d2ab8d222d7765992188f5da68..f33889dbaaa23908962c56f2dbe072c3bd9e7070 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4947,6 +4947,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4991,6 +4991,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
opener);
@ -37,7 +37,7 @@ index e131c77f42a7f5183319ff41ec57118981fe76f7..9175a4958c80451dc80205d10856cac4
// If the new frame has a name, make sure any SiteInstances that can find
// this named frame have proxies for it. Must be called after
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -4988,12 +4994,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5032,12 +5038,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@ -66,10 +66,10 @@ index 91dcf6c9c4a2d840fb50cb329fe3ef1bba9103c3..cbc887a3034605a93468e73a310e9ca6
// Operation result when the renderer asks the browser to create a new window.
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index a344bce909add234e5757ddd08d2fafa5e732a42..de3b79ada34d261ab452efd1934bb3ea4fb74c03 100644
index 107911859bdab463feece79dbfc4916f8fb96524..a512f751eef270f970c277a541b9ac9b61f01a81 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -790,6 +790,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -791,6 +791,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -79,10 +79,10 @@ index a344bce909add234e5757ddd08d2fafa5e732a42..de3b79ada34d261ab452efd1934bb3ea
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index f3cf5f2d45503b683488c3b39708057749fccdfd..87388bf398413d963a4902bfbd43e6509982fb33 100644
index 75663382ec981346692ccac86912bbafa4d6efb3..e2381c3627b7c60db0064069d9cc18e7dabd6545 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -201,6 +201,7 @@ class NetworkService;
@@ -202,6 +202,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@ -90,7 +90,7 @@ index f3cf5f2d45503b683488c3b39708057749fccdfd..87388bf398413d963a4902bfbd43e650
} // namespace network
namespace sandbox {
@@ -1347,6 +1348,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1344,6 +1345,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -100,7 +100,7 @@ index f3cf5f2d45503b683488c3b39708057749fccdfd..87388bf398413d963a4902bfbd43e650
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 2f27fcb0b320d1dcfeb398d34770a9a48ea49915..4d2c03d7102d1217d1b436bf17fa9f293239b049 100644
index 6375d4c0618e027aa4f784d94ce5893521f37768..17933dabfe7818fc815d016b8ca0f314a4c8b953 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -31,6 +31,17 @@ namespace content {
@ -122,7 +122,7 @@ index 2f27fcb0b320d1dcfeb398d34770a9a48ea49915..4d2c03d7102d1217d1b436bf17fa9f29
WebContents* source,
const OpenURLParams& params,
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 0bab4dd08a28dd572c9cac00c337672af6aee352..d17b95b6b0c9842b6db3d4696525984fbbcc8ddd 100644
index c3acd4321e2c84a0b3b1627cd5ce8f2c07cad40a..f318aa37654d668a95fb2f97b5a85c5786f5407d 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -18,6 +18,7 @@
@ -130,9 +130,9 @@ index 0bab4dd08a28dd572c9cac00c337672af6aee352..d17b95b6b0c9842b6db3d4696525984f
#include "build/build_config.h"
#include "content/common/content_export.h"
+#include "content/common/frame.mojom.h"
#include "content/public/browser/back_forward_transition_animation_manager.h"
#include "content/public/browser/eye_dropper.h"
#include "content/public/browser/fullscreen_types.h"
#include "content/public/browser/invalidate_type.h"
@@ -366,6 +367,13 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionConfig& partition_config,
SessionStorageNamespace* session_storage_namespace);
@ -148,10 +148,10 @@ index 0bab4dd08a28dd572c9cac00c337672af6aee352..d17b95b6b0c9842b6db3d4696525984f
// 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 7431b6773d9f0a38f30c00fbff2fa45076beedc9..2f3190e81c665cdfbf75ffee9bf09c5936b4a760 100644
index b7434ef116bc6b8051856221c3b504d85aa0934b..87504441dc14eaec8a0aa9fa9197eab17efc4eb9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6863,6 +6863,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6910,6 +6910,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());
@ -163,10 +163,10 @@ index 7431b6773d9f0a38f30c00fbff2fa45076beedc9..2f3190e81c665cdfbf75ffee9bf09c59
// moved on send.
bool is_background_tab =
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
index 5d4101558a3672b747f8f62d4ffaa84416df06a7..204664c08f14bcaf45e287a18fad4aea24a7fa72 100644
index 3735a52cfd6d4fcd19a59507eda7ed4349aa0b38..cc6bf491b88a404e489e445e50d3bbe33c602204 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -523,6 +523,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -524,6 +524,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -176,10 +176,10 @@ index 5d4101558a3672b747f8f62d4ffaa84416df06a7..204664c08f14bcaf45e287a18fad4aea
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
index 3a6f32f6412b914d24632a1c25d401de7a8ffbf0..0442c6243dbb38b2723e5e803bb403a157df3bcd 100644
index e6212744a71fffa8aec3244e336eca0a38acab8b..537bde0bdd836183f90a8d44e911d508fb5f396d 100644
--- a/content/web_test/browser/web_test_content_browser_client.h
+++ b/content/web_test/browser/web_test_content_browser_client.h
@@ -92,6 +92,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -93,6 +93,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -210,10 +210,10 @@ index c576ace24e81cc877aa2595d40e0a13a7af9f6a2..210fb97d44c19c29af424cc7b9cb3169
} // 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 3287ea39797ceca64947f9d69f6bcb6dcb8de56e..f7b31e1cfd29c2c5385b33024448d46ac8d79bd3 100644
index b88c1546cf8e8c874020e51ece6911b45dc48339..738a92dfafaae0de68f6dbea3f7f4ac790f976a3 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2226,6 +2226,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2266,6 +2266,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
WebWindowFeatures window_features =
GetWindowFeaturesFromString(features, entered_window);

Просмотреть файл

@ -1,497 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Maksim Sisov <msisov@igalia.com>
Date: Tue, 7 Jan 2025 23:46:56 -0800
Subject: Check for unit to activate before notifying about success
Portal's globalShortcuts interface relies on the unit name to
properly assign a client for the bound commands. However, in
some scenarious, there is a race between the service to be
created, changed its name and activated. As a result, shortcuts
might be bound before the name is changed. As a result, shortcuts
might not correctly work and the client will not receive any
signals.
This is mostly not an issue for Chromium as it creates the
global shortcuts portal linux object way earlier than it gets
commands from the command service. But downstream project, which
try to bind shortcuts at the same time as that instance is created,
may experience this issue. As a result, they might not have
shortcuts working correctly after system reboot or app restart as
there is a race between those operations.
Bug: None
Change-Id: I8346d65e051d9587850c76ca0b8807669c161667
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6110782
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1403434}
diff --git a/components/dbus/xdg/systemd.cc b/components/dbus/xdg/systemd.cc
index 362a16447bf578923cb8a84674c277ae6c98228f..3cd9a55d540c07a4c53f5a62bec5cbea37c11838 100644
--- a/components/dbus/xdg/systemd.cc
+++ b/components/dbus/xdg/systemd.cc
@@ -4,9 +4,12 @@
#include "components/dbus/xdg/systemd.h"
+#include <string>
#include <vector>
#include "base/environment.h"
+#include "base/functional/bind.h"
+#include "base/functional/callback_helpers.h"
#include "base/memory/scoped_refptr.h"
#include "base/no_destructor.h"
#include "base/sequence_checker.h"
@@ -17,7 +20,9 @@
#include "components/dbus/utils/name_has_owner.h"
#include "dbus/bus.h"
#include "dbus/message.h"
+#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
+#include "dbus/property.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
namespace dbus_xdg {
@@ -37,6 +42,10 @@ constexpr char kServiceNameSystemd[] = "org.freedesktop.systemd1";
constexpr char kObjectPathSystemd[] = "/org/freedesktop/systemd1";
constexpr char kInterfaceSystemdManager[] = "org.freedesktop.systemd1.Manager";
constexpr char kMethodStartTransientUnit[] = "StartTransientUnit";
+constexpr char kMethodGetUnit[] = "GetUnit";
+
+constexpr char kInterfaceSystemdUnit[] = "org.freedesktop.systemd1.Unit";
+constexpr char kActiveStateProp[] = "ActiveState";
constexpr char kUnitNameFormat[] = "app-$1$2-$3.scope";
@@ -67,6 +76,81 @@ const char* GetAppNameSuffix(const std::string& channel) {
return "";
}
+// Declare this helper for SystemdUnitActiveStateWatcher to be used.
+void SetStateAndRunCallbacks(SystemdUnitStatus result);
+
+// Watches the object to become active and fires callbacks via
+// SetStateAndRunCallbacks. The callbacks are fired whenever a response with the
+// state being "active" or "failed" (or similar) comes.
+//
+// PS firing callbacks results in destroying this object. So any references
+// to this become invalid.
+class SystemdUnitActiveStateWatcher : public dbus::PropertySet {
+ public:
+ SystemdUnitActiveStateWatcher(scoped_refptr<dbus::Bus> bus,
+ dbus::ObjectProxy* object_proxy)
+ : dbus::PropertySet(object_proxy,
+ kInterfaceSystemdUnit,
+ base::BindRepeating(
+ &SystemdUnitActiveStateWatcher::OnPropertyChanged,
+ base::Unretained(this))),
+ bus_(bus) {
+ RegisterProperty(kActiveStateProp, &active_state_);
+ ConnectSignals();
+ GetAll();
+ }
+
+ ~SystemdUnitActiveStateWatcher() override {
+ bus_->RemoveObjectProxy(kServiceNameSystemd, object_proxy()->object_path(),
+ base::DoNothing());
+ }
+
+ private:
+ void OnPropertyChanged(const std::string& property_name) {
+ DCHECK(active_state_.is_valid());
+ const std::string state_value = active_state_.value();
+ if (callbacks_called_ || state_value == "activating" ||
+ state_value == "reloading") {
+ // Ignore if callbacks have already been fired or continue waiting until
+ // the state changes to something else.
+ return;
+ }
+
+ // There are other states as failed, inactive, and deactivating. Treat all
+ // of them as failed.
+ callbacks_called_ = true;
+ SetStateAndRunCallbacks(state_value == "active"
+ ? SystemdUnitStatus::kUnitStarted
+ : SystemdUnitStatus::kFailedToStart);
+ MaybeDeleteSelf();
+ }
+
+ void OnGetAll(dbus::Response* response) override {
+ dbus::PropertySet::OnGetAll(response);
+ keep_alive_ = false;
+ MaybeDeleteSelf();
+ }
+
+ void MaybeDeleteSelf() {
+ if (!keep_alive_ && callbacks_called_) {
+ delete this;
+ }
+ }
+
+ // Registered property that this listens updates to.
+ dbus::Property<std::string> active_state_;
+
+ // Indicates whether callbacks for the unit's state have been called.
+ bool callbacks_called_ = false;
+
+ // Control variable that helps to defer the destruction of |this| as deleting
+ // self when the state changes to active during |OnGetAll| will result in a
+ // segfault.
+ bool keep_alive_ = true;
+
+ scoped_refptr<dbus::Bus> bus_;
+};
+
// Global state for cached result or pending callbacks.
StatusOrCallbacks& GetUnitNameState() {
static base::NoDestructor<StatusOrCallbacks> state(
@@ -83,10 +167,52 @@ void SetStateAndRunCallbacks(SystemdUnitStatus result) {
}
}
-void OnStartTransientUnitResponse(dbus::Response* response) {
+void OnGetPathResponse(scoped_refptr<dbus::Bus> bus, dbus::Response* response) {
+ dbus::MessageReader reader(response);
+ dbus::ObjectPath obj_path;
+ if (!response || !reader.PopObjectPath(&obj_path) || !obj_path.IsValid()) {
+ // We didn't get a valid response. Treat this as failed service.
+ SetStateAndRunCallbacks(SystemdUnitStatus::kFailedToStart);
+ return;
+ }
+
+ dbus::ObjectProxy* unit_proxy =
+ bus->GetObjectProxy(kServiceNameSystemd, obj_path);
+ // Create the active state property watcher. It will destroy itself once
+ // it gets notified about the state change.
+ std::unique_ptr<SystemdUnitActiveStateWatcher> active_state_watcher =
+ std::make_unique<SystemdUnitActiveStateWatcher>(bus, unit_proxy);
+ active_state_watcher.release();
+}
+
+void WaitUnitActivateAndRunCallbacks(scoped_refptr<dbus::Bus> bus,
+ std::string unit_name) {
+ // Get the path of the unit, which looks similar to
+ // /org/freedesktop/systemd1/unit/app_2dorg_2echromium_2eChromium_2d3182191_2escope
+ // and then wait for it activation.
+ dbus::ObjectProxy* systemd = bus->GetObjectProxy(
+ kServiceNameSystemd, dbus::ObjectPath(kObjectPathSystemd));
+
+ dbus::MethodCall method_call(kInterfaceSystemdManager, kMethodGetUnit);
+ dbus::MessageWriter writer(&method_call);
+ writer.AppendString(unit_name);
+
+ systemd->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ base::BindOnce(&OnGetPathResponse, std::move(bus)));
+}
+
+void OnStartTransientUnitResponse(scoped_refptr<dbus::Bus> bus,
+ std::string unit_name,
+ dbus::Response* response) {
SystemdUnitStatus result = response ? SystemdUnitStatus::kUnitStarted
: SystemdUnitStatus::kFailedToStart;
- SetStateAndRunCallbacks(result);
+ // If the start of the unit failed, immediately notify the client. Otherwise,
+ // wait for its activation.
+ if (result == SystemdUnitStatus::kFailedToStart) {
+ SetStateAndRunCallbacks(result);
+ } else {
+ WaitUnitActivateAndRunCallbacks(std::move(bus), unit_name);
+ }
}
void OnNameHasOwnerResponse(scoped_refptr<dbus::Bus> bus,
@@ -128,8 +254,9 @@ void OnNameHasOwnerResponse(scoped_refptr<dbus::Bus> bus,
properties.Write(&writer);
// No auxiliary units.
Dict<VarDict>().Write(&writer);
- systemd->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
- base::BindOnce(&OnStartTransientUnitResponse));
+ systemd->CallMethod(
+ &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ base::BindOnce(&OnStartTransientUnitResponse, std::move(bus), unit_name));
}
} // namespace
diff --git a/components/dbus/xdg/systemd_unittest.cc b/components/dbus/xdg/systemd_unittest.cc
index 2e3baecabc4b479000c78d4f6bd30cb1f6e61d2e..67278d7033664d52fbbda02749a2aaa43352f402 100644
--- a/components/dbus/xdg/systemd_unittest.cc
+++ b/components/dbus/xdg/systemd_unittest.cc
@@ -16,7 +16,9 @@
#include "dbus/message.h"
#include "dbus/mock_bus.h"
#include "dbus/mock_object_proxy.h"
+#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
+#include "dbus/property.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -32,6 +34,27 @@ constexpr char kServiceNameSystemd[] = "org.freedesktop.systemd1";
constexpr char kObjectPathSystemd[] = "/org/freedesktop/systemd1";
constexpr char kInterfaceSystemdManager[] = "org.freedesktop.systemd1.Manager";
constexpr char kMethodStartTransientUnit[] = "StartTransientUnit";
+constexpr char kMethodGetUnit[] = "GetUnit";
+
+constexpr char kFakeUnitPath[] = "/fake/unit/path";
+constexpr char kActiveState[] = "ActiveState";
+constexpr char kStateActive[] = "active";
+constexpr char kStateInactive[] = "inactive";
+
+std::unique_ptr<dbus::Response> CreateActiveStateGetAllResponse(
+ const std::string& state) {
+ auto response = dbus::Response::CreateEmpty();
+ dbus::MessageWriter writer(response.get());
+ dbus::MessageWriter array_writer(nullptr);
+ dbus::MessageWriter dict_entry_writer(nullptr);
+ writer.OpenArray("{sv}", &array_writer);
+ array_writer.OpenDictEntry(&dict_entry_writer);
+ dict_entry_writer.AppendString(kActiveState);
+ dict_entry_writer.AppendVariantOfString(state);
+ array_writer.CloseContainer(&dict_entry_writer);
+ writer.CloseContainer(&array_writer);
+ return response;
+}
class SetSystemdScopeUnitNameForXdgPortalTest : public ::testing::Test {
public:
@@ -124,17 +147,48 @@ TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, StartTransientUnitSuccess) {
EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
dbus::ObjectPath(kObjectPathSystemd)))
- .WillOnce(Return(mock_systemd_proxy.get()));
+ .Times(2)
+ .WillRepeatedly(Return(mock_systemd_proxy.get()));
+
+ auto mock_dbus_unit_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kFakeUnitPath));
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
+ dbus::ObjectPath(kFakeUnitPath)))
+ .WillOnce(Return(mock_dbus_unit_proxy.get()));
EXPECT_CALL(*mock_systemd_proxy, DoCallMethod(_, _, _))
.WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
dbus::ObjectProxy::ResponseCallback* callback) {
+ // Expect kMethodStartTransientUnit first.
EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
EXPECT_EQ(method_call->GetMember(), kMethodStartTransientUnit);
// Simulate a successful response
auto response = dbus::Response::CreateEmpty();
std::move(*callback).Run(response.get());
+ }))
+ .WillOnce(Invoke([obj_path = kFakeUnitPath](
+ dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ // Then expect kMethodGetUnit. A valid path must be provided.
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
+ EXPECT_EQ(method_call->GetMember(), kMethodGetUnit);
+
+ // Simulate a successful response and provide a fake path to the object.
+ auto response = dbus::Response::CreateEmpty();
+ dbus::MessageWriter writer(response.get());
+ writer.AppendObjectPath(dbus::ObjectPath(obj_path));
+ std::move(*callback).Run(response.get());
+ }));
+
+ EXPECT_CALL(*mock_dbus_unit_proxy, DoCallMethod(_, _, _))
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ EXPECT_EQ(method_call->GetInterface(), dbus::kPropertiesInterface);
+ EXPECT_EQ(method_call->GetMember(), dbus::kPropertiesGetAll);
+ // Simulate a successful response with "active" state.
+ auto response = CreateActiveStateGetAllResponse(kStateActive);
+ std::move(*callback).Run(response.get());
}));
std::optional<SystemdUnitStatus> status;
@@ -189,6 +243,142 @@ TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, StartTransientUnitFailure) {
EXPECT_EQ(status, SystemdUnitStatus::kFailedToStart);
}
+TEST_F(SetSystemdScopeUnitNameForXdgPortalTest,
+ StartTransientUnitInvalidUnitPath) {
+ scoped_refptr<dbus::MockBus> bus =
+ base::MakeRefCounted<dbus::MockBus>(dbus::Bus::Options());
+
+ auto mock_dbus_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
+ bus.get(), DBUS_SERVICE_DBUS, dbus::ObjectPath(DBUS_PATH_DBUS));
+
+ EXPECT_CALL(
+ *bus, GetObjectProxy(DBUS_SERVICE_DBUS, dbus::ObjectPath(DBUS_PATH_DBUS)))
+ .WillRepeatedly(Return(mock_dbus_proxy.get()));
+
+ EXPECT_CALL(*mock_dbus_proxy, DoCallMethod(_, _, _))
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ auto response = dbus::Response::CreateEmpty();
+ dbus::MessageWriter writer(response.get());
+ writer.AppendBool(true);
+ std::move(*callback).Run(response.get());
+ }));
+
+ auto mock_systemd_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kObjectPathSystemd));
+
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
+ dbus::ObjectPath(kObjectPathSystemd)))
+ .Times(2)
+ .WillRepeatedly(Return(mock_systemd_proxy.get()));
+
+ EXPECT_CALL(*mock_systemd_proxy, DoCallMethod(_, _, _))
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
+ EXPECT_EQ(method_call->GetMember(), kMethodStartTransientUnit);
+
+ // Simulate a successful response
+ auto response = dbus::Response::CreateEmpty();
+ std::move(*callback).Run(response.get());
+ }))
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
+ EXPECT_EQ(method_call->GetMember(), kMethodGetUnit);
+
+ // Simulate a failure response.
+ std::move(*callback).Run(nullptr);
+ }));
+
+ std::optional<SystemdUnitStatus> status;
+
+ SetSystemdScopeUnitNameForXdgPortal(
+ bus.get(), base::BindLambdaForTesting(
+ [&](SystemdUnitStatus result) { status = result; }));
+
+ EXPECT_EQ(status, SystemdUnitStatus::kFailedToStart);
+}
+
+TEST_F(SetSystemdScopeUnitNameForXdgPortalTest,
+ StartTransientUnitFailToActivate) {
+ scoped_refptr<dbus::MockBus> bus =
+ base::MakeRefCounted<dbus::MockBus>(dbus::Bus::Options());
+
+ auto mock_dbus_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
+ bus.get(), DBUS_SERVICE_DBUS, dbus::ObjectPath(DBUS_PATH_DBUS));
+
+ EXPECT_CALL(
+ *bus, GetObjectProxy(DBUS_SERVICE_DBUS, dbus::ObjectPath(DBUS_PATH_DBUS)))
+ .WillRepeatedly(Return(mock_dbus_proxy.get()));
+
+ EXPECT_CALL(*mock_dbus_proxy, DoCallMethod(_, _, _))
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ auto response = dbus::Response::CreateEmpty();
+ dbus::MessageWriter writer(response.get());
+ writer.AppendBool(true);
+ std::move(*callback).Run(response.get());
+ }));
+
+ auto mock_systemd_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kObjectPathSystemd));
+
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
+ dbus::ObjectPath(kObjectPathSystemd)))
+ .Times(2)
+ .WillRepeatedly(Return(mock_systemd_proxy.get()));
+
+ auto mock_dbus_unit_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kFakeUnitPath));
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
+ dbus::ObjectPath(kFakeUnitPath)))
+ .WillOnce(Return(mock_dbus_unit_proxy.get()));
+
+ EXPECT_CALL(*mock_systemd_proxy, DoCallMethod(_, _, _))
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
+ EXPECT_EQ(method_call->GetMember(), kMethodStartTransientUnit);
+
+ // Simulate a successful response
+ auto response = dbus::Response::CreateEmpty();
+ std::move(*callback).Run(response.get());
+ }))
+ .WillOnce(Invoke([obj_path = kFakeUnitPath](
+ dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
+ EXPECT_EQ(method_call->GetMember(), kMethodGetUnit);
+
+ // Simulate a successful response
+ auto response = dbus::Response::CreateEmpty();
+ dbus::MessageWriter writer(response.get());
+ writer.AppendObjectPath(dbus::ObjectPath(obj_path));
+ std::move(*callback).Run(response.get());
+ }));
+
+ EXPECT_CALL(*mock_dbus_unit_proxy, DoCallMethod(_, _, _))
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ // Then expect kMethodGetUnit. A valid path must be provided.
+ EXPECT_EQ(method_call->GetInterface(), dbus::kPropertiesInterface);
+ EXPECT_EQ(method_call->GetMember(), dbus::kPropertiesGetAll);
+
+ // Simulate a successful response, but with inactive state.
+ auto response = CreateActiveStateGetAllResponse(kStateInactive);
+ std::move(*callback).Run(response.get());
+ }));
+
+ std::optional<SystemdUnitStatus> status;
+
+ SetSystemdScopeUnitNameForXdgPortal(
+ bus.get(), base::BindLambdaForTesting(
+ [&](SystemdUnitStatus result) { status = result; }));
+
+ EXPECT_EQ(status, SystemdUnitStatus::kFailedToStart);
+}
+
TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, UnitNameConstruction) {
scoped_refptr<dbus::MockBus> bus =
base::MakeRefCounted<dbus::MockBus>(dbus::Bus::Options());
@@ -220,7 +410,14 @@ TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, UnitNameConstruction) {
EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
dbus::ObjectPath(kObjectPathSystemd)))
- .WillOnce(Return(mock_systemd_proxy.get()));
+ .Times(2)
+ .WillRepeatedly(Return(mock_systemd_proxy.get()));
+
+ auto mock_dbus_unit_proxy = base::MakeRefCounted<dbus::MockObjectProxy>(
+ bus.get(), kServiceNameSystemd, dbus::ObjectPath(kFakeUnitPath));
+ EXPECT_CALL(*bus, GetObjectProxy(kServiceNameSystemd,
+ dbus::ObjectPath(kFakeUnitPath)))
+ .WillOnce(Return(mock_dbus_unit_proxy.get()));
EXPECT_CALL(*mock_systemd_proxy, DoCallMethod(_, _, _))
.WillOnce(Invoke([&](dbus::MethodCall* method_call, int timeout_ms,
@@ -256,6 +453,30 @@ TEST_F(SetSystemdScopeUnitNameForXdgPortalTest, UnitNameConstruction) {
auto response = dbus::Response::CreateEmpty();
std::move(*callback).Run(response.get());
+ }))
+ .WillOnce(Invoke([obj_path = kFakeUnitPath](
+ dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ EXPECT_EQ(method_call->GetInterface(), kInterfaceSystemdManager);
+ EXPECT_EQ(method_call->GetMember(), kMethodGetUnit);
+
+ // Simulate a successful response
+ auto response = dbus::Response::CreateEmpty();
+ dbus::MessageWriter writer(response.get());
+ writer.AppendObjectPath(dbus::ObjectPath(obj_path));
+ std::move(*callback).Run(response.get());
+ }));
+
+ EXPECT_CALL(*mock_dbus_unit_proxy, DoCallMethod(_, _, _))
+ .WillOnce(Invoke([](dbus::MethodCall* method_call, int timeout_ms,
+ dbus::ObjectProxy::ResponseCallback* callback) {
+ // Then expect kMethodGetUnit. A valid path must be provided.
+ EXPECT_EQ(method_call->GetInterface(), dbus::kPropertiesInterface);
+ EXPECT_EQ(method_call->GetMember(), dbus::kPropertiesGetAll);
+
+ // Simulate a successful response
+ auto response = CreateActiveStateGetAllResponse(kStateActive);
+ std::move(*callback).Run(response.get());
}));
std::optional<SystemdUnitStatus> status;

Просмотреть файл

@ -18,7 +18,7 @@ index 9056030523807b8023493c0be9c9675da792852e..a1b949528e0a164c1bad98dbfbef282f
/googleurl
/gpu/gles2_conform_test
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 55454cd51ab777035560a73d0dc69ba32403fbad..bf22972bf1afbe4c94e780e084fdae3ef7c0ef8d 100644
index 3e117f79191d5cea0fb4f1c6b0e95513562d7691..f197d17a55a802b01aaba602eff7c83f2a55c7b5 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -45,7 +45,9 @@

Просмотреть файл

@ -34,10 +34,10 @@ index 1e2c5bb35cc314d44dba85a9bafc5e55bf2b5f14..d110d0a2f005888c4450262fc1887cbf
Widget* GetWidget();
const Widget* GetWidget() const;
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 3e7066bcdc551f1c798c75f279b57318b4bf18e4..7e8c077edaa6b55011b0f3a3df382e2b71566bf1 100644
index 5c4719e1f2084f9d1b99f12b614396f68a3903aa..a1c0da5b4fefad8b2692cbe04d2d183c07230985 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3147,15 +3147,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3142,15 +3142,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
}
// We must let Windows handle the caption buttons if it's drawing them, or
// they won't work.

Просмотреть файл

@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
of explicitly adding ScopedAllowBlocking calls as friends.
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index fcb8c33ad26b5137798ab7251346f9664192f7fe..af0c3e3d75bf241768574c95d5492e88ba78992a 100644
index e029700325e792e7a840ed94f25e7a49b86d0046..23b476f1b3e86f896044a8cb4f1a92f24033f3b1 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -132,6 +132,7 @@ class KeyStorageLinux;

Просмотреть файл

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

Просмотреть файл

@ -9,7 +9,7 @@ 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 cb5777c6bbc9898eb8ab83437ba10c1e27dd935a..8659e167e934ae641e8b6500692a4c3e31e1cea2 100644
index 9774ed3e55c0d78f21bb0cb0b2607cc07eaf78e0..f58c3946130fa469f2775d8bae773e5bbfc71a96 100644
--- a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
+++ b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
@@ -45,6 +45,7 @@ namespace {

Просмотреть файл

@ -141,10 +141,10 @@ index ca72b324bf7c3b81ac94b53f0ff454d2df177950..d60ef3075d126e2bbd50c8469f2bf67c
// The profile used for the presentation.
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
index 6da0f39ea7990ed96e9c8148b034cd591ffdf7f1..4ade4aaa36e4e1b3588bdb146f787dd14d9b9e33 100644
index f2c33e0a67040bf445797c3d09296ee07c1480c0..e9f6c6fb9e562516c876b132ab142a0733e3ca6f 100644
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
@@ -96,8 +96,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
@@ -97,8 +97,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -155,7 +155,7 @@ index 6da0f39ea7990ed96e9c8148b034cd591ffdf7f1..4ade4aaa36e4e1b3588bdb146f787dd1
}
content::WebContents* CreateCustomWebContents(
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
index ff8fe40db4e4d2b76c57e4b3a987c6ba13e30b7f..6049f8c69567e60364f212e69cc33cb6a858f6b8 100644
index be627a347fb9888c978c0e7d11498491e880e301..97293f41a905d9bcc97e0e57b12524d5ba7263ca 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -185,14 +185,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
@ -176,7 +176,7 @@ index ff8fe40db4e4d2b76c57e4b3a987c6ba13e30b7f..6049f8c69567e60364f212e69cc33cb6
java_gurl);
}
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
index 9484a324478d3fe746a51e645368eb3b602ce91d..0676e60fe7773cfcb22e62abff67a66ef6153128 100644
index d97d10767fe420f598998e04f4d6429bf9a5f2f8..ee52cd7a3d4738c273c96528adde5bb9de880bdb 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
@@ -82,8 +82,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
@ -218,10 +218,10 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
content::WebContents* AddNewContents(
content::WebContents* source,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 5d2cd8a69d78c81b7f1cd34e23e790aff79215a6..63b26168c5fecbd71d11e2fe377bd6a2fa4a7a5e 100644
index 7bbe1f1d7052f45c1e17fe9d4e8fe3164d3b0ba5..90d93722ef9fbb1ab4072f722db17af96faea062 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4829,8 +4829,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4873,8 +4873,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// TODO(crbug.com/40202416): Support a way for MPArch guests to support this.
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@ -232,7 +232,7 @@ index 5d2cd8a69d78c81b7f1cd34e23e790aff79215a6..63b26168c5fecbd71d11e2fe377bd6a2
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 4d2c03d7102d1217d1b436bf17fa9f293239b049..a9849b1b799d0d017050ce56ee9bdbd239324c0b 100644
index 17933dabfe7818fc815d016b8ca0f314a4c8b953..f2e4a7f7d5f202dec875c1d8149149a6249d260c 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -152,8 +152,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@ -246,7 +246,7 @@ index 4d2c03d7102d1217d1b436bf17fa9f293239b049..a9849b1b799d0d017050ce56ee9bdbd2
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index d17b95b6b0c9842b6db3d4696525984fbbcc8ddd..344d6d20dfbbe90c128885c701274b1c3cfd3ac0 100644
index f318aa37654d668a95fb2f97b5a85c5786f5407d..8b2740bccd8670cc49a162d510e3deb53a534b14 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -345,8 +345,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@ -296,10 +296,10 @@ index 136448c9df06b9704e95d2797a60907d7ec5170a..21cc7b08dd8f9e4a32d29dd35c42ec2c
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
index 76061d1c9653f7c910367f11dca0d509503c92d9..f257ff4f7e118de3e798830b64759f4c2b765e7e 100644
index ccba95521c54a893ea5168f6b25f86db4a5471c7..1aeae4978dea95d17c7ae76942e294aad7968630 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -259,8 +259,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
@@ -262,8 +262,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -310,10 +310,10 @@ index 76061d1c9653f7c910367f11dca0d509503c92d9..f257ff4f7e118de3e798830b64759f4c
// This method handles opening links from within the guest. Since this guest
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h
index 440ffda9213d4bea845f7b48550b34b87ae1ca98..0fc59e6af11c3f0ba425e3df428bf69be1b82992 100644
index e39031afd8fff7cb6e278555cc58a48d86407d65..f67f6a5603c1fa9e66ccdde9b601df9a11cae738 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
@@ -72,8 +72,7 @@ class ExtensionOptionsGuest
@@ -73,8 +73,7 @@ class ExtensionOptionsGuest
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -324,10 +324,10 @@ index 440ffda9213d4bea845f7b48550b34b87ae1ca98..0fc59e6af11c3f0ba425e3df428bf69b
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 4cd72afe01d78f4abb152c1031071e3a08ecc79e..07015078ff94cd799f14a460da25a3e392f02dfd 100644
index 61f132263c03d95870ecdc5bf3bdebb918ad7b4f..4ecf934005d01463bee92b3caf82c9161dab97e3 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -450,8 +450,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
@@ -452,8 +452,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -380,7 +380,7 @@ index 1012a909ef1fcae51c218ae519fe7e0db65ab087..127b1ae940bc9313aecb635e2b01bb6f
int opener_render_process_id,
int opener_render_frame_id,
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index 80eb312c32282da8e2096eab148996545836d442..963726b218209ef5a9f4ad2e77b6ff00bd29c1d5 100644
index 0101dbe4aa8cfe3103ba6ca9c9ac62ee46cffb2d..87b7cb41635c47a3ff7d19a7b46f63ed576be33d 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -207,8 +207,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {

Просмотреть файл

@ -9,10 +9,10 @@ Electron when a session is non persistent we do not initialize the
ExtensionSystem, so this check is not relevant for Electron.
diff --git a/extensions/browser/script_injection_tracker.cc b/extensions/browser/script_injection_tracker.cc
index 029db451e142508e00e54e140f20a31b473a8972..26dd090e5266611ced7c97ba85d7f4f8045b5184 100644
index c82f30a15b54aa7072f1f5f318fcf62f11537a60..36fc3566978c4c3b7c722e4081bd2ca2e24d6282 100644
--- a/extensions/browser/script_injection_tracker.cc
+++ b/extensions/browser/script_injection_tracker.cc
@@ -174,7 +174,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(
@@ -175,7 +175,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(
UserScriptManager* manager =
ExtensionSystem::Get(process.GetBrowserContext())->user_script_manager();
if (!manager) {

Просмотреть файл

@ -39,10 +39,10 @@ index e87c180342b967756efeb701c73207fcee8754f1..42e37564e585987d367921568f0f1d2b
NOTREACHED();
}
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
index 443649912a86377d2dbe8d09cd651cb2b5a9a134..444794822b466fd99b4e55b4d022ab9d05e42f05 100644
index e4a772c18a67e93248e3488b2c2b798ddcfbb2ff..43b210d16598f08236ecd23ec5f49a7130fd4be7 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
@@ -86,7 +86,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
@@ -111,7 +111,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
const bool registered =
platform_global_shortcut_listener_->RegisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(),
@ -52,7 +52,7 @@ index 443649912a86377d2dbe8d09cd651cb2b5a9a134..444794822b466fd99b4e55b4d022ab9d
if (registered) {
registered_hot_keys_.insert(accelerator);
}
@@ -101,14 +102,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
@@ -126,14 +127,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
platform_global_shortcut_listener_->UnregisterAccelerator(
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
@ -70,7 +70,7 @@ index 443649912a86377d2dbe8d09cd651cb2b5a9a134..444794822b466fd99b4e55b4d022ab9d
int modifiers = 0;
if (is_alt_down) {
modifiers |= ui::EF_ALT_DOWN;
@@ -119,6 +121,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
@@ -144,6 +146,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
if (is_shift_down) {
modifiers |= ui::EF_SHIFT_DOWN;
}
@ -159,10 +159,10 @@ index a955d19eedfe56ae3a115ce4c77fea016fd66d49..ad2557495a02cae03dd2b87df8659a6f
}
diff --git a/ui/base/x/x11_global_shortcut_listener.cc b/ui/base/x/x11_global_shortcut_listener.cc
index fd4f6d05235aff8383fe1c2a089883022871f27c..163b1975faed07351855098ac69ef5c2915621b1 100644
index 9e73ed854072bf3d66dbab4cfb5b0a6a9068aafa..82ca3354afc2a0c4c09c6332512902859c77f4c9 100644
--- a/ui/base/x/x11_global_shortcut_listener.cc
+++ b/ui/base/x/x11_global_shortcut_listener.cc
@@ -36,11 +36,13 @@ const x11::ModMask kModifiersMasks[] = {
@@ -34,11 +34,13 @@ const auto kModifiersMasks = std::to_array<x11::ModMask>({
x11::ModMask GetNativeModifiers(bool is_alt_down,
bool is_ctrl_down,
@ -178,7 +178,7 @@ index fd4f6d05235aff8383fe1c2a089883022871f27c..163b1975faed07351855098ac69ef5c2
}
} // namespace
@@ -86,8 +88,9 @@ uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) {
@@ -84,8 +86,9 @@ uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) {
bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
bool is_alt_down,
bool is_ctrl_down,
@ -190,7 +190,7 @@ index fd4f6d05235aff8383fe1c2a089883022871f27c..163b1975faed07351855098ac69ef5c2
auto keysym = XKeysymForWindowsKeyCode(key_code, false);
auto keycode = connection_->KeysymToKeycode(keysym);
@@ -112,7 +115,7 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
@@ -110,7 +113,7 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
}
registered_combinations_.insert(
@ -199,7 +199,7 @@ index fd4f6d05235aff8383fe1c2a089883022871f27c..163b1975faed07351855098ac69ef5c2
return true;
}
@@ -120,8 +123,9 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
@@ -118,8 +121,9 @@ bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
bool is_alt_down,
bool is_ctrl_down,
@ -211,7 +211,7 @@ index fd4f6d05235aff8383fe1c2a089883022871f27c..163b1975faed07351855098ac69ef5c2
auto keysym = XKeysymForWindowsKeyCode(key_code, false);
auto keycode = connection_->KeysymToKeycode(keysym);
@@ -129,7 +133,7 @@ void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
@@ -127,7 +131,7 @@ void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
connection_->UngrabKey({keycode, x_root_window_, modifiers | mask});
registered_combinations_.erase(
@ -220,7 +220,7 @@ index fd4f6d05235aff8383fe1c2a089883022871f27c..163b1975faed07351855098ac69ef5c2
}
void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
@@ -139,14 +143,15 @@ void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
@@ -137,14 +141,15 @@ void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {
const bool is_alt_down = event.flags() & EF_ALT_DOWN;
const bool is_ctrl_down = event.flags() & EF_CONTROL_DOWN;
const bool is_shift_down = event.flags() & EF_SHIFT_DOWN;

Просмотреть файл

@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 9078848b53976b7f63bb08140da942d66bd424ca..e86fd93edb33194836253d5b147ed863bfd660bc 100644
index 460c1ac9484724605227553fe2ef3ea441857db7..7e6043ff40d7e1a2d2b51905d77e2944ccb0df98 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -273,8 +273,13 @@ void AsanProcessInfoCB(const char*, bool*) {
@@ -269,8 +269,13 @@ void AsanProcessInfoCB(const char*, bool*) {
}
#endif // defined(ADDRESS_SANITIZER)
@ -25,7 +25,7 @@ index 9078848b53976b7f63bb08140da942d66bd424ca..e86fd93edb33194836253d5b147ed863
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
base::FileDescriptorStore& file_descriptor_store =
base::FileDescriptorStore::GetInstance();
@@ -303,11 +308,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
@@ -299,11 +304,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
#endif // V8_USE_EXTERNAL_STARTUP_DATA
@ -40,7 +40,7 @@ index 9078848b53976b7f63bb08140da942d66bd424ca..e86fd93edb33194836253d5b147ed863
#endif // V8_USE_EXTERNAL_STARTUP_DATA
}
@@ -973,7 +979,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -969,7 +975,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
return TerminateForFatalInitializationError();
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
@ -95,10 +95,10 @@ index 801bfd401ea4a8e72417d88efaa718cc6fb60883..663fec68d0c2855cdf83bb259b85c229
friend class ContentClientCreator;
friend class ContentClientInitializer;
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 587dcfb97712aa6422ac01625a81e6c59c84ac2f..4382dbab379f2cf9207b0372c7253da972924553 100644
index 59abc24988ab4d194461a3ca4f4b2bb68395bada..9e0b16dda73900210bfc6305a5d32e51a704513e 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -653,8 +653,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
@@ -663,8 +663,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
@ -108,7 +108,7 @@ index 587dcfb97712aa6422ac01625a81e6c59c84ac2f..4382dbab379f2cf9207b0372c7253da9
if (g_mapped_snapshot) {
// TODO(crbug.com/40558459): Confirm not loading different type of snapshot
// files in a process.
@@ -663,10 +662,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
@@ -673,10 +672,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
base::MemoryMappedFile::Region file_region;
base::File file =
@ -128,7 +128,7 @@ index 587dcfb97712aa6422ac01625a81e6c59c84ac2f..4382dbab379f2cf9207b0372c7253da9
void V8Initializer::LoadV8SnapshotFromFile(
base::File snapshot_file,
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
index cd7b010978f3f595263761e0692945667b9b3f89..328315aaa34fdd24d7b3dfe5373ec366cceaa124 100644
index ec64afd9dd91b292604ca834a91b9cfbd52eb853..6f7382cd600cd34916d9382878aee4b469dae5d0 100644
--- a/gin/v8_initializer.h
+++ b/gin/v8_initializer.h
@@ -7,6 +7,8 @@
@ -140,7 +140,7 @@ index cd7b010978f3f595263761e0692945667b9b3f89..328315aaa34fdd24d7b3dfe5373ec366
#include "base/files/file.h"
#include "base/files/memory_mapped_file.h"
#include "build/build_config.h"
@@ -42,6 +44,7 @@ class GIN_EXPORT V8Initializer {
@@ -43,6 +45,7 @@ class GIN_EXPORT V8Initializer {
int* snapshot_size_out);
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)

Просмотреть файл

@ -8,7 +8,7 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 978bf926bdd1241181bd7c037bff633be4a311c9..447f0598cd443510af44f64208449e6088bb1118 100644
index 5d096402b44d0684ed861fee090f87177fa1ffb5..6feb46048f45271e72ff1137c33c4073d101f646 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1964,6 +1964,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(

Просмотреть файл

@ -6,7 +6,7 @@ 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 2d06056f1e51ce76398168254152ccc04e596192..a04743ae7626d332b5cf21adad96b4f7e88ab5d3 100644
index 86886e94e9e2c52e297a82175f6071852e792148..bac05714537680f163d1a30a5fe9523a469abe6d 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -559,7 +559,11 @@

Просмотреть файл

@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
node initialization to not update flags after V8 initialization.
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index 18160e8142e0e95d3d6ee2beea4d54c25e3762b6..8214054e62047bfe311f7789748584d19ac87196 100644
index 280b1492ba87e8610b4e28827a5de9aba2ba7e9d..0bb40d521192bd7771022145ef93991057ccceeb 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -195,6 +195,9 @@ RenderProcessImpl::RenderProcessImpl()
@@ -207,6 +207,9 @@ RenderProcessImpl::RenderProcessImpl()
v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag));
}

Просмотреть файл

@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 7ba8c01db7e9383c27c37cd130f094a0ccab6f9a..6dac8bda9b799b2d20f7fa45d7323204b28631e1 100644
index a6632605bfd497650b96d1e8ef40ddf8fa32d7a3..7c6752807590bc0f168820d0d9d8d3277ca9713d 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -816,6 +816,10 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -812,6 +812,10 @@ void RenderWidgetHostImpl::WasHidden() {
return;
}
@ -21,10 +21,10 @@ index 7ba8c01db7e9383c27c37cd130f094a0ccab6f9a..6dac8bda9b799b2d20f7fa45d7323204
// Prompts should remain open and functional across tab switches.
if (!delegate_->IsWaitingForPointerLockPrompt(this)) {
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 56670ed68f85f671c7eeedbc8ba2367f07163733..51cc0c83c48425f3cb49e44df4bd318f1767d03f 100644
index 69da8efc07a807be6e142784c0f3b1a92fbd745e..68d02f59929e74103bb2744fa96509db860246e8 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -1026,6 +1026,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -1020,6 +1020,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// Requests a commit and forced redraw in the renderer compositor.
void ForceRedrawForTesting();
@ -35,7 +35,7 @@ index 56670ed68f85f671c7eeedbc8ba2367f07163733..51cc0c83c48425f3cb49e44df4bd318f
// |routing_id| must not be MSG_ROUTING_NONE.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 06686841d7394d68ff5b4845ace2c2c4d689df4b..e65c2b9ed1d6d3cc53ee5ba145aa22cb149d9dde 100644
index 2f9502490d96101b5e17aaa6809a49299bd5ca40..fe691a1ae2126409b23649824e32bc2a2dd711e6 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -643,7 +643,7 @@ void RenderWidgetHostViewAura::HideImpl() {

Просмотреть файл

@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
should continue seeking for a real fix.
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
index bc6d0baeba151467d0cb24df1df818ac53d4f8f4..f8f6fe3488e6d1fe4ca97b8aed13e5e5c70ebb3d 100644
index e1816f18f44a813a767a49ef27f61c652627740d..abb4ba06d8dc8ab7599e2b9d02a662710d4827dc 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1449,6 +1449,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1452,6 +1452,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@ -35,7 +35,7 @@ index bc6d0baeba151467d0cb24df1df818ac53d4f8f4..f8f6fe3488e6d1fe4ca97b8aed13e5e5
// If this is a same-process navigation and we have timestamps for unload
// durations, fill those metrics out as well.
if (params.unload_start && params.unload_end &&
@@ -1498,6 +1499,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1501,6 +1502,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

Просмотреть файл

@ -19,10 +19,10 @@ index f144ed979f2de1754e95407f908e2aa53c8c8328..b001362220febea5641615b4afa7174b
excluded_margin);
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 20349af9aaa39cf8ca683462dc6772cf75112ae2..af7124ca3b93e85dfb1dddd9a7e8adf3c80d363f 100644
index 12cd216ab83328cb2ee84d1a3524fd1bd4cc2924..ebce632954ae08535eec9565ca4a908f38410daa 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -993,8 +993,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
@@ -988,8 +988,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
const gfx::Size& excluded_margin) {

Просмотреть файл

@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
} // namespace net
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 999c1daf2d4743cd9c67d716fbae762e76075d73..dadfa43453c38ef5c09ffd161988ccdce3f5664a 100644
index 1605a5d30f0e1db8e095ce325313a526d76678f2..f9516c82c9f95f0bb3e16aabfe1528b7b974646a 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1791,6 +1791,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1789,6 +1789,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@ -51,7 +51,7 @@ index 999c1daf2d4743cd9c67d716fbae762e76075d73..dadfa43453c38ef5c09ffd161988ccdc
// This may only be called on NetworkContexts created with the constructor
// that calls MakeURLRequestContext().
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 15065587ab034faf47f6b31482a8eb52ba8de633..72c6260c33424a4779613fc04cc3ad9edba69423 100644
index e4e0962ac9d98899c332a954184f1bcc970a5d58..4c97dc6ab08ffa43ac227e3a260673a48fb27b15 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -316,6 +316,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@ -63,10 +63,10 @@ index 15065587ab034faf47f6b31482a8eb52ba8de633..72c6260c33424a4779613fc04cc3ad9e
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CT_SUPPORTED)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 9bea63a5d08d80911385282a57f59f0322273d73..d5257a5a3c154ad712bb911370e232e7e3a36642 100644
index 1afd6b43182b54145e38898db16708b5d0b487ee..a0d751b0c21da4ccf10cf27d0db79a29c42d2462 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1251,6 +1251,9 @@ interface NetworkContext {
@@ -1260,6 +1260,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);

Просмотреть файл

@ -13,10 +13,10 @@ uses internally for things like menus and devtools.
We can remove this patch once it has in some shape been upstreamed.
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index 04e3441cdc0b3c01187e95900e7a805a65c2231e..1f2bded9105248b7cc06a97d75ca57b6838da355 100644
index 95876b4040844b598ea7219732a044b4423f8d97..4e02620b7887d1b70b2a9b9e21b819d99efdca18 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -211,6 +211,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
@@ -210,6 +210,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
NativeTheme::~NativeTheme() = default;
bool NativeTheme::ShouldUseDarkColors() const {
@ -26,10 +26,10 @@ index 04e3441cdc0b3c01187e95900e7a805a65c2231e..1f2bded9105248b7cc06a97d75ca57b6
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index 8489d256dd898c92bc77210f4a6239f5eb93b8e0..8d3eb64742948a3f8d04cfa7a585df35a84c8961 100644
index 8f90bb52b3cef64af2f880c13ff8182c61d6a091..ee24a241b48cd27d84dbf3268fdf6f8447082077 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -447,6 +447,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -457,6 +457,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
bool use_custom_frame = true) const;
@ -53,7 +53,7 @@ index 8489d256dd898c92bc77210f4a6239f5eb93b8e0..8d3eb64742948a3f8d04cfa7a585df35
// Returns a shared instance of the native theme that should be used for web
// rendering. Do not use it in a normal application context (i.e. browser).
// The returned object should not be deleted by the caller. This function is
@@ -684,6 +701,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -712,6 +729,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
std::optional<base::TimeDelta> caret_blink_interval_;
bool use_overlay_scrollbars_ = false;
@ -62,7 +62,7 @@ index 8489d256dd898c92bc77210f4a6239f5eb93b8e0..8d3eb64742948a3f8d04cfa7a585df35
SEQUENCE_CHECKER(sequence_checker_);
};
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index d34f90e8a6b9304798e73349aa73963dfc45bad6..99513deae31d7e4a37acbc16a35c42a4360960c2 100644
index f9680f5f46180313ef98df97e242f72ac3dfd0dc..5571532504b4752faad2ed5712ba1ef813e32a84 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -688,6 +688,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {

Просмотреть файл

@ -9,7 +9,7 @@ embedders to make custom schemes allow V8 code cache.
Chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/5019665
diff --git a/content/browser/code_cache/generated_code_cache.cc b/content/browser/code_cache/generated_code_cache.cc
index fa46d81e3a46a6d3f289fc8d184b434da1888d7a..169dd7dc24b09d319a7510184aab3b1bb96a1a85 100644
index bba85bb47e489b73c2341bbeb9aa04099d712889..4bd69c3c5511a4f492f78f203284c8e546c9f067 100644
--- a/content/browser/code_cache/generated_code_cache.cc
+++ b/content/browser/code_cache/generated_code_cache.cc
@@ -12,6 +12,7 @@
@ -117,7 +117,7 @@ index fa46d81e3a46a6d3f289fc8d184b434da1888d7a..169dd7dc24b09d319a7510184aab3b1b
// Generates the cache key for the given |resource_url|, |origin_lock| and
diff --git a/content/browser/code_cache/generated_code_cache.h b/content/browser/code_cache/generated_code_cache.h
index e0cdc785d2557bc79bde98728c23c239ed8d0961..74e0acbea1e0c18a6ac8971170efc945ca58f4ed 100644
index c5fb0546fb8724a6ba34b55d8d52b2f70ad5bc0c..883c4022aa58e5eb5345ec4e8815a1374160d96c 100644
--- a/content/browser/code_cache/generated_code_cache.h
+++ b/content/browser/code_cache/generated_code_cache.h
@@ -52,12 +52,14 @@ class CONTENT_EXPORT GeneratedCodeCache {

Просмотреть файл

@ -46,7 +46,7 @@ index 8ac12480f663a74dfbdcf7128a582a81b4474d25..db6802a2603e1d3c3039e49737438124
// OnStop is called by StopAndDeAllocate.
virtual void OnStop() = 0;
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c414c870a0b 100644
index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb349f3797 100644
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
@@ -26,6 +26,61 @@
@ -134,7 +134,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c41
_errorCallback = errorCallback;
}
return self;
@@ -187,7 +246,8 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
@@ -187,29 +246,53 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac
: public IOSurfaceCaptureDeviceBase,
@ -143,8 +143,12 @@ index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c41
+ {
public:
explicit ScreenCaptureKitDeviceMac(const DesktopMediaID& source,
SCContentFilter* filter)
@@ -198,18 +258,42 @@ explicit ScreenCaptureKitDeviceMac(const DesktopMediaID& source,
- SCContentFilter* filter)
+ [[maybe_unused]] SCContentFilter* filter)
: source_(source),
- filter_(filter),
device_task_runner_(base::SingleThreadTaskRunner::GetCurrentDefault()) {
SampleCallback sample_callback = base::BindPostTask(
device_task_runner_,
base::BindRepeating(&ScreenCaptureKitDeviceMac::OnStreamSample,
weak_factory_.GetWeakPtr()));
@ -188,7 +192,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c41
void OnShareableContentCreated(SCShareableContent* content) {
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
@@ -277,7 +361,7 @@ void CreateStream(SCContentFilter* filter) {
@@ -277,7 +360,7 @@ void CreateStream(SCContentFilter* filter) {
return;
}
@ -197,7 +201,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c41
// Update the content size. This step is neccessary when used together
// with SCContentSharingPicker. If the Chrome picker is used, it will
// change to retina resolution if applicable.
@@ -286,6 +370,9 @@ void CreateStream(SCContentFilter* filter) {
@@ -286,6 +369,9 @@ void CreateStream(SCContentFilter* filter) {
filter.contentRect.size.height * filter.pointPixelScale);
}
@ -207,7 +211,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c41
gfx::RectF dest_rect_in_frame;
actual_capture_format_ = capture_params().requested_format;
actual_capture_format_.pixel_format = media::PIXEL_FORMAT_NV12;
@@ -299,6 +386,7 @@ void CreateStream(SCContentFilter* filter) {
@@ -299,6 +385,7 @@ void CreateStream(SCContentFilter* filter) {
stream_ = [[SCStream alloc] initWithFilter:filter
configuration:config
delegate:helper_];
@ -215,7 +219,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c41
{
NSError* error = nil;
bool add_stream_output_result =
@@ -452,7 +540,7 @@ void OnStreamError() {
@@ -452,7 +539,7 @@ void OnStreamError() {
if (fullscreen_module_) {
fullscreen_module_->Reset();
}
@ -224,7 +228,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c41
} else {
client()->OnError(media::VideoCaptureError::kScreenCaptureKitStreamError,
FROM_HERE, "Stream delegate called didStopWithError");
@@ -475,23 +563,41 @@ void OnUpdateConfigurationError() {
@@ -475,23 +562,41 @@ void OnUpdateConfigurationError() {
}
// IOSurfaceCaptureDeviceBase:
@ -281,16 +285,18 @@ index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c41
}
void OnStop() override {
DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
@@ -549,6 +655,8 @@ void ResetStreamTo(SCWindow* window) override {
@@ -549,8 +654,9 @@ void ResetStreamTo(SCWindow* window) override {
}
private:
+ static int active_streams_;
+
const DesktopMediaID source_;
SCContentFilter* const filter_;
- SCContentFilter* const filter_;
const scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
@@ -566,6 +674,10 @@ void ResetStreamTo(SCWindow* window) override {
// The actual format of the video frames that are sent to `client`.
@@ -566,6 +672,10 @@ void ResetStreamTo(SCWindow* window) override {
// Helper class that acts as output and delegate for `stream_`.
ScreenCaptureKitDeviceHelper* __strong helper_;
@ -301,7 +307,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..ebfc2bb1006950dcff8e8f8792779c41
// This is used to detect when a captured presentation enters fullscreen mode.
// If this happens, the module will call the ResetStreamTo function.
std::unique_ptr<ScreenCaptureKitFullscreenModule> fullscreen_module_;
@@ -578,6 +690,8 @@ void ResetStreamTo(SCWindow* window) override {
@@ -578,6 +688,8 @@ void ResetStreamTo(SCWindow* window) override {
base::WeakPtrFactory<ScreenCaptureKitDeviceMac> weak_factory_{this};
};
@ -363,7 +369,7 @@ index 415156d403a59bf426cf4561a9d58ecdb27524b4..78aa7b2359c684d5305bf6352751dfbb
#if defined(USE_AURA) || BUILDFLAG(IS_MAC)
// Assigns integer identifier to the |window| and returns its DesktopMediaID.
diff --git a/media/capture/video_capture_types.h b/media/capture/video_capture_types.h
index f2b75f5b2f547ad135c1288bf3639b26dedc8053..ef18724d9f2ea68a47b66fc3981f58a73ac1b51d 100644
index 53e8077c9c0b635df0abdeca43fa9a6373c68252..2805e36cc42190d8197d83f5df235094570e3d5d 100644
--- a/media/capture/video_capture_types.h
+++ b/media/capture/video_capture_types.h
@@ -355,6 +355,8 @@ struct CAPTURE_EXPORT VideoCaptureParams {

Просмотреть файл

@ -706,7 +706,7 @@ index b67f4f87d588386409a90cd49e8338272c6e0d51..c34a80ec8db1b868a7f387ea4a11d71d
#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 1c3ead160e2aa84b41eb9474f103c7c0dd54ac87..ef534a5cde6cfaf610dbdde27e73b113d399d384 100644
index 4fb8e2a9d7a6e24aeb7148592659981754d027b3..53b72124ffaa77f740d689fcc1781556bcca4e66 100644
--- a/sandbox/policy/win/sandbox_win.cc
+++ b/sandbox/policy/win/sandbox_win.cc
@@ -589,11 +589,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
@ -719,10 +719,10 @@ index 1c3ead160e2aa84b41eb9474f103c7c0dd54ac87..ef534a5cde6cfaf610dbdde27e73b113
base::Process* process) {
- base::LaunchOptions options;
- options.handles_to_inherit = handles_to_inherit;
options.feedback_cursor_off = true;
// 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
@@ -885,7 +883,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
@@ -896,7 +894,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
// static
ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
const base::CommandLine& cmd_line,
@ -731,7 +731,7 @@ index 1c3ead160e2aa84b41eb9474f103c7c0dd54ac87..ef534a5cde6cfaf610dbdde27e73b113
SandboxDelegate* delegate,
TargetPolicy* policy) {
const base::CommandLine& launcher_process_command_line =
@@ -899,7 +897,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -910,7 +908,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
}
// Add any handles to be inherited to the policy.
@ -740,7 +740,7 @@ index 1c3ead160e2aa84b41eb9474f103c7c0dd54ac87..ef534a5cde6cfaf610dbdde27e73b113
policy->AddHandleToShare(handle);
if (!policy->GetConfig()->IsConfigured()) {
@@ -914,6 +912,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -925,6 +923,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));
@ -754,7 +754,7 @@ index 1c3ead160e2aa84b41eb9474f103c7c0dd54ac87..ef534a5cde6cfaf610dbdde27e73b113
#endif
if (!delegate->PreSpawnTarget(policy))
@@ -925,7 +930,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
@@ -936,7 +941,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
// static
ResultCode SandboxWin::StartSandboxedProcess(
const base::CommandLine& cmd_line,
@ -763,7 +763,7 @@ index 1c3ead160e2aa84b41eb9474f103c7c0dd54ac87..ef534a5cde6cfaf610dbdde27e73b113
SandboxDelegate* delegate,
StartSandboxedProcessCallback result_callback) {
SandboxLaunchTimer timer;
@@ -935,7 +940,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -946,7 +951,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
*base::CommandLine::ForCurrentProcess())) {
base::Process process;
ResultCode result =
@ -772,7 +772,7 @@ index 1c3ead160e2aa84b41eb9474f103c7c0dd54ac87..ef534a5cde6cfaf610dbdde27e73b113
DWORD last_error = GetLastError();
std::move(result_callback).Run(std::move(process), last_error, result);
return SBOX_ALL_OK;
@@ -945,7 +950,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -956,7 +961,7 @@ ResultCode SandboxWin::StartSandboxedProcess(
timer.OnPolicyCreated();
ResultCode result = GeneratePolicyForSandboxedProcess(

Просмотреть файл

@ -90,10 +90,10 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 664df443242ae9af565cc83786398d68e6d655c4..70d59ca1d1d53f992c7f96a81d440e723dbc7656 100644
index 8720a29e13ce052db99a6fb7925efd4b43472b9a..20df5575efd0ae37d5885b6088be69a29c75579f 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -171,6 +171,8 @@ viz_component("service") {
@@ -168,6 +168,8 @@ viz_component("service") {
"display_embedder/skia_output_surface_impl_on_gpu_debug_capture.h",
"display_embedder/skia_render_copy_results.cc",
"display_embedder/skia_render_copy_results.h",
@ -117,18 +117,18 @@ index 7fbb05e606fc26364c674c6330b8a5eb9c016fb3..a190a42c2127011ab54aae937a3cab36
virtual gpu::SharedImageManager* GetSharedImageManager() = 0;
virtual gpu::SyncPointManager* GetSyncPointManager() = 0;
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
index 98e50a61cb7d936350eff235d00f79b4734016ca..29d4dacbc168ce3e1a7c90e079040de7bd26771b 100644
index 07502f4ff2afd53a43d8f0ab68d4c4c39f6c0737..20d51f86d5084edf0b05ce0ab11fcd1279ef8fa6 100644
--- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
@@ -24,6 +24,7 @@
#include "components/viz/service/display_embedder/server_shared_bitmap_manager.h"
@@ -23,6 +23,7 @@
#include "components/viz/service/display/display_compositor_memory_and_task_controller.h"
#include "components/viz/service/display_embedder/skia_output_surface_dependency_impl.h"
#include "components/viz/service/display_embedder/skia_output_surface_impl.h"
+#include "components/viz/service/display_embedder/software_output_device_proxy.h"
#include "components/viz/service/display_embedder/software_output_surface.h"
#include "components/viz/service/gl/gpu_service_impl.h"
#include "gpu/command_buffer/client/shared_memory_limits.h"
@@ -31,6 +32,7 @@
@@ -30,6 +31,7 @@
#include "gpu/command_buffer/service/scheduler_sequence.h"
#include "gpu/config/gpu_finch_features.h"
#include "gpu/ipc/common/surface_handle.h"
@ -136,7 +136,7 @@ index 98e50a61cb7d936350eff235d00f79b4734016ca..29d4dacbc168ce3e1a7c90e079040de7
#include "ui/base/ui_base_switches.h"
#if BUILDFLAG(IS_WIN)
@@ -94,7 +96,8 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
@@ -93,7 +95,8 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
mojom::DisplayClient* display_client,
DisplayCompositorMemoryAndTaskController* gpu_dependency,
const RendererSettings& renderer_settings,
@ -146,7 +146,7 @@ index 98e50a61cb7d936350eff235d00f79b4734016ca..29d4dacbc168ce3e1a7c90e079040de7
#if BUILDFLAG(IS_CHROMEOS)
if (surface_handle == gpu::kNullSurfaceHandle)
return std::make_unique<OutputSurfaceUnified>();
@@ -102,7 +105,7 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
@@ -101,7 +104,7 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
if (!gpu_compositing) {
return std::make_unique<SoftwareOutputSurface>(
@ -155,7 +155,7 @@ index 98e50a61cb7d936350eff235d00f79b4734016ca..29d4dacbc168ce3e1a7c90e079040de7
} else {
DCHECK(gpu_dependency);
@@ -141,10 +144,22 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
@@ -140,10 +143,22 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
std::unique_ptr<SoftwareOutputDevice>
OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
gpu::SurfaceHandle surface_handle,
@ -177,8 +177,8 @@ index 98e50a61cb7d936350eff235d00f79b4734016ca..29d4dacbc168ce3e1a7c90e079040de7
+#endif
+
#if BUILDFLAG(IS_WIN)
return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_,
display_client);
HWND child_hwnd;
auto device = CreateSoftwareOutputDeviceWin(
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.h b/components/viz/service/display_embedder/output_surface_provider_impl.h
index e4b46a79560e7698a6400b2ab8a57f38205a8718..3cb2518c6644cf0618f625d981befd466a3dfb2c 100644
--- a/components/viz/service/display_embedder/output_surface_provider_impl.h
@ -238,10 +238,10 @@ index 67d5ff67d74c107a867b39b306c6528425b87e05..5fd12a25c9e319e8e675955926271c9d
diff --git a/components/viz/service/display_embedder/software_output_device_proxy.cc b/components/viz/service/display_embedder/software_output_device_proxy.cc
new file mode 100644
index 0000000000000000000000000000000000000000..25c427e337a1bc049cd6977a13c4113085dc9401
index 0000000000000000000000000000000000000000..ef5cb8ae4c398e5834496c8b24eb98c41b10a7b3
--- /dev/null
+++ b/components/viz/service/display_embedder/software_output_device_proxy.cc
@@ -0,0 +1,161 @@
@@ -0,0 +1,162 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
@ -253,7 +253,6 @@ index 0000000000000000000000000000000000000000..25c427e337a1bc049cd6977a13c41130
+#include "base/trace_event/trace_event.h"
+#include "build/build_config.h"
+#include "components/viz/common/resources/resource_sizes.h"
+#include "components/viz/service/display_embedder/output_device_backing.h"
+#include "mojo/public/cpp/system/platform_handle.h"
+#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h"
+#include "skia/ext/platform_canvas.h"
@ -261,6 +260,7 @@ index 0000000000000000000000000000000000000000..25c427e337a1bc049cd6977a13c41130
+#include "ui/gfx/skia_util.h"
+
+#if BUILDFLAG(IS_WIN)
+#include "components/viz/service/display_embedder/output_device_backing.h"
+#include "skia/ext/skia_utils_win.h"
+#include "ui/gfx/gdi_util.h"
+#include "ui/gfx/win/hwnd_util.h"
@ -365,7 +365,8 @@ index 0000000000000000000000000000000000000000..25c427e337a1bc049cd6977a13c41130
+
+ canvas_ = skia::CreatePlatformCanvasWithPixels(
+ viewport_pixel_size_.width(), viewport_pixel_size_.height(), false,
+ static_cast<uint8_t*>(shm_mapping_.memory()), skia::CRASH_ON_FAILURE);
+ static_cast<uint8_t*>(shm_mapping_.memory()), 0,
+ skia::CRASH_ON_FAILURE);
+#endif
+
+ // Transfer region ownership to the browser process.
@ -508,10 +509,10 @@ index 0000000000000000000000000000000000000000..e1a22ee881c0fd679ac2d2d4d11a3c93
+
+#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_
diff --git a/components/viz/service/display_embedder/software_output_device_win.cc b/components/viz/service/display_embedder/software_output_device_win.cc
index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf2a707ac8 100644
index 4d6cc977ed5000d93918336a0dd57f60c0e95bbb..54d936e86b60f0538c70c4ee69e109ccda35248f 100644
--- a/components/viz/service/display_embedder/software_output_device_win.cc
+++ b/components/viz/service/display_embedder/software_output_device_win.cc
@@ -193,7 +193,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
@@ -149,7 +149,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
if (!canvas_)
return;
@ -521,7 +522,7 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index 977161762c67e126e182c24c5e8e7a3e7523dacb..1773488b3b5fce5e1c99f484988620edd8da9034 100644
index 44774a898ee6346624827e8d534ba9b6b808ea32..25f356de45ba2c27e702e0543db74fbaa66f2454 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -111,7 +111,8 @@ RootCompositorFrameSinkImpl::Create(
@ -563,10 +564,10 @@ index 399fba1a3d4e601dc2cdd5f1f4def8b7fd7a3011..8bcbe0d26c80323155d536c0d3a177a1
gpu::SyncPointManager* GetSyncPointManager() override;
gpu::Scheduler* GetGpuScheduler() override;
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
index c8986a3972555fffd8c5bb617d9d9cdc5e4f8ec8..0307e1618351dd5be51e29b309cb89f9b0a5c765 100644
index 68ab07c7a6955f363a0e0eb3a6607c95edb521d3..01edb81229bf7a9205e1de54cdbb8e0dd0f4da80 100644
--- a/content/browser/compositor/viz_process_transport_factory.cc
+++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -386,8 +386,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -441,8 +441,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
root_params->display_private =
display_private.BindNewEndpointAndPassReceiver();
@ -596,7 +597,7 @@ index 7d19b6be8bb0e0269c381cf6efdf79eaeff1e935..b8ec06ade095df99c024396a601dbf1a
// Sends the created child window to the browser process so that it can be
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
index 29dd2361ecbce33ca720ea655b81516a1d213595..83becdd42e6948c3c7ba69327addd195e4d27cad 100644
index 8ffd1de69da7429fd69709476a890b72766662ab..e67ef2981d2e8e97fbaad7feb048ca2d2321bd99 100644
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
@@ -39,6 +39,7 @@ struct RootCompositorFrameSinkParams {
@ -619,7 +620,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index ad696fdb49e0045302c9c9a7f2f1cf66c550c13a..970768eaa311139d0b27f5be893d601e20052825 100644
index b8f57342a59bd1790f275dfbcac2541359235ce6..8b983f7b7f921674d22afeccb7e9aee9be7eb249 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -89,6 +89,7 @@ class DisplayPrivate;
@ -657,7 +658,7 @@ index ad696fdb49e0045302c9c9a7f2f1cf66c550c13a..970768eaa311139d0b27f5be893d601e
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -562,6 +576,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -583,6 +597,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
simple_begin_frame_observers_;
std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;

Просмотреть файл

@ -12,10 +12,10 @@ We attempt to migrate the safe storage key from the old account, if that migrati
Existing apps that aren't built for the app store should be unimpacted, there is one edge case where a user uses BOTH an AppStore and a darwin build of the same app only one will keep it's access to the safestorage key as during the migration we delete the old account. This is an acceptable edge case as no one should be actively using two versions of the same app.
diff --git a/components/os_crypt/sync/keychain_password_mac.mm b/components/os_crypt/sync/keychain_password_mac.mm
index a7fa25575be84d1dabb04bdc458e2a6d4358ddc1..c2a5f12fc49c96fee57ad46e28e606d7adf20673 100644
index a179c9bc02158130f4b15bf8022721f4b53a8303..8fd3f42725e6618737110459b1b1021e3709f0df 100644
--- a/components/os_crypt/sync/keychain_password_mac.mm
+++ b/components/os_crypt/sync/keychain_password_mac.mm
@@ -25,6 +25,12 @@
@@ -24,6 +24,12 @@
using KeychainNameContainerType = const base::NoDestructor<std::string>;
#endif
@ -28,7 +28,7 @@ index a7fa25575be84d1dabb04bdc458e2a6d4358ddc1..c2a5f12fc49c96fee57ad46e28e606d7
namespace {
// These two strings ARE indeed user facing. But they are used to access
@@ -84,11 +90,18 @@
@@ -83,11 +89,18 @@
std::string KeychainPassword::GetPassword() const {
UInt32 password_length = 0;
void* password_data = nullptr;
@ -49,7 +49,7 @@ index a7fa25575be84d1dabb04bdc458e2a6d4358ddc1..c2a5f12fc49c96fee57ad46e28e606d7
if (error == noErr) {
std::string password =
std::string(static_cast<char*>(password_data), password_length);
@@ -96,6 +109,49 @@
@@ -95,6 +108,49 @@
return password;
}

Просмотреть файл

@ -37,7 +37,7 @@ index 677e8db2114350e5368b56bd8857957a5d99b419..9b5a1b7b66542aca6cace76d40cd8a34
allow_cookies_from_browser == other.allow_cookies_from_browser &&
include_request_cookies_with_response ==
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
index 51cd9e4f833d077a68948c1800f006ddf72cf246..db1a111006a233ab77057c5eb1703d075e491f0c 100644
index 76e4130d4f84348af2ace1dfe809c48e4b4d4d6a..24c715db250227818dbe889597f4685778eff557 100644
--- a/services/network/public/cpp/resource_request.h
+++ b/services/network/public/cpp/resource_request.h
@@ -75,6 +75,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@ -76,7 +76,7 @@ index 46e36ea59abe3efdd24c56093f4161d6bc57c882..5f6a283272f0d153d2f4b78b9f6dac41
cookie_observer(
const network::ResourceRequest::TrustedParams& trusted_params) {
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
index e0a7a63532eeab0601198f84b7105a87eae43345..d18646c78c730ae3e17b2c6a09d8ef3bf55140b0 100644
index 1741c2c040bcb4bf90cb155f75a8eeaee0df31fa..a6c33c5d1226106251a571912ebcca0223b057cd 100644
--- a/services/network/public/mojom/url_request.mojom
+++ b/services/network/public/mojom/url_request.mojom
@@ -82,6 +82,9 @@ struct TrustedUrlRequestParams {
@ -112,10 +112,10 @@ index 5c4b8a05034f8defacbc13671fe9bc92f76ade5a..e7390e01f113755613f42d592b36108b
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 4db6317eac52144e6325b3b497280c40d70f640e..2558f5f073a2a3f7b0e63979685d38be23b20709 100644
index bbfe238fe3ab1f33e59200d730bebbcb1717942d..24edf310e07eee64d596190a815f125db7cdb769 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -629,6 +629,9 @@ URLLoader::URLLoader(
@@ -667,6 +667,9 @@ URLLoader::URLLoader(
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
base::SequencedTaskRunner::GetCurrentDefault()),
per_factory_orb_state_(context.GetMutableOrbState()),
@ -123,9 +123,9 @@ index 4db6317eac52144e6325b3b497280c40d70f640e..2558f5f073a2a3f7b0e63979685d38be
+ request.trusted_params &&
+ request.trusted_params->report_raw_headers),
devtools_request_id_(request.devtools_request_id),
request_mode_(request.mode),
request_credentials_mode_(request.credentials_mode),
@@ -910,7 +913,7 @@ void URLLoader::ConfigureRequest(
options_(PopulateOptions(options,
factory_params_->is_orb_enabled,
@@ -964,7 +967,7 @@ void URLLoader::ConfigureRequest(
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
}
@ -134,7 +134,7 @@ index 4db6317eac52144e6325b3b497280c40d70f640e..2558f5f073a2a3f7b0e63979685d38be
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1920,6 +1923,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -2061,6 +2064,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();
@ -155,10 +155,10 @@ index 4db6317eac52144e6325b3b497280c40d70f640e..2558f5f073a2a3f7b0e63979685d38be
// Parse and remove the Trust Tokens response headers, if any are expected,
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index a9ce96e27330ca21cb7f43f9d06115428176e31e..04897d7b6af19faab435cfca9e926142bdbb8ed6 100644
index c686201037c54d67c151b89887d6dfcd5201331a..3a20576c0ac9013e817f35e0b93feca21fcb4a7c 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -689,6 +689,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -716,6 +716,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
resource_scheduler_request_handle_;

Просмотреть файл

@ -14,10 +14,10 @@ This patch likely can't be upstreamed as-is, as Chromium doesn't have
this use case in mind currently.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index ae0189bd5fb9a91f4c76081cd3eed94f79d567dd..d03bea613d7b85567c968f758fa8d64d3dc6f263 100644
index b025c3a6c3d2cf3cec6f2a09061ec7223dd0861e..da086aa1596ae4e9848ee95a0efe26bbbcbb6bf8 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -937,13 +937,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
@@ -932,13 +932,13 @@ void HWNDMessageHandler::FrameTypeChanged() {
void HWNDMessageHandler::PaintAsActiveChanged() {
if (!delegate_->HasNonClientView() || !delegate_->CanActivate() ||
@ -33,7 +33,7 @@ index ae0189bd5fb9a91f4c76081cd3eed94f79d567dd..d03bea613d7b85567c968f758fa8d64d
}
void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon,
@@ -2332,17 +2332,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
@@ -2327,17 +2327,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message,
delegate_->SchedulePaint();
}

Просмотреть файл

@ -12,10 +12,10 @@ ui problems (like dissapearing popup during typing in html's
input list.
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index 30d0ea6633cb0f7f9aab37951a38be9b0482a12a..734e91e6d50c8d3afd20b39167c6254e934e7c1e 100644
index 37522f51d0c98120b9161bd25cb85cb6e2cd518b..0abe6f9be010a6ec93d28183c674374d88759d97 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -1144,6 +1144,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -1171,6 +1171,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// True if widget was created in headless mode.
bool is_headless() const { return is_headless_; }

Просмотреть файл

@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
BrowserWindow.
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index af7124ca3b93e85dfb1dddd9a7e8adf3c80d363f..3e7066bcdc551f1c798c75f279b57318b4bf18e4 100644
index ebce632954ae08535eec9565ca4a908f38410daa..5c4719e1f2084f9d1b99f12b614396f68a3903aa 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -3717,15 +3717,30 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
@@ -3745,15 +3745,30 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
min_window_size = delegate_->DIPToScreenSize(min_window_size);
max_window_size = delegate_->DIPToScreenSize(max_window_size);

Просмотреть файл

@ -28,10 +28,10 @@ The patch should be removed in favor of either:
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index cc3a15808ad7c0f0764944f145499f9bc462c787..49f43795209fe3cbf12a949312c3edbbfb5aa255 100644
index 27c692d5c1ddf7493f6b35a9428b60c58f50f288..475ef0da92dc55abd2014c14616527d97d931ec0 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -10817,6 +10817,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
@@ -10886,6 +10886,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
"blob");
}
@ -45,10 +45,10 @@ index cc3a15808ad7c0f0764944f145499f9bc462c787..49f43795209fe3cbf12a949312c3edbb
// origin of |common_params.url| and/or |common_params.initiator_origin|.
url::Origin resolved_origin = url::Origin::Resolve(
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
index f4d01820da41368f872e1f04a4736946eb304a93..8fd4b90f490d6b063ab780caf301bed68f36737e 100644
index 4381454af08832a428dad1dba46f317a5ff91124..80fbd403a2f5e6c60abc8b88a348647e491e454f 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -2317,6 +2317,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
@@ -2313,6 +2313,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
Document* owner_document) {
scoped_refptr<SecurityOrigin> origin;
@ -59,7 +59,7 @@ index f4d01820da41368f872e1f04a4736946eb304a93..8fd4b90f490d6b063ab780caf301bed6
StringBuilder debug_info_builder;
// Whether the origin is newly created within this call, instead of copied
// from an existing document's origin or from `origin_to_commit_`. If this is
@@ -2370,6 +2374,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
@@ -2366,6 +2370,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
// the end of this function.
origin = origin_to_commit_;
debug_info_builder.Append("use_origin_to_commit");

Просмотреть файл

@ -13,10 +13,10 @@ This patch can be removed should we choose to support chrome.fileSystem
or support it enough to fix the crash.
diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts
index 62354223a767c9d83e81ec6cc0245545a3106c00..0254aa9033cf3986120f8fc4e965b339f00b3ee7 100644
index 26391c1965a83aa646db3ef9dbb6cb72fd564933..a3480ba54553406dc3576caefc814d854a9db21d 100644
--- a/chrome/browser/resources/pdf/pdf_viewer.ts
+++ b/chrome/browser/resources/pdf/pdf_viewer.ts
@@ -1093,29 +1093,27 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -1108,29 +1108,27 @@ export class PdfViewerElement extends PdfViewerBaseElement {
dataArray = [result.dataToSave];
}
@ -66,7 +66,7 @@ index 62354223a767c9d83e81ec6cc0245545a3106c00..0254aa9033cf3986120f8fc4e965b339
}
/**
@@ -1306,7 +1304,6 @@ export class PdfViewerElement extends PdfViewerBaseElement {
@@ -1340,7 +1338,6 @@ export class PdfViewerElement extends PdfViewerBaseElement {
fileName = fileName + '.pdf';
}

Просмотреть файл

@ -12,7 +12,7 @@ invisible state of the `viz::DisplayScheduler` owned
by the `ui::Compositor`.
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index b505f127b2e05e347f0bc55a8e6c2e07e645fa3e..41ca5c47b656b521f8d9cbf1e5fe7bc90f3e18e9 100644
index 1a09cf7c2a02c6aef48d149285ffcad7b76fc15b..2955d6f06fc2307a569bdf2754d69b9fd974fc2b 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -340,7 +340,8 @@ void Compositor::SetLayerTreeFrameSink(
@ -25,7 +25,7 @@ index b505f127b2e05e347f0bc55a8e6c2e07e645fa3e..41ca5c47b656b521f8d9cbf1e5fe7bc9
display_private_->SetDisplayColorSpaces(display_color_spaces_);
display_private_->SetDisplayColorMatrix(
gfx::SkM44ToTransform(display_color_matrix_));
@@ -551,7 +552,9 @@ void Compositor::SetVisible(bool visible) {
@@ -560,7 +561,9 @@ void Compositor::SetVisible(bool visible) {
// updated then. We need to call this even if the visibility hasn't changed,
// for the same reason.
if (display_private_)
@ -36,7 +36,7 @@ index b505f127b2e05e347f0bc55a8e6c2e07e645fa3e..41ca5c47b656b521f8d9cbf1e5fe7bc9
if (changed) {
observer_list_.Notify(&CompositorObserver::OnCompositorVisibilityChanged,
@@ -1004,6 +1007,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
@@ -1013,6 +1016,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
host_begin_frame_observer_->GetBoundRemote());
}
@ -53,7 +53,7 @@ index b505f127b2e05e347f0bc55a8e6c2e07e645fa3e..41ca5c47b656b521f8d9cbf1e5fe7bc9
void Compositor::SetSeamlessRefreshRates(
const std::vector<float>& seamless_refresh_rates) {
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 970768eaa311139d0b27f5be893d601e20052825..cc5c2a704e339713a796196805a2aa05206d5b2e 100644
index 8b983f7b7f921674d22afeccb7e9aee9be7eb249..29d6a3125b3d7f2946b3b319c48e71d87caac68b 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -509,6 +509,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@ -67,7 +67,7 @@ index 970768eaa311139d0b27f5be893d601e20052825..cc5c2a704e339713a796196805a2aa05
size_t saved_events_metrics_count_for_testing() const {
return host_->saved_events_metrics_count_for_testing();
}
@@ -657,6 +661,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -678,6 +682,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
// See go/report-ux-metrics-at-painting for details.
bool animation_started_ = false;

Просмотреть файл

@ -10,54 +10,6 @@ receive remote control events until it begins playing audio. This runs
counter to the design of globalShortcuts, and so we need to instead
use `ui::MediaKeysListener`.
diff --git a/chrome/browser/extensions/global_shortcut_listener.cc b/chrome/browser/extensions/global_shortcut_listener.cc
index 7a5635aa2beec3f46fde571f68adf5ae6c20ea11..897d1dc7c5896edde32f0dc5a46143ed2e8ea03c 100644
--- a/chrome/browser/extensions/global_shortcut_listener.cc
+++ b/chrome/browser/extensions/global_shortcut_listener.cc
@@ -14,6 +14,7 @@
#include "base/notreached.h"
#include "build/config/linux/dbus/buildflags.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/media_keys_listener_manager.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/accelerators/command.h"
#include "ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h"
@@ -91,6 +92,22 @@ void GlobalShortcutListener::UnregisterAccelerator(
RemoveAccelerator(accelerator);
}
+// static
+void GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(bool should_use) {
+ if (content::MediaKeysListenerManager::
+ IsMediaKeysListenerManagerEnabled()) {
+ content::MediaKeysListenerManager* media_keys_listener_manager =
+ content::MediaKeysListenerManager::GetInstance();
+ DCHECK(media_keys_listener_manager);
+
+ if (should_use) {
+ media_keys_listener_manager->EnableInternalMediaKeyHandling();
+ } else {
+ media_keys_listener_manager->DisableInternalMediaKeyHandling();
+ }
+ }
+}
+
void GlobalShortcutListener::UnregisterAccelerators(Observer* observer) {
CHECK(global_accelerator_listener_);
diff --git a/chrome/browser/extensions/global_shortcut_listener.h b/chrome/browser/extensions/global_shortcut_listener.h
index ec203528129a3d13753d6ce477dd5796e80ddf71..2dd2403e0ae57dd8162fbcc8c8d3ebdd6e57c95c 100644
--- a/chrome/browser/extensions/global_shortcut_listener.h
+++ b/chrome/browser/extensions/global_shortcut_listener.h
@@ -41,6 +41,8 @@ class GlobalShortcutListener {
// The instance may be nullptr.
static GlobalShortcutListener* GetInstance();
+ static void SetShouldUseInternalMediaKeyHandling(bool should_use);
+
// Register an observer for when a certain |accelerator| is struck. Returns
// true if register successfully, or false if 1) the specificied |accelerator|
// has been registered by another caller or other native applications, or
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
index 42e37564e585987d367921568f0f1d2b7507f953..9baf89efbade01e8b60c579255f10799914e144f 100644
--- a/content/browser/media/media_keys_listener_manager_impl.cc
@ -96,3 +48,52 @@ index 42e37564e585987d367921568f0f1d2b7507f953..9baf89efbade01e8b60c579255f10799
EnsureAuxiliaryServices();
}
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.cc
index cdf35a5bcec7b30f1b75e77cc29a9b7bb591cfd6..b6dfeee587faa742beb4f1d871db4c4f76bf46ab 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.cc
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.cc
@@ -65,6 +65,22 @@ void GlobalAcceleratorListener::UnregisterAccelerator(
}
}
+// static
+void GlobalAcceleratorListener::SetShouldUseInternalMediaKeyHandling(bool should_use) {
+ if (content::MediaKeysListenerManager::
+ IsMediaKeysListenerManagerEnabled()) {
+ content::MediaKeysListenerManager* media_keys_listener_manager =
+ content::MediaKeysListenerManager::GetInstance();
+ DCHECK(media_keys_listener_manager);
+
+ if (should_use) {
+ media_keys_listener_manager->EnableInternalMediaKeyHandling();
+ } else {
+ media_keys_listener_manager->DisableInternalMediaKeyHandling();
+ }
+ }
+}
+
void GlobalAcceleratorListener::UnregisterAccelerators(Observer* observer) {
if (IsShortcutHandlingSuspended()) {
return;
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h
index 701808699796b0ef1a87d4d12f79fb6cf580c617..bf6e38410cedd6dd6d339b6f2f456124770bbd96 100644
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h
@@ -8,6 +8,7 @@
#include <map>
#include "base/memory/raw_ptr.h"
+#include "content/public/browser/media_keys_listener_manager.h"
#include "ui/base/accelerators/command.h"
namespace ui {
@@ -38,6 +39,9 @@ class GlobalAcceleratorListener {
// The instance may be nullptr.
static GlobalAcceleratorListener* GetInstance();
+ // enables media keys to work with Electron's globalShortcut module.
+ static void SetShouldUseInternalMediaKeyHandling(bool should_use);
+
// Register an observer for when a certain `accelerator` is struck. Returns
// true if register successfully, or false if the specified `accelerator`
// has been registered by another caller or other native applications.

Просмотреть файл

@ -75,7 +75,7 @@ index 50f1b8711f7e9bd0aa31ba29f7e7be45eed2647c..869f36e70c48e80a0606d156f33fe05c
PictureInPictureOcclusionTracker*
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index c42e2b6a1e83e2d0036f3e7d30a79be7bea544c7..ca4423835a2689e3265777ccc7013991e7d6dc85 100644
index 996f6f99f722683428ea4ff5aef9cdc5d396af2c..f35c07ec123f4e3a5883999f7e0d81cd9d88e1c0 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -430,11 +430,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(

Просмотреть файл

@ -9,10 +9,10 @@ focus node change via TextInputManager.
chromium-bug: https://crbug.com/1369605
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 50cac7b36d6e83dea6686636b5e7a2943c44ceac..8eb27f147c5dae05375c6cf8e1d5d2a79eac911c 100644
index 47d375776347948b08702b733f5a5d051d63c015..6929dcb6a77b914aabad16f36baac4ff8fdd61c4 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -3204,6 +3204,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
@@ -3212,6 +3212,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
}
}
@ -26,7 +26,7 @@ index 50cac7b36d6e83dea6686636b5e7a2943c44ceac..8eb27f147c5dae05375c6cf8e1d5d2a7
RenderWidgetHostViewAura* popup_child_host_view) {
popup_child_host_view_ = popup_child_host_view;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 564a8708abecbbe122016bd8b46bf2957d5f9107..f3636d6fd36420832c4bcbe20e5eab1a2a104136 100644
index 5410c9d207bad1da2f733e153630400f50642617..1696658f38b965f69146c76c7f48d04a15a2cc8d 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -651,6 +651,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
@ -87,10 +87,10 @@ index 51522e60d6dc14f1113cc438558b6b393c3fe73a..153ed02f493a83ef9ca354cc18736f93
// The view with active text input state, i.e., a focused <input> element.
// It will be nullptr if no such view exists. Note that the active view
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index deb9bedb4a7a699807f2c5fabae6c4b90a141a4f..a81cb902e77e1246b7a1d190e89b2da02952abf9 100644
index 5511e34ec19a1adf99086a33930ae0266b7b8099..e0dbe46268a7dfeb9d496e7436bf1e474855bbda 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -9547,7 +9547,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -9658,7 +9658,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame);
RenderWidgetHostViewBase* root_view =

Просмотреть файл

@ -1,36 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Pichli=C5=84ski?=
<michal.pichlinski@openfin.co>
Date: Tue, 29 Oct 2024 21:16:29 +0100
Subject: fix: Put NSVisualEffectView before ViewsCompositorSuperview
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/6030552
Otherwise when using `vibrancy` in `BrowserWindow` NSVisualEffectView
will hide content displayed by the compositor.
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 07c3997e6565cf77362ee73959c4d21da4fefe96..3353a7847df90b58eec34ea4d6ff8fb19617f5cc 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
@@ -223,8 +223,19 @@ NSComparisonResult SubviewSorter(__kindof NSView* lhs,
void* rank_as_void) {
DCHECK_NE(lhs, rhs);
- if ([lhs isKindOfClass:[ViewsCompositorSuperview class]])
+
+ // Put NSVisualEffectView before ViewsCompositorSuperview otherwise when using
+ // `vibrancy` in `BrowserWindow` NSVisualEffectView will hide content
+ // displayed by the compositor.
+ if ([lhs isKindOfClass:[NSVisualEffectView class]]) {
return NSOrderedAscending;
+ }
+ if ([lhs isKindOfClass:[ViewsCompositorSuperview class]]) {
+ if ([rhs isKindOfClass:[NSVisualEffectView class]]) {
+ return NSOrderedDescending;
+ }
+ return NSOrderedAscending;
+ }
const RankMap* rank = static_cast<const RankMap*>(rank_as_void);
auto left_rank = rank->find(lhs);

Просмотреть файл

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

Просмотреть файл

@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
vs mobile runtimes. i.e. restore the old logic only on desktop platforms
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 99cbf072fda079c440114f0b58080f50698538f3..377cd5cca2a95f1f3cc1197ba891795d6e588811 100644
index 65978e2ebbd31ee9b735a689c751681c155833e7..3abe6e0fdd326e268ace85a520118239fb8fee42 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2079,9 +2079,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
@@ -2074,9 +2074,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
// The resize message (which may not happen immediately) will carry with it
// the screen info as well as the new size (if the screen has changed scale

Просмотреть файл

@ -64,10 +64,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..7a985067b1371604644d48159f2f5aa7
#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 d43ee5ce7695a7c41cc4f8dc96e066422553b1dd..513d09d8e3a8adca46d30db68ff33e380f7987e8 100644
index c87ebb8fb68dc8355c37066002148dc67fe9089f..a5e20c62e921bff41d3e17c734c1dc78647b0854 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3138,6 +3138,7 @@ void LocalFrame::RequestExecuteScript(
@@ -3136,6 +3136,7 @@ void LocalFrame::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@ -75,7 +75,7 @@ index d43ee5ce7695a7c41cc4f8dc96e066422553b1dd..513d09d8e3a8adca46d30db68ff33e38
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::WantResultOption want_result_option,
mojom::blink::PromiseResultOption promise_behavior) {
@@ -3170,7 +3171,7 @@ void LocalFrame::RequestExecuteScript(
@@ -3168,7 +3169,7 @@ void LocalFrame::RequestExecuteScript(
PausableScriptExecutor::CreateAndRun(
script_state, std::move(script_sources), execute_script_policy,
user_gesture, evaluation_timing, blocking_option, want_result_option,
@ -85,10 +85,10 @@ index d43ee5ce7695a7c41cc4f8dc96e066422553b1dd..513d09d8e3a8adca46d30db68ff33e38
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index af3627cbc41dec055033dc433a68959483306bb6..ce55bb0104b264409dc4d402681718c3c5750b47 100644
index d98eeebb3fff2f803e025ee8f2c30e9b749831b0..f638c1b56b3568dbc438440363505f860471afb0 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -825,6 +825,7 @@ class CORE_EXPORT LocalFrame final
@@ -824,6 +824,7 @@ class CORE_EXPORT LocalFrame final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
@ -216,7 +216,7 @@ index 0f1842e750c1609c3d579ebfcb4512f7be91eebb..92e8d59d5cff55e1e9a3e2e35e7e2706
mojom::blink::WantResultOption::kWantResult, wait_for_promise);
}
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index d2f653fbfd11300ddd2cd5199fe46cd97829ff4d..de09672be6b9cf09f1ed5b5d71838ad6cad65dce 100644
index 82bc2805e99e127925896e26df573849a2a6cf5a..29da5fa351b900595a6f200e4a8b04d52841d825 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -1097,14 +1097,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@ -238,7 +238,7 @@ index d2f653fbfd11300ddd2cd5199fe46cd97829ff4d..de09672be6b9cf09f1ed5b5d71838ad6
bool WebLocalFrameImpl::IsInspectorConnected() {
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index 237de9996f9f9e17736f61470d1420d91267088d..c5b2599f6e6f18f75c1491520e33b540a04c2898 100644
index cbbfad651e8743435793acb4cec46fc070fcbb7a..a169f4643d36bd98f836db6abf4bffaca7977f2c 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -198,6 +198,7 @@ class CORE_EXPORT WebLocalFrameImpl final

Просмотреть файл

@ -6,10 +6,10 @@ 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 68d61ad5c27a84e6fcb5b8eabf332eca924b89c1..6c76aa9634024f9d5e63ac0a9ac359cfc5da59ed 100644
index a7d34a7deae73c7e69b765568e4b48498ab9ed79..979b56aac6d1b272e573a23723ca81f7d7cff078 100644
--- a/ui/views/controls/menu/menu_controller.cc
+++ b/ui/views/controls/menu/menu_controller.cc
@@ -699,6 +699,14 @@ void MenuController::Run(Widget* parent,
@@ -701,6 +701,14 @@ void MenuController::Run(Widget* parent,
SetSelection(root, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
}
@ -24,7 +24,7 @@ index 68d61ad5c27a84e6fcb5b8eabf332eca924b89c1..6c76aa9634024f9d5e63ac0a9ac359cf
if (button_controller) {
pressed_lock_ = button_controller->TakeLock(
false, ui::LocatedEvent::FromIfValid(event));
@@ -2405,19 +2413,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2407,19 +2415,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
}
item->GetSubmenu()->ShowAt(params);

Просмотреть файл

@ -15,7 +15,7 @@ capturer was window or screen-specific, as the IDs remain valid for
generic capturer as well.
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc
index 3ba87e581e39253b483c977367eaba05c866ad55..835c1e860501bcc8cb7c7dfe192c113de3d623ff 100644
index 60eabf1a69089049d4cddb81f87efca4f096a3b6..6618477648b7148ba66f5bb695be8eb6da045849 100644
--- a/content/browser/media/capture/desktop_capture_device.cc
+++ b/content/browser/media/capture/desktop_capture_device.cc
@@ -811,8 +811,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(

Просмотреть файл

@ -6,7 +6,7 @@ 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 d010f86a3304b950e456cf83bdd6c281e3311a88..a92056e3e5588f4d57358cdee2ac6341e97ff691 100644
index 85216c18185015b810031d51a86259ced47c677b..541e7343ec78ed51b0f20abd28764c3e8c49e01b 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -4690,6 +4690,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@ -20,10 +20,10 @@ index d010f86a3304b950e456cf83bdd6c281e3311a88..a92056e3e5588f4d57358cdee2ac6341
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 87388bf398413d963a4902bfbd43e6509982fb33..8b2eb6d12c9d7d03169a96f32a60214bcfbc25e0 100644
index e2381c3627b7c60db0064069d9cc18e7dabd6545..9f034cc522859d5ae8b699fe239382562d78d242 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -340,6 +340,11 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -342,6 +342,11 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual ~ContentBrowserClient() = default;

Просмотреть файл

@ -7,29 +7,32 @@ 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 f545367721e4a96c4c72828b96c3a2360f9fd6a7..38cedeac0ab48d0cc4f7b331c6ecfbbf1d4d00ed 100644
index 1ec03c80cfee5fc427fad846a4df41b98698961c..1bed0865ba952b611985d41b742274861926925d 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -154,9 +154,10 @@ void IsolateHolder::Initialize(ScriptMode mode,
const intptr_t* reference_table,
const std::string js_command_line_flags,
@@ -155,11 +155,13 @@ void IsolateHolder::Initialize(ScriptMode mode,
std::string js_command_line_flags,
bool disallow_v8_feature_flag_overrides,
v8::FatalErrorCallback fatal_error_callback,
- v8::OOMErrorCallback oom_error_callback) {
+ v8::OOMErrorCallback oom_error_callback,
+ bool create_v8_platform) {
CHECK(allocator);
- V8Initializer::Initialize(mode, js_command_line_flags, oom_error_callback);
+ V8Initializer::Initialize(mode, js_command_line_flags, oom_error_callback, create_v8_platform);
V8Initializer::Initialize(mode, js_command_line_flags,
disallow_v8_feature_flag_overrides,
- oom_error_callback);
+ oom_error_callback,
+ create_v8_platform);
g_array_buffer_allocator = allocator;
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 7053a5619c6ff6bced75572d7a3336f532b8bb81..89bbc161b99846c1f9e9585e98dd90568187f902 100644
index cb4517de39b2ca7b32db557c6d3dd0227ba5b4c2..d1d178de28c7d46db1c96ba321070612ef5812e1 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -117,7 +117,8 @@ class GIN_EXPORT IsolateHolder {
const intptr_t* reference_table = nullptr,
const std::string js_command_line_flags = {},
@@ -118,7 +118,8 @@ class GIN_EXPORT IsolateHolder {
std::string js_command_line_flags = {},
bool disallow_v8_feature_flag_overrides = false,
v8::FatalErrorCallback fatal_error_callback = nullptr,
- v8::OOMErrorCallback oom_error_callback = nullptr);
+ v8::OOMErrorCallback oom_error_callback = nullptr,
@ -38,21 +41,21 @@ index 7053a5619c6ff6bced75572d7a3336f532b8bb81..89bbc161b99846c1f9e9585e98dd9056
// Returns whether `Initialize` has already been invoked in the process.
// Initialization is a one-way operation (i.e., this method cannot return
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 39c71434bbb82d20e53acd041d289a845bf2ac3e..587dcfb97712aa6422ac01625a81e6c59c84ac2f 100644
index b6799720cad84282c5c4586adaf263689fd30bbb..59abc24988ab4d194461a3ca4f4b2bb68395bada 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -541,7 +541,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
// static
@@ -547,7 +547,8 @@ void SetFeatureFlags() {
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
const std::string& js_command_line_flags,
bool disallow_v8_feature_flag_overrides,
- v8::OOMErrorCallback oom_error_callback) {
+ v8::OOMErrorCallback oom_error_callback,
+ bool create_v8_platform) {
static bool v8_is_initialized = false;
if (v8_is_initialized)
return;
@@ -551,7 +552,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
// See https://crbug.com/v8/11043
@@ -561,7 +562,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
}
SetFlags(mode, js_command_line_flags);
- v8::V8::InitializePlatform(V8Platform::Get());
@ -62,15 +65,15 @@ index 39c71434bbb82d20e53acd041d289a845bf2ac3e..587dcfb97712aa6422ac01625a81e6c5
// Set this as early as possible in order to ensure OOM errors are reported
// correctly.
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
index 74e25c98d723e35c53f38548fa9b5ade363eeb46..cd7b010978f3f595263761e0692945667b9b3f89 100644
index 1341b77198431e1c426bff043bdb2bbcf202c8ca..ec64afd9dd91b292604ca834a91b9cfbd52eb853 100644
--- a/gin/v8_initializer.h
+++ b/gin/v8_initializer.h
@@ -31,7 +31,8 @@ class GIN_EXPORT V8Initializer {
// This should be called by IsolateHolder::Initialize().
@@ -32,7 +32,8 @@ class GIN_EXPORT V8Initializer {
static void Initialize(IsolateHolder::ScriptMode mode,
const std::string& js_command_line_flags = {},
- v8::OOMErrorCallback oom_error_callback = nullptr);
+ v8::OOMErrorCallback oom_error_callback = nullptr,
const std::string& js_command_line_flags,
bool disallow_v8_feature_flag_overrides,
- v8::OOMErrorCallback oom_error_callback);
+ v8::OOMErrorCallback oom_error_callback,
+ bool create_v8_platform = true);
// Get address and size information for currently loaded snapshot.

Просмотреть файл

@ -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 c460dc28021e84cc84309b5973c41bd6f362f319..c5d9c5e1d4985f94e5b503c29e2c820a6b67150d 100644
index fea8b86cae0b505c931190842da4db0467dfa464..cdb4946fb8fe90f334734d72db3b87e258da81c9 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1415,6 +1415,11 @@
@@ -1440,6 +1440,11 @@
"<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
"META": {"sizes": {"messages": [2000],}},
"messages": [10080],

Просмотреть файл

@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index eee582f16376a073dfca570aac7a37e26b7a5232..5237b3f79431432f2b6c73a4064fc64ef04e1ff5 100755
index 8e35b70e0aa6bcbc9ba97393da166541a8e93c1c..5eec04d3758b6ec2f324aeac90d84f1b1c50e97e 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -304,6 +304,8 @@ def GetDefaultHostOs():

Просмотреть файл

@ -15,7 +15,7 @@ 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 38cedeac0ab48d0cc4f7b331c6ecfbbf1d4d00ed..e5ee2c6b3cb787ff9f8272d4344a1e18c44971e2 100644
index 1bed0865ba952b611985d41b742274861926925d..2be37976a1305f1deed561b3b829dbb5d7ae85e7 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -76,7 +76,8 @@ IsolateHolder::IsolateHolder(
@ -58,7 +58,7 @@ index 38cedeac0ab48d0cc4f7b331c6ecfbbf1d4d00ed..e5ee2c6b3cb787ff9f8272d4344a1e18
isolate_, allocator, access_mode_, task_runner,
std::move(user_visible_task_runner), std::move(best_effort_task_runner));
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index 89bbc161b99846c1f9e9585e98dd90568187f902..c22b0a7f9af621573e888a518ccdc22293ce07ef 100644
index d1d178de28c7d46db1c96ba321070612ef5812e1..52b8c1af58678b9fee684ff75340c98fcc73b552 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -87,7 +87,8 @@ class GIN_EXPORT IsolateHolder {

Просмотреть файл

@ -9,10 +9,10 @@ but due to the nature of electron, we need to load the v8 snapshot
in the browser process.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 8c20f50669a20dd7e3c0592bce3f5bfd2a29e960..9078848b53976b7f63bb08140da942d66bd424ca 100644
index 048398e75f78ca6bae0dca3553b69a61c7834178..460c1ac9484724605227553fe2ef3ea441857db7 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -294,11 +294,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
@@ -290,11 +290,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
const std::string& process_type) {

Просмотреть файл

@ -35,10 +35,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority.
diff --git a/base/BUILD.gn b/base/BUILD.gn
index a3adebbb867322d4f9371e55c3ee6e080fb2228c..0df9633a837c2353fc6e481e47b342432a019850 100644
index 99d5767a59455484f9c5c058e216654ad7780aac..5df91947dac1c23d3153d4b0b5aab3d735aa1ab5 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1028,6 +1028,7 @@ component("base") {
@@ -1031,6 +1031,7 @@ component("base") {
"//build:ios_buildflags",
"//build/config/compiler:compiler_buildflags",
"//third_party/modp_b64",
@ -81,7 +81,7 @@ index 4bf9a3c27e05c6635b2beb8e880b5b43dbed61b5..f328fbb49c45991f44a9c75325491d08
} // namespace base
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
index 697eff8aad0142ce0537feec816f9b31fd767061..504a3cba21622b8d79bf6563f3a009c47b093d50 100644
index 1baeaec5125bbdc19dccbd18c8702f291ccc71ba..613c644eda45c7e4bf1a7a06dad6d8b4b85daa11 100644
--- a/base/process/launch_mac.cc
+++ b/base/process/launch_mac.cc
@@ -21,13 +21,19 @@
@ -174,22 +174,23 @@ index 94a028be3c315edc0056408ab9ab41b6b001a1c1..abf9003bc71506d389ff77dc708c8971
} // namespace base
diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn
index c85da95a847384311429febab48fd10c8f8e68f4..d3b18d08a74e88929066fc5156bbf72b3b443950 100644
index bfb0d2f208170f77df96fb9f14c8525e9dec6e11..e234d95a862198148bae97b4b276d93922f3ca92 100644
--- a/components/os_crypt/sync/BUILD.gn
+++ b/components/os_crypt/sync/BUILD.gn
@@ -47,6 +47,7 @@ component("os_crypt") {
@@ -43,6 +43,8 @@ component("os_crypt") {
"os_crypt_mac.mm",
]
deps += [ "//crypto:mock_apple_keychain" ]
+ deps += ["//electron/build/config:generate_mas_config"]
}
if (is_win) {
+
} else if (is_win) {
sources += [ "os_crypt_win.cc" ]
deps += [ "//components/version_info" ]
diff --git a/components/os_crypt/sync/keychain_password_mac.mm b/components/os_crypt/sync/keychain_password_mac.mm
index ad374646d1a78f61d3924d6d9bb1144c57b7be98..a7fa25575be84d1dabb04bdc458e2a6d4358ddc1 100644
index d87682447b850e4cf9065f0d26d14077acbe467d..a179c9bc02158130f4b15bf8022721f4b53a8303 100644
--- a/components/os_crypt/sync/keychain_password_mac.mm
+++ b/components/os_crypt/sync/keychain_password_mac.mm
@@ -15,6 +15,7 @@
@@ -14,6 +14,7 @@
#include "base/rand_util.h"
#include "build/branding_buildflags.h"
#include "crypto/apple_keychain.h"
@ -335,7 +336,7 @@ index 3a815ebf505bd95fa7f6b61ba433d98fbfe20225..149de0175c2ec0e41e3ba40caad7019c
+
@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 945b01f2132547fa0f6a97ee4895994c500d1410..864f93f7c4159abc63e1535195fbf9d112558b91 100644
index d55914779bc097cab8afb144f2c47c001bfa7350..e55db3f550b4c082aa087fbcab6760da237f8471 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
@@ -9,6 +9,7 @@
@ -363,7 +364,7 @@ index 945b01f2132547fa0f6a97ee4895994c500d1410..864f93f7c4159abc63e1535195fbf9d1
// 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 4f875587289f19b06041c5e8a7f76ab9cba169c9..952febab99656f59efee8c0d267d8f76f9943197 100644
index 2eba7ccc91d7689d48cd990635718bec4e3dc69c..5373ee02934f706386d3dd7c863766a6a7e8cc86 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
@@ -26,6 +26,7 @@
@ -393,7 +394,7 @@ index 4f875587289f19b06041c5e8a7f76ab9cba169c9..952febab99656f59efee8c0d267d8f76
- (BOOL)hasKeyAppearance;
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
- (BOOL)_isConsideredOpenForPersistentState;
@@ -157,6 +162,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
@@ -158,6 +163,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
}
@end
@ -402,7 +403,7 @@ index 4f875587289f19b06041c5e8a7f76ab9cba169c9..952febab99656f59efee8c0d267d8f76
@implementation NativeWidgetMacNSWindowTitledFrame
- (void)mouseDown:(NSEvent*)event {
if (self.window.isMovable)
@@ -184,6 +191,8 @@ - (BOOL)usesCustomDrawing {
@@ -185,6 +192,8 @@ - (BOOL)usesCustomDrawing {
}
@end
@ -411,7 +412,7 @@ index 4f875587289f19b06041c5e8a7f76ab9cba169c9..952febab99656f59efee8c0d267d8f76
@implementation NativeWidgetMacNSWindow {
@private
CommandDispatcher* __strong _commandDispatcher;
@@ -380,6 +389,8 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -382,6 +391,8 @@ - (NSAccessibilityRole)accessibilityRole {
// NSWindow overrides.
@ -420,7 +421,7 @@ index 4f875587289f19b06041c5e8a7f76ab9cba169c9..952febab99656f59efee8c0d267d8f76
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
if (windowStyle & NSWindowStyleMaskTitled) {
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
@@ -391,6 +402,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
@@ -393,6 +404,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
return [super frameViewClassForStyleMask:windowStyle];
}
@ -430,7 +431,7 @@ index 4f875587289f19b06041c5e8a7f76ab9cba169c9..952febab99656f59efee8c0d267d8f76
bool shouldShowWindowTitle = YES;
if (_bridge)
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 84fb8324e4d573528f675a1cc0f8b72596e7f02f..07c3997e6565cf77362ee73959c4d21da4fefe96 100644
index 3b8e96fbc7aa4cf1601230e81ff32cf9792be1da..6d8b41ffff28200daec6d554a5b7f1c792693105 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
@@ -41,6 +41,7 @@
@ -441,7 +442,7 @@ index 84fb8324e4d573528f675a1cc0f8b72596e7f02f..07c3997e6565cf77362ee73959c4d21d
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "net/cert/x509_util_apple.h"
#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
@@ -655,10 +656,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -665,10 +666,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
// this should be treated as an error and caught early.
CHECK(bridged_view_);
@ -455,10 +456,10 @@ index 84fb8324e4d573528f675a1cc0f8b72596e7f02f..07c3997e6565cf77362ee73959c4d21d
// Beware: This view was briefly removed (in favor of a bare CALayer) in
// https://crrev.com/c/1236675. The ordering of unassociated layers relative
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 51ef96b33691fc642037ca951eb345200fff36e2..664df443242ae9af565cc83786398d68e6d655c4 100644
index f43d8a8803b801c116fe3cea31839caddf57da28..8720a29e13ce052db99a6fb7925efd4b43472b9a 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -381,6 +381,7 @@ viz_component("service") {
@@ -378,6 +378,7 @@ viz_component("service") {
"frame_sinks/external_begin_frame_source_mac.h",
]
}
@ -466,7 +467,7 @@ index 51ef96b33691fc642037ca951eb345200fff36e2..664df443242ae9af565cc83786398d68
}
if (is_android || use_ozone) {
@@ -662,6 +663,7 @@ viz_source_set("unit_tests") {
@@ -676,6 +677,7 @@ viz_source_set("unit_tests") {
"display_embedder/software_output_device_mac_unittest.mm",
]
frameworks = [ "IOSurface.framework" ]
@ -526,7 +527,7 @@ index dbf334caa3a6d10017b69ad76802e389a011436b..da828823e8195cc9e497866363c9af93
void ForwardKeyboardEvent(const input::NativeWebKeyboardEvent& key_event,
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index faddee802d6538c092ba96914184663ee57751c8..49238975848d58cd30727ec818bbac52a838f10c 100644
index 038646bfa3ac442c64380a81bdb1d3043e50c107..33f2bcae6353a527710f05aa03770136e6039449 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -35,6 +35,7 @@
@ -560,7 +561,7 @@ index faddee802d6538c092ba96914184663ee57751c8..49238975848d58cd30727ec818bbac52
return kAttributes;
}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index fdf953e7e2e8e37658b9e780982d3b63c87dd206..80aa68aef42c4a8511824f30f641689636acf446 100644
index 8a48699a703acd019a57916058bdd99a223306ff..6d2d9a41cfb20e469b33b9039b7ef7c293a5a400 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -327,6 +327,7 @@ source_set("browser") {
@ -572,7 +573,7 @@ index fdf953e7e2e8e37658b9e780982d3b63c87dd206..80aa68aef42c4a8511824f30f6416896
public_deps = [
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 2285564db47ef15eb9a83affd1e481b5671c3940..cf5e79a5540d8208c34579d7e8b5a5715abb1beb 100644
index bea4e26ef8577e8e8bc60287cf1b94c7dfcc9478..eed42b0cbc3422b7fd59ae1b2550c53d6c92c9e3 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -23,6 +23,7 @@
@ -593,7 +594,7 @@ index 2285564db47ef15eb9a83affd1e481b5671c3940..cf5e79a5540d8208c34579d7e8b5a571
@class RenderWidgetHostViewCocoa;
namespace content {
@@ -684,9 +687,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
@@ -691,9 +694,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// EnsureSurfaceSynchronizedForWebTest().
uint32_t latest_capture_sequence_number_ = 0u;
@ -606,7 +607,7 @@ index 2285564db47ef15eb9a83affd1e481b5671c3940..cf5e79a5540d8208c34579d7e8b5a571
// 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 8f1cdd296e5477ddd8a176d5aad7d05888729a45..2d06056f1e51ce76398168254152ccc04e596192 100644
index 9185fd223c9611faee546570c0df36bc94cdb28c..86886e94e9e2c52e297a82175f6071852e792148 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -48,6 +48,7 @@
@ -628,7 +629,7 @@ index 8f1cdd296e5477ddd8a176d5aad7d05888729a45..2d06056f1e51ce76398168254152ccc0
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
// pointers. `ns_view_` gets reinitialized later in this method.
@@ -1636,8 +1639,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1616,8 +1619,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@ -639,7 +640,7 @@ index 8f1cdd296e5477ddd8a176d5aad7d05888729a45..2d06056f1e51ce76398168254152ccc0
return [GetInProcessNSView() window];
}
@@ -1686,9 +1691,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1666,9 +1671,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@ -651,7 +652,7 @@ index 8f1cdd296e5477ddd8a176d5aad7d05888729a45..2d06056f1e51ce76398168254152ccc0
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -2215,20 +2222,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -2195,20 +2202,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken(
GetRenderWidgetAccessibilityTokenCallback callback) {
base::ProcessId pid = getpid();
@ -679,7 +680,7 @@ index 8f1cdd296e5477ddd8a176d5aad7d05888729a45..2d06056f1e51ce76398168254152ccc0
///////////////////////////////////////////////////////////////////////////////
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
index 059a2c0b563ed90f11b5ff8ab02324bdb836007e..da0ef200767b4839c583c684d02e1d25905597cd 100644
index 804e0934004a465b610fb9b83692adea15808d87..486dffeffc1637af3a4eba4d037e71628573c6ac 100644
--- a/content/common/BUILD.gn
+++ b/content/common/BUILD.gn
@@ -285,6 +285,7 @@ source_set("common") {
@ -691,10 +692,10 @@ index 059a2c0b563ed90f11b5ff8ab02324bdb836007e..da0ef200767b4839c583c684d02e1d25
defines = []
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index 4e886e0444991ae26163d53ebc1a0b9c18b7e496..9dcda56933881bcfc3f088e0606fadf9f83c2714 100644
index 9c312682be17f1add7e9aa56772c3e1a2e22f98b..5f4362d3c717f24f787ab9298d4f5103442f3073 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -327,6 +327,7 @@ target(link_target_type, "renderer") {
@@ -329,6 +329,7 @@ target(link_target_type, "renderer") {
"//ui/surface",
"//url",
"//v8",
@ -773,10 +774,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
} // namespace content
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 691f31285c50b9d4a1f1d4a13e8bd7fe4c22d439..55ec43993e3ee2e962901c671b3ea74657422bff 100644
index 23858defb34c7f40458b5ec6da337b95cdeb347f..08097629fbcd4e30860157523d91d0cf069b1f9a 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -642,6 +642,7 @@ static_library("test_support") {
@@ -647,6 +647,7 @@ static_library("test_support") {
"//url",
"//url/mojom:url_mojom_gurl",
"//v8",
@ -792,7 +793,7 @@ index 691f31285c50b9d4a1f1d4a13e8bd7fe4c22d439..55ec43993e3ee2e962901c671b3ea746
}
mojom("content_test_mojo_bindings") {
@@ -1936,6 +1938,7 @@ test("content_browsertests") {
@@ -1912,6 +1914,7 @@ test("content_browsertests") {
"//ui/shell_dialogs",
"//ui/snapshot",
"//ui/webui:test_support",
@ -800,7 +801,7 @@ index 691f31285c50b9d4a1f1d4a13e8bd7fe4c22d439..55ec43993e3ee2e962901c671b3ea746
]
if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
@@ -3231,6 +3234,7 @@ test("content_unittests") {
@@ -3196,6 +3199,7 @@ test("content_unittests") {
"//ui/latency:test_support",
"//ui/shell_dialogs:shell_dialogs",
"//ui/webui:test_support",
@ -1373,7 +1374,7 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..9921ccb10d3455600eddd85f77f10228
} // namespace sandbox
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
index 2bb0f07955ab848241d03551d218b7d667cd960f..d5e2856bda37bb6cb1f958fadee41047888c20d8 100644
index af37f79916034980172a94f585ccc9458060c21c..f4838163122b2daf765380d92d2982227688e369 100644
--- a/third_party/blink/renderer/core/BUILD.gn
+++ b/third_party/blink/renderer/core/BUILD.gn
@@ -409,6 +409,7 @@ component("core") {
@ -1615,7 +1616,7 @@ index c8171f0527fe5194f0ea73b57c4444d4c630fbc4..c2ac4da580e3e7f749a0a4de1e859af6
// Accessible object
if (AXElementWrapper::IsValidElement(value)) {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 9e7e6095f30b12dde1a89b153a355225f1dd8d97..0c6da25be3c18c142027aa48cea4d5caed69a322 100644
index 90762aa4f4edcb2f965bdb48c72e4d19a0b49ba6..d4c8463a43c6f693f3646fe88aeda653ae389d05 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -362,6 +362,13 @@ component("base") {
@ -1840,10 +1841,10 @@ index fe3f85073e31de487a08e57d7f9b07aa4eccf8f3..cf5b07203c8bd559a404600cc98cc8ec
// enough.
return PlatformFontMac::SystemFontType::kGeneral;
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
index 469c6beaa15995c4832d4f54c333cb4de6450b27..8b262cccfc27ac4b91d27a200191f65cf24c380b 100644
index 94afec13361d4ee8d0441da3cbe37d62e287c94b..fd13add3291b113dc57c69700f35ac9943124786 100644
--- a/ui/views/BUILD.gn
+++ b/ui/views/BUILD.gn
@@ -715,6 +715,8 @@ component("views") {
@@ -718,6 +718,8 @@ component("views") {
"IOSurface.framework",
"QuartzCore.framework",
]
@ -1852,7 +1853,7 @@ index 469c6beaa15995c4832d4f54c333cb4de6450b27..8b262cccfc27ac4b91d27a200191f65c
}
if (is_win) {
@@ -1132,6 +1134,8 @@ source_set("test_support") {
@@ -1135,6 +1137,8 @@ source_set("test_support") {
"//ui/base/mojom:ui_base_types",
]

Просмотреть файл

@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement
session.setCertificateVerifyCallback.
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 8d2e38ac65ca8f21907021e64701671965bd37fe..999c1daf2d4743cd9c67d716fbae762e76075d73 100644
index c7d30f24e077ca6da38c84623efd02b84f063541..1605a5d30f0e1db8e095ce325313a526d76678f2 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -158,6 +158,11 @@
@@ -159,6 +159,11 @@
#include "services/network/web_transport.h"
#include "url/gurl.h"
@ -22,7 +22,7 @@ index 8d2e38ac65ca8f21907021e64701671965bd37fe..999c1daf2d4743cd9c67d716fbae762e
#if BUILDFLAG(IS_CT_SUPPORTED)
// gn check does not account for BUILDFLAG(). So, for iOS builds, it will
// complain about a missing dependency on the target exposing this header. Add a
@@ -602,6 +607,99 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) {
@@ -599,6 +604,99 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) {
} // namespace
@ -122,7 +122,7 @@ index 8d2e38ac65ca8f21907021e64701671965bd37fe..999c1daf2d4743cd9c67d716fbae762e
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::NetworkContextHttpAuthPreferences::
@@ -998,6 +1096,13 @@ void NetworkContext::SetClient(
@@ -995,6 +1093,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@ -136,10 +136,11 @@ index 8d2e38ac65ca8f21907021e64701671965bd37fe..999c1daf2d4743cd9c67d716fbae762e
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -2567,6 +2672,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
std::move(cert_verifier));
cert_verifier = std::move(cert_verifier_with_trust_anchors);
#endif // BUILDFLAG(IS_CHROMEOS)
@@ -2561,6 +2666,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
cert_verifier = std::make_unique<net::CachingCertVerifier>(
std::make_unique<net::CoalescingCertVerifier>(
std::move(cert_verifier)));
+
+ auto remote_cert_verifier = std::make_unique<RemoteCertVerifier>(std::move(cert_verifier));
+ remote_cert_verifier_ = remote_cert_verifier.get();
+ cert_verifier = std::make_unique<net::CachingCertVerifier>(std::move(remote_cert_verifier));
@ -147,7 +148,7 @@ index 8d2e38ac65ca8f21907021e64701671965bd37fe..999c1daf2d4743cd9c67d716fbae762e
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 48ca96ecb24ad4eb140b44ce2459f8e0cacfb39f..15065587ab034faf47f6b31482a8eb52ba8de633 100644
index 34e2a5d2a66dbae4d589dc5a526033481511ecd1..e4e0962ac9d98899c332a954184f1bcc970a5d58 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -113,6 +113,7 @@ class URLMatcher;
@ -167,7 +168,7 @@ index 48ca96ecb24ad4eb140b44ce2459f8e0cacfb39f..15065587ab034faf47f6b31482a8eb52
void ResetURLLoaderFactories() override;
void GetViaObliviousHttp(
mojom::ObliviousHttpRequestPtr request,
@@ -936,6 +939,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -932,6 +935,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::vector<base::OnceClosure> dismount_closures_;
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
@ -177,10 +178,10 @@ index 48ca96ecb24ad4eb140b44ce2459f8e0cacfb39f..15065587ab034faf47f6b31482a8eb52
std::unique_ptr<HostResolver> internal_host_resolver_;
std::set<std::unique_ptr<HostResolver>, base::UniquePtrComparator>
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 18a544729bbe5086469bf79b5d90b79ca4ad5c58..9bea63a5d08d80911385282a57f59f0322273d73 100644
index b18f61d7261e22627a6fa2693849a6b392860965..1afd6b43182b54145e38898db16708b5d0b487ee 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -306,6 +306,17 @@ struct SocketBrokerRemotes {
@@ -307,6 +307,17 @@ struct SocketBrokerRemotes {
pending_remote<SocketBroker> server;
};
@ -198,7 +199,7 @@ index 18a544729bbe5086469bf79b5d90b79ca4ad5c58..9bea63a5d08d80911385282a57f59f03
// Parameters for constructing a network context.
struct NetworkContextParams {
// The user agent string.
@@ -934,6 +945,9 @@ interface NetworkContext {
@@ -943,6 +954,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

Просмотреть файл

@ -7,10 +7,10 @@ Pass RenderFrameHost through to PlatformNotificationService
so Electron can identify which renderer a notification came from.
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index df1fb67901e872feef2602a0d8df5ec2c1984a43..08455c3d811fe1d51e15846dc6a68385f344d5aa 100644
index 467093a364a78994b9f238d1d402c5cd1a585cd8..26302de0d7076615f8aefb36cdf599cbf9e8d10b 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -221,6 +221,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
@@ -239,6 +239,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
// TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close)
void PlatformNotificationServiceImpl::DisplayNotification(
@ -19,7 +19,7 @@ index df1fb67901e872feef2602a0d8df5ec2c1984a43..08455c3d811fe1d51e15846dc6a68385
const GURL& origin,
const GURL& document_url,
diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h
index e76c702ed12cbc51a418ec8056abbd33b371bfb9..ead485e17a27ec0654cd681b988530286b327938 100644
index 178afda936a25643320b6e36a0497cbfbc370770..1a795c5059b3e41539c1f34a8d2ad23a28247cd6 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.h
+++ b/chrome/browser/notifications/platform_notification_service_impl.h
@@ -57,6 +57,7 @@ class PlatformNotificationServiceImpl
@ -133,10 +133,10 @@ index 05d3a12dd84c7005d46cc73b312f97ef418d96f5..4765de982802541b3efc7211d106acc7
const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index bc2e3f9a2823dcce657ad13f09e8421c49fa7960..f2b5a9fbfc2a4bb4f9482fe64bf33fa9a739d5ce 100644
index 56765888c43ae4cd5da25d4447c6b74b542d8283..0358c48884b686e8d1da962c7d4e06e31de7bd8e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2110,7 +2110,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2142,7 +2142,7 @@ void RenderProcessHostImpl::CreateNotificationService(
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@ -145,7 +145,7 @@ index bc2e3f9a2823dcce657ad13f09e8421c49fa7960..f2b5a9fbfc2a4bb4f9482fe64bf33fa9
creator_type, std::move(receiver));
break;
}
@@ -2118,7 +2118,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2150,7 +2150,7 @@ void RenderProcessHostImpl::CreateNotificationService(
CHECK(rfh);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

Просмотреть файл

@ -36,10 +36,10 @@ index a7742298af440bf9f6bcfceb7a07a90f19ae8283..9d59397f2bed400e5131691778965ec1
Microsoft::WRL::ComPtr<ID3D11Texture2D> d3d11_texture;
diff --git a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
index 55756afa319d890d0776de40c0c747cccfcecf83..6291e6fad5dbcfebca4263147bed0cc85274d52f 100644
index 4f216eb88e51c929468abf52049524177c3f0bb3..e216283028864b48516f690209b0e6b03f02d11c 100644
--- a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
+++ b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc
@@ -193,7 +193,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
@@ -194,7 +194,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat(
bool FrameResources::Initialize() {
auto* context = pool_->GetContext();
@ -48,7 +48,7 @@ index 55756afa319d890d0776de40c0c747cccfcecf83..6291e6fad5dbcfebca4263147bed0cc8
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
gfx::BufferUsage::SCANOUT_VEA_CPU_READ
#else
@@ -207,6 +207,23 @@ bool FrameResources::Initialize() {
@@ -208,6 +208,23 @@ bool FrameResources::Initialize() {
const gfx::Size buffer_size_in_pixels =
GetBufferSizeInPixelsForVideoPixelFormat(format_, coded_size_);
@ -69,15 +69,15 @@ index 55756afa319d890d0776de40c0c747cccfcecf83..6291e6fad5dbcfebca4263147bed0cc8
+ }
+#endif
+
constexpr gpu::SharedImageUsageSet kSharedImageUsage =
gpu::SharedImageUsageSet usage =
#if BUILDFLAG(IS_MAC)
gpu::SHARED_IMAGE_USAGE_MACOS_VIDEO_TOOLBOX |
@@ -231,7 +248,7 @@ bool FrameResources::Initialize() {
@@ -248,7 +265,7 @@ bool FrameResources::Initialize() {
viz::GetSharedImageFormat(buffer_format);
shared_image_ =
- context->CreateSharedImage(buffer_size_in_pixels, kBufferUsage, si_format,
+ context->CreateSharedImage(buffer_size_in_pixels, buffer_usage, si_format,
color_space_, kSharedImageUsage, sync_token_);
color_space_, usage, sync_token_);
if (!shared_image_) {
DLOG(ERROR) << "Failed to allocate shared image for frame: coded_size="

Просмотреть файл

@ -10,10 +10,10 @@ an about:blank check to this area.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 81add87623c24f1be3cbde3dfdf10495c4de228b..4875f2ad33e9d30b39e1adcd2861c409a4e2d9b6 100644
index a482e46453f715a268293a1b6cb0d9958786305e..df38a82a5bac1b37ae93cec3bb1aa4290228706e 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -783,8 +783,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
@@ -785,8 +785,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
// TODO(crbug.com/40092527): Consider adding a separate boolean that
// tracks this instead of piggybacking `origin_calculation_debug_info`.
if (renderer_side_origin.opaque() &&

Просмотреть файл

@ -38,7 +38,7 @@ index 8168b4cfbafd42fa93a5aa9a3691c2552fabfb86..ba49212bd76d209f99c1cee649fc1466
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
kCloseButtonIconSize));
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index 103e7664e19875f69a16e061b1a0230a519daa86..c42e2b6a1e83e2d0036f3e7d30a79be7bea544c7 100644
index d1bfeca48574c54dfa19cee5ba718d34ce2adc50..996f6f99f722683428ea4ff5aef9cdc5d396af2c 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -18,9 +18,11 @@

Просмотреть файл

@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be
our autofill implementation to work like Chromium's.
diff --git a/ui/color/color_id.h b/ui/color/color_id.h
index 0826e03e5601e64368b7ea3b15f9f7aeb14d10be..b05f8d05bfa9fe4b3df55811644984aa09f0bf9b 100644
index 27eeedaf071213912a67852924e929f47588c1d2..390c2297f7af69e80c2dd1bf5bb03c68e376e5c0 100644
--- a/ui/color/color_id.h
+++ b/ui/color/color_id.h
@@ -405,6 +405,10 @@
@ -22,7 +22,7 @@ index 0826e03e5601e64368b7ea3b15f9f7aeb14d10be..b05f8d05bfa9fe4b3df55811644984aa
E_CPONLY(kColorSegmentedButtonBorder) \
E_CPONLY(kColorSegmentedButtonFocus) \
E_CPONLY(kColorSegmentedButtonForegroundChecked) \
@@ -511,6 +515,7 @@
@@ -512,6 +516,7 @@
E_CPONLY(kColorTreeNodeForeground) \
E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \

Просмотреть файл

@ -666,10 +666,10 @@ index 6809c4576c71bc1e1a6ad4e0a37707272a9a10f4..3aad10424a6a31dab2ca393d00149ec6
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 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8a81410fd 100644
index 2930f74f67e0a28b00bf691fc6fe3410e75c8440..101a71a76a84324c22c0474e74e5ea20e243570c 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -52,6 +52,7 @@
@@ -53,6 +53,7 @@
#include "printing/mojom/print.mojom.h"
#include "printing/page_number.h"
#include "printing/print_job_constants.h"
@ -677,7 +677,7 @@ index 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8
#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"
@@ -1227,14 +1228,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1223,14 +1224,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
}
print_in_progress_ = true;
@ -694,7 +694,7 @@ index 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8
if (!weak_this) {
return;
}
@@ -1265,12 +1266,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
@@ -1261,12 +1262,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
receivers_.Add(this, std::move(receiver));
}
@ -712,7 +712,7 @@ index 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) {
return;
@@ -1287,9 +1290,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
@@ -1283,9 +1286,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
is_loading_ = frame->WillPrintSoon();
if (is_loading_) {
@ -726,7 +726,7 @@ index 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8
SetupOnStopLoadingTimeout();
return;
}
@@ -1299,7 +1303,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
@@ -1295,7 +1299,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal(
// plugin node and print that instead.
auto plugin = delegate_->GetPdfElement(frame);
@ -735,7 +735,7 @@ index 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8
if (render_frame_gone_) {
return;
@@ -1455,6 +1459,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
@@ -1451,6 +1455,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
return;
@ -744,7 +744,7 @@ index 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8
print_preview_context_.OnPrintPreview();
#if BUILDFLAG(IS_CHROMEOS)
@@ -2062,17 +2068,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -2063,17 +2069,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@ -767,7 +767,7 @@ index 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8
DidFinishPrinting(PrintingResult::kFailPrintInit);
return;
}
@@ -2093,8 +2101,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -2094,8 +2102,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
print_pages_params_->params->print_scaling_option;
auto self = weak_ptr_factory_.GetWeakPtr();
@ -784,7 +784,7 @@ index 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8
// Check if `this` is still valid.
if (!self)
return;
@@ -2359,29 +2374,43 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -2363,29 +2378,43 @@ void PrintRenderFrameHelper::IPCProcessed() {
}
bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame,
@ -838,7 +838,7 @@ index 18a8d64167b66d0de67c0c89779af90814b827c6..52b95469f0392fbb108bef3f6d5ea0f8
}
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
index ce8ac0a7098c8cd6bc03738d03dffef6b5a34141..93fe9da2e5943876c22801e3934d695ee88c3ba3 100644
index 97cb6458bc9eec767db89b56abfc5f4b4136ff7b..d9a0b343158b8464b5c9aa8e0e655c0b6fb28b00 100644
--- a/components/printing/renderer/print_render_frame_helper.h
+++ b/components/printing/renderer/print_render_frame_helper.h
@@ -258,7 +258,7 @@ class PrintRenderFrameHelper
@ -870,7 +870,7 @@ index ce8ac0a7098c8cd6bc03738d03dffef6b5a34141..93fe9da2e5943876c22801e3934d695e
// Calculate number of pages in source document.
uint32_t CalculateNumberOfPages(blink::WebLocalFrame* frame,
@@ -633,7 +635,8 @@ class PrintRenderFrameHelper
@@ -637,7 +639,8 @@ class PrintRenderFrameHelper
};
void SetupOnStopLoadingTimeout();
@ -881,10 +881,10 @@ index ce8ac0a7098c8cd6bc03738d03dffef6b5a34141..93fe9da2e5943876c22801e3934d695e
ScriptingThrottler scripting_throttler_;
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 80aa68aef42c4a8511824f30f641689636acf446..80f8ec88683569ff7fd6a51b11e1a9de15527397 100644
index 6d2d9a41cfb20e469b33b9039b7ef7c293a5a400..ec7448edf585fb245651f52e1d2998b2ac0f80a1 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -3039,8 +3039,9 @@ source_set("browser") {
@@ -3068,8 +3068,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]

Просмотреть файл

@ -6,7 +6,7 @@ Subject: proxy_config_monitor.patch
Allow monitoring proxy config changes for a pref service.
diff --git a/chrome/browser/net/proxy_config_monitor.cc b/chrome/browser/net/proxy_config_monitor.cc
index ecc6f393533139045b9153c428bfb34a45e9c272..bb7725b920a95052e777e35b855b4b43991e1604 100644
index 1c1bce347bbebe0e1932d025f0cd3b773bdd1590..c541bc048d90021f9d4ffaff135e3320b77d8fe1 100644
--- a/chrome/browser/net/proxy_config_monitor.cc
+++ b/chrome/browser/net/proxy_config_monitor.cc
@@ -11,7 +11,9 @@
@ -21,7 +21,7 @@ index ecc6f393533139045b9153c428bfb34a45e9c272..bb7725b920a95052e777e35b855b4b43
#include "mojo/public/cpp/bindings/pending_remote.h"
@@ -21,12 +23,13 @@
#include "chrome/browser/ash/profiles/profile_helper.h"
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
#endif // BUILDFLAG(IS_CHROMEOS)
-#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if 0

Просмотреть файл

@ -30,10 +30,10 @@ index 6469dd594bb984ba4cd8c1464e7891396a35d8b3..6af0932ff13b2223d2177a4f13bf4e41
// RenderWidgetHost on the primary main frame, and false otherwise.
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 6dac8bda9b799b2d20f7fa45d7323204b28631e1..99cbf072fda079c440114f0b58080f50698538f3 100644
index 7c6752807590bc0f168820d0d9d8d3277ca9713d..65978e2ebbd31ee9b735a689c751681c155833e7 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2013,6 +2013,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
@@ -2008,6 +2008,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_) {
view_->UpdateCursor(cursor);
}
@ -44,10 +44,10 @@ index 6dac8bda9b799b2d20f7fa45d7323204b28631e1..99cbf072fda079c440114f0b58080f50
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 9175a4958c80451dc80205d10856cac40785140e..5d2cd8a69d78c81b7f1cd34e23e790aff79215a6 100644
index f33889dbaaa23908962c56f2dbe072c3bd9e7070..7bbe1f1d7052f45c1e17fe9d4e8fe3164d3b0ba5 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5678,6 +5678,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -5740,6 +5740,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@ -60,10 +60,10 @@ index 9175a4958c80451dc80205d10856cac40785140e..5d2cd8a69d78c81b7f1cd34e23e790af
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 22d9e6831439563320bc6f8d924afcc208273557..545a18592d53e53240cc9b6729a8db530c3ea064 100644
index 08f5271be41f876d01b006a7b03de94930cd6ecb..0c42373bd65aea5a854181c330aafca1a494101f 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1143,6 +1143,7 @@ class CONTENT_EXPORT WebContentsImpl
@@ -1149,6 +1149,7 @@ class CONTENT_EXPORT WebContentsImpl
void SendScreenRects() override;
void SendActiveState(bool active) override;
TextInputManager* GetTextInputManager() override;
@ -72,7 +72,7 @@ index 22d9e6831439563320bc6f8d924afcc208273557..545a18592d53e53240cc9b6729a8db53
RenderWidgetHostImpl* render_widget_host) override;
bool IsShowingContextMenuOnPage() const override;
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index bc246993906cde6423a648d863b3821ff9870f19..4f68c1449c6d322bd5e25772334036ae5f7316c3 100644
index 5e73c1f7cce2f2c40f1ad2fc1e1258af236408c8..970a6efb203b6c66a3b50c5dd3d2dc5fe74a9497 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -37,6 +37,7 @@

Просмотреть файл

@ -7,10 +7,10 @@ Subject: refactor: expose HostImportModuleDynamically and
This is so that Electron can blend Blink's and Node's implementations of these isolate handlers.
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 464528ea26471e5e0d834055b2119f9718f2f644..eb8c67dd8e65ca4a15eb5acdfa155d430555d360 100644
index f3462a8ffcbd9ca785e58f2cbfc319bae2aeec89..4f64e0c9c04036ffd8ba88245c9eb89488bdc095 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -637,7 +637,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
@@ -636,7 +636,9 @@ bool WasmJSPromiseIntegrationEnabledCallback(v8::Local<v8::Context> context) {
execution_context);
}
@ -21,7 +21,7 @@ index 464528ea26471e5e0d834055b2119f9718f2f644..eb8c67dd8e65ca4a15eb5acdfa155d43
v8::Local<v8::Context> context,
v8::Local<v8::Data> v8_host_defined_options,
v8::Local<v8::Value> v8_referrer_resource_url,
@@ -715,7 +717,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
@@ -714,7 +716,7 @@ v8::MaybeLocal<v8::Promise> HostImportModuleDynamically(
}
// https://html.spec.whatwg.org/C/#hostgetimportmetaproperties
@ -30,7 +30,7 @@ index 464528ea26471e5e0d834055b2119f9718f2f644..eb8c67dd8e65ca4a15eb5acdfa155d43
v8::Local<v8::Module> module,
v8::Local<v8::Object> meta) {
v8::Isolate* isolate = context->GetIsolate();
@@ -762,9 +764,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
@@ -761,9 +763,6 @@ std::ostream& operator<<(std::ostream& os, const PrintV8OOM& oom_details) {
return os;
}
@ -40,7 +40,7 @@ index 464528ea26471e5e0d834055b2119f9718f2f644..eb8c67dd8e65ca4a15eb5acdfa155d43
void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
// Set up garbage collection before setting up anything else as V8 may trigger
// GCs during Blink setup.
@@ -784,9 +783,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
@@ -783,9 +782,9 @@ void V8Initializer::InitializeV8Common(v8::Isolate* isolate) {
isolate->SetWasmJSPIEnabledCallback(WasmJSPromiseIntegrationEnabledCallback);
isolate->SetSharedArrayBufferConstructorEnabledCallback(
SharedArrayBufferConstructorEnabledCallback);

Просмотреть файл

@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
accessed from our JS event. The filtering is moved into Electron's code.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 042f69afa3192e9161264c244499b76184f53e70..4b92604378e30c93b438e0b474b47d6cea2ec7a4 100644
index e75f9c88d3d96c20a93ae9130f26379a1dc3acdf..363f86e11bc5048a59b00abe247f85dc29fdff1a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -9684,25 +9684,13 @@ void WebContentsImpl::RendererUnresponsive(
@@ -9795,25 +9795,13 @@ void WebContentsImpl::RendererUnresponsive(
base::RepeatingClosure hang_monitor_restarter) {
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
"render_widget_host", render_widget_host);

Просмотреть файл

@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch
... something to do with OSR? and maybe <webview> as well? terrifying.
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 2fb637bba3e00058f3433ae2f6da799d59a75543..9365d9ebfd47e3054fa4ff9679c0ee06cfac3855 100644
index 51f836176bf924de5fc26081d8b968f918181947..641a9c7fa68328e868167cf2fcdfec01643fea18 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -634,6 +634,13 @@ void RenderWidgetHostViewBase::OnFrameTokenChangedForView(
@@ -639,6 +639,13 @@ void RenderWidgetHostViewBase::OnFrameTokenChangedForView(
host()->DidProcessFrame(frame_token, activation_time);
}
@ -24,7 +24,7 @@ index 2fb637bba3e00058f3433ae2f6da799d59a75543..9365d9ebfd47e3054fa4ff9679c0ee06
const blink::WebMouseEvent& event,
const ui::LatencyInfo& latency) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 8377a897ff00c69e5b11e4775720d25465e6ec81..0b27be5b7d5824dbc5bbbfde813da263c453f20a 100644
index 2a2edc6063b49a313fb359e99b39cf608c6233d1..96e6777899154e73661fb17184b9727cce2eb0a3 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -29,8 +29,11 @@

Просмотреть файл

@ -8,7 +8,7 @@ respond to the first mouse click in their window, which is desirable for some
kinds of utility windows. Similarly for `disableAutoHideCursor`.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index 767c532efd6cf1fa39a33ed54da325ca1e9a5d95..faddee802d6538c092ba96914184663ee57751c8 100644
index fc345ea0ae7a640b7d32cd12e177a4ce020d3b06..038646bfa3ac442c64380a81bdb1d3043e50c107 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -169,6 +169,15 @@ void ExtractUnderlines(NSAttributedString* string,

Просмотреть файл

@ -52,7 +52,7 @@ 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 7ae2e00c79eb0764289a6666360abc897c531bbf..0a236366b3f5050fa5d07971404afa111e699ce8 100644
index 9f046f2cceda0eb65bd7166d71027dd439d65f58..d786e8e50d8145ce5ca3734c50c2907328021e10 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1560,7 +1560,7 @@ if (is_chrome_branded && !is_android) {

Просмотреть файл

@ -18,7 +18,7 @@ This partially (leaves the removal of the feature flag) reverts
ef865130abd5539e7bce12308659b19980368f12.
diff --git a/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm b/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm
index fc4de264da58bcea7329c82409d1087e67b62f25..6ac3d932f4567fabfb2b9fac001aef21db755e01 100644
index 2991489fae8a4eecad97b1ecb2271f096d9a9229..6c735286bf901fc7ff3872830d83fe119dd3bd33 100644
--- a/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm
@@ -126,13 +126,11 @@ @implementation WebContentsViewCocoa {
@ -37,7 +37,7 @@ index fc4de264da58bcea7329c82409d1087e67b62f25..6ac3d932f4567fabfb2b9fac001aef21
- (instancetype)initWithViewsHostableView:(ui::ViewsHostableView*)v {
self = [super initWithFrame:NSZeroRect tracking:YES];
@@ -479,6 +477,20 @@ - (void)updateWebContentsVisibility {
@@ -487,6 +485,20 @@ - (void)updateWebContentsVisibility {
[self updateWebContentsVisibility:visibility];
}
@ -58,7 +58,7 @@ index fc4de264da58bcea7329c82409d1087e67b62f25..6ac3d932f4567fabfb2b9fac001aef21
- (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
// Subviews do not participate in auto layout unless the the size this view
// changes. This allows RenderWidgetHostViewMac::SetBounds(..) to select a
@@ -501,11 +513,20 @@ - (void)viewWillMoveToWindow:(NSWindow*)newWindow {
@@ -509,11 +521,20 @@ - (void)viewWillMoveToWindow:(NSWindow*)newWindow {
NSWindow* oldWindow = [self window];
@ -83,7 +83,7 @@ index fc4de264da58bcea7329c82409d1087e67b62f25..6ac3d932f4567fabfb2b9fac001aef21
}
if (newWindow) {
@@ -513,27 +534,49 @@ - (void)viewWillMoveToWindow:(NSWindow*)newWindow {
@@ -521,27 +542,49 @@ - (void)viewWillMoveToWindow:(NSWindow*)newWindow {
selector:@selector(windowChangedOcclusionState:)
name:NSWindowDidChangeOcclusionStateNotification
object:newWindow];

Просмотреть файл

@ -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 e388b778c476fde6294815f86d62e3f843f05e13..d64b538e5755e613fc34ff072cd846b7436430cc 100644
index be72ab044db6de9b804e667182e125f9eb6047b8..50b1308d6043a8160647cc4dad9bc170f8c652f6 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1304,7 +1304,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
@@ -1300,7 +1300,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabled() {

Просмотреть файл

@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index f2b5a9fbfc2a4bb4f9482fe64bf33fa9a739d5ce..a9a808f48188416426101013acacf9da7da08d9f 100644
index 0358c48884b686e8d1da962c7d4e06e31de7bd8e..006f493dc30fa7b30fa85e3475fcb1976bf3a0ab 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1758,6 +1758,10 @@ bool RenderProcessHostImpl::Init() {
@@ -1767,6 +1767,10 @@ bool RenderProcessHostImpl::Init() {
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
*cmd_line, IsPdf(), IsJitDisabled());

Просмотреть файл

@ -9,10 +9,10 @@ is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 63b26168c5fecbd71d11e2fe377bd6a2fa4a7a5e..6b28851234f96c4851b2f19b34a9b8d2c061f347 100644
index 90d93722ef9fbb1ab4072f722db17af96faea062..6ff8e95acaac8dc0d4685167fc79fe222a984a81 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3797,6 +3797,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3823,6 +3823,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create());
@ -26,7 +26,7 @@ index 63b26168c5fecbd71d11e2fe377bd6a2fa4a7a5e..6b28851234f96c4851b2f19b34a9b8d2
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3807,6 +3814,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3833,6 +3840,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@ -35,7 +35,7 @@ index 63b26168c5fecbd71d11e2fe377bd6a2fa4a7a5e..6b28851234f96c4851b2f19b34a9b8d2
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index e9c6a19ace43198ca0887b1ac7385aaf5b643e7e..f6aedd442596dfca6e58d7046d1ef609c2794e97 100644
index 0a2f6fa471e46dd727538c142526f87f7495623b..aeb3854d9a28396c8bd3463f38866f44227bab92 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -114,10 +114,13 @@ class BrowserPluginGuestDelegate;

Просмотреть файл

@ -15,10 +15,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 88396edf058aaf6f18ae8cf09cb7175de5ae8d1c..81add87623c24f1be3cbde3dfdf10495c4de228b 100644
index d2b27b93fcb9de1c78606a3a83df4e07e8c8629d..a482e46453f715a268293a1b6cb0d9958786305e 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8351,6 +8351,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -8420,6 +8420,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}
@ -37,10 +37,10 @@ index 88396edf058aaf6f18ae8cf09cb7175de5ae8d1c..81add87623c24f1be3cbde3dfdf10495
if (had_fullscreen_token && !GetView()->HasFocus())
GetView()->Focus();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 6b28851234f96c4851b2f19b34a9b8d2c061f347..deb9bedb4a7a699807f2c5fabae6c4b90a141a4f 100644
index 6ff8e95acaac8dc0d4685167fc79fe222a984a81..5511e34ec19a1adf99086a33930ae0266b7b8099 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4055,21 +4055,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
@@ -4087,21 +4087,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
const input::NativeWebKeyboardEvent& event) {
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
"WebContentsImpl::PreHandleKeyboardEvent");
@ -78,7 +78,7 @@ index 6b28851234f96c4851b2f19b34a9b8d2c061f347..deb9bedb4a7a699807f2c5fabae6c4b9
}
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -4228,7 +4232,7 @@ void WebContentsImpl::EnterFullscreenMode(
@@ -4260,7 +4264,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame));
DCHECK(requesting_frame->IsActive());

Просмотреть файл

@ -26,10 +26,10 @@ index 42c94f71f09cf9067bac9fd9004dda36708ec441..07c014a28ed1ef5878a50fbb194e38fe
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 24ed2d721fa6b261cc817c82ddf1d1ae0b5e82ed..86684e38d8cb84889c090576ab7f0f0e05b5c2b6 100644
index 2a7a7862b321df2519464a1cd4f9bd5da6c58bc1..5c958673a6778012c8ac039df987a584a103c756 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -887,6 +887,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -892,6 +892,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@ -43,7 +43,7 @@ index 24ed2d721fa6b261cc817c82ddf1d1ae0b5e82ed..86684e38d8cb84889c090576ab7f0f0e
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index ced5bb344ec46e751ad8331242967e9b207bc572..54cebcbc49875287b5ae008b14e7df515f31a2d5 100644
index 9f4762896fb8ebc0058cba3186a63429418d54ae..a619e126f3c91fc6a9eda0de5099934d93c83703 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -196,6 +196,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@ -55,7 +55,7 @@ index ced5bb344ec46e751ad8331242967e9b207bc572..54cebcbc49875287b5ae008b14e7df51
const blink::WebSecurityOrigin& script_origin) override;
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel(
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index d4e60554211f1e7ef5455fb870284127281348b4..38c6e96ac42ff064cb337a4edb493ecf95bd6820 100644
index 7ebcbb331be2e94f6990e614f8ad37933431bedc..5e66e386fbb05b06e14597778933b2976dda79c0 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -662,6 +662,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@ -67,7 +67,7 @@ index d4e60554211f1e7ef5455fb870284127281348b4..38c6e96ac42ff064cb337a4edb493ecf
const WebSecurityOrigin& script_origin) {
return false;
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index 41729a86dab4be0350a4a935ae984c477304dfea..286a9aa7f8041d3be2c8675c6e5371de6a58af7f 100644
index 6e0a669c741753e784fe8a967b1deb125b02d0bf..2449348f956f81845bf314558fa5b7268500adeb 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -762,6 +762,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {

Просмотреть файл

@ -35,10 +35,10 @@ index 07c014a28ed1ef5878a50fbb194e38fe762361e9..ae4c9c011024a32354a4cc25c63835a4
// from the worker thread.
virtual void WillDestroyWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 86684e38d8cb84889c090576ab7f0f0e05b5c2b6..33977bfee6ded55f37ad58bc43bae4cf17c59ea3 100644
index 5c958673a6778012c8ac039df987a584a103c756..fcd5f12d6aff7867c707c4fbe839d02f0491b5d1 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -899,6 +899,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
@@ -904,6 +904,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker);
}
@ -52,7 +52,7 @@ index 86684e38d8cb84889c090576ab7f0f0e05b5c2b6..33977bfee6ded55f37ad58bc43bae4cf
const blink::WebSecurityOrigin& script_origin) {
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 54cebcbc49875287b5ae008b14e7df515f31a2d5..c501ef55d85e9743dd7e0f6bcddfa3de2c155146 100644
index a619e126f3c91fc6a9eda0de5099934d93c83703..33f7bb2df623b3ff2f0473184f5d82896b450747 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -196,6 +196,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@ -65,7 +65,7 @@ index 54cebcbc49875287b5ae008b14e7df515f31a2d5..c501ef55d85e9743dd7e0f6bcddfa3de
bool AllowScriptExtensionForServiceWorker(
const blink::WebSecurityOrigin& script_origin) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 38c6e96ac42ff064cb337a4edb493ecf95bd6820..1bfd7a66d38e01fa173e02c656495e5ba674fa80 100644
index 5e66e386fbb05b06e14597778933b2976dda79c0..7e76e82d959def21ece9ffe1553fec4a9c366d31 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -662,6 +662,8 @@ class BLINK_PLATFORM_EXPORT Platform {

Просмотреть файл

@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer
patching legacy devtools code.
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
index fbc6a1bd7145e75bda7fc3f0346aef324e2f7c8d..dddce4ea0d94454b80fa2e5c6f0ac412631776bf 100644
index efaec39a8980b566ab2199dfab82012b25ba2989..89889caa7530fe0bfd0669c2fac0ac9485389974 100644
--- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts
@@ -789,6 +789,8 @@ export class MainImpl {
@@ -791,6 +791,8 @@ export class MainImpl {
globalThis.Main = globalThis.Main || {};
// @ts-ignore Exported for Tests.js
globalThis.Main.Main = MainImpl;

Просмотреть файл

@ -47,3 +47,4 @@ build_allow_unbundling_of_node_js_dependencies.patch
test_use_static_method_names_in_call_stacks.patch
build_use_third_party_simdutf.patch
fix_remove_fastapitypedarray_usage.patch
test_handle_explicit_resource_management_globals.patch

Просмотреть файл

@ -253,10 +253,10 @@ index 85b666e11f5654afe2a2f192e629221f2133b165..bd8d65247ad3ba4878f1288ab2b66e35
// Delegate to V8's allocator for compatibility with the V8 memory cage.
diff --git a/src/node_serdes.cc b/src/node_serdes.cc
index 7a70997bc024efa4f3ff4cabe30d5e88dcc7bc78..438d6e581a2ee55216f9a9945204b07824fc28a0 100644
index 7a70997bc024efa4f3ff4cabe30d5e88dcc7bc78..6552af3ed0acede41c1b16ef77eb359dc54f088a 100644
--- a/src/node_serdes.cc
+++ b/src/node_serdes.cc
@@ -29,6 +29,11 @@ using v8::ValueSerializer;
@@ -29,6 +29,26 @@ using v8::ValueSerializer;
namespace serdes {
@ -264,11 +264,26 @@ index 7a70997bc024efa4f3ff4cabe30d5e88dcc7bc78..438d6e581a2ee55216f9a9945204b078
+ static v8::ArrayBuffer::Allocator* allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator();
+ return allocator;
+}
+
+void* Reallocate(void* data, size_t old_length,
+ size_t new_length) {
+ if (old_length == new_length) return data;
+ uint8_t* new_data =
+ reinterpret_cast<uint8_t*>(GetAllocator()->AllocateUninitialized(new_length));
+ if (new_data == nullptr) return nullptr;
+ size_t bytes_to_copy = std::min(old_length, new_length);
+ memcpy(new_data, data, bytes_to_copy);
+ if (new_length > bytes_to_copy) {
+ memset(new_data + bytes_to_copy, 0, new_length - bytes_to_copy);
+ }
+ GetAllocator()->Free(data, old_length);
+ return new_data;
+}
+
class SerializerContext : public BaseObject,
public ValueSerializer::Delegate {
public:
@@ -37,10 +42,15 @@ class SerializerContext : public BaseObject,
@@ -37,10 +57,15 @@ class SerializerContext : public BaseObject,
~SerializerContext() override = default;
@ -284,7 +299,7 @@ index 7a70997bc024efa4f3ff4cabe30d5e88dcc7bc78..438d6e581a2ee55216f9a9945204b078
static void SetTreatArrayBufferViewsAsHostObjects(
const FunctionCallbackInfo<Value>& args);
@@ -61,6 +71,7 @@ class SerializerContext : public BaseObject,
@@ -61,6 +86,7 @@ class SerializerContext : public BaseObject,
private:
ValueSerializer serializer_;
@ -292,7 +307,7 @@ index 7a70997bc024efa4f3ff4cabe30d5e88dcc7bc78..438d6e581a2ee55216f9a9945204b078
};
class DeserializerContext : public BaseObject,
@@ -144,6 +155,24 @@ Maybe<uint32_t> SerializerContext::GetSharedArrayBufferId(
@@ -144,6 +170,24 @@ Maybe<uint32_t> SerializerContext::GetSharedArrayBufferId(
return id.ToLocalChecked()->Uint32Value(env()->context());
}
@ -301,7 +316,7 @@ index 7a70997bc024efa4f3ff4cabe30d5e88dcc7bc78..438d6e581a2ee55216f9a9945204b078
+ size_t* new_length) {
+ *new_length = std::max(static_cast<size_t>(4096), requested_size);
+ if (old_buffer) {
+ void* ret = GetAllocator()->Reallocate(old_buffer, last_length_, *new_length);
+ void* ret = Reallocate(old_buffer, last_length_, *new_length);
+ last_length_ = *new_length;
+ return ret;
+ } else {
@ -317,7 +332,7 @@ index 7a70997bc024efa4f3ff4cabe30d5e88dcc7bc78..438d6e581a2ee55216f9a9945204b078
Maybe<bool> SerializerContext::WriteHostObject(Isolate* isolate,
Local<Object> input) {
MaybeLocal<Value> ret;
@@ -209,9 +238,14 @@ void SerializerContext::ReleaseBuffer(const FunctionCallbackInfo<Value>& args) {
@@ -209,9 +253,14 @@ void SerializerContext::ReleaseBuffer(const FunctionCallbackInfo<Value>& args) {
// Note: Both ValueSerializer and this Buffer::New() variant use malloc()
// as the underlying allocator.
std::pair<uint8_t*, size_t> ret = ctx->serializer_.Release();

Просмотреть файл

@ -0,0 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <targos@protonmail.com>
Date: Sat, 21 Dec 2024 09:25:55 +0100
Subject: test: handle explicit resource management globals
https://chromium-review.googlesource.com/c/chromium/src/+/6174695
diff --git a/test/common/globals.js b/test/common/globals.js
index 5d1c4415eeb09e92d062330afc0aecb1d297b6d3..2c1dac019ba2aa0a23c2434997e2007dd2eacde8 100644
--- a/test/common/globals.js
+++ b/test/common/globals.js
@@ -64,6 +64,9 @@ const intrinsics = new Set([
'Atomics',
'WebAssembly',
'Iterator',
+ 'SuppressedError',
+ 'DisposableStack',
+ 'AsyncDisposableStack',
]);
if (global.gc) {

Просмотреть файл

@ -23,7 +23,7 @@ index 135dfb06a3bdd11e5db21c1974a38a086a7ac9cb..f2708774bfac59703e8981d8816a97a8
MicrotaskQueue& operator=(const MicrotaskQueue&) = delete;
diff --git a/src/execution/microtask-queue.h b/src/execution/microtask-queue.h
index e85df7d13bb7fd5430e55f5669f1da4b19af36a4..ec8ef87d3b9a9bbb95b28eac560e46eab2ee94cb 100644
index 1965560945102b2a51071c405e88524e9f1dc237..38e095625b04e6ac3f77b70e940661a1a647d98a 100644
--- a/src/execution/microtask-queue.h
+++ b/src/execution/microtask-queue.h
@@ -93,10 +93,10 @@ class V8_EXPORT_PRIVATE MicrotaskQueue final : public v8::MicrotaskQueue {

Просмотреть файл

@ -46,10 +46,10 @@ index 3e57ae8efe33f326ef0e5d609c311d4be5b8afd6..dc521d39c2280dfc3217e97c1e413b2b
V8_INLINE static void* GetAlignedPointerFromInternalField(
const BasicTracedReference<Object>& object, int index) {
diff --git a/src/api/api.cc b/src/api/api.cc
index c0ff2001df718c89bd1fdf06e95d51e56aa23f03..35ab90bc743acce711c5f499363e40e55bf2a0e1 100644
index 548f23ce630071ba2e1d9b0735a4cc719d5de8e3..93213d18590e2880dd74c6dc0a73a26222c98813 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -6487,14 +6487,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
@@ -6462,14 +6462,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
i::Cast<i::JSObject>(*obj)->GetEmbedderField(index), isolate));
}

Просмотреть файл

@ -25,8 +25,6 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
#include "url/url_constants.h"
// In SHARED_INTERMEDIATE_DIR.
#include "widevine_cdm_version.h" // NOLINT(build/include_directory)
#if BUILDFLAG(ENABLE_WIDEVINE)
#include "base/native_library.h"

Просмотреть файл

@ -28,7 +28,7 @@
#endif
using extensions::Command;
using extensions::GlobalShortcutListener;
using ui::GlobalAcceleratorListener;
namespace {
@ -59,8 +59,8 @@ GlobalShortcut::~GlobalShortcut() {
void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) {
if (!base::Contains(accelerator_callback_map_, accelerator)) {
// This should never occur, because if it does, GlobalShortcutListener
// notifies us with wrong accelerator.
// This should never occur, because if it does,
// ui::GlobalAcceleratorListener notifies us with wrong accelerator.
NOTREACHED();
}
accelerator_callback_map_[accelerator].Run();
@ -69,7 +69,7 @@ void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) {
void GlobalShortcut::ExecuteCommand(const extensions::ExtensionId& extension_id,
const std::string& command_id) {
if (!base::Contains(command_callback_map_, command_id)) {
// This should never occur, because if it does, GlobalShortcutListener
// This should never occur, because if it does, GlobalAcceleratorListener
// notifies us with wrong command.
NOTREACHED();
}
@ -110,11 +110,11 @@ bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
if (RegisteringMediaKeyForUntrustedClient(accelerator))
return false;
GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(false);
ui::GlobalAcceleratorListener::SetShouldUseInternalMediaKeyHandling(false);
}
#endif
auto* instance = GlobalShortcutListener::GetInstance();
auto* instance = ui::GlobalAcceleratorListener::GetInstance();
if (!instance) {
return false;
}
@ -126,7 +126,7 @@ bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
// Need a unique profile id. Set one if not generated yet, otherwise re-use
// the same so that the session for the globalShortcuts is able to get
// already registered shortcuts from the previous session. This will be used
// by GlobalShortcutListenerLinux as a session key.
// by GlobalAcceleratorListenerLinux as a session key.
std::string profile_id = prefs->GetString(kElectronGlobalShortcutsUuid);
if (profile_id.empty()) {
profile_id = base::Uuid::GenerateRandomV4().AsLowercaseString();
@ -177,13 +177,13 @@ void GlobalShortcut::Unregister(const ui::Accelerator& accelerator) {
#if BUILDFLAG(IS_MAC)
if (accelerator.IsMediaKey() && !MapHasMediaKeys(accelerator_callback_map_)) {
GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(true);
ui::GlobalAcceleratorListener::SetShouldUseInternalMediaKeyHandling(true);
}
#endif
if (GlobalShortcutListener::GetInstance()) {
GlobalShortcutListener::GetInstance()->UnregisterAccelerator(accelerator,
this);
if (ui::GlobalAcceleratorListener::GetInstance()) {
ui::GlobalAcceleratorListener::GetInstance()->UnregisterAccelerator(
accelerator, this);
}
}
@ -210,8 +210,8 @@ void GlobalShortcut::UnregisterAll() {
return;
}
accelerator_callback_map_.clear();
if (GlobalShortcutListener::GetInstance()) {
GlobalShortcutListener::GetInstance()->UnregisterAccelerators(this);
if (ui::GlobalAcceleratorListener::GetInstance()) {
ui::GlobalAcceleratorListener::GetInstance()->UnregisterAccelerators(this);
}
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше