From 9f12edac65395b8c5d43c57d4b44843c4bdbb609 Mon Sep 17 00:00:00 2001 From: Sergey Zolotarev Date: Thu, 18 Nov 2021 00:20:24 +0600 Subject: [PATCH 001/268] Fix typo in distribution docs (#31791) --- docs/tutorial/application-distribution.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/application-distribution.md b/docs/tutorial/application-distribution.md index 5dd54c629b2a4..fb5dc918dad91 100644 --- a/docs/tutorial/application-distribution.md +++ b/docs/tutorial/application-distribution.md @@ -56,7 +56,7 @@ will then be your distribution to deliver to users. ### With an app source code archive -Instead of from shipping your app by copying all of its source files, you can +Instead of shipping your app by copying all of its source files, you can package your app into an [asar] archive to improve the performance of reading files on platforms like Windows, if you are not already using a bundler such as Parcel or Webpack. From 3e71310a9f8e2762022c97674a5848f081039d23 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Wed, 17 Nov 2021 11:35:00 -0800 Subject: [PATCH 002/268] chore: update nmv to 103 for Electron 18 (#31778) --- build/args/all.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/args/all.gn b/build/args/all.gn index 47a90b28b0e65..d4875bceef838 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -2,7 +2,7 @@ is_electron_build = true root_extra_deps = [ "//electron" ] # Registry of NMVs --> https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json -node_module_version = 101 +node_module_version = 103 v8_promise_internal_field_count = 1 v8_typed_array_max_size_in_heap = 0 From 0cb46a3712ac5cee7d754265ad8c936d118b74b3 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Wed, 17 Nov 2021 14:13:49 -0800 Subject: [PATCH 003/268] fix: add resource strings for file selection (#31881) --- electron_strings.grdp | 17 +++++++++++++++++ shell/browser/file_select_helper.cc | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/electron_strings.grdp b/electron_strings.grdp index 41265769a556a..bf5dcf652558d 100644 --- a/electron_strings.grdp +++ b/electron_strings.grdp @@ -33,6 +33,23 @@ {SCREEN_INDEX, plural, =1{Screen #} other{Screen #}} + + + Image Files + + + Audio Files + + + Video Files + + + Custom Files + + + download + + diff --git a/shell/browser/file_select_helper.cc b/shell/browser/file_select_helper.cc index 3d3ea89a66d5c..a4e8918b796e7 100644 --- a/shell/browser/file_select_helper.cc +++ b/shell/browser/file_select_helper.cc @@ -23,7 +23,6 @@ #include "chrome/browser/platform_util.h" #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/common/pref_names.h" -#include "chrome/grit/generated_resources.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -33,6 +32,7 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/web_contents.h" +#include "electron/grit/electron_resources.h" #include "net/base/filename_util.h" #include "net/base/mime_util.h" #include "shell/browser/api/electron_api_web_contents.h" From eb56209206a9888d37e88316154d886bfce6e8de Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 18 Nov 2021 05:01:32 -0800 Subject: [PATCH 004/268] Bump v18.0.0-nightly.20211118 --- ELECTRON_VERSION | 2 +- docs/tutorial/support.md | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 334d60efdd2df..7d25cc915e02b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -17.0.0-nightly.20211117 \ No newline at end of file +18.0.0-nightly.20211118 \ No newline at end of file diff --git a/docs/tutorial/support.md b/docs/tutorial/support.md index c48cab400598c..8f1d4601915d8 100644 --- a/docs/tutorial/support.md +++ b/docs/tutorial/support.md @@ -70,10 +70,10 @@ until the maintainers feel the maintenance burden is too high to continue doing ### Currently supported versions +* 18.x.y * 17.x.y * 16.x.y * 15.x.y -* 14.x.y ### End-of-life diff --git a/package.json b/package.json index 13cbd5084ed77..c52a84e52630a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "17.0.0-nightly.20211117", + "version": "18.0.0-nightly.20211118", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 1a74161b47ae1..d75234c0702de 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 17,0,0,20211117 - PRODUCTVERSION 17,0,0,20211117 + FILEVERSION 18,0,0,20211118 + PRODUCTVERSION 18,0,0,20211118 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "17.0.0" + VALUE "FileVersion", "18.0.0" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "17.0.0" + VALUE "ProductVersion", "18.0.0" VALUE "SquirrelAwareVersion", "1" END END From 98a5996b30164838c4f8e5b8572d60e7a442ad91 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 19 Nov 2021 05:02:11 -0800 Subject: [PATCH 005/268] Bump v18.0.0-nightly.20211119 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 7d25cc915e02b..57bbb37a9d252 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211118 \ No newline at end of file +18.0.0-nightly.20211119 \ No newline at end of file diff --git a/package.json b/package.json index c52a84e52630a..cc2fa6487188e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211118", + "version": "18.0.0-nightly.20211119", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index d75234c0702de..2e127db0fc778 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211118 - PRODUCTVERSION 18,0,0,20211118 + FILEVERSION 18,0,0,20211119 + PRODUCTVERSION 18,0,0,20211119 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 7ff15038d64bd0ca3621a7f741b2b067b6b8a351 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 22 Nov 2021 01:36:32 +0100 Subject: [PATCH 006/268] fix: lint Objective-C header files (#31923) --- script/lint.js | 8 ++------ shell/browser/mac/electron_application.h | 5 +++++ shell/browser/mac/electron_application_delegate.h | 5 +++++ .../ui/cocoa/electron_inspectable_web_contents_view.h | 6 +++--- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/script/lint.js b/script/lint.js index a2a6a7565c7af..b6bb2bd15722a 100755 --- a/script/lint.js +++ b/script/lint.js @@ -14,10 +14,6 @@ const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, '..', 'third_party', 'depot_tools' const IGNORELIST = new Set([ ['shell', 'browser', 'resources', 'win', 'resource.h'], - ['shell', 'browser', 'notifications', 'mac', 'notification_center_delegate.h'], - ['shell', 'browser', 'ui', 'cocoa', 'event_dispatching_window.h'], - ['shell', 'browser', 'ui', 'cocoa', 'NSColor+Hex.h'], - ['shell', 'browser', 'ui', 'cocoa', 'NSString+ANSI.h'], ['shell', 'common', 'node_includes.h'], ['spec', 'static', 'jquery-2.0.3.min.js'], ['spec', 'ts-smoke', 'electron', 'main.ts'], @@ -82,7 +78,7 @@ const LINTERS = [{ }, { key: 'objc', roots: ['shell'], - test: filename => filename.endsWith('.mm'), + test: filename => filename.endsWith('.mm') || (filename.endsWith('.h') && isObjCHeader(filename)), run: (opts, filenames) => { if (opts.fix) { spawnAndCheckExitCode('python', ['script/run-clang-format.py', '--fix', ...filenames]); @@ -96,7 +92,7 @@ const LINTERS = [{ '-whitespace/indent', '-whitespace/parens' ]; - cpplint(['--extensions=mm', `--filter=${filter.join(',')}`, ...filenames]); + cpplint(['--extensions=mm,h', `--filter=${filter.join(',')}`, ...filenames]); } }, { key: 'python', diff --git a/shell/browser/mac/electron_application.h b/shell/browser/mac/electron_application.h index 70d312236a439..24cac25643643 100644 --- a/shell/browser/mac/electron_application.h +++ b/shell/browser/mac/electron_application.h @@ -2,6 +2,9 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#ifndef SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ +#define SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ + #include "base/callback.h" #include "base/mac/scoped_nsobject.h" #include "base/mac/scoped_sending_event.h" @@ -45,3 +48,5 @@ withUserInfo:(NSDictionary*)userInfo; @end + +#endif // SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ diff --git a/shell/browser/mac/electron_application_delegate.h b/shell/browser/mac/electron_application_delegate.h index 43063ae2d874c..d1697d2a885ec 100644 --- a/shell/browser/mac/electron_application_delegate.h +++ b/shell/browser/mac/electron_application_delegate.h @@ -2,6 +2,9 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#ifndef SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_ +#define SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_ + #import #import "shell/browser/ui/cocoa/electron_menu_controller.h" @@ -15,3 +18,5 @@ - (void)setApplicationDockMenu:(electron::ElectronMenuModel*)model; @end + +#endif // SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_ diff --git a/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h b/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h index e82d2e3df8c3f..2bedbf22f5f8e 100644 --- a/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h +++ b/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_COCOA_BRY_INSPECTABLE_WEB_CONTENTS_VIEW_H_ -#define SHELL_BROWSER_UI_COCOA_BRY_INSPECTABLE_WEB_CONTENTS_VIEW_H_ +#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_ +#define SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_ #import @@ -52,4 +52,4 @@ using electron::InspectableWebContentsViewMac; @end -#endif // SHELL_BROWSER_UI_COCOA_BRY_INSPECTABLE_WEB_CONTENTS_VIEW_H_ +#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_ From 38d2ec0cb60b4bc7fea0e19450b4253fa9acf142 Mon Sep 17 00:00:00 2001 From: Black-Hole <158blackhole@gmail.com> Date: Mon, 22 Nov 2021 08:37:13 +0800 Subject: [PATCH 007/268] fix: ninja build failed on some system (#31887) --- script/generate-config-gypi.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/generate-config-gypi.py b/script/generate-config-gypi.py index c4e3d9815932a..f20360f8133d5 100755 --- a/script/generate-config-gypi.py +++ b/script/generate-config-gypi.py @@ -17,10 +17,10 @@ def run_node_configure(target_cpu): # Enabled in Chromium's V8. if target_cpu == 'arm64' or target_cpu == 'x64': args += ['--experimental-enable-pointer-compression'] - # Work around "No acceptable ASM compiler found" error on some Windows - # machines, it breaks nothing since Electron does not use OpenSSL. - if sys.platform == 'win32': - args += ['--openssl-no-asm'] + + # Work around "No acceptable ASM compiler found" error on some System, + # it breaks nothing since Electron does not use OpenSSL. + args += ['--openssl-no-asm'] subprocess.check_call([sys.executable, configure] + args) def read_node_config_gypi(): From 239ba7d905283c78b6ba4320575562aaa13220f8 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 22 Nov 2021 01:38:05 +0100 Subject: [PATCH 008/268] fix: BrowserView setBackgroundColor needs two calls (#31863) --- shell/browser/api/electron_api_browser_view.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/shell/browser/api/electron_api_browser_view.cc b/shell/browser/api/electron_api_browser_view.cc index ff5a42581445b..7193c00fa1c5e 100644 --- a/shell/browser/api/electron_api_browser_view.cc +++ b/shell/browser/api/electron_api_browser_view.cc @@ -155,11 +155,12 @@ gfx::Rect BrowserView::GetBounds() { } void BrowserView::SetBackgroundColor(const std::string& color_name) { - if (!web_contents()) - return; + view_->SetBackgroundColor(ParseHexColor(color_name)); - auto* wc = web_contents()->web_contents(); - wc->SetPageBaseBackgroundColor(ParseHexColor(color_name)); + if (web_contents()) { + auto* wc = web_contents()->web_contents(); + wc->SetPageBaseBackgroundColor(ParseHexColor(color_name)); + } } v8::Local BrowserView::GetWebContents(v8::Isolate* isolate) { From 086526738745f205241aed9926bb8915759c0f76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 09:50:36 +0900 Subject: [PATCH 009/268] build(deps-dev): bump aws-sdk from 2.727.1 to 2.814.0 (#31867) Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.727.1 to 2.814.0. - [Release notes](https://github.com/aws/aws-sdk-js/releases) - [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js/compare/v2.727.1...v2.814.0) --- updated-dependencies: - dependency-name: aws-sdk dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 19 +++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index cc2fa6487188e..6d2b16d2bac4a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@typescript-eslint/eslint-plugin": "^4.4.1", "@typescript-eslint/parser": "^4.4.1", "asar": "^3.1.0", - "aws-sdk": "^2.727.1", + "aws-sdk": "^2.814.0", "check-for-leaks": "^1.2.1", "colors": "^1.4.0", "dotenv-safe": "^4.0.4", diff --git a/yarn.lock b/yarn.lock index 978a9dfc32bca..84fedf4790b0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1143,10 +1143,10 @@ atob@^2.1.1: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -aws-sdk@^2.727.1: - version "2.727.1" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.727.1.tgz#bde7a4b57b6c5b34370ad20963472ea7d24a9351" - integrity sha512-K+XdN11os6hvI9DgWEK9m/fPKHuDDVZalFWPouwqSk0phEdDCJ/K8InHUFL9DMvE4bxyWRuqI9dzNfdmxX0sxQ== +aws-sdk@^2.814.0: + version "2.814.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.814.0.tgz#7a1c36006e0b5826f14bd2511b1d229ef6814bb0" + integrity sha512-empd1m/J/MAkL6d9OeRpmg9thobULu0wk4v8W3JToaxGi2TD7PIdvE6yliZKyOVAdJINhBWEBhxR4OUIHhcGbQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -1342,7 +1342,7 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= -buffer@4.9.2: +buffer@4.9.2, buffer@^4.3.0: version "4.9.2" resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== @@ -1351,15 +1351,6 @@ buffer@4.9.2: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@^4.3.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" - integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" From c4ea33d1bf6faf8ca685e67e63b197d89efa9870 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 22 Nov 2021 08:34:31 +0100 Subject: [PATCH 010/268] chore: add ELECTRON_ prefix to C++ include guards (#31925) --- docs/development/creating-api.md | 4 ++-- script/lint.js | 19 ++++++++++--------- shell/app/command_line_args.h | 6 +++--- shell/app/electron_content_client.h | 6 +++--- shell/app/electron_crash_reporter_client.h | 6 +++--- shell/app/electron_library_main.h | 6 +++--- shell/app/electron_main.h | 6 +++--- shell/app/electron_main_delegate.h | 6 +++--- shell/app/electron_main_delegate_mac.h | 6 +++--- shell/app/node_main.h | 6 +++--- shell/app/uv_task_runner.h | 6 +++--- shell/browser/api/electron_api_app.h | 6 +++--- shell/browser/api/electron_api_auto_updater.h | 6 +++--- shell/browser/api/electron_api_base_window.h | 6 +++--- shell/browser/api/electron_api_browser_view.h | 6 +++--- .../browser/api/electron_api_browser_window.h | 6 +++--- shell/browser/api/electron_api_cookies.h | 6 +++--- .../browser/api/electron_api_crash_reporter.h | 6 +++--- .../api/electron_api_data_pipe_holder.h | 6 +++--- shell/browser/api/electron_api_debugger.h | 6 +++--- .../api/electron_api_desktop_capturer.h | 6 +++--- .../browser/api/electron_api_download_item.h | 6 +++--- .../browser/api/electron_api_event_emitter.h | 6 +++--- .../api/electron_api_global_shortcut.h | 6 +++--- .../api/electron_api_in_app_purchase.h | 6 +++--- shell/browser/api/electron_api_menu.h | 6 +++--- shell/browser/api/electron_api_menu_mac.h | 6 +++--- shell/browser/api/electron_api_menu_views.h | 6 +++--- shell/browser/api/electron_api_native_theme.h | 6 +++--- shell/browser/api/electron_api_net_log.h | 6 +++--- shell/browser/api/electron_api_notification.h | 6 +++--- .../browser/api/electron_api_power_monitor.h | 6 +++--- .../api/electron_api_power_save_blocker.h | 6 +++--- shell/browser/api/electron_api_protocol.h | 6 +++--- shell/browser/api/electron_api_safe_storage.h | 6 +++--- shell/browser/api/electron_api_screen.h | 6 +++--- .../api/electron_api_service_worker_context.h | 6 +++--- shell/browser/api/electron_api_session.h | 6 +++--- .../api/electron_api_system_preferences.h | 6 +++--- shell/browser/api/electron_api_tray.h | 6 +++--- shell/browser/api/electron_api_url_loader.h | 6 +++--- shell/browser/api/electron_api_view.h | 6 +++--- shell/browser/api/electron_api_web_contents.h | 6 +++--- .../api/electron_api_web_contents_view.h | 6 +++--- .../browser/api/electron_api_web_frame_main.h | 6 +++--- shell/browser/api/electron_api_web_request.h | 6 +++--- shell/browser/api/event.h | 6 +++--- shell/browser/api/frame_subscriber.h | 6 +++--- shell/browser/api/gpu_info_enumerator.h | 6 +++--- shell/browser/api/gpuinfo_manager.h | 6 +++--- shell/browser/api/message_port.h | 6 +++--- shell/browser/api/process_metric.h | 6 +++--- shell/browser/api/save_page_handler.h | 6 +++--- shell/browser/api/ui_event.h | 6 +++--- .../api/views/electron_api_image_view.h | 6 +++--- shell/browser/auto_updater.h | 6 +++--- shell/browser/badging/badge_manager.h | 6 +++--- shell/browser/badging/badge_manager_factory.h | 6 +++--- .../bluetooth/electron_bluetooth_delegate.h | 6 +++--- shell/browser/browser.h | 6 +++--- shell/browser/browser_observer.h | 6 +++--- shell/browser/browser_process_impl.h | 6 +++--- shell/browser/certificate_manager_model.h | 6 +++--- shell/browser/child_web_contents_tracker.h | 6 +++--- shell/browser/cookie_change_notifier.h | 6 +++--- shell/browser/electron_autofill_driver.h | 6 +++--- .../electron_autofill_driver_factory.h | 6 +++--- shell/browser/electron_browser_client.h | 6 +++--- shell/browser/electron_browser_context.h | 6 +++--- shell/browser/electron_browser_handler_impl.h | 6 +++--- shell/browser/electron_browser_main_parts.h | 6 +++--- .../electron_download_manager_delegate.h | 6 +++--- shell/browser/electron_gpu_client.h | 6 +++--- .../electron_javascript_dialog_manager.h | 6 +++--- shell/browser/electron_navigation_throttle.h | 6 +++--- .../electron_pdf_web_contents_helper_client.h | 6 +++--- shell/browser/electron_permission_manager.h | 6 +++--- .../electron_quota_permission_context.h | 6 +++--- ...tron_speech_recognition_manager_delegate.h | 6 +++--- .../electron_web_ui_controller_factory.h | 6 +++--- shell/browser/event_emitter_mixin.h | 6 +++--- .../browser/extended_web_contents_observer.h | 6 +++--- .../cryptotoken_private_api.h | 6 +++--- shell/browser/extensions/api/i18n/i18n_api.h | 6 +++--- .../electron_management_api_delegate.h | 6 +++--- .../resources_private/resources_private_api.h | 6 +++--- .../runtime/electron_runtime_api_delegate.h | 6 +++--- .../api/streams_private/streams_private_api.h | 6 +++--- shell/browser/extensions/api/tabs/tabs_api.h | 6 +++--- ..._browser_context_keyed_service_factories.h | 6 +++--- ...ron_component_extension_resource_manager.h | 6 +++--- .../electron_display_info_provider.h | 6 +++--- .../electron_extension_host_delegate.h | 6 +++--- .../extensions/electron_extension_loader.h | 6 +++--- .../electron_extension_message_filter.h | 6 +++--- .../extensions/electron_extension_system.h | 6 +++--- .../electron_extension_system_factory.h | 6 +++--- ...electron_extension_web_contents_observer.h | 6 +++--- .../electron_extensions_api_client.h | 6 +++--- ...electron_extensions_browser_api_provider.h | 6 +++--- .../electron_extensions_browser_client.h | 6 +++--- .../extensions/electron_kiosk_delegate.h | 6 +++--- .../extensions/electron_messaging_delegate.h | 6 +++--- .../extensions/electron_navigation_ui_data.h | 6 +++--- .../electron_process_manager_delegate.h | 6 +++--- shell/browser/fake_location_provider.h | 6 +++--- shell/browser/feature_list.h | 6 +++--- shell/browser/file_select_helper.h | 6 +++--- .../font/electron_font_access_delegate.h | 6 +++--- shell/browser/font_defaults.h | 6 +++--- shell/browser/hid/electron_hid_delegate.h | 6 +++--- shell/browser/hid/hid_chooser_context.h | 6 +++--- .../browser/hid/hid_chooser_context_factory.h | 6 +++--- shell/browser/hid/hid_chooser_controller.h | 6 +++--- shell/browser/javascript_environment.h | 6 +++--- shell/browser/lib/bluetooth_chooser.h | 6 +++--- shell/browser/lib/power_observer_linux.h | 6 +++--- shell/browser/linux/unity_service.h | 6 +++--- shell/browser/login_handler.h | 6 +++--- shell/browser/mac/dict_util.h | 6 +++--- shell/browser/mac/electron_application.h | 6 +++--- .../mac/electron_application_delegate.h | 6 +++--- shell/browser/mac/in_app_purchase.h | 6 +++--- shell/browser/mac/in_app_purchase_observer.h | 6 +++--- shell/browser/mac/in_app_purchase_product.h | 6 +++--- .../media/media_capture_devices_dispatcher.h | 6 +++--- shell/browser/media/media_device_id_salt.h | 6 +++--- .../media/media_stream_devices_controller.h | 6 +++--- shell/browser/microtasks_runner.h | 6 +++--- shell/browser/native_browser_view.h | 6 +++--- shell/browser/native_browser_view_mac.h | 6 +++--- shell/browser/native_browser_view_views.h | 6 +++--- shell/browser/native_window.h | 6 +++--- shell/browser/native_window_mac.h | 6 +++--- shell/browser/native_window_observer.h | 6 +++--- shell/browser/native_window_views.h | 6 +++--- shell/browser/net/asar/asar_file_validator.h | 6 +++--- shell/browser/net/asar/asar_url_loader.h | 6 +++--- .../net/asar/asar_url_loader_factory.h | 6 +++--- shell/browser/net/cert_verifier_client.h | 6 +++--- .../browser/net/electron_url_loader_factory.h | 6 +++--- shell/browser/net/network_context_service.h | 6 +++--- .../net/network_context_service_factory.h | 6 +++--- shell/browser/net/node_stream_loader.h | 6 +++--- .../browser/net/proxying_url_loader_factory.h | 6 +++--- shell/browser/net/proxying_websocket.h | 6 +++--- shell/browser/net/resolve_proxy_helper.h | 6 +++--- .../net/system_network_context_manager.h | 6 +++--- shell/browser/net/url_pipe_loader.h | 6 +++--- shell/browser/net/web_request_api_interface.h | 6 +++--- shell/browser/network_hints_handler_impl.h | 6 +++--- .../linux/libnotify_notification.h | 6 +++--- .../linux/notification_presenter_linux.h | 6 +++--- .../notifications/mac/cocoa_notification.h | 6 +++--- .../mac/notification_center_delegate.h | 6 +++--- .../mac/notification_presenter_mac.h | 6 +++--- shell/browser/notifications/notification.h | 6 +++--- .../notifications/notification_delegate.h | 6 +++--- .../notifications/notification_presenter.h | 6 +++--- .../platform_notification_service.h | 6 +++--- .../win/notification_presenter_win.h | 6 +++--- .../win/notification_presenter_win7.h | 6 +++--- .../win/win32_desktop_notifications/common.h | 6 +++--- .../desktop_notification_controller.h | 6 +++--- .../win/win32_desktop_notifications/toast.h | 6 +++--- .../win32_desktop_notifications/toast_uia.h | 6 +++--- .../notifications/win/win32_notification.h | 6 +++--- .../win/windows_toast_notification.h | 6 +++--- shell/browser/osr/osr_host_display_client.h | 6 +++--- .../browser/osr/osr_render_widget_host_view.h | 6 +++--- shell/browser/osr/osr_video_consumer.h | 6 +++--- shell/browser/osr/osr_view_proxy.h | 6 +++--- shell/browser/osr/osr_web_contents_view.h | 6 +++--- shell/browser/plugins/plugin_utils.h | 6 +++--- shell/browser/pref_store_delegate.h | 6 +++--- .../printing/print_preview_message_handler.h | 6 +++--- .../printing/print_view_manager_electron.h | 6 +++--- shell/browser/protocol_registry.h | 6 +++--- shell/browser/relauncher.h | 6 +++--- .../browser/serial/electron_serial_delegate.h | 6 +++--- shell/browser/serial/serial_chooser_context.h | 6 +++--- .../serial/serial_chooser_context_factory.h | 6 +++--- .../serial/serial_chooser_controller.h | 6 +++--- shell/browser/session_preferences.h | 6 +++--- shell/browser/special_storage_policy.h | 6 +++--- shell/browser/ui/accelerator_util.h | 6 +++--- shell/browser/ui/autofill_popup.h | 6 +++--- shell/browser/ui/certificate_trust.h | 6 +++--- shell/browser/ui/cocoa/NSColor+Hex.h | 6 +++--- shell/browser/ui/cocoa/NSString+ANSI.h | 6 +++--- .../ui/cocoa/delayed_native_view_host.h | 6 +++--- .../browser/ui/cocoa/electron_bundle_mover.h | 6 +++--- .../electron_inspectable_web_contents_view.h | 6 +++--- .../ui/cocoa/electron_menu_controller.h | 6 +++--- .../ui/cocoa/electron_native_widget_mac.h | 6 +++--- shell/browser/ui/cocoa/electron_ns_window.h | 6 +++--- .../ui/cocoa/electron_ns_window_delegate.h | 6 +++--- .../browser/ui/cocoa/electron_preview_item.h | 6 +++--- shell/browser/ui/cocoa/electron_touch_bar.h | 6 +++--- .../ui/cocoa/event_dispatching_window.h | 6 +++--- shell/browser/ui/cocoa/root_view_mac.h | 6 +++--- shell/browser/ui/cocoa/views_delegate_mac.h | 6 +++--- shell/browser/ui/cocoa/window_buttons_proxy.h | 6 +++--- shell/browser/ui/devtools_manager_delegate.h | 6 +++--- shell/browser/ui/devtools_ui.h | 6 +++--- shell/browser/ui/drag_util.h | 6 +++--- shell/browser/ui/electron_menu_model.h | 6 +++--- shell/browser/ui/file_dialog.h | 6 +++--- shell/browser/ui/gtk/app_indicator_icon.h | 6 +++--- .../browser/ui/gtk/app_indicator_icon_menu.h | 6 +++--- shell/browser/ui/gtk/gtk_status_icon.h | 6 +++--- shell/browser/ui/gtk/menu_util.h | 6 +++--- shell/browser/ui/gtk/status_icon.h | 6 +++--- shell/browser/ui/gtk_util.h | 6 +++--- shell/browser/ui/inspectable_web_contents.h | 6 +++--- .../ui/inspectable_web_contents_delegate.h | 6 +++--- .../ui/inspectable_web_contents_view.h | 6 +++--- .../inspectable_web_contents_view_delegate.h | 6 +++--- .../ui/inspectable_web_contents_view_mac.h | 6 +++--- shell/browser/ui/message_box.h | 6 +++--- shell/browser/ui/tray_icon.h | 6 +++--- shell/browser/ui/tray_icon_cocoa.h | 6 +++--- shell/browser/ui/tray_icon_gtk.h | 6 +++--- shell/browser/ui/tray_icon_observer.h | 6 +++--- shell/browser/ui/views/autofill_popup_view.h | 6 +++--- .../ui/views/electron_views_delegate.h | 6 +++--- shell/browser/ui/views/frameless_view.h | 6 +++--- .../ui/views/global_menu_bar_registrar_x11.h | 6 +++--- shell/browser/ui/views/global_menu_bar_x11.h | 6 +++--- .../inspectable_web_contents_view_views.h | 6 +++--- shell/browser/ui/views/menu_bar.h | 6 +++--- shell/browser/ui/views/menu_delegate.h | 6 +++--- shell/browser/ui/views/menu_model_adapter.h | 6 +++--- shell/browser/ui/views/native_frame_view.h | 6 +++--- shell/browser/ui/views/root_view.h | 6 +++--- shell/browser/ui/views/submenu_button.h | 6 +++--- shell/browser/ui/views/win_caption_button.h | 6 +++--- .../ui/views/win_caption_button_container.h | 6 +++--- shell/browser/ui/views/win_frame_view.h | 6 +++--- shell/browser/ui/webui/accessibility_ui.h | 6 +++--- shell/browser/ui/win/dialog_thread.h | 6 +++--- .../win/electron_desktop_native_widget_aura.h | 6 +++--- .../electron_desktop_window_tree_host_win.h | 6 +++--- shell/browser/ui/win/jump_list.h | 6 +++--- shell/browser/ui/win/notify_icon.h | 6 +++--- shell/browser/ui/win/notify_icon_host.h | 6 +++--- shell/browser/ui/win/taskbar_host.h | 6 +++--- shell/browser/ui/x/event_disabler.h | 6 +++--- shell/browser/ui/x/window_state_watcher.h | 6 +++--- shell/browser/ui/x/x_window_utils.h | 6 +++--- shell/browser/unresponsive_suppressor.h | 6 +++--- .../browser/web_contents_permission_helper.h | 6 +++--- shell/browser/web_contents_preferences.h | 6 +++--- shell/browser/web_contents_zoom_controller.h | 6 +++--- shell/browser/web_view_guest_delegate.h | 6 +++--- shell/browser/web_view_manager.h | 6 +++--- shell/browser/win/dark_mode.h | 6 +++--- shell/browser/win/scoped_hstring.h | 6 +++--- shell/browser/window_list.h | 6 +++--- shell/browser/window_list_observer.h | 6 +++--- shell/browser/zoom_level_delegate.h | 6 +++--- shell/common/api/electron_api_clipboard.h | 6 +++--- shell/common/api/electron_api_key_weak_map.h | 6 +++--- shell/common/api/electron_api_native_image.h | 6 +++--- shell/common/api/electron_bindings.h | 6 +++--- shell/common/api/object_life_monitor.h | 6 +++--- shell/common/application_info.h | 6 +++--- shell/common/asar/archive.h | 6 +++--- shell/common/asar/asar_util.h | 6 +++--- shell/common/asar/scoped_temporary_file.h | 6 +++--- shell/common/color_util.h | 6 +++--- shell/common/crash_keys.h | 6 +++--- shell/common/electron_command_line.h | 6 +++--- shell/common/electron_constants.h | 6 +++--- shell/common/electron_paths.h | 6 +++--- .../electron_extensions_api_provider.h | 6 +++--- .../extensions/electron_extensions_client.h | 6 +++--- .../gin_converters/accelerator_converter.h | 6 +++--- shell/common/gin_converters/base_converter.h | 6 +++--- shell/common/gin_converters/blink_converter.h | 6 +++--- .../gin_converters/callback_converter.h | 6 +++--- .../common/gin_converters/content_converter.h | 6 +++--- .../gin_converters/extension_converter.h | 6 +++--- .../gin_converters/file_dialog_converter.h | 6 +++--- .../gin_converters/file_path_converter.h | 6 +++--- shell/common/gin_converters/frame_converter.h | 6 +++--- shell/common/gin_converters/gfx_converter.h | 6 +++--- shell/common/gin_converters/guid_converter.h | 6 +++--- shell/common/gin_converters/gurl_converter.h | 6 +++--- shell/common/gin_converters/image_converter.h | 6 +++--- .../gin_converters/message_box_converter.h | 6 +++--- .../gin_converters/native_window_converter.h | 6 +++--- shell/common/gin_converters/net_converter.h | 6 +++--- shell/common/gin_converters/std_converter.h | 6 +++--- shell/common/gin_converters/time_converter.h | 6 +++--- shell/common/gin_converters/value_converter.h | 6 +++--- shell/common/gin_helper/accessor.h | 6 +++--- shell/common/gin_helper/arguments.h | 6 +++--- shell/common/gin_helper/callback.h | 6 +++--- shell/common/gin_helper/cleaned_up_at_exit.h | 6 +++--- shell/common/gin_helper/constructible.h | 6 +++--- shell/common/gin_helper/constructor.h | 6 +++--- shell/common/gin_helper/destroyable.h | 6 +++--- shell/common/gin_helper/dictionary.h | 6 +++--- shell/common/gin_helper/error_thrower.h | 6 +++--- shell/common/gin_helper/event_emitter.h | 6 +++--- .../common/gin_helper/event_emitter_caller.h | 6 +++--- shell/common/gin_helper/function_template.h | 6 +++--- .../gin_helper/function_template_extensions.h | 6 +++--- shell/common/gin_helper/locker.h | 6 +++--- shell/common/gin_helper/microtasks_scope.h | 6 +++--- .../gin_helper/object_template_builder.h | 6 +++--- .../common/gin_helper/persistent_dictionary.h | 6 +++--- shell/common/gin_helper/pinnable.h | 6 +++--- shell/common/gin_helper/promise.h | 6 +++--- shell/common/gin_helper/trackable_object.h | 6 +++--- shell/common/gin_helper/wrappable.h | 6 +++--- shell/common/gin_helper/wrappable_base.h | 6 +++--- shell/common/heap_snapshot.h | 6 +++--- shell/common/key_weak_map.h | 6 +++--- shell/common/keyboard_util.h | 6 +++--- shell/common/language_util.h | 6 +++--- shell/common/logging.h | 6 +++--- shell/common/mac/main_application_bundle.h | 6 +++--- shell/common/mouse_util.h | 6 +++--- shell/common/node_bindings.h | 6 +++--- shell/common/node_bindings_linux.h | 6 +++--- shell/common/node_bindings_mac.h | 6 +++--- shell/common/node_bindings_win.h | 6 +++--- shell/common/node_includes.h | 6 +++--- shell/common/node_util.h | 6 +++--- shell/common/options_switches.h | 6 +++--- shell/common/platform_util.h | 6 +++--- shell/common/platform_util_internal.h | 6 +++--- shell/common/process_util.h | 6 +++--- shell/common/skia_util.h | 6 +++--- shell/common/v8_value_converter.h | 6 +++--- shell/common/v8_value_serializer.h | 6 +++--- shell/common/world_ids.h | 6 +++--- .../api/context_bridge/object_cache.h | 6 +++--- .../api/electron_api_context_bridge.h | 6 +++--- .../api/electron_api_spell_check_client.h | 6 +++--- .../browser_exposed_renderer_interfaces.h | 6 +++--- shell/renderer/content_settings_observer.h | 6 +++--- shell/renderer/electron_api_service_impl.h | 6 +++--- shell/renderer/electron_autofill_agent.h | 6 +++--- .../renderer/electron_render_frame_observer.h | 6 +++--- shell/renderer/electron_renderer_client.h | 6 +++--- .../electron_renderer_pepper_host_factory.h | 6 +++--- .../electron_sandboxed_renderer_client.h | 6 +++--- .../electron_extensions_dispatcher_delegate.h | 6 +++--- .../electron_extensions_renderer_client.h | 6 +++--- shell/renderer/guest_view_container.h | 6 +++--- shell/renderer/pepper_helper.h | 6 +++--- .../print_render_frame_helper_delegate.h | 6 +++--- shell/renderer/renderer_client_base.h | 6 +++--- shell/renderer/web_worker_observer.h | 6 +++--- .../utility/electron_content_utility_client.h | 6 +++--- 358 files changed, 1080 insertions(+), 1079 deletions(-) diff --git a/docs/development/creating-api.md b/docs/development/creating-api.md index 836a2f9601ee3..6b6527c66c424 100644 --- a/docs/development/creating-api.md +++ b/docs/development/creating-api.md @@ -50,8 +50,8 @@ In your `api_name.h` file: ```cpp title='api_name.h' -#ifndef SHELL_BROWSER_API_ELECTRON_API_{API_NAME}_H_ -#define SHELL_BROWSER_API_ELECTRON_API_{API_NAME}_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_{API_NAME}_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_{API_NAME}_H_ #include "gin/handle.h" #include "gin/wrappable.h" diff --git a/script/lint.js b/script/lint.js index b6bb2bd15722a..a66423bb0f305 100755 --- a/script/lint.js +++ b/script/lint.js @@ -9,8 +9,9 @@ const klaw = require('klaw'); const minimist = require('minimist'); const path = require('path'); -const SOURCE_ROOT = path.normalize(path.dirname(__dirname)); -const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, '..', 'third_party', 'depot_tools'); +const ELECTRON_ROOT = path.normalize(path.dirname(__dirname)); +const SOURCE_ROOT = path.resolve(ELECTRON_ROOT, '..'); +const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, 'third_party', 'depot_tools'); const IGNORELIST = new Set([ ['shell', 'browser', 'resources', 'win', 'resource.h'], @@ -19,7 +20,7 @@ const IGNORELIST = new Set([ ['spec', 'ts-smoke', 'electron', 'main.ts'], ['spec', 'ts-smoke', 'electron', 'renderer.ts'], ['spec', 'ts-smoke', 'runner.js'] -].map(tokens => path.join(SOURCE_ROOT, ...tokens))); +].map(tokens => path.join(ELECTRON_ROOT, ...tokens))); const IS_WINDOWS = process.platform === 'win32'; @@ -101,7 +102,7 @@ const LINTERS = [{ run: (opts, filenames) => { const rcfile = path.join(DEPOT_TOOLS, 'pylintrc'); const args = ['--rcfile=' + rcfile, ...filenames]; - const env = Object.assign({ PYTHONPATH: path.join(SOURCE_ROOT, 'script') }, process.env); + const env = Object.assign({ PYTHONPATH: path.join(ELECTRON_ROOT, 'script') }, process.env); spawnAndCheckExitCode('pylint', args, { env }); } }, { @@ -142,7 +143,7 @@ const LINTERS = [{ run: (opts, filenames) => { const allOk = filenames.map(filename => { const env = Object.assign({ - CHROMIUM_BUILDTOOLS_PATH: path.resolve(SOURCE_ROOT, '..', 'buildtools'), + CHROMIUM_BUILDTOOLS_PATH: path.resolve(ELECTRON_ROOT, '..', 'buildtools'), DEPOT_TOOLS_WIN_TOOLCHAIN: '0' }, process.env); // Users may not have depot_tools in PATH. @@ -277,7 +278,7 @@ async function findFiles (args, linter) { // build the includelist if (args.changed) { - includelist = await findChangedFiles(SOURCE_ROOT); + includelist = await findChangedFiles(ELECTRON_ROOT); if (!includelist.size) { return []; } @@ -287,12 +288,12 @@ async function findFiles (args, linter) { // accumulate the raw list of files for (const root of linter.roots) { - const files = await findMatchingFiles(path.join(SOURCE_ROOT, root), linter.test); + const files = await findMatchingFiles(path.join(ELECTRON_ROOT, root), linter.test); filenames.push(...files); } for (const ignoreRoot of (linter.ignoreRoots) || []) { - const ignorePath = path.join(SOURCE_ROOT, ignoreRoot); + const ignorePath = path.join(ELECTRON_ROOT, ignoreRoot); if (!fs.existsSync(ignorePath)) continue; const ignoreFiles = new Set(await findMatchingFiles(ignorePath, linter.test)); @@ -310,7 +311,7 @@ async function findFiles (args, linter) { // it's important that filenames be relative otherwise clang-format will // produce patches with absolute paths in them, which `git apply` will refuse // to apply. - return filenames.map(x => path.relative(SOURCE_ROOT, x)); + return filenames.map(x => path.relative(ELECTRON_ROOT, x)); } async function main () { diff --git a/shell/app/command_line_args.h b/shell/app/command_line_args.h index 913176c6d3175..70e1e6b0579b8 100644 --- a/shell/app/command_line_args.h +++ b/shell/app/command_line_args.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_APP_COMMAND_LINE_ARGS_H_ -#define SHELL_APP_COMMAND_LINE_ARGS_H_ +#ifndef ELECTRON_SHELL_APP_COMMAND_LINE_ARGS_H_ +#define ELECTRON_SHELL_APP_COMMAND_LINE_ARGS_H_ #include "base/command_line.h" @@ -14,4 +14,4 @@ bool IsSandboxEnabled(base::CommandLine* command_line); } // namespace electron -#endif // SHELL_APP_COMMAND_LINE_ARGS_H_ +#endif // ELECTRON_SHELL_APP_COMMAND_LINE_ARGS_H_ diff --git a/shell/app/electron_content_client.h b/shell/app/electron_content_client.h index 0a4df8c439ad1..3caefdbafec92 100644 --- a/shell/app/electron_content_client.h +++ b/shell/app/electron_content_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_APP_ELECTRON_CONTENT_CLIENT_H_ -#define SHELL_APP_ELECTRON_CONTENT_CLIENT_H_ +#ifndef ELECTRON_SHELL_APP_ELECTRON_CONTENT_CLIENT_H_ +#define ELECTRON_SHELL_APP_ELECTRON_CONTENT_CLIENT_H_ #include @@ -38,4 +38,4 @@ class ElectronContentClient : public content::ContentClient { } // namespace electron -#endif // SHELL_APP_ELECTRON_CONTENT_CLIENT_H_ +#endif // ELECTRON_SHELL_APP_ELECTRON_CONTENT_CLIENT_H_ diff --git a/shell/app/electron_crash_reporter_client.h b/shell/app/electron_crash_reporter_client.h index 3b074f139dc7c..bfe039e6a1943 100644 --- a/shell/app/electron_crash_reporter_client.h +++ b/shell/app/electron_crash_reporter_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_APP_ELECTRON_CRASH_REPORTER_CLIENT_H_ -#define SHELL_APP_ELECTRON_CRASH_REPORTER_CLIENT_H_ +#ifndef ELECTRON_SHELL_APP_ELECTRON_CRASH_REPORTER_CLIENT_H_ +#define ELECTRON_SHELL_APP_ELECTRON_CRASH_REPORTER_CLIENT_H_ #include #include @@ -91,4 +91,4 @@ class ElectronCrashReporterClient : public crash_reporter::CrashReporterClient { ~ElectronCrashReporterClient() override; }; -#endif // SHELL_APP_ELECTRON_CRASH_REPORTER_CLIENT_H_ +#endif // ELECTRON_SHELL_APP_ELECTRON_CRASH_REPORTER_CLIENT_H_ diff --git a/shell/app/electron_library_main.h b/shell/app/electron_library_main.h index 947342867937a..d847ee074eb43 100644 --- a/shell/app/electron_library_main.h +++ b/shell/app/electron_library_main.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_APP_ELECTRON_LIBRARY_MAIN_H_ -#define SHELL_APP_ELECTRON_LIBRARY_MAIN_H_ +#ifndef ELECTRON_SHELL_APP_ELECTRON_LIBRARY_MAIN_H_ +#define ELECTRON_SHELL_APP_ELECTRON_LIBRARY_MAIN_H_ #include "build/build_config.h" #include "electron/buildflags/buildflags.h" @@ -20,4 +20,4 @@ __attribute__((visibility("default"))) int ElectronInitializeICUandStartNode( } #endif // OS_MAC -#endif // SHELL_APP_ELECTRON_LIBRARY_MAIN_H_ +#endif // ELECTRON_SHELL_APP_ELECTRON_LIBRARY_MAIN_H_ diff --git a/shell/app/electron_main.h b/shell/app/electron_main.h index b49e5576e95f2..aa75d6faadf54 100644 --- a/shell/app/electron_main.h +++ b/shell/app/electron_main.h @@ -2,9 +2,9 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_APP_ELECTRON_MAIN_H_ -#define SHELL_APP_ELECTRON_MAIN_H_ +#ifndef ELECTRON_SHELL_APP_ELECTRON_MAIN_H_ +#define ELECTRON_SHELL_APP_ELECTRON_MAIN_H_ #include "content/public/app/content_main.h" -#endif // SHELL_APP_ELECTRON_MAIN_H_ +#endif // ELECTRON_SHELL_APP_ELECTRON_MAIN_H_ diff --git a/shell/app/electron_main_delegate.h b/shell/app/electron_main_delegate.h index 7818acf5e0c48..ff7f5e923b780 100644 --- a/shell/app/electron_main_delegate.h +++ b/shell/app/electron_main_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_APP_ELECTRON_MAIN_DELEGATE_H_ -#define SHELL_APP_ELECTRON_MAIN_DELEGATE_H_ +#ifndef ELECTRON_SHELL_APP_ELECTRON_MAIN_DELEGATE_H_ +#define ELECTRON_SHELL_APP_ELECTRON_MAIN_DELEGATE_H_ #include #include @@ -66,4 +66,4 @@ class ElectronMainDelegate : public content::ContentMainDelegate { } // namespace electron -#endif // SHELL_APP_ELECTRON_MAIN_DELEGATE_H_ +#endif // ELECTRON_SHELL_APP_ELECTRON_MAIN_DELEGATE_H_ diff --git a/shell/app/electron_main_delegate_mac.h b/shell/app/electron_main_delegate_mac.h index dc4004608cf23..0550bd3a04c8a 100644 --- a/shell/app/electron_main_delegate_mac.h +++ b/shell/app/electron_main_delegate_mac.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_ -#define SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_ +#ifndef ELECTRON_SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_ +#define ELECTRON_SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_ namespace electron { @@ -12,4 +12,4 @@ void RegisterAtomCrApp(); } // namespace electron -#endif // SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_ +#endif // ELECTRON_SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_ diff --git a/shell/app/node_main.h b/shell/app/node_main.h index e5168f51a3af5..9aaa91b8dc558 100644 --- a/shell/app/node_main.h +++ b/shell/app/node_main.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_APP_NODE_MAIN_H_ -#define SHELL_APP_NODE_MAIN_H_ +#ifndef ELECTRON_SHELL_APP_NODE_MAIN_H_ +#define ELECTRON_SHELL_APP_NODE_MAIN_H_ namespace electron { @@ -11,4 +11,4 @@ int NodeMain(int argc, char* argv[]); } // namespace electron -#endif // SHELL_APP_NODE_MAIN_H_ +#endif // ELECTRON_SHELL_APP_NODE_MAIN_H_ diff --git a/shell/app/uv_task_runner.h b/shell/app/uv_task_runner.h index e6c1477182c0d..1d74b28d7c7d8 100644 --- a/shell/app/uv_task_runner.h +++ b/shell/app/uv_task_runner.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_APP_UV_TASK_RUNNER_H_ -#define SHELL_APP_UV_TASK_RUNNER_H_ +#ifndef ELECTRON_SHELL_APP_UV_TASK_RUNNER_H_ +#define ELECTRON_SHELL_APP_UV_TASK_RUNNER_H_ #include @@ -47,4 +47,4 @@ class UvTaskRunner : public base::SingleThreadTaskRunner { } // namespace electron -#endif // SHELL_APP_UV_TASK_RUNNER_H_ +#endif // ELECTRON_SHELL_APP_UV_TASK_RUNNER_H_ diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index 229e54b35e1e9..4f48584e996d5 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_APP_H_ -#define SHELL_BROWSER_API_ELECTRON_API_APP_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_APP_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_APP_H_ #include #include @@ -271,4 +271,4 @@ class App : public ElectronBrowserClient::Delegate, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_APP_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_APP_H_ diff --git a/shell/browser/api/electron_api_auto_updater.h b/shell/browser/api/electron_api_auto_updater.h index 54202e5bdf87a..6cbb7440cff5a 100644 --- a/shell/browser/api/electron_api_auto_updater.h +++ b/shell/browser/api/electron_api_auto_updater.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_ -#define SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_ #include @@ -64,4 +64,4 @@ class AutoUpdater : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_ diff --git a/shell/browser/api/electron_api_base_window.h b/shell/browser/api/electron_api_base_window.h index 2adb90b1c694d..04ae990ab153a 100644 --- a/shell/browser/api/electron_api_base_window.h +++ b/shell/browser/api/electron_api_base_window.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_BASE_WINDOW_H_ -#define SHELL_BROWSER_API_ELECTRON_API_BASE_WINDOW_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BASE_WINDOW_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BASE_WINDOW_H_ #include #include @@ -287,4 +287,4 @@ class BaseWindow : public gin_helper::TrackableObject, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_BASE_WINDOW_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BASE_WINDOW_H_ diff --git a/shell/browser/api/electron_api_browser_view.h b/shell/browser/api/electron_api_browser_view.h index 4ab4b04f5ebb1..f635b0d8de817 100644 --- a/shell/browser/api/electron_api_browser_view.h +++ b/shell/browser/api/electron_api_browser_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_ -#define SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_ #include #include @@ -94,4 +94,4 @@ class BrowserView : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_ diff --git a/shell/browser/api/electron_api_browser_window.h b/shell/browser/api/electron_api_browser_window.h index 198a7bc825a1f..296ed2b3f8c2e 100644 --- a/shell/browser/api/electron_api_browser_window.h +++ b/shell/browser/api/electron_api_browser_window.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_ -#define SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_ #include #include @@ -133,4 +133,4 @@ class BrowserWindow : public BaseWindow, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_ diff --git a/shell/browser/api/electron_api_cookies.h b/shell/browser/api/electron_api_cookies.h index 2d949e71fd355..fbfa335ce9f8a 100644 --- a/shell/browser/api/electron_api_cookies.h +++ b/shell/browser/api/electron_api_cookies.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_ -#define SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_ #include @@ -72,4 +72,4 @@ class Cookies : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_ diff --git a/shell/browser/api/electron_api_crash_reporter.h b/shell/browser/api/electron_api_crash_reporter.h index 8780a8e81b80e..48f540287f9ef 100644 --- a/shell/browser/api/electron_api_crash_reporter.h +++ b/shell/browser/api/electron_api_crash_reporter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_CRASH_REPORTER_H_ -#define SHELL_BROWSER_API_ELECTRON_API_CRASH_REPORTER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_CRASH_REPORTER_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_CRASH_REPORTER_H_ #include #include @@ -38,4 +38,4 @@ void Start(const std::string& submit_url, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_CRASH_REPORTER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_CRASH_REPORTER_H_ diff --git a/shell/browser/api/electron_api_data_pipe_holder.h b/shell/browser/api/electron_api_data_pipe_holder.h index a8ea87ef4157d..535440d26838a 100644 --- a/shell/browser/api/electron_api_data_pipe_holder.h +++ b/shell/browser/api/electron_api_data_pipe_holder.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_ -#define SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_ #include @@ -53,4 +53,4 @@ class DataPipeHolder : public gin::Wrappable { } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_ diff --git a/shell/browser/api/electron_api_debugger.h b/shell/browser/api/electron_api_debugger.h index 37892e43b916e..204cd42365ebf 100644 --- a/shell/browser/api/electron_api_debugger.h +++ b/shell/browser/api/electron_api_debugger.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_ -#define SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_ #include @@ -78,4 +78,4 @@ class Debugger : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_ diff --git a/shell/browser/api/electron_api_desktop_capturer.h b/shell/browser/api/electron_api_desktop_capturer.h index e3b2fa3e18747..b31686e853ff0 100644 --- a/shell/browser/api/electron_api_desktop_capturer.h +++ b/shell/browser/api/electron_api_desktop_capturer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_ -#define SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_ #include #include @@ -81,4 +81,4 @@ class DesktopCapturer : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_ diff --git a/shell/browser/api/electron_api_download_item.h b/shell/browser/api/electron_api_download_item.h index c080202be4e23..4ca867baf52f7 100644 --- a/shell/browser/api/electron_api_download_item.h +++ b/shell/browser/api/electron_api_download_item.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_ -#define SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_ #include @@ -91,4 +91,4 @@ class DownloadItem : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_ diff --git a/shell/browser/api/electron_api_event_emitter.h b/shell/browser/api/electron_api_event_emitter.h index ab20c7c5fb8fe..35baadcc38af0 100644 --- a/shell/browser/api/electron_api_event_emitter.h +++ b/shell/browser/api/electron_api_event_emitter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_EVENT_EMITTER_H_ -#define SHELL_BROWSER_API_ELECTRON_API_EVENT_EMITTER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_EVENT_EMITTER_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_EVENT_EMITTER_H_ namespace v8 { template @@ -18,4 +18,4 @@ v8::Local GetEventEmitterPrototype(v8::Isolate* isolate); } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_EVENT_EMITTER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_EVENT_EMITTER_H_ diff --git a/shell/browser/api/electron_api_global_shortcut.h b/shell/browser/api/electron_api_global_shortcut.h index 9c1d82ee9d9e0..19a86fe2963d1 100644 --- a/shell/browser/api/electron_api_global_shortcut.h +++ b/shell/browser/api/electron_api_global_shortcut.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_ -#define SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_ #include #include @@ -60,4 +60,4 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_ diff --git a/shell/browser/api/electron_api_in_app_purchase.h b/shell/browser/api/electron_api_in_app_purchase.h index b2bc81fe571e8..bd765bb178789 100644 --- a/shell/browser/api/electron_api_in_app_purchase.h +++ b/shell/browser/api/electron_api_in_app_purchase.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_ -#define SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_ #include #include @@ -55,4 +55,4 @@ class InAppPurchase : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_ diff --git a/shell/browser/api/electron_api_menu.h b/shell/browser/api/electron_api_menu.h index d6ebcc3442528..5841862bda78f 100644 --- a/shell/browser/api/electron_api_menu.h +++ b/shell/browser/api/electron_api_menu.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_H_ -#define SHELL_BROWSER_API_ELECTRON_API_MENU_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_H_ #include #include @@ -150,4 +150,4 @@ struct Converter { } // namespace gin -#endif // SHELL_BROWSER_API_ELECTRON_API_MENU_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_H_ diff --git a/shell/browser/api/electron_api_menu_mac.h b/shell/browser/api/electron_api_menu_mac.h index c16957fcd23b7..f47276ea8d848 100644 --- a/shell/browser/api/electron_api_menu_mac.h +++ b/shell/browser/api/electron_api_menu_mac.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_ -#define SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_ #include "shell/browser/api/electron_api_menu.h" @@ -54,4 +54,4 @@ class MenuMac : public Menu { } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_ diff --git a/shell/browser/api/electron_api_menu_views.h b/shell/browser/api/electron_api_menu_views.h index cd288625c43c8..a0d40f9354a06 100644 --- a/shell/browser/api/electron_api_menu_views.h +++ b/shell/browser/api/electron_api_menu_views.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_ -#define SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_ #include #include @@ -43,4 +43,4 @@ class MenuViews : public Menu { } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_ diff --git a/shell/browser/api/electron_api_native_theme.h b/shell/browser/api/electron_api_native_theme.h index b717ca7a10aed..d66e7713ded05 100644 --- a/shell/browser/api/electron_api_native_theme.h +++ b/shell/browser/api/electron_api_native_theme.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_ -#define SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_ #include "gin/handle.h" #include "gin/wrappable.h" @@ -73,4 +73,4 @@ struct Converter { } // namespace gin -#endif // SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_ diff --git a/shell/browser/api/electron_api_net_log.h b/shell/browser/api/electron_api_net_log.h index a1934f9630563..30a6ad6981a1d 100644 --- a/shell/browser/api/electron_api_net_log.h +++ b/shell/browser/api/electron_api_net_log.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_ -#define SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_ #include "base/callback.h" #include "base/files/file_path.h" @@ -77,4 +77,4 @@ class NetLog : public gin::Wrappable { } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_ diff --git a/shell/browser/api/electron_api_notification.h b/shell/browser/api/electron_api_notification.h index bd03a295823d0..8213c424ee64d 100644 --- a/shell/browser/api/electron_api_notification.h +++ b/shell/browser/api/electron_api_notification.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_ -#define SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_ #include #include @@ -121,4 +121,4 @@ class Notification : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_ diff --git a/shell/browser/api/electron_api_power_monitor.h b/shell/browser/api/electron_api_power_monitor.h index 6a84b32a35513..c277d3e2b2960 100644 --- a/shell/browser/api/electron_api_power_monitor.h +++ b/shell/browser/api/electron_api_power_monitor.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_ -#define SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_ #include "base/power_monitor/power_observer.h" #include "gin/wrappable.h" @@ -90,4 +90,4 @@ class PowerMonitor : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_ diff --git a/shell/browser/api/electron_api_power_save_blocker.h b/shell/browser/api/electron_api_power_save_blocker.h index 6216fa0dce097..74a08f55e4413 100644 --- a/shell/browser/api/electron_api_power_save_blocker.h +++ b/shell/browser/api/electron_api_power_save_blocker.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_ -#define SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_ #include @@ -60,4 +60,4 @@ class PowerSaveBlocker : public gin::Wrappable { } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_ diff --git a/shell/browser/api/electron_api_protocol.h b/shell/browser/api/electron_api_protocol.h index d0420ff14ad9e..46fe33667e550 100644 --- a/shell/browser/api/electron_api_protocol.h +++ b/shell/browser/api/electron_api_protocol.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_ -#define SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_ #include #include @@ -103,4 +103,4 @@ class Protocol : public gin::Wrappable { } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_ diff --git a/shell/browser/api/electron_api_safe_storage.h b/shell/browser/api/electron_api_safe_storage.h index bcaf6d1e9b3cb..d312769a3f53d 100644 --- a/shell/browser/api/electron_api_safe_storage.h +++ b/shell/browser/api/electron_api_safe_storage.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_SAFE_STORAGE_H_ -#define SHELL_BROWSER_API_ELECTRON_API_SAFE_STORAGE_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SAFE_STORAGE_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SAFE_STORAGE_H_ #include "base/dcheck_is_on.h" @@ -22,4 +22,4 @@ void SetElectronCryptoReady(bool ready); } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_SAFE_STORAGE_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SAFE_STORAGE_H_ diff --git a/shell/browser/api/electron_api_screen.h b/shell/browser/api/electron_api_screen.h index 1283544f3338c..a8121b9ce54cc 100644 --- a/shell/browser/api/electron_api_screen.h +++ b/shell/browser/api/electron_api_screen.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_ -#define SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_ #include @@ -62,4 +62,4 @@ class Screen : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_ diff --git a/shell/browser/api/electron_api_service_worker_context.h b/shell/browser/api/electron_api_service_worker_context.h index 4d2a84d055282..048bcda7162ba 100644 --- a/shell/browser/api/electron_api_service_worker_context.h +++ b/shell/browser/api/electron_api_service_worker_context.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_ -#define SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_ #include "content/public/browser/service_worker_context.h" #include "content/public/browser/service_worker_context_observer.h" @@ -62,4 +62,4 @@ class ServiceWorkerContext } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SERVICE_WORKER_CONTEXT_H_ diff --git a/shell/browser/api/electron_api_session.h b/shell/browser/api/electron_api_session.h index 79eedd91c4710..aedf234d38a58 100644 --- a/shell/browser/api/electron_api_session.h +++ b/shell/browser/api/electron_api_session.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_SESSION_H_ -#define SHELL_BROWSER_API_ELECTRON_API_SESSION_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SESSION_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SESSION_H_ #include #include @@ -197,4 +197,4 @@ class Session : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_SESSION_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SESSION_H_ diff --git a/shell/browser/api/electron_api_system_preferences.h b/shell/browser/api/electron_api_system_preferences.h index 8c8ee40dadb22..8dbf35d591958 100644 --- a/shell/browser/api/electron_api_system_preferences.h +++ b/shell/browser/api/electron_api_system_preferences.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_ -#define SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_ #include #include @@ -172,4 +172,4 @@ class SystemPreferences } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_ diff --git a/shell/browser/api/electron_api_tray.h b/shell/browser/api/electron_api_tray.h index 659ed2f41d8bb..19a28eef23713 100644 --- a/shell/browser/api/electron_api_tray.h +++ b/shell/browser/api/electron_api_tray.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_TRAY_H_ -#define SHELL_BROWSER_API_ELECTRON_API_TRAY_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_TRAY_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_TRAY_H_ #include #include @@ -115,4 +115,4 @@ class Tray : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_TRAY_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_TRAY_H_ diff --git a/shell/browser/api/electron_api_url_loader.h b/shell/browser/api/electron_api_url_loader.h index dac2c494845e4..6726f2c4b41ae 100644 --- a/shell/browser/api/electron_api_url_loader.h +++ b/shell/browser/api/electron_api_url_loader.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_ -#define SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_ #include #include @@ -125,4 +125,4 @@ class SimpleURLLoaderWrapper } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_ diff --git a/shell/browser/api/electron_api_view.h b/shell/browser/api/electron_api_view.h index 0672499a06dc5..ed2e483de0e25 100644 --- a/shell/browser/api/electron_api_view.h +++ b/shell/browser/api/electron_api_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_VIEW_H_ -#define SHELL_BROWSER_API_ELECTRON_API_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_VIEW_H_ #include @@ -53,4 +53,4 @@ class View : public gin_helper::Wrappable { } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_VIEW_H_ diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index e1287b303fd5f..c164d4bee7114 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_ -#define SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_ #include #include @@ -830,4 +830,4 @@ class WebContents : public ExclusiveAccessContext, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_ diff --git a/shell/browser/api/electron_api_web_contents_view.h b/shell/browser/api/electron_api_web_contents_view.h index c184533d0e924..d1f39ff26ef5d 100644 --- a/shell/browser/api/electron_api_web_contents_view.h +++ b/shell/browser/api/electron_api_web_contents_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_ -#define SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_ #include "content/public/browser/web_contents_observer.h" #include "shell/browser/api/electron_api_view.h" @@ -57,4 +57,4 @@ class WebContentsView : public View, public content::WebContentsObserver { } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_ diff --git a/shell/browser/api/electron_api_web_frame_main.h b/shell/browser/api/electron_api_web_frame_main.h index 61cabf0825d14..23a3b657fd45c 100644 --- a/shell/browser/api/electron_api_web_frame_main.h +++ b/shell/browser/api/electron_api_web_frame_main.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_FRAME_MAIN_H_ -#define SHELL_BROWSER_API_ELECTRON_API_WEB_FRAME_MAIN_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_FRAME_MAIN_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_FRAME_MAIN_H_ #include #include @@ -134,4 +134,4 @@ class WebFrameMain : public gin::Wrappable, } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_FRAME_MAIN_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_FRAME_MAIN_H_ diff --git a/shell/browser/api/electron_api_web_request.h b/shell/browser/api/electron_api_web_request.h index 8b7b25bd1d7cf..fb8bee6a3c6ed 100644 --- a/shell/browser/api/electron_api_web_request.h +++ b/shell/browser/api/electron_api_web_request.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_ -#define SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_ +#define ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_ #include #include @@ -155,4 +155,4 @@ class WebRequest : public gin::Wrappable, public WebRequestAPI { } // namespace electron -#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_ +#endif // ELECTRON_SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_ diff --git a/shell/browser/api/event.h b/shell/browser/api/event.h index af20cfb8d311d..4a09575896e11 100644 --- a/shell/browser/api/event.h +++ b/shell/browser/api/event.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_EVENT_H_ -#define SHELL_BROWSER_API_EVENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_EVENT_H_ +#define ELECTRON_SHELL_BROWSER_API_EVENT_H_ #include "electron/shell/common/api/api.mojom.h" #include "gin/handle.h" @@ -49,4 +49,4 @@ class Event : public gin::Wrappable { } // namespace gin_helper -#endif // SHELL_BROWSER_API_EVENT_H_ +#endif // ELECTRON_SHELL_BROWSER_API_EVENT_H_ diff --git a/shell/browser/api/frame_subscriber.h b/shell/browser/api/frame_subscriber.h index 782d8997fd437..1197a83a80e18 100644 --- a/shell/browser/api/frame_subscriber.h +++ b/shell/browser/api/frame_subscriber.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_ -#define SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_ +#define ELECTRON_SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_ #include #include @@ -79,4 +79,4 @@ class FrameSubscriber : public content::WebContentsObserver, } // namespace electron -#endif // SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_ diff --git a/shell/browser/api/gpu_info_enumerator.h b/shell/browser/api/gpu_info_enumerator.h index aa4db848671da..389aa9d604d48 100644 --- a/shell/browser/api/gpu_info_enumerator.h +++ b/shell/browser/api/gpu_info_enumerator.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_GPU_INFO_ENUMERATOR_H_ -#define SHELL_BROWSER_API_GPU_INFO_ENUMERATOR_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_GPU_INFO_ENUMERATOR_H_ +#define ELECTRON_SHELL_BROWSER_API_GPU_INFO_ENUMERATOR_H_ #include #include @@ -59,4 +59,4 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator { }; } // namespace electron -#endif // SHELL_BROWSER_API_GPU_INFO_ENUMERATOR_H_ +#endif // ELECTRON_SHELL_BROWSER_API_GPU_INFO_ENUMERATOR_H_ diff --git a/shell/browser/api/gpuinfo_manager.h b/shell/browser/api/gpuinfo_manager.h index ae59f7f4dc9fa..43357ececc22b 100644 --- a/shell/browser/api/gpuinfo_manager.h +++ b/shell/browser/api/gpuinfo_manager.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_GPUINFO_MANAGER_H_ -#define SHELL_BROWSER_API_GPUINFO_MANAGER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_GPUINFO_MANAGER_H_ +#define ELECTRON_SHELL_BROWSER_API_GPUINFO_MANAGER_H_ #include #include @@ -48,4 +48,4 @@ class GPUInfoManager : public content::GpuDataManagerObserver { }; } // namespace electron -#endif // SHELL_BROWSER_API_GPUINFO_MANAGER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_GPUINFO_MANAGER_H_ diff --git a/shell/browser/api/message_port.h b/shell/browser/api/message_port.h index d46f077afe448..6562018de89c0 100644 --- a/shell/browser/api/message_port.h +++ b/shell/browser/api/message_port.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_MESSAGE_PORT_H_ -#define SHELL_BROWSER_API_MESSAGE_PORT_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_MESSAGE_PORT_H_ +#define ELECTRON_SHELL_BROWSER_API_MESSAGE_PORT_H_ #include #include @@ -88,4 +88,4 @@ class MessagePort : public gin::Wrappable, mojo::MessageReceiver { } // namespace electron -#endif // SHELL_BROWSER_API_MESSAGE_PORT_H_ +#endif // ELECTRON_SHELL_BROWSER_API_MESSAGE_PORT_H_ diff --git a/shell/browser/api/process_metric.h b/shell/browser/api/process_metric.h index 6c83e8403227b..a6b91fff70cf7 100644 --- a/shell/browser/api/process_metric.h +++ b/shell/browser/api/process_metric.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_PROCESS_METRIC_H_ -#define SHELL_BROWSER_API_PROCESS_METRIC_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_PROCESS_METRIC_H_ +#define ELECTRON_SHELL_BROWSER_API_PROCESS_METRIC_H_ #include #include @@ -62,4 +62,4 @@ struct ProcessMetric { } // namespace electron -#endif // SHELL_BROWSER_API_PROCESS_METRIC_H_ +#endif // ELECTRON_SHELL_BROWSER_API_PROCESS_METRIC_H_ diff --git a/shell/browser/api/save_page_handler.h b/shell/browser/api/save_page_handler.h index 19ec75179ae2b..00202a0d5a3f8 100644 --- a/shell/browser/api/save_page_handler.h +++ b/shell/browser/api/save_page_handler.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_ -#define SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_ +#define ELECTRON_SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_ #include "components/download/public/common/download_item.h" #include "content/public/browser/download_manager.h" @@ -52,4 +52,4 @@ class SavePageHandler : public content::DownloadManager::Observer, } // namespace electron -#endif // SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_ +#endif // ELECTRON_SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_ diff --git a/shell/browser/api/ui_event.h b/shell/browser/api/ui_event.h index 700864fa86b03..0f0ca1eb8397c 100644 --- a/shell/browser/api/ui_event.h +++ b/shell/browser/api/ui_event.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_UI_EVENT_H_ -#define SHELL_BROWSER_API_UI_EVENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_UI_EVENT_H_ +#define ELECTRON_SHELL_BROWSER_API_UI_EVENT_H_ namespace v8 { class Object; @@ -19,4 +19,4 @@ v8::Local CreateEventFromFlags(int flags); } // namespace api } // namespace electron -#endif // SHELL_BROWSER_API_UI_EVENT_H_ +#endif // ELECTRON_SHELL_BROWSER_API_UI_EVENT_H_ diff --git a/shell/browser/api/views/electron_api_image_view.h b/shell/browser/api/views/electron_api_image_view.h index 504c2bbb25936..332caa21b23b5 100644 --- a/shell/browser/api/views/electron_api_image_view.h +++ b/shell/browser/api/views/electron_api_image_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_IMAGE_VIEW_H_ -#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_IMAGE_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_API_VIEWS_ELECTRON_API_IMAGE_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_API_VIEWS_ELECTRON_API_IMAGE_VIEW_H_ #include "gin/handle.h" #include "shell/browser/api/electron_api_view.h" @@ -36,4 +36,4 @@ class ImageView : public View { } // namespace electron -#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_IMAGE_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_API_VIEWS_ELECTRON_API_IMAGE_VIEW_H_ diff --git a/shell/browser/auto_updater.h b/shell/browser/auto_updater.h index 628ac206476ce..d9c326d6d5acf 100644 --- a/shell/browser/auto_updater.h +++ b/shell/browser/auto_updater.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_AUTO_UPDATER_H_ -#define SHELL_BROWSER_AUTO_UPDATER_H_ +#ifndef ELECTRON_SHELL_BROWSER_AUTO_UPDATER_H_ +#define ELECTRON_SHELL_BROWSER_AUTO_UPDATER_H_ #include #include @@ -76,4 +76,4 @@ class AutoUpdater { } // namespace auto_updater -#endif // SHELL_BROWSER_AUTO_UPDATER_H_ +#endif // ELECTRON_SHELL_BROWSER_AUTO_UPDATER_H_ diff --git a/shell/browser/badging/badge_manager.h b/shell/browser/badging/badge_manager.h index de5db27783310..0db3e53fb2dd1 100644 --- a/shell/browser/badging/badge_manager.h +++ b/shell/browser/badging/badge_manager.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_BADGING_BADGE_MANAGER_H_ -#define SHELL_BROWSER_BADGING_BADGE_MANAGER_H_ +#ifndef ELECTRON_SHELL_BROWSER_BADGING_BADGE_MANAGER_H_ +#define ELECTRON_SHELL_BROWSER_BADGING_BADGE_MANAGER_H_ #include #include @@ -105,4 +105,4 @@ class BadgeManager : public KeyedService, public blink::mojom::BadgeService { } // namespace badging -#endif // SHELL_BROWSER_BADGING_BADGE_MANAGER_H_ +#endif // ELECTRON_SHELL_BROWSER_BADGING_BADGE_MANAGER_H_ diff --git a/shell/browser/badging/badge_manager_factory.h b/shell/browser/badging/badge_manager_factory.h index ce5e563b98f48..dac4161cb7eb7 100644 --- a/shell/browser/badging/badge_manager_factory.h +++ b/shell/browser/badging/badge_manager_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_ -#define SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_ #include "components/keyed_service/content/browser_context_keyed_service_factory.h" @@ -42,4 +42,4 @@ class BadgeManagerFactory : public BrowserContextKeyedServiceFactory { } // namespace badging -#endif // SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_ diff --git a/shell/browser/bluetooth/electron_bluetooth_delegate.h b/shell/browser/bluetooth/electron_bluetooth_delegate.h index e4e7619112ff3..897ce2f2d31fa 100644 --- a/shell/browser/bluetooth/electron_bluetooth_delegate.h +++ b/shell/browser/bluetooth/electron_bluetooth_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_BLUETOOTH_ELECTRON_BLUETOOTH_DELEGATE_H_ -#define SHELL_BROWSER_BLUETOOTH_ELECTRON_BLUETOOTH_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_BLUETOOTH_ELECTRON_BLUETOOTH_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_BLUETOOTH_ELECTRON_BLUETOOTH_DELEGATE_H_ #include #include @@ -90,4 +90,4 @@ class ElectronBluetoothDelegate : public content::BluetoothDelegate { } // namespace electron -#endif // SHELL_BROWSER_BLUETOOTH_ELECTRON_BLUETOOTH_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_BLUETOOTH_ELECTRON_BLUETOOTH_DELEGATE_H_ diff --git a/shell/browser/browser.h b/shell/browser/browser.h index 4c5acec2f971d..a9bc9f777e744 100755 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_BROWSER_H_ -#define SHELL_BROWSER_BROWSER_H_ +#ifndef ELECTRON_SHELL_BROWSER_BROWSER_H_ +#define ELECTRON_SHELL_BROWSER_BROWSER_H_ #include #include @@ -378,4 +378,4 @@ class Browser : public WindowListObserver { } // namespace electron -#endif // SHELL_BROWSER_BROWSER_H_ +#endif // ELECTRON_SHELL_BROWSER_BROWSER_H_ diff --git a/shell/browser/browser_observer.h b/shell/browser/browser_observer.h index 5b33821c2e154..be9244f2f5e9a 100644 --- a/shell/browser/browser_observer.h +++ b/shell/browser/browser_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_BROWSER_OBSERVER_H_ -#define SHELL_BROWSER_BROWSER_OBSERVER_H_ +#ifndef ELECTRON_SHELL_BROWSER_BROWSER_OBSERVER_H_ +#define ELECTRON_SHELL_BROWSER_BROWSER_OBSERVER_H_ #include @@ -94,4 +94,4 @@ class BrowserObserver : public base::CheckedObserver { } // namespace electron -#endif // SHELL_BROWSER_BROWSER_OBSERVER_H_ +#endif // ELECTRON_SHELL_BROWSER_BROWSER_OBSERVER_H_ diff --git a/shell/browser/browser_process_impl.h b/shell/browser/browser_process_impl.h index 1d05cf22edb6a..1d42417940ab9 100644 --- a/shell/browser/browser_process_impl.h +++ b/shell/browser/browser_process_impl.h @@ -7,8 +7,8 @@ // will return NULL if the service is not available, so callers must check for // this condition. -#ifndef SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_ -#define SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_ +#ifndef ELECTRON_SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_ +#define ELECTRON_SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_ #include #include @@ -114,4 +114,4 @@ class BrowserProcessImpl : public BrowserProcess { std::string locale_; }; -#endif // SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_ +#endif // ELECTRON_SHELL_BROWSER_BROWSER_PROCESS_IMPL_H_ diff --git a/shell/browser/certificate_manager_model.h b/shell/browser/certificate_manager_model.h index e04670737e1ac..8f959dc212dd2 100644 --- a/shell/browser/certificate_manager_model.h +++ b/shell/browser/certificate_manager_model.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ -#define SHELL_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ +#ifndef ELECTRON_SHELL_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ +#define ELECTRON_SHELL_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ #include #include @@ -113,4 +113,4 @@ class CertificateManagerModel { bool is_user_db_available_; }; -#endif // SHELL_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ +#endif // ELECTRON_SHELL_BROWSER_CERTIFICATE_MANAGER_MODEL_H_ diff --git a/shell/browser/child_web_contents_tracker.h b/shell/browser/child_web_contents_tracker.h index fea53db5d83f7..c16113af7274f 100644 --- a/shell/browser/child_web_contents_tracker.h +++ b/shell/browser/child_web_contents_tracker.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_ -#define SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_ +#ifndef ELECTRON_SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_ +#define ELECTRON_SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_ #include @@ -36,4 +36,4 @@ struct ChildWebContentsTracker } // namespace electron -#endif // SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_ +#endif // ELECTRON_SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_ diff --git a/shell/browser/cookie_change_notifier.h b/shell/browser/cookie_change_notifier.h index 161b40167f7c4..be33c2b294675 100644 --- a/shell/browser/cookie_change_notifier.h +++ b/shell/browser/cookie_change_notifier.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_ -#define SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_ +#ifndef ELECTRON_SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_ +#define ELECTRON_SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_ #include "base/callback_list.h" #include "mojo/public/cpp/bindings/receiver.h" @@ -45,4 +45,4 @@ class CookieChangeNotifier : public network::mojom::CookieChangeListener { } // namespace electron -#endif // SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_ +#endif // ELECTRON_SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_ diff --git a/shell/browser/electron_autofill_driver.h b/shell/browser/electron_autofill_driver.h index 1a2fe40440503..53219ce72f147 100644 --- a/shell/browser/electron_autofill_driver.h +++ b/shell/browser/electron_autofill_driver.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_H_ -#define SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_H_ #include #include @@ -46,4 +46,4 @@ class AutofillDriver : public mojom::ElectronAutofillDriver { } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_H_ diff --git a/shell/browser/electron_autofill_driver_factory.h b/shell/browser/electron_autofill_driver_factory.h index 2c0a53afa52f2..6de143613a9be 100644 --- a/shell/browser/electron_autofill_driver_factory.h +++ b/shell/browser/electron_autofill_driver_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_FACTORY_H_ -#define SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_FACTORY_H_ #include #include @@ -55,4 +55,4 @@ class AutofillDriverFactory } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_AUTOFILL_DRIVER_FACTORY_H_ diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index 9a0db8b6fc67c..f8b20c051de1f 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_BROWSER_CLIENT_H_ -#define SHELL_BROWSER_ELECTRON_BROWSER_CLIENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_CLIENT_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_CLIENT_H_ #include #include @@ -326,4 +326,4 @@ class ElectronBrowserClient : public content::ContentBrowserClient, } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_BROWSER_CLIENT_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_CLIENT_H_ diff --git a/shell/browser/electron_browser_context.h b/shell/browser/electron_browser_context.h index 6ad18c82ee861..3a646aad02ce4 100644 --- a/shell/browser/electron_browser_context.h +++ b/shell/browser/electron_browser_context.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_BROWSER_CONTEXT_H_ -#define SHELL_BROWSER_ELECTRON_BROWSER_CONTEXT_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_CONTEXT_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_CONTEXT_H_ #include #include @@ -192,4 +192,4 @@ class ElectronBrowserContext : public content::BrowserContext { } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_BROWSER_CONTEXT_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_CONTEXT_H_ diff --git a/shell/browser/electron_browser_handler_impl.h b/shell/browser/electron_browser_handler_impl.h index 7bf62a4c5f966..f37cd56b7cd81 100644 --- a/shell/browser/electron_browser_handler_impl.h +++ b/shell/browser/electron_browser_handler_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_ -#define SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_ #include #include @@ -80,4 +80,4 @@ class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser, base::WeakPtrFactory weak_factory_{this}; }; } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_ diff --git a/shell/browser/electron_browser_main_parts.h b/shell/browser/electron_browser_main_parts.h index 43bcb75c5a865..321949ee7e89e 100644 --- a/shell/browser/electron_browser_main_parts.h +++ b/shell/browser/electron_browser_main_parts.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_BROWSER_MAIN_PARTS_H_ -#define SHELL_BROWSER_ELECTRON_BROWSER_MAIN_PARTS_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_MAIN_PARTS_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_MAIN_PARTS_H_ #include #include @@ -183,4 +183,4 @@ class ElectronBrowserMainParts : public content::BrowserMainParts { } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_BROWSER_MAIN_PARTS_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_MAIN_PARTS_H_ diff --git a/shell/browser/electron_download_manager_delegate.h b/shell/browser/electron_download_manager_delegate.h index 27539882052da..e3100e54e5f49 100644 --- a/shell/browser/electron_download_manager_delegate.h +++ b/shell/browser/electron_download_manager_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_ -#define SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_ #include "base/memory/weak_ptr.h" #include "content/public/browser/download_manager_delegate.h" @@ -64,4 +64,4 @@ class ElectronDownloadManagerDelegate } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_DOWNLOAD_MANAGER_DELEGATE_H_ diff --git a/shell/browser/electron_gpu_client.h b/shell/browser/electron_gpu_client.h index 18799c6f77232..e87accfa72630 100644 --- a/shell/browser/electron_gpu_client.h +++ b/shell/browser/electron_gpu_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_GPU_CLIENT_H_ -#define SHELL_BROWSER_ELECTRON_GPU_CLIENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_GPU_CLIENT_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_GPU_CLIENT_H_ #include "content/public/gpu/content_gpu_client.h" @@ -23,4 +23,4 @@ class ElectronGpuClient : public content::ContentGpuClient { } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_GPU_CLIENT_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_GPU_CLIENT_H_ diff --git a/shell/browser/electron_javascript_dialog_manager.h b/shell/browser/electron_javascript_dialog_manager.h index e36778696badf..42e29d9e40e1e 100644 --- a/shell/browser/electron_javascript_dialog_manager.h +++ b/shell/browser/electron_javascript_dialog_manager.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_JAVASCRIPT_DIALOG_MANAGER_H_ -#define SHELL_BROWSER_ELECTRON_JAVASCRIPT_DIALOG_MANAGER_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_JAVASCRIPT_DIALOG_MANAGER_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_JAVASCRIPT_DIALOG_MANAGER_H_ #include #include @@ -48,4 +48,4 @@ class ElectronJavaScriptDialogManager } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_JAVASCRIPT_DIALOG_MANAGER_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_JAVASCRIPT_DIALOG_MANAGER_H_ diff --git a/shell/browser/electron_navigation_throttle.h b/shell/browser/electron_navigation_throttle.h index 09d41619bdaea..5d1f5b9fea48c 100644 --- a/shell/browser/electron_navigation_throttle.h +++ b/shell/browser/electron_navigation_throttle.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_NAVIGATION_THROTTLE_H_ -#define SHELL_BROWSER_ELECTRON_NAVIGATION_THROTTLE_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_NAVIGATION_THROTTLE_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_NAVIGATION_THROTTLE_H_ #include "content/public/browser/navigation_throttle.h" @@ -29,4 +29,4 @@ class ElectronNavigationThrottle : public content::NavigationThrottle { } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_NAVIGATION_THROTTLE_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_NAVIGATION_THROTTLE_H_ diff --git a/shell/browser/electron_pdf_web_contents_helper_client.h b/shell/browser/electron_pdf_web_contents_helper_client.h index 258e006fd1b6a..22a5a203cbf4d 100644 --- a/shell/browser/electron_pdf_web_contents_helper_client.h +++ b/shell/browser/electron_pdf_web_contents_helper_client.h @@ -1,8 +1,8 @@ // Copyright (c) 2015 Slack Technologies, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_ -#define SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_ #include "components/pdf/browser/pdf_web_contents_helper_client.h" @@ -25,4 +25,4 @@ class ElectronPDFWebContentsHelperClient void SetPluginCanSave(content::WebContents* contents, bool can_save) override; }; -#endif // SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_ diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 7db062182e53b..38cedf2ebfda6 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_PERMISSION_MANAGER_H_ -#define SHELL_BROWSER_ELECTRON_PERMISSION_MANAGER_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_PERMISSION_MANAGER_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_PERMISSION_MANAGER_H_ #include #include @@ -135,4 +135,4 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_PERMISSION_MANAGER_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_PERMISSION_MANAGER_H_ diff --git a/shell/browser/electron_quota_permission_context.h b/shell/browser/electron_quota_permission_context.h index 5c9b5e616ba6e..219a8e57ffdf1 100644 --- a/shell/browser/electron_quota_permission_context.h +++ b/shell/browser/electron_quota_permission_context.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_ -#define SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_ #include "content/public/browser/quota_permission_context.h" @@ -36,4 +36,4 @@ class ElectronQuotaPermissionContext : public content::QuotaPermissionContext { } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_QUOTA_PERMISSION_CONTEXT_H_ diff --git a/shell/browser/electron_speech_recognition_manager_delegate.h b/shell/browser/electron_speech_recognition_manager_delegate.h index 923a0d2c5c93d..a65524191a900 100644 --- a/shell/browser/electron_speech_recognition_manager_delegate.h +++ b/shell/browser/electron_speech_recognition_manager_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ -#define SHELL_BROWSER_ELECTRON_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ #include @@ -54,4 +54,4 @@ class ElectronSpeechRecognitionManagerDelegate } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ diff --git a/shell/browser/electron_web_ui_controller_factory.h b/shell/browser/electron_web_ui_controller_factory.h index 95fa58034b237..cbf2232e62e61 100644 --- a/shell/browser/electron_web_ui_controller_factory.h +++ b/shell/browser/electron_web_ui_controller_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ELECTRON_WEB_UI_CONTROLLER_FACTORY_H_ -#define SHELL_BROWSER_ELECTRON_WEB_UI_CONTROLLER_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_WEB_UI_CONTROLLER_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_WEB_UI_CONTROLLER_FACTORY_H_ #include @@ -44,4 +44,4 @@ class ElectronWebUIControllerFactory : public content::WebUIControllerFactory { } // namespace electron -#endif // SHELL_BROWSER_ELECTRON_WEB_UI_CONTROLLER_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_WEB_UI_CONTROLLER_FACTORY_H_ diff --git a/shell/browser/event_emitter_mixin.h b/shell/browser/event_emitter_mixin.h index 3ed4a5be6a046..101e4d5e4591a 100644 --- a/shell/browser/event_emitter_mixin.h +++ b/shell/browser/event_emitter_mixin.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EVENT_EMITTER_MIXIN_H_ -#define SHELL_BROWSER_EVENT_EMITTER_MIXIN_H_ +#ifndef ELECTRON_SHELL_BROWSER_EVENT_EMITTER_MIXIN_H_ +#define ELECTRON_SHELL_BROWSER_EVENT_EMITTER_MIXIN_H_ #include @@ -95,4 +95,4 @@ class EventEmitterMixin { } // namespace gin_helper -#endif // SHELL_BROWSER_EVENT_EMITTER_MIXIN_H_ +#endif // ELECTRON_SHELL_BROWSER_EVENT_EMITTER_MIXIN_H_ diff --git a/shell/browser/extended_web_contents_observer.h b/shell/browser/extended_web_contents_observer.h index f0a91a8b2aba8..2d72a12c49cae 100644 --- a/shell/browser/extended_web_contents_observer.h +++ b/shell/browser/extended_web_contents_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_ -#define SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_ +#define ELECTRON_SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_ #include #include @@ -33,4 +33,4 @@ class ExtendedWebContentsObserver : public base::CheckedObserver { } // namespace electron -#endif // SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENDED_WEB_CONTENTS_OBSERVER_H_ diff --git a/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h b/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h index c57b4779fa112..4b4dd509e137f 100644 --- a/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h +++ b/shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ -#define SHELL_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ #include "chrome/common/extensions/api/cryptotoken_private.h" #include "extensions/browser/extension_function.h" @@ -83,4 +83,4 @@ class CryptotokenPrivateRecordSignRequestFunction : public ExtensionFunction { } // namespace api } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_CRYPTOTOKEN_PRIVATE_CRYPTOTOKEN_PRIVATE_API_H_ diff --git a/shell/browser/extensions/api/i18n/i18n_api.h b/shell/browser/extensions/api/i18n/i18n_api.h index 20374516ea437..7744b7edd7076 100644 --- a/shell/browser/extensions/api/i18n/i18n_api.h +++ b/shell/browser/extensions/api/i18n/i18n_api.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_ -#define SHELL_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_ #include "extensions/browser/extension_function.h" @@ -17,4 +17,4 @@ class I18nGetAcceptLanguagesFunction : public ExtensionFunction { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_I18N_I18N_API_H_ diff --git a/shell/browser/extensions/api/management/electron_management_api_delegate.h b/shell/browser/extensions/api/management/electron_management_api_delegate.h index 2a066b0cfc435..9425d4eaed758 100644 --- a/shell/browser/extensions/api/management/electron_management_api_delegate.h +++ b/shell/browser/extensions/api/management/electron_management_api_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_API_MANAGEMENT_ELECTRON_MANAGEMENT_API_DELEGATE_H_ -#define SHELL_BROWSER_EXTENSIONS_API_MANAGEMENT_ELECTRON_MANAGEMENT_API_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_API_MANAGEMENT_ELECTRON_MANAGEMENT_API_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_API_MANAGEMENT_ELECTRON_MANAGEMENT_API_DELEGATE_H_ #include #include @@ -85,4 +85,4 @@ class ElectronManagementAPIDelegate : public extensions::ManagementAPIDelegate { content::BrowserContext* context) const override; }; -#endif // SHELL_BROWSER_EXTENSIONS_API_MANAGEMENT_ELECTRON_MANAGEMENT_API_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_MANAGEMENT_ELECTRON_MANAGEMENT_API_DELEGATE_H_ diff --git a/shell/browser/extensions/api/resources_private/resources_private_api.h b/shell/browser/extensions/api/resources_private/resources_private_api.h index 75e5ec27a48ab..99a167c89567d 100644 --- a/shell/browser/extensions/api/resources_private/resources_private_api.h +++ b/shell/browser/extensions/api/resources_private/resources_private_api.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_ -#define SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_ #include "extensions/browser/extension_function.h" @@ -30,4 +30,4 @@ class ResourcesPrivateGetStringsFunction : public ExtensionFunction { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_ diff --git a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h index 834a90ca3f7be..8d167c60f1374 100644 --- a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h +++ b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_API_RUNTIME_ELECTRON_RUNTIME_API_DELEGATE_H_ -#define SHELL_BROWSER_EXTENSIONS_API_RUNTIME_ELECTRON_RUNTIME_API_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_API_RUNTIME_ELECTRON_RUNTIME_API_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_API_RUNTIME_ELECTRON_RUNTIME_API_DELEGATE_H_ #include @@ -41,4 +41,4 @@ class ElectronRuntimeAPIDelegate : public RuntimeAPIDelegate { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_API_RUNTIME_ELECTRON_RUNTIME_API_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_RUNTIME_ELECTRON_RUNTIME_API_DELEGATE_H_ diff --git a/shell/browser/extensions/api/streams_private/streams_private_api.h b/shell/browser/extensions/api/streams_private/streams_private_api.h index 893fc9daf07da..b5c6e573c4d8a 100644 --- a/shell/browser/extensions/api/streams_private/streams_private_api.h +++ b/shell/browser/extensions/api/streams_private/streams_private_api.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ -#define SHELL_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ #include @@ -39,4 +39,4 @@ class StreamsPrivateAPI { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_STREAMS_PRIVATE_STREAMS_PRIVATE_API_H_ diff --git a/shell/browser/extensions/api/tabs/tabs_api.h b/shell/browser/extensions/api/tabs/tabs_api.h index 6a41748db1e44..f6078610d130e 100644 --- a/shell/browser/extensions/api/tabs/tabs_api.h +++ b/shell/browser/extensions/api/tabs/tabs_api.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ -#define SHELL_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ #include @@ -109,4 +109,4 @@ class TabsUpdateFunction : public ExtensionFunction { }; } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ diff --git a/shell/browser/extensions/electron_browser_context_keyed_service_factories.h b/shell/browser/extensions/electron_browser_context_keyed_service_factories.h index 3ac39a587aa2f..7e9707d9cac33 100644 --- a/shell/browser/extensions/electron_browser_context_keyed_service_factories.h +++ b/shell/browser/extensions/electron_browser_context_keyed_service_factories.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_ namespace extensions { namespace electron { @@ -15,4 +15,4 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt(); } // namespace electron } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_BROWSER_CONTEXT_KEYED_SERVICE_FACTORIES_H_ diff --git a/shell/browser/extensions/electron_component_extension_resource_manager.h b/shell/browser/extensions/electron_component_extension_resource_manager.h index f6b8f4db4b327..2dd4de3a58b0c 100644 --- a/shell/browser/extensions/electron_component_extension_resource_manager.h +++ b/shell/browser/extensions/electron_component_extension_resource_manager.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_ #include @@ -52,4 +52,4 @@ class ElectronComponentExtensionResourceManager } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_COMPONENT_EXTENSION_RESOURCE_MANAGER_H_ diff --git a/shell/browser/extensions/electron_display_info_provider.h b/shell/browser/extensions/electron_display_info_provider.h index c0b05e7ae0d68..ebdca9534c756 100644 --- a/shell/browser/extensions/electron_display_info_provider.h +++ b/shell/browser/extensions/electron_display_info_provider.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_ #include "extensions/browser/api/system_display/display_info_provider.h" @@ -21,4 +21,4 @@ class ElectronDisplayInfoProvider : public DisplayInfoProvider { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_ diff --git a/shell/browser/extensions/electron_extension_host_delegate.h b/shell/browser/extensions/electron_extension_host_delegate.h index 5b500fd9b6eca..5c1f8761b6d93 100644 --- a/shell/browser/extensions/electron_extension_host_delegate.h +++ b/shell/browser/extensions/electron_extension_host_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_HOST_DELEGATE_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_HOST_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_HOST_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_HOST_DELEGATE_H_ #include #include @@ -49,4 +49,4 @@ class ElectronExtensionHostDelegate : public ExtensionHostDelegate { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_HOST_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_HOST_DELEGATE_H_ diff --git a/shell/browser/extensions/electron_extension_loader.h b/shell/browser/extensions/electron_extension_loader.h index c86fb5d957db1..dc4d04ea4d9e9 100644 --- a/shell/browser/extensions/electron_extension_loader.h +++ b/shell/browser/extensions/electron_extension_loader.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_LOADER_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_LOADER_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_LOADER_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_LOADER_H_ #include #include @@ -98,4 +98,4 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_LOADER_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_LOADER_H_ diff --git a/shell/browser/extensions/electron_extension_message_filter.h b/shell/browser/extensions/electron_extension_message_filter.h index 7272058f4bc2a..25d11dd7647f1 100644 --- a/shell/browser/extensions/electron_extension_message_filter.h +++ b/shell/browser/extensions/electron_extension_message_filter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_MESSAGE_FILTER_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_MESSAGE_FILTER_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_MESSAGE_FILTER_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_MESSAGE_FILTER_H_ #include #include @@ -68,4 +68,4 @@ class ElectronExtensionMessageFilter : public content::BrowserMessageFilter { } // namespace electron -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_MESSAGE_FILTER_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_MESSAGE_FILTER_H_ diff --git a/shell/browser/extensions/electron_extension_system.h b/shell/browser/extensions/electron_extension_system.h index e5e565faa337c..971f8df492944 100644 --- a/shell/browser/extensions/electron_extension_system.h +++ b/shell/browser/extensions/electron_extension_system.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_H_ #include #include @@ -122,4 +122,4 @@ class ElectronExtensionSystem : public ExtensionSystem { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_H_ diff --git a/shell/browser/extensions/electron_extension_system_factory.h b/shell/browser/extensions/electron_extension_system_factory.h index f09486c52c159..144d96f344dfc 100644 --- a/shell/browser/extensions/electron_extension_system_factory.h +++ b/shell/browser/extensions/electron_extension_system_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_ #include "base/memory/singleton.h" #include "extensions/browser/extension_system_provider.h" @@ -41,4 +41,4 @@ class ElectronExtensionSystemFactory : public ExtensionSystemProvider { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_SYSTEM_FACTORY_H_ diff --git a/shell/browser/extensions/electron_extension_web_contents_observer.h b/shell/browser/extensions/electron_extension_web_contents_observer.h index 136178645ccdc..15c92fa4700ac 100644 --- a/shell/browser/extensions/electron_extension_web_contents_observer.h +++ b/shell/browser/extensions/electron_extension_web_contents_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_ #include "content/public/browser/web_contents_user_data.h" #include "extensions/browser/extension_web_contents_observer.h" @@ -40,4 +40,4 @@ class ElectronExtensionWebContentsObserver } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSION_WEB_CONTENTS_OBSERVER_H_ diff --git a/shell/browser/extensions/electron_extensions_api_client.h b/shell/browser/extensions/electron_extensions_api_client.h index a389ec5fa5481..c2fd6c3add3d0 100644 --- a/shell/browser/extensions/electron_extensions_api_client.h +++ b/shell/browser/extensions/electron_extensions_api_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_API_CLIENT_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_API_CLIENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_API_CLIENT_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_API_CLIENT_H_ #include @@ -36,4 +36,4 @@ class ElectronExtensionsAPIClient : public ExtensionsAPIClient { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_API_CLIENT_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_API_CLIENT_H_ diff --git a/shell/browser/extensions/electron_extensions_browser_api_provider.h b/shell/browser/extensions/electron_extensions_browser_api_provider.h index 1c48e31acc6a6..5f938dfac790f 100644 --- a/shell/browser/extensions/electron_extensions_browser_api_provider.h +++ b/shell/browser/extensions/electron_extensions_browser_api_provider.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_ #include "extensions/browser/extensions_browser_api_provider.h" @@ -26,4 +26,4 @@ class ElectronExtensionsBrowserAPIProvider } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_API_PROVIDER_H_ diff --git a/shell/browser/extensions/electron_extensions_browser_client.h b/shell/browser/extensions/electron_extensions_browser_client.h index 32454d28a3f4a..aaee2bd9845ef 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.h +++ b/shell/browser/extensions/electron_extensions_browser_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_CLIENT_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_CLIENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_CLIENT_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_CLIENT_H_ #include #include @@ -147,4 +147,4 @@ class ElectronExtensionsBrowserClient } // namespace electron -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_CLIENT_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_EXTENSIONS_BROWSER_CLIENT_H_ diff --git a/shell/browser/extensions/electron_kiosk_delegate.h b/shell/browser/extensions/electron_kiosk_delegate.h index 7af05dac451e9..1173a7046b7b5 100644 --- a/shell/browser/extensions/electron_kiosk_delegate.h +++ b/shell/browser/extensions/electron_kiosk_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_KIOSK_DELEGATE_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_KIOSK_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_KIOSK_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_KIOSK_DELEGATE_H_ #include "extensions/browser/kiosk/kiosk_delegate.h" #include "extensions/common/extension_id.h" @@ -23,4 +23,4 @@ class ElectronKioskDelegate : public extensions::KioskDelegate { } // namespace electron -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_KIOSK_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_KIOSK_DELEGATE_H_ diff --git a/shell/browser/extensions/electron_messaging_delegate.h b/shell/browser/extensions/electron_messaging_delegate.h index 6ca38ad5a7613..ac82d85ca2029 100644 --- a/shell/browser/extensions/electron_messaging_delegate.h +++ b/shell/browser/extensions/electron_messaging_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_MESSAGING_DELEGATE_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_MESSAGING_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_MESSAGING_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_MESSAGING_DELEGATE_H_ #include #include @@ -57,4 +57,4 @@ class ElectronMessagingDelegate : public MessagingDelegate { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_MESSAGING_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_MESSAGING_DELEGATE_H_ diff --git a/shell/browser/extensions/electron_navigation_ui_data.h b/shell/browser/extensions/electron_navigation_ui_data.h index 621e50fecbc28..c2d75b17e6441 100644 --- a/shell/browser/extensions/electron_navigation_ui_data.h +++ b/shell/browser/extensions/electron_navigation_ui_data.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_NAVIGATION_UI_DATA_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_NAVIGATION_UI_DATA_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_NAVIGATION_UI_DATA_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_NAVIGATION_UI_DATA_H_ #include @@ -47,4 +47,4 @@ class ElectronNavigationUIData : public content::NavigationUIData { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_NAVIGATION_UI_DATA_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_NAVIGATION_UI_DATA_H_ diff --git a/shell/browser/extensions/electron_process_manager_delegate.h b/shell/browser/extensions/electron_process_manager_delegate.h index 8ac2ad378afe0..f99e18d11fb09 100644 --- a/shell/browser/extensions/electron_process_manager_delegate.h +++ b/shell/browser/extensions/electron_process_manager_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_EXTENSIONS_ELECTRON_PROCESS_MANAGER_DELEGATE_H_ -#define SHELL_BROWSER_EXTENSIONS_ELECTRON_PROCESS_MANAGER_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_PROCESS_MANAGER_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_PROCESS_MANAGER_DELEGATE_H_ #include "base/compiler_specific.h" #include "content/public/browser/notification_observer.h" @@ -40,4 +40,4 @@ class ElectronProcessManagerDelegate : public ProcessManagerDelegate { } // namespace extensions -#endif // SHELL_BROWSER_EXTENSIONS_ELECTRON_PROCESS_MANAGER_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_PROCESS_MANAGER_DELEGATE_H_ diff --git a/shell/browser/fake_location_provider.h b/shell/browser/fake_location_provider.h index 750a50688eb29..14ab16070cfb7 100644 --- a/shell/browser/fake_location_provider.h +++ b/shell/browser/fake_location_provider.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_ -#define SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_ +#ifndef ELECTRON_SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_ +#define ELECTRON_SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_ #include "services/device/public/cpp/geolocation/location_provider.h" #include "services/device/public/mojom/geoposition.mojom.h" @@ -34,4 +34,4 @@ class FakeLocationProvider : public device::LocationProvider { } // namespace electron -#endif // SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_ +#endif // ELECTRON_SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_ diff --git a/shell/browser/feature_list.h b/shell/browser/feature_list.h index 3464bba213c55..cd70456cc2b22 100644 --- a/shell/browser/feature_list.h +++ b/shell/browser/feature_list.h @@ -2,12 +2,12 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_FEATURE_LIST_H_ -#define SHELL_BROWSER_FEATURE_LIST_H_ +#ifndef ELECTRON_SHELL_BROWSER_FEATURE_LIST_H_ +#define ELECTRON_SHELL_BROWSER_FEATURE_LIST_H_ namespace electron { void InitializeFeatureList(); void InitializeFieldTrials(); } // namespace electron -#endif // SHELL_BROWSER_FEATURE_LIST_H_ +#endif // ELECTRON_SHELL_BROWSER_FEATURE_LIST_H_ diff --git a/shell/browser/file_select_helper.h b/shell/browser/file_select_helper.h index e47be4a82cc51..3c1e09e7db30e 100644 --- a/shell/browser/file_select_helper.h +++ b/shell/browser/file_select_helper.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_FILE_SELECT_HELPER_H_ -#define SHELL_BROWSER_FILE_SELECT_HELPER_H_ +#ifndef ELECTRON_SHELL_BROWSER_FILE_SELECT_HELPER_H_ +#define ELECTRON_SHELL_BROWSER_FILE_SELECT_HELPER_H_ #include #include @@ -229,4 +229,4 @@ class FileSelectHelper : public base::RefCountedThreadSafe< std::vector temporary_files_; }; -#endif // SHELL_BROWSER_FILE_SELECT_HELPER_H_ +#endif // ELECTRON_SHELL_BROWSER_FILE_SELECT_HELPER_H_ diff --git a/shell/browser/font/electron_font_access_delegate.h b/shell/browser/font/electron_font_access_delegate.h index c29d50d7db923..4cfe7c6365066 100644 --- a/shell/browser/font/electron_font_access_delegate.h +++ b/shell/browser/font/electron_font_access_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_ -#define SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_ #include #include @@ -28,4 +28,4 @@ class ElectronFontAccessDelegate : public content::FontAccessDelegate { content::FontAccessChooser::Callback callback) override; }; -#endif // SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_FONT_ELECTRON_FONT_ACCESS_DELEGATE_H_ diff --git a/shell/browser/font_defaults.h b/shell/browser/font_defaults.h index 260c8100441c3..6d317b0e53377 100644 --- a/shell/browser/font_defaults.h +++ b/shell/browser/font_defaults.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_FONT_DEFAULTS_H_ -#define SHELL_BROWSER_FONT_DEFAULTS_H_ +#ifndef ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_ +#define ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_ namespace blink { namespace web_pref { @@ -17,4 +17,4 @@ void SetFontDefaults(blink::web_pref::WebPreferences* prefs); } // namespace electron -#endif // SHELL_BROWSER_FONT_DEFAULTS_H_ +#endif // ELECTRON_SHELL_BROWSER_FONT_DEFAULTS_H_ diff --git a/shell/browser/hid/electron_hid_delegate.h b/shell/browser/hid/electron_hid_delegate.h index e4e35d507db49..348c32846f3b9 100644 --- a/shell/browser/hid/electron_hid_delegate.h +++ b/shell/browser/hid/electron_hid_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_HID_ELECTRON_HID_DELEGATE_H_ -#define SHELL_BROWSER_HID_ELECTRON_HID_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_HID_ELECTRON_HID_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_HID_ELECTRON_HID_DELEGATE_H_ #include #include @@ -81,4 +81,4 @@ class ElectronHidDelegate : public content::HidDelegate, } // namespace electron -#endif // SHELL_BROWSER_HID_ELECTRON_HID_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_HID_ELECTRON_HID_DELEGATE_H_ diff --git a/shell/browser/hid/hid_chooser_context.h b/shell/browser/hid/hid_chooser_context.h index 923f9f99fb8a1..a9c2f7e1def98 100644 --- a/shell/browser/hid/hid_chooser_context.h +++ b/shell/browser/hid/hid_chooser_context.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_H_ -#define SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_H_ +#ifndef ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_H_ +#define ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_H_ #include #include @@ -133,4 +133,4 @@ class HidChooserContext : public KeyedService, } // namespace electron -#endif // SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_H_ +#endif // ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_H_ diff --git a/shell/browser/hid/hid_chooser_context_factory.h b/shell/browser/hid/hid_chooser_context_factory.h index 3bd89b807eb2a..14f444da6d5c6 100644 --- a/shell/browser/hid/hid_chooser_context_factory.h +++ b/shell/browser/hid/hid_chooser_context_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_ -#define SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_ #include "base/no_destructor.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" @@ -40,4 +40,4 @@ class HidChooserContextFactory : public BrowserContextKeyedServiceFactory { } // namespace electron -#endif // SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_ diff --git a/shell/browser/hid/hid_chooser_controller.h b/shell/browser/hid/hid_chooser_controller.h index cda0d399019b0..ed5ef443a154d 100644 --- a/shell/browser/hid/hid_chooser_controller.h +++ b/shell/browser/hid/hid_chooser_controller.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_HID_HID_CHOOSER_CONTROLLER_H_ -#define SHELL_BROWSER_HID_HID_CHOOSER_CONTROLLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTROLLER_H_ +#define ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTROLLER_H_ #include #include @@ -122,4 +122,4 @@ class HidChooserController } // namespace electron -#endif // SHELL_BROWSER_HID_HID_CHOOSER_CONTROLLER_H_ +#endif // ELECTRON_SHELL_BROWSER_HID_HID_CHOOSER_CONTROLLER_H_ diff --git a/shell/browser/javascript_environment.h b/shell/browser/javascript_environment.h index 0700bb2ca63d3..31ca8544900dd 100644 --- a/shell/browser/javascript_environment.h +++ b/shell/browser/javascript_environment.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_JAVASCRIPT_ENVIRONMENT_H_ -#define SHELL_BROWSER_JAVASCRIPT_ENVIRONMENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_JAVASCRIPT_ENVIRONMENT_H_ +#define ELECTRON_SHELL_BROWSER_JAVASCRIPT_ENVIRONMENT_H_ #include @@ -71,4 +71,4 @@ class NodeEnvironment { } // namespace electron -#endif // SHELL_BROWSER_JAVASCRIPT_ENVIRONMENT_H_ +#endif // ELECTRON_SHELL_BROWSER_JAVASCRIPT_ENVIRONMENT_H_ diff --git a/shell/browser/lib/bluetooth_chooser.h b/shell/browser/lib/bluetooth_chooser.h index 285198da724c7..8143e4ce5cfe9 100644 --- a/shell/browser/lib/bluetooth_chooser.h +++ b/shell/browser/lib/bluetooth_chooser.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_LIB_BLUETOOTH_CHOOSER_H_ -#define SHELL_BROWSER_LIB_BLUETOOTH_CHOOSER_H_ +#ifndef ELECTRON_SHELL_BROWSER_LIB_BLUETOOTH_CHOOSER_H_ +#define ELECTRON_SHELL_BROWSER_LIB_BLUETOOTH_CHOOSER_H_ #include #include @@ -51,4 +51,4 @@ class BluetoothChooser : public content::BluetoothChooser { } // namespace electron -#endif // SHELL_BROWSER_LIB_BLUETOOTH_CHOOSER_H_ +#endif // ELECTRON_SHELL_BROWSER_LIB_BLUETOOTH_CHOOSER_H_ diff --git a/shell/browser/lib/power_observer_linux.h b/shell/browser/lib/power_observer_linux.h index cbf58d9dc4126..99473f04859ef 100644 --- a/shell/browser/lib/power_observer_linux.h +++ b/shell/browser/lib/power_observer_linux.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_LIB_POWER_OBSERVER_LINUX_H_ -#define SHELL_BROWSER_LIB_POWER_OBSERVER_LINUX_H_ +#ifndef ELECTRON_SHELL_BROWSER_LIB_POWER_OBSERVER_LINUX_H_ +#define ELECTRON_SHELL_BROWSER_LIB_POWER_OBSERVER_LINUX_H_ #include @@ -53,4 +53,4 @@ class PowerObserverLinux { } // namespace electron -#endif // SHELL_BROWSER_LIB_POWER_OBSERVER_LINUX_H_ +#endif // ELECTRON_SHELL_BROWSER_LIB_POWER_OBSERVER_LINUX_H_ diff --git a/shell/browser/linux/unity_service.h b/shell/browser/linux/unity_service.h index 9df6619742a84..d134ceffb3d2f 100644 --- a/shell/browser/linux/unity_service.h +++ b/shell/browser/linux/unity_service.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_LINUX_UNITY_SERVICE_H_ -#define SHELL_BROWSER_LINUX_UNITY_SERVICE_H_ +#ifndef ELECTRON_SHELL_BROWSER_LINUX_UNITY_SERVICE_H_ +#define ELECTRON_SHELL_BROWSER_LINUX_UNITY_SERVICE_H_ namespace unity { @@ -20,4 +20,4 @@ void SetProgressFraction(float percentage); } // namespace unity -#endif // SHELL_BROWSER_LINUX_UNITY_SERVICE_H_ +#endif // ELECTRON_SHELL_BROWSER_LINUX_UNITY_SERVICE_H_ diff --git a/shell/browser/login_handler.h b/shell/browser/login_handler.h index c7c1b3e090919..0e513f8c98b21 100644 --- a/shell/browser/login_handler.h +++ b/shell/browser/login_handler.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_LOGIN_HANDLER_H_ -#define SHELL_BROWSER_LOGIN_HANDLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_LOGIN_HANDLER_H_ +#define ELECTRON_SHELL_BROWSER_LOGIN_HANDLER_H_ #include "base/values.h" #include "content/public/browser/content_browser_client.h" @@ -52,4 +52,4 @@ class LoginHandler : public content::LoginDelegate, } // namespace electron -#endif // SHELL_BROWSER_LOGIN_HANDLER_H_ +#endif // ELECTRON_SHELL_BROWSER_LOGIN_HANDLER_H_ diff --git a/shell/browser/mac/dict_util.h b/shell/browser/mac/dict_util.h index 6f4af88be29eb..13b3bed0d9762 100644 --- a/shell/browser/mac/dict_util.h +++ b/shell/browser/mac/dict_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_MAC_DICT_UTIL_H_ -#define SHELL_BROWSER_MAC_DICT_UTIL_H_ +#ifndef ELECTRON_SHELL_BROWSER_MAC_DICT_UTIL_H_ +#define ELECTRON_SHELL_BROWSER_MAC_DICT_UTIL_H_ #import @@ -21,4 +21,4 @@ base::DictionaryValue NSDictionaryToDictionaryValue(NSDictionary* dict); } // namespace electron -#endif // SHELL_BROWSER_MAC_DICT_UTIL_H_ +#endif // ELECTRON_SHELL_BROWSER_MAC_DICT_UTIL_H_ diff --git a/shell/browser/mac/electron_application.h b/shell/browser/mac/electron_application.h index 24cac25643643..d0edcaa453d16 100644 --- a/shell/browser/mac/electron_application.h +++ b/shell/browser/mac/electron_application.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ -#define SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ +#ifndef ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ +#define ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ #include "base/callback.h" #include "base/mac/scoped_nsobject.h" @@ -49,4 +49,4 @@ @end -#endif // SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ +#endif // ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_ diff --git a/shell/browser/mac/electron_application_delegate.h b/shell/browser/mac/electron_application_delegate.h index d1697d2a885ec..88c6321952e46 100644 --- a/shell/browser/mac/electron_application_delegate.h +++ b/shell/browser/mac/electron_application_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_ -#define SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_ #import @@ -19,4 +19,4 @@ @end -#endif // SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_ diff --git a/shell/browser/mac/in_app_purchase.h b/shell/browser/mac/in_app_purchase.h index 6411035d64852..645c5e3be8151 100644 --- a/shell/browser/mac/in_app_purchase.h +++ b/shell/browser/mac/in_app_purchase.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_MAC_IN_APP_PURCHASE_H_ -#define SHELL_BROWSER_MAC_IN_APP_PURCHASE_H_ +#ifndef ELECTRON_SHELL_BROWSER_MAC_IN_APP_PURCHASE_H_ +#define ELECTRON_SHELL_BROWSER_MAC_IN_APP_PURCHASE_H_ #include @@ -33,4 +33,4 @@ void PurchaseProduct(const std::string& productID, } // namespace in_app_purchase -#endif // SHELL_BROWSER_MAC_IN_APP_PURCHASE_H_ +#endif // ELECTRON_SHELL_BROWSER_MAC_IN_APP_PURCHASE_H_ diff --git a/shell/browser/mac/in_app_purchase_observer.h b/shell/browser/mac/in_app_purchase_observer.h index 782eda7561530..20a24d4d3bf7d 100644 --- a/shell/browser/mac/in_app_purchase_observer.h +++ b/shell/browser/mac/in_app_purchase_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_MAC_IN_APP_PURCHASE_OBSERVER_H_ -#define SHELL_BROWSER_MAC_IN_APP_PURCHASE_OBSERVER_H_ +#ifndef ELECTRON_SHELL_BROWSER_MAC_IN_APP_PURCHASE_OBSERVER_H_ +#define ELECTRON_SHELL_BROWSER_MAC_IN_APP_PURCHASE_OBSERVER_H_ #include #include @@ -62,4 +62,4 @@ class TransactionObserver { } // namespace in_app_purchase -#endif // SHELL_BROWSER_MAC_IN_APP_PURCHASE_OBSERVER_H_ +#endif // ELECTRON_SHELL_BROWSER_MAC_IN_APP_PURCHASE_OBSERVER_H_ diff --git a/shell/browser/mac/in_app_purchase_product.h b/shell/browser/mac/in_app_purchase_product.h index e8e8fc97ec549..0fbd7b65b3a6c 100644 --- a/shell/browser/mac/in_app_purchase_product.h +++ b/shell/browser/mac/in_app_purchase_product.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_MAC_IN_APP_PURCHASE_PRODUCT_H_ -#define SHELL_BROWSER_MAC_IN_APP_PURCHASE_PRODUCT_H_ +#ifndef ELECTRON_SHELL_BROWSER_MAC_IN_APP_PURCHASE_PRODUCT_H_ +#define ELECTRON_SHELL_BROWSER_MAC_IN_APP_PURCHASE_PRODUCT_H_ #include #include @@ -51,4 +51,4 @@ void GetProducts(const std::vector& productIDs, } // namespace in_app_purchase -#endif // SHELL_BROWSER_MAC_IN_APP_PURCHASE_PRODUCT_H_ +#endif // ELECTRON_SHELL_BROWSER_MAC_IN_APP_PURCHASE_PRODUCT_H_ diff --git a/shell/browser/media/media_capture_devices_dispatcher.h b/shell/browser/media/media_capture_devices_dispatcher.h index fae1dfdb29e4b..d7b0957e09f40 100644 --- a/shell/browser/media/media_capture_devices_dispatcher.h +++ b/shell/browser/media/media_capture_devices_dispatcher.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ -#define SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ +#ifndef ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ +#define ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ #include @@ -90,4 +90,4 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver { } // namespace electron -#endif // SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ +#endif // ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ diff --git a/shell/browser/media/media_device_id_salt.h b/shell/browser/media/media_device_id_salt.h index 004705da011ab..6a765e55ced33 100644 --- a/shell/browser/media/media_device_id_salt.h +++ b/shell/browser/media/media_device_id_salt.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ -#define SHELL_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ +#ifndef ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ +#define ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ #include @@ -37,4 +37,4 @@ class MediaDeviceIDSalt { } // namespace electron -#endif // SHELL_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ +#endif // ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ diff --git a/shell/browser/media/media_stream_devices_controller.h b/shell/browser/media/media_stream_devices_controller.h index d064ce8b57ef4..780d38e7cb4eb 100644 --- a/shell/browser/media/media_stream_devices_controller.h +++ b/shell/browser/media/media_stream_devices_controller.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ -#define SHELL_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ +#define ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ #include "content/public/browser/web_contents_delegate.h" #include "third_party/blink/public/common/mediastream/media_stream_request.h" @@ -46,4 +46,4 @@ class MediaStreamDevicesController { } // namespace electron -#endif // SHELL_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ +#endif // ELECTRON_SHELL_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ diff --git a/shell/browser/microtasks_runner.h b/shell/browser/microtasks_runner.h index c048c8653374a..b37b7b677df3a 100644 --- a/shell/browser/microtasks_runner.h +++ b/shell/browser/microtasks_runner.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_MICROTASKS_RUNNER_H_ -#define SHELL_BROWSER_MICROTASKS_RUNNER_H_ +#ifndef ELECTRON_SHELL_BROWSER_MICROTASKS_RUNNER_H_ +#define ELECTRON_SHELL_BROWSER_MICROTASKS_RUNNER_H_ #include "base/task/task_observer.h" @@ -34,4 +34,4 @@ class MicrotasksRunner : public base::TaskObserver { } // namespace electron -#endif // SHELL_BROWSER_MICROTASKS_RUNNER_H_ +#endif // ELECTRON_SHELL_BROWSER_MICROTASKS_RUNNER_H_ diff --git a/shell/browser/native_browser_view.h b/shell/browser/native_browser_view.h index da29b527f1d77..05a47ffa3d17d 100644 --- a/shell/browser/native_browser_view.h +++ b/shell/browser/native_browser_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NATIVE_BROWSER_VIEW_H_ -#define SHELL_BROWSER_NATIVE_BROWSER_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_H_ #include @@ -72,4 +72,4 @@ class NativeBrowserView : public content::WebContentsObserver { } // namespace electron -#endif // SHELL_BROWSER_NATIVE_BROWSER_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_H_ diff --git a/shell/browser/native_browser_view_mac.h b/shell/browser/native_browser_view_mac.h index 4b1349fa05600..313d51616f349 100644 --- a/shell/browser/native_browser_view_mac.h +++ b/shell/browser/native_browser_view_mac.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NATIVE_BROWSER_VIEW_MAC_H_ -#define SHELL_BROWSER_NATIVE_BROWSER_VIEW_MAC_H_ +#ifndef ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_MAC_H_ +#define ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_MAC_H_ #import #include @@ -33,4 +33,4 @@ class NativeBrowserViewMac : public NativeBrowserView { } // namespace electron -#endif // SHELL_BROWSER_NATIVE_BROWSER_VIEW_MAC_H_ +#endif // ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_MAC_H_ diff --git a/shell/browser/native_browser_view_views.h b/shell/browser/native_browser_view_views.h index bcf2e5a565894..77bb0f73260f8 100644 --- a/shell/browser/native_browser_view_views.h +++ b/shell/browser/native_browser_view_views.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_ -#define SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_ +#ifndef ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_ +#define ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_ #include #include @@ -56,4 +56,4 @@ class NativeBrowserViewViews : public NativeBrowserView { } // namespace electron -#endif // SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_ +#endif // ELECTRON_SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_ diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index 8b31a775fd744..113b140ca192c 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NATIVE_WINDOW_H_ -#define SHELL_BROWSER_NATIVE_WINDOW_H_ +#ifndef ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_H_ +#define ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_H_ #include #include @@ -440,4 +440,4 @@ class NativeWindowRelay } // namespace electron -#endif // SHELL_BROWSER_NATIVE_WINDOW_H_ +#endif // ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_H_ diff --git a/shell/browser/native_window_mac.h b/shell/browser/native_window_mac.h index 10dc3fd2a65c7..2728414379237 100644 --- a/shell/browser/native_window_mac.h +++ b/shell/browser/native_window_mac.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NATIVE_WINDOW_MAC_H_ -#define SHELL_BROWSER_NATIVE_WINDOW_MAC_H_ +#ifndef ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_MAC_H_ +#define ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_MAC_H_ #import @@ -286,4 +286,4 @@ class NativeWindowMac : public NativeWindow, } // namespace electron -#endif // SHELL_BROWSER_NATIVE_WINDOW_MAC_H_ +#endif // ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_MAC_H_ diff --git a/shell/browser/native_window_observer.h b/shell/browser/native_window_observer.h index ce7f337c3c1c4..572aca06ef0f3 100644 --- a/shell/browser/native_window_observer.h +++ b/shell/browser/native_window_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NATIVE_WINDOW_OBSERVER_H_ -#define SHELL_BROWSER_NATIVE_WINDOW_OBSERVER_H_ +#ifndef ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_OBSERVER_H_ +#define ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_OBSERVER_H_ #include @@ -111,4 +111,4 @@ class NativeWindowObserver : public base::CheckedObserver { } // namespace electron -#endif // SHELL_BROWSER_NATIVE_WINDOW_OBSERVER_H_ +#endif // ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_OBSERVER_H_ diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index 3a5199ebcdcaa..caaa690da917a 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NATIVE_WINDOW_VIEWS_H_ -#define SHELL_BROWSER_NATIVE_WINDOW_VIEWS_H_ +#ifndef ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_VIEWS_H_ +#define ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_VIEWS_H_ #include "shell/browser/native_window.h" @@ -336,4 +336,4 @@ class NativeWindowViews : public NativeWindow, } // namespace electron -#endif // SHELL_BROWSER_NATIVE_WINDOW_VIEWS_H_ +#endif // ELECTRON_SHELL_BROWSER_NATIVE_WINDOW_VIEWS_H_ diff --git a/shell/browser/net/asar/asar_file_validator.h b/shell/browser/net/asar/asar_file_validator.h index 9a028fc22d59d..b5ba25770e1f0 100644 --- a/shell/browser/net/asar/asar_file_validator.h +++ b/shell/browser/net/asar/asar_file_validator.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_ASAR_ASAR_FILE_VALIDATOR_H_ -#define SHELL_BROWSER_NET_ASAR_ASAR_FILE_VALIDATOR_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_FILE_VALIDATOR_H_ +#define ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_FILE_VALIDATOR_H_ #include #include @@ -60,4 +60,4 @@ class AsarFileValidator : public mojo::FilteredDataSource::Filter { } // namespace asar -#endif // SHELL_BROWSER_NET_ASAR_ASAR_FILE_VALIDATOR_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_FILE_VALIDATOR_H_ diff --git a/shell/browser/net/asar/asar_url_loader.h b/shell/browser/net/asar/asar_url_loader.h index a2594b99a1470..09d255fd5d2d5 100644 --- a/shell/browser/net/asar/asar_url_loader.h +++ b/shell/browser/net/asar/asar_url_loader.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_H_ -#define SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_H_ +#define ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_H_ #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/network/public/cpp/resource_request.h" @@ -19,4 +19,4 @@ void CreateAsarURLLoader( } // namespace asar -#endif // SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_H_ diff --git a/shell/browser/net/asar/asar_url_loader_factory.h b/shell/browser/net/asar/asar_url_loader_factory.h index 0c67ceedd466b..9a7126b8ba83e 100644 --- a/shell/browser/net/asar/asar_url_loader_factory.h +++ b/shell/browser/net/asar/asar_url_loader_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_FACTORY_H_ -#define SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_FACTORY_H_ #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" @@ -34,4 +34,4 @@ class AsarURLLoaderFactory : public network::SelfDeletingURLLoaderFactory { } // namespace electron -#endif // SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_ASAR_ASAR_URL_LOADER_FACTORY_H_ diff --git a/shell/browser/net/cert_verifier_client.h b/shell/browser/net/cert_verifier_client.h index 23e8112c2d733..f46eaf87b51d1 100644 --- a/shell/browser/net/cert_verifier_client.h +++ b/shell/browser/net/cert_verifier_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_CERT_VERIFIER_CLIENT_H_ -#define SHELL_BROWSER_NET_CERT_VERIFIER_CLIENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_CERT_VERIFIER_CLIENT_H_ +#define ELECTRON_SHELL_BROWSER_NET_CERT_VERIFIER_CLIENT_H_ #include @@ -49,4 +49,4 @@ class CertVerifierClient : public network::mojom::CertVerifierClient { } // namespace electron -#endif // SHELL_BROWSER_NET_CERT_VERIFIER_CLIENT_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_CERT_VERIFIER_CLIENT_H_ diff --git a/shell/browser/net/electron_url_loader_factory.h b/shell/browser/net/electron_url_loader_factory.h index 9696659a90912..a6cac0d0d4c2e 100644 --- a/shell/browser/net/electron_url_loader_factory.h +++ b/shell/browser/net/electron_url_loader_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_ELECTRON_URL_LOADER_FACTORY_H_ -#define SHELL_BROWSER_NET_ELECTRON_URL_LOADER_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_ELECTRON_URL_LOADER_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_NET_ELECTRON_URL_LOADER_FACTORY_H_ #include #include @@ -177,4 +177,4 @@ class ElectronURLLoaderFactory : public network::SelfDeletingURLLoaderFactory { } // namespace electron -#endif // SHELL_BROWSER_NET_ELECTRON_URL_LOADER_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_ELECTRON_URL_LOADER_FACTORY_H_ diff --git a/shell/browser/net/network_context_service.h b/shell/browser/net/network_context_service.h index ef0c3fdebb74c..e68c21db25d88 100644 --- a/shell/browser/net/network_context_service.h +++ b/shell/browser/net/network_context_service.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_ -#define SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_ +#define ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_ #include "base/files/file_path.h" #include "chrome/browser/net/proxy_config_monitor.h" @@ -42,4 +42,4 @@ class NetworkContextService : public KeyedService { } // namespace electron -#endif // SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_ diff --git a/shell/browser/net/network_context_service_factory.h b/shell/browser/net/network_context_service_factory.h index 8d24457ed5d58..2348dae43f566 100644 --- a/shell/browser/net/network_context_service_factory.h +++ b/shell/browser/net/network_context_service_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_FACTORY_H_ -#define SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_FACTORY_H_ #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" @@ -47,4 +47,4 @@ class NetworkContextServiceFactory : public BrowserContextKeyedServiceFactory { } // namespace electron -#endif // SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_FACTORY_H_ diff --git a/shell/browser/net/node_stream_loader.h b/shell/browser/net/node_stream_loader.h index b4fff133b7e2c..450c388fed25a 100644 --- a/shell/browser/net/node_stream_loader.h +++ b/shell/browser/net/node_stream_loader.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_NODE_STREAM_LOADER_H_ -#define SHELL_BROWSER_NET_NODE_STREAM_LOADER_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_NODE_STREAM_LOADER_H_ +#define ELECTRON_SHELL_BROWSER_NET_NODE_STREAM_LOADER_H_ #include #include @@ -103,4 +103,4 @@ class NodeStreamLoader : public network::mojom::URLLoader { } // namespace electron -#endif // SHELL_BROWSER_NET_NODE_STREAM_LOADER_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_NODE_STREAM_LOADER_H_ diff --git a/shell/browser/net/proxying_url_loader_factory.h b/shell/browser/net/proxying_url_loader_factory.h index 644330c1c31ab..f45c9c943889c 100644 --- a/shell/browser/net/proxying_url_loader_factory.h +++ b/shell/browser/net/proxying_url_loader_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_PROXYING_URL_LOADER_FACTORY_H_ -#define SHELL_BROWSER_NET_PROXYING_URL_LOADER_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_PROXYING_URL_LOADER_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_NET_PROXYING_URL_LOADER_FACTORY_H_ #include #include @@ -281,4 +281,4 @@ class ProxyingURLLoaderFactory } // namespace electron -#endif // SHELL_BROWSER_NET_PROXYING_URL_LOADER_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_PROXYING_URL_LOADER_FACTORY_H_ diff --git a/shell/browser/net/proxying_websocket.h b/shell/browser/net/proxying_websocket.h index 83040bac04b28..009b9a1e9d121 100644 --- a/shell/browser/net/proxying_websocket.h +++ b/shell/browser/net/proxying_websocket.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_PROXYING_WEBSOCKET_H_ -#define SHELL_BROWSER_NET_PROXYING_WEBSOCKET_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_PROXYING_WEBSOCKET_H_ +#define ELECTRON_SHELL_BROWSER_NET_PROXYING_WEBSOCKET_H_ #include #include @@ -178,4 +178,4 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient, } // namespace electron -#endif // SHELL_BROWSER_NET_PROXYING_WEBSOCKET_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_PROXYING_WEBSOCKET_H_ diff --git a/shell/browser/net/resolve_proxy_helper.h b/shell/browser/net/resolve_proxy_helper.h index f67936f18e1e8..7225e2542e5e3 100644 --- a/shell/browser/net/resolve_proxy_helper.h +++ b/shell/browser/net/resolve_proxy_helper.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_RESOLVE_PROXY_HELPER_H_ -#define SHELL_BROWSER_NET_RESOLVE_PROXY_HELPER_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_RESOLVE_PROXY_HELPER_H_ +#define ELECTRON_SHELL_BROWSER_NET_RESOLVE_PROXY_HELPER_H_ #include #include @@ -75,4 +75,4 @@ class ResolveProxyHelper } // namespace electron -#endif // SHELL_BROWSER_NET_RESOLVE_PROXY_HELPER_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_RESOLVE_PROXY_HELPER_H_ diff --git a/shell/browser/net/system_network_context_manager.h b/shell/browser/net/system_network_context_manager.h index f4337f4e6c3ea..dfce7949f7d24 100644 --- a/shell/browser/net/system_network_context_manager.h +++ b/shell/browser/net/system_network_context_manager.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_SYSTEM_NETWORK_CONTEXT_MANAGER_H_ -#define SHELL_BROWSER_NET_SYSTEM_NETWORK_CONTEXT_MANAGER_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_SYSTEM_NETWORK_CONTEXT_MANAGER_H_ +#define ELECTRON_SHELL_BROWSER_NET_SYSTEM_NETWORK_CONTEXT_MANAGER_H_ #include "base/memory/ref_counted.h" #include "chrome/browser/net/proxy_config_monitor.h" @@ -106,4 +106,4 @@ class SystemNetworkContextManager { mojo::Remote url_loader_factory_; }; -#endif // SHELL_BROWSER_NET_SYSTEM_NETWORK_CONTEXT_MANAGER_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_SYSTEM_NETWORK_CONTEXT_MANAGER_H_ diff --git a/shell/browser/net/url_pipe_loader.h b/shell/browser/net/url_pipe_loader.h index da170ac157acb..09baa5f142619 100644 --- a/shell/browser/net/url_pipe_loader.h +++ b/shell/browser/net/url_pipe_loader.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_URL_PIPE_LOADER_H_ -#define SHELL_BROWSER_NET_URL_PIPE_LOADER_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_URL_PIPE_LOADER_H_ +#define ELECTRON_SHELL_BROWSER_NET_URL_PIPE_LOADER_H_ #include #include @@ -85,4 +85,4 @@ class URLPipeLoader : public network::mojom::URLLoader, } // namespace electron -#endif // SHELL_BROWSER_NET_URL_PIPE_LOADER_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_URL_PIPE_LOADER_H_ diff --git a/shell/browser/net/web_request_api_interface.h b/shell/browser/net/web_request_api_interface.h index 5eeaad0800cfa..d4bfb280c218a 100644 --- a/shell/browser/net/web_request_api_interface.h +++ b/shell/browser/net/web_request_api_interface.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NET_WEB_REQUEST_API_INTERFACE_H_ -#define SHELL_BROWSER_NET_WEB_REQUEST_API_INTERFACE_H_ +#ifndef ELECTRON_SHELL_BROWSER_NET_WEB_REQUEST_API_INTERFACE_H_ +#define ELECTRON_SHELL_BROWSER_NET_WEB_REQUEST_API_INTERFACE_H_ #include #include @@ -59,4 +59,4 @@ class WebRequestAPI { } // namespace electron -#endif // SHELL_BROWSER_NET_WEB_REQUEST_API_INTERFACE_H_ +#endif // ELECTRON_SHELL_BROWSER_NET_WEB_REQUEST_API_INTERFACE_H_ diff --git a/shell/browser/network_hints_handler_impl.h b/shell/browser/network_hints_handler_impl.h index ba49ab6f1986f..3339f0d7238e1 100644 --- a/shell/browser/network_hints_handler_impl.h +++ b/shell/browser/network_hints_handler_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_ -#define SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_ +#ifndef ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_ +#define ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_ #include "components/network_hints/browser/simple_network_hints_handler_impl.h" @@ -31,4 +31,4 @@ class NetworkHintsHandlerImpl content::BrowserContext* browser_context_ = nullptr; }; -#endif // SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_ +#endif // ELECTRON_SHELL_BROWSER_NETWORK_HINTS_HANDLER_IMPL_H_ diff --git a/shell/browser/notifications/linux/libnotify_notification.h b/shell/browser/notifications/linux/libnotify_notification.h index b1cf111fe8daa..0158df4503e2e 100644 --- a/shell/browser/notifications/linux/libnotify_notification.h +++ b/shell/browser/notifications/linux/libnotify_notification.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_ -#define SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_ #include "library_loaders/libnotify_loader.h" #include "shell/browser/notifications/notification.h" @@ -39,4 +39,4 @@ class LibnotifyNotification : public Notification { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_ diff --git a/shell/browser/notifications/linux/notification_presenter_linux.h b/shell/browser/notifications/linux/notification_presenter_linux.h index b8e5c71f3cf74..9bfcffae70d5b 100644 --- a/shell/browser/notifications/linux/notification_presenter_linux.h +++ b/shell/browser/notifications/linux/notification_presenter_linux.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_LINUX_NOTIFICATION_PRESENTER_LINUX_H_ -#define SHELL_BROWSER_NOTIFICATIONS_LINUX_NOTIFICATION_PRESENTER_LINUX_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_NOTIFICATION_PRESENTER_LINUX_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_NOTIFICATION_PRESENTER_LINUX_H_ #include "shell/browser/notifications/notification_presenter.h" @@ -22,4 +22,4 @@ class NotificationPresenterLinux : public NotificationPresenter { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_LINUX_NOTIFICATION_PRESENTER_LINUX_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_LINUX_NOTIFICATION_PRESENTER_LINUX_H_ diff --git a/shell/browser/notifications/mac/cocoa_notification.h b/shell/browser/notifications/mac/cocoa_notification.h index 3f586dc70bd45..8fd3cfb64c9cd 100644 --- a/shell/browser/notifications/mac/cocoa_notification.h +++ b/shell/browser/notifications/mac/cocoa_notification.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_ -#define SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_ #import @@ -43,4 +43,4 @@ class CocoaNotification : public Notification { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_ diff --git a/shell/browser/notifications/mac/notification_center_delegate.h b/shell/browser/notifications/mac/notification_center_delegate.h index ec7e681fa338b..fac1f401934a7 100644 --- a/shell/browser/notifications/mac/notification_center_delegate.h +++ b/shell/browser/notifications/mac/notification_center_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_CENTER_DELEGATE_H_ -#define SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_CENTER_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_CENTER_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_CENTER_DELEGATE_H_ #import @@ -20,4 +20,4 @@ class NotificationPresenterMac; (electron::NotificationPresenterMac*)presenter; @end -#endif // SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_CENTER_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_CENTER_DELEGATE_H_ diff --git a/shell/browser/notifications/mac/notification_presenter_mac.h b/shell/browser/notifications/mac/notification_presenter_mac.h index 242c42391b250..207e3acd81478 100644 --- a/shell/browser/notifications/mac/notification_presenter_mac.h +++ b/shell/browser/notifications/mac/notification_presenter_mac.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_ -#define SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_ #include "base/mac/scoped_nsobject.h" #include "shell/browser/notifications/mac/notification_center_delegate.h" @@ -31,4 +31,4 @@ class NotificationPresenterMac : public NotificationPresenter { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_ diff --git a/shell/browser/notifications/notification.h b/shell/browser/notifications/notification.h index 79a073977c315..6d7456c5dcb7d 100644 --- a/shell/browser/notifications/notification.h +++ b/shell/browser/notifications/notification.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ -#define SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ #include #include @@ -90,4 +90,4 @@ class Notification { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ diff --git a/shell/browser/notifications/notification_delegate.h b/shell/browser/notifications/notification_delegate.h index 4f52279c71d40..8a44f420a1b40 100644 --- a/shell/browser/notifications/notification_delegate.h +++ b/shell/browser/notifications/notification_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_ -#define SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_ #include @@ -32,4 +32,4 @@ class NotificationDelegate { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_ diff --git a/shell/browser/notifications/notification_presenter.h b/shell/browser/notifications/notification_presenter.h index 4a30855d7aa19..b29dd2a4dc8bc 100644 --- a/shell/browser/notifications/notification_presenter.h +++ b/shell/browser/notifications/notification_presenter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_PRESENTER_H_ -#define SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_PRESENTER_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_PRESENTER_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_PRESENTER_H_ #include #include @@ -47,4 +47,4 @@ class NotificationPresenter { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_PRESENTER_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_PRESENTER_H_ diff --git a/shell/browser/notifications/platform_notification_service.h b/shell/browser/notifications/platform_notification_service.h index 3b6d99b5fc3b6..fefbbb70ced2b 100644 --- a/shell/browser/notifications/platform_notification_service.h +++ b/shell/browser/notifications/platform_notification_service.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_ -#define SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_ #include @@ -55,4 +55,4 @@ class PlatformNotificationService } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_ diff --git a/shell/browser/notifications/win/notification_presenter_win.h b/shell/browser/notifications/win/notification_presenter_win.h index 23b9ea992ebe3..1730f09883535 100644 --- a/shell/browser/notifications/win/notification_presenter_win.h +++ b/shell/browser/notifications/win/notification_presenter_win.h @@ -20,8 +20,8 @@ // console.log("Notification dismissed") // }; -#ifndef SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN_H_ -#define SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN_H_ #include "base/files/scoped_temp_dir.h" #include "shell/browser/notifications/notification_presenter.h" @@ -49,4 +49,4 @@ class NotificationPresenterWin : public NotificationPresenter { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN_H_ diff --git a/shell/browser/notifications/win/notification_presenter_win7.h b/shell/browser/notifications/win/notification_presenter_win7.h index 67513ee3c3020..6c03839e624d0 100644 --- a/shell/browser/notifications/win/notification_presenter_win7.h +++ b/shell/browser/notifications/win/notification_presenter_win7.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN7_H_ -#define SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN7_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN7_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN7_H_ #include @@ -34,4 +34,4 @@ class NotificationPresenterWin7 : public NotificationPresenter, } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN7_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN7_H_ diff --git a/shell/browser/notifications/win/win32_desktop_notifications/common.h b/shell/browser/notifications/win/win32_desktop_notifications/common.h index a5655d008f645..9ffec8a561940 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/common.h +++ b/shell/browser/notifications/win/win32_desktop_notifications/common.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_COMMON_H_ -#define SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_COMMON_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_COMMON_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_COMMON_H_ #include @@ -65,4 +65,4 @@ struct ScreenMetrics { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_COMMON_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_COMMON_H_ diff --git a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h index 0515221056095..d188cbc151a34 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h +++ b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_DESKTOP_NOTIFICATION_CONTROLLER_H_ -#define SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_DESKTOP_NOTIFICATION_CONTROLLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_DESKTOP_NOTIFICATION_CONTROLLER_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_DESKTOP_NOTIFICATION_CONTROLLER_H_ #include #include @@ -97,4 +97,4 @@ class DesktopNotificationController::Notification { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_DESKTOP_NOTIFICATION_CONTROLLER_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_DESKTOP_NOTIFICATION_CONTROLLER_H_ diff --git a/shell/browser/notifications/win/win32_desktop_notifications/toast.h b/shell/browser/notifications/win/win32_desktop_notifications/toast.h index 869eb13a7dac0..d7bd2c41b42be 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/toast.h +++ b/shell/browser/notifications/win/win32_desktop_notifications/toast.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_H_ -#define SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_H_ #include @@ -104,4 +104,4 @@ class DesktopNotificationController::Toast { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_H_ diff --git a/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h b/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h index 3cffd9ce45a57..0639357b24e75 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h +++ b/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_UIA_H_ -#define SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_UIA_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_UIA_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_UIA_H_ #include "shell/browser/notifications/win/win32_desktop_notifications/toast.h" @@ -81,4 +81,4 @@ class DesktopNotificationController::Toast::UIAutomationInterface } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_UIA_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_UIA_H_ diff --git a/shell/browser/notifications/win/win32_notification.h b/shell/browser/notifications/win/win32_notification.h index ea5f9a287572e..fdb1145cca307 100644 --- a/shell/browser/notifications/win/win32_notification.h +++ b/shell/browser/notifications/win/win32_notification.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_NOTIFICATION_H_ -#define SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_NOTIFICATION_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_NOTIFICATION_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_NOTIFICATION_H_ #include @@ -33,4 +33,4 @@ class Win32Notification : public electron::Notification { } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_NOTIFICATION_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_NOTIFICATION_H_ diff --git a/shell/browser/notifications/win/windows_toast_notification.h b/shell/browser/notifications/win/windows_toast_notification.h index 51fec92a559fd..adb0f87753f11 100644 --- a/shell/browser/notifications/win/windows_toast_notification.h +++ b/shell/browser/notifications/win/windows_toast_notification.h @@ -6,8 +6,8 @@ // this code // and released it as MIT to the world. -#ifndef SHELL_BROWSER_NOTIFICATIONS_WIN_WINDOWS_TOAST_NOTIFICATION_H_ -#define SHELL_BROWSER_NOTIFICATIONS_WIN_WINDOWS_TOAST_NOTIFICATION_H_ +#ifndef ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WINDOWS_TOAST_NOTIFICATION_H_ +#define ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WINDOWS_TOAST_NOTIFICATION_H_ #include #include @@ -136,4 +136,4 @@ class ToastEventHandler : public RuntimeClass, } // namespace electron -#endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WINDOWS_TOAST_NOTIFICATION_H_ +#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WINDOWS_TOAST_NOTIFICATION_H_ diff --git a/shell/browser/osr/osr_host_display_client.h b/shell/browser/osr/osr_host_display_client.h index 1d858dea1484c..795cf53ce740b 100644 --- a/shell/browser/osr/osr_host_display_client.h +++ b/shell/browser/osr/osr_host_display_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_OSR_OSR_HOST_DISPLAY_CLIENT_H_ -#define SHELL_BROWSER_OSR_OSR_HOST_DISPLAY_CLIENT_H_ +#ifndef ELECTRON_SHELL_BROWSER_OSR_OSR_HOST_DISPLAY_CLIENT_H_ +#define ELECTRON_SHELL_BROWSER_OSR_OSR_HOST_DISPLAY_CLIENT_H_ #include @@ -83,4 +83,4 @@ class OffScreenHostDisplayClient : public viz::HostDisplayClient { } // namespace electron -#endif // SHELL_BROWSER_OSR_OSR_HOST_DISPLAY_CLIENT_H_ +#endif // ELECTRON_SHELL_BROWSER_OSR_OSR_HOST_DISPLAY_CLIENT_H_ diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 98eaa68ff142a..485a18180cfe1 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ -#define SHELL_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ #include #include @@ -299,4 +299,4 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, } // namespace electron -#endif // SHELL_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ diff --git a/shell/browser/osr/osr_video_consumer.h b/shell/browser/osr/osr_video_consumer.h index fb970a3031e4d..ac04a3a57a6f6 100644 --- a/shell/browser/osr/osr_video_consumer.h +++ b/shell/browser/osr/osr_video_consumer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_OSR_OSR_VIDEO_CONSUMER_H_ -#define SHELL_BROWSER_OSR_OSR_VIDEO_CONSUMER_H_ +#ifndef ELECTRON_SHELL_BROWSER_OSR_OSR_VIDEO_CONSUMER_H_ +#define ELECTRON_SHELL_BROWSER_OSR_OSR_VIDEO_CONSUMER_H_ #include #include @@ -57,4 +57,4 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer { } // namespace electron -#endif // SHELL_BROWSER_OSR_OSR_VIDEO_CONSUMER_H_ +#endif // ELECTRON_SHELL_BROWSER_OSR_OSR_VIDEO_CONSUMER_H_ diff --git a/shell/browser/osr/osr_view_proxy.h b/shell/browser/osr/osr_view_proxy.h index f6e4bea40c1d2..6704cfd4fc592 100644 --- a/shell/browser/osr/osr_view_proxy.h +++ b/shell/browser/osr/osr_view_proxy.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_OSR_OSR_VIEW_PROXY_H_ -#define SHELL_BROWSER_OSR_OSR_VIEW_PROXY_H_ +#ifndef ELECTRON_SHELL_BROWSER_OSR_OSR_VIEW_PROXY_H_ +#define ELECTRON_SHELL_BROWSER_OSR_OSR_VIEW_PROXY_H_ #include @@ -51,4 +51,4 @@ class OffscreenViewProxy { } // namespace electron -#endif // SHELL_BROWSER_OSR_OSR_VIEW_PROXY_H_ +#endif // ELECTRON_SHELL_BROWSER_OSR_OSR_VIEW_PROXY_H_ diff --git a/shell/browser/osr/osr_web_contents_view.h b/shell/browser/osr/osr_web_contents_view.h index d530ca0627cf8..0e02728f48c67 100644 --- a/shell/browser/osr/osr_web_contents_view.h +++ b/shell/browser/osr/osr_web_contents_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_OSR_OSR_WEB_CONTENTS_VIEW_H_ -#define SHELL_BROWSER_OSR_OSR_WEB_CONTENTS_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_OSR_OSR_WEB_CONTENTS_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_OSR_OSR_WEB_CONTENTS_VIEW_H_ #include "shell/browser/native_window.h" #include "shell/browser/native_window_observer.h" @@ -105,4 +105,4 @@ class OffScreenWebContentsView : public content::WebContentsView, } // namespace electron -#endif // SHELL_BROWSER_OSR_OSR_WEB_CONTENTS_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_OSR_OSR_WEB_CONTENTS_VIEW_H_ diff --git a/shell/browser/plugins/plugin_utils.h b/shell/browser/plugins/plugin_utils.h index 1bd0c5bd8d280..0aaec62c3d2e3 100644 --- a/shell/browser/plugins/plugin_utils.h +++ b/shell/browser/plugins/plugin_utils.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_PLUGINS_PLUGIN_UTILS_H_ -#define SHELL_BROWSER_PLUGINS_PLUGIN_UTILS_H_ +#ifndef ELECTRON_SHELL_BROWSER_PLUGINS_PLUGIN_UTILS_H_ +#define ELECTRON_SHELL_BROWSER_PLUGINS_PLUGIN_UTILS_H_ #include @@ -31,4 +31,4 @@ class PluginUtils { content::BrowserContext* browser_context); }; -#endif // SHELL_BROWSER_PLUGINS_PLUGIN_UTILS_H_ +#endif // ELECTRON_SHELL_BROWSER_PLUGINS_PLUGIN_UTILS_H_ diff --git a/shell/browser/pref_store_delegate.h b/shell/browser/pref_store_delegate.h index 13b875558ca2b..b3997f3e332eb 100644 --- a/shell/browser/pref_store_delegate.h +++ b/shell/browser/pref_store_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_PREF_STORE_DELEGATE_H_ -#define SHELL_BROWSER_PREF_STORE_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_PREF_STORE_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_PREF_STORE_DELEGATE_H_ #include @@ -55,4 +55,4 @@ class PrefStoreDelegate : public PrefValueStore::Delegate { } // namespace electron -#endif // SHELL_BROWSER_PREF_STORE_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_PREF_STORE_DELEGATE_H_ diff --git a/shell/browser/printing/print_preview_message_handler.h b/shell/browser/printing/print_preview_message_handler.h index 0e5449f137a31..ca84e8c92a647 100644 --- a/shell/browser/printing/print_preview_message_handler.h +++ b/shell/browser/printing/print_preview_message_handler.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ -#define SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ +#define ELECTRON_SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ #include @@ -103,4 +103,4 @@ class PrintPreviewMessageHandler } // namespace electron -#endif // SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ +#endif // ELECTRON_SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ diff --git a/shell/browser/printing/print_view_manager_electron.h b/shell/browser/printing/print_view_manager_electron.h index 5364450a9d485..2127219f953ce 100644 --- a/shell/browser/printing/print_view_manager_electron.h +++ b/shell/browser/printing/print_view_manager_electron.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_ -#define SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_ +#ifndef ELECTRON_SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_ +#define ELECTRON_SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_ #include "build/build_config.h" #include "chrome/browser/printing/print_view_manager_base.h" @@ -44,4 +44,4 @@ class PrintViewManagerElectron } // namespace electron -#endif // SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_ +#endif // ELECTRON_SHELL_BROWSER_PRINTING_PRINT_VIEW_MANAGER_ELECTRON_H_ diff --git a/shell/browser/protocol_registry.h b/shell/browser/protocol_registry.h index f5a07863ec8f0..035197e78f932 100644 --- a/shell/browser/protocol_registry.h +++ b/shell/browser/protocol_registry.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_PROTOCOL_REGISTRY_H_ -#define SHELL_BROWSER_PROTOCOL_REGISTRY_H_ +#ifndef ELECTRON_SHELL_BROWSER_PROTOCOL_REGISTRY_H_ +#define ELECTRON_SHELL_BROWSER_PROTOCOL_REGISTRY_H_ #include @@ -55,4 +55,4 @@ class ProtocolRegistry { } // namespace electron -#endif // SHELL_BROWSER_PROTOCOL_REGISTRY_H_ +#endif // ELECTRON_SHELL_BROWSER_PROTOCOL_REGISTRY_H_ diff --git a/shell/browser/relauncher.h b/shell/browser/relauncher.h index 16f14c92d2a91..d3208843cc188 100644 --- a/shell/browser/relauncher.h +++ b/shell/browser/relauncher.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_RELAUNCHER_H_ -#define SHELL_BROWSER_RELAUNCHER_H_ +#ifndef ELECTRON_SHELL_BROWSER_RELAUNCHER_H_ +#define ELECTRON_SHELL_BROWSER_RELAUNCHER_H_ // relauncher implements main browser application relaunches across platforms. // When a browser wants to relaunch itself, it can't simply fork off a new @@ -116,4 +116,4 @@ int LaunchProgram(const StringVector& relauncher_args, } // namespace relauncher -#endif // SHELL_BROWSER_RELAUNCHER_H_ +#endif // ELECTRON_SHELL_BROWSER_RELAUNCHER_H_ diff --git a/shell/browser/serial/electron_serial_delegate.h b/shell/browser/serial/electron_serial_delegate.h index 6993af2788992..ef9c4af749ff4 100644 --- a/shell/browser/serial/electron_serial_delegate.h +++ b/shell/browser/serial/electron_serial_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_SERIAL_ELECTRON_SERIAL_DELEGATE_H_ -#define SHELL_BROWSER_SERIAL_ELECTRON_SERIAL_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_SERIAL_ELECTRON_SERIAL_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_SERIAL_ELECTRON_SERIAL_DELEGATE_H_ #include #include @@ -59,4 +59,4 @@ class ElectronSerialDelegate : public content::SerialDelegate { } // namespace electron -#endif // SHELL_BROWSER_SERIAL_ELECTRON_SERIAL_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_SERIAL_ELECTRON_SERIAL_DELEGATE_H_ diff --git a/shell/browser/serial/serial_chooser_context.h b/shell/browser/serial/serial_chooser_context.h index adc527c6e3214..313ec7065c0d6 100644 --- a/shell/browser/serial/serial_chooser_context.h +++ b/shell/browser/serial/serial_chooser_context.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_H_ -#define SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_H_ +#ifndef ELECTRON_SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_H_ +#define ELECTRON_SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_H_ #include #include @@ -97,4 +97,4 @@ class SerialChooserContext : public KeyedService, } // namespace electron -#endif // SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_H_ +#endif // ELECTRON_SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_H_ diff --git a/shell/browser/serial/serial_chooser_context_factory.h b/shell/browser/serial/serial_chooser_context_factory.h index 8e1d8b30c41d8..c1b6afec1f654 100644 --- a/shell/browser/serial/serial_chooser_context_factory.h +++ b/shell/browser/serial/serial_chooser_context_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_FACTORY_H_ -#define SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_FACTORY_H_ +#ifndef ELECTRON_SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_FACTORY_H_ +#define ELECTRON_SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_FACTORY_H_ #include "base/memory/singleton.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" @@ -39,4 +39,4 @@ class SerialChooserContextFactory : public BrowserContextKeyedServiceFactory { } // namespace electron -#endif // SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_FACTORY_H_ +#endif // ELECTRON_SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_FACTORY_H_ diff --git a/shell/browser/serial/serial_chooser_controller.h b/shell/browser/serial/serial_chooser_controller.h index f3e3cd7460bdc..368cf18652a99 100644 --- a/shell/browser/serial/serial_chooser_controller.h +++ b/shell/browser/serial/serial_chooser_controller.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTROLLER_H_ -#define SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTROLLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTROLLER_H_ +#define ELECTRON_SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTROLLER_H_ #include #include @@ -72,4 +72,4 @@ class SerialChooserController final : public SerialChooserContext::PortObserver, } // namespace electron -#endif // SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTROLLER_H_ +#endif // ELECTRON_SHELL_BROWSER_SERIAL_SERIAL_CHOOSER_CONTROLLER_H_ diff --git a/shell/browser/session_preferences.h b/shell/browser/session_preferences.h index e02d92ee47e7a..8f9504abf8fa9 100644 --- a/shell/browser/session_preferences.h +++ b/shell/browser/session_preferences.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_SESSION_PREFERENCES_H_ -#define SHELL_BROWSER_SESSION_PREFERENCES_H_ +#ifndef ELECTRON_SHELL_BROWSER_SESSION_PREFERENCES_H_ +#define ELECTRON_SHELL_BROWSER_SESSION_PREFERENCES_H_ #include @@ -40,4 +40,4 @@ class SessionPreferences : public base::SupportsUserData::Data { } // namespace electron -#endif // SHELL_BROWSER_SESSION_PREFERENCES_H_ +#endif // ELECTRON_SHELL_BROWSER_SESSION_PREFERENCES_H_ diff --git a/shell/browser/special_storage_policy.h b/shell/browser/special_storage_policy.h index 2dd9ff30cbb12..aa0ac9cca583d 100644 --- a/shell/browser/special_storage_policy.h +++ b/shell/browser/special_storage_policy.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_SPECIAL_STORAGE_POLICY_H_ -#define SHELL_BROWSER_SPECIAL_STORAGE_POLICY_H_ +#ifndef ELECTRON_SHELL_BROWSER_SPECIAL_STORAGE_POLICY_H_ +#define ELECTRON_SHELL_BROWSER_SPECIAL_STORAGE_POLICY_H_ #include "storage/browser/quota/special_storage_policy.h" @@ -28,4 +28,4 @@ class SpecialStoragePolicy : public storage::SpecialStoragePolicy { } // namespace electron -#endif // SHELL_BROWSER_SPECIAL_STORAGE_POLICY_H_ +#endif // ELECTRON_SHELL_BROWSER_SPECIAL_STORAGE_POLICY_H_ diff --git a/shell/browser/ui/accelerator_util.h b/shell/browser/ui/accelerator_util.h index 8be1214adf3a3..c573aeaab2260 100644 --- a/shell/browser/ui/accelerator_util.h +++ b/shell/browser/ui/accelerator_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_ACCELERATOR_UTIL_H_ -#define SHELL_BROWSER_UI_ACCELERATOR_UTIL_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_ACCELERATOR_UTIL_H_ +#define ELECTRON_SHELL_BROWSER_UI_ACCELERATOR_UTIL_H_ #include #include @@ -33,4 +33,4 @@ bool TriggerAcceleratorTableCommand(AcceleratorTable* table, } // namespace accelerator_util -#endif // SHELL_BROWSER_UI_ACCELERATOR_UTIL_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_ACCELERATOR_UTIL_H_ diff --git a/shell/browser/ui/autofill_popup.h b/shell/browser/ui/autofill_popup.h index 1a8ad450370a0..56a7b0d28c758 100644 --- a/shell/browser/ui/autofill_popup.h +++ b/shell/browser/ui/autofill_popup.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_AUTOFILL_POPUP_H_ -#define SHELL_BROWSER_UI_AUTOFILL_POPUP_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_AUTOFILL_POPUP_H_ +#define ELECTRON_SHELL_BROWSER_UI_AUTOFILL_POPUP_H_ #include @@ -90,4 +90,4 @@ class AutofillPopup : public views::ViewObserver { } // namespace electron -#endif // SHELL_BROWSER_UI_AUTOFILL_POPUP_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_AUTOFILL_POPUP_H_ diff --git a/shell/browser/ui/certificate_trust.h b/shell/browser/ui/certificate_trust.h index 02bd8987beebd..fd266d46eca89 100644 --- a/shell/browser/ui/certificate_trust.h +++ b/shell/browser/ui/certificate_trust.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_CERTIFICATE_TRUST_H_ -#define SHELL_BROWSER_UI_CERTIFICATE_TRUST_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_CERTIFICATE_TRUST_H_ +#define ELECTRON_SHELL_BROWSER_UI_CERTIFICATE_TRUST_H_ #include @@ -25,4 +25,4 @@ v8::Local ShowCertificateTrust( } // namespace certificate_trust -#endif // SHELL_BROWSER_UI_CERTIFICATE_TRUST_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_CERTIFICATE_TRUST_H_ diff --git a/shell/browser/ui/cocoa/NSColor+Hex.h b/shell/browser/ui/cocoa/NSColor+Hex.h index cb36d00ef26fc..b1eba70b2f6ea 100644 --- a/shell/browser/ui/cocoa/NSColor+Hex.h +++ b/shell/browser/ui/cocoa/NSColor+Hex.h @@ -4,8 +4,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_NSCOLOR_HEX_H_ -#define SHELL_BROWSER_UI_COCOA_NSCOLOR_HEX_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_NSCOLOR_HEX_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_NSCOLOR_HEX_H_ #import @@ -15,4 +15,4 @@ + (NSColor*)colorWithHexColorString:(NSString*)hex; @end -#endif // SHELL_BROWSER_UI_COCOA_NSCOLOR_HEX_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_NSCOLOR_HEX_H_ diff --git a/shell/browser/ui/cocoa/NSString+ANSI.h b/shell/browser/ui/cocoa/NSString+ANSI.h index 4991b5cb184e0..b92791a7215e1 100644 --- a/shell/browser/ui/cocoa/NSString+ANSI.h +++ b/shell/browser/ui/cocoa/NSString+ANSI.h @@ -4,8 +4,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_NSSTRING_ANSI_H_ -#define SHELL_BROWSER_UI_COCOA_NSSTRING_ANSI_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_NSSTRING_ANSI_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_NSSTRING_ANSI_H_ #import @@ -14,4 +14,4 @@ - (NSMutableAttributedString*)attributedStringParsingANSICodes; @end -#endif // SHELL_BROWSER_UI_COCOA_NSSTRING_ANSI_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_NSSTRING_ANSI_H_ diff --git a/shell/browser/ui/cocoa/delayed_native_view_host.h b/shell/browser/ui/cocoa/delayed_native_view_host.h index 26f8799f55c79..e7020dba60715 100644 --- a/shell/browser/ui/cocoa/delayed_native_view_host.h +++ b/shell/browser/ui/cocoa/delayed_native_view_host.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_DELAYED_NATIVE_VIEW_HOST_H_ -#define SHELL_BROWSER_UI_COCOA_DELAYED_NATIVE_VIEW_HOST_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_DELAYED_NATIVE_VIEW_HOST_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_DELAYED_NATIVE_VIEW_HOST_H_ #include "ui/views/controls/native/native_view_host.h" @@ -30,4 +30,4 @@ class DelayedNativeViewHost : public views::NativeViewHost { } // namespace electron -#endif // SHELL_BROWSER_UI_COCOA_DELAYED_NATIVE_VIEW_HOST_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_DELAYED_NATIVE_VIEW_HOST_H_ diff --git a/shell/browser/ui/cocoa/electron_bundle_mover.h b/shell/browser/ui/cocoa/electron_bundle_mover.h index e7177f8c7e4d3..c1c5306dfc809 100644 --- a/shell/browser/ui/cocoa/electron_bundle_mover.h +++ b/shell/browser/ui/cocoa/electron_bundle_mover.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_BUNDLE_MOVER_H_ -#define SHELL_BROWSER_UI_COCOA_ELECTRON_BUNDLE_MOVER_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_BUNDLE_MOVER_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_BUNDLE_MOVER_H_ #include @@ -43,4 +43,4 @@ class ElectronBundleMover { } // namespace electron -#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_BUNDLE_MOVER_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_BUNDLE_MOVER_H_ diff --git a/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h b/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h index 2bedbf22f5f8e..696bf5e89d66a 100644 --- a/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h +++ b/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_ -#define SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_ #import @@ -52,4 +52,4 @@ using electron::InspectableWebContentsViewMac; @end -#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_ diff --git a/shell/browser/ui/cocoa/electron_menu_controller.h b/shell/browser/ui/cocoa/electron_menu_controller.h index 8a856be08eeb6..29ba2a503b09b 100644 --- a/shell/browser/ui/cocoa/electron_menu_controller.h +++ b/shell/browser/ui/cocoa/electron_menu_controller.h @@ -3,8 +3,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_MENU_CONTROLLER_H_ -#define SHELL_BROWSER_UI_COCOA_ELECTRON_MENU_CONTROLLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_MENU_CONTROLLER_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_MENU_CONTROLLER_H_ #import @@ -66,4 +66,4 @@ class ElectronMenuModel; @end -#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_MENU_CONTROLLER_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_MENU_CONTROLLER_H_ diff --git a/shell/browser/ui/cocoa/electron_native_widget_mac.h b/shell/browser/ui/cocoa/electron_native_widget_mac.h index 58a2b81224857..7fdfd0433a01a 100644 --- a/shell/browser/ui/cocoa/electron_native_widget_mac.h +++ b/shell/browser/ui/cocoa/electron_native_widget_mac.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_NATIVE_WIDGET_MAC_H_ -#define SHELL_BROWSER_UI_COCOA_ELECTRON_NATIVE_WIDGET_MAC_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NATIVE_WIDGET_MAC_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NATIVE_WIDGET_MAC_H_ #include "ui/views/widget/native_widget_mac.h" @@ -34,4 +34,4 @@ class ElectronNativeWidgetMac : public views::NativeWidgetMac { } // namespace electron -#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_NATIVE_WIDGET_MAC_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NATIVE_WIDGET_MAC_H_ diff --git a/shell/browser/ui/cocoa/electron_ns_window.h b/shell/browser/ui/cocoa/electron_ns_window.h index c5adf86469e95..50ad1ca8a96d2 100644 --- a/shell/browser/ui/cocoa/electron_ns_window.h +++ b/shell/browser/ui/cocoa/electron_ns_window.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_ -#define SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_ #include "components/remote_cocoa/app_shim/native_widget_mac_nswindow.h" #include "shell/browser/ui/cocoa/event_dispatching_window.h" @@ -46,4 +46,4 @@ class ScopedDisableResize { - (NSImage*)_cornerMask; @end -#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_H_ diff --git a/shell/browser/ui/cocoa/electron_ns_window_delegate.h b/shell/browser/ui/cocoa/electron_ns_window_delegate.h index dca6e9a08fbc0..fad28319fa069 100644 --- a/shell/browser/ui/cocoa/electron_ns_window_delegate.h +++ b/shell/browser/ui/cocoa/electron_ns_window_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_ -#define SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_ #include @@ -30,4 +30,4 @@ class NativeWindowMac; - (id)initWithShell:(electron::NativeWindowMac*)shell; @end -#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_NS_WINDOW_DELEGATE_H_ diff --git a/shell/browser/ui/cocoa/electron_preview_item.h b/shell/browser/ui/cocoa/electron_preview_item.h index f8172af1834f0..d8a8069f5d4d3 100644 --- a/shell/browser/ui/cocoa/electron_preview_item.h +++ b/shell/browser/ui/cocoa/electron_preview_item.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_PREVIEW_ITEM_H_ -#define SHELL_BROWSER_UI_COCOA_ELECTRON_PREVIEW_ITEM_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_PREVIEW_ITEM_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_PREVIEW_ITEM_H_ #import #import @@ -14,4 +14,4 @@ - (id)initWithURL:(NSURL*)url title:(NSString*)title; @end -#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_PREVIEW_ITEM_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_PREVIEW_ITEM_H_ diff --git a/shell/browser/ui/cocoa/electron_touch_bar.h b/shell/browser/ui/cocoa/electron_touch_bar.h index 137878d3a6f60..9b299d27e9933 100644 --- a/shell/browser/ui/cocoa/electron_touch_bar.h +++ b/shell/browser/ui/cocoa/electron_touch_bar.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_TOUCH_BAR_H_ -#define SHELL_BROWSER_UI_COCOA_ELECTRON_TOUCH_BAR_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_TOUCH_BAR_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_TOUCH_BAR_H_ #import @@ -96,4 +96,4 @@ @end -#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_TOUCH_BAR_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ELECTRON_TOUCH_BAR_H_ diff --git a/shell/browser/ui/cocoa/event_dispatching_window.h b/shell/browser/ui/cocoa/event_dispatching_window.h index 58b08adfcd85e..9dcf3e6cc393b 100644 --- a/shell/browser/ui/cocoa/event_dispatching_window.h +++ b/shell/browser/ui/cocoa/event_dispatching_window.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_ -#define SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_ #import "ui/base/cocoa/underlay_opengl_hosting_window.h" @@ -16,4 +16,4 @@ @end -#endif // SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_ diff --git a/shell/browser/ui/cocoa/root_view_mac.h b/shell/browser/ui/cocoa/root_view_mac.h index 3be7731a54c8c..3bfd1a10b1901 100644 --- a/shell/browser/ui/cocoa/root_view_mac.h +++ b/shell/browser/ui/cocoa/root_view_mac.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_ -#define SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_ #include "ui/views/view.h" @@ -32,4 +32,4 @@ class RootViewMac : public views::View { } // namespace electron -#endif // SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_ diff --git a/shell/browser/ui/cocoa/views_delegate_mac.h b/shell/browser/ui/cocoa/views_delegate_mac.h index e758854aaaa61..440c5f93e3f2a 100644 --- a/shell/browser/ui/cocoa/views_delegate_mac.h +++ b/shell/browser/ui/cocoa/views_delegate_mac.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_VIEWS_DELEGATE_MAC_H_ -#define SHELL_BROWSER_UI_COCOA_VIEWS_DELEGATE_MAC_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_VIEWS_DELEGATE_MAC_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_VIEWS_DELEGATE_MAC_H_ #include "ui/views/views_delegate.h" @@ -27,4 +27,4 @@ class ViewsDelegateMac : public views::ViewsDelegate { } // namespace electron -#endif // SHELL_BROWSER_UI_COCOA_VIEWS_DELEGATE_MAC_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_VIEWS_DELEGATE_MAC_H_ diff --git a/shell/browser/ui/cocoa/window_buttons_proxy.h b/shell/browser/ui/cocoa/window_buttons_proxy.h index 521c5cf110e88..53aa4ef3f0d04 100644 --- a/shell/browser/ui/cocoa/window_buttons_proxy.h +++ b/shell/browser/ui/cocoa/window_buttons_proxy.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_COCOA_WINDOW_BUTTONS_PROXY_H_ -#define SHELL_BROWSER_UI_COCOA_WINDOW_BUTTONS_PROXY_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_WINDOW_BUTTONS_PROXY_H_ +#define ELECTRON_SHELL_BROWSER_UI_COCOA_WINDOW_BUTTONS_PROXY_H_ #import @@ -56,4 +56,4 @@ - (void)updateTrackingAreas; @end -#endif // SHELL_BROWSER_UI_COCOA_WINDOW_BUTTONS_PROXY_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_COCOA_WINDOW_BUTTONS_PROXY_H_ diff --git a/shell/browser/ui/devtools_manager_delegate.h b/shell/browser/ui/devtools_manager_delegate.h index 6ae5b4ed26e98..ea9d848cd3b62 100644 --- a/shell/browser/ui/devtools_manager_delegate.h +++ b/shell/browser/ui/devtools_manager_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_DEVTOOLS_MANAGER_DELEGATE_H_ -#define SHELL_BROWSER_UI_DEVTOOLS_MANAGER_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_DEVTOOLS_MANAGER_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_UI_DEVTOOLS_MANAGER_DELEGATE_H_ #include @@ -36,4 +36,4 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate { } // namespace electron -#endif // SHELL_BROWSER_UI_DEVTOOLS_MANAGER_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_DEVTOOLS_MANAGER_DELEGATE_H_ diff --git a/shell/browser/ui/devtools_ui.h b/shell/browser/ui/devtools_ui.h index fdbf758021c04..30194d7d20365 100644 --- a/shell/browser/ui/devtools_ui.h +++ b/shell/browser/ui/devtools_ui.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_DEVTOOLS_UI_H_ -#define SHELL_BROWSER_UI_DEVTOOLS_UI_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_DEVTOOLS_UI_H_ +#define ELECTRON_SHELL_BROWSER_UI_DEVTOOLS_UI_H_ #include "base/compiler_specific.h" #include "content/public/browser/browser_context.h" @@ -23,4 +23,4 @@ class DevToolsUI : public content::WebUIController { } // namespace electron -#endif // SHELL_BROWSER_UI_DEVTOOLS_UI_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_DEVTOOLS_UI_H_ diff --git a/shell/browser/ui/drag_util.h b/shell/browser/ui/drag_util.h index 9fe50a4b59e3e..6de7808822cf6 100644 --- a/shell/browser/ui/drag_util.h +++ b/shell/browser/ui/drag_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_DRAG_UTIL_H_ -#define SHELL_BROWSER_UI_DRAG_UTIL_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_DRAG_UTIL_H_ +#define ELECTRON_SHELL_BROWSER_UI_DRAG_UTIL_H_ #include #include @@ -34,4 +34,4 @@ std::unique_ptr DraggableRegionsToSkRegion( } // namespace electron -#endif // SHELL_BROWSER_UI_DRAG_UTIL_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_DRAG_UTIL_H_ diff --git a/shell/browser/ui/electron_menu_model.h b/shell/browser/ui/electron_menu_model.h index 3ab6bce60d597..0fb9bcf57319a 100644 --- a/shell/browser/ui/electron_menu_model.h +++ b/shell/browser/ui/electron_menu_model.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_ELECTRON_MENU_MODEL_H_ -#define SHELL_BROWSER_UI_ELECTRON_MENU_MODEL_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_ELECTRON_MENU_MODEL_H_ +#define ELECTRON_SHELL_BROWSER_UI_ELECTRON_MENU_MODEL_H_ #include #include @@ -128,4 +128,4 @@ class ElectronMenuModel : public ui::SimpleMenuModel { } // namespace electron -#endif // SHELL_BROWSER_UI_ELECTRON_MENU_MODEL_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_ELECTRON_MENU_MODEL_H_ diff --git a/shell/browser/ui/file_dialog.h b/shell/browser/ui/file_dialog.h index 239fcbc12422d..3bed2f581b052 100644 --- a/shell/browser/ui/file_dialog.h +++ b/shell/browser/ui/file_dialog.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_FILE_DIALOG_H_ -#define SHELL_BROWSER_UI_FILE_DIALOG_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_FILE_DIALOG_H_ +#define ELECTRON_SHELL_BROWSER_UI_FILE_DIALOG_H_ #include #include @@ -74,4 +74,4 @@ void ShowSaveDialog(const DialogSettings& settings, } // namespace file_dialog -#endif // SHELL_BROWSER_UI_FILE_DIALOG_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_FILE_DIALOG_H_ diff --git a/shell/browser/ui/gtk/app_indicator_icon.h b/shell/browser/ui/gtk/app_indicator_icon.h index 05b0de12f135e..3219beb5ee154 100644 --- a/shell/browser/ui/gtk/app_indicator_icon.h +++ b/shell/browser/ui/gtk/app_indicator_icon.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_H_ -#define SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_H_ +#define ELECTRON_SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_H_ #include #include @@ -114,4 +114,4 @@ class AppIndicatorIcon : public views::StatusIconLinux { } // namespace electron -#endif // SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_H_ diff --git a/shell/browser/ui/gtk/app_indicator_icon_menu.h b/shell/browser/ui/gtk/app_indicator_icon_menu.h index f8b06c2fcf393..e4987eb69df30 100644 --- a/shell/browser/ui/gtk/app_indicator_icon_menu.h +++ b/shell/browser/ui/gtk/app_indicator_icon_menu.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_MENU_H_ -#define SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_MENU_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_MENU_H_ +#define ELECTRON_SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_MENU_H_ #include "base/callback.h" #include "ui/base/glib/glib_signal.h" @@ -74,4 +74,4 @@ class AppIndicatorIconMenu { } // namespace electron -#endif // SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_MENU_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_GTK_APP_INDICATOR_ICON_MENU_H_ diff --git a/shell/browser/ui/gtk/gtk_status_icon.h b/shell/browser/ui/gtk/gtk_status_icon.h index fb7a1d20f99a0..b8b67259c671a 100644 --- a/shell/browser/ui/gtk/gtk_status_icon.h +++ b/shell/browser/ui/gtk/gtk_status_icon.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_GTK_GTK_STATUS_ICON_H_ -#define SHELL_BROWSER_UI_GTK_GTK_STATUS_ICON_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_GTK_GTK_STATUS_ICON_H_ +#define ELECTRON_SHELL_BROWSER_UI_GTK_GTK_STATUS_ICON_H_ #include @@ -62,4 +62,4 @@ class GtkStatusIcon : public views::StatusIconLinux { } // namespace electron -#endif // SHELL_BROWSER_UI_GTK_GTK_STATUS_ICON_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_GTK_GTK_STATUS_ICON_H_ diff --git a/shell/browser/ui/gtk/menu_util.h b/shell/browser/ui/gtk/menu_util.h index 4dedb7b25665c..6d46c49b3f7da 100644 --- a/shell/browser/ui/gtk/menu_util.h +++ b/shell/browser/ui/gtk/menu_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_GTK_MENU_UTIL_H_ -#define SHELL_BROWSER_UI_GTK_MENU_UTIL_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_GTK_MENU_UTIL_H_ +#define ELECTRON_SHELL_BROWSER_UI_GTK_MENU_UTIL_H_ #include @@ -60,4 +60,4 @@ void SetMenuItemInfo(GtkWidget* widget, void* block_activation_ptr); } // namespace electron -#endif // SHELL_BROWSER_UI_GTK_MENU_UTIL_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_GTK_MENU_UTIL_H_ diff --git a/shell/browser/ui/gtk/status_icon.h b/shell/browser/ui/gtk/status_icon.h index 384938ef8e853..10e17f2781f09 100644 --- a/shell/browser/ui/gtk/status_icon.h +++ b/shell/browser/ui/gtk/status_icon.h @@ -6,8 +6,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_GTK_STATUS_ICON_H_ -#define SHELL_BROWSER_UI_GTK_STATUS_ICON_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_GTK_STATUS_ICON_H_ +#define ELECTRON_SHELL_BROWSER_UI_GTK_STATUS_ICON_H_ #include @@ -29,4 +29,4 @@ std::unique_ptr CreateLinuxStatusIcon( } // namespace electron -#endif // SHELL_BROWSER_UI_GTK_STATUS_ICON_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_GTK_STATUS_ICON_H_ diff --git a/shell/browser/ui/gtk_util.h b/shell/browser/ui/gtk_util.h index 31bfa049e98cd..ef08333c92c3c 100644 --- a/shell/browser/ui/gtk_util.h +++ b/shell/browser/ui/gtk_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_GTK_UTIL_H_ -#define SHELL_BROWSER_UI_GTK_UTIL_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_GTK_UTIL_H_ +#define ELECTRON_SHELL_BROWSER_UI_GTK_UTIL_H_ #include @@ -25,4 +25,4 @@ GdkPixbuf* GdkPixbufFromSkBitmap(const SkBitmap& bitmap); } // namespace gtk_util -#endif // SHELL_BROWSER_UI_GTK_UTIL_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_GTK_UTIL_H_ diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index 34f146efdfb6a..3650b5300dd7a 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_ -#define SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_ +#define ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_ #include #include @@ -246,4 +246,4 @@ class InspectableWebContents } // namespace electron -#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_ diff --git a/shell/browser/ui/inspectable_web_contents_delegate.h b/shell/browser/ui/inspectable_web_contents_delegate.h index fce4344212482..62abef7485e44 100644 --- a/shell/browser/ui/inspectable_web_contents_delegate.h +++ b/shell/browser/ui/inspectable_web_contents_delegate.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_ -#define SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_ #include @@ -40,4 +40,4 @@ class InspectableWebContentsDelegate { } // namespace electron -#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_ diff --git a/shell/browser/ui/inspectable_web_contents_view.h b/shell/browser/ui/inspectable_web_contents_view.h index c5d2be5732e18..aa0d194b7589c 100644 --- a/shell/browser/ui/inspectable_web_contents_view.h +++ b/shell/browser/ui/inspectable_web_contents_view.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_H_ -#define SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_H_ #include @@ -60,4 +60,4 @@ class InspectableWebContentsView { } // namespace electron -#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_H_ diff --git a/shell/browser/ui/inspectable_web_contents_view_delegate.h b/shell/browser/ui/inspectable_web_contents_view_delegate.h index ad51f098812a2..e8155d25577c6 100644 --- a/shell/browser/ui/inspectable_web_contents_view_delegate.h +++ b/shell/browser/ui/inspectable_web_contents_view_delegate.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_ -#define SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_ #include @@ -33,4 +33,4 @@ class InspectableWebContentsViewDelegate { } // namespace electron -#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_ diff --git a/shell/browser/ui/inspectable_web_contents_view_mac.h b/shell/browser/ui/inspectable_web_contents_view_mac.h index 8a30bc532917c..32b8563137a37 100644 --- a/shell/browser/ui/inspectable_web_contents_view_mac.h +++ b/shell/browser/ui/inspectable_web_contents_view_mac.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_ -#define SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_ +#define ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_ #include "shell/browser/ui/inspectable_web_contents_view.h" @@ -48,4 +48,4 @@ class InspectableWebContentsViewMac : public InspectableWebContentsView { } // namespace electron -#endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_ diff --git a/shell/browser/ui/message_box.h b/shell/browser/ui/message_box.h index d680208ea9aa0..a3a763bc1e5bd 100644 --- a/shell/browser/ui/message_box.h +++ b/shell/browser/ui/message_box.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_MESSAGE_BOX_H_ -#define SHELL_BROWSER_UI_MESSAGE_BOX_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_MESSAGE_BOX_H_ +#define ELECTRON_SHELL_BROWSER_UI_MESSAGE_BOX_H_ #include #include @@ -61,4 +61,4 @@ void ShowErrorBox(const std::u16string& title, const std::u16string& content); } // namespace electron -#endif // SHELL_BROWSER_UI_MESSAGE_BOX_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_MESSAGE_BOX_H_ diff --git a/shell/browser/ui/tray_icon.h b/shell/browser/ui/tray_icon.h index c9caca7e673be..ff7040aa64426 100644 --- a/shell/browser/ui/tray_icon.h +++ b/shell/browser/ui/tray_icon.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_TRAY_ICON_H_ -#define SHELL_BROWSER_UI_TRAY_ICON_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_H_ +#define ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_H_ #include #include @@ -137,4 +137,4 @@ class TrayIcon { } // namespace electron -#endif // SHELL_BROWSER_UI_TRAY_ICON_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_H_ diff --git a/shell/browser/ui/tray_icon_cocoa.h b/shell/browser/ui/tray_icon_cocoa.h index 308f2b01adaf6..4db1114cd98e2 100644 --- a/shell/browser/ui/tray_icon_cocoa.h +++ b/shell/browser/ui/tray_icon_cocoa.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_ -#define SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_ +#define ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_ #import @@ -48,4 +48,4 @@ class TrayIconCocoa : public TrayIcon { } // namespace electron -#endif // SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_ diff --git a/shell/browser/ui/tray_icon_gtk.h b/shell/browser/ui/tray_icon_gtk.h index 5abef5c0d9a5d..c01621aed24a1 100644 --- a/shell/browser/ui/tray_icon_gtk.h +++ b/shell/browser/ui/tray_icon_gtk.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_TRAY_ICON_GTK_H_ -#define SHELL_BROWSER_UI_TRAY_ICON_GTK_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_GTK_H_ +#define ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_GTK_H_ #include #include @@ -42,4 +42,4 @@ class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate { } // namespace electron -#endif // SHELL_BROWSER_UI_TRAY_ICON_GTK_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_GTK_H_ diff --git a/shell/browser/ui/tray_icon_observer.h b/shell/browser/ui/tray_icon_observer.h index aa9e7399756bd..10c86bcd02d85 100644 --- a/shell/browser/ui/tray_icon_observer.h +++ b/shell/browser/ui/tray_icon_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_ -#define SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_ +#define ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_ #include #include @@ -45,4 +45,4 @@ class TrayIconObserver : public base::CheckedObserver { } // namespace electron -#endif // SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_ diff --git a/shell/browser/ui/views/autofill_popup_view.h b/shell/browser/ui/views/autofill_popup_view.h index 692a41b682506..1f1a1bedd0e47 100644 --- a/shell/browser/ui/views/autofill_popup_view.h +++ b/shell/browser/ui/views/autofill_popup_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_ -#define SHELL_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_ #include @@ -154,4 +154,4 @@ class AutofillPopupView : public views::WidgetDelegateView, } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_ diff --git a/shell/browser/ui/views/electron_views_delegate.h b/shell/browser/ui/views/electron_views_delegate.h index 9ad237610d1c3..67b3561734640 100644 --- a/shell/browser/ui/views/electron_views_delegate.h +++ b/shell/browser/ui/views/electron_views_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_VIEWS_ELECTRON_VIEWS_DELEGATE_H_ -#define SHELL_BROWSER_UI_VIEWS_ELECTRON_VIEWS_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_ELECTRON_VIEWS_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_ELECTRON_VIEWS_DELEGATE_H_ #include #include @@ -79,4 +79,4 @@ class ViewsDelegate : public views::ViewsDelegate { } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_ELECTRON_VIEWS_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_ELECTRON_VIEWS_DELEGATE_H_ diff --git a/shell/browser/ui/views/frameless_view.h b/shell/browser/ui/views/frameless_view.h index ddb55fc74d12c..70c6d2c2d2c21 100644 --- a/shell/browser/ui/views/frameless_view.h +++ b/shell/browser/ui/views/frameless_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_ -#define SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_ #include "ui/views/window/non_client_view.h" @@ -57,4 +57,4 @@ class FramelessView : public views::NonClientFrameView { } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_ diff --git a/shell/browser/ui/views/global_menu_bar_registrar_x11.h b/shell/browser/ui/views/global_menu_bar_registrar_x11.h index f58b755d486e7..1519f4c035851 100644 --- a/shell/browser/ui/views/global_menu_bar_registrar_x11.h +++ b/shell/browser/ui/views/global_menu_bar_registrar_x11.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_REGISTRAR_X11_H_ -#define SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_REGISTRAR_X11_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_REGISTRAR_X11_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_REGISTRAR_X11_H_ #include @@ -60,4 +60,4 @@ class GlobalMenuBarRegistrarX11 { std::set live_windows_; }; -#endif // SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_REGISTRAR_X11_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_REGISTRAR_X11_H_ diff --git a/shell/browser/ui/views/global_menu_bar_x11.h b/shell/browser/ui/views/global_menu_bar_x11.h index dad6770e66297..2c5adcf31c48b 100644 --- a/shell/browser/ui/views/global_menu_bar_x11.h +++ b/shell/browser/ui/views/global_menu_bar_x11.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_X11_H_ -#define SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_X11_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_X11_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_X11_H_ #include @@ -80,4 +80,4 @@ class GlobalMenuBarX11 { } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_X11_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_X11_H_ diff --git a/shell/browser/ui/views/inspectable_web_contents_view_views.h b/shell/browser/ui/views/inspectable_web_contents_view_views.h index 04d1f9e9f80db..beac94c013c20 100644 --- a/shell/browser/ui/views/inspectable_web_contents_view_views.h +++ b/shell/browser/ui/views/inspectable_web_contents_view_views.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_UI_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_ -#define SHELL_BROWSER_UI_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_ #include @@ -67,4 +67,4 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView, } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_ diff --git a/shell/browser/ui/views/menu_bar.h b/shell/browser/ui/views/menu_bar.h index dc0f0e577f78a..359609145c71b 100644 --- a/shell/browser/ui/views/menu_bar.h +++ b/shell/browser/ui/views/menu_bar.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_ -#define SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_ #include "shell/browser/native_window_observer.h" #include "shell/browser/ui/electron_menu_model.h" @@ -92,4 +92,4 @@ class MenuBar : public views::AccessiblePaneView, } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_ diff --git a/shell/browser/ui/views/menu_delegate.h b/shell/browser/ui/views/menu_delegate.h index 726fb887f8c08..92153f9773b42 100644 --- a/shell/browser/ui/views/menu_delegate.h +++ b/shell/browser/ui/views/menu_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_MENU_DELEGATE_H_ -#define SHELL_BROWSER_UI_VIEWS_MENU_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_DELEGATE_H_ #include @@ -80,4 +80,4 @@ class MenuDelegate : public views::MenuDelegate { } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_MENU_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_DELEGATE_H_ diff --git a/shell/browser/ui/views/menu_model_adapter.h b/shell/browser/ui/views/menu_model_adapter.h index 4c2cedb9eb008..95fc8dbb6efb6 100644 --- a/shell/browser/ui/views/menu_model_adapter.h +++ b/shell/browser/ui/views/menu_model_adapter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_ -#define SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_ #include "shell/browser/ui/electron_menu_model.h" #include "ui/views/controls/menu/menu_model_adapter.h" @@ -28,4 +28,4 @@ class MenuModelAdapter : public views::MenuModelAdapter { } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_ diff --git a/shell/browser/ui/views/native_frame_view.h b/shell/browser/ui/views/native_frame_view.h index bf7efd1006506..8098e43dfbf1f 100644 --- a/shell/browser/ui/views/native_frame_view.h +++ b/shell/browser/ui/views/native_frame_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_ -#define SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_ #include "ui/views/window/native_frame_view.h" @@ -34,4 +34,4 @@ class NativeFrameView : public views::NativeFrameView { } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_ diff --git a/shell/browser/ui/views/root_view.h b/shell/browser/ui/views/root_view.h index f45714d89d1bf..d893a42320b99 100644 --- a/shell/browser/ui/views/root_view.h +++ b/shell/browser/ui/views/root_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_ROOT_VIEW_H_ -#define SHELL_BROWSER_UI_VIEWS_ROOT_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_ROOT_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_ROOT_VIEW_H_ #include @@ -69,4 +69,4 @@ class RootView : public views::View { } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_ROOT_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_ROOT_VIEW_H_ diff --git a/shell/browser/ui/views/submenu_button.h b/shell/browser/ui/views/submenu_button.h index 485af2ea4eb8c..6419cba02324f 100644 --- a/shell/browser/ui/views/submenu_button.h +++ b/shell/browser/ui/views/submenu_button.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_ -#define SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_ #include @@ -58,4 +58,4 @@ class SubmenuButton : public views::MenuButton { } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_ diff --git a/shell/browser/ui/views/win_caption_button.h b/shell/browser/ui/views/win_caption_button.h index f57918538ec95..aeab07c525a7b 100644 --- a/shell/browser/ui/views/win_caption_button.h +++ b/shell/browser/ui/views/win_caption_button.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_H_ -#define SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_H_ #include "chrome/browser/ui/view_ids.h" #include "ui/base/metadata/metadata_header_macros.h" @@ -51,4 +51,4 @@ class WinCaptionButton : public views::Button { }; } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_H_ diff --git a/shell/browser/ui/views/win_caption_button_container.h b/shell/browser/ui/views/win_caption_button_container.h index ed36a106b3cf9..823bfc9380f4a 100644 --- a/shell/browser/ui/views/win_caption_button_container.h +++ b/shell/browser/ui/views/win_caption_button_container.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_CONTAINER_H_ -#define SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_CONTAINER_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_CONTAINER_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_CONTAINER_H_ #include "base/scoped_observation.h" #include "ui/base/metadata/metadata_header_macros.h" @@ -67,4 +67,4 @@ class WinCaptionButtonContainer : public views::View, }; } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_CONTAINER_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_CAPTION_BUTTON_CONTAINER_H_ diff --git a/shell/browser/ui/views/win_frame_view.h b/shell/browser/ui/views/win_frame_view.h index 7d16facaf5b13..81a2991dabbb9 100644 --- a/shell/browser/ui/views/win_frame_view.h +++ b/shell/browser/ui/views/win_frame_view.h @@ -7,8 +7,8 @@ // Copyright (c) 2012 The Chromium Authors, // which is governed by a BSD-style license -#ifndef SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_ -#define SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_ +#define ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_ #include "shell/browser/native_window_views.h" #include "shell/browser/ui/views/frameless_view.h" @@ -85,4 +85,4 @@ class WinFrameView : public FramelessView { } // namespace electron -#endif // SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_ diff --git a/shell/browser/ui/webui/accessibility_ui.h b/shell/browser/ui/webui/accessibility_ui.h index 34be1bb35a57a..8d8dd02721ea8 100644 --- a/shell/browser/ui/webui/accessibility_ui.h +++ b/shell/browser/ui/webui/accessibility_ui.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_ -#define SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_ +#define ELECTRON_SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_ #include "chrome/browser/accessibility/accessibility_ui.h" #include "content/public/browser/web_ui_controller.h" @@ -35,4 +35,4 @@ class ElectronAccessibilityUIMessageHandler void RequestNativeUITree(const base::ListValue* args); }; -#endif // SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_ diff --git a/shell/browser/ui/win/dialog_thread.h b/shell/browser/ui/win/dialog_thread.h index 49e4c6d20dbf5..80172d272b4a4 100644 --- a/shell/browser/ui/win/dialog_thread.h +++ b/shell/browser/ui/win/dialog_thread.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_WIN_DIALOG_THREAD_H_ -#define SHELL_BROWSER_UI_WIN_DIALOG_THREAD_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_WIN_DIALOG_THREAD_H_ +#define ELECTRON_SHELL_BROWSER_UI_WIN_DIALOG_THREAD_H_ #include @@ -77,4 +77,4 @@ void Run(base::OnceCallback execute, } // namespace dialog_thread -#endif // SHELL_BROWSER_UI_WIN_DIALOG_THREAD_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_WIN_DIALOG_THREAD_H_ diff --git a/shell/browser/ui/win/electron_desktop_native_widget_aura.h b/shell/browser/ui/win/electron_desktop_native_widget_aura.h index ead3d665e53df..7da254cab37ea 100644 --- a/shell/browser/ui/win/electron_desktop_native_widget_aura.h +++ b/shell/browser/ui/win/electron_desktop_native_widget_aura.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_NATIVE_WIDGET_AURA_H_ -#define SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_NATIVE_WIDGET_AURA_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_NATIVE_WIDGET_AURA_H_ +#define ELECTRON_SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_NATIVE_WIDGET_AURA_H_ #include "shell/browser/native_window_views.h" #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" @@ -44,4 +44,4 @@ class ElectronDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura { } // namespace electron -#endif // SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_NATIVE_WIDGET_AURA_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_NATIVE_WIDGET_AURA_H_ diff --git a/shell/browser/ui/win/electron_desktop_window_tree_host_win.h b/shell/browser/ui/win/electron_desktop_window_tree_host_win.h index 9d13ec569ee19..3fd831aae1ed0 100644 --- a/shell/browser/ui/win/electron_desktop_window_tree_host_win.h +++ b/shell/browser/ui/win/electron_desktop_window_tree_host_win.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_WINDOW_TREE_HOST_WIN_H_ -#define SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_WINDOW_TREE_HOST_WIN_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_WINDOW_TREE_HOST_WIN_H_ +#define ELECTRON_SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_WINDOW_TREE_HOST_WIN_H_ #include @@ -43,4 +43,4 @@ class ElectronDesktopWindowTreeHostWin } // namespace electron -#endif // SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_WINDOW_TREE_HOST_WIN_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_WIN_ELECTRON_DESKTOP_WINDOW_TREE_HOST_WIN_H_ diff --git a/shell/browser/ui/win/jump_list.h b/shell/browser/ui/win/jump_list.h index 13cb037ae957a..c175298e11b2a 100644 --- a/shell/browser/ui/win/jump_list.h +++ b/shell/browser/ui/win/jump_list.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_WIN_JUMP_LIST_H_ -#define SHELL_BROWSER_UI_WIN_JUMP_LIST_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_WIN_JUMP_LIST_H_ +#define ELECTRON_SHELL_BROWSER_UI_WIN_JUMP_LIST_H_ #include #include @@ -120,4 +120,4 @@ class JumpList { } // namespace electron -#endif // SHELL_BROWSER_UI_WIN_JUMP_LIST_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_WIN_JUMP_LIST_H_ diff --git a/shell/browser/ui/win/notify_icon.h b/shell/browser/ui/win/notify_icon.h index 7968cee00736c..1568615601895 100644 --- a/shell/browser/ui/win/notify_icon.h +++ b/shell/browser/ui/win/notify_icon.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_WIN_NOTIFY_ICON_H_ -#define SHELL_BROWSER_UI_WIN_NOTIFY_ICON_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_WIN_NOTIFY_ICON_H_ +#define ELECTRON_SHELL_BROWSER_UI_WIN_NOTIFY_ICON_H_ #include // windows.h must be included first @@ -107,4 +107,4 @@ class NotifyIcon : public TrayIcon { } // namespace electron -#endif // SHELL_BROWSER_UI_WIN_NOTIFY_ICON_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_WIN_NOTIFY_ICON_H_ diff --git a/shell/browser/ui/win/notify_icon_host.h b/shell/browser/ui/win/notify_icon_host.h index 3f8c43b0a286f..85a7537a3e291 100644 --- a/shell/browser/ui/win/notify_icon_host.h +++ b/shell/browser/ui/win/notify_icon_host.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_WIN_NOTIFY_ICON_HOST_H_ -#define SHELL_BROWSER_UI_WIN_NOTIFY_ICON_HOST_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_WIN_NOTIFY_ICON_HOST_H_ +#define ELECTRON_SHELL_BROWSER_UI_WIN_NOTIFY_ICON_HOST_H_ #include @@ -68,4 +68,4 @@ class NotifyIconHost { } // namespace electron -#endif // SHELL_BROWSER_UI_WIN_NOTIFY_ICON_HOST_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_WIN_NOTIFY_ICON_HOST_H_ diff --git a/shell/browser/ui/win/taskbar_host.h b/shell/browser/ui/win/taskbar_host.h index 8c121488b1b97..2ca139c613577 100644 --- a/shell/browser/ui/win/taskbar_host.h +++ b/shell/browser/ui/win/taskbar_host.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_WIN_TASKBAR_HOST_H_ -#define SHELL_BROWSER_UI_WIN_TASKBAR_HOST_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_WIN_TASKBAR_HOST_H_ +#define ELECTRON_SHELL_BROWSER_UI_WIN_TASKBAR_HOST_H_ #include #include @@ -84,4 +84,4 @@ class TaskbarHost { } // namespace electron -#endif // SHELL_BROWSER_UI_WIN_TASKBAR_HOST_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_WIN_TASKBAR_HOST_H_ diff --git a/shell/browser/ui/x/event_disabler.h b/shell/browser/ui/x/event_disabler.h index 16d778a1da176..7d8a23ac07e07 100644 --- a/shell/browser/ui/x/event_disabler.h +++ b/shell/browser/ui/x/event_disabler.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_X_EVENT_DISABLER_H_ -#define SHELL_BROWSER_UI_X_EVENT_DISABLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_X_EVENT_DISABLER_H_ +#define ELECTRON_SHELL_BROWSER_UI_X_EVENT_DISABLER_H_ #include @@ -31,4 +31,4 @@ class EventDisabler : public ui::EventRewriter { } // namespace electron -#endif // SHELL_BROWSER_UI_X_EVENT_DISABLER_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_X_EVENT_DISABLER_H_ diff --git a/shell/browser/ui/x/window_state_watcher.h b/shell/browser/ui/x/window_state_watcher.h index 7ccd2b2ad5652..525694b105b1b 100644 --- a/shell/browser/ui/x/window_state_watcher.h +++ b/shell/browser/ui/x/window_state_watcher.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_ -#define SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_ +#define ELECTRON_SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_ #include "ui/events/platform/x11/x11_event_source.h" #include "ui/gfx/x/event.h" @@ -39,4 +39,4 @@ class WindowStateWatcher : public x11::EventObserver { } // namespace electron -#endif // SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_ diff --git a/shell/browser/ui/x/x_window_utils.h b/shell/browser/ui/x/x_window_utils.h index 07a36215a8ac4..0d909f25d64bb 100644 --- a/shell/browser/ui/x/x_window_utils.h +++ b/shell/browser/ui/x/x_window_utils.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UI_X_X_WINDOW_UTILS_H_ -#define SHELL_BROWSER_UI_X_X_WINDOW_UTILS_H_ +#ifndef ELECTRON_SHELL_BROWSER_UI_X_X_WINDOW_UTILS_H_ +#define ELECTRON_SHELL_BROWSER_UI_X_X_WINDOW_UTILS_H_ #include @@ -32,4 +32,4 @@ bool IsWindowValid(x11::Window window); } // namespace electron -#endif // SHELL_BROWSER_UI_X_X_WINDOW_UTILS_H_ +#endif // ELECTRON_SHELL_BROWSER_UI_X_X_WINDOW_UTILS_H_ diff --git a/shell/browser/unresponsive_suppressor.h b/shell/browser/unresponsive_suppressor.h index ba3883a5882a3..adb34363e2379 100644 --- a/shell/browser/unresponsive_suppressor.h +++ b/shell/browser/unresponsive_suppressor.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ -#define SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ +#ifndef ELECTRON_SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ +#define ELECTRON_SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ namespace electron { @@ -21,4 +21,4 @@ class UnresponsiveSuppressor { } // namespace electron -#endif // SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ +#endif // ELECTRON_SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index fe6285d9e6235..b46ba60056d9c 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_ -#define SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_ +#ifndef ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_ +#define ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_ #include "base/values.h" #include "content/public/browser/media_stream_request.h" @@ -94,4 +94,4 @@ class WebContentsPermissionHelper } // namespace electron -#endif // SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_ +#endif // ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_ diff --git a/shell/browser/web_contents_preferences.h b/shell/browser/web_contents_preferences.h index bdf7ca4de3ae5..0f2e465ec7aa5 100644 --- a/shell/browser/web_contents_preferences.h +++ b/shell/browser/web_contents_preferences.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_WEB_CONTENTS_PREFERENCES_H_ -#define SHELL_BROWSER_WEB_CONTENTS_PREFERENCES_H_ +#ifndef ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PREFERENCES_H_ +#define ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PREFERENCES_H_ #include #include @@ -150,4 +150,4 @@ class WebContentsPreferences } // namespace electron -#endif // SHELL_BROWSER_WEB_CONTENTS_PREFERENCES_H_ +#endif // ELECTRON_SHELL_BROWSER_WEB_CONTENTS_PREFERENCES_H_ diff --git a/shell/browser/web_contents_zoom_controller.h b/shell/browser/web_contents_zoom_controller.h index 78f5b1cbab4dc..9e9feddaa1737 100644 --- a/shell/browser/web_contents_zoom_controller.h +++ b/shell/browser/web_contents_zoom_controller.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_WEB_CONTENTS_ZOOM_CONTROLLER_H_ -#define SHELL_BROWSER_WEB_CONTENTS_ZOOM_CONTROLLER_H_ +#ifndef ELECTRON_SHELL_BROWSER_WEB_CONTENTS_ZOOM_CONTROLLER_H_ +#define ELECTRON_SHELL_BROWSER_WEB_CONTENTS_ZOOM_CONTROLLER_H_ #include "base/observer_list_types.h" #include "content/public/browser/host_zoom_map.h" @@ -121,4 +121,4 @@ class WebContentsZoomController } // namespace electron -#endif // SHELL_BROWSER_WEB_CONTENTS_ZOOM_CONTROLLER_H_ +#endif // ELECTRON_SHELL_BROWSER_WEB_CONTENTS_ZOOM_CONTROLLER_H_ diff --git a/shell/browser/web_view_guest_delegate.h b/shell/browser/web_view_guest_delegate.h index df0fcc1cc72f4..319c4557a7d1e 100644 --- a/shell/browser/web_view_guest_delegate.h +++ b/shell/browser/web_view_guest_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_WEB_VIEW_GUEST_DELEGATE_H_ -#define SHELL_BROWSER_WEB_VIEW_GUEST_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_WEB_VIEW_GUEST_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_WEB_VIEW_GUEST_DELEGATE_H_ #include "content/public/browser/browser_plugin_guest_delegate.h" #include "shell/browser/web_contents_zoom_controller.h" @@ -57,4 +57,4 @@ class WebViewGuestDelegate : public content::BrowserPluginGuestDelegate, } // namespace electron -#endif // SHELL_BROWSER_WEB_VIEW_GUEST_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_WEB_VIEW_GUEST_DELEGATE_H_ diff --git a/shell/browser/web_view_manager.h b/shell/browser/web_view_manager.h index 29b0357880805..19d25211ffd2c 100644 --- a/shell/browser/web_view_manager.h +++ b/shell/browser/web_view_manager.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_WEB_VIEW_MANAGER_H_ -#define SHELL_BROWSER_WEB_VIEW_MANAGER_H_ +#ifndef ELECTRON_SHELL_BROWSER_WEB_VIEW_MANAGER_H_ +#define ELECTRON_SHELL_BROWSER_WEB_VIEW_MANAGER_H_ #include @@ -42,4 +42,4 @@ class WebViewManager : public content::BrowserPluginGuestManager { } // namespace electron -#endif // SHELL_BROWSER_WEB_VIEW_MANAGER_H_ +#endif // ELECTRON_SHELL_BROWSER_WEB_VIEW_MANAGER_H_ diff --git a/shell/browser/win/dark_mode.h b/shell/browser/win/dark_mode.h index 9e83d54ed7e7a..c6d14f9bfa7e7 100644 --- a/shell/browser/win/dark_mode.h +++ b/shell/browser/win/dark_mode.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_WIN_DARK_MODE_H_ -#define SHELL_BROWSER_WIN_DARK_MODE_H_ +#ifndef ELECTRON_SHELL_BROWSER_WIN_DARK_MODE_H_ +#define ELECTRON_SHELL_BROWSER_WIN_DARK_MODE_H_ #ifdef WIN32_LEAN_AND_MEAN #include @@ -25,4 +25,4 @@ void SetDarkModeForWindow(HWND hWnd, ui::NativeTheme::ThemeSource theme_source); } // namespace electron -#endif // SHELL_BROWSER_WIN_DARK_MODE_H_ +#endif // ELECTRON_SHELL_BROWSER_WIN_DARK_MODE_H_ diff --git a/shell/browser/win/scoped_hstring.h b/shell/browser/win/scoped_hstring.h index d1de62e9c9932..d0edfe4ea6792 100644 --- a/shell/browser/win/scoped_hstring.h +++ b/shell/browser/win/scoped_hstring.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_BROWSER_WIN_SCOPED_HSTRING_H_ -#define SHELL_BROWSER_WIN_SCOPED_HSTRING_H_ +#ifndef ELECTRON_SHELL_BROWSER_WIN_SCOPED_HSTRING_H_ +#define ELECTRON_SHELL_BROWSER_WIN_SCOPED_HSTRING_H_ #include #include @@ -42,4 +42,4 @@ class ScopedHString { } // namespace electron -#endif // SHELL_BROWSER_WIN_SCOPED_HSTRING_H_ +#endif // ELECTRON_SHELL_BROWSER_WIN_SCOPED_HSTRING_H_ diff --git a/shell/browser/window_list.h b/shell/browser/window_list.h index affb0140ae42d..7d8dd942f416e 100644 --- a/shell/browser/window_list.h +++ b/shell/browser/window_list.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_WINDOW_LIST_H_ -#define SHELL_BROWSER_WINDOW_LIST_H_ +#ifndef ELECTRON_SHELL_BROWSER_WINDOW_LIST_H_ +#define ELECTRON_SHELL_BROWSER_WINDOW_LIST_H_ #include @@ -62,4 +62,4 @@ class WindowList { } // namespace electron -#endif // SHELL_BROWSER_WINDOW_LIST_H_ +#endif // ELECTRON_SHELL_BROWSER_WINDOW_LIST_H_ diff --git a/shell/browser/window_list_observer.h b/shell/browser/window_list_observer.h index 7d0cfd9f9e1f6..3719b165a4bd3 100644 --- a/shell/browser/window_list_observer.h +++ b/shell/browser/window_list_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_ -#define SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_ +#ifndef ELECTRON_SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_ +#define ELECTRON_SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_ #include "base/observer_list_types.h" @@ -31,4 +31,4 @@ class WindowListObserver : public base::CheckedObserver { } // namespace electron -#endif // SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_ +#endif // ELECTRON_SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_ diff --git a/shell/browser/zoom_level_delegate.h b/shell/browser/zoom_level_delegate.h index 771f3f464cf2f..56dcba7e68eb0 100644 --- a/shell/browser/zoom_level_delegate.h +++ b/shell/browser/zoom_level_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_BROWSER_ZOOM_LEVEL_DELEGATE_H_ -#define SHELL_BROWSER_ZOOM_LEVEL_DELEGATE_H_ +#ifndef ELECTRON_SHELL_BROWSER_ZOOM_LEVEL_DELEGATE_H_ +#define ELECTRON_SHELL_BROWSER_ZOOM_LEVEL_DELEGATE_H_ #include @@ -61,4 +61,4 @@ class ZoomLevelDelegate : public content::ZoomLevelDelegate { } // namespace electron -#endif // SHELL_BROWSER_ZOOM_LEVEL_DELEGATE_H_ +#endif // ELECTRON_SHELL_BROWSER_ZOOM_LEVEL_DELEGATE_H_ diff --git a/shell/common/api/electron_api_clipboard.h b/shell/common/api/electron_api_clipboard.h index 22c9582d9df3b..158e33bb3bab8 100644 --- a/shell/common/api/electron_api_clipboard.h +++ b/shell/common/api/electron_api_clipboard.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_ -#define SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_ +#ifndef ELECTRON_SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_ +#define ELECTRON_SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_ #include #include @@ -71,4 +71,4 @@ class Clipboard { } // namespace electron -#endif // SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_ +#endif // ELECTRON_SHELL_COMMON_API_ELECTRON_API_CLIPBOARD_H_ diff --git a/shell/common/api/electron_api_key_weak_map.h b/shell/common/api/electron_api_key_weak_map.h index fcaede539426e..f26fa29297ad8 100644 --- a/shell/common/api/electron_api_key_weak_map.h +++ b/shell/common/api/electron_api_key_weak_map.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_ -#define SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_ +#ifndef ELECTRON_SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_ +#define ELECTRON_SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_ #include "gin/handle.h" #include "shell/common/gin_converters/std_converter.h" @@ -63,4 +63,4 @@ class KeyWeakMap : public gin_helper::Wrappable> { } // namespace electron -#endif // SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_ +#endif // ELECTRON_SHELL_COMMON_API_ELECTRON_API_KEY_WEAK_MAP_H_ diff --git a/shell/common/api/electron_api_native_image.h b/shell/common/api/electron_api_native_image.h index ae8150b9d7c7c..11bfd45ee7631 100644 --- a/shell/common/api/electron_api_native_image.h +++ b/shell/common/api/electron_api_native_image.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_ -#define SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_ +#ifndef ELECTRON_SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_ +#define ELECTRON_SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_ #include #include @@ -142,4 +142,4 @@ class NativeImage : public gin::Wrappable { } // namespace electron -#endif // SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_ +#endif // ELECTRON_SHELL_COMMON_API_ELECTRON_API_NATIVE_IMAGE_H_ diff --git a/shell/common/api/electron_bindings.h b/shell/common/api/electron_bindings.h index 517764c74bff2..3586828d9b4fb 100644 --- a/shell/common/api/electron_bindings.h +++ b/shell/common/api/electron_bindings.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_API_ELECTRON_BINDINGS_H_ -#define SHELL_COMMON_API_ELECTRON_BINDINGS_H_ +#ifndef ELECTRON_SHELL_COMMON_API_ELECTRON_BINDINGS_H_ +#define ELECTRON_SHELL_COMMON_API_ELECTRON_BINDINGS_H_ #include #include @@ -84,4 +84,4 @@ class ElectronBindings { } // namespace electron -#endif // SHELL_COMMON_API_ELECTRON_BINDINGS_H_ +#endif // ELECTRON_SHELL_COMMON_API_ELECTRON_BINDINGS_H_ diff --git a/shell/common/api/object_life_monitor.h b/shell/common/api/object_life_monitor.h index 52296a13de1db..8cd608f35e859 100644 --- a/shell/common/api/object_life_monitor.h +++ b/shell/common/api/object_life_monitor.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_ -#define SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_ +#ifndef ELECTRON_SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_ +#define ELECTRON_SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_ #include "base/memory/weak_ptr.h" #include "v8/include/v8.h" @@ -32,4 +32,4 @@ class ObjectLifeMonitor { } // namespace electron -#endif // SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_ +#endif // ELECTRON_SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_ diff --git a/shell/common/application_info.h b/shell/common/application_info.h index 9ad849cc413fb..95482bb6768a2 100644 --- a/shell/common/application_info.h +++ b/shell/common/application_info.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_APPLICATION_INFO_H_ -#define SHELL_COMMON_APPLICATION_INFO_H_ +#ifndef ELECTRON_SHELL_COMMON_APPLICATION_INFO_H_ +#define ELECTRON_SHELL_COMMON_APPLICATION_INFO_H_ #if defined(OS_WIN) #include "shell/browser/win/scoped_hstring.h" @@ -32,4 +32,4 @@ bool IsRunningInDesktopBridge(); } // namespace electron -#endif // SHELL_COMMON_APPLICATION_INFO_H_ +#endif // ELECTRON_SHELL_COMMON_APPLICATION_INFO_H_ diff --git a/shell/common/asar/archive.h b/shell/common/asar/archive.h index 34abcb93bea63..51e75ec75b346 100644 --- a/shell/common/asar/archive.h +++ b/shell/common/asar/archive.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_ASAR_ARCHIVE_H_ -#define SHELL_COMMON_ASAR_ARCHIVE_H_ +#ifndef ELECTRON_SHELL_COMMON_ASAR_ARCHIVE_H_ +#define ELECTRON_SHELL_COMMON_ASAR_ARCHIVE_H_ #include #include @@ -115,4 +115,4 @@ class Archive { } // namespace asar -#endif // SHELL_COMMON_ASAR_ARCHIVE_H_ +#endif // ELECTRON_SHELL_COMMON_ASAR_ARCHIVE_H_ diff --git a/shell/common/asar/asar_util.h b/shell/common/asar/asar_util.h index 228a752b086ab..31b4cf9990e6c 100644 --- a/shell/common/asar/asar_util.h +++ b/shell/common/asar/asar_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_ASAR_ASAR_UTIL_H_ -#define SHELL_COMMON_ASAR_ASAR_UTIL_H_ +#ifndef ELECTRON_SHELL_COMMON_ASAR_ASAR_UTIL_H_ +#define ELECTRON_SHELL_COMMON_ASAR_ASAR_UTIL_H_ #include #include @@ -38,4 +38,4 @@ void ValidateIntegrityOrDie(const char* data, } // namespace asar -#endif // SHELL_COMMON_ASAR_ASAR_UTIL_H_ +#endif // ELECTRON_SHELL_COMMON_ASAR_ASAR_UTIL_H_ diff --git a/shell/common/asar/scoped_temporary_file.h b/shell/common/asar/scoped_temporary_file.h index 3651ec5a6a9fb..5fd31a848b2f3 100644 --- a/shell/common/asar/scoped_temporary_file.h +++ b/shell/common/asar/scoped_temporary_file.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_ASAR_SCOPED_TEMPORARY_FILE_H_ -#define SHELL_COMMON_ASAR_SCOPED_TEMPORARY_FILE_H_ +#ifndef ELECTRON_SHELL_COMMON_ASAR_SCOPED_TEMPORARY_FILE_H_ +#define ELECTRON_SHELL_COMMON_ASAR_SCOPED_TEMPORARY_FILE_H_ #include "base/files/file_path.h" #include "shell/common/asar/archive.h" @@ -44,4 +44,4 @@ class ScopedTemporaryFile { } // namespace asar -#endif // SHELL_COMMON_ASAR_SCOPED_TEMPORARY_FILE_H_ +#endif // ELECTRON_SHELL_COMMON_ASAR_SCOPED_TEMPORARY_FILE_H_ diff --git a/shell/common/color_util.h b/shell/common/color_util.h index 9411e8ae352e4..88b68cc398f9f 100644 --- a/shell/common/color_util.h +++ b/shell/common/color_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_COLOR_UTIL_H_ -#define SHELL_COMMON_COLOR_UTIL_H_ +#ifndef ELECTRON_SHELL_COMMON_COLOR_UTIL_H_ +#define ELECTRON_SHELL_COMMON_COLOR_UTIL_H_ #include @@ -21,4 +21,4 @@ std::string ToRGBAHex(SkColor color, bool include_hash = true); } // namespace electron -#endif // SHELL_COMMON_COLOR_UTIL_H_ +#endif // ELECTRON_SHELL_COMMON_COLOR_UTIL_H_ diff --git a/shell/common/crash_keys.h b/shell/common/crash_keys.h index 5ad954ed25267..70f731d29f38c 100644 --- a/shell/common/crash_keys.h +++ b/shell/common/crash_keys.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_CRASH_KEYS_H_ -#define SHELL_COMMON_CRASH_KEYS_H_ +#ifndef ELECTRON_SHELL_COMMON_CRASH_KEYS_H_ +#define ELECTRON_SHELL_COMMON_CRASH_KEYS_H_ #include #include @@ -27,4 +27,4 @@ void SetPlatformCrashKey(); } // namespace electron -#endif // SHELL_COMMON_CRASH_KEYS_H_ +#endif // ELECTRON_SHELL_COMMON_CRASH_KEYS_H_ diff --git a/shell/common/electron_command_line.h b/shell/common/electron_command_line.h index defa250791b63..0d1aad4e76eba 100644 --- a/shell/common/electron_command_line.h +++ b/shell/common/electron_command_line.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_ELECTRON_COMMAND_LINE_H_ -#define SHELL_COMMON_ELECTRON_COMMAND_LINE_H_ +#ifndef ELECTRON_SHELL_COMMON_ELECTRON_COMMAND_LINE_H_ +#define ELECTRON_SHELL_COMMON_ELECTRON_COMMAND_LINE_H_ #include "base/command_line.h" #include "build/build_config.h" @@ -33,4 +33,4 @@ class ElectronCommandLine { } // namespace electron -#endif // SHELL_COMMON_ELECTRON_COMMAND_LINE_H_ +#endif // ELECTRON_SHELL_COMMON_ELECTRON_COMMAND_LINE_H_ diff --git a/shell/common/electron_constants.h b/shell/common/electron_constants.h index ee888baf836ec..b91b70e683632 100644 --- a/shell/common/electron_constants.h +++ b/shell/common/electron_constants.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_ELECTRON_CONSTANTS_H_ -#define SHELL_COMMON_ELECTRON_CONSTANTS_H_ +#ifndef ELECTRON_SHELL_COMMON_ELECTRON_CONSTANTS_H_ +#define ELECTRON_SHELL_COMMON_ELECTRON_CONSTANTS_H_ #include "base/files/file_path.h" #include "build/build_config.h" @@ -37,4 +37,4 @@ extern const base::FilePath::CharType kPdfPluginPath[]; } // namespace electron -#endif // SHELL_COMMON_ELECTRON_CONSTANTS_H_ +#endif // ELECTRON_SHELL_COMMON_ELECTRON_CONSTANTS_H_ diff --git a/shell/common/electron_paths.h b/shell/common/electron_paths.h index e52badaabcb72..19bcabb2ed368 100644 --- a/shell/common/electron_paths.h +++ b/shell/common/electron_paths.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_ELECTRON_PATHS_H_ -#define SHELL_COMMON_ELECTRON_PATHS_H_ +#ifndef ELECTRON_SHELL_COMMON_ELECTRON_PATHS_H_ +#define ELECTRON_SHELL_COMMON_ELECTRON_PATHS_H_ #include "base/base_paths.h" @@ -46,4 +46,4 @@ static_assert(PATH_START < PATH_END, "invalid PATH boundaries"); } // namespace electron -#endif // SHELL_COMMON_ELECTRON_PATHS_H_ +#endif // ELECTRON_SHELL_COMMON_ELECTRON_PATHS_H_ diff --git a/shell/common/extensions/electron_extensions_api_provider.h b/shell/common/extensions/electron_extensions_api_provider.h index 7e8c0daa91c4f..1ef972fcfa5e6 100644 --- a/shell/common/extensions/electron_extensions_api_provider.h +++ b/shell/common/extensions/electron_extensions_api_provider.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_API_PROVIDER_H_ -#define SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_API_PROVIDER_H_ +#ifndef ELECTRON_SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_API_PROVIDER_H_ +#define ELECTRON_SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_API_PROVIDER_H_ #include @@ -37,4 +37,4 @@ class ElectronExtensionsAPIProvider : public extensions::ExtensionsAPIProvider { } // namespace electron -#endif // SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_API_PROVIDER_H_ +#endif // ELECTRON_SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_API_PROVIDER_H_ diff --git a/shell/common/extensions/electron_extensions_client.h b/shell/common/extensions/electron_extensions_client.h index 7eebb6e588541..ebc05b0ed0893 100644 --- a/shell/common/extensions/electron_extensions_client.h +++ b/shell/common/extensions/electron_extensions_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_CLIENT_H_ -#define SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_CLIENT_H_ +#ifndef ELECTRON_SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_CLIENT_H_ +#define ELECTRON_SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_CLIENT_H_ #include @@ -62,4 +62,4 @@ class ElectronExtensionsClient : public extensions::ExtensionsClient { } // namespace electron -#endif // SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_CLIENT_H_ +#endif // ELECTRON_SHELL_COMMON_EXTENSIONS_ELECTRON_EXTENSIONS_CLIENT_H_ diff --git a/shell/common/gin_converters/accelerator_converter.h b/shell/common/gin_converters/accelerator_converter.h index 6c2131e29851e..86a4a641678b6 100644 --- a/shell/common/gin_converters/accelerator_converter.h +++ b/shell/common/gin_converters/accelerator_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_ACCELERATOR_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_ACCELERATOR_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_ACCELERATOR_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_ACCELERATOR_CONVERTER_H_ #include "gin/converter.h" @@ -22,4 +22,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_ACCELERATOR_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_ACCELERATOR_CONVERTER_H_ diff --git a/shell/common/gin_converters/base_converter.h b/shell/common/gin_converters/base_converter.h index b214af79cc9f6..f44c64941e0ff 100644 --- a/shell/common/gin_converters/base_converter.h +++ b/shell/common/gin_converters/base_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_BASE_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_BASE_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_BASE_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_BASE_CONVERTER_H_ #include "base/process/kill.h" #include "gin/converter.h" @@ -44,4 +44,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_BASE_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_BASE_CONVERTER_H_ diff --git a/shell/common/gin_converters/blink_converter.h b/shell/common/gin_converters/blink_converter.h index 952033b147261..8ae85d7506005 100644 --- a/shell/common/gin_converters/blink_converter.h +++ b/shell/common/gin_converters/blink_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_ #include "gin/converter.h" #include "third_party/blink/public/common/context_menu_data/context_menu_data.h" @@ -120,4 +120,4 @@ v8::Local MediaFlagsToV8(v8::Isolate* isolate, int mediaFlags); } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_BLINK_CONVERTER_H_ diff --git a/shell/common/gin_converters/callback_converter.h b/shell/common/gin_converters/callback_converter.h index 9342e2fc22cf5..8682ca94795b9 100644 --- a/shell/common/gin_converters/callback_converter.h +++ b/shell/common/gin_converters/callback_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_CALLBACK_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_CALLBACK_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_CALLBACK_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_CALLBACK_CONVERTER_H_ #include @@ -56,4 +56,4 @@ struct Converter> { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_CALLBACK_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_CALLBACK_CONVERTER_H_ diff --git a/shell/common/gin_converters/content_converter.h b/shell/common/gin_converters/content_converter.h index 26621c05a8e1b..e157b9f4a05f4 100644 --- a/shell/common/gin_converters/content_converter.h +++ b/shell/common/gin_converters/content_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_CONTENT_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_CONTENT_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_CONTENT_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_CONTENT_CONVERTER_H_ #include @@ -88,4 +88,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_CONTENT_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_CONTENT_CONVERTER_H_ diff --git a/shell/common/gin_converters/extension_converter.h b/shell/common/gin_converters/extension_converter.h index e0d566f6801ac..83c30ffe6d095 100644 --- a/shell/common/gin_converters/extension_converter.h +++ b/shell/common/gin_converters/extension_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_EXTENSION_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_EXTENSION_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_EXTENSION_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_EXTENSION_CONVERTER_H_ #include @@ -23,4 +23,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_EXTENSION_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_EXTENSION_CONVERTER_H_ diff --git a/shell/common/gin_converters/file_dialog_converter.h b/shell/common/gin_converters/file_dialog_converter.h index 16b3b9b088661..c3e608425c5a5 100644 --- a/shell/common/gin_converters/file_dialog_converter.h +++ b/shell/common/gin_converters/file_dialog_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_FILE_DIALOG_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_FILE_DIALOG_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FILE_DIALOG_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FILE_DIALOG_CONVERTER_H_ #include "gin/converter.h" #include "shell/browser/ui/file_dialog.h" @@ -30,4 +30,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_FILE_DIALOG_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FILE_DIALOG_CONVERTER_H_ diff --git a/shell/common/gin_converters/file_path_converter.h b/shell/common/gin_converters/file_path_converter.h index 28d5c4bfda87d..2341ff599bcba 100644 --- a/shell/common/gin_converters/file_path_converter.h +++ b/shell/common/gin_converters/file_path_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_FILE_PATH_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_FILE_PATH_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FILE_PATH_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FILE_PATH_CONVERTER_H_ #include "base/files/file_path.h" #include "gin/converter.h" @@ -41,4 +41,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_FILE_PATH_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FILE_PATH_CONVERTER_H_ diff --git a/shell/common/gin_converters/frame_converter.h b/shell/common/gin_converters/frame_converter.h index a2579ed6019b4..56f87f598b2cd 100644 --- a/shell/common/gin_converters/frame_converter.h +++ b/shell/common/gin_converters/frame_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_ #include "gin/converter.h" #include "shell/common/gin_helper/accessor.h" @@ -32,4 +32,4 @@ struct Converter> { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_FRAME_CONVERTER_H_ diff --git a/shell/common/gin_converters/gfx_converter.h b/shell/common/gin_converters/gfx_converter.h index 6c46a98af41f5..0bf4448645569 100644 --- a/shell/common/gin_converters/gfx_converter.h +++ b/shell/common/gin_converters/gfx_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_GFX_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_GFX_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GFX_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GFX_CONVERTER_H_ #include "gin/converter.h" @@ -71,4 +71,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_GFX_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GFX_CONVERTER_H_ diff --git a/shell/common/gin_converters/guid_converter.h b/shell/common/gin_converters/guid_converter.h index ef7dd7a0d2f4a..592dab149a62c 100644 --- a/shell/common/gin_converters/guid_converter.h +++ b/shell/common/gin_converters/guid_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_GUID_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_GUID_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GUID_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GUID_CONVERTER_H_ #include @@ -83,4 +83,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_GUID_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GUID_CONVERTER_H_ diff --git a/shell/common/gin_converters/gurl_converter.h b/shell/common/gin_converters/gurl_converter.h index e0888daa6c2ff..c63aca14d0535 100644 --- a/shell/common/gin_converters/gurl_converter.h +++ b/shell/common/gin_converters/gurl_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_GURL_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_GURL_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GURL_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GURL_CONVERTER_H_ #include @@ -32,4 +32,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_GURL_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_GURL_CONVERTER_H_ diff --git a/shell/common/gin_converters/image_converter.h b/shell/common/gin_converters/image_converter.h index f4de04fb465fc..01975e8128063 100644 --- a/shell/common/gin_converters/image_converter.h +++ b/shell/common/gin_converters/image_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_IMAGE_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_IMAGE_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_IMAGE_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_IMAGE_CONVERTER_H_ #include "gin/converter.h" @@ -31,4 +31,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_IMAGE_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_IMAGE_CONVERTER_H_ diff --git a/shell/common/gin_converters/message_box_converter.h b/shell/common/gin_converters/message_box_converter.h index 15ed2516d4461..2949b1cfa5818 100644 --- a/shell/common/gin_converters/message_box_converter.h +++ b/shell/common/gin_converters/message_box_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_MESSAGE_BOX_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_MESSAGE_BOX_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_MESSAGE_BOX_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_MESSAGE_BOX_CONVERTER_H_ #include "gin/converter.h" #include "shell/browser/ui/message_box.h" @@ -19,4 +19,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_MESSAGE_BOX_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_MESSAGE_BOX_CONVERTER_H_ diff --git a/shell/common/gin_converters/native_window_converter.h b/shell/common/gin_converters/native_window_converter.h index d06440c7fa0e7..106ca836cd5b3 100644 --- a/shell/common/gin_converters/native_window_converter.h +++ b/shell/common/gin_converters/native_window_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_NATIVE_WINDOW_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_NATIVE_WINDOW_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_NATIVE_WINDOW_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_NATIVE_WINDOW_CONVERTER_H_ #include "gin/converter.h" #include "shell/browser/api/electron_api_base_window.h" @@ -32,4 +32,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_NATIVE_WINDOW_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_NATIVE_WINDOW_CONVERTER_H_ diff --git a/shell/common/gin_converters/net_converter.h b/shell/common/gin_converters/net_converter.h index db2ea11be11ee..3a4fd1f3c7c15 100644 --- a/shell/common/gin_converters/net_converter.h +++ b/shell/common/gin_converters/net_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_NET_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_NET_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_NET_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_NET_CONVERTER_H_ #include #include @@ -140,4 +140,4 @@ struct Converter>> { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_NET_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_NET_CONVERTER_H_ diff --git a/shell/common/gin_converters/std_converter.h b/shell/common/gin_converters/std_converter.h index eb5f87d22e3d3..23e44e856ce35 100644 --- a/shell/common/gin_converters/std_converter.h +++ b/shell/common/gin_converters/std_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_STD_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_STD_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_STD_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_STD_CONVERTER_H_ #include #include @@ -212,4 +212,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_STD_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_STD_CONVERTER_H_ diff --git a/shell/common/gin_converters/time_converter.h b/shell/common/gin_converters/time_converter.h index 3c4a0539873fd..7149eaaefed44 100644 --- a/shell/common/gin_converters/time_converter.h +++ b/shell/common/gin_converters/time_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_TIME_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_TIME_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_TIME_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_TIME_CONVERTER_H_ #include "gin/converter.h" @@ -20,4 +20,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_TIME_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_TIME_CONVERTER_H_ diff --git a/shell/common/gin_converters/value_converter.h b/shell/common/gin_converters/value_converter.h index d8c42d100a644..16a79af43b9e0 100644 --- a/shell/common/gin_converters/value_converter.h +++ b/shell/common/gin_converters/value_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_CONVERTERS_VALUE_CONVERTER_H_ -#define SHELL_COMMON_GIN_CONVERTERS_VALUE_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_CONVERTERS_VALUE_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_CONVERTERS_VALUE_CONVERTER_H_ #include "gin/converter.h" @@ -44,4 +44,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_CONVERTERS_VALUE_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_CONVERTERS_VALUE_CONVERTER_H_ diff --git a/shell/common/gin_helper/accessor.h b/shell/common/gin_helper/accessor.h index 6d258a56d674e..5bd0bc9cb4e28 100644 --- a/shell/common/gin_helper/accessor.h +++ b/shell/common/gin_helper/accessor.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_ACCESSOR_H_ -#define SHELL_COMMON_GIN_HELPER_ACCESSOR_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_ACCESSOR_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_ACCESSOR_H_ namespace gin_helper { @@ -24,4 +24,4 @@ struct AccessorValue { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_ACCESSOR_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_ACCESSOR_H_ diff --git a/shell/common/gin_helper/arguments.h b/shell/common/gin_helper/arguments.h index 776b951bcb7af..81a37f8476e69 100644 --- a/shell/common/gin_helper/arguments.h +++ b/shell/common/gin_helper/arguments.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.chromium file. -#ifndef SHELL_COMMON_GIN_HELPER_ARGUMENTS_H_ -#define SHELL_COMMON_GIN_HELPER_ARGUMENTS_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_ARGUMENTS_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_ARGUMENTS_H_ #include "gin/arguments.h" @@ -48,4 +48,4 @@ class Arguments : public gin::Arguments { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_ARGUMENTS_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_ARGUMENTS_H_ diff --git a/shell/common/gin_helper/callback.h b/shell/common/gin_helper/callback.h index f4e54dabed33e..a00fa5b541424 100644 --- a/shell/common/gin_helper/callback.h +++ b/shell/common/gin_helper/callback.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_CALLBACK_H_ -#define SHELL_COMMON_GIN_HELPER_CALLBACK_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_CALLBACK_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_CALLBACK_H_ #include #include @@ -149,4 +149,4 @@ v8::Local CallbackToV8Leaked( } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_CALLBACK_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_CALLBACK_H_ diff --git a/shell/common/gin_helper/cleaned_up_at_exit.h b/shell/common/gin_helper/cleaned_up_at_exit.h index f3376c2f450fa..35d9e1618eb70 100644 --- a/shell/common/gin_helper/cleaned_up_at_exit.h +++ b/shell/common/gin_helper/cleaned_up_at_exit.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_CLEANED_UP_AT_EXIT_H_ -#define SHELL_COMMON_GIN_HELPER_CLEANED_UP_AT_EXIT_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_CLEANED_UP_AT_EXIT_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_CLEANED_UP_AT_EXIT_H_ namespace gin_helper { @@ -24,4 +24,4 @@ class CleanedUpAtExit { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_CLEANED_UP_AT_EXIT_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_CLEANED_UP_AT_EXIT_H_ diff --git a/shell/common/gin_helper/constructible.h b/shell/common/gin_helper/constructible.h index 7dc70740934f6..c6eaaef330c3f 100644 --- a/shell/common/gin_helper/constructible.h +++ b/shell/common/gin_helper/constructible.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_CONSTRUCTIBLE_H_ -#define SHELL_COMMON_GIN_HELPER_CONSTRUCTIBLE_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_CONSTRUCTIBLE_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_CONSTRUCTIBLE_H_ #include "gin/per_isolate_data.h" #include "gin/wrappable.h" @@ -66,4 +66,4 @@ class Constructible { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_CONSTRUCTIBLE_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_CONSTRUCTIBLE_H_ diff --git a/shell/common/gin_helper/constructor.h b/shell/common/gin_helper/constructor.h index efaffd4c4aeb9..398e76a9af925 100644 --- a/shell/common/gin_helper/constructor.h +++ b/shell/common/gin_helper/constructor.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_CONSTRUCTOR_H_ -#define SHELL_COMMON_GIN_HELPER_CONSTRUCTOR_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_CONSTRUCTOR_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_CONSTRUCTOR_H_ #include "shell/common/gin_helper/function_template.h" #include "shell/common/gin_helper/wrappable_base.h" @@ -168,4 +168,4 @@ v8::Local CreateConstructor( } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_CONSTRUCTOR_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_CONSTRUCTOR_H_ diff --git a/shell/common/gin_helper/destroyable.h b/shell/common/gin_helper/destroyable.h index fadbdc478c222..20419542d285b 100644 --- a/shell/common/gin_helper/destroyable.h +++ b/shell/common/gin_helper/destroyable.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_DESTROYABLE_H_ -#define SHELL_COMMON_GIN_HELPER_DESTROYABLE_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_DESTROYABLE_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_DESTROYABLE_H_ #include "v8/include/v8.h" @@ -21,4 +21,4 @@ struct Destroyable { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_DESTROYABLE_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_DESTROYABLE_H_ diff --git a/shell/common/gin_helper/dictionary.h b/shell/common/gin_helper/dictionary.h index 7c6368ad39781..9d3fd527c3799 100644 --- a/shell/common/gin_helper/dictionary.h +++ b/shell/common/gin_helper/dictionary.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_DICTIONARY_H_ -#define SHELL_COMMON_GIN_HELPER_DICTIONARY_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_DICTIONARY_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_DICTIONARY_H_ #include #include @@ -214,4 +214,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_HELPER_DICTIONARY_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_DICTIONARY_H_ diff --git a/shell/common/gin_helper/error_thrower.h b/shell/common/gin_helper/error_thrower.h index 057874e93cc16..6089363c423c1 100644 --- a/shell/common/gin_helper/error_thrower.h +++ b/shell/common/gin_helper/error_thrower.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_ERROR_THROWER_H_ -#define SHELL_COMMON_GIN_HELPER_ERROR_THROWER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_ERROR_THROWER_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_ERROR_THROWER_H_ #include "base/strings/string_piece.h" #include "v8/include/v8.h" @@ -34,4 +34,4 @@ class ErrorThrower { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_ERROR_THROWER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_ERROR_THROWER_H_ diff --git a/shell/common/gin_helper/event_emitter.h b/shell/common/gin_helper/event_emitter.h index 071bdfeda9fe8..a69b595551ffb 100644 --- a/shell/common/gin_helper/event_emitter.h +++ b/shell/common/gin_helper/event_emitter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_H_ -#define SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_H_ #include #include @@ -101,4 +101,4 @@ class EventEmitter : public gin_helper::Wrappable { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_H_ diff --git a/shell/common/gin_helper/event_emitter_caller.h b/shell/common/gin_helper/event_emitter_caller.h index f2da1fede381c..b8a0511a0b906 100644 --- a/shell/common/gin_helper/event_emitter_caller.h +++ b/shell/common/gin_helper/event_emitter_caller.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_CALLER_H_ -#define SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_CALLER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_CALLER_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_CALLER_H_ #include #include @@ -88,4 +88,4 @@ v8::Local CallMethod(gin::Wrappable* object, } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_CALLER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_EVENT_EMITTER_CALLER_H_ diff --git a/shell/common/gin_helper/function_template.h b/shell/common/gin_helper/function_template.h index edb067f861b08..025c917fbc34f 100644 --- a/shell/common/gin_helper/function_template.h +++ b/shell/common/gin_helper/function_template.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.chromium file. -#ifndef SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_H_ -#define SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_H_ #include @@ -329,4 +329,4 @@ struct CallbackTraits< } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_H_ diff --git a/shell/common/gin_helper/function_template_extensions.h b/shell/common/gin_helper/function_template_extensions.h index a83ad1c7eb804..7420ffde724ca 100644 --- a/shell/common/gin_helper/function_template_extensions.h +++ b/shell/common/gin_helper/function_template_extensions.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.chromium file. -#ifndef SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_EXTENSIONS_H_ -#define SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_EXTENSIONS_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_EXTENSIONS_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_EXTENSIONS_H_ #include @@ -57,4 +57,4 @@ v8::Local CreateConstructorFunctionTemplate( } // namespace gin -#endif // SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_EXTENSIONS_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_FUNCTION_TEMPLATE_EXTENSIONS_H_ diff --git a/shell/common/gin_helper/locker.h b/shell/common/gin_helper/locker.h index ae92f92de5000..825fe4880f64c 100644 --- a/shell/common/gin_helper/locker.h +++ b/shell/common/gin_helper/locker.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.chromium file. -#ifndef SHELL_COMMON_GIN_HELPER_LOCKER_H_ -#define SHELL_COMMON_GIN_HELPER_LOCKER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_LOCKER_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_LOCKER_H_ #include @@ -34,4 +34,4 @@ class Locker { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_LOCKER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_LOCKER_H_ diff --git a/shell/common/gin_helper/microtasks_scope.h b/shell/common/gin_helper/microtasks_scope.h index 119b67cb042fc..23815a090813d 100644 --- a/shell/common/gin_helper/microtasks_scope.h +++ b/shell/common/gin_helper/microtasks_scope.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_MICROTASKS_SCOPE_H_ -#define SHELL_COMMON_GIN_HELPER_MICROTASKS_SCOPE_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_MICROTASKS_SCOPE_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_MICROTASKS_SCOPE_H_ #include @@ -31,4 +31,4 @@ class MicrotasksScope { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_MICROTASKS_SCOPE_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_MICROTASKS_SCOPE_H_ diff --git a/shell/common/gin_helper/object_template_builder.h b/shell/common/gin_helper/object_template_builder.h index 722d6f78bfa79..5ec9761beef47 100644 --- a/shell/common/gin_helper/object_template_builder.h +++ b/shell/common/gin_helper/object_template_builder.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_OBJECT_TEMPLATE_BUILDER_H_ -#define SHELL_COMMON_GIN_HELPER_OBJECT_TEMPLATE_BUILDER_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_OBJECT_TEMPLATE_BUILDER_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_OBJECT_TEMPLATE_BUILDER_H_ #include "shell/common/gin_helper/function_template.h" @@ -74,4 +74,4 @@ class ObjectTemplateBuilder { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_OBJECT_TEMPLATE_BUILDER_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_OBJECT_TEMPLATE_BUILDER_H_ diff --git a/shell/common/gin_helper/persistent_dictionary.h b/shell/common/gin_helper/persistent_dictionary.h index e73da7ab259f9..8bc19d822ce53 100644 --- a/shell/common/gin_helper/persistent_dictionary.h +++ b/shell/common/gin_helper/persistent_dictionary.h @@ -2,8 +2,8 @@ // Use of this source code is governed by MIT license that can be found in the // LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_PERSISTENT_DICTIONARY_H_ -#define SHELL_COMMON_GIN_HELPER_PERSISTENT_DICTIONARY_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_PERSISTENT_DICTIONARY_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_PERSISTENT_DICTIONARY_H_ #include "shell/common/gin_helper/dictionary.h" @@ -60,4 +60,4 @@ struct Converter { } // namespace gin -#endif // SHELL_COMMON_GIN_HELPER_PERSISTENT_DICTIONARY_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_PERSISTENT_DICTIONARY_H_ diff --git a/shell/common/gin_helper/pinnable.h b/shell/common/gin_helper/pinnable.h index ca129d66446fa..42b98f55179d8 100644 --- a/shell/common/gin_helper/pinnable.h +++ b/shell/common/gin_helper/pinnable.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_PINNABLE_H_ -#define SHELL_COMMON_GIN_HELPER_PINNABLE_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_PINNABLE_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_PINNABLE_H_ #include "v8/include/v8.h" @@ -31,4 +31,4 @@ class Pinnable { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_PINNABLE_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_PINNABLE_H_ diff --git a/shell/common/gin_helper/promise.h b/shell/common/gin_helper/promise.h index 58e91998fac9b..961ce961a65e3 100644 --- a/shell/common/gin_helper/promise.h +++ b/shell/common/gin_helper/promise.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_PROMISE_H_ -#define SHELL_COMMON_GIN_HELPER_PROMISE_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_PROMISE_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_PROMISE_H_ #include #include @@ -181,4 +181,4 @@ struct Converter> { } // namespace gin -#endif // SHELL_COMMON_GIN_HELPER_PROMISE_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_PROMISE_H_ diff --git a/shell/common/gin_helper/trackable_object.h b/shell/common/gin_helper/trackable_object.h index 09ccd273c2982..309e412e8a6f6 100644 --- a/shell/common/gin_helper/trackable_object.h +++ b/shell/common/gin_helper/trackable_object.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_GIN_HELPER_TRACKABLE_OBJECT_H_ -#define SHELL_COMMON_GIN_HELPER_TRACKABLE_OBJECT_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_TRACKABLE_OBJECT_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_TRACKABLE_OBJECT_H_ #include @@ -137,4 +137,4 @@ electron::KeyWeakMap* TrackableObject::weak_map_ = nullptr; } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_TRACKABLE_OBJECT_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_TRACKABLE_OBJECT_H_ diff --git a/shell/common/gin_helper/wrappable.h b/shell/common/gin_helper/wrappable.h index 1ed16233e2a58..4e1ece6c6fcd6 100644 --- a/shell/common/gin_helper/wrappable.h +++ b/shell/common/gin_helper/wrappable.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.chromium file. -#ifndef SHELL_COMMON_GIN_HELPER_WRAPPABLE_H_ -#define SHELL_COMMON_GIN_HELPER_WRAPPABLE_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_WRAPPABLE_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_WRAPPABLE_H_ #include "base/bind.h" #include "gin/per_isolate_data.h" @@ -98,4 +98,4 @@ struct Converter< } // namespace gin -#endif // SHELL_COMMON_GIN_HELPER_WRAPPABLE_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_WRAPPABLE_H_ diff --git a/shell/common/gin_helper/wrappable_base.h b/shell/common/gin_helper/wrappable_base.h index 4b70a91fa2477..87ba126d17d93 100644 --- a/shell/common/gin_helper/wrappable_base.h +++ b/shell/common/gin_helper/wrappable_base.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE.chromium file. -#ifndef SHELL_COMMON_GIN_HELPER_WRAPPABLE_BASE_H_ -#define SHELL_COMMON_GIN_HELPER_WRAPPABLE_BASE_H_ +#ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_WRAPPABLE_BASE_H_ +#define ELECTRON_SHELL_COMMON_GIN_HELPER_WRAPPABLE_BASE_H_ #include "v8/include/v8.h" @@ -67,4 +67,4 @@ class WrappableBase { } // namespace gin_helper -#endif // SHELL_COMMON_GIN_HELPER_WRAPPABLE_BASE_H_ +#endif // ELECTRON_SHELL_COMMON_GIN_HELPER_WRAPPABLE_BASE_H_ diff --git a/shell/common/heap_snapshot.h b/shell/common/heap_snapshot.h index ef544aa0530ab..63f0b0beadcb7 100644 --- a/shell/common/heap_snapshot.h +++ b/shell/common/heap_snapshot.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_HEAP_SNAPSHOT_H_ -#define SHELL_COMMON_HEAP_SNAPSHOT_H_ +#ifndef ELECTRON_SHELL_COMMON_HEAP_SNAPSHOT_H_ +#define ELECTRON_SHELL_COMMON_HEAP_SNAPSHOT_H_ namespace base { class File; @@ -19,4 +19,4 @@ bool TakeHeapSnapshot(v8::Isolate* isolate, base::File* file); } // namespace electron -#endif // SHELL_COMMON_HEAP_SNAPSHOT_H_ +#endif // ELECTRON_SHELL_COMMON_HEAP_SNAPSHOT_H_ diff --git a/shell/common/key_weak_map.h b/shell/common/key_weak_map.h index 147e683ce7990..09111d48dcd02 100644 --- a/shell/common/key_weak_map.h +++ b/shell/common/key_weak_map.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_KEY_WEAK_MAP_H_ -#define SHELL_COMMON_KEY_WEAK_MAP_H_ +#ifndef ELECTRON_SHELL_COMMON_KEY_WEAK_MAP_H_ +#define ELECTRON_SHELL_COMMON_KEY_WEAK_MAP_H_ #include #include @@ -85,4 +85,4 @@ class KeyWeakMap { } // namespace electron -#endif // SHELL_COMMON_KEY_WEAK_MAP_H_ +#endif // ELECTRON_SHELL_COMMON_KEY_WEAK_MAP_H_ diff --git a/shell/common/keyboard_util.h b/shell/common/keyboard_util.h index 9469661841ae9..d4c4bf2246432 100644 --- a/shell/common/keyboard_util.h +++ b/shell/common/keyboard_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_KEYBOARD_UTIL_H_ -#define SHELL_COMMON_KEYBOARD_UTIL_H_ +#ifndef ELECTRON_SHELL_COMMON_KEYBOARD_UTIL_H_ +#define ELECTRON_SHELL_COMMON_KEYBOARD_UTIL_H_ #include @@ -24,4 +24,4 @@ ui::KeyboardCode KeyboardCodeFromStr(const std::string& str, } // namespace electron -#endif // SHELL_COMMON_KEYBOARD_UTIL_H_ +#endif // ELECTRON_SHELL_COMMON_KEYBOARD_UTIL_H_ diff --git a/shell/common/language_util.h b/shell/common/language_util.h index eac23ad4ed60f..ccb81ccd2b3c9 100644 --- a/shell/common/language_util.h +++ b/shell/common/language_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_LANGUAGE_UTIL_H_ -#define SHELL_COMMON_LANGUAGE_UTIL_H_ +#ifndef ELECTRON_SHELL_COMMON_LANGUAGE_UTIL_H_ +#define ELECTRON_SHELL_COMMON_LANGUAGE_UTIL_H_ #include #include @@ -16,4 +16,4 @@ std::vector GetPreferredLanguages(); } // namespace electron -#endif // SHELL_COMMON_LANGUAGE_UTIL_H_ +#endif // ELECTRON_SHELL_COMMON_LANGUAGE_UTIL_H_ diff --git a/shell/common/logging.h b/shell/common/logging.h index d7b9e2097103b..c6b35b08fee3d 100644 --- a/shell/common/logging.h +++ b/shell/common/logging.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_LOGGING_H_ -#define SHELL_COMMON_LOGGING_H_ +#ifndef ELECTRON_SHELL_COMMON_LOGGING_H_ +#define ELECTRON_SHELL_COMMON_LOGGING_H_ namespace base { class CommandLine; @@ -19,4 +19,4 @@ base::FilePath GetLogFileName(const base::CommandLine& command_line); } // namespace logging -#endif // SHELL_COMMON_LOGGING_H_ +#endif // ELECTRON_SHELL_COMMON_LOGGING_H_ diff --git a/shell/common/mac/main_application_bundle.h b/shell/common/mac/main_application_bundle.h index ec9f97bd3f6d0..7b36dad77ba1a 100644 --- a/shell/common/mac/main_application_bundle.h +++ b/shell/common/mac/main_application_bundle.h @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE-CHROMIUM file. -#ifndef SHELL_COMMON_MAC_MAIN_APPLICATION_BUNDLE_H_ -#define SHELL_COMMON_MAC_MAIN_APPLICATION_BUNDLE_H_ +#ifndef ELECTRON_SHELL_COMMON_MAC_MAIN_APPLICATION_BUNDLE_H_ +#define ELECTRON_SHELL_COMMON_MAC_MAIN_APPLICATION_BUNDLE_H_ #ifdef __OBJC__ @class NSBundle; @@ -27,4 +27,4 @@ base::FilePath MainApplicationBundlePath(); } // namespace electron -#endif // SHELL_COMMON_MAC_MAIN_APPLICATION_BUNDLE_H_ +#endif // ELECTRON_SHELL_COMMON_MAC_MAIN_APPLICATION_BUNDLE_H_ diff --git a/shell/common/mouse_util.h b/shell/common/mouse_util.h index 4826f9b0c105b..6e8a0fb7cdfa6 100644 --- a/shell/common/mouse_util.h +++ b/shell/common/mouse_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_MOUSE_UTIL_H_ -#define SHELL_COMMON_MOUSE_UTIL_H_ +#ifndef ELECTRON_SHELL_COMMON_MOUSE_UTIL_H_ +#define ELECTRON_SHELL_COMMON_MOUSE_UTIL_H_ #include #include "content/common/cursors/webcursor.h" @@ -31,4 +31,4 @@ std::string CursorTypeToString(const ui::Cursor& cursor); } // namespace electron -#endif // SHELL_COMMON_MOUSE_UTIL_H_ +#endif // ELECTRON_SHELL_COMMON_MOUSE_UTIL_H_ diff --git a/shell/common/node_bindings.h b/shell/common/node_bindings.h index b65576ced8636..9789d0b687a65 100644 --- a/shell/common/node_bindings.h +++ b/shell/common/node_bindings.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_NODE_BINDINGS_H_ -#define SHELL_COMMON_NODE_BINDINGS_H_ +#ifndef ELECTRON_SHELL_COMMON_NODE_BINDINGS_H_ +#define ELECTRON_SHELL_COMMON_NODE_BINDINGS_H_ #include @@ -170,4 +170,4 @@ class NodeBindings { } // namespace electron -#endif // SHELL_COMMON_NODE_BINDINGS_H_ +#endif // ELECTRON_SHELL_COMMON_NODE_BINDINGS_H_ diff --git a/shell/common/node_bindings_linux.h b/shell/common/node_bindings_linux.h index a14daae995924..aca06dd0f5952 100644 --- a/shell/common/node_bindings_linux.h +++ b/shell/common/node_bindings_linux.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_NODE_BINDINGS_LINUX_H_ -#define SHELL_COMMON_NODE_BINDINGS_LINUX_H_ +#ifndef ELECTRON_SHELL_COMMON_NODE_BINDINGS_LINUX_H_ +#define ELECTRON_SHELL_COMMON_NODE_BINDINGS_LINUX_H_ #include "base/compiler_specific.h" #include "shell/common/node_bindings.h" @@ -29,4 +29,4 @@ class NodeBindingsLinux : public NodeBindings { } // namespace electron -#endif // SHELL_COMMON_NODE_BINDINGS_LINUX_H_ +#endif // ELECTRON_SHELL_COMMON_NODE_BINDINGS_LINUX_H_ diff --git a/shell/common/node_bindings_mac.h b/shell/common/node_bindings_mac.h index 8403bf9602f10..2e54f2fc9a214 100644 --- a/shell/common/node_bindings_mac.h +++ b/shell/common/node_bindings_mac.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_NODE_BINDINGS_MAC_H_ -#define SHELL_COMMON_NODE_BINDINGS_MAC_H_ +#ifndef ELECTRON_SHELL_COMMON_NODE_BINDINGS_MAC_H_ +#define ELECTRON_SHELL_COMMON_NODE_BINDINGS_MAC_H_ #include "base/compiler_specific.h" #include "shell/common/node_bindings.h" @@ -26,4 +26,4 @@ class NodeBindingsMac : public NodeBindings { } // namespace electron -#endif // SHELL_COMMON_NODE_BINDINGS_MAC_H_ +#endif // ELECTRON_SHELL_COMMON_NODE_BINDINGS_MAC_H_ diff --git a/shell/common/node_bindings_win.h b/shell/common/node_bindings_win.h index badaba6eb12ef..0a5eed2237ed2 100644 --- a/shell/common/node_bindings_win.h +++ b/shell/common/node_bindings_win.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_NODE_BINDINGS_WIN_H_ -#define SHELL_COMMON_NODE_BINDINGS_WIN_H_ +#ifndef ELECTRON_SHELL_COMMON_NODE_BINDINGS_WIN_H_ +#define ELECTRON_SHELL_COMMON_NODE_BINDINGS_WIN_H_ #include "base/compiler_specific.h" #include "shell/common/node_bindings.h" @@ -21,4 +21,4 @@ class NodeBindingsWin : public NodeBindings { } // namespace electron -#endif // SHELL_COMMON_NODE_BINDINGS_WIN_H_ +#endif // ELECTRON_SHELL_COMMON_NODE_BINDINGS_WIN_H_ diff --git a/shell/common/node_includes.h b/shell/common/node_includes.h index 91904db21af8e..f4f026df663de 100644 --- a/shell/common/node_includes.h +++ b/shell/common/node_includes.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_NODE_INCLUDES_H_ -#define SHELL_COMMON_NODE_INCLUDES_H_ +#ifndef ELECTRON_SHELL_COMMON_NODE_INCLUDES_H_ +#define ELECTRON_SHELL_COMMON_NODE_INCLUDES_H_ // Include common headers for using node APIs. @@ -36,4 +36,4 @@ #define NODE_LINKED_MODULE_CONTEXT_AWARE(modname, regfunc) \ NODE_MODULE_CONTEXT_AWARE_CPP(modname, regfunc, nullptr, NM_F_LINKED) -#endif // SHELL_COMMON_NODE_INCLUDES_H_ +#endif // ELECTRON_SHELL_COMMON_NODE_INCLUDES_H_ diff --git a/shell/common/node_util.h b/shell/common/node_util.h index a27f224918d84..fd7db87a46937 100644 --- a/shell/common/node_util.h +++ b/shell/common/node_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_NODE_UTIL_H_ -#define SHELL_COMMON_NODE_UTIL_H_ +#ifndef ELECTRON_SHELL_COMMON_NODE_UTIL_H_ +#define ELECTRON_SHELL_COMMON_NODE_UTIL_H_ #include @@ -33,4 +33,4 @@ v8::MaybeLocal CompileAndCall( } // namespace electron -#endif // SHELL_COMMON_NODE_UTIL_H_ +#endif // ELECTRON_SHELL_COMMON_NODE_UTIL_H_ diff --git a/shell/common/options_switches.h b/shell/common/options_switches.h index bf800586853a3..a082c76afa4fe 100644 --- a/shell/common/options_switches.h +++ b/shell/common/options_switches.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_OPTIONS_SWITCHES_H_ -#define SHELL_COMMON_OPTIONS_SWITCHES_H_ +#ifndef ELECTRON_SHELL_COMMON_OPTIONS_SWITCHES_H_ +#define ELECTRON_SHELL_COMMON_OPTIONS_SWITCHES_H_ #include "electron/buildflags/buildflags.h" @@ -139,4 +139,4 @@ extern const char kEnableWebSQL[]; } // namespace electron -#endif // SHELL_COMMON_OPTIONS_SWITCHES_H_ +#endif // ELECTRON_SHELL_COMMON_OPTIONS_SWITCHES_H_ diff --git a/shell/common/platform_util.h b/shell/common/platform_util.h index b9e801f055a48..dd59a212c4fb7 100644 --- a/shell/common/platform_util.h +++ b/shell/common/platform_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_PLATFORM_UTIL_H_ -#define SHELL_COMMON_PLATFORM_UTIL_H_ +#ifndef ELECTRON_SHELL_COMMON_PLATFORM_UTIL_H_ +#define ELECTRON_SHELL_COMMON_PLATFORM_UTIL_H_ #include @@ -60,4 +60,4 @@ bool GetDesktopName(std::string* setme); } // namespace platform_util -#endif // SHELL_COMMON_PLATFORM_UTIL_H_ +#endif // ELECTRON_SHELL_COMMON_PLATFORM_UTIL_H_ diff --git a/shell/common/platform_util_internal.h b/shell/common/platform_util_internal.h index bb5574ca26d9b..9a3681bed5ae6 100644 --- a/shell/common/platform_util_internal.h +++ b/shell/common/platform_util_internal.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_PLATFORM_UTIL_INTERNAL_H_ -#define SHELL_COMMON_PLATFORM_UTIL_INTERNAL_H_ +#ifndef ELECTRON_SHELL_COMMON_PLATFORM_UTIL_INTERNAL_H_ +#define ELECTRON_SHELL_COMMON_PLATFORM_UTIL_INTERNAL_H_ #include "shell/common/platform_util.h" @@ -23,4 +23,4 @@ bool PlatformTrashItem(const base::FilePath& path, std::string* error); } // namespace internal } // namespace platform_util -#endif // SHELL_COMMON_PLATFORM_UTIL_INTERNAL_H_ +#endif // ELECTRON_SHELL_COMMON_PLATFORM_UTIL_INTERNAL_H_ diff --git a/shell/common/process_util.h b/shell/common/process_util.h index e66430758c278..bd08b102662fa 100644 --- a/shell/common/process_util.h +++ b/shell/common/process_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_PROCESS_UTIL_H_ -#define SHELL_COMMON_PROCESS_UTIL_H_ +#ifndef ELECTRON_SHELL_COMMON_PROCESS_UTIL_H_ +#define ELECTRON_SHELL_COMMON_PROCESS_UTIL_H_ #include @@ -19,4 +19,4 @@ void EmitWarning(node::Environment* env, } // namespace electron -#endif // SHELL_COMMON_PROCESS_UTIL_H_ +#endif // ELECTRON_SHELL_COMMON_PROCESS_UTIL_H_ diff --git a/shell/common/skia_util.h b/shell/common/skia_util.h index 2c21b40f9b811..148aa4d34ae14 100644 --- a/shell/common/skia_util.h +++ b/shell/common/skia_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_SKIA_UTIL_H_ -#define SHELL_COMMON_SKIA_UTIL_H_ +#ifndef ELECTRON_SHELL_COMMON_SKIA_UTIL_H_ +#define ELECTRON_SHELL_COMMON_SKIA_UTIL_H_ namespace base { class FilePath; @@ -45,4 +45,4 @@ bool ReadImageSkiaFromICO(gfx::ImageSkia* image, HICON icon); } // namespace electron -#endif // SHELL_COMMON_SKIA_UTIL_H_ +#endif // ELECTRON_SHELL_COMMON_SKIA_UTIL_H_ diff --git a/shell/common/v8_value_converter.h b/shell/common/v8_value_converter.h index 5d6a932163ac0..5a1c5e21b90c0 100644 --- a/shell/common/v8_value_converter.h +++ b/shell/common/v8_value_converter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_V8_VALUE_CONVERTER_H_ -#define SHELL_COMMON_V8_VALUE_CONVERTER_H_ +#ifndef ELECTRON_SHELL_COMMON_V8_VALUE_CONVERTER_H_ +#define ELECTRON_SHELL_COMMON_V8_VALUE_CONVERTER_H_ #include @@ -75,4 +75,4 @@ class V8ValueConverter { } // namespace electron -#endif // SHELL_COMMON_V8_VALUE_CONVERTER_H_ +#endif // ELECTRON_SHELL_COMMON_V8_VALUE_CONVERTER_H_ diff --git a/shell/common/v8_value_serializer.h b/shell/common/v8_value_serializer.h index 1a2513a6497be..b75ed82a3228b 100644 --- a/shell/common/v8_value_serializer.h +++ b/shell/common/v8_value_serializer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_V8_VALUE_SERIALIZER_H_ -#define SHELL_COMMON_V8_VALUE_SERIALIZER_H_ +#ifndef ELECTRON_SHELL_COMMON_V8_VALUE_SERIALIZER_H_ +#define ELECTRON_SHELL_COMMON_V8_VALUE_SERIALIZER_H_ #include "base/containers/span.h" @@ -30,4 +30,4 @@ v8::Local DeserializeV8Value(v8::Isolate* isolate, } // namespace electron -#endif // SHELL_COMMON_V8_VALUE_SERIALIZER_H_ +#endif // ELECTRON_SHELL_COMMON_V8_VALUE_SERIALIZER_H_ diff --git a/shell/common/world_ids.h b/shell/common/world_ids.h index 90fa6c07f5cb8..aee655a3a6a2d 100644 --- a/shell/common/world_ids.h +++ b/shell/common/world_ids.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_COMMON_WORLD_IDS_H_ -#define SHELL_COMMON_WORLD_IDS_H_ +#ifndef ELECTRON_SHELL_COMMON_WORLD_IDS_H_ +#define ELECTRON_SHELL_COMMON_WORLD_IDS_H_ #include "third_party/blink/renderer/platform/bindings/dom_wrapper_world.h" // nogncheck @@ -27,4 +27,4 @@ enum WorldIDs : int32_t { } // namespace electron -#endif // SHELL_COMMON_WORLD_IDS_H_ +#endif // ELECTRON_SHELL_COMMON_WORLD_IDS_H_ diff --git a/shell/renderer/api/context_bridge/object_cache.h b/shell/renderer/api/context_bridge/object_cache.h index 0bf6a623d1e00..4d6a2dbd2f95e 100644 --- a/shell/renderer/api/context_bridge/object_cache.h +++ b/shell/renderer/api/context_bridge/object_cache.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_API_CONTEXT_BRIDGE_OBJECT_CACHE_H_ -#define SHELL_RENDERER_API_CONTEXT_BRIDGE_OBJECT_CACHE_H_ +#ifndef ELECTRON_SHELL_RENDERER_API_CONTEXT_BRIDGE_OBJECT_CACHE_H_ +#define ELECTRON_SHELL_RENDERER_API_CONTEXT_BRIDGE_OBJECT_CACHE_H_ #include #include @@ -44,4 +44,4 @@ class ObjectCache final { } // namespace electron -#endif // SHELL_RENDERER_API_CONTEXT_BRIDGE_OBJECT_CACHE_H_ +#endif // ELECTRON_SHELL_RENDERER_API_CONTEXT_BRIDGE_OBJECT_CACHE_H_ diff --git a/shell/renderer/api/electron_api_context_bridge.h b/shell/renderer/api/electron_api_context_bridge.h index 10392e5959c23..86f793904ebb9 100644 --- a/shell/renderer/api/electron_api_context_bridge.h +++ b/shell/renderer/api/electron_api_context_bridge.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_ -#define SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_ +#ifndef ELECTRON_SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_ +#define ELECTRON_SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_ #include "shell/renderer/api/context_bridge/object_cache.h" #include "v8/include/v8.h" @@ -55,4 +55,4 @@ v8::MaybeLocal CreateProxyForAPI( } // namespace electron -#endif // SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_ +#endif // ELECTRON_SHELL_RENDERER_API_ELECTRON_API_CONTEXT_BRIDGE_H_ diff --git a/shell/renderer/api/electron_api_spell_check_client.h b/shell/renderer/api/electron_api_spell_check_client.h index 749bf76dc7fd1..d0b0a9b1956aa 100644 --- a/shell/renderer/api/electron_api_spell_check_client.h +++ b/shell/renderer/api/electron_api_spell_check_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_API_ELECTRON_API_SPELL_CHECK_CLIENT_H_ -#define SHELL_RENDERER_API_ELECTRON_API_SPELL_CHECK_CLIENT_H_ +#ifndef ELECTRON_SHELL_RENDERER_API_ELECTRON_API_SPELL_CHECK_CLIENT_H_ +#define ELECTRON_SHELL_RENDERER_API_ELECTRON_API_SPELL_CHECK_CLIENT_H_ #include #include @@ -113,4 +113,4 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient, } // namespace electron -#endif // SHELL_RENDERER_API_ELECTRON_API_SPELL_CHECK_CLIENT_H_ +#endif // ELECTRON_SHELL_RENDERER_API_ELECTRON_API_SPELL_CHECK_CLIENT_H_ diff --git a/shell/renderer/browser_exposed_renderer_interfaces.h b/shell/renderer/browser_exposed_renderer_interfaces.h index 97e32ba7687d8..c98c7bb23e416 100644 --- a/shell/renderer/browser_exposed_renderer_interfaces.h +++ b/shell/renderer/browser_exposed_renderer_interfaces.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_BROWSER_EXPOSED_RENDERER_INTERFACES_H_ -#define SHELL_RENDERER_BROWSER_EXPOSED_RENDERER_INTERFACES_H_ +#ifndef ELECTRON_SHELL_RENDERER_BROWSER_EXPOSED_RENDERER_INTERFACES_H_ +#define ELECTRON_SHELL_RENDERER_BROWSER_EXPOSED_RENDERER_INTERFACES_H_ namespace mojo { class BinderMap; @@ -19,4 +19,4 @@ void ExposeElectronRendererInterfacesToBrowser( electron::RendererClientBase* client, mojo::BinderMap* binders); -#endif // SHELL_RENDERER_BROWSER_EXPOSED_RENDERER_INTERFACES_H_ +#endif // ELECTRON_SHELL_RENDERER_BROWSER_EXPOSED_RENDERER_INTERFACES_H_ diff --git a/shell/renderer/content_settings_observer.h b/shell/renderer/content_settings_observer.h index 46b1cc26f0c7e..ca73c13a78a19 100644 --- a/shell/renderer/content_settings_observer.h +++ b/shell/renderer/content_settings_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ -#define SHELL_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ +#ifndef ELECTRON_SHELL_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ +#define ELECTRON_SHELL_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ #include "base/compiler_specific.h" #include "content/public/renderer/render_frame_observer.h" @@ -31,4 +31,4 @@ class ContentSettingsObserver : public content::RenderFrameObserver, } // namespace electron -#endif // SHELL_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ +#endif // ELECTRON_SHELL_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ diff --git a/shell/renderer/electron_api_service_impl.h b/shell/renderer/electron_api_service_impl.h index 7318118be758a..51225208f4420 100644 --- a/shell/renderer/electron_api_service_impl.h +++ b/shell/renderer/electron_api_service_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_ELECTRON_API_SERVICE_IMPL_H_ -#define SHELL_RENDERER_ELECTRON_API_SERVICE_IMPL_H_ +#ifndef ELECTRON_SHELL_RENDERER_ELECTRON_API_SERVICE_IMPL_H_ +#define ELECTRON_SHELL_RENDERER_ELECTRON_API_SERVICE_IMPL_H_ #include @@ -70,4 +70,4 @@ class ElectronApiServiceImpl : public mojom::ElectronRenderer, } // namespace electron -#endif // SHELL_RENDERER_ELECTRON_API_SERVICE_IMPL_H_ +#endif // ELECTRON_SHELL_RENDERER_ELECTRON_API_SERVICE_IMPL_H_ diff --git a/shell/renderer/electron_autofill_agent.h b/shell/renderer/electron_autofill_agent.h index 365ad1cd7f7f1..86bd9fa8f39d3 100644 --- a/shell/renderer/electron_autofill_agent.h +++ b/shell/renderer/electron_autofill_agent.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_ELECTRON_AUTOFILL_AGENT_H_ -#define SHELL_RENDERER_ELECTRON_AUTOFILL_AGENT_H_ +#ifndef ELECTRON_SHELL_RENDERER_ELECTRON_AUTOFILL_AGENT_H_ +#define ELECTRON_SHELL_RENDERER_ELECTRON_AUTOFILL_AGENT_H_ #include @@ -93,4 +93,4 @@ class AutofillAgent : public content::RenderFrameObserver, } // namespace electron -#endif // SHELL_RENDERER_ELECTRON_AUTOFILL_AGENT_H_ +#endif // ELECTRON_SHELL_RENDERER_ELECTRON_AUTOFILL_AGENT_H_ diff --git a/shell/renderer/electron_render_frame_observer.h b/shell/renderer/electron_render_frame_observer.h index 55eac80df65a4..bbfd4970489c6 100644 --- a/shell/renderer/electron_render_frame_observer.h +++ b/shell/renderer/electron_render_frame_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_ELECTRON_RENDER_FRAME_OBSERVER_H_ -#define SHELL_RENDERER_ELECTRON_RENDER_FRAME_OBSERVER_H_ +#ifndef ELECTRON_SHELL_RENDERER_ELECTRON_RENDER_FRAME_OBSERVER_H_ +#define ELECTRON_SHELL_RENDERER_ELECTRON_RENDER_FRAME_OBSERVER_H_ #include @@ -50,4 +50,4 @@ class ElectronRenderFrameObserver : public content::RenderFrameObserver { } // namespace electron -#endif // SHELL_RENDERER_ELECTRON_RENDER_FRAME_OBSERVER_H_ +#endif // ELECTRON_SHELL_RENDERER_ELECTRON_RENDER_FRAME_OBSERVER_H_ diff --git a/shell/renderer/electron_renderer_client.h b/shell/renderer/electron_renderer_client.h index 4c308dfdbe9fe..53e3d67094750 100644 --- a/shell/renderer/electron_renderer_client.h +++ b/shell/renderer/electron_renderer_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_ELECTRON_RENDERER_CLIENT_H_ -#define SHELL_RENDERER_ELECTRON_RENDERER_CLIENT_H_ +#ifndef ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_CLIENT_H_ +#define ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_CLIENT_H_ #include #include @@ -66,4 +66,4 @@ class ElectronRendererClient : public RendererClientBase { } // namespace electron -#endif // SHELL_RENDERER_ELECTRON_RENDERER_CLIENT_H_ +#endif // ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_CLIENT_H_ diff --git a/shell/renderer/electron_renderer_pepper_host_factory.h b/shell/renderer/electron_renderer_pepper_host_factory.h index c4398a158469d..b9588680c08e0 100644 --- a/shell/renderer/electron_renderer_pepper_host_factory.h +++ b/shell/renderer/electron_renderer_pepper_host_factory.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_ -#define SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_ +#ifndef ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_ +#define ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_ #include @@ -37,4 +37,4 @@ class ElectronRendererPepperHostFactory : public ppapi::host::HostFactory { content::RendererPpapiHost* host_; }; -#endif // SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_ +#endif // ELECTRON_SHELL_RENDERER_ELECTRON_RENDERER_PEPPER_HOST_FACTORY_H_ diff --git a/shell/renderer/electron_sandboxed_renderer_client.h b/shell/renderer/electron_sandboxed_renderer_client.h index 545ceb9b78411..3647893a75ec1 100644 --- a/shell/renderer/electron_sandboxed_renderer_client.h +++ b/shell/renderer/electron_sandboxed_renderer_client.h @@ -1,8 +1,8 @@ // Copyright (c) 2016 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_ELECTRON_SANDBOXED_RENDERER_CLIENT_H_ -#define SHELL_RENDERER_ELECTRON_SANDBOXED_RENDERER_CLIENT_H_ +#ifndef ELECTRON_SHELL_RENDERER_ELECTRON_SANDBOXED_RENDERER_CLIENT_H_ +#define ELECTRON_SHELL_RENDERER_ELECTRON_SANDBOXED_RENDERER_CLIENT_H_ #include #include @@ -55,4 +55,4 @@ class ElectronSandboxedRendererClient : public RendererClientBase { } // namespace electron -#endif // SHELL_RENDERER_ELECTRON_SANDBOXED_RENDERER_CLIENT_H_ +#endif // ELECTRON_SHELL_RENDERER_ELECTRON_SANDBOXED_RENDERER_CLIENT_H_ diff --git a/shell/renderer/extensions/electron_extensions_dispatcher_delegate.h b/shell/renderer/extensions/electron_extensions_dispatcher_delegate.h index b66edc5fdc206..1b1d1f9ec3e65 100644 --- a/shell/renderer/extensions/electron_extensions_dispatcher_delegate.h +++ b/shell/renderer/extensions/electron_extensions_dispatcher_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_DISPATCHER_DELEGATE_H_ -#define SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_DISPATCHER_DELEGATE_H_ +#ifndef ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_DISPATCHER_DELEGATE_H_ +#define ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_DISPATCHER_DELEGATE_H_ #include #include @@ -39,4 +39,4 @@ class ElectronExtensionsDispatcherDelegate extensions::NativeExtensionBindingsSystem* bindings_system) override; }; -#endif // SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_DISPATCHER_DELEGATE_H_ +#endif // ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_DISPATCHER_DELEGATE_H_ diff --git a/shell/renderer/extensions/electron_extensions_renderer_client.h b/shell/renderer/extensions/electron_extensions_renderer_client.h index 9f992a1a2a8b1..4f90913062832 100644 --- a/shell/renderer/extensions/electron_extensions_renderer_client.h +++ b/shell/renderer/extensions/electron_extensions_renderer_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_CLIENT_H_ -#define SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_CLIENT_H_ +#ifndef ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_CLIENT_H_ +#define ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_CLIENT_H_ #include @@ -51,4 +51,4 @@ class ElectronExtensionsRendererClient } // namespace electron -#endif // SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_CLIENT_H_ +#endif // ELECTRON_SHELL_RENDERER_EXTENSIONS_ELECTRON_EXTENSIONS_RENDERER_CLIENT_H_ diff --git a/shell/renderer/guest_view_container.h b/shell/renderer/guest_view_container.h index 54daed1f494fb..caa2983a0765e 100644 --- a/shell/renderer/guest_view_container.h +++ b/shell/renderer/guest_view_container.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_ -#define SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_ +#ifndef ELECTRON_SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_ +#define ELECTRON_SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_ #include "base/callback.h" @@ -44,4 +44,4 @@ class GuestViewContainer { } // namespace electron -#endif // SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_ +#endif // ELECTRON_SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_ diff --git a/shell/renderer/pepper_helper.h b/shell/renderer/pepper_helper.h index 674918156cd03..a73aec8fdd6fc 100644 --- a/shell/renderer/pepper_helper.h +++ b/shell/renderer/pepper_helper.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_PEPPER_HELPER_H_ -#define SHELL_RENDERER_PEPPER_HELPER_H_ +#ifndef ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_ +#define ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_ #include "base/compiler_specific.h" #include "base/component_export.h" @@ -25,4 +25,4 @@ class PepperHelper : public content::RenderFrameObserver { void OnDestruct() override; }; -#endif // SHELL_RENDERER_PEPPER_HELPER_H_ +#endif // ELECTRON_SHELL_RENDERER_PEPPER_HELPER_H_ diff --git a/shell/renderer/printing/print_render_frame_helper_delegate.h b/shell/renderer/printing/print_render_frame_helper_delegate.h index 40b9f569f2eb4..9733851552ee2 100644 --- a/shell/renderer/printing/print_render_frame_helper_delegate.h +++ b/shell/renderer/printing/print_render_frame_helper_delegate.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_PRINTING_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ -#define SHELL_RENDERER_PRINTING_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ +#ifndef ELECTRON_SHELL_RENDERER_PRINTING_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ +#define ELECTRON_SHELL_RENDERER_PRINTING_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ #include "components/printing/renderer/print_render_frame_helper.h" @@ -30,4 +30,4 @@ class PrintRenderFrameHelperDelegate } // namespace electron -#endif // SHELL_RENDERER_PRINTING_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ +#endif // ELECTRON_SHELL_RENDERER_PRINTING_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ diff --git a/shell/renderer/renderer_client_base.h b/shell/renderer/renderer_client_base.h index 904b43e9dbef9..56e53ab764cf6 100644 --- a/shell/renderer/renderer_client_base.h +++ b/shell/renderer/renderer_client_base.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_RENDERER_CLIENT_BASE_H_ -#define SHELL_RENDERER_RENDERER_CLIENT_BASE_H_ +#ifndef ELECTRON_SHELL_RENDERER_RENDERER_CLIENT_BASE_H_ +#define ELECTRON_SHELL_RENDERER_RENDERER_CLIENT_BASE_H_ #include #include @@ -171,4 +171,4 @@ class RendererClientBase : public content::ContentRendererClient } // namespace electron -#endif // SHELL_RENDERER_RENDERER_CLIENT_BASE_H_ +#endif // ELECTRON_SHELL_RENDERER_RENDERER_CLIENT_BASE_H_ diff --git a/shell/renderer/web_worker_observer.h b/shell/renderer/web_worker_observer.h index cceee69e9c869..0b05644fa0fba 100644 --- a/shell/renderer/web_worker_observer.h +++ b/shell/renderer/web_worker_observer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_RENDERER_WEB_WORKER_OBSERVER_H_ -#define SHELL_RENDERER_WEB_WORKER_OBSERVER_H_ +#ifndef ELECTRON_SHELL_RENDERER_WEB_WORKER_OBSERVER_H_ +#define ELECTRON_SHELL_RENDERER_WEB_WORKER_OBSERVER_H_ #include @@ -37,4 +37,4 @@ class WebWorkerObserver { } // namespace electron -#endif // SHELL_RENDERER_WEB_WORKER_OBSERVER_H_ +#endif // ELECTRON_SHELL_RENDERER_WEB_WORKER_OBSERVER_H_ diff --git a/shell/utility/electron_content_utility_client.h b/shell/utility/electron_content_utility_client.h index a3908ee900d9e..1c17e5ca0654e 100644 --- a/shell/utility/electron_content_utility_client.h +++ b/shell/utility/electron_content_utility_client.h @@ -2,8 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_ -#define SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_ +#ifndef ELECTRON_SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_ +#define ELECTRON_SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_ #include @@ -47,4 +47,4 @@ class ElectronContentUtilityClient : public content::ContentUtilityClient { } // namespace electron -#endif // SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_ +#endif // ELECTRON_SHELL_UTILITY_ELECTRON_CONTENT_UTILITY_CLIENT_H_ From 557e58666773d9294a1880ae3a561aabad89faae Mon Sep 17 00:00:00 2001 From: CezaryKulakowski <50166166+CezaryKulakowski@users.noreply.github.com> Date: Mon, 22 Nov 2021 10:31:21 +0100 Subject: [PATCH 011/268] fix: fix aspect ratio when max width/height is set (#29101) Add the native frame border size to the minimum and maximum size if the view reports its size as the client size. It allows to enlarge window to proper values when aspect ratio and max width/height are set. It also fixes DCHECK which was triggered when user tried to enlarge window above dimensions set during creation of the BrowserWindow. --- patches/chromium/.patches | 1 + .../fix_aspect_ratio_with_max_size.patch | 38 +++++++++++++++++++ spec-main/api-browser-window-spec.ts | 11 ++++++ 3 files changed, 50 insertions(+) create mode 100644 patches/chromium/fix_aspect_ratio_with_max_size.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index f11ba9d77f70d..d4d63d7e397cd 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -111,3 +111,4 @@ feat_add_data_parameter_to_processsingleton.patch mas_gate_private_enterprise_APIs load_v8_snapshot_in_browser_process.patch fix_patch_out_permissions_checks_in_exclusive_access.patch +fix_aspect_ratio_with_max_size.patch diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch new file mode 100644 index 0000000000000..4e3f76c81bad0 --- /dev/null +++ b/patches/chromium/fix_aspect_ratio_with_max_size.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Cezary Kulakowski +Date: Tue, 11 May 2021 11:14:06 +0200 +Subject: fix: fix aspect ratio when max width/height is set + +Add the native frame border size to the minimum and maximum size if +the view reports its size as the client size. It allows to enlarge +window to proper values when aspect ratio and max width/height are +set. It also fixes DCHECK which was triggered when user tried to +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 a235cab941ec583a8dc9cb5e4105c2d7baae02df..f7c1232b0893c366aeeb77e6df0bbd275b6f7bd4 100644 +--- a/ui/views/win/hwnd_message_handler.cc ++++ b/ui/views/win/hwnd_message_handler.cc +@@ -3569,6 +3569,21 @@ 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); ++ // Add the native frame border size to the minimum and maximum size if the ++ // view reports its size as the client size. ++ if (delegate_->WidgetSizeIsClientSize()) { ++ RECT client_rect, rect; ++ GetClientRect(hwnd(), &client_rect); ++ GetWindowRect(hwnd(), &rect); ++ CR_DEFLATE_RECT(&rect, &client_rect); ++ min_window_size.Enlarge(rect.right - rect.left, ++ rect.bottom - rect.top); ++ // Either axis may be zero, so enlarge them independently. ++ if (max_window_size.width()) ++ max_window_size.Enlarge(rect.right - rect.left, 0); ++ if (max_window_size.height()) ++ max_window_size.Enlarge(0, rect.bottom - rect.top); ++ } + gfx::SizeRectToAspectRatio(GetWindowResizeEdge(param), aspect_ratio_.value(), + min_window_size, max_window_size, window_rect); + } diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 91a88335db429..81a048bec1e65 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -952,6 +952,17 @@ describe('BrowserWindow module', () => { await resize; expectBoundsEqual(w.getSize(), size); }); + + it('doesn\'t change bounds when maximum size is set', () => { + w.setMenu(null); + w.setMaximumSize(400, 400); + // Without https://github.com/electron/electron/pull/29101 + // following call would shrink the window to 384x361. + // There would be also DCHECK in resize_utils.cc on + // debug build. + w.setAspectRatio(1.0); + expectBoundsEqual(w.getSize(), [400, 400]); + }); }); describe('BrowserWindow.setPosition(x, y)', () => { From 4713acce8dff0528a3025b40c4feed82439a8538 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 05:00:55 -0800 Subject: [PATCH 012/268] Bump v18.0.0-nightly.20211122 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 57bbb37a9d252..29db300fb1dd2 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211119 \ No newline at end of file +18.0.0-nightly.20211122 \ No newline at end of file diff --git a/package.json b/package.json index 6d2b16d2bac4a..7000233927579 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211119", + "version": "18.0.0-nightly.20211122", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 2e127db0fc778..4c71c85f0ac72 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211119 - PRODUCTVERSION 18,0,0,20211119 + FILEVERSION 18,0,0,20211122 + PRODUCTVERSION 18,0,0,20211122 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 681fe435fe68c9a4862db5edfa7281a700995d59 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 23 Nov 2021 05:01:47 -0800 Subject: [PATCH 013/268] Bump v18.0.0-nightly.20211123 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 29db300fb1dd2..e92de12167428 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211122 \ No newline at end of file +18.0.0-nightly.20211123 \ No newline at end of file diff --git a/package.json b/package.json index 7000233927579..abdd918e31ea7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211122", + "version": "18.0.0-nightly.20211123", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 4c71c85f0ac72..92b0ecb3431da 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211122 - PRODUCTVERSION 18,0,0,20211122 + FILEVERSION 18,0,0,20211123 + PRODUCTVERSION 18,0,0,20211123 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 9ab102e1566a0a8f393517c078815e3255492355 Mon Sep 17 00:00:00 2001 From: Robo Date: Wed, 24 Nov 2021 02:34:07 +0900 Subject: [PATCH 014/268] fix: console windows from ELECTRON_RUN_AS_NODE instances (#31963) --- shell/app/node_main.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shell/app/node_main.cc b/shell/app/node_main.cc index 845788da58edf..ff0ef3b430fa9 100644 --- a/shell/app/node_main.cc +++ b/shell/app/node_main.cc @@ -210,8 +210,11 @@ int NodeMain(int argc, char* argv[]) { isolate_data = node::CreateIsolateData(isolate, loop, gin_env.platform()); CHECK_NE(nullptr, isolate_data); - env = node::CreateEnvironment(isolate_data, gin_env.context(), - result.args, result.exec_args); + uint64_t flags = node::EnvironmentFlags::kDefaultFlags | + node::EnvironmentFlags::kHideConsoleWindows; + env = node::CreateEnvironment( + isolate_data, gin_env.context(), result.args, result.exec_args, + static_cast(flags)); CHECK_NE(nullptr, env); node::IsolateSettings is; From 065cad6d2c2fd06d73579316dccc58dc2dc4d43d Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Tue, 23 Nov 2021 11:47:24 -0800 Subject: [PATCH 015/268] docs: add playwright e2e testing docs (#31961) --- docs/tutorial/automated-testing.md | 148 ++++++++++++++++++++++++++++- 1 file changed, 146 insertions(+), 2 deletions(-) diff --git a/docs/tutorial/automated-testing.md b/docs/tutorial/automated-testing.md index e2386e262e387..56ad8282eed4b 100644 --- a/docs/tutorial/automated-testing.md +++ b/docs/tutorial/automated-testing.md @@ -58,8 +58,6 @@ To run your tests: $ npx wdio run wdio.conf.js ``` -[chrome-driver]: https://sites.google.com/chromium.org/driver/ - ### With Selenium [Selenium](https://www.selenium.dev/) is a web automation framework that @@ -116,6 +114,142 @@ driver.wait(() => { driver.quit() ``` +## Using Playwright + +[Microsoft Playwright](https://playwright.dev) is an end-to-end testing framework built +using browser-specific remote debugging protocols, similar to the [Puppeteer] headless +Node.js API but geared towards end-to-end testing. Playwright has experimental Electron +support via Electron's support for the [Chrome DevTools Protocol] (CDP). + +### Install dependencies + +You can install Playwright through your preferred Node.js package manager. The Playwright team +recommends using the `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` environment variable to avoid +unnecessary browser downloads when testing an Electron app. + +```sh npm2yarn +PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm install --save-dev playwright +``` + +Playwright also comes with its own test runner, Playwright Test, which is built for end-to-end +testing. You can also install it as a dev dependency in your project: + +```sh npm2yarn +npm install --save-dev @playwright/test +``` + +:::caution Dependencies +This tutorial was written `playwright@1.16.3` and `@playwright/test@1.16.3`. Check out +[Playwright's releases][playwright-releases] page to learn about +changes that might affect the code below. +::: + +:::info Using third-party test runners +If you're interested in using an alternative test runner (e.g. Jest or Mocha), check out +Playwright's [Third-Party Test Runner][playwright-test-runners] guide. +::: + +### Write your tests + +Playwright launches your app in development mode through the `_electron.launch` API. +To point this API to your Electron app, you can pass the path to your main process +entry point (here, it is `main.js`). + +```js {5} +const { _electron: electron } = require('playwright') +const { test } = require('@playwright/test') + +test('launch app', async () => { + const electronApp = await electron.launch({ args: ['main.js'] }) + // close app + await electronApp.close() +}) +``` + +After that, you will access to an instance of Playwright's `ElectronApp` class. This +is a powerful class that has access to main process modules for example: + +```js {6-11} +const { _electron: electron } = require('playwright') +const { test } = require('@playwright/test') + +test('get isPackaged', async () => { + const electronApp = await electron.launch({ args: ['main.js'] }) + const isPackaged = await electronApp.evaluate(async ({ app }) => { + // This runs in Electron's main process, parameter here is always + // the result of the require('electron') in the main app script. + return app.isPackaged + }) + console.log(isPackaged) // false (because we're in development mode) + // close app + await electronApp.close() +}) +``` + +It can also create individual [Page][playwright-page] objects from Electron BrowserWindow instances. +For example, to grab the first BrowserWindow and save a screenshot: + +```js {6-7} +const { _electron: electron } = require('playwright') +const { test } = require('@playwright/test') + +test('save screenshot', async () => { + const electronApp = await electron.launch({ args: ['main.js'] }) + const window = await electronApp.firstWindow() + await window.screenshot({ path: 'intro.png' }) + // close app + await electronApp.close() +}) +``` + +Putting all this together using the PlayWright Test runner, let's create a `example.spec.js` +test file with a single test and assertion: + +```js title='example.spec.js' +const { _electron: electron } = require('playwright') +const { test, expect } = require('@playwright/test') + +test('example test', async () => { + const electronApp = await electron.launch({ args: ['.'] }) + const isPackaged = await electronApp.evaluate(async ({ app }) => { + // This runs in Electron's main process, parameter here is always + // the result of the require('electron') in the main app script. + return app.isPackaged; + }); + + expect(isPackaged).toBe(false); + + // Wait for the first BrowserWindow to open + // and return its Page object + const window = await electronApp.firstWindow() + await window.screenshot({ path: 'intro.png' }) + + // close app + await electronApp.close() +}); +``` + +Then, run Playwright Test using `npx playwright test`. You should see the test pass in your +console, and have an `intro.png` screenshot on your filesystem. + +```console +☁ $ npx playwright test + +Running 1 test using 1 worker + + ✓ example.spec.js:4:1 › example test (1s) +``` + +:::info +Playwright Test will automatically run any files matching the `.*(test|spec)\.(js|ts|mjs)` regex. +You can customize this match in the [Playwright Test configuration options][playwright-test-config]. +::: + +:::tip Further reading +Check out Playwright's documentation for the full [Electron][playwright-electron] +and [ElectronApplication][playwright-electronapplication] class APIs. +::: + ## Using a custom test driver It's also possible to write your own custom driver using Node.js' built-in IPC-over-STDIO. @@ -263,3 +397,13 @@ test.after.always('cleanup', async t => { await app.stop() }) ``` + +[chrome-driver]: https://sites.google.com/chromium.org/driver/ +[Puppeteer]: https://github.com/puppeteer/puppeteer +[playwright-electron]: https://playwright.dev/docs/api/class-electron/ +[playwright-electronapplication]: https://playwright.dev/docs/api/class-electronapplication +[playwright-page]: https://playwright.dev/docs/api/class-page +[playwright-releases]: https://github.com/microsoft/playwright/releases +[playwright-test-config]: https://playwright.dev/docs/api/class-testconfig#test-config-test-match +[playwright-test-runners]: https://playwright.dev/docs/test-runners/ +[Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/ From bd10b19b0cdc46cdbadb570af89305e64541b679 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Wed, 24 Nov 2021 09:45:59 +0100 Subject: [PATCH 016/268] chore: bump chromium to 98.0.4706.0 (main) (#31555) * chore: bump chromium in DEPS to 97.0.4678.0 * chore: bump chromium in DEPS to 97.0.4679.0 * chore: bump chromium in DEPS to 97.0.4680.0 * chore: bump chromium in DEPS to 97.0.4681.0 * chore: bump chromium in DEPS to 97.0.4682.0 * chore: update patches * 3234737: Disable -Wunused-but-set-variable Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3234737 * 3216953: Reland "Move task-related files from base/ to base/task/" Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3216953 * 3202710: TimeDelta factory function migration. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3202710 * 3226841: Rename WCO::RenderProcessGone to PrimaryMainFrameRenderProcessGone Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3226841 * 3212165: blink/gin: changes blink to load snapshot based on runtime information Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3212165 * 3220292: Deprecate returning a GURL from GURL::GetOrigin() Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3220292 * 3231995: build: Enable -Wbitwise-instead-of-logical everywhere except iOS and Windows Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3231995 * 3205121: Remove base::DictionaryValue::GetDouble Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3205121 * 3208413: [flags] Make --js-flags settings have priority over V8 features Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3208413 * chore: bump chromium in DEPS to 97.0.4683.0 * chore: update patches * 3188834: Combine RWHVBase GetCurrentDeviceScaleFactor/GetDeviceScaleFactor Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3188834 * chore: update process_singleton patches * chore: bump chromium in DEPS to 97.0.4684.0 * chore: update patches * chore: bump chromium in DEPS to 97.0.4685.0 * chore: update patches * chore: bump chromium in DEPS to 97.0.4686.0 * chore: update patches * chore: bump chromium in DEPS to 97.0.4687.0 * chore: update patches * chore: bump chromium in DEPS to 97.0.4688.0 * chore: update patches * 3247722: Use correct source_site_instance if navigating via context menu Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3247722 Update signature of HandleContextMenu() * 3247722: Use correct source_site_instance if navigating via context menu Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3247722 Update signature of HandleContextMenu() * 3223422: Remove PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE enum option Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3223422 sync pepper_plugin_support.patch with upstream * chore: bump chromium in DEPS to 97.0.4689.0 * 3247791: ax_mac_merge: Merge AX Math attribute implementations Xref: ax_mac_merge: Merge AX Math attribute implementations chore: fix minor patch shear in #includes * 3243425: Add VisibleTimeRequestTrigger helper class Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3243425 chore: fix minor patch shear in #includes * chore: regen chromium patches * fixup! 3247722: Use correct source_site_instance if navigating via context menu * chore: bump chromium in DEPS to 97.0.4690.0 * 3188659: Window Placement: make GetScreenInfo(s) const Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3188659 simple sync GetScreenInfo with upstream refactor * chore: update patches * chore: bump chromium in DEPS to 97.0.4690.4 * chore: bump chromium in DEPS to 97.0.4692.0 * 3198073: ozone: //content: clean up from USE_X11 Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3198073 Fixing patch shear. Nothing to see here. * 3252338: Remove label images checkbox from chrome://accessibility page Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3252338 Part of our a11y patch is no longer needed due to upstream label removal * 3258183: Remove DISALLOW_IMPLICIT_CONSTRUCTORS() definition Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3258183 Replace our use of the macro with explicitly-deleted class methods. See https://chromium-review.googlesource.com/c/chromium/src/+/3256952 for upstream examples of this same replacement. * chore: update patches * 3247295: Unwind SecurityStyleExplanations Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3247295 update GetSecurityStyle() signature and impl to match upstream changes * 3259578: media: grabs lock to ensure video output when occluded Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3259578 Add stub for new upstream virtual method OnCapturerCountChanged() * fixup! 3247295: Unwind SecurityStyleExplanations * 3238504: Fix up drag image is not shown from bookmark bar Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3238504 SetDragImage() no longer takes a widget argument * 3217452: [devtools] Add getSyncInformation host binding Xref: https://chromium-review.googlesource.com/c/chromium/src/+/3217452 Add stub for new upstream method GetSyncInformation(). Stub sends info back to caller saying that syncing is disabled. * chore: bump chromium in DEPS to 98.0.4693.0 * chore: bump chromium in DEPS to 98.0.4694.0 * chore: bump chromium in DEPS to 98.0.4695.0 * chore: bump chromium in DEPS to 98.0.4696.0 * chore: bump chromium in DEPS to 98.0.4697.0 * chore: bump chromium in DEPS to 98.0.4699.0 * chore: bump chromium in DEPS to 98.0.4701.0 * chore: bump chromium in DEPS to 98.0.4703.0 * chore: bump chromium in DEPS to 98.0.4705.0 * chore: bump chromium in DEPS to 98.0.4706.0 * chore: update patches * 3279210: Rename "base/macros.h" => "base/ignore_result.h" https://chromium-review.googlesource.com/c/chromium/src/+/3279210 * 3259964: Remove all DISALLOW_COPY_AND_ASSIGNs https://chromium-review.googlesource.com/c/chromium/src/+/3259964 * 3269029: blink/gin: sets histogram callbacks during isolate creation https://chromium-review.googlesource.com/c/chromium/src/+/3269029 * fixup after rebase * [content] Make ContentMainParams and MainFunctionParams move-only https://chromium-review.googlesource.com/c/chromium/src/+/3244976 * 3255305: Stop sending the securityStateChanged event and unwind https://chromium-review.googlesource.com/c/chromium/src/+/3255305 * [Blink] Add promise support to WebLocalFrame::RequestExecuteScript() https://chromium-review.googlesource.com/c/chromium/src/+/3230010 * 3256162: Simplify RWHV Show and ShowWithVisibility handling https://chromium-review.googlesource.com/c/chromium/src/+/3256162 * 3263824: ozone: //ui/base: clean up from USE_X11 1/* https://chromium-review.googlesource.com/c/chromium/src/+/3263824 * Request or cancel RecordContentToPresentationTimeRequest during capture https://chromium-review.googlesource.com/c/chromium/src/+/3256802 * appcache: remove BrowsingData/quota references https://chromium-review.googlesource.com/c/chromium/src/+/3255725 * [Autofill] Don't show Autofill dropdown if overlaps with permissions https://chromium-review.googlesource.com/c/chromium/src/+/3236729 * Rename to_different_document to should_show_loading_ui in LoadingStateChanged() callbacks https://chromium-review.googlesource.com/c/chromium/src/+/3268574 * cleanup patch * fixup [content] Make ContentMainParams and MainFunctionParams move-only * 3279210: Rename "base/macros.h" => "base/ignore_result.h" https://chromium-review.googlesource.com/c/chromium/src/+/3279210 * ozone: //chrome/browser clean up from USE_X11 https://chromium-review.googlesource.com/c/chromium/src/+/3186490 Refs: https://github.com/electron/electron/issues/31382 * chore: update support_mixed_sandbox_with_zygote.patch * Enable -Wunused-but-set-variable. Refs https://chromium-review.googlesource.com/c/chromium/src/+/3234737 * fixup! ozone: //ui/base: clean up from USE_X11 1/* * fixup! ozone: //chrome/browser clean up from USE_X11 * chore: fix deprecation warning in libuv * chore: fixup for lint * 3251161: Reland "Make the Clang update.py script require Python 3" https://chromium-review.googlesource.com/c/chromium/src/+/3251161 * fixup: Enable -Wunused-but-set-variable. * [base][win] Rename DIR_APP_DATA to DIR_ROAMING_APP_DATA https://chromium-review.googlesource.com/c/chromium/src/+/3262369 * Replace sandbox::policy::SandboxType with mojom Sandbox enum https://chromium-review.googlesource.com/c/chromium/src/+/3213677 * fixup: [content] Make ContentMainParams and MainFunctionParams move-only * build: ensure angle has a full git checkout available to it * fixup: [base][win] Rename DIR_APP_DATA to DIR_ROAMING_APP_DATA * fixup lint * [unseasoned-pdf] Dispatch 'afterprint' event in PDF plugin frame https://chromium-review.googlesource.com/c/chromium/src/+/3223434 * fixup: [Autofill] Don't show Autofill dropdown if overlaps with permissions * 3217591: Move browser UI CSS color parsing to own file part 2/2 https://chromium-review.googlesource.com/c/chromium/src/+/3217591 * Make kNoSandboxAndElevatedPrivileges only available to utilities https://chromium-review.googlesource.com/c/chromium/src/+/3276784 * 3211575: [modules] Change ScriptOrModule to custom Struct https://chromium-review.googlesource.com/c/v8/v8/+/3211575 * Address review feedback * chore: update patches * 3211575: [modules] Change ScriptOrModule to custom Struct https://chromium-review.googlesource.com/c/v8/v8/+/3211575 * fix: unused variable compat * chore: remove redundant patch * fixup for 3262517: Re-enable WindowCaptureMacV2 https://chromium-review.googlesource.com/c/chromium/src/+/3262517 * chore: cleanup todo The functions added in https://chromium-review.googlesource.com/c/chromium/src/+/3256802 are not used by offscreen rendering. * fixup: update mas_no_private_api.patch * 3216879: [PA] Make features::kPartitionAllocLazyCommit to be PartitionOptions::LazyCommit Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3216879 Fixes up commit b2f1aca95604ec61649808c846657454097e6935 * chore: cleanup support_mixed_sandbox_with_zygote.patch * test: use window focus event instead of delay to wait for webContents focus Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: VerteDinde Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr Co-authored-by: John Kleinschmidt Co-authored-by: deepak1556 Co-authored-by: Samuel Attard Co-authored-by: Shelley Vohr --- .circleci/config.yml | 16 +- BUILD.gn | 7 +- DEPS | 2 +- build/args/all.gn | 3 + chromium_src/BUILD.gn | 2 - patches/boringssl/.patches | 1 - ...nable_x509_v_flag_trusted_first_flag.patch | 20 --- patches/chromium/.patches | 1 - patches/chromium/accelerator.patch | 16 +- ...client_precreatemessageloop_callback.patch | 10 +- .../add_didinstallconditionalfeatures.patch | 30 ++-- ...tter_for_browsermainloop_result_code.patch | 26 ---- ..._scheduler_throttling_per_renderview.patch | 34 ++-- ..._windows_to_have_different_web_prefs.patch | 18 +-- ..._secondary_label_via_simplemenumodel.patch | 12 +- patches/chromium/blink_local_frame.patch | 8 +- patches/chromium/boringssl_build_gn.patch | 4 +- ...getting_string_values_for_crash_keys.patch | 4 +- ..._node_processes_as_browser_processes.patch | 2 +- .../build_add_electron_tracing_category.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 16 +- patches/chromium/build_gn.patch | 4 +- .../build_libc_as_static_library.patch | 4 +- patches/chromium/can_create_window.patch | 44 +++--- ...dows_in_cryptotoken_webrequestsender.patch | 6 +- ..._v8_initialization_isolate_callbacks.patch | 22 +-- ...screationoverridden_with_full_params.patch | 92 +++++------ ...esources_not_chrome_for_spellchecker.patch | 4 +- patches/chromium/command-ismediakey.patch | 4 +- ...allow_disabling_compression_on_linux.patch | 2 +- .../crash_allow_setting_more_options.patch | 20 +-- patches/chromium/dcheck.patch | 4 +- ...ay_lock_the_protocol_scheme_registry.patch | 16 +- patches/chromium/desktop_media_list.patch | 9 +- patches/chromium/disable-redraw-lock.patch | 12 +- .../disable_color_correct_rendering.patch | 62 ++++---- .../disable_compositor_recycling.patch | 4 +- patches/chromium/disable_hidden.patch | 12 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 14 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- patches/chromium/dump_syms.patch | 2 +- .../chromium/enable_reset_aspect_ratio.patch | 8 +- ...locator_for_usage_outside_of_the_gin.patch | 4 +- ...xpose_setuseragent_on_networkcontext.patch | 18 +-- .../extend_apply_webpreferences.patch | 6 +- ...d_data_parameter_to_processsingleton.patch | 38 ++--- .../feat_add_onclose_to_messageport.patch | 2 +- ...dd_set_theme_source_to_allow_apps_to.patch | 10 +- ..._registry_to_multibuffer_data_source.patch | 4 +- ...g_the_base_spellchecker_download_url.patch | 6 +- ...to_add_observers_on_created_hunspell.patch | 6 +- ...screen_rendering_with_viz_compositor.patch | 48 +++--- ..._raw_response_headers_from_urlloader.patch | 38 ++--- ...ix_add_check_for_sandbox_then_result.patch | 4 +- .../chromium/fix_export_zlib_symbols.patch | 2 +- ...ntcapturercount_in_web_contents_impl.patch | 24 +-- ...media_key_usage_with_globalshortcuts.patch | 4 +- ...rmissions_checks_in_exclusive_access.patch | 8 +- ...out_profile_refs_in_accessibility_ui.patch | 33 ++-- ..._properly_honor_printing_page_ranges.patch | 4 +- patches/chromium/frame_host_manager.patch | 6 +- .../gin_enable_disable_v8_platform.patch | 48 +++--- ...gpu_notify_when_dxdiag_request_fails.patch | 12 +- .../chromium/gritsettings_resource_ids.patch | 4 +- ...nse_interceptor_to_point_to_electron.patch | 6 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 4 +- patches/chromium/isolate_holder.patch | 26 ++-- .../load_v8_snapshot_in_browser_process.patch | 4 +- ...reate_a_console_if_logging_to_stderr.patch | 4 +- .../mas_disable_remote_accessibility.patch | 52 +++---- .../chromium/mas_disable_remote_layer.patch | 2 +- patches/chromium/mas_no_private_api.patch | 147 ++++++++---------- ...emote_certificate_verification_logic.patch | 22 +-- .../chromium/notification_provenance.patch | 32 ++-- patches/chromium/pepper_plugin_support.patch | 55 +++---- patches/chromium/picture-in-picture.patch | 6 +- patches/chromium/printing.patch | 65 ++++---- patches/chromium/process_singleton.patch | 56 ++++--- patches/chromium/proxy_config_monitor.patch | 6 +- ...r_changes_to_the_webcontentsobserver.patch | 42 ++--- .../render_widget_host_view_base.patch | 16 +- .../render_widget_host_view_mac.patch | 14 +- patches/chromium/resource_file_conflict.patch | 2 +- patches/chromium/scroll_bounce_flag.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 89 ++++++----- patches/chromium/ui_gtk_public_header.patch | 2 +- ...andboxed_ppapi_processes_skip_zygote.patch | 4 +- .../upload_list_add_loadsync_method.patch | 4 +- .../v8_context_snapshot_generator.patch | 16 +- patches/chromium/web_contents.patch | 12 +- patches/chromium/webview_cross_drag.patch | 17 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 20 +-- ...feat_add_hook_to_notify_script_ready.patch | 20 +-- patches/node/.patches | 1 + patches/node/build_add_gn_build_files.patch | 10 +- .../chore_fix_-wimplicit-fallthrough.patch | 4 +- ...ingssl_and_openssl_incompatibilities.patch | 10 +- ...g_-wdeprecated-declarations_in_libuv.patch | 29 ++++ patches/v8/build_gn.patch | 8 +- patches/v8/dcheck.patch | 8 +- ...export_private_v8_symbols_on_windows.patch | 4 +- ...ort_symbols_needed_for_windows_build.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- ...ed_attirbute_for_older_msvc_versions.patch | 6 +- ...workaround_an_undefined_symbol_error.patch | 8 +- shell/app/electron_library_main.mm | 4 +- shell/app/electron_main.cc | 6 +- shell/app/electron_main_delegate.cc | 10 +- shell/app/electron_main_delegate.h | 4 +- shell/app/node_main.cc | 2 +- shell/app/uv_task_runner.h | 2 +- shell/browser/api/electron_api_app.cc | 4 +- .../api/electron_api_browser_window.cc | 2 +- shell/browser/api/electron_api_net_log.cc | 2 +- shell/browser/api/electron_api_session.cc | 6 +- .../electron_api_system_preferences_mac.mm | 2 +- .../browser/api/electron_api_web_contents.cc | 33 ++-- shell/browser/api/electron_api_web_contents.h | 8 +- shell/browser/api/frame_subscriber.cc | 3 +- shell/browser/browser_mac.mm | 2 +- shell/browser/electron_browser_client.cc | 12 +- shell/browser/electron_browser_client.h | 4 +- shell/browser/electron_browser_main_parts.cc | 56 +++---- .../electron_download_manager_delegate.cc | 2 +- .../electron_javascript_dialog_manager.cc | 2 +- .../extensions/electron_extension_loader.cc | 4 +- .../electron_extension_message_filter.h | 2 +- .../electron_extensions_api_client.cc | 2 +- shell/browser/javascript_environment.cc | 27 +++- shell/browser/native_window.cc | 4 +- shell/browser/native_window_views.cc | 10 +- .../osr/osr_render_widget_host_view.cc | 54 ++++--- .../browser/osr/osr_render_widget_host_view.h | 10 +- shell/browser/osr/osr_video_consumer.cc | 3 +- shell/browser/osr/osr_web_contents_view.cc | 2 + shell/browser/osr/osr_web_contents_view.h | 1 + shell/browser/plugins/plugin_utils.h | 1 + shell/browser/ui/autofill_popup.cc | 129 ++++++++++++++- .../browser/ui/cocoa/electron_bundle_mover.mm | 2 +- shell/browser/ui/drag_util_views.cc | 5 +- shell/browser/ui/inspectable_web_contents.cc | 14 +- shell/browser/ui/inspectable_web_contents.h | 1 + shell/browser/ui/views/autofill_popup_view.cc | 2 +- shell/browser/zoom_level_delegate.cc | 6 +- shell/common/api/electron_bindings.cc | 2 +- shell/common/electron_command_line.h | 1 + shell/common/electron_paths.h | 4 +- shell/common/gin_converters/net_converter.cc | 5 +- shell/common/node_bindings.cc | 2 +- .../api/electron_api_context_bridge.cc | 2 +- shell/renderer/api/electron_api_web_frame.cc | 6 +- shell/renderer/electron_api_service_impl.cc | 2 +- .../electron_sandboxed_renderer_client.cc | 2 +- .../electron_content_utility_client.cc | 10 +- spec-main/api-browser-window-spec.ts | 4 +- spec-main/api-web-contents-spec.ts | 3 +- spec-main/chromium-spec.ts | 3 +- 159 files changed, 1216 insertions(+), 1042 deletions(-) delete mode 100644 patches/boringssl/enable_x509_v_flag_trusted_first_flag.patch delete mode 100644 patches/chromium/add_setter_for_browsermainloop_result_code.patch create mode 100644 patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch diff --git a/.circleci/config.yml b/.circleci/config.yml index 5cf46e6350069..5afe973dd51c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -447,16 +447,20 @@ step-install-npm-deps-on-mac: &step-install-npm-deps-on-mac # This step handles the differences between the linux "gclient sync" # and the expected state on macOS -step-fix-sync-on-mac: &step-fix-sync-on-mac +step-fix-sync: &step-fix-sync run: - name: Fix Sync on macOS + name: Fix Sync command: | if [ "`uname`" == "Darwin" ]; then # Fix Clang Install (wrong binary) rm -rf src/third_party/llvm-build - python src/tools/clang/scripts/update.py + python3 src/tools/clang/scripts/update.py fi + cd src/third_party/angle + git remote set-url origin https://chromium.googlesource.com/angle/angle.git + git fetch + step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac run: name: Import and trust self-signed codesigning cert on MacOS @@ -1118,7 +1122,7 @@ steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-cha - *step-setup-goma-for-build - *step-get-more-space-on-mac - *step-install-npm-deps-on-mac - - *step-fix-sync-on-mac + - *step-fix-sync - *step-gn-gen-default #Compile ts/js to verify doc change didn't break anything @@ -1473,7 +1477,7 @@ commands: - *step-setup-env-for-build - *step-setup-goma-for-build - *step-get-more-space-on-mac - - *step-fix-sync-on-mac + - *step-fix-sync - *step-delete-git-directories # Electron app @@ -1577,7 +1581,7 @@ commands: - *step-gclient-sync - *step-delete-git-directories - *step-minimize-workspace-size-from-checkout - - *step-fix-sync-on-mac + - *step-fix-sync - *step-setup-env-for-build - *step-setup-goma-for-build - *step-gn-gen-default diff --git a/BUILD.gn b/BUILD.gn index 00225e2195234..452dc4cbdc8a5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -538,14 +538,19 @@ source_set("electron_lib") { "//build/config/linux/gtk", "//dbus", "//device/bluetooth", + "//ui/base/ime/linux", "//ui/events/devices/x11", "//ui/events/platform/x11", "//ui/gtk", "//ui/views/controls/webview", "//ui/wm", ] - if (use_x11) { + if (ozone_platform_x11) { sources += filenames.lib_sources_linux_x11 + public_deps += [ + "//ui/base/x", + "//ui/platform_window/x11", + ] } configs += [ ":gio_unix" ] defines += [ diff --git a/DEPS b/DEPS index 121776f991f7d..4f4988611701d 100644 --- a/DEPS +++ b/DEPS @@ -15,7 +15,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '96.0.4664.4', + '98.0.4706.0', 'node_version': 'v16.13.0', 'nan_version': diff --git a/build/args/all.gn b/build/args/all.gn index d4875bceef838..842774e134f4d 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -11,6 +11,9 @@ v8_embedder_string = "-electron.0" # TODO: this breaks mksnapshot v8_enable_snapshot_native_code_counters = false +# TODO(codebytere): remove when Node.js handles https://chromium-review.googlesource.com/c/v8/v8/+/3211575 +v8_scriptormodule_legacy_lifetime = true + enable_cdm_host_verification = false proprietary_codecs = true ffmpeg_branding = "Chrome" diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 918173c826a7c..74e8febe3c1dd 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -69,8 +69,6 @@ static_library("chrome") { "//chrome/browser/ui/exclusive_access/keyboard_lock_controller.h", "//chrome/browser/ui/exclusive_access/mouse_lock_controller.cc", "//chrome/browser/ui/exclusive_access/mouse_lock_controller.h", - "//chrome/browser/ui/views/autofill/autofill_popup_view_utils.cc", - "//chrome/browser/ui/views/autofill/autofill_popup_view_utils.h", "//chrome/browser/ui/views/eye_dropper/eye_dropper.cc", "//chrome/browser/ui/views/eye_dropper/eye_dropper.h", "//chrome/browser/ui/views/eye_dropper/eye_dropper_view.cc", diff --git a/patches/boringssl/.patches b/patches/boringssl/.patches index 21fb526862dce..a812a6b79a6dc 100644 --- a/patches/boringssl/.patches +++ b/patches/boringssl/.patches @@ -2,4 +2,3 @@ expose_ripemd160.patch expose_aes-cfb.patch expose_des-ede3.patch fix_sync_evp_get_cipherbynid_and_evp_get_cipherbyname.patch -enable_x509_v_flag_trusted_first_flag.patch diff --git a/patches/boringssl/enable_x509_v_flag_trusted_first_flag.patch b/patches/boringssl/enable_x509_v_flag_trusted_first_flag.patch deleted file mode 100644 index 5c3c96ccb3f4e..0000000000000 --- a/patches/boringssl/enable_x509_v_flag_trusted_first_flag.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Juan Cruz Viotti -Date: Thu, 30 Sep 2021 13:39:23 -0400 -Subject: Enable X509_V_FLAG_TRUSTED_FIRST flag - -Signed-off-by: Juan Cruz Viotti - -diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c -index 5a881d64c30076404cc800fff9e943bb0b30d2ac..29d5341efc8eb7ae6f90bdde5a8032e99f75c98e 100644 ---- a/crypto/x509/x509_vpm.c -+++ b/crypto/x509/x509_vpm.c -@@ -528,7 +528,7 @@ static const X509_VERIFY_PARAM default_table[] = { - (char *)"default", /* X509 default parameters */ - 0, /* Check time */ - 0, /* internal flags */ -- 0, /* flags */ -+ X509_V_FLAG_TRUSTED_FIRST, /* flags */ - 0, /* purpose */ - 0, /* trust */ - 100, /* depth */ diff --git a/patches/chromium/.patches b/patches/chromium/.patches index d4d63d7e397cd..e28f249beeccd 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -93,7 +93,6 @@ webview_fullscreen.patch disable_unload_metrics.patch fix_add_check_for_sandbox_then_result.patch extend_apply_webpreferences.patch -add_setter_for_browsermainloop_result_code.patch make_include_of_stack_trace_h_unconditional.patch build_libc_as_static_library.patch build_do_not_depend_on_packed_resource_integrity.patch diff --git a/patches/chromium/accelerator.patch b/patches/chromium/accelerator.patch index b206327a55210..6ba88a66c47ee 100644 --- a/patches/chromium/accelerator.patch +++ b/patches/chromium/accelerator.patch @@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc 3. Ctrl-Shift-= and Ctrl-Plus show up as such diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc -index d6913b15149f773cad28b5e2278b0f80df3d2896..25342f62acdc28806a0e6ae0bd129c59083ccf06 100644 +index be0df3662e3a1528fb88d5c723da49e5a29ac2b9..64a5eda05be16b3b6e1a0ceaa2b3a6884ca37268 100644 --- a/ui/base/accelerators/accelerator.cc +++ b/ui/base/accelerators/accelerator.cc @@ -11,6 +11,7 @@ @@ -21,7 +21,7 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..25342f62acdc28806a0e6ae0bd129c59 #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" -@@ -234,6 +235,11 @@ std::u16string Accelerator::GetShortcutText() const { +@@ -238,6 +239,11 @@ std::u16string Accelerator::GetShortcutText() const { #endif if (shortcut.empty()) { @@ -33,7 +33,7 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..25342f62acdc28806a0e6ae0bd129c59 #if defined(OS_WIN) // Our fallback is to try translate the key code to a regular character // unless it is one of digits (VK_0 to VK_9). Some keyboard -@@ -257,6 +263,10 @@ std::u16string Accelerator::GetShortcutText() const { +@@ -261,6 +267,10 @@ std::u16string Accelerator::GetShortcutText() const { shortcut += static_cast(base::ToUpperASCII(c)); #endif @@ -44,7 +44,7 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..25342f62acdc28806a0e6ae0bd129c59 } #if defined(OS_MAC) -@@ -444,7 +454,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( +@@ -451,7 +461,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( const std::u16string& shortcut) const { std::u16string result = shortcut; @@ -53,7 +53,7 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..25342f62acdc28806a0e6ae0bd129c59 result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY); // Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut. -@@ -452,7 +462,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( +@@ -459,7 +469,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( // more information. if (IsCtrlDown()) result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY); @@ -63,7 +63,7 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..25342f62acdc28806a0e6ae0bd129c59 if (IsCmdDown()) { diff --git a/ui/base/accelerators/accelerator.h b/ui/base/accelerators/accelerator.h -index 780a45f9ca2dd60e0deac27cc6e8f69e72cd8435..b1b46f18e9c600820fdd2d26631eac38da672811 100644 +index 5cdb2f160beae4d7787eb84d5013280ee9464446..76bd4369faa5d43d8a99ea51ed012857d6bff293 100644 --- a/ui/base/accelerators/accelerator.h +++ b/ui/base/accelerators/accelerator.h @@ -16,6 +16,7 @@ @@ -74,12 +74,12 @@ index 780a45f9ca2dd60e0deac27cc6e8f69e72cd8435..b1b46f18e9c600820fdd2d26631eac38 #include "base/time/time.h" #include "build/build_config.h" #include "ui/events/event_constants.h" -@@ -129,6 +130,8 @@ class COMPONENT_EXPORT(UI_BASE) Accelerator { +@@ -130,6 +131,8 @@ class COMPONENT_EXPORT(UI_BASE) Accelerator { return interrupted_by_mouse_event_; } + absl::optional shifted_char; + private: + friend class AcceleratorTestMac; std::u16string ApplyLongFormModifiers(const std::u16string& shortcut) const; - std::u16string ApplyShortFormModifiers(const std::u16string& shortcut) const; diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index dbd0805a52d4d..911fc38a6c801 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.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 51b004f5e459eb265627c01e9e38acd655a65481..7140d92416709c467ae9b65860ac32947913989d 100644 +index a28a1fe24ac95191fa2f88d7df388b6ea7885d57..988ab894b756147ddae072c4d11c5d8d07b46563 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -239,6 +239,10 @@ int GpuMain(const MainFunctionParams& parameters) { +@@ -236,6 +236,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,8 +24,8 @@ index 51b004f5e459eb265627c01e9e38acd655a65481..7140d92416709c467ae9b65860ac3294 // 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 -@@ -376,7 +380,6 @@ int GpuMain(const MainFunctionParams& parameters) { - } +@@ -342,7 +346,6 @@ int GpuMain(MainFunctionParams parameters) { + GpuProcess gpu_process(io_thread_priority); #endif - auto* client = GetContentClient()->gpu(); @@ -33,7 +33,7 @@ index 51b004f5e459eb265627c01e9e38acd655a65481..7140d92416709c467ae9b65860ac3294 client->PostIOThreadCreated(gpu_process.io_task_runner()); diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h -index 864ad090cae17f6a93466f9d2ca52b63341f40da..391848e407f6bfcb7ba8f8a652bb062ebd16e697 100644 +index cb7774f89cb0a5537630208dc784c63a4b5a6f34..9baf51f1c5bfcd809d3bba47f96c2772158a51ac 100644 --- a/content/public/gpu/content_gpu_client.h +++ b/content/public/gpu/content_gpu_client.h @@ -28,6 +28,10 @@ class CONTENT_EXPORT ContentGpuClient { diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index f4fe781fda564..92d15821a3ea8 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the context, which can cause some preload scripts to trip. diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index 94fbf201b82ac000ceac21685f09f68497be1350..70766b01824e63c45e5c035848e5814876956c77 100644 +index 316b6730c255e5fafb7fb86ee4f780a28368d771..9601b3b9c5d5da9c9051aa234d2eaa932ef983ee 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h -@@ -128,6 +128,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, +@@ -130,6 +130,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, virtual void DidHandleOnloadEvents() {} virtual void DidCreateScriptContext(v8::Local context, int32_t world_id) {} @@ -23,10 +23,10 @@ index 94fbf201b82ac000ceac21685f09f68497be1350..70766b01824e63c45e5c035848e58148 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 78ec20c40e5dbf7f706b57d9b810b4149510defc..900b8125f3fc6dcec4a1637fae6fcb2af40af5ab 100644 +index 454b8a57e6654a07c5ba4798c21a2792730a4de5..b517bd4337fcda3b167388962657344388f0b74d 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4442,6 +4442,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4499,6 +4499,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index 78ec20c40e5dbf7f706b57d9b810b4149510defc..900b8125f3fc6dcec4a1637fae6fcb2a int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 5f89641216bc467ea52619b1732c13174a16c723..061fc0c4a265335faccbf81594504eafabae77f8 100644 +index ed716709fbee0e81af2f9ad19c7bcce021c65926..ee3d1865aebc2c11400e72534322818319ee900d 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -601,6 +601,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -600,6 +600,8 @@ class CONTENT_EXPORT RenderFrameImpl blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -67,10 +67,10 @@ index 994841c02b0472e5239d9b73a07b2592a39df8be..ad19a3cddf200f6600a04c1136fd2121 virtual void WillReleaseScriptContext(v8::Local, int32_t world_id) {} diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -index b0d5db60fbe57275dda835113b0fb21acb9a422f..b6c9c389943088004a419677a2a17be0c6ab6398 100644 +index c53d1af1946d9caefc3682c5caff3b6ccb2a0804..91b908d884d65767b9fc54e6711590edff952bcd 100644 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -@@ -201,6 +201,7 @@ void LocalWindowProxy::Initialize() { +@@ -213,6 +213,7 @@ void LocalWindowProxy::Initialize() { } InstallConditionalFeatures(); @@ -79,10 +79,10 @@ index b0d5db60fbe57275dda835113b0fb21acb9a422f..b6c9c389943088004a419677a2a17be0 if (World().IsMainWorld()) { GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld(); diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index 19a1ef792848026cb6a125124acd9e798e077e35..bb8220819750a6499568b64b49ca7710035d6092 100644 +index c28bc5f4d285ab2db1b0501ad8663c4f948f3ddc..327c04b40460fc033ca7f4e4f838608cfc6c0ba3 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -310,6 +310,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -311,6 +311,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,10 +92,10 @@ index 19a1ef792848026cb6a125124acd9e798e077e35..bb8220819750a6499568b64b49ca7710 int32_t world_id) = 0; virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index 4b1bfb735082513071181f30e8e8af1b699847b1..21f6a54f0255df0d88894860da83b1459c3a378f 100644 +index a07cd4deeb88c768f27844feafaaa56b2f0e2692..aef718592fdf298493e8e52950f0858a8666bd1c 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -@@ -273,6 +273,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( +@@ -274,6 +274,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( web_frame_->Client()->DidCreateScriptContext(context, world_id); } @@ -110,7 +110,7 @@ index 4b1bfb735082513071181f30e8e8af1b699847b1..21f6a54f0255df0d88894860da83b145 v8::Local context, int32_t world_id) { diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -index 45d493d7a9846c7f4ad567cec6d5fac4aadf9be3..23759d417d81d5bb6c920c94bacd66c303804319 100644 +index 5c89861a1e3e37b3b54d73e4b6ec1c2b34c491b2..a566fc7156c8440c5a3337103db4120b62fff5dd 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h @@ -78,6 +78,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index 45d493d7a9846c7f4ad567cec6d5fac4aadf9be3..23759d417d81d5bb6c920c94bacd66c3 int32_t world_id) override; diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index 0a4a0b8a4dc871dc86887774a6c81282ea98cda6..ab6ada68a78aa22e723080925d20cf14e8fe822a 100644 +index 9ec5c2d4be13572e4060c03a822cb792329e1c94..b9c8c4f3b7d4c98cf6411c4bbb9ef96f3db55328 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -360,6 +360,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -356,6 +356,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/add_setter_for_browsermainloop_result_code.patch b/patches/chromium/add_setter_for_browsermainloop_result_code.patch deleted file mode 100644 index 8cf7569b8c3f1..0000000000000 --- a/patches/chromium/add_setter_for_browsermainloop_result_code.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Wed, 14 Apr 2021 17:19:23 -0700 -Subject: add setter for BrowserMainLoop::result_code_ - -After a recent refactor -(https://chromium-review.googlesource.com/c/chromium/src/+/2725153) the -result_code_ pointer is no longer provided to embedders, but their are -valid use cases for setting custom exit codes of the main loop. This -exposes a simple setter that embedders can call. - -diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h -index 2c13914c1fbf8b81b6b0dc5d059d48525ac9f059..1c6179a00f404cc8d19e47b2e1bb635a6893e751 100644 ---- a/content/browser/browser_main_loop.h -+++ b/content/browser/browser_main_loop.h -@@ -165,6 +165,10 @@ class CONTENT_EXPORT BrowserMainLoop { - - int GetResultCode() const { return result_code_; } - -+ void SetResultCode(int code) { -+ result_code_ = code; -+ } -+ - media::AudioManager* audio_manager() const; - bool AudioServiceOutOfProcess() const; - media::AudioSystem* audio_system() const { return audio_system_.get(); } diff --git a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch index fc9cfe5c1e87e..11c959e0f7a9e 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 21cbb423d083a985b288c0b040cdd8ae7df56222..ca83e01e82bd55b2c7aaee2361493776b458ebac 100644 +index 621a961ba0d44394782d62c921904fed32ddf8a4..58e9d84c2260e7469c8e1c166edfef22de5931a1 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -630,6 +630,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -633,6 +633,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -22,7 +22,7 @@ index 21cbb423d083a985b288c0b040cdd8ae7df56222..ca83e01e82bd55b2c7aaee2361493776 return is_active(); } diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h -index 9760b7657584b81558a7dbba03258baaee2471fd..53cf6282bfe5a1f1b98a001e1aa82eb45fcb2252 100644 +index ea72307c8ac24f7a32b0345c7fd94527efd67942..f1b2ba8682ec189f0b924eaa9cfa17fb28124fc1 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h @@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl @@ -34,10 +34,10 @@ index 9760b7657584b81558a7dbba03258baaee2471fd..53cf6282bfe5a1f1b98a001e1aa82eb4 void SendRendererPreferencesToRenderer( const blink::RendererPreferences& preferences); diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h -index 8bb06dec16fbf205230a10e0e52daa787338bc23..9ebc42788391e838e78af75e2449dde4f1107f22 100644 +index 787077d71c04d571aa825bec0a549c5fad2b8574..4b05b80802ba97a46eed60e509b503fc8375016b 100644 --- a/content/public/browser/render_view_host.h +++ b/content/public/browser/render_view_host.h -@@ -84,6 +84,9 @@ class CONTENT_EXPORT RenderViewHost { +@@ -74,6 +74,9 @@ class CONTENT_EXPORT RenderViewHost { // Write a representation of this object into a trace. virtual void WriteIntoTrace(perfetto::TracedValue context) = 0; @@ -48,10 +48,10 @@ index 8bb06dec16fbf205230a10e0e52daa787338bc23..9ebc42788391e838e78af75e2449dde4 // This interface should only be implemented inside content. friend class RenderViewHostImpl; diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h -index 604edaea033172123d1e7d9c5512bebf55738db5..93b06e71dae1b9c01463c8b26b74516bad7d5b6d 100644 +index 975757f5e878004180f155583712ad48de781ef6..3dad0b314f0d4e7f93e8b727f2ef875ce9d4762e 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h -@@ -150,6 +150,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, +@@ -152,6 +152,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, static WindowOpenDisposition NavigationPolicyToDisposition( blink::WebNavigationPolicy policy); @@ -61,10 +61,10 @@ index 604edaea033172123d1e7d9c5512bebf55738db5..93b06e71dae1b9c01463c8b26b74516b // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put // it in the same order in the .cc file as it was in the header. diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom -index df834821bd082b92a9b4bd0858d900f554469afe..1e3b281eab8de5d3ab46a01d520737ecc477c3ff 100644 +index b7c6ba65551acd31c96be06c3d7595f28b6855b0..21ce5fe263f8a47281b21c45c7bda9eff1cb17b5 100644 --- a/third_party/blink/public/mojom/page/page.mojom +++ b/third_party/blink/public/mojom/page/page.mojom -@@ -91,4 +91,7 @@ interface PageBroadcast { +@@ -97,4 +97,7 @@ interface PageBroadcast { // Sent to whole page, but should only be used by the main frame. SetPageBaseBackgroundColor(skia.mojom.SkColor? color); @@ -73,10 +73,10 @@ index df834821bd082b92a9b4bd0858d900f554469afe..1e3b281eab8de5d3ab46a01d520737ec + SetSchedulerThrottling(bool allowed); }; diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h -index f54b993e9fb9fedcedef327290c2e5d706c699a7..73874e124e2810f07b72fc094f57c85c0fcf1dbb 100644 +index a0f9f0be545f7511a8d1e9536eda3c5b3a10a1d9..66ae09f0965bd4470284124f92e18b490973f737 100644 --- a/third_party/blink/public/web/web_view.h +++ b/third_party/blink/public/web/web_view.h -@@ -366,6 +366,7 @@ class WebView { +@@ -368,6 +368,7 @@ class WebView { // Scheduling ----------------------------------------------------------- virtual PageScheduler* Scheduler() const = 0; @@ -85,10 +85,10 @@ index f54b993e9fb9fedcedef327290c2e5d706c699a7..73874e124e2810f07b72fc094f57c85c // Visibility ----------------------------------------------------------- diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 44474a8e56c5f1751e395f375cedb39656f6d5a8..baf07861d4be89485605f87d344fcffdd220a063 100644 +index 72ec80d7ccd7581b82a461cebca2892519c440a1..dcc985cf532f098ff5aeb649a30db314030c5a02 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3630,6 +3630,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3661,6 +3661,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 44474a8e56c5f1751e395f375cedb39656f6d5a8..baf07861d4be89485605f87d344fcffd void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3641,7 +3648,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3672,7 +3679,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,10 +113,10 @@ index 44474a8e56c5f1751e395f375cedb39656f6d5a8..baf07861d4be89485605f87d344fcffd mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() { diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index 293e146acb0257a80d41eecf0794b7f08aa0ffc4..c1c88c9349d3882f3896fa1ed715433d9cf19429 100644 +index 46bd70aa401cfae46321bae47f89a3ea6a75bac3..633f7a1d623e94c05dcc29e569c32a37aeb64b84 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h -@@ -417,6 +417,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -418,6 +418,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, LocalDOMWindow* PagePopupWindow() const; PageScheduler* Scheduler() const override; @@ -124,7 +124,7 @@ index 293e146acb0257a80d41eecf0794b7f08aa0ffc4..c1c88c9349d3882f3896fa1ed715433d void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -848,6 +849,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -854,6 +855,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // If true, we send IPC messages when |preferred_size_| changes. bool send_preferred_size_changes_ = false; diff --git a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch index 421ed319fac50..3963d32c0b057 100644 --- a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch +++ b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch @@ -8,7 +8,7 @@ WebPreferences of in-process child windows, rather than relying on process-level command line switches, as before. diff --git a/third_party/blink/common/web_preferences/web_preferences.cc b/third_party/blink/common/web_preferences/web_preferences.cc -index 8eb1bca3638678041a8ed739cfe3907406455ac2..0d05d32420590a1a589f23aa468086f142cbb45f 100644 +index db2d0536ed7a8143a60cebf1c5d7fee1acf4d10d..6cea8d7ce6ff75ae80a4db03c25f913915624342 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc @@ -145,6 +145,22 @@ WebPreferences::WebPreferences() @@ -35,7 +35,7 @@ index 8eb1bca3638678041a8ed739cfe3907406455ac2..0d05d32420590a1a589f23aa468086f1 accelerated_video_decode_enabled(false), animation_policy( diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -index a264ef99beb81dd6b1f55c1b0f57f6055b4ab771..16b734cb371d22dbe99b4ae397126f240b9f686c 100644 +index e9f2e215ee1220c66549112982df04201c68fe1a..a8e08adfdeaf3acde4d190766b65ad3fbacfdf58 100644 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc @@ -23,6 +23,10 @@ bool StructTraitslazy_frame_loading_distance_thresholds_px) || !data.ReadLazyImageLoadingDistanceThresholdsPx( -@@ -156,6 +160,21 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); @@ -72,7 +72,7 @@ index a264ef99beb81dd6b1f55c1b0f57f6055b4ab771..16b734cb371d22dbe99b4ae397126f24 out->accelerated_video_decode_enabled = data.accelerated_video_decode_enabled(); diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h -index 4517bf43c1b80f1aa0f3ba8e67e78b8b91e19f8a..5dc73459f424ad0a01b4ea18e4de196e20d24ae5 100644 +index 0d74719b2f8fb91f094772fab96a880cc8787c77..bc447e53a87852aac03fd2487b77aa1009472d36 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -10,6 +10,7 @@ @@ -83,7 +83,7 @@ index 4517bf43c1b80f1aa0f3ba8e67e78b8b91e19f8a..5dc73459f424ad0a01b4ea18e4de196e #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" #include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h" -@@ -162,6 +163,24 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -163,6 +164,24 @@ struct BLINK_COMMON_EXPORT WebPreferences { blink::mojom::V8CacheOptions v8_cache_options; bool record_whole_document; @@ -109,7 +109,7 @@ index 4517bf43c1b80f1aa0f3ba8e67e78b8b91e19f8a..5dc73459f424ad0a01b4ea18e4de196e // only controls whether or not the "document.cookie" field is properly // connected to the backing store, for instance if you wanted to be able to diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -index 9dbbb581a8876430c3e0a39df1ff655d3ddc6d2d..98c5c4ac5ee3130581c8576e5ef810a78939f50e 100644 +index e0084598921ddcb0cf2aeb33875f05da0b5457e9..90bf73d7a1f2daf921f5a0ae9e4b3c292efaaaa0 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h @@ -6,6 +6,7 @@ @@ -120,7 +120,7 @@ index 9dbbb581a8876430c3e0a39df1ff655d3ddc6d2d..98c5c4ac5ee3130581c8576e5ef810a7 #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -451,6 +452,68 @@ struct BLINK_COMMON_EXPORT StructTraitsDetached(type); diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index cc3b5af94302c43f1eca0bcb3b765befcea7d300..c6507f83c1d11f09967a6186e895bc86c6f01a61 100644 +index f793047b910ea2509832bd3ea9f305fc637890ce..6b110a7b4b2e4db596fe9cd6777a372760180fc2 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -578,10 +578,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -582,10 +582,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index cc3b5af94302c43f1eca0bcb3b765befcea7d300..c6507f83c1d11f09967a6186e895bc86 if (!Client()) return false; -@@ -628,6 +624,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -635,6 +631,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/boringssl_build_gn.patch b/patches/chromium/boringssl_build_gn.patch index 87106fad5b1fb..62338330e98d4 100644 --- a/patches/chromium/boringssl_build_gn.patch +++ b/patches/chromium/boringssl_build_gn.patch @@ -6,10 +6,10 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index 23c167f1178705cedb0e309f5017052bbed1e089..feb8013545b5ee11f57d91cf942fb5cc7147e8f7 100644 +index 68654482b9133cfd6e1e8b94fb5781f62fd44145..81f8bb74fae4d4f039dd41980bf2549c2b667aee 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn -@@ -40,6 +40,19 @@ config("no_asm_config") { +@@ -47,6 +47,19 @@ config("no_asm_config") { all_sources = crypto_sources + ssl_sources all_headers = crypto_headers + ssl_headers diff --git a/patches/chromium/breakpad_allow_getting_string_values_for_crash_keys.patch b/patches/chromium/breakpad_allow_getting_string_values_for_crash_keys.patch index 55fd6d998adec..4b8dfd72d7f37 100644 --- a/patches/chromium/breakpad_allow_getting_string_values_for_crash_keys.patch +++ b/patches/chromium/breakpad_allow_getting_string_values_for_crash_keys.patch @@ -13,10 +13,10 @@ on linux. If removing this patch doesn't cause a compile failure, it's fine to delete! diff --git a/components/crash/core/common/crash_key.h b/components/crash/core/common/crash_key.h -index e3509027cab01f74d92b339f7b880d3f42aabe64..bf1d6a5691c292d0814ceb80eee01d847d8db87c 100644 +index 317352550f3bd4a154715046a4a16322f9e71054..906784e5eb8040677b45f6664af6fbed14780285 100644 --- a/components/crash/core/common/crash_key.h +++ b/components/crash/core/common/crash_key.h -@@ -219,6 +219,10 @@ class CrashKeyStringCombined : public internal::CrashKeyStringCombinedImpl { +@@ -218,6 +218,10 @@ class CrashKeyStringCombined : public internal::CrashKeyStringCombinedImpl { crashpad_key_.Set(value); } diff --git a/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch b/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch index 35e2a141330de..d86fd3e45eca1 100644 --- a/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch +++ b/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch @@ -10,7 +10,7 @@ breakpad independently, as a "browser" process. This patches crash annotation. diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index b1392d74ca4ff08f6e293a72d1d453baa5f91cbc..003702f4f0b1ddab26dee9a6154297fc0204b716 100644 +index f55fd1c92770de6b8bce1fc46a047c79228d451e..5b308900ae8e9d49d711a1638e40c22d1d45af80 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -718,8 +718,13 @@ bool CrashDone(const MinidumpDescriptor& minidump, diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 6447bea0cd053..96be2ad1e190d 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index 60bba6a85d393ddb19e954503c663b06244ad160..ca5169408a8daed7c798a0354a1cd9a6df217ce0 100644 +index f6f346bbc56d4a1f8693330b010fd4b3c2d28628..981eaef314d8ff0301e8d008927d02fc8a12ae54 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -77,6 +77,7 @@ diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index 81176e8876df2..d27ec169d5e4b 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -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 5a35396df314ab547990a53c90ebb75d337bcc77..537d746e8828089e88a8d42e86d482ee00b46e6b 100644 +index fd0b9634796e782c873b5fcb97c84ab52f19cf98..73450e005e068a74559caedb407422f4dfdf5010 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -171,11 +171,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 5a35396df314ab547990a53c90ebb75d337bcc77..537d746e8828089e88a8d42e86d482ee "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 37e8fdf8adb078c07e561b5e8cef4051ae4cc75f..ee501be37ff597fee5e060c4bebdf0bd6d3e1ae6 100644 +index ed472a9ef8116c028d0e54413ac0ef256ceaeddc..323a8110255583d351c34a3085f94c93d25b1f13 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4471,7 +4471,7 @@ static_library("browser") { +@@ -4500,7 +4500,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. @@ -46,10 +46,10 @@ index 37e8fdf8adb078c07e561b5e8cef4051ae4cc75f..ee501be37ff597fee5e060c4bebdf0bd } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 335c7d208a563870058d6c260f50c12d80d8d66f..4573f9298c9e32a6805b425e12d60823cf020527 100644 +index a1f91069b5ac79c28a5c518b1a0deac594ba9e4d..78c7e857b41aef954035e9f34137f6f50a8098b5 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5494,7 +5494,6 @@ test("unit_tests") { +@@ -5572,7 +5572,6 @@ test("unit_tests") { assert(toolkit_views) sources += [ "../browser/ui/startup/credential_provider_signin_info_fetcher_win_unittest.cc" ] deps += [ @@ -57,7 +57,7 @@ index 335c7d208a563870058d6c260f50c12d80d8d66f..4573f9298c9e32a6805b425e12d60823 "//chrome/browser:chrome_process_finder", "//chrome/browser/safe_browsing/chrome_cleaner", "//chrome/browser/safe_browsing/chrome_cleaner:public", -@@ -5507,6 +5506,12 @@ test("unit_tests") { +@@ -5585,6 +5584,12 @@ test("unit_tests") { "//components/chrome_cleaner/public/proto", "//ui/events/devices:test_support", ] @@ -70,7 +70,7 @@ index 335c7d208a563870058d6c260f50c12d80d8d66f..4573f9298c9e32a6805b425e12d60823 } # TODO(crbug.com/931218): Ninja cannot handle certain characters appearing -@@ -6104,7 +6109,6 @@ test("unit_tests") { +@@ -6172,7 +6177,6 @@ test("unit_tests") { } deps += [ @@ -78,7 +78,7 @@ index 335c7d208a563870058d6c260f50c12d80d8d66f..4573f9298c9e32a6805b425e12d60823 "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6144,6 +6148,9 @@ test("unit_tests") { +@@ -6213,6 +6217,9 @@ test("unit_tests") { "//ui/native_theme:test_support", "//ui/webui/resources/js/browser_command:mojo_bindings", ] diff --git a/patches/chromium/build_gn.patch b/patches/chromium/build_gn.patch index ee78c116ae23a..9d7ba8d34a8c9 100644 --- a/patches/chromium/build_gn.patch +++ b/patches/chromium/build_gn.patch @@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will rebuild the entire tree. diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 62e7e4bcd3e6c1ef49e3c929af7ac4634a1e6e2b..4edb4b27d985f6cd836832cde49346089ebe579e 100644 +index 034999175e30316e488404aa5392f38792d8bdde..6318596aadee7e0640692381e9e15372b9f07c1d 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { @@ -27,7 +27,7 @@ index 62e7e4bcd3e6c1ef49e3c929af7ac4634a1e6e2b..4edb4b27d985f6cd836832cde4934608 # Set to enable the official build level of optimization. This has nothing # to do with branding, but enables an additional level of optimization above # release (!is_debug). This might be better expressed as a tri-state -@@ -337,6 +340,7 @@ default_compiler_configs = [ +@@ -346,6 +349,7 @@ default_compiler_configs = [ "//build/config/compiler/pgo:default_pgo_flags", "//build/config/coverage:default_coverage", "//build/config/sanitizers:default_sanitizer_flags", diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index e163760fe3c41..59b6758160174 100644 --- a/patches/chromium/build_libc_as_static_library.patch +++ b/patches/chromium/build_libc_as_static_library.patch @@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass nan tests diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn -index 01d122aa78f15e0c94b1ee8ae54e08dace0aca0d..5ed9952afd4f4331c98ad41b7d79936794056ce8 100644 +index 48f0bdb17e0a35f6e4d6fa236cd6077910ac76c6..5c95b14441c5604bc14418e4bbaf3df877652b2a 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn @@ -41,7 +41,11 @@ config("winver") { @@ -32,7 +32,7 @@ index 01d122aa78f15e0c94b1ee8ae54e08dace0aca0d..5ed9952afd4f4331c98ad41b7d799367 ] if (is_linux && !is_chromeos) { diff --git a/buildtools/third_party/libc++abi/BUILD.gn b/buildtools/third_party/libc++abi/BUILD.gn -index b70deeb9c8ff34f31cbe3b3c33802605af62f726..4879f27427b53065ad44f46423c1f4cd164358d0 100644 +index 1b0bea340d6e8aec153add6f184e382172916f8b..f5a8193e6b72f4cc039b95783be7d254b93911d8 100644 --- a/buildtools/third_party/libc++abi/BUILD.gn +++ b/buildtools/third_party/libc++abi/BUILD.gn @@ -4,7 +4,7 @@ diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index ad742185d420a..90142a61b7a38 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -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 6520b9b7e90aa7a5e007b592294c761ed416e8d8..1c7df171237f441ae13a8b8b0d681d496ee0cc8a 100644 +index 8bd530c3cbd735661e9227b28ed223dece073733..fca309296af6f470882b57ae75d9b410c9ef9f12 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6497,6 +6497,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6565,6 +6565,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,10 +21,10 @@ index 6520b9b7e90aa7a5e007b592294c761ed416e8d8..1c7df171237f441ae13a8b8b0d681d49 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index e7e2e3d3163bbd4ab865ae674f450465f9e84ec3..12ac864159be77519ce6f6dc69941fe1fbdd9c35 100644 +index 435dc1aceda15f0df94db6e53d5bdb1e271574da..48565d6590787f8370fdfacadf15fd024f69c906 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3749,6 +3749,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3838,6 +3838,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -39,7 +39,7 @@ index e7e2e3d3163bbd4ab865ae674f450465f9e84ec3..12ac864159be77519ce6f6dc69941fe1 new_contents_impl->GetController().SetSessionStorageNamespace( partition_id, session_storage_namespace); -@@ -3791,12 +3799,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3880,12 +3888,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,7 +53,7 @@ index e7e2e3d3163bbd4ab865ae674f450465f9e84ec3..12ac864159be77519ce6f6dc69941fe1 new_contents_impl, opener, params.target_url, params.referrer.To(), params.disposition, diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index 268a2395423ebcd1eded3d8ead5f7775cd5895be..c0cad20dc8273576dea2a9f3fe0c67be101a2193 100644 +index afd57b6d28f8280d8b140370a36d9ca6ec17b774..da44b637ee5fdf371974f322aaf1a07ba8c018d7 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -550,6 +550,10 @@ struct CreateNewWindowParams { @@ -68,10 +68,10 @@ index 268a2395423ebcd1eded3d8ead5f7775cd5895be..c0cad20dc8273576dea2a9f3fe0c67be // 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 248a90c7682001296d623eb80e925f03360a5510..bd15404a10db2f4641763da260a84bb76d3739ab 100644 +index d2b11abc31df2e422a2bdfc0e95edeab42edbe7f..b7ae982c2d6d89e18f238e0e7fc789a38fc641cf 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -569,6 +569,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -565,6 +565,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index 248a90c7682001296d623eb80e925f03360a5510..bd15404a10db2f4641763da260a84bb7 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 7dfc30f346a9420be631c466ffa2d8b8adabf556..f0e2a061bb35fd3db26c7d235e1196273036925f 100644 +index a2d3182cdc1c06cbe59bbcb68240ac4b0f6ebe17..a1da3d41be9131d1d2ddd0e737aaca7055d71af0 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -168,6 +168,7 @@ class NetworkService; +@@ -169,6 +169,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index 7dfc30f346a9420be631c466ffa2d8b8adabf556..f0e2a061bb35fd3db26c7d235e119627 } // namespace network namespace sandbox { -@@ -936,6 +937,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -933,6 +934,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -102,10 +102,10 @@ index 7dfc30f346a9420be631c466ffa2d8b8adabf556..f0e2a061bb35fd3db26c7d235e119627 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 4a57554c9e540516af83567183a34384ac722ebf..31c73efb73bb69076abd6b9c4f139072a9f7f603 100644 +index 894000be94f47c050bf43d61d9a3de5284e315e4..ee9180697d569900ec9d7eb1143903c0268cb1e8 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc -@@ -28,6 +28,17 @@ namespace content { +@@ -27,6 +27,17 @@ namespace content { WebContentsDelegate::WebContentsDelegate() = default; @@ -124,7 +124,7 @@ index 4a57554c9e540516af83567183a34384ac722ebf..31c73efb73bb69076abd6b9c4f139072 const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index a0da74d5cbe4ab8be84d6f1a92f444e858320745..5936fa4bce09895595ccb294504f5b89c967d8c0 100644 +index 177bc1230a1aebd367dca42e92b63fb8be482805..f82d5c524ebf331c37280f0a93a5d3dc292236eb 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -135,7 +135,7 @@ index a0da74d5cbe4ab8be84d6f1a92f444e858320745..5936fa4bce09895595ccb294504f5b89 #include "content/public/browser/eye_dropper.h" #include "content/public/browser/invalidate_type.h" #include "content/public/browser/media_stream_request.h" -@@ -335,6 +336,13 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -344,6 +345,13 @@ class CONTENT_EXPORT WebContentsDelegate { const StoragePartitionId& partition_id, SessionStorageNamespace* session_storage_namespace); @@ -150,7 +150,7 @@ index a0da74d5cbe4ab8be84d6f1a92f444e858320745..5936fa4bce09895595ccb294504f5b89 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index ea22a86dc1a6e5cdb3e3dfa31a929a3dd14b9e61..215b059bb2dfcead6c709c99b39578f8e2216d93 100644 +index 9eb0bc6d5460f640dc95cc170c9808b8e3f5fb16..190b517cea51bd3eae29695ba45efb22c4c82877 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -31,6 +31,7 @@ @@ -161,7 +161,7 @@ index ea22a86dc1a6e5cdb3e3dfa31a929a3dd14b9e61..215b059bb2dfcead6c709c99b39578f8 #include "third_party/blink/public/web/modules/mediastream/web_media_stream_device_observer.h" #include "third_party/blink/public/web/web_frame_widget.h" #include "third_party/blink/public/web/web_local_frame.h" -@@ -289,6 +290,10 @@ WebView* RenderViewImpl::CreateView( +@@ -290,6 +291,10 @@ WebView* RenderViewImpl::CreateView( params->impression = blink::ConvertWebImpressionToImpression(*impression); } @@ -173,10 +173,10 @@ index ea22a86dc1a6e5cdb3e3dfa31a929a3dd14b9e61..215b059bb2dfcead6c709c99b39578f8 /*is_opener_navigation=*/false, request.HasUserGesture(), // `openee_can_access_opener_origin` only matters for opener navigations, 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 520b6f8146361cf8c00079c1cc0f5394f747d405..77f58cc157229eb01ce9a35aa5814f64d6e8f2f2 100644 +index 99d4577526d64e4a73591be4b5bb4d67826abb1a..213db9dc65d10d70b6e02ee3b9b95d38bd951ba3 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc -@@ -438,6 +438,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( +@@ -439,6 +439,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -186,7 +186,7 @@ index 520b6f8146361cf8c00079c1cc0f5394f747d405..77f58cc157229eb01ce9a35aa5814f64 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 1580bd13ea123740dc7a8813680a8d2448d49969..5c0809733b366ecff02c5a4b77dac9530eb15fbf 100644 +index 76254db8ed262aa105eb9782c533fe6b25324828..3e757eb86ab685901dedde45f21b818438ec4827 100644 --- a/content/web_test/browser/web_test_content_browser_client.h +++ b/content/web_test/browser/web_test_content_browser_client.h @@ -80,6 +80,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient { @@ -220,10 +220,10 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc } // 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 1cab0b95a9f828791188ca6ad3adb416f864e008..f8ec60fae8eabda4019dd9f6903bfcbf00d423ce 100644 +index 22921b47b10cc9eba71a617f1c37a3b1d1a1de65..7be213ab2a2f23dca7477963aafc666396512e04 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2030,6 +2030,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2039,6 +2039,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, incumbent_window); diff --git a/patches/chromium/chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch b/patches/chromium/chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch index a26f886be4bff..a1ba014a796d3 100644 --- a/patches/chromium/chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch +++ b/patches/chromium/chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch @@ -10,10 +10,10 @@ In Electron that can be simplified to webContents.isFocused() which maps to "is This can't be upstreamed but the patch is minimal. diff --git a/chrome/browser/resources/cryptotoken/webrequestsender.js b/chrome/browser/resources/cryptotoken/webrequestsender.js -index 734abbbf3132d245c2c39bbe9b7780acbea196b0..adff416286eaa10a099be83aaf07e56ec323fe3d 100644 +index 67385e25a9233ce7a5077e69e9be1f457252ea5d..3e6864e6ea3374874598a0175746451126ddb165 100644 --- a/chrome/browser/resources/cryptotoken/webrequestsender.js +++ b/chrome/browser/resources/cryptotoken/webrequestsender.js -@@ -134,10 +134,11 @@ function tabInForeground(tabId) { +@@ -141,10 +141,11 @@ function tabInForeground(tabId) { reject(); return; } @@ -29,7 +29,7 @@ index 734abbbf3132d245c2c39bbe9b7780acbea196b0..adff416286eaa10a099be83aaf07e56e chrome.tabs.get(tabId, function(tab) { if (chrome.runtime.lastError) { resolve(false); -@@ -147,9 +148,13 @@ function tabInForeground(tabId) { +@@ -154,9 +155,13 @@ function tabInForeground(tabId) { resolve(false); return; } diff --git a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch index 27f4e02d9a0c0..e0f865ed53039 100644 --- a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch +++ b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch @@ -9,27 +9,31 @@ we're running with contextIsolation enabled, we should be falling back to Blink's logic. This will be upstreamed in some form. 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 1b86dcca8af204416796134938f2c9a448cca8d7..f6ea363c33a0586d427cae208690d6e3b4259fd5 100644 +index 5add377ff9db79829387d875d13ddc3c7668e8e5..d8ba2aff2c930d7aa8124d83ed73fe32e7a8a210 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -448,7 +448,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, +@@ -454,8 +454,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, return {true, std::move(stringified_source)}; } --static bool WasmCodeGenerationCheckCallbackInMainThread( +-bool V8Initializer::WasmCodeGenerationCheckCallbackInMainThread(v8::Local context, +- v8::Local source) { +bool V8Initializer::WasmCodeGenerationCheckCallbackInMainThread( - v8::Local context, - v8::Local source) { ++ v8::Local context, ++ v8::Local source) { if (ExecutionContext* execution_context = ToExecutionContext(context)) { + if (ContentSecurityPolicy* policy = + execution_context->GetContentSecurityPolicy()) { diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.h b/third_party/blink/renderer/bindings/core/v8/v8_initializer.h -index e7cbc5db7d15aa0fcfb37ba261673b973827296a..6b93aa449a005e06862a99ea0c9b751ffff2d6ec 100644 +index 932c6aad3df51dd6790e55bf708703767843dc5e..6865fd33e62f766c5a162ded8627c332bf2ed173 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.h +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.h -@@ -67,6 +67,9 @@ class CORE_EXPORT V8Initializer { - v8::Local); +@@ -69,8 +69,8 @@ class CORE_EXPORT V8Initializer { static void MessageHandlerInWorker(v8::Local, v8::Local); -+ static bool WasmCodeGenerationCheckCallbackInMainThread( + static bool WasmCodeGenerationCheckCallbackInMainThread( +- v8::Local context, +- v8::Local source); + v8::Local context, + v8::Local source); }; diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index fddba52566fd5..36add55b18d64 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -35,7 +35,7 @@ index 5b4d70991e19edcdfee731c56251932bf43e535f..4d996e3821410b2325ef85499f8c307c #endif // CHROME_BROWSER_ANDROID_DOCUMENT_DOCUMENT_WEB_CONTENTS_DELEGATE_H_ diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc -index 363a0d6979aaa8fb1047f6e0ed8b4bf58f547c6f..5f155518a179d4556c3993711e688f88e3f04091 100644 +index 2ffd44a4273bf86e4cd642c1dd19178176fe1f73..d164a652c741529050b6ffb4e7c070d3c7ec1237 100644 --- a/chrome/browser/media/offscreen_tab.cc +++ b/chrome/browser/media/offscreen_tab.cc @@ -284,8 +284,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden( @@ -49,10 +49,10 @@ index 363a0d6979aaa8fb1047f6e0ed8b4bf58f547c6f..5f155518a179d4556c3993711e688f88 // uses this to spawn new windows/tabs, which is also not allowed for // offscreen tabs. diff --git a/chrome/browser/media/offscreen_tab.h b/chrome/browser/media/offscreen_tab.h -index c80128b816cc77b95af215384fdc36b2150f95ea..2063233f6f36829e91ba503d0d66fa5cde994cf3 100644 +index 3de99e26d62546eb2c3b677e1d61da1edeaa9fd6..5130fd65bb088f76aba2bbbb6855a43f913210ed 100644 --- a/chrome/browser/media/offscreen_tab.h +++ b/chrome/browser/media/offscreen_tab.h -@@ -107,8 +107,7 @@ class OffscreenTab final : public ProfileObserver, +@@ -106,8 +106,7 @@ class OffscreenTab final : public ProfileObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -62,11 +62,11 @@ index c80128b816cc77b95af215384fdc36b2150f95ea..2063233f6f36829e91ba503d0d66fa5c void EnterFullscreenModeForTab( content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) final; -diff --git a/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc b/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc -index e4f3632c84ebe4dcbbc3deb2f49e351c75ec93fd..08227615c2370bf55edfc373a40d9b488d775ba7 100644 ---- a/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc -+++ b/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc -@@ -77,10 +77,9 @@ bool AssistantWebViewImpl::IsWebContentsCreationOverridden( +diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc +index 4df94c57d6be19d6e76430391386e84d2816d94a..f1c0c6e8bec7ef17292c2a5a3b33800f402c889b 100644 +--- a/chrome/browser/ui/ash/ash_web_view_impl.cc ++++ b/chrome/browser/ui/ash/ash_web_view_impl.cc +@@ -77,10 +77,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -79,11 +79,11 @@ index e4f3632c84ebe4dcbbc3deb2f49e351c75ec93fd..08227615c2370bf55edfc373a40d9b48 WindowOpenDisposition::NEW_FOREGROUND_TAB, /*from_user_gesture=*/true); return true; -diff --git a/chrome/browser/ui/ash/assistant/assistant_web_view_impl.h b/chrome/browser/ui/ash/assistant/assistant_web_view_impl.h -index 07014765f33bdddebcc5bc32a2713d6523faf394..b76a6e4f5d79ad53caba3044c1d9d6e6b9e066f8 100644 ---- a/chrome/browser/ui/ash/assistant/assistant_web_view_impl.h -+++ b/chrome/browser/ui/ash/assistant/assistant_web_view_impl.h -@@ -48,8 +48,7 @@ class AssistantWebViewImpl : public ash::AssistantWebView, +diff --git a/chrome/browser/ui/ash/ash_web_view_impl.h b/chrome/browser/ui/ash/ash_web_view_impl.h +index fd2bccf8f718683b55646ef200aaacc2df6ac485..b62b61fbcf4b8f1eff26546c5da020f88e4599fa 100644 +--- a/chrome/browser/ui/ash/ash_web_view_impl.h ++++ b/chrome/browser/ui/ash/ash_web_view_impl.h +@@ -46,8 +46,7 @@ class AshWebViewImpl : public ash::AshWebView, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -94,7 +94,7 @@ index 07014765f33bdddebcc5bc32a2713d6523faf394..b76a6e4f5d79ad53caba3044c1d9d6e6 content::WebContents* source, const content::OpenURLParams& params) override; diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc -index ba376cca99e6b8b367c6a4cfc9925b940728b9fc..51731a94efdbba6b582a1a317303c26dd7f06c6c 100644 +index df265a5caaef54f69ffc37283b08303d869d8d79..4a11c711471a415c237819ea34921d4296b272fa 100644 --- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc +++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc @@ -72,8 +72,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate, @@ -108,10 +108,10 @@ index ba376cca99e6b8b367c6a4cfc9925b940728b9fc..51731a94efdbba6b582a1a317303c26d } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index c764e3607d274b9ec3f645c2b5fc9c8c1e98ad47..9c177080b4aee8ad71dd9a4c438d5a6daec2c25d 100644 +index d8f3035f494a0fb53499bca9a8204d65a29fe16d..3b64725e182870bf2962ead1092e5c6de00e282c 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1789,12 +1789,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1766,12 +1766,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,10 +127,10 @@ index c764e3607d274b9ec3f645c2b5fc9c8c1e98ad47..9c177080b4aee8ad71dd9a4c438d5a6d WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 69911da4fe7b9894f718fac8d59af1dcc9d18593..eeeef53bd967131d77d440cc61ad3acbb07bd9d7 100644 +index 1feded0d4e23dcb966674a0192984b98f55b6d15..729447dab43268490e2359d41ab3b9af31f44919 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -813,8 +813,7 @@ class Browser : public TabStripModelObserver, +@@ -809,8 +809,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -141,10 +141,10 @@ index 69911da4fe7b9894f718fac8d59af1dcc9d18593..eeeef53bd967131d77d440cc61ad3acb content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc -index ff97ac6e97c688d677053a5f01546a4c2d91ff1d..c095be21525d85e3d6c1f4a0c1dda5c8579e1ec3 100644 +index db19e1847d2ad43379c5cd5ef2312a70aced47ae..2358e97bafcf16c36e21f6c4f493facf4d528505 100644 --- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc +++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc -@@ -201,8 +201,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden( +@@ -202,8 +202,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -155,7 +155,7 @@ index ff97ac6e97c688d677053a5f01546a4c2d91ff1d..c095be21525d85e3d6c1f4a0c1dda5c8 // uses this to spawn new windows/tabs, which is also not allowed for // local presentations. diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h -index 45cd02ecf7b7acb107f95656b3fa07a5fca2ea95..953ea8ae44f7f2bd0623591249cb85f9d0eda543 100644 +index eda511525a39912422efd3bc7a3917adf2af773a..1c78a06e5ec2338663951ab49f690c7cc1ad606b 100644 --- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h +++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h @@ -104,8 +104,7 @@ class PresentationReceiverWindowController final @@ -169,7 +169,7 @@ index 45cd02ecf7b7acb107f95656b3fa07a5fca2ea95..953ea8ae44f7f2bd0623591249cb85f9 // The profile used for the presentation. Profile* otr_profile_; 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 9364a722de5183c077a9c50b8c8a48ffa3a0fea6..58d9e6c24d70dbedeb41f0b29ed1cb03a1bdcde3 100644 +index 1aec422b4c83b823c92d76847366fe0d4d04cd00..ea8354f49b14631cf8671decc1ee96beb18d9561 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc @@ -170,14 +170,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden( @@ -190,7 +190,7 @@ index 9364a722de5183c077a9c50b8c8a48ffa3a0fea6..58d9e6c24d70dbedeb41f0b29ed1cb03 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 4b832f4c3a051eefca57909958334631335e03e1..b665a3cac289409280e61f75eb7d7eb83517f603 100644 +index 2930898b03d7b7ef86d13733cec3cbe84105c166..76625339f42a867c8b68840253e91648721c9343 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.h +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h @@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate { @@ -232,10 +232,10 @@ index 75eff96958b086ebfe7f99adf0d986213074c45b..ae1f59db9569cd65a5ae92a37af19f9e void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 48a8529b01468bc80b75670b057b203e54cd9dbb..d5bf3e57440985826332672116d34426c3d27a83 100644 +index 0577d16d66bdaef6f4044d1737e9cf4cde811520..956c5024919bc18f4aea07c77ead5ff2ad49730a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3697,8 +3697,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3786,8 +3786,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -246,10 +246,10 @@ index 48a8529b01468bc80b75670b057b203e54cd9dbb..d5bf3e57440985826332672116d34426 static_cast(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 31c73efb73bb69076abd6b9c4f139072a9f7f603..3867f45d32c409ce6a738519ba539b51685c7d3e 100644 +index ee9180697d569900ec9d7eb1143903c0268cb1e8..088bda2f2cd70e5757bcda020a6d36ec44df9069 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc -@@ -136,8 +136,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( +@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -260,10 +260,10 @@ index 31c73efb73bb69076abd6b9c4f139072a9f7f603..3867f45d32c409ce6a738519ba539b51 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index 5936fa4bce09895595ccb294504f5b89c967d8c0..7186e17271d727c2df1d58e9cb300d22dd4e52e5 100644 +index f82d5c524ebf331c37280f0a93a5d3dc292236eb..3874394f67f30d44ee8278c943c01ecf4a40759b 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h -@@ -314,8 +314,7 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -323,8 +323,7 @@ class CONTENT_EXPORT WebContentsDelegate { SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -274,10 +274,10 @@ index 5936fa4bce09895595ccb294504f5b89c967d8c0..7186e17271d727c2df1d58e9cb300d22 // Allow delegate to creates a custom WebContents when // WebContents::CreateNewWindow() is called. This function is only called 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 78d1bed80f2cf0f0774617c149d695f3dce3d712..ed08199cea6137d09cb95f0da4a283caf819d688 100644 +index c5f63fc8512bfe0374121950804a4b815bcea44f..fac8e32dc27b248f9e06f3be151e73da51d04a63 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -@@ -212,8 +212,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( +@@ -213,8 +213,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -288,10 +288,10 @@ index 78d1bed80f2cf0f0774617c149d695f3dce3d712..ed08199cea6137d09cb95f0da4a283ca // view is used for displaying embedded extension options, we want any // external links to be opened in a new tab, not in a new guest view so we 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 d9e6b8c6941feb7dd0afd759f92753ab46545365..2216ee05f26efdc4e1b3f0f55db8d5f30b3c18e0 100644 +index 0d6ab312e2bdfac8f1d75ecb5df990d3d158b288..edcdae5183d5a2bcca31b440870f40ed12d7e02c 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.h +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h -@@ -59,8 +59,7 @@ class ExtensionOptionsGuest +@@ -58,8 +58,7 @@ class ExtensionOptionsGuest content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -302,10 +302,10 @@ index d9e6b8c6941feb7dd0afd759f92753ab46545365..2216ee05f26efdc4e1b3f0f55db8d5f3 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 df1d12a9dcd3809a43f2de769492f66c8098313d..f6f5c052d897814913022491d893a9bade91db47 100644 +index ded1894a7d1d7cc7929af3435978a0eb4a1ac781..3312dc397c96f9c5edc40feb8760ac08aac6dc45 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 -@@ -385,8 +385,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( +@@ -388,8 +388,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -316,10 +316,10 @@ index df1d12a9dcd3809a43f2de769492f66c8098313d..f6f5c052d897814913022491d893a9ba } diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index 663322919d45362718399b5265f9dd16acaea894..e4e599c2ee10ed0a650d6d77c6cfdfd62678b613 100644 +index 4c0820c60e7654657bdb46efbbf072d8bfe149d0..c1c0e744a81c0dee8a3fd3e12d56d7f1bd5e7f1c 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -@@ -172,8 +172,7 @@ class MimeHandlerViewGuest +@@ -171,8 +171,7 @@ class MimeHandlerViewGuest content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -330,10 +330,10 @@ index 663322919d45362718399b5265f9dd16acaea894..e4e599c2ee10ed0a650d6d77c6cfdfd6 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc -index 264846f62b075fd31be93d65b033ad65fb865b90..1325f58e02f7f28fd58d58c3d8317587c4827e19 100644 +index 9df6df01521882ef6f4f6530d226688836d56fa3..17f3becfb5eb671d330f56db1138e95d6e2d8b50 100644 --- a/fuchsia/engine/browser/frame_impl.cc +++ b/fuchsia/engine/browser/frame_impl.cc -@@ -379,8 +379,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -398,8 +398,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -344,10 +344,10 @@ index 264846f62b075fd31be93d65b033ad65fb865b90..1325f58e02f7f28fd58d58c3d8317587 // can catch bad client behavior while not interfering with normal operation. constexpr size_t kMaxPendingWebContentsCount = 10; diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h -index 90fe755aa7dddee8c1f129a4e125efba060ce055..7be424f7b49e37f6d67a4d5d4e105dc292a2f816 100644 +index a4a15d369e2ed6365deb6476fd5de094e0564be0..f6489a21a2da3b6e6e423c4cf6f7b8ebe2241d5c 100644 --- a/fuchsia/engine/browser/frame_impl.h +++ b/fuchsia/engine/browser/frame_impl.h -@@ -247,8 +247,7 @@ class FrameImpl : public fuchsia::web::Frame, +@@ -289,8 +289,7 @@ class FrameImpl : public fuchsia::web::Frame, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -358,10 +358,10 @@ index 90fe755aa7dddee8c1f129a4e125efba060ce055..7be424f7b49e37f6d67a4d5d4e105dc2 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 a98d00127990627a39fc1349c22b28921a3b3cbb..a4143738b611bc01427f185bc95d2faab865a7c6 100644 +index f3ce895c96d96ad54fad96bdbabe7d11845e6a53..2442a75d089600c61eff711294332bbfffe368fc 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc -@@ -192,8 +192,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { +@@ -176,8 +176,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -372,7 +372,7 @@ index a98d00127990627a39fc1349c22b28921a3b3cbb..a4143738b611bc01427f185bc95d2faa ->options() ->block_new_web_contents(); diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc -index aba1ecfde2be3371099bf9c729794b22a8849f02..8919bf1cab7a3bc3faac10ed0d86b9390af009b8 100644 +index e4c42c2fcf932ae2a13abadf3f6bbd494d4c972c..12ec122ccf9becd9bc6514b842612bc8a63edabf 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc @@ -426,8 +426,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( @@ -386,10 +386,10 @@ index aba1ecfde2be3371099bf9c729794b22a8849f02..8919bf1cab7a3bc3faac10ed0d86b939 return delegate_->HandleShouldOverrideWebContentsCreation(); return false; diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h -index d4d633809610215c589405d20e1137280c55468b..f66a83101c5e5518705c4d23ad963bf0a170241e 100644 +index c4997454ffe3b642272b2a7a0a89cffc1b5bca89..d1ac4ccb15c5249d945d4847281dd9b3193a4b2e 100644 --- a/ui/views/controls/webview/web_dialog_view.h +++ b/ui/views/controls/webview/web_dialog_view.h -@@ -155,8 +155,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, +@@ -154,8 +154,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch index 8daf2f24e443c..7b77c46e65642 100644 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch @@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from Electrons grit header instead of Chromes diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 1f848e0760118d48a7c00e1125dbda98b42561ab..37e8fdf8adb078c07e561b5e8cef4051ae4cc75f 100644 +index 56b6302adfe69b562506043ef5c8c543e8609620..ed472a9ef8116c028d0e54413ac0ef256ceaeddc 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -6821,6 +6821,7 @@ static_library("browser") { +@@ -6929,6 +6929,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index 2932fcbd47d0c..6006b5064d291 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -52,10 +52,10 @@ index ed2ac20679a9357c9493224ec5e08837c7860d6e..7f9a97e11395e5521e100694cd37bcd9 NotifyKeyPressed(ui::Accelerator(key_code, modifiers)); } diff --git a/chrome/browser/extensions/global_shortcut_listener_ozone.h b/chrome/browser/extensions/global_shortcut_listener_ozone.h -index 866c4e6c1ff8c1a2399d943837fce1753c8ea1a5..ecde46fe5f8c5f250a7cb505c86ae59cfa1bd623 100644 +index eb3f3431a3774c3a05afd4c7350f3801e9c8c684..b8970ef9ddb69d6a9fc6d106293e760535b6f4b3 100644 --- a/chrome/browser/extensions/global_shortcut_listener_ozone.h +++ b/chrome/browser/extensions/global_shortcut_listener_ozone.h -@@ -46,7 +46,8 @@ class GlobalShortcutListenerOzone +@@ -45,7 +45,8 @@ class GlobalShortcutListenerOzone void OnKeyPressed(ui::KeyboardCode key_code, bool is_alt_down, bool is_ctrl_down, diff --git a/patches/chromium/crash_allow_disabling_compression_on_linux.patch b/patches/chromium/crash_allow_disabling_compression_on_linux.patch index 1c58417529814..39cd097c8cafb 100644 --- a/patches/chromium/crash_allow_disabling_compression_on_linux.patch +++ b/patches/chromium/crash_allow_disabling_compression_on_linux.patch @@ -13,7 +13,7 @@ Ultimately we should remove the option to disable compression, and subsequently remove this patch. diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index 003702f4f0b1ddab26dee9a6154297fc0204b716..9986974ad1c76269ae0aae5ad14b1c9ac268d87e 100644 +index 5b308900ae8e9d49d711a1638e40c22d1d45af80..87e222070ce5bbd2f9f5c8bac6db7367b6161931 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -110,6 +110,8 @@ void SetUploadURL(const std::string& url) { diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index 16310756c17f6..3ddffd4177ab7 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -9,7 +9,7 @@ rate-limiting, compression and global annotations. This should be upstreamed. diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index 93d05b949c26c3ff96f62504760dbb96c1054387..b1392d74ca4ff08f6e293a72d1d453baa5f91cbc 100644 +index ec5b5b9b4da3b19e851c414695b2150b6588ecc7..f55fd1c92770de6b8bce1fc46a047c79228d451e 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -112,6 +112,7 @@ void SetUploadURL(const std::string& url) { @@ -75,10 +75,10 @@ index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c31 // Used by WebView to sample crashes without generating the unwanted dumps. If // the returned value is less than 100, crash dumping will be sampled to that diff --git a/components/crash/core/app/crashpad_linux.cc b/components/crash/core/app/crashpad_linux.cc -index 99e5ee6eeadb9ff12b7b027ceba4c838a8fedc6d..838ccd82b5828c1c58b3089064b7baeb35982f7e 100644 +index 212bc8359f454132b3cab81449075c1f18d5bd5b..771197daea11b2b7a9f9e845d3fd886913f1539b 100644 --- a/components/crash/core/app/crashpad_linux.cc +++ b/components/crash/core/app/crashpad_linux.cc -@@ -178,6 +178,7 @@ base::FilePath PlatformCrashpadInitialization( +@@ -179,6 +179,7 @@ bool PlatformCrashpadInitialization( // where crash_reporter provides it's own values for lsb-release. annotations["lsb-release"] = base::GetLinuxDistro(); #endif @@ -86,7 +86,7 @@ index 99e5ee6eeadb9ff12b7b027ceba4c838a8fedc6d..838ccd82b5828c1c58b3089064b7baeb std::vector arguments; if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { -@@ -199,6 +200,13 @@ base::FilePath PlatformCrashpadInitialization( +@@ -200,6 +201,13 @@ bool PlatformCrashpadInitialization( } #endif @@ -98,10 +98,10 @@ index 99e5ee6eeadb9ff12b7b027ceba4c838a8fedc6d..838ccd82b5828c1c58b3089064b7baeb + } + bool result = - client.StartHandler(handler_path, database_path, metrics_path, url, + client.StartHandler(handler_path, *database_path, metrics_path, url, annotations, arguments, false, false); diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm -index e3fc1fb2bcab31d6a7cb325a892acb26dc00d4e4..fd654d6e514de416457c283caeb1895dba6286e1 100644 +index dc041c43371fd58e3121ef6bc423aadb644bb8d0..a1fa566775724b4a1662a939fda3f0a59bf46b96 100644 --- a/components/crash/core/app/crashpad_mac.mm +++ b/components/crash/core/app/crashpad_mac.mm @@ -85,6 +85,8 @@ @@ -113,7 +113,7 @@ index e3fc1fb2bcab31d6a7cb325a892acb26dc00d4e4..fd654d6e514de416457c283caeb1895d return annotations; } -@@ -155,6 +157,13 @@ void DumpProcessWithoutCrashing(task_t task_port) { +@@ -155,6 +157,13 @@ bool PlatformCrashpadInitialization( std::vector arguments; @@ -128,10 +128,10 @@ index e3fc1fb2bcab31d6a7cb325a892acb26dc00d4e4..fd654d6e514de416457c283caeb1895d arguments.push_back("--monitor-self"); } diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc -index 7dd251b2fdda8c59bb630a5d3ee86e9e858f256e..93f1d5954651ef961c72b97885a708ecff2e9aa7 100644 +index 1a8f42cb4e2ea493642d8b264d0be5c3da358793..e972272de54107aaed6143e3f3569ba56bd3cf3e 100644 --- a/components/crash/core/app/crashpad_win.cc +++ b/components/crash/core/app/crashpad_win.cc -@@ -89,6 +89,7 @@ base::FilePath PlatformCrashpadInitialization( +@@ -89,6 +89,7 @@ bool PlatformCrashpadInitialization( std::map process_annotations; GetPlatformCrashpadAnnotations(&process_annotations); @@ -139,7 +139,7 @@ index 7dd251b2fdda8c59bb630a5d3ee86e9e858f256e..93f1d5954651ef961c72b97885a708ec std::string url = crash_reporter_client->GetUploadUrl(); -@@ -127,6 +128,13 @@ base::FilePath PlatformCrashpadInitialization( +@@ -127,6 +128,13 @@ bool PlatformCrashpadInitialization( std::vector arguments(start_arguments); diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index ac516e3152ea4..1c3d3223fd3d5 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc -index c490dd7ca2dbe499fbf99509293900318c6b7739..2de3b90801b2daba2eac0263f010c834468b7fd6 100644 +index 0c38abb81e76ba17d60b92c362bd042d203ca212..34fb38913071dd24e94d317ab7d73f86a047818e 100644 --- a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc +++ b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc -@@ -423,7 +423,7 @@ void MobileFriendlinessChecker::ComputeSmallTextRatio( +@@ -432,7 +432,7 @@ void MobileFriendlinessChecker::ComputeSmallTextRatio( ->GetPageScaleConstraintsSet() .FinalConstraints() .initial_scale; diff --git a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch index 1c4c59a6b1fa2..e191406882845 100644 --- a/patches/chromium/delay_lock_the_protocol_scheme_registry.patch +++ b/patches/chromium/delay_lock_the_protocol_scheme_registry.patch @@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try re-submitting the patch. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 915ae322cb6a21668553e196bab5fbca891028a3..c97118c1380734e9cdc91b9d7191e0dc71d8b8ed 100644 +index 558fabf35abea86883bdcfe4a600ba72f24bd9dc..d19cd4006e88dc165a6e5fbbe8f1d96547d136f3 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -763,7 +763,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { +@@ -787,7 +787,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { } #endif @@ -32,10 +32,10 @@ index 915ae322cb6a21668553e196bab5fbca891028a3..c97118c1380734e9cdc91b9d7191e0dc #if !defined(OS_ANDROID) diff --git a/content/common/url_schemes.cc b/content/common/url_schemes.cc -index 29d38782f197cb72a875effab00ffc7960435ac1..694fe67ef751b2a84d8fc3f5ad82854fe2287a11 100644 +index 5fcc7c6c1e27f36f86e972cebbd1808d37ea5b88..bff53783935950facb6cf896d4e906c5f05fe9a8 100644 --- a/content/common/url_schemes.cc +++ b/content/common/url_schemes.cc -@@ -50,7 +50,7 @@ std::vector& GetMutableServiceWorkerSchemes() { +@@ -49,7 +49,7 @@ std::vector& GetMutableServiceWorkerSchemes() { } // namespace @@ -44,7 +44,7 @@ index 29d38782f197cb72a875effab00ffc7960435ac1..694fe67ef751b2a84d8fc3f5ad82854f // On Android and in tests, schemes may have been registered already. if (g_registered_url_schemes) return; -@@ -110,7 +110,8 @@ void RegisterContentSchemes() { +@@ -109,7 +109,8 @@ void RegisterContentSchemes() { // threadsafe so must be called when GURL isn't used on any other thread. This // is really easy to mess up, so we say that all calls to Add*Scheme in Chrome // must be inside this function. @@ -68,7 +68,7 @@ index 3038f9d25798f36811b6398f8cc0e7d83ecc41b0..68189c36c47ef85b345b0ccc40c456f8 // Re-initializes schemes for tests. CONTENT_EXPORT void ReRegisterContentSchemesForTests(); diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc -index 8c71a579ee69d77547698c2135e3b4453c126b97..9b7fd8949b13d97982a100a36d9f73c9947b8853 100644 +index d076ab515732941a8403c7756272afddcb298f6b..4f3c2d8d4520e6f25d3d79e00d6af03bc842cc38 100644 --- a/content/public/app/content_main_delegate.cc +++ b/content/public/app/content_main_delegate.cc @@ -42,6 +42,10 @@ bool ContentMainDelegate::ShouldHandleConsoleControlEvents() { @@ -83,10 +83,10 @@ index 8c71a579ee69d77547698c2135e3b4453c126b97..9b7fd8949b13d97982a100a36d9f73c9 return true; } diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h -index 5e45724edf07ac33c9a423ecb6b6077f19e13b04..84f77390772828554e446d1e6f99198b76e9f835 100644 +index f8f9a6d4316e0eb19585479aab20b441adb391ef..4b35355cf73c1a19587e1954839577df36e6e1d9 100644 --- a/content/public/app/content_main_delegate.h +++ b/content/public/app/content_main_delegate.h -@@ -69,6 +69,20 @@ class CONTENT_EXPORT ContentMainDelegate { +@@ -73,6 +73,20 @@ class CONTENT_EXPORT ContentMainDelegate { // returning initialization error code. Default behavior is CHECK(false). virtual int TerminateForFatalInitializationError(); diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 13a2c49506030..905f210b05366 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -52,7 +52,7 @@ index 98cc4e039ba2b5a467175b15650a7b8ef38e8249..f5aea6a5916b9aa56ee7b81a8de97dc4 const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index c899b52ef01d2c9ea16b281a2b7c4d37f175fa36..a5fc476a52215eba33193012629ab1f73d679c88 100644 +index f777d8e6aa8a36d273a1a23f5e71390fad7e434f..68aa85a344168bcd74f4e9d1f7538934e980eba7 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc @@ -16,7 +16,7 @@ @@ -64,14 +64,17 @@ index c899b52ef01d2c9ea16b281a2b7c4d37f175fa36..a5fc476a52215eba33193012629ab1f7 #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/content_features.h" -@@ -94,6 +94,7 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr frame, +@@ -94,8 +94,9 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr frame, } #if defined(OS_MAC) +// Refs https://github.com/electron/electron/pull/30507 const base::Feature kWindowCaptureMacV2{"WindowCaptureMacV2", - base::FEATURE_DISABLED_BY_DEFAULT}; +- base::FEATURE_ENABLED_BY_DEFAULT}; ++ base::FEATURE_DISABLED_BY_DEFAULT}; #endif + + } // namespace @@ -427,6 +428,8 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails, base::Unretained(worker_.get()), diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index 29d852ea9e144..2182c45854c6f 100644 --- a/patches/chromium/disable-redraw-lock.patch +++ b/patches/chromium/disable-redraw-lock.patch @@ -15,10 +15,10 @@ the redraw locking mechanism, which fixes these issues. The electron issue can be found at https://github.com/electron/electron/issues/1821 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 8694e28a174b937e39cbfcbf1eb9e67123c7b93c..149edcde6c1ad336f39f65c36ed2bb87a2b2a800 100644 +index 2cc667cbb6291cb8f57a23d7446ddf5f3f699bb6..38c8d1bf63b3ec2eba7ae8ea8a975a990369e393 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -308,6 +308,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; +@@ -307,6 +307,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; } // namespace @@ -29,7 +29,7 @@ index 8694e28a174b937e39cbfcbf1eb9e67123c7b93c..149edcde6c1ad336f39f65c36ed2bb87 // A scoping class that prevents a window from being able to redraw in response // to invalidations that may occur within it for the lifetime of the object. // -@@ -359,6 +363,7 @@ class HWNDMessageHandler::ScopedRedrawLock { +@@ -358,6 +362,7 @@ class HWNDMessageHandler::ScopedRedrawLock { cancel_unlock_(false), should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() && ::IsWindow(hwnd_) && @@ -37,7 +37,7 @@ index 8694e28a174b937e39cbfcbf1eb9e67123c7b93c..149edcde6c1ad336f39f65c36ed2bb87 (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -978,6 +983,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -977,6 +982,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } @@ -49,10 +49,10 @@ index 8694e28a174b937e39cbfcbf1eb9e67123c7b93c..149edcde6c1ad336f39f65c36ed2bb87 // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index fd402c3d6b0130dc91d6d369bc3337f9955ccf6d..36caa4704af99a6769cf359582a11b025a2b24a0 100644 +index 1dce6029dbf81d173be148da4e3f5cb63d0fd4b8..15f1e226b5e160aba38deb4c75fd8b9538a16dab 100644 --- a/ui/views/win/hwnd_message_handler.h +++ b/ui/views/win/hwnd_message_handler.h -@@ -206,6 +206,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl, +@@ -205,6 +205,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl, using TouchIDs = std::set; enum class DwmFrameState { kOff, kOn }; diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index bb45148c6ff9f..0459c55e748b9 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index f898c7dd71ed30624fc16651fce1e1519d142a6a..2331fdc7e8bb8efce35c620b6f9e95ccb117938e 100644 +index 053391edf447c902dbfc2c7115a232671cd3396e..d570e6cd1435787acd4ba0b56420142932955590 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1800,6 +1800,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1816,6 +1816,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace( gfx::ContentColorUsage content_color_usage) const { @@ -35,7 +35,7 @@ index f898c7dd71ed30624fc16651fce1e1519d142a6a..2331fdc7e8bb8efce35c620b6f9e95cc // If we are likely to software composite the resource, we use sRGB because diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index e38646f8834e07e02845ea96f60f9b067c3bc09a..50a1c9884fa181524dd14e4cce61b0ec0921e4e6 100644 +index 86180d4f001a7f849553a4bd5401d69fe4f1bec2..953b1f4f24e55e127af5fcb5fb3c4e1e3f23429d 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -93,6 +93,8 @@ class CC_EXPORT LayerTreeSettings { @@ -81,7 +81,7 @@ index d79f3beb58085672e0a67825a0b60de2a3aeb499..5f7ca2ea0d012be5518dd07ade8cf282 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce112065303 100644 +index 405cdf39e2c9ca364d2b0a8908143cd2cbb74432..833ed728180f91d6bbe7faa57290dc14e3f0d207 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -86,6 +86,9 @@ @@ -94,7 +94,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 namespace viz { namespace { -@@ -677,8 +680,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, +@@ -682,8 +685,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) { SetBlendEnabled(quad->ShouldDrawWithBlending()); @@ -106,7 +106,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 // Use the full quad_rect for debug quads to not move the edges based on // partial swaps. -@@ -1668,7 +1672,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, +@@ -1673,7 +1677,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, params->use_color_matrix, tint_gl_composited_content_, params->apply_shader_based_rounded_corner && ShouldApplyRoundedCorner(params->quad)), @@ -116,7 +116,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 } void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) { -@@ -2141,15 +2146,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, +@@ -2146,15 +2151,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -136,7 +136,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB); color_transform->Transform(&col, 1); color_f.fR = col.x(); -@@ -2371,7 +2377,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, +@@ -2376,7 +2382,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, : NON_PREMULTIPLIED_ALPHA, false, false, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -146,7 +146,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2470,7 +2477,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, +@@ -2475,7 +2482,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, !quad->ShouldDrawWithBlending(), has_tex_clamp_rect, tint_gl_composited_content_, ShouldApplyRoundedCorner(quad)), @@ -156,7 +156,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2580,7 +2588,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, +@@ -2585,7 +2593,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, // The source color space should never be RGB. DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB()); @@ -166,7 +166,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 #if defined(OS_WIN) // Force sRGB output on Windows for overlay candidate video quads to match -@@ -2761,7 +2770,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, +@@ -2766,7 +2775,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, SetUseProgram(ProgramKey::VideoStream(tex_coord_precision, ShouldApplyRoundedCorner(quad)), @@ -176,7 +176,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); -@@ -2832,8 +2842,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { +@@ -2837,8 +2847,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR); // Bind the program to the GL state. @@ -187,7 +187,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 /*adjust_src_white_level=*/draw_cache_.is_video_frame, locked_quad.hdr_metadata()); -@@ -3686,7 +3696,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, +@@ -3691,7 +3701,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, const gfx::ColorSpace& dst_color_space, bool adjust_src_white_level, absl::optional hdr_metadata) { @@ -198,7 +198,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 gfx::ColorSpace adjusted_src_color_space = src_color_space; if (adjust_src_white_level && src_color_space.IsHDR()) { // TODO(b/183236148): consider using the destination's HDR static metadata -@@ -4069,9 +4081,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( +@@ -4074,9 +4086,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple); } @@ -211,7 +211,7 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 *new_bounds = gfx::RectF(updated_dst_rect.origin(), gfx::SizeF((*overlay_texture)->texture.size())); -@@ -4291,8 +4303,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { +@@ -4296,8 +4308,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { PrepareGeometry(SHARED_BINDING); @@ -222,14 +222,14 @@ index 98de8cd6372daf7d1c94353e6a9b2663a5325bca..d2d0ebc2dd2dbf5cd31bfa5071d82ce1 gfx::Transform render_matrix; render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -4481,3 +4493,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default; +@@ -4486,3 +4498,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default; GLRenderer::OverlayTexture::~OverlayTexture() = default; } // namespace viz + +#undef PATCH_CS diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 3a8decde7b5ce9ae3b20041885749e4763b3d311..390af09a9e53ac30c5682746dc40ccd0edaf7ecb 100644 +index 9d8fa4f02812d7cc05225262f82dfbf1feef6ed1..a7101f41a33f08b0a759e100150b6d9f3f940a22 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -225,6 +225,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -241,10 +241,10 @@ index 3a8decde7b5ce9ae3b20041885749e4763b3d311..390af09a9e53ac30c5682746dc40ccd0 sandbox::policy::switches::kGpuSandboxAllowSysVShm, sandbox::policy::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 9353475f0f41ce96c3bc53a5ff69a137900c8142..e52f628f9c80fb2647890f0f77403e278dfebf1f 100644 +index 43a22eb1ce2f94202f35f8080c881748535cbcd1..fe5c60224a2863489f835a7bbed82eab3a5a18bb 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -182,6 +182,7 @@ +@@ -183,6 +183,7 @@ #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ui_base_switches.h" #include "ui/display/display_switches.h" @@ -252,7 +252,7 @@ index 9353475f0f41ce96c3bc53a5ff69a137900c8142..e52f628f9c80fb2647890f0f77403e27 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3408,6 +3409,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3246,6 +3247,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { @@ -261,7 +261,7 @@ index 9353475f0f41ce96c3bc53a5ff69a137900c8142..e52f628f9c80fb2647890f0f77403e27 sandbox::policy::switches::kDisableSeccompFilterSandbox, sandbox::policy::switches::kNoSandbox, diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc -index 94ca8fd75212fa5c7b90823a112309dd7961353b..566393827ef739eb8fc0e24e6ee505e1680b38ab 100644 +index 6b97dc4c78fd4664bbcf82308ca27bed88880822..365a15f842a14503ed7667dfb37346e5a59144ac 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc @@ -4,6 +4,7 @@ @@ -271,8 +271,8 @@ index 94ca8fd75212fa5c7b90823a112309dd7961353b..566393827ef739eb8fc0e24e6ee505e1 +#include "base/command_line.h" #include "cc/paint/skia_paint_canvas.h" #include "components/viz/common/resources/resource_format_utils.h" - #include "third_party/blink/renderer/platform/graphics/canvas_resource_params.h" -@@ -13,6 +14,7 @@ + #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" +@@ -12,6 +13,7 @@ #include "third_party/khronos/GLES3/gl3.h" #include "third_party/skia/include/core/SkSurfaceProps.h" #include "ui/gfx/color_space.h" @@ -293,10 +293,10 @@ index 94ca8fd75212fa5c7b90823a112309dd7961353b..566393827ef739eb8fc0e24e6ee505e1 } diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc -index 895b440cc19c2bd9e14490171c7765fa278677af..487779555c1b5da2cda4d7ae4fa32a378987c3ce 100644 +index d8976665cc201e379b0a9ecd8d953eb63e10b74b..461e26d275886f3690255ab17f374aaeda7dd017 100644 --- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc +++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc -@@ -25,6 +25,7 @@ +@@ -24,6 +24,7 @@ #include "third_party/blink/renderer/platform/runtime_enabled_features.h" #include "ui/base/ui_base_features.h" #include "ui/base/ui_base_switches.h" @@ -304,7 +304,7 @@ index 895b440cc19c2bd9e14490171c7765fa278677af..487779555c1b5da2cda4d7ae4fa32a37 #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -178,6 +179,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -177,6 +178,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); @@ -315,7 +315,7 @@ index 895b440cc19c2bd9e14490171c7765fa278677af..487779555c1b5da2cda4d7ae4fa32a37 // is what the renderer uses if its not threaded. settings.enable_checker_imaging = diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc -index 7a199bc598eb6ec3a90ca7a6209e6598e48b79d5..eb368323105f7232c1e3ac79b7db56525f2d906f 100644 +index 7f5b6cc73cde4312720f4a6f54cb54ceb8709e15..1b76e0388d972b40619082f57019478754060068 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -21,6 +21,7 @@ @@ -326,7 +326,7 @@ index 7a199bc598eb6ec3a90ca7a6209e6598e48b79d5..eb368323105f7232c1e3ac79b7db5652 namespace gfx { -@@ -132,6 +133,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) { +@@ -143,6 +144,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) { // Common method used by IOSurfaceSetColorSpace and IOSurfaceCanSetColorSpace. bool IOSurfaceSetColorSpace(IOSurfaceRef io_surface, const ColorSpace& color_space) { @@ -341,7 +341,7 @@ index 7a199bc598eb6ec3a90ca7a6209e6598e48b79d5..eb368323105f7232c1e3ac79b7db5652 // Allow but ignore invalid color spaces. if (!color_space.IsValid()) return true; -@@ -302,6 +311,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, +@@ -313,6 +322,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size, DCHECK_EQ(kIOReturnSuccess, r); } @@ -358,7 +358,7 @@ index 7a199bc598eb6ec3a90ca7a6209e6598e48b79d5..eb368323105f7232c1e3ac79b7db5652 if (__builtin_available(macos 10.12, *)) { IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB); diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc -index 6733cbef7f7173e0cea4176986b851bad0f18e86..1714e52434f72ff4e3335e37cedb3f452f6b196b 100644 +index bea10b469ead89de3a090bb6119c9a68e49db5d6..7d9daf8cae37b35c89a25f45fccd9d1a5fa50885 100644 --- a/ui/gfx/switches.cc +++ b/ui/gfx/switches.cc @@ -10,6 +10,7 @@ namespace switches { @@ -370,7 +370,7 @@ index 6733cbef7f7173e0cea4176986b851bad0f18e86..1714e52434f72ff4e3335e37cedb3f45 // Force disables font subpixel positioning. This affects the character glyph // sharpness, kerning, hinting and layout. diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h -index afb36f3e9ae8b3f38244a5821341d34935283580..f967ae3e9e9c0edcd1b618ab09fc677aa72c0c8d 100644 +index 2b97abc9a0357972eff127761aa4a3cff5f34dbb..c270ab3885594424d5863a083573735657d85f5d 100644 --- a/ui/gfx/switches.h +++ b/ui/gfx/switches.h @@ -12,6 +12,8 @@ diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 9f2daac86b4ff..98b725815ddb7 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index ec191047cca6d8e7d00e445942461e9b47098ec1..67adae61e7fa6ea0cab7c028132fce5f0c64b876 100644 +index f08bcf90e8ad1827dcab99bcb303d1848ad0a56f..d64f77b025cba44c83b964f44190c15cf831e2e0 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -478,7 +478,11 @@ +@@ -509,7 +509,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 530a6e0c860b2..c878490e42846 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -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 cc527298ebe3cb9dc5b5d3fde3e4854a2062ec45..80b15389f7dcb946c9bb29359fa89f5d72f4e99b 100644 +index 31c6ca8c223180086736a1677febc0d4247f5a23..9501ae821c3cd16e53e63e28d717856c9f66efd3 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -778,6 +778,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -804,6 +804,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -20,10 +20,10 @@ index cc527298ebe3cb9dc5b5d3fde3e4854a2062ec45..80b15389f7dcb946c9bb29359fa89f5d blink::mojom::PointerLockResult::kWrongDocument); diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h -index da1bc9c7e01c6eef07b1066976e7487767d716f2..5d123c6c48b299745f7524ea8927043e1bd430a3 100644 +index 170e0755756f26c3291ef7269caadfe3ed5dae05..e288fe0ba76dee05ccc6f2339477d7c78ce46540 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -865,6 +865,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -873,6 +873,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl void OnLocalSurfaceIdChanged( const cc::RenderFrameMetadata& metadata) override; @@ -34,10 +34,10 @@ index da1bc9c7e01c6eef07b1066976e7487767d716f2..5d123c6c48b299745f7524ea8927043e // |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 239088813b9fa96e9e9899acee6f02bcb828ecde..7955f2cb725ef4c011bbbce74820d98783d56a0c 100644 +index a2c22345475c424bd23af4e8e1e8c087a780fc68..b3f02329ae0398978f8a87299181cb07a4799af4 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -611,7 +611,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -626,7 +626,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 2683efaffe17d..1d73cbfcae667 100644 --- a/patches/chromium/disable_unload_metrics.patch +++ b/patches/chromium/disable_unload_metrics.patch @@ -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 034aaf10263002789e941dbf989b407817030fbc..3af98993ba83688a1ba36008758ea9c489e2373e 100644 +index 812037846402d6b74fb4c20109b50572b58ed6f0..64bd98f4f7b47510f7aefdaa7e1f334142a624c9 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1110,6 +1110,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1109,6 +1109,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index 034aaf10263002789e941dbf989b407817030fbc..3af98993ba83688a1ba36008758ea9c4 // 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 && -@@ -1156,6 +1157,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1155,6 +1156,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } diff --git a/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch b/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch index b723674484d53..5156ae79c3a59 100644 --- a/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch +++ b/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch @@ -6,10 +6,10 @@ Subject: Don't run PCScan functions if PCScan is disabled PCScan should not be invoked if PCScan is disabled. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/2916657. diff --git a/base/allocator/partition_allocator/memory_reclaimer.cc b/base/allocator/partition_allocator/memory_reclaimer.cc -index 479b7caf6a2142e5097fd5dd75282deb35a1c402..9c2ab518fabebf58d081e3656affc0ea40f497ac 100644 +index cc4c5bad93175e309c21bc39e95e7473a22d1a7f..446fca9ebdf6f87a697905d0114a88f5f7c5214a 100644 --- a/base/allocator/partition_allocator/memory_reclaimer.cc +++ b/base/allocator/partition_allocator/memory_reclaimer.cc -@@ -136,7 +136,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) { +@@ -94,7 +94,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) { // // Lastly decommit empty slot spans and lastly try to discard unused pages at // the end of the remaining active slots. @@ -19,10 +19,10 @@ index 479b7caf6a2142e5097fd5dd75282deb35a1c402..9c2ab518fabebf58d081e3656affc0ea using PCScan = internal::PCScan; const auto invocation_mode = flags & PartitionPurgeAggressiveReclaim diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc -index 4d717742610b6dc4419c632aa3f6b5494fa90c5e..8c5e20df3f7630610c88cf28420f3460531003e6 100644 +index 16ada1a936d48a293694b854737e96609f53d86b..e0b13569d46fcc785c8db8cddd3babef8d0a9ea6 100644 --- a/base/threading/platform_thread_posix.cc +++ b/base/threading/platform_thread_posix.cc -@@ -40,6 +40,7 @@ +@@ -41,6 +41,7 @@ #endif #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) @@ -30,7 +30,7 @@ index 4d717742610b6dc4419c632aa3f6b5494fa90c5e..8c5e20df3f7630610c88cf28420f3460 #include "base/allocator/partition_allocator/starscan/pcscan.h" #include "base/allocator/partition_allocator/starscan/stack/stack.h" #endif -@@ -73,7 +74,7 @@ void* ThreadFunc(void* params) { +@@ -74,7 +75,7 @@ void* ThreadFunc(void* params) { base::DisallowSingleton(); #if !defined(OS_NACL) @@ -39,7 +39,7 @@ index 4d717742610b6dc4419c632aa3f6b5494fa90c5e..8c5e20df3f7630610c88cf28420f3460 internal::PCScan::NotifyThreadCreated(internal::GetStackPointer()); #endif -@@ -99,7 +100,7 @@ void* ThreadFunc(void* params) { +@@ -100,7 +101,7 @@ void* ThreadFunc(void* params) { PlatformThread::CurrentHandle().platform_handle(), PlatformThread::CurrentId()); @@ -49,7 +49,7 @@ index 4d717742610b6dc4419c632aa3f6b5494fa90c5e..8c5e20df3f7630610c88cf28420f3460 #endif diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc -index 2959a82daffd1a59fb0bcda5b31023c039933faf..9b59e0bf9c74d423892909b44623a1a6cd96839e 100644 +index d6bd4ffcba213f886a6d2a85784895db89a98b6c..0723b3feca281546aafb8c6f03d94bc560bb781f 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc @@ -28,6 +28,7 @@ diff --git a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch index 1cb9d1c12623b..94e789f9f5bee 100644 --- a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch +++ b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch @@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572 Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 900b8125f3fc6dcec4a1637fae6fcb2af40af5ab..d37001436b32848ac4929f831560fa02cea7a22a 100644 +index b517bd4337fcda3b167388962657344388f0b74d..64174a0ad860c2b91203cbe48893d248cd404508 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2344,7 +2344,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2388,7 +2388,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/dump_syms.patch b/patches/chromium/dump_syms.patch index b96643f4580e6..ea1020c34ac9c 100644 --- a/patches/chromium/dump_syms.patch +++ b/patches/chromium/dump_syms.patch @@ -8,7 +8,7 @@ this but it is not a blocker for releasing Electron. This patch removes tthe hard fail on dylib resolve failure from dump_syms diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py -index f8802dae3832ce5f92ce0585d8489167b7d18ceb..873d1d79af70f3cde37db8aed7117be254ce23b6 100755 +index e68039d78f1de03f7ffc68017cbb9f948f67f440..b1811df7b5e6252bc71dd0f11ad6bf02858387f4 100755 --- a/components/crash/content/tools/generate_breakpad_symbols.py +++ b/components/crash/content/tools/generate_breakpad_symbols.py @@ -206,7 +206,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path): diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index b90b78c76fa10..bedad676c78e5 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0 Make SetAspectRatio accept 0 as valid input, which would reset to null. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index d8411ddc4fd88a1416181cce366b112df3f48d63..a33ec53b96fec67feacc92e71fa6ed17c5e47d7d 100644 +index ec35385c2d39dc530408a845b816c3d494f07ba4..c816ec18110f9eea23a0e5fa1beef6007df6fc3b 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -525,7 +525,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { +@@ -530,7 +530,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { } void DesktopWindowTreeHostWin::SetAspectRatio(const gfx::SizeF& aspect_ratio) { @@ -19,10 +19,10 @@ index d8411ddc4fd88a1416181cce366b112df3f48d63..a33ec53b96fec67feacc92e71fa6ed17 aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 149edcde6c1ad336f39f65c36ed2bb87a2b2a800..a235cab941ec583a8dc9cb5e4105c2d7baae02df 100644 +index 38c8d1bf63b3ec2eba7ae8ea8a975a990369e393..338d3e54444e8c47a683c74d3eab511c7121d49a 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -928,8 +928,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { +@@ -927,8 +927,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { } void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) { diff --git a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch index 80cf9ac89f176..4878cc7314fc7 100644 --- a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch +++ b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch @@ -21,10 +21,10 @@ index c9b535eb083c250f4f874d8e6bd0c29ea9f3a10f..f220b8669507a4aea616b0dfbabda509 v8::ZoneBackingAllocator* GetZoneBackingAllocator() override; #endif diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc -index 563888e117dd234056a38a7bba971033e31d0484..cc808c563bbd95e39b6238adcccb3b32575b573e 100644 +index 94f3fbd7fd28fb7d41dbd4070cac4912fe30e6ca..287231bc5826373c6a1b9b9fb1d05b54def86a7f 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc -@@ -368,6 +368,10 @@ PageAllocator* V8Platform::GetPageAllocator() { +@@ -367,6 +367,10 @@ PageAllocator* V8Platform::GetPageAllocator() { return g_page_allocator.Pointer(); } diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 6073a7c36dc90..751d8528080c5 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -10,10 +10,10 @@ patch may be merged upstream, at which point this patch should be removed. diff --git a/net/url_request/static_http_user_agent_settings.h b/net/url_request/static_http_user_agent_settings.h -index ab97cbf061c89be9f11dde42b7371668658208a6..718209098ee4fb6cfc9aaa1ef4af691cf8d79366 100644 +index 14c71cc69388da46f62d9835e2a06fef0870da02..9481ea08401ae29ae9c1d960491b05b364257cc8 100644 --- a/net/url_request/static_http_user_agent_settings.h +++ b/net/url_request/static_http_user_agent_settings.h -@@ -31,13 +31,17 @@ class NET_EXPORT StaticHttpUserAgentSettings : public HttpUserAgentSettings { +@@ -30,13 +30,17 @@ class NET_EXPORT StaticHttpUserAgentSettings : public HttpUserAgentSettings { accept_language_ = new_accept_language; } @@ -33,10 +33,10 @@ index ab97cbf061c89be9f11dde42b7371668658208a6..718209098ee4fb6cfc9aaa1ef4af691c } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 39ff43884fbc2b6768d7ddb6e9d63031a973b8fa..5d985fc94f35a1258ecee212c56561d56a9a3ff6 100644 +index 6321d35d649a58c91df621a088c23879901ef6aa..701d2f7d5fbe61d77e3267a2262bfba2674e165c 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1295,6 +1295,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1302,6 +1302,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index 39ff43884fbc2b6768d7ddb6e9d63031a973b8fa..5d985fc94f35a1258ecee212c56561d5 // 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 8362af824a8dd4f721eebdbff2d544f7f5093d16..28a9ce2bfc0d84bb15b5e40d9697fbdeaa57a96a 100644 +index 5535c101c809f23f3adc85b06d42ee34f135da4b..1ff3fc928baa794f4b1562e2c7a030919099c6ec 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -274,6 +274,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -277,6 +277,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; @@ -63,10 +63,10 @@ index 8362af824a8dd4f721eebdbff2d544f7f5093d16..28a9ce2bfc0d84bb15b5e40d9697fbde void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 8f8b496324265b25046a88cbac7decec056f061e..d7c20f76f96d43df71b503ca7a2a14446e9bbe96 100644 +index 64f046dfc5e3eab241547b2dc4b118daef68d7d6..c7928f25882bcb09bedbac044cb6eca63f0c3763 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1030,6 +1030,9 @@ interface NetworkContext { +@@ -1034,6 +1034,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,7 +77,7 @@ index 8f8b496324265b25046a88cbac7decec056f061e..d7c20f76f96d43df71b503ca7a2a1444 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index e41a44deca2e33b8c3f2c9c2123326b832246529..5bdc6b5a75eae0f3fb049998a7c1671753d17285 100644 +index b766ae3aa91ffd6ce5ab7ae3835ff7fa58d02a0e..5719eec40aff5cd079110fc52c46d2791577fee8 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h @@ -134,6 +134,7 @@ class TestNetworkContext : public mojom::NetworkContext { diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 2bb07319e9b04..7a58d33e7de88 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,10 +12,10 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index baf07861d4be89485605f87d344fcffdd220a063..efdb4d157a378b26f9356eaa12e78762904dc4e7 100644 +index dcc985cf532f098ff5aeb649a30db314030c5a02..388790dd6e6cdba4c1d1d508184e9b0b7ef672df 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -155,6 +155,7 @@ +@@ -157,6 +157,7 @@ #include "third_party/blink/renderer/core/timing/dom_window_performance.h" #include "third_party/blink/renderer/core/timing/window_performance.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" @@ -23,7 +23,7 @@ index baf07861d4be89485605f87d344fcffdd220a063..efdb4d157a378b26f9356eaa12e78762 #include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h" -@@ -1791,6 +1792,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1803,6 +1804,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if defined(OS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); diff --git a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch index 2bc279b5ef530..92002b6cdf78f 100644 --- a/patches/chromium/feat_add_data_parameter_to_processsingleton.patch +++ b/patches/chromium/feat_add_data_parameter_to_processsingleton.patch @@ -13,18 +13,18 @@ app.requestSingleInstanceLock API so that users can pass in a JSON object for the second instance to send to the first instance. diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h -index eec994c4252f17d9c9c41e66d5dae6509ed98a18..e538c9b76da4d4435e10cd3848438446c2cc2cc8 100644 +index 13b325ecad9ba48398173e89680287c63efd4fa6..2061374805de9f9e646b896c4212bb3dcf2b8ed7 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h -@@ -19,6 +19,7 @@ - #include "base/macros.h" +@@ -18,6 +18,7 @@ + #include "base/files/file_path.h" #include "base/memory/ref_counted.h" #include "base/process/process.h" +#include "base/containers/span.h" #include "ui/gfx/native_widget_types.h" #if defined(OS_POSIX) && !defined(OS_ANDROID) -@@ -101,21 +102,24 @@ class ProcessSingleton { +@@ -100,21 +101,24 @@ class ProcessSingleton { // should handle it (i.e., because the current process is shutting down). using NotificationCallback = base::RepeatingCallback& argv, @@ -72,7 +72,7 @@ index a04d139f958a7aaef9b96e8c29317ccf7c97f009..e77cebd31967d28f3cb0db78e7360115 SocketReader* reader); private: -@@ -621,13 +622,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { +@@ -681,13 +682,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { } void ProcessSingleton::LinuxWatcher::HandleMessage( @@ -91,7 +91,7 @@ index a04d139f958a7aaef9b96e8c29317ccf7c97f009..e77cebd31967d28f3cb0db78e7360115 // Send back "ACK" message to prevent the client process from starting up. reader->FinishWithACK(kACKToken, base::size(kACKToken) - 1); } else { -@@ -675,7 +679,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -735,7 +739,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: } } @@ -101,7 +101,7 @@ index a04d139f958a7aaef9b96e8c29317ccf7c97f009..e77cebd31967d28f3cb0db78e7360115 const size_t kMinMessageLength = base::size(kStartToken) + 4; if (bytes_read_ < kMinMessageLength) { buf_[bytes_read_] = 0; -@@ -705,10 +710,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -765,10 +770,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: tokens.erase(tokens.begin()); tokens.erase(tokens.begin()); @@ -131,7 +131,7 @@ index a04d139f958a7aaef9b96e8c29317ccf7c97f009..e77cebd31967d28f3cb0db78e7360115 fd_watch_controller_.reset(); // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader -@@ -737,8 +760,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( +@@ -797,8 +820,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( // ProcessSingleton::ProcessSingleton( const base::FilePath& user_data_dir, @@ -142,7 +142,7 @@ index a04d139f958a7aaef9b96e8c29317ccf7c97f009..e77cebd31967d28f3cb0db78e7360115 current_pid_(base::GetCurrentProcId()), watcher_(new LinuxWatcher(this)) { socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); -@@ -855,7 +880,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -915,7 +940,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( sizeof(socket_timeout)); // Found another process, prepare our command line @@ -152,7 +152,7 @@ index a04d139f958a7aaef9b96e8c29317ccf7c97f009..e77cebd31967d28f3cb0db78e7360115 std::string to_send(kStartToken); to_send.push_back(kTokenDelimiter); -@@ -865,11 +891,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -925,11 +951,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( to_send.append(current_dir.value()); const std::vector& argv = cmd_line.argv(); @@ -175,10 +175,10 @@ index a04d139f958a7aaef9b96e8c29317ccf7c97f009..e77cebd31967d28f3cb0db78e7360115 if (!WriteToSocket(socket.fd(), to_send.data(), to_send.length())) { // Try to kill the other process, because it might have been dead. diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 19d5659d665321da54e05cee01be7da02e0c283b..600ff701b025ba190d05bc30994e3d3e8847df55 100644 +index 679350dd08ca0211653ea669405e3f4f86c2fc0f..daab2f170d857082df56966c7bd8abc53924631d 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -99,10 +99,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { +@@ -98,10 +98,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { bool ParseCommandLine(const COPYDATASTRUCT* cds, base::CommandLine* parsed_command_line, @@ -193,7 +193,7 @@ index 19d5659d665321da54e05cee01be7da02e0c283b..600ff701b025ba190d05bc30994e3d3e static const int min_message_size = 7; if (cds->cbData < min_message_size * sizeof(wchar_t) || cds->cbData % sizeof(wchar_t) != 0) { -@@ -152,6 +154,37 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds, +@@ -151,6 +153,37 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds, const std::wstring cmd_line = msg.substr(second_null + 1, third_null - second_null); *parsed_command_line = base::CommandLine::FromString(cmd_line); @@ -231,7 +231,7 @@ index 19d5659d665321da54e05cee01be7da02e0c283b..600ff701b025ba190d05bc30994e3d3e return true; } return false; -@@ -168,16 +201,16 @@ bool ProcessLaunchNotification( +@@ -167,16 +200,16 @@ bool ProcessLaunchNotification( // Handle the WM_COPYDATA message from another process. const COPYDATASTRUCT* cds = reinterpret_cast(lparam); @@ -252,7 +252,7 @@ index 19d5659d665321da54e05cee01be7da02e0c283b..600ff701b025ba190d05bc30994e3d3e return true; } -@@ -274,9 +307,11 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -273,9 +306,11 @@ bool ProcessSingleton::EscapeVirtualization( ProcessSingleton::ProcessSingleton( const std::string& program_name, const base::FilePath& user_data_dir, @@ -264,7 +264,7 @@ index 19d5659d665321da54e05cee01be7da02e0c283b..600ff701b025ba190d05bc30994e3d3e program_name_(program_name), is_app_sandboxed_(is_app_sandboxed), is_virtualized_(false), -@@ -301,7 +336,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { +@@ -300,7 +335,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { return PROCESS_NONE; } diff --git a/patches/chromium/feat_add_onclose_to_messageport.patch b/patches/chromium/feat_add_onclose_to_messageport.patch index cd059950f4de2..cf52cfa05ff50 100644 --- a/patches/chromium/feat_add_onclose_to_messageport.patch +++ b/patches/chromium/feat_add_onclose_to_messageport.patch @@ -22,7 +22,7 @@ index c5714d115210488cb531c1e54de540f429636638..6f67b21803fcdc2498ef207878d1541e void MessagePort::Entangle(MessagePortDescriptor port) { diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h -index 7a83dce5113dc77d3654997db09ff9bc4cfeb3e2..85987f99ee144060cee11719726eb823bf58c645 100644 +index c5e0fefac929d4a484488761741d42f2b002f7a1..83d7901d99ad01ba039ea1ffa3dbee2595fc31ff 100644 --- a/third_party/blink/renderer/core/messaging/message_port.h +++ b/third_party/blink/renderer/core/messaging/message_port.h @@ -120,6 +120,13 @@ class CORE_EXPORT MessagePort : public EventTargetWithInlineData, diff --git a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index 7d0ee1b44dff6..03cea2c55393b 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -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 3a023294c980ac89204b14748dc05bfdb1fbd4ad..94d25b52228d40ac685ae32a3fd99816b20a014b 100644 +index ca0630b07722cf3d8b4d31103db7c03bc702ee6b..5f7c5166f3541718f1135b2af8dc6ef3b7bb69ca 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc -@@ -150,6 +150,8 @@ absl::optional NativeTheme::GetColorProviderColor( +@@ -153,6 +153,8 @@ absl::optional NativeTheme::GetColorProviderColor( } bool NativeTheme::ShouldUseDarkColors() const { @@ -26,10 +26,10 @@ index 3a023294c980ac89204b14748dc05bfdb1fbd4ad..94d25b52228d40ac685ae32a3fd99816 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 01c999166dd30d3f994d2e449c524f9e8676ad0d..b4d46f557d9ea4ef62f6ae1acd2b9b45c79ebea9 100644 +index 61dcb2ace529fe0bb30a885b7ae9120dfc8e0c00..95fd72c8dbcd1f60d177fee8f5e7774a9d9d3ff7 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -398,6 +398,22 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -403,6 +403,22 @@ class NATIVE_THEME_EXPORT NativeTheme { SkColor GetUnprocessedSystemColor(ColorId color_id, ColorScheme color_scheme) const; @@ -52,7 +52,7 @@ index 01c999166dd30d3f994d2e449c524f9e8676ad0d..b4d46f557d9ea4ef62f6ae1acd2b9b45 // 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 -@@ -577,6 +593,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -588,6 +604,7 @@ class NATIVE_THEME_EXPORT NativeTheme { bool forced_colors_ = false; PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; diff --git a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch index 716e507a55f60..36b0def1b7263 100644 --- a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch +++ b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch @@ -26,7 +26,7 @@ index 274308e54f2b5c6311d68daa162c146113ba669e..e450fe31011620d87219ce28ef37fb5e // in-memory sliding window. // diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index fcc1a116176a372095b4d032a45a05e225c10a1a..aad9ba1910f70d4377c9e131787e4b57c6477863 100644 +index ba3e8d75ce49614e26dd77692166a11b614a5d9c..4c3170ecb94716ec2869c363381759cbf08f3ae6 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc @@ -10,8 +10,10 @@ @@ -35,7 +35,7 @@ index fcc1a116176a372095b4d032a45a05e225c10a1a..aad9ba1910f70d4377c9e131787e4b57 #include "base/location.h" +#include "base/no_destructor.h" #include "base/numerics/safe_conversions.h" - #include "base/single_thread_task_runner.h" + #include "base/task/single_thread_task_runner.h" +#include "base/strings/string_util.h" #include "media/base/media_log.h" #include "net/base/net_errors.h" diff --git a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch index 38a1c20dc9a32..0d0a0000bcd4a 100644 --- a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch +++ b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch @@ -9,7 +9,7 @@ production use cases. This is unlikely to be upstreamed as the change is entirely in //chrome. diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -index 182721f9238683321ef5645d5506d2e88816f45f..31958788b8b2f110ecedcd9f0ba3b8ec2e9342d9 100644 +index 51c061d3bd117c926b74a10deab37d3a694e808b..1f0b787b13567be74553ced382d4b48a65bb2003 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc @@ -51,6 +51,9 @@ namespace { @@ -44,10 +44,10 @@ index 182721f9238683321ef5645d5506d2e88816f45f..31958788b8b2f110ecedcd9f0ba3b8ec "https://redirector.gvt1.com/edgedl/chrome/dict/"; diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h -index f2eb0abec4d5fb05dee09b51e02619ba47336025..77667a70584c5a102bddbc46cb71aa616b672384 100644 +index 0670254d4962c99aef03e45300e98f4cd28c9449..32e204f5ffbb71a28ff59158096e1114191ddc6a 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h -@@ -93,6 +93,8 @@ class SpellcheckHunspellDictionary +@@ -92,6 +92,8 @@ class SpellcheckHunspellDictionary // Tests use this method to set a custom URL for downloading dictionaries. static void SetDownloadURLForTesting(const GURL url); diff --git a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index ccf312679c660..136a566ca7714 100644 --- a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch +++ b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch @@ -42,10 +42,10 @@ index 7e6846c8bbb2d773c0b0ec97da928871d828bcbf..7a5f0d5034270dcfb287d9c46b2cd043 const content::NotificationSource& source, const content::NotificationDetails& details) { diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h -index b417b23feb1f53c949d8d8c677ff36431cee2a62..bdc67f1de727983a67ea360b502d791af8b22479 100644 +index 0bf7fbf3ea96248110a6b1a2ed693d4db98ce4f3..b712d7bc2364cec6796db522bd5e32230aa4d366 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h -@@ -138,6 +138,8 @@ class SpellcheckService : public KeyedService, +@@ -137,6 +137,8 @@ class SpellcheckService : public KeyedService, // dictionaries available. bool IsSpellcheckEnabled() const; @@ -54,7 +54,7 @@ index b417b23feb1f53c949d8d8c677ff36431cee2a62..bdc67f1de727983a67ea360b502d791a // NotificationProfile implementation. void Observe(int type, const content::NotificationSource& source, -@@ -305,6 +307,8 @@ class SpellcheckService : public KeyedService, +@@ -304,6 +306,8 @@ class SpellcheckService : public KeyedService, // A pointer to the BrowserContext which this service refers to. content::BrowserContext* context_; diff --git a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 1ad367aa10116..f44904291ecfc 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -37,10 +37,10 @@ index 3b00759e513dc7e19fd68398e853c8ce6ac73905..47f4e7cc2e8b3141dcaf9e7a498fec32 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h -index 888133f8e05fb02792ed43d8997e0732aa2d9fe3..eb4723689413cca494fdf9b9d052249405fb5584 100644 +index b2ad84c881ac7190ee07e6db1f0eb2822066748d..b1527bd33ca9ba0f5345aa1fef08ee65f3ded91c 100644 --- a/components/viz/host/host_display_client.h +++ b/components/viz/host/host_display_client.h -@@ -42,10 +42,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient { +@@ -41,10 +41,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient { const gfx::CALayerParams& ca_layer_params) override; #endif @@ -68,10 +68,10 @@ index b04f654fe820f821b18e059cdd40085fc2384c4e..ee22012b01ef92bb3b32b5b1081609a7 if (!canvas_) { diff --git a/components/viz/host/layered_window_updater_impl.h b/components/viz/host/layered_window_updater_impl.h -index 894237a777fbf829e309772153fa5fcb9eec5598..4310c08b0c2cf97f387d290ae85c14f8539f2002 100644 +index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c2de7bec0 100644 --- a/components/viz/host/layered_window_updater_impl.h +++ b/components/viz/host/layered_window_updater_impl.h -@@ -39,7 +39,7 @@ class VIZ_HOST_EXPORT LayeredWindowUpdaterImpl +@@ -38,7 +38,7 @@ class VIZ_HOST_EXPORT LayeredWindowUpdaterImpl // mojom::LayeredWindowUpdater implementation. void OnAllocatedSharedMemory(const gfx::Size& pixel_size, base::UnsafeSharedMemoryRegion region) override; @@ -81,7 +81,7 @@ index 894237a777fbf829e309772153fa5fcb9eec5598..4310c08b0c2cf97f387d290ae85c14f8 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index eb36a21f0f79a84a3517b55f9a83f6a4c93dea77..53528e8d340f9417d2a3bf95c092ac2e7f2b3500 100644 +index 972d8fcc61b6a4ea972d8faf7dda8d9017f7cb71..7b00ef49451b0666567073f942bdb6fc2166aaf0 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -137,6 +137,8 @@ viz_component("service") { @@ -108,7 +108,7 @@ index 77d463e683d8b8d3a202681a6884eacaab79d70d..05d51cb2637d34c073cd0025e3658036 } // namespace viz 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 40a9a82819702852427435e497427a0d0067f5c4..eb0065802bac4647bbbb50af97d1dc92fac90804 100644 +index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191d20945f2 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -25,6 +25,7 @@ @@ -171,10 +171,10 @@ index 40a9a82819702852427435e497427a0d0067f5c4..eb0065802bac4647bbbb50af97d1dc92 return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_, display_client); 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 e62a7c718e704725ad88f25cba82855b1b22fd64..4508ff299c495f14f0e63f55d617bb449aa78050 100644 +index bdb6bf1815551737fb93ae65880dfe186840c7e6..e08d9224cfd13185c59bd7055aa9b7e9c5792aff 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.h +++ b/components/viz/service/display_embedder/output_surface_provider_impl.h -@@ -66,12 +66,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl +@@ -65,12 +65,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -213,10 +213,10 @@ index 33e12349a951ef533b964d1158f8fa124623e946..fc04bcaffefc277dd1d0cdd766168de0 IOSurfaceCreateMachPort(current_paint_buffer_->io_surface)); client_->SoftwareDeviceUpdatedCALayerParams(ca_layer_params); diff --git a/components/viz/service/display_embedder/software_output_device_mac.h b/components/viz/service/display_embedder/software_output_device_mac.h -index 1558d731a57332a66f9ef76b9cd252ba8cfa5a7b..06b954e01be417f49ea8211973920904be920709 100644 +index a480befb5d8db36e7e281d5033aeef0bea83d220..4e54acc897d08c87bccc3b44f68634e2873cb132 100644 --- a/components/viz/service/display_embedder/software_output_device_mac.h +++ b/components/viz/service/display_embedder/software_output_device_mac.h -@@ -60,6 +60,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceMac : public SoftwareOutputDevice { +@@ -59,6 +59,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceMac : public SoftwareOutputDevice { void UpdateAndCopyBufferDamage(Buffer* previous_paint_buffer, const SkRegion& new_damage_rect); @@ -389,10 +389,10 @@ index 0000000000000000000000000000000000000000..4efea02f80f8b6818291321a7c63f0f4 +} // namespace viz diff --git a/components/viz/service/display_embedder/software_output_device_proxy.h b/components/viz/service/display_embedder/software_output_device_proxy.h new file mode 100644 -index 0000000000000000000000000000000000000000..48fa86caaab3c15764f105eb7ad2aecf2b89bf36 +index 0000000000000000000000000000000000000000..fbc517e164d9bf33256c1ecbe86e31744375097e --- /dev/null +++ b/components/viz/service/display_embedder/software_output_device_proxy.h -@@ -0,0 +1,90 @@ +@@ -0,0 +1,92 @@ +// 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. @@ -422,6 +422,9 @@ index 0000000000000000000000000000000000000000..48fa86caaab3c15764f105eb7ad2aecf + SoftwareOutputDeviceBase() = default; + ~SoftwareOutputDeviceBase() override; + ++ SoftwareOutputDeviceBase(const SoftwareOutputDeviceBase&) = delete; ++ SoftwareOutputDeviceBase& operator=(const SoftwareOutputDeviceBase&) = delete; ++ + // SoftwareOutputDevice implementation. + void Resize(const gfx::Size& viewport_pixel_size, + float scale_factor) override; @@ -441,8 +444,6 @@ index 0000000000000000000000000000000000000000..48fa86caaab3c15764f105eb7ad2aecf + bool in_paint_ = false; + + THREAD_CHECKER(thread_checker_); -+ -+ DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceBase); +}; + +// SoftwareOutputDevice implementation that draws indirectly. An implementation @@ -455,6 +456,9 @@ index 0000000000000000000000000000000000000000..48fa86caaab3c15764f105eb7ad2aecf + mojom::LayeredWindowUpdaterPtr layered_window_updater); + ~SoftwareOutputDeviceProxy() override; + ++ SoftwareOutputDeviceProxy(const SoftwareOutputDeviceProxy&) = delete; ++ SoftwareOutputDeviceProxy& operator=(const SoftwareOutputDeviceProxy&) = delete; ++ + // SoftwareOutputDevice implementation. + void OnSwapBuffers(SoftwareOutputDevice::SwapBuffersCallback swap_ack_callback) override; + @@ -476,8 +480,6 @@ index 0000000000000000000000000000000000000000..48fa86caaab3c15764f105eb7ad2aecf +#if !defined(WIN32) + base::WritableSharedMemoryMapping shm_mapping_; +#endif -+ -+ DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceProxy); +}; + +} // namespace viz @@ -497,7 +499,7 @@ index 583e3e2525c753a0962d481fc67a3582df75d0e9..9416ec929bebcff7f07088e635376ef2 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 8ed8bfb01ae60f1bed9d54b98afe1820c4858532..690d9bc6e96d1d933cc6f2279494489a505db6e7 100644 +index d23ae68f306d6d76beec9784133bd22e2d4dee7a..370460868e7b121a3bb033668927659a2ffe75c9 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 @@ -47,7 +47,8 @@ RootCompositorFrameSinkImpl::Create( @@ -511,7 +513,7 @@ index 8ed8bfb01ae60f1bed9d54b98afe1820c4858532..690d9bc6e96d1d933cc6f2279494489a // Creating output surface failed. The host can send a new request, possibly // with a different compositing mode. diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index 53c23a97a54a432b2aefe148657a27ac254e98c3..0d1694e58c6807eacc074aaab4aad2e227d1a306 100644 +index bb929cb9ff381b1186f8df68e952d8f13a24a5d9..33f34eb372a4ab9c81d16dbf14485a63922f958e 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc @@ -382,8 +382,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( @@ -532,10 +534,10 @@ index 53c23a97a54a432b2aefe148657a27ac254e98c3..0d1694e58c6807eacc074aaab4aad2e2 compositor_data.display_client->GetBoundRemote(resize_task_runner_); diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom -index 409115f95787e3cf037f762a33368b173441012f..45a7a1607b8711420ba4e1a5455a61fb7d8b75ac 100644 +index 9f7583e42405760bbe5994c87c4347a7d5a36fbe..c383f93ee22388cb4524119d0bead31973fdc705 100644 --- a/services/viz/privileged/mojom/compositing/display_private.mojom +++ b/services/viz/privileged/mojom/compositing/display_private.mojom -@@ -90,7 +90,6 @@ interface DisplayClient { +@@ -94,7 +94,6 @@ interface DisplayClient { // Creates a LayeredWindowUpdater implementation to draw into a layered // window. @@ -567,7 +569,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 6220caafb2cbad4dcd251767c546e72aae03af8b..2bbc85cc6db1cad719eeadb0c256f9d001ba50c1 100644 +index c966042cf947ef291241a5a2dddce29e48c7e6c3..4b0ae728e29738e1309ee6c1bdd9408d80074c8f 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -80,6 +80,7 @@ class DisplayPrivate; @@ -595,7 +597,7 @@ index 6220caafb2cbad4dcd251767c546e72aae03af8b..2bbc85cc6db1cad719eeadb0c256f9d0 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -175,6 +186,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -176,6 +187,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -605,7 +607,7 @@ index 6220caafb2cbad4dcd251767c546e72aae03af8b..2bbc85cc6db1cad719eeadb0c256f9d0 // 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 -@@ -449,6 +463,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -452,6 +466,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr pending_begin_frame_args_; diff --git a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch index a16c982143003..fa2b8293e84f4 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -17,10 +17,10 @@ headers, moving forward we should find a way in upstream to provide access to these headers for loader clients created on the browser process. diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc -index a24972bd0d082e47036082983d93e862b6c28ab0..74ed551279314b728e129b6c344ee1b5de58701a 100644 +index da7f97cf0ec1760302fd31c94df2ee6d835fee55..7391948ccdeafb60fe955289347ab71fda6d533e 100644 --- a/services/network/public/cpp/resource_request.cc +++ b/services/network/public/cpp/resource_request.cc -@@ -231,6 +231,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { +@@ -235,6 +235,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { do_not_prompt_for_login == request.do_not_prompt_for_login && is_main_frame == request.is_main_frame && transition_type == request.transition_type && @@ -29,10 +29,10 @@ index a24972bd0d082e47036082983d93e862b6c28ab0..74ed551279314b728e129b6c344ee1b5 upgrade_if_insecure == request.upgrade_if_insecure && is_revalidating == request.is_revalidating && diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h -index 2857fb52a542eab7fa52938cbc6a292328cc2003..3a21c9f473f5c042a880d633f4b83a8f1c92fd1f 100644 +index 7119f5b854dcda2409949f3a7486a89996792ff0..861a795b3bfb7c0db53362646e0a7142e9dc4d11 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -161,6 +161,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { +@@ -158,6 +158,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { bool do_not_prompt_for_login = false; bool is_main_frame = false; int transition_type = 0; @@ -41,10 +41,10 @@ index 2857fb52a542eab7fa52938cbc6a292328cc2003..3a21c9f473f5c042a880d633f4b83a8f bool upgrade_if_insecure = false; bool is_revalidating = false; diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc -index 6bd39133e2d5b2bbad9ccbbded1e41eddce2a424..05d40087e89ec1edabb6017931f0d9e54a467b78 100644 +index 2c840cfe47af47fb8fd1b8c0b481645a7d9784fa..372665a9edb1b251bf33d3e6b3854d63bfb65d9d 100644 --- a/services/network/public/cpp/url_request_mojom_traits.cc +++ b/services/network/public/cpp/url_request_mojom_traits.cc -@@ -198,6 +198,7 @@ bool StructTraits< +@@ -211,6 +211,7 @@ bool StructTraits< out->do_not_prompt_for_login = data.do_not_prompt_for_login(); out->is_main_frame = data.is_main_frame(); out->transition_type = data.transition_type(); @@ -53,10 +53,10 @@ index 6bd39133e2d5b2bbad9ccbbded1e41eddce2a424..05d40087e89ec1edabb6017931f0d9e5 out->upgrade_if_insecure = data.upgrade_if_insecure(); out->is_revalidating = data.is_revalidating(); diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h -index 86e6558f3ebfb5d0f3dee3cee70fc45f0f33123f..54efb232bf7316ce3aabbb787676acb093910047 100644 +index d401695c161caa3254015e771e1e6f069b91546a..62b699ce892e9d9516f355ef0ba67d6ff129b69f 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h -@@ -267,6 +267,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) +@@ -275,6 +275,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) static int32_t transition_type(const network::ResourceRequest& request) { return request.transition_type; } @@ -67,10 +67,10 @@ index 86e6558f3ebfb5d0f3dee3cee70fc45f0f33123f..54efb232bf7316ce3aabbb787676acb0 return request.previews_state; } diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index 6ad61365a1dac6c18609ed63e7ab992c8949e70c..039f27017521b94eb2768f949b7217a9102aa61c 100644 +index 58733d931a62a88b7ee71c6a55249d4fcb460793..9af358ad9082d8b704b20542616c236c6ffe3193 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom -@@ -313,6 +313,9 @@ struct URLRequest { +@@ -321,6 +321,9 @@ struct URLRequest { // about this. int32 transition_type; @@ -81,7 +81,7 @@ index 6ad61365a1dac6c18609ed63e7ab992c8949e70c..039f27017521b94eb2768f949b7217a9 // browser decide. // Note: this is an enum of type PreviewsState. diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom -index cea1fb864ab46b4b0eabf1db11a0392d6cd575c1..df033f65d50b088778268827e506963afebe0a23 100644 +index faa5ed32a9dad5580181b2b88fd19fa0bc33d4bc..47a9bf98dd0e39b7f4389010f62c485d3cc3d76d 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom @@ -7,6 +7,7 @@ module network.mojom; @@ -103,10 +103,10 @@ index cea1fb864ab46b4b0eabf1db11a0392d6cd575c1..df033f65d50b088778268827e506963a string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 502003e72febe3fda800a8fd028fcfe29b876685..5b4193082d69cb9c0f904df9a9781b02bb3d2369 100644 +index 6198a0cb16f655367788a836eb35f29e849b634a..76df460e8939b3d15663b185cc1199523b607f1a 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -497,6 +497,7 @@ URLLoader::URLLoader( +@@ -530,6 +530,7 @@ URLLoader::URLLoader( peer_closed_handle_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), @@ -114,7 +114,7 @@ index 502003e72febe3fda800a8fd028fcfe29b876685..5b4193082d69cb9c0f904df9a9781b02 devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -640,7 +641,7 @@ URLLoader::URLLoader( +@@ -688,7 +689,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,7 +123,7 @@ index 502003e72febe3fda800a8fd028fcfe29b876685..5b4193082d69cb9c0f904df9a9781b02 url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1269,6 +1270,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1333,6 +1334,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { response_ = network::mojom::URLResponseHead::New(); PopulateResourceResponse(url_request_.get(), is_load_timing_enabled_, options_, response_.get()); @@ -140,19 +140,19 @@ index 502003e72febe3fda800a8fd028fcfe29b876685..5b4193082d69cb9c0f904df9a9781b02 + } + response_->raw_response_headers = std::move(header_array); + } + DispatchOnRawResponse(); // Parse and remove the Trust Tokens response headers, if any are expected, - // potentially failing the request if an error occurs. diff --git a/services/network/url_loader.h b/services/network/url_loader.h -index d7f278d52db72d18fb779cf409ce8d70c9e32a17..d7e168a184df19d429db2cdc1db40651cb136d68 100644 +index db8d4b29702e913be164d2c6906e4fbd4e6b4bf8..fd06a437e3af855b54f47406a3457bf40b4dc17c 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -472,6 +472,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -500,6 +500,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr resource_scheduler_request_handle_; + // Whether client requested raw headers. + bool report_raw_headers_ = false; bool enable_reporting_raw_headers_ = false; - net::HttpRawRequestHeaders raw_request_headers_; + bool seen_raw_request_headers_ = false; scoped_refptr raw_response_headers_; diff --git a/patches/chromium/fix_add_check_for_sandbox_then_result.patch b/patches/chromium/fix_add_check_for_sandbox_then_result.patch index 00da5ba9f2411..8ddc20a59d76a 100644 --- a/patches/chromium/fix_add_check_for_sandbox_then_result.patch +++ b/patches/chromium/fix_add_check_for_sandbox_then_result.patch @@ -8,10 +8,10 @@ patch and doing further investigation in the future. This patch cannot be upstreamed. diff --git a/sandbox/linux/bpf_dsl/bpf_dsl.cc b/sandbox/linux/bpf_dsl/bpf_dsl.cc -index 90139669e657863f2580ea6848a15fcc90f05125..48ee440fef90d467ccf0217caed9700a767f49d0 100644 +index 15dc1427dd1b021512edca74c6aacf2f9efec8c5..bca164d9d8bd65e717a1549ff7a31bf057717da2 100644 --- a/sandbox/linux/bpf_dsl/bpf_dsl.cc +++ b/sandbox/linux/bpf_dsl/bpf_dsl.cc -@@ -321,6 +321,7 @@ Elser::~Elser() { +@@ -320,6 +320,7 @@ Elser::~Elser() { } Elser Elser::ElseIf(BoolExpr cond, ResultExpr then_result) const { diff --git a/patches/chromium/fix_export_zlib_symbols.patch b/patches/chromium/fix_export_zlib_symbols.patch index 4da24e04e71b9..079d44b8eafbd 100644 --- a/patches/chromium/fix_export_zlib_symbols.patch +++ b/patches/chromium/fix_export_zlib_symbols.patch @@ -6,7 +6,7 @@ Subject: fix: export zlib symbols This patch sets ZLIB_DLL so that we properly export zlib symbols. diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn -index a3378e43ac99e611925bd28b3d78f3683d4d57cc..4113be75214f864560efab5da88e51f7887654ef 100644 +index 49f52e1f8b1e505481a124a55ab91a7dd5ec571c..2cb7ee4f708808433e638bf62cb9a465c3651944 100644 --- a/third_party/zlib/BUILD.gn +++ b/third_party/zlib/BUILD.gn @@ -312,6 +312,10 @@ component("zlib") { diff --git a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index 349caddd4742a..2a0f4ecd6d83e 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,27 +8,29 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta to users. We should try to upstream this. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 6c5272ad70d7e01ad663b884716efdf77deead08..af0b2fe1e7b03cb8f7249f5a964b1a0f4c72d53d 100644 +index 350de81e2622a8bc1bce8d9ef958590e0dd8f866..71423089904b59c82ab510ccbf5a4553a990304e 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1765,7 +1765,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, - - // Called when the base::ScopedClosureRunner returned by +@@ -1814,7 +1814,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. -- void DecrementCapturerCount(bool stay_hidden, bool stay_awake); -+ void DecrementCapturerCount(bool stay_hidden, bool stay_awake) override; + void DecrementCapturerCount(bool stay_hidden, + bool stay_awake, +- bool is_activity = true); ++ bool is_activity = true) override; // Calculates the PageVisibilityState for |visibility|, taking the capturing // state into account. diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 8840d078a341bda1abc79c1f9ee72b2cc07f06d6..5c5b3e7760c9ac67b24b66cd1ce51b5a705c5dd6 100644 +index f7db5d52cc773dff4913d67f10af3e0ec7d98bee..6a59e9ba14dcf2fb8626b3b447cd92e865730978 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -662,6 +662,8 @@ class WebContents : public PageNavigator, - bool stay_hidden, - bool stay_awake) WARN_UNUSED_RESULT = 0; +@@ -667,6 +667,10 @@ class WebContents : public PageNavigator, + bool stay_awake, + bool is_activity = true) WARN_UNUSED_RESULT = 0; -+ virtual void DecrementCapturerCount(bool stay_hidden, bool stay_awake) = 0; ++ virtual void DecrementCapturerCount(bool stay_hidden, ++ bool stay_awake, ++ bool is_activity = true) = 0; + // Getter for the capture handle, which allows a captured application to // opt-in to exposing information to its capturer(s). diff --git a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch index b895f5294a315..1a543dcf533d1 100644 --- a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch +++ b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch @@ -46,10 +46,10 @@ index bc009606d01469125052e68a9cdc82aaa697c764..ff18043cb07d748a49adea9874517fb2 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (IsShortcutHandlingSuspended()) diff --git a/chrome/browser/extensions/global_shortcut_listener.h b/chrome/browser/extensions/global_shortcut_listener.h -index 554930bc33d87ee88a9bcc5f0cf17cef09c27ef0..8df4f91d3db453afb9f73bcaeb82c919ca8d1841 100644 +index ad366d0fd4c3a637d75a102ab56984f0d01bfc04..d63eb133fd4bab1ea309bb8c742acf88d97d779e 100644 --- a/chrome/browser/extensions/global_shortcut_listener.h +++ b/chrome/browser/extensions/global_shortcut_listener.h -@@ -34,6 +34,8 @@ class GlobalShortcutListener { +@@ -33,6 +33,8 @@ class GlobalShortcutListener { static GlobalShortcutListener* GetInstance(); diff --git a/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch b/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch index 69fe759448c53..166ab9226896a 100644 --- a/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch +++ b/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch @@ -14,10 +14,10 @@ but it's not strictly necessary for this API to work to spec. Profile check has been upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3247196 diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index e9c8a4a4bb7334682ceeec05b3a3e872de0192ab..861307591f3721c398c454126cb5a9be9a5e9764 100644 +index 391865de1c6c5765288743178e7fec2c34dde680..271a1cc24d14c187f07cdb56e21fcc2823d1ea70 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -@@ -368,13 +368,9 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -369,13 +369,9 @@ void FullscreenController::EnterFullscreenModeInternal( // Do not enter fullscreen mode if disallowed by pref. This prevents the user // from manually entering fullscreen mode and also disables kiosk mode on // desktop platforms. @@ -33,7 +33,7 @@ index e9c8a4a4bb7334682ceeec05b3a3e872de0192ab..861307591f3721c398c454126cb5a9be #endif toggled_into_fullscreen_ = true; -@@ -387,6 +383,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -388,6 +384,7 @@ void FullscreenController::EnterFullscreenModeInternal( url = extension_caused_fullscreen_; } @@ -41,7 +41,7 @@ index e9c8a4a4bb7334682ceeec05b3a3e872de0192ab..861307591f3721c398c454126cb5a9be if (display_id != display::kInvalidDisplayId) { // Check, but do not prompt, for permission to request a specific screen. // Sites generally need permission to get the display id in the first place. -@@ -400,6 +397,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -401,6 +398,7 @@ void FullscreenController::EnterFullscreenModeInternal( display_id = display::kInvalidDisplayId; } } diff --git a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch index c950e8c76037b..a3e4a7bd5659d 100644 --- a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch +++ b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch @@ -7,7 +7,7 @@ This tweaks Chrome's Accessibility support at chrome://accessibility to make it usable from Electron by removing Profile references. diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc -index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6bebff933 100644 +index 616c74eef1b98aeceda128630b64e270d53c10a4..d04fc255dd4dcfa2bac7b43f99f41eaddaee85fa 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc @@ -20,7 +20,10 @@ @@ -33,7 +33,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 #include "ui/views/accessibility/widget_ax_tree_id_map.h" #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" -@@ -164,7 +169,7 @@ std::unique_ptr BuildTargetDescriptor( +@@ -163,7 +168,7 @@ std::unique_ptr BuildTargetDescriptor( accessibility_mode); } @@ -42,7 +42,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 std::unique_ptr BuildTargetDescriptor(Browser* browser) { std::unique_ptr target_data( new base::DictionaryValue()); -@@ -203,7 +208,9 @@ void HandleAccessibilityRequestCallback( +@@ -202,7 +207,9 @@ void HandleAccessibilityRequestCallback( DCHECK(ShouldHandleAccessibilityRequestCallback(path)); base::DictionaryValue data; @@ -52,18 +52,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 ui::AXMode mode = content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode(); bool is_native_enabled = content::BrowserAccessibilityState::GetInstance() -@@ -232,9 +239,7 @@ void HandleAccessibilityRequestCallback( - // The "labelImages" flag works only if "web" is enabled, the current profile - // has the kAccessibilityImageLabelsEnabled preference set and the appropriate - // command line switch has been used. -- bool are_accessibility_image_labels_enabled = -- is_web_enabled && -- pref->GetBoolean(prefs::kAccessibilityImageLabelsEnabled); -+ bool are_accessibility_image_labels_enabled = is_web_enabled; - bool label_images = mode.has_mode(ui::AXMode::kLabelImages); - data.SetString(kLabelImages, are_accessibility_image_labels_enabled - ? (label_images ? kOn : kOff) -@@ -248,7 +253,7 @@ void HandleAccessibilityRequestCallback( +@@ -236,7 +243,7 @@ void HandleAccessibilityRequestCallback( data.SetBoolean(kViewsAccessibility, features::IsAccessibilityTreeForViewsEnabled()); @@ -72,7 +61,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 data.SetString(kInternal, show_internal ? kOn : kOff); std::unique_ptr rvh_list(new base::ListValue()); -@@ -285,11 +290,11 @@ void HandleAccessibilityRequestCallback( +@@ -271,11 +278,11 @@ void HandleAccessibilityRequestCallback( data.Set(kPagesField, std::move(rvh_list)); std::unique_ptr browser_list(new base::ListValue()); @@ -86,7 +75,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 data.Set(kBrowsersField, std::move(browser_list)); std::unique_ptr widgets_list(new base::ListValue()); -@@ -508,8 +513,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) { +@@ -491,8 +498,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) { AllowJavascript(); if (flag_name_str == kInternal) { @@ -97,7 +86,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 return; } -@@ -617,10 +624,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( +@@ -599,10 +608,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -111,7 +100,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 result->SetString(kTreeField, accessibility_contents); FireWebUIListener(request_type, *(result.get())); } -@@ -644,6 +653,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -627,6 +638,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -119,7 +108,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 for (Browser* browser : *BrowserList::GetInstance()) { if (browser->session_id().id() == session_id) { std::unique_ptr result( -@@ -658,6 +668,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -641,6 +653,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( return; } } @@ -127,7 +116,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 #endif // !defined(OS_ANDROID) // No browser with the specified |session_id| was found. std::unique_ptr result(new base::DictionaryValue()); -@@ -773,5 +784,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( +@@ -757,5 +770,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( // static void AccessibilityUIMessageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { @@ -136,7 +125,7 @@ index 541c38f0048b609327cae88370d5123d9d9a3796..b48ffcf7fcc62aefc2d1146ed9d87ad6 +#endif } diff --git a/chrome/browser/accessibility/accessibility_ui.h b/chrome/browser/accessibility/accessibility_ui.h -index 8343169078d15f697bbf7aea86eb46cc9b991ef8..96665569cebe6f0c3bb0b074db96620773ee2d81 100644 +index 35a907a03cda75be919c6218efdb0295f1e73e57..bff530dcdf7f8f7271da72acbbd4fc5659c4dd5f 100644 --- a/chrome/browser/accessibility/accessibility_ui.h +++ b/chrome/browser/accessibility/accessibility_ui.h @@ -24,6 +24,8 @@ struct AXEventNotificationDetails; diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index 3f62007fdf9fe..9aefb1ccc8ae0 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -100,10 +100,10 @@ index acb040f998546b0e01be45c28c505bbafcf2c141..1083db84804e5ed8b420d3e8e3da372f } else { // No need to bother, we don't know how many pages are available. diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc -index c2b2455516cd156dfa12a62cac5b3a4b847cbd5b..e2243bbfbd34fe0b899645698455bc7f116feb0e 100644 +index aca31e17a90f95d6a4616fec5b33ce55cd136af0..e340cfae256797b7683fad8b32776a95889a8f46 100644 --- a/ui/gtk/printing/print_dialog_gtk.cc +++ b/ui/gtk/printing/print_dialog_gtk.cc -@@ -241,6 +241,24 @@ void PrintDialogGtk::UpdateSettings( +@@ -240,6 +240,24 @@ void PrintDialogGtk::UpdateSettings( gtk_print_settings_set_n_copies(gtk_settings_, settings->copies()); gtk_print_settings_set_collate(gtk_settings_, settings->collate()); diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index c0fb8b46e0118..b57b8ad52051d 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch Allows embedder to intercept site instances created by chromium. diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index 8d4a43dc12b06f5a39129acb5477a02844e74366..4d45e8ddeb90383dd7fe1e941c5868a72822cbe9 100644 +index a2537d567b12a247ac333a1750c8be6d2e165cf5..ad18fca64420043bda06449972742cf3ff000b43 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3070,6 +3070,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3084,6 +3084,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,7 +20,7 @@ index 8d4a43dc12b06f5a39129acb5477a02844e74366..4d45e8ddeb90383dd7fe1e941c5868a7 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index f0e2a061bb35fd3db26c7d235e1196273036925f..263ce75539f2fd215a45645e93271b3e65451d1a 100644 +index a1da3d41be9131d1d2ddd0e737aaca7055d71af0..abf86d15b58ecd2d19589991cac3f1bcd2d0c30f 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -274,6 +274,11 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index f1c7adf11ecc6..98440eecfe36f 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -7,46 +7,46 @@ 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 e93824463817a71903631dd722ffdfddb65bab3e..366e105c968b1be51eb0f26709486d086cf12eca 100644 +index 6305d03e2315e8b9925071c018a81c102dda2a55..2bed8f7ce21ab052c0c319775875b9cf008b2636 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -110,9 +110,10 @@ IsolateHolder::~IsolateHolder() { - // static +@@ -115,9 +115,10 @@ IsolateHolder::~IsolateHolder() { void IsolateHolder::Initialize(ScriptMode mode, v8::ArrayBuffer::Allocator* allocator, -- const intptr_t* reference_table) { -+ const intptr_t* reference_table, + const intptr_t* reference_table, +- const std::string js_command_line_flags) { ++ const std::string js_command_line_flags, + bool create_v8_platform) { CHECK(allocator); -- V8Initializer::Initialize(mode); -+ V8Initializer::Initialize(mode, create_v8_platform); +- V8Initializer::Initialize(mode, js_command_line_flags); ++ V8Initializer::Initialize(mode, js_command_line_flags, create_v8_platform); g_array_buffer_allocator = allocator; g_reference_table = reference_table; } diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index f0a7d0c05fa3c68b22b1d36e2c0810fe70f5a8a0..8ecce17b5bb8b5106de913a2d0197fd3affb1c08 100644 +index cb1da2cafc275b62b2a8bf2260d97054777e6d30..cb587f852f230f84db1c50ffd6d41cad447e0949 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -94,7 +94,8 @@ class GIN_EXPORT IsolateHolder { - // reference pointers. Otherwise, it can be nullptr. +@@ -99,7 +99,8 @@ class GIN_EXPORT IsolateHolder { static void Initialize(ScriptMode mode, v8::ArrayBuffer::Allocator* allocator, -- const intptr_t* reference_table = nullptr); -+ const intptr_t* reference_table = nullptr, + const intptr_t* reference_table = nullptr, +- const std::string js_command_line_flags = {}); ++ const std::string js_command_line_flags = {}, + bool create_v8_platform = true); // 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 3d8d99cc5840cd1abc72694fc717587aadd1badd..94340cbb1a7a75bcc24dea06b1b5c5ceb4571913 100644 +index aa866392fcc011f8e4408e3084697a9edee67a1d..51820fc5cd9bcbc835ae49f2a01f0165401790b6 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -226,12 +226,14 @@ void SetV8FlagsIfOverridden(const base::Feature& feature, - } // namespace +@@ -333,12 +333,14 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static --void V8Initializer::Initialize(IsolateHolder::ScriptMode mode) { -+void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, + void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, +- const std::string js_command_line_flags) { ++ const std::string js_command_line_flags, + bool create_v8_platform) { static bool v8_is_initialized = false; if (v8_is_initialized) @@ -56,18 +56,18 @@ index 3d8d99cc5840cd1abc72694fc717587aadd1badd..94340cbb1a7a75bcc24dea06b1b5c5ce + if (create_v8_platform) + v8::V8::InitializePlatform(V8Platform::Get()); - #if defined(V8_VIRTUAL_MEMORY_CAGE) - static_assert(ARCH_CPU_64_BITS, + // Set this early on as some initialization steps, such as the initialization + // of the virtual memory cage, already use V8's random number generator. diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h -index 955be10e118e1c54515dd0ee19edec7504419bdc..699f84c73b71a6d870ae93f2fce98174c924e2fa 100644 +index de650aa85dd083ec8c99d72b1f6cc447bb277f09..da97190ca86f5e04dd74dbff2282901fb4713f5b 100644 --- a/gin/v8_initializer.h +++ b/gin/v8_initializer.h -@@ -24,7 +24,8 @@ namespace gin { - class GIN_EXPORT V8Initializer { +@@ -29,7 +29,8 @@ class GIN_EXPORT V8Initializer { public: // This should be called by IsolateHolder::Initialize(). -- static void Initialize(IsolateHolder::ScriptMode mode); -+ static void Initialize(IsolateHolder::ScriptMode mode, + static void Initialize(IsolateHolder::ScriptMode mode, +- const std::string js_command_line_flags = {}); ++ const std::string js_command_line_flags = {}, + bool create_v8_platform = true); // Get address and size information for currently loaded snapshot. diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 65cc9730fb067..3d4b49d3919d8 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -28,10 +28,10 @@ index 7821945da13ece57529c1de14d1cbd7f645d19ab..9be940f4ee047279f5969a6c572d6acb void GpuDataManagerImpl::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index a8c0d59cb825a791c44c54e55ad7f295ad07a309..a1ef53aa46fb0cfc7bcac121244f77af64a7539f 100644 +index 9b850c01ab110467c3b595f4499d1f39e9f21001..7b0a2d2c2e385d4af5226e448b958181f0bd50ce 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h -@@ -122,6 +122,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, +@@ -124,6 +124,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, // BrowserMainParts override instead. void PostCreateThreads(); void TerminateInfoCollectionGpuProcess(); @@ -40,10 +40,10 @@ index a8c0d59cb825a791c44c54e55ad7f295ad07a309..a1ef53aa46fb0cfc7bcac121244f77af void UpdateDawnInfo(const std::vector& dawn_info_list); diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index 43dd51a57a806fb79798b481b6daadcb7400dd34..b038159656d06ee3882b73d38ea83aa1a9af02af 100644 +index 16b1653c8e7dbcd042c17bb4f2c308b7dfd6968b..17fdd083f387d557bff81fc0b0b73b91627ac9e0 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1181,6 +1181,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1171,6 +1171,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } @@ -57,10 +57,10 @@ index 43dd51a57a806fb79798b481b6daadcb7400dd34..b038159656d06ee3882b73d38ea83aa1 void GpuDataManagerImplPrivate::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h -index 3a9630dd05df8d07bd7520530ad57b6a76f39cec..205e8f44ddbf6e1ed39a2f6ef5c1bd0036831e50 100644 +index ce7af71283ad613e18ce05789396c0b74e937798..f4bf867b3a995d58164085b14ef01e0e8d55a37b 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h -@@ -89,6 +89,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { +@@ -88,6 +88,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { bool VulkanRequested() const; void PostCreateThreads(); void TerminateInfoCollectionGpuProcess(); diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index de51bf359780d..f555bdcc46b3a 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -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 4e80d8de308271bdad6b3315c5c01e5abf94624c..c7f3409b4d1772b65e570c785a826855b9972b0a 100644 +index dda65e37e4db1b9a8dead9e651795d318e9a18e3..722fff74cdc7b0e5f5a74f3fd2262320654d44f8 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -884,6 +884,11 @@ +@@ -892,6 +892,11 @@ "includes": [4960], }, diff --git a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch index 6d7d9ebba8c5b..200d22d17c1b8 100644 --- a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch +++ b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch @@ -8,13 +8,13 @@ require a largeish patch to get working, so just redirect it to our implementation instead. diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc -index 0cf0030ce27f798468c5fc8215d339027a776fb6..0a78d2e28f13bc545f379649ea49b76b7f227306 100644 +index ae5c53a945707ea269db0468f3e12a90d61cbafb..e74637fd3bb934b97f7c55cd8c57e86035a8d64e 100644 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc -@@ -9,8 +9,8 @@ - #include "base/bind.h" +@@ -10,8 +10,8 @@ #include "base/feature_list.h" #include "base/guid.h" + #include "base/ignore_result.h" -#include "chrome/browser/extensions/api/streams_private/streams_private_api.h" -#include "chrome/browser/plugins/plugin_utils.h" +#include "electron/shell/browser/extensions/api/streams_private/streams_private_api.h" diff --git a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch index aa2bf4921046c..e2227d74d3d6b 100644 --- a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch +++ b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch @@ -11,10 +11,10 @@ If removing this patch causes no sync failures, it's safe to delete :+1: Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index b5f9205707bc77bbfd0516240bd5cb803a06f61e..2d390aad0b8e40a48f1357e24587b27e3407aeab 100755 +index 9a8bae564d9a71b649e0a7b4d75a72bf1e7d748d..918bc176bb4408b3410babef717575a09cb30c90 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py -@@ -286,6 +286,8 @@ def main(): +@@ -282,6 +282,8 @@ def main(): 'win32': 'win', } default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform) diff --git a/patches/chromium/isolate_holder.patch b/patches/chromium/isolate_holder.patch index d7ae1459dc530..938436163b76c 100644 --- a/patches/chromium/isolate_holder.patch +++ b/patches/chromium/isolate_holder.patch @@ -15,20 +15,20 @@ 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 366e105c968b1be51eb0f26709486d086cf12eca..70ba5d0ecd8c4c10628db11818012e620895684b 100644 +index 2bed8f7ce21ab052c0c319775875b9cf008b2636..9aa4536d5c8fb38ac58e41c107b946cf9ba5d738 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -55,7 +55,8 @@ IsolateHolder::IsolateHolder( - AccessMode access_mode, - AllowAtomicsWaitMode atomics_wait_mode, +@@ -57,7 +57,8 @@ IsolateHolder::IsolateHolder( IsolateType isolate_type, -- IsolateCreationMode isolate_creation_mode) -+ IsolateCreationMode isolate_creation_mode, + IsolateCreationMode isolate_creation_mode, + v8::CreateHistogramCallback create_histogram_callback, +- v8::AddHistogramSampleCallback add_histogram_sample_callback) ++ v8::AddHistogramSampleCallback add_histogram_sample_callback, + v8::Isolate* isolate) : access_mode_(access_mode), isolate_type_(isolate_type) { CHECK(Initialized()) << "You need to invoke gin::IsolateHolder::Initialize first"; -@@ -66,7 +67,11 @@ IsolateHolder::IsolateHolder( +@@ -68,7 +69,11 @@ IsolateHolder::IsolateHolder( v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator; DCHECK(allocator); @@ -42,15 +42,15 @@ index 366e105c968b1be51eb0f26709486d086cf12eca..70ba5d0ecd8c4c10628db11818012e62 access_mode_, task_runner); if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) { diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index 8ecce17b5bb8b5106de913a2d0197fd3affb1c08..554beedf1fd1e256466b144468b1338fc6ccd473 100644 +index cb587f852f230f84db1c50ffd6d41cad447e0949..619982a42c1255c3629da78fd35c82cdcf174b36 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -79,7 +79,8 @@ class GIN_EXPORT IsolateHolder { - AccessMode access_mode, - AllowAtomicsWaitMode atomics_wait_mode, +@@ -81,7 +81,8 @@ class GIN_EXPORT IsolateHolder { IsolateType isolate_type, -- IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal); -+ IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal, + IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal, + v8::CreateHistogramCallback create_histogram_callback = nullptr, +- v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr); ++ v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr, + v8::Isolate* isolate = nullptr); IsolateHolder(const IsolateHolder&) = delete; IsolateHolder& operator=(const IsolateHolder&) = delete; diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index fc98f5fc8186f..e2d1de88a9efa 100644 --- a/patches/chromium/load_v8_snapshot_in_browser_process.patch +++ b/patches/chromium/load_v8_snapshot_in_browser_process.patch @@ -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 c97118c1380734e9cdc91b9d7191e0dc71d8b8ed..0a8eb0eddcc0e30b365c293e61c9a7b99ee39eaf 100644 +index d19cd4006e88dc165a6e5fbbe8f1d96547d136f3..ed3a23abbc392ca80d6db86ec6808877bb3f6b0a 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -233,11 +233,8 @@ void LoadV8SnapshotFile() { +@@ -254,11 +254,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, const std::string& process_type) { diff --git a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch index d49318d8bc7ec..e5343e7d4d359 100644 --- a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch +++ b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch @@ -9,10 +9,10 @@ be created for each child process, despite logs being redirected to a file. diff --git a/content/app/content_main.cc b/content/app/content_main.cc -index a26c5c2e053eddb4c70afb166a4643f38eb3c7f6..265b9af981454ab09ed34542ca845fb566b4a75d 100644 +index aef30d74fd92480228281e6982df5afc075aa2c6..4710c3797679a5c7049a037cc0b13a0e3996c16a 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -370,8 +370,12 @@ RunContentProcess(const ContentMainParams& params, +@@ -376,8 +376,12 @@ RunContentProcess(ContentMainParams params, #if defined(OS_WIN) // Route stdio to parent console (if any) or create one. diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 25173107fc285..58f6c7076bcf6 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -11,10 +11,10 @@ needs to think it's coming from the PWA process). I think it can just be chopped out -- if there are any side-effects, we should be able to work around them. diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm -index 6af35b457b4acc4bbbac36b2f8a2617495d9d1f4..3c377839a8882d8e842edd8ca4b9b64cfccc58f9 100644 +index c8ba6f3da89d7d370032dd964c64a327b2e2484e..f9dde6d0a369a2691bac1a1fe1e79c21632abba3 100644 --- a/components/remote_cocoa/app_shim/application_bridge.mm +++ b/components/remote_cocoa/app_shim/application_bridge.mm -@@ -49,6 +49,7 @@ +@@ -50,6 +50,7 @@ // NativeWidgetNSWindowHostHelper: id GetNativeViewAccessible() override { @@ -22,7 +22,7 @@ index 6af35b457b4acc4bbbac36b2f8a2617495d9d1f4..3c377839a8882d8e842edd8ca4b9b64c if (!remote_accessibility_element_) { int64_t browser_pid = 0; std::vector element_token; -@@ -59,6 +60,9 @@ id GetNativeViewAccessible() override { +@@ -60,6 +61,9 @@ id GetNativeViewAccessible() override { ui::RemoteAccessibility::GetRemoteElementFromToken(element_token); } return remote_accessibility_element_.get(); @@ -32,7 +32,7 @@ index 6af35b457b4acc4bbbac36b2f8a2617495d9d1f4..3c377839a8882d8e842edd8ca4b9b64c } void DispatchKeyEvent(ui::KeyEvent* event) override { bool event_handled = false; -@@ -97,8 +101,10 @@ void GetWordAt(const gfx::Point& location_in_content, +@@ -98,8 +102,10 @@ void GetWordAt(const gfx::Point& location_in_content, mojo::AssociatedRemote text_input_host_remote_; std::unique_ptr bridge_; @@ -44,7 +44,7 @@ index 6af35b457b4acc4bbbac36b2f8a2617495d9d1f4..3c377839a8882d8e842edd8ca4b9b64c } // namespace diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index b17d46de296964120e5083c00a3ea9bdaded221f..af30adb8b6074864ca19e8235a248c5d77781468 100644 +index 2cb46846d9c42f8e08c29c39ad8fdbde12bc2ed9..5eb8124be309ad2e55ca01ece23a942b5e1b0101 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 @@ -557,10 +557,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { @@ -61,10 +61,10 @@ index b17d46de296964120e5083c00a3ea9bdaded221f..af30adb8b6074864ca19e8235a248c5d // Beware: This view was briefly removed (in favor of a bare CALayer) in // crrev/c/1236675. The ordering of unassociated layers relative to NSView diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a4dc4ea8e 100644 +index bea5957a47ebc4d75eafa52051be669ac2af9ffd..1f37c096cc4fa40ed26050db1cbdd28aea5dd681 100644 --- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm +++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -@@ -70,8 +70,10 @@ id GetFocusedBrowserAccessibilityElement() override { +@@ -75,8 +75,10 @@ id GetFocusedBrowserAccessibilityElement() override { return nil; } void SetAccessibilityWindow(NSWindow* window) override { @@ -75,7 +75,7 @@ index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a } void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, -@@ -133,8 +135,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { +@@ -138,8 +140,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { mojo::AssociatedRemote host_; std::unique_ptr bridge_; @@ -83,11 +83,11 @@ index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a base::scoped_nsobject remote_accessibility_element_; +#endif - - DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostNSViewBridgeOwner); }; + } + 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 2b262cc807162d91cb09393d58ceb4e7d9c2be34..5e66be5ceb963e6f13742c66b0a9cd79f0d91446 100644 +index ca7e571a096f1e91f69a356b0d6d833878d49121..5d6ba8288a0d5e41ba48a643a30cac47f99cadf7 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -49,7 +49,9 @@ class ScopedPasswordInputEnabler; @@ -100,7 +100,7 @@ index 2b262cc807162d91cb09393d58ceb4e7d9c2be34..5e66be5ceb963e6f13742c66b0a9cd79 @class RenderWidgetHostViewCocoa; namespace content { -@@ -657,10 +659,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -665,10 +667,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; @@ -114,10 +114,10 @@ index 2b262cc807162d91cb09393d58ceb4e7d9c2be34..5e66be5ceb963e6f13742c66b0a9cd79 // 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 d1aae9cbefad2b31dcd98e0c95891943b027cc5f..ec191047cca6d8e7d00e445942461e9b47098ec1 100644 +index 54656ab59428fb50805705da2afeca27808d5f39..f08bcf90e8ad1827dcab99bcb303d1848ad0a56f 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -249,8 +249,10 @@ +@@ -252,8 +252,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -128,7 +128,7 @@ index d1aae9cbefad2b31dcd98e0c95891943b027cc5f..ec191047cca6d8e7d00e445942461e9b // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1455,8 +1457,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1477,8 +1479,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -139,7 +139,7 @@ index d1aae9cbefad2b31dcd98e0c95891943b027cc5f..ec191047cca6d8e7d00e445942461e9b return [GetInProcessNSView() window]; } -@@ -1500,9 +1504,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1522,9 +1526,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -151,7 +151,7 @@ index d1aae9cbefad2b31dcd98e0c95891943b027cc5f..ec191047cca6d8e7d00e445942461e9b } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -1995,12 +2001,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2017,12 +2023,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -167,10 +167,10 @@ index d1aae9cbefad2b31dcd98e0c95891943b027cc5f..ec191047cca6d8e7d00e445942461e9b /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 9cce2f63140db5370ef9400dd83cc3d8fe0e9323..909ffe62a19bf8752abb038223a0823dd613586c 100644 +index 42b4415f1501ae9c6895b325f718b699b486daba..92f6a2a971951fca55f452dd0bcd60b1ad66d29c 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -322,6 +322,13 @@ component("base") { +@@ -314,6 +314,13 @@ component("base") { ] } @@ -205,10 +205,10 @@ index e7adfee3210ec723c687adfcc4bee8827ef643e7..25a924a47eeb30d783ef83dbb4896c4b + #endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_ diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h -index 2d6816834ac6ca1f487d889e2a2a1715b8047beb..6369db1564d6f48d5290f356725ccfcafbc045c4 100644 +index 0dfd2de62df57def834a3be4349685da3aab72fb..1881932c122daad0d62e3382bd0e221402b6d380 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h -@@ -30,7 +30,9 @@ +@@ -29,7 +29,9 @@ #include "ui/views/window/dialog_observer.h" @class NativeWidgetMacNSWindow; @@ -218,7 +218,7 @@ index 2d6816834ac6ca1f487d889e2a2a1715b8047beb..6369db1564d6f48d5290f356725ccfca @class NSView; namespace remote_cocoa { -@@ -430,11 +432,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -429,11 +431,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -233,10 +233,10 @@ index 2d6816834ac6ca1f487d889e2a2a1715b8047beb..6369db1564d6f48d5290f356725ccfca // Used to force the NSApplication's focused accessibility element to be the // views::Views accessibility tree when the NSView for this is focused. diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -index c93fa3fd7ebbecbc6fa8eb7db485f39f3b05da9a..bef702754dd0c45037dddbadd2663ee88ad5301e 100644 +index 48dd1adb4a74201a866b254cfaec85b996ee7517..5b2a46594a23968034a17fbfed173e1031867df9 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -285,14 +285,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -286,14 +286,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const { if (in_process_ns_window_bridge_) return in_process_ns_window_bridge_->ns_view(); @@ -259,7 +259,7 @@ index c93fa3fd7ebbecbc6fa8eb7db485f39f3b05da9a..bef702754dd0c45037dddbadd2663ee8 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1205,6 +1213,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1206,6 +1214,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -267,7 +267,7 @@ index c93fa3fd7ebbecbc6fa8eb7db485f39f3b05da9a..bef702754dd0c45037dddbadd2663ee8 remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1212,14 +1221,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1213,14 +1222,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, [remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()]; [remote_view_accessible_ setTopLevelUIElement:remote_window_accessible_.get()]; diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index 63241f1450584..20cabc776d492 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -40,7 +40,7 @@ index c384f18ec959303bd3671c570af87b604d20cf23..f420bd94951f5a2b03d20e5892a40392 gfx::Size pixel_size_; diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -index 55340e6c038485e3a75126e85fd166c6569b39e6..8afeb88576adcd06d7bb0a52250fbff98f0b513a 100644 +index 79a357037df22c78d31ace77ee8cf6291818ecee..3c7d5add7e4f4372708a1b2f7bf31f7b0a4aa0af 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm @@ -53,7 +53,7 @@ diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 2df17983178e8..39be49c9f35b1 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -7,10 +7,10 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be excluded for people who want to submit their apps to the Mac App store. diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm -index 4bdefce738229f76f8fc9998733314284f5fa97a..699bf65a0e39a09d8689e85a55c203729b2f7e7e 100644 +index 393ff52e2ba4835aced71337745de8cadbb32dba..38ed439c10522dedae714ea3b7683150d083a743 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm +++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm -@@ -289,7 +289,7 @@ +@@ -295,7 +295,7 @@ return PopulateSize([value sizeValue]); } } @@ -19,7 +19,7 @@ index 4bdefce738229f76f8fc9998733314284f5fa97a..699bf65a0e39a09d8689e85a55c20372 // AXTextMarker if (content::IsAXTextMarker(value)) { return PopulateTextPosition(content::AXTextMarkerToAXPosition(value), -@@ -300,6 +300,7 @@ +@@ -306,6 +306,7 @@ if (content::IsAXTextMarkerRange(value)) { return PopulateTextMarkerRange(value, line_indexer); } @@ -27,7 +27,7 @@ index 4bdefce738229f76f8fc9998733314284f5fa97a..699bf65a0e39a09d8689e85a55c20372 // AXValue if (CFGetTypeID(value) == AXValueGetTypeID()) { -@@ -419,7 +420,7 @@ +@@ -425,7 +426,7 @@ AXMakeConst(affinity)); return set; } @@ -36,7 +36,7 @@ index 4bdefce738229f76f8fc9998733314284f5fa97a..699bf65a0e39a09d8689e85a55c20372 base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange( id marker_range, const LineIndexer* line_indexer) const { -@@ -435,7 +436,7 @@ +@@ -441,7 +442,7 @@ PopulateTextPosition(ax_range.focus()->Clone(), line_indexer)); return dict; } @@ -46,10 +46,10 @@ index 4bdefce738229f76f8fc9998733314284f5fa97a..699bf65a0e39a09d8689e85a55c20372 NSArray* node_array, const LineIndexer* line_indexer) const { diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h -index f1a82347e5c982609b8dcad10b969d332a665b30..26ab7745450cc807761026a677c435db900cdbd9 100644 +index d03389f1d879b20edada440efad6cc319a275585..b63a6a7e4b269195851b5885a83ee88d8edb6f1c 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h -@@ -133,12 +133,14 @@ class CONTENT_EXPORT AttributeInvoker final { +@@ -151,12 +151,14 @@ class CONTENT_EXPORT AttributeInvoker final { const ui::AXPropertyNode&, bool log_failure = true) const; @@ -65,10 +65,10 @@ index f1a82347e5c982609b8dcad10b969d332a665b30..26ab7745450cc807761026a677c435db gfx::NativeViewAccessible LineIndexToNode( const std::u16string line_index) const; diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm -index 37d54fb830e039077375d1d0c1aefea9bafebc2e..68148b48610d13a89a3afad58a034001ea120712 100644 +index 5c895027b212462a0404d01fe4842116d19633c6..fe41aa78abd3e31892ccdee9fcb0b5351943fa84 100644 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm -@@ -178,9 +178,11 @@ +@@ -180,9 +180,11 @@ if (IsBrowserAccessibilityCocoa(target) || IsAXUIElement(target)) return InvokeForAXElement(target, property_node); @@ -80,7 +80,7 @@ index 37d54fb830e039077375d1d0c1aefea9bafebc2e..68148b48610d13a89a3afad58a034001 if ([target isKindOfClass:[NSArray class]]) return InvokeForArray(target, property_node); -@@ -383,6 +385,7 @@ +@@ -380,6 +382,7 @@ property_name == "AXTextMarkerRangeForUIElement") { // UIElement return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node)); } @@ -88,7 +88,7 @@ index 37d54fb830e039077375d1d0c1aefea9bafebc2e..68148b48610d13a89a3afad58a034001 if (property_name == "AXIndexForTextMarker" || property_name == "AXNextWordEndTextMarkerForTextMarker" || property_name == -@@ -394,6 +397,7 @@ +@@ -391,6 +394,7 @@ return OptionalNSObject::NotNilOrError( PropertyNodeToTextMarkerRange(arg_node)); } @@ -96,7 +96,7 @@ index 37d54fb830e039077375d1d0c1aefea9bafebc2e..68148b48610d13a89a3afad58a034001 return OptionalNSObject::NotApplicable(); } -@@ -406,6 +410,7 @@ +@@ -403,6 +407,7 @@ return value; // NSRange @@ -104,7 +104,7 @@ index 37d54fb830e039077375d1d0c1aefea9bafebc2e..68148b48610d13a89a3afad58a034001 value = PropertyNodeToRange(property_node, false); if (value) return value; -@@ -422,6 +427,10 @@ +@@ -419,6 +424,10 @@ // TextMarkerRange return PropertyNodeToTextMarkerRange(property_node, false); @@ -115,7 +115,7 @@ index 37d54fb830e039077375d1d0c1aefea9bafebc2e..68148b48610d13a89a3afad58a034001 } // NSNumber. Format: integer. -@@ -532,6 +541,7 @@ +@@ -529,6 +538,7 @@ return uielement; } @@ -123,35 +123,19 @@ index 37d54fb830e039077375d1d0c1aefea9bafebc2e..68148b48610d13a89a3afad58a034001 id AttributeInvoker::DictNodeToTextMarker(const AXPropertyNode& dictnode, bool log_failure) const { if (!dictnode.IsDict()) { -@@ -577,6 +587,7 @@ - return content::AXTextMarkerFrom(anchor_cocoa, *offset, affinity); - } - -+#ifndef MAS_BUILD - id AttributeInvoker::PropertyNodeToTextMarker(const AXPropertyNode& dictnode, - bool log_failure) const { - return DictNodeToTextMarker(dictnode, log_failure); -@@ -621,6 +632,7 @@ +@@ -618,6 +628,7 @@ return content::AXTextMarkerRangeFrom(anchor_textmarker, focus_textmarker); } +#endif - OptionalNSObject TextMarkerRangeGetStartMarker(const OptionalNSObject& obj) { - if (!IsAXTextMarkerRange(*obj)) -@@ -660,6 +672,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) { - return OptionalNSObject::NotNilOrError(content::AXTextMarkerFrom( - cocoa_node, range.focus()->text_offset(), range.focus()->affinity())); - } -+#endif - - OptionalNSObject MakePairArray(const OptionalNSObject& obj1, - const OptionalNSObject& obj2) { + } // namespace a11y + } // namespace content diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h -index 0282b3c04cf0281820b716d0991af5ac4d6304de..ad0da68df963cc0872dc545ef525128ff0f8a0b0 100644 +index 06a6d289320b4f4256ccc64f7b5567e4c69ed8f8..e6fe435e3ca34c6ac6db42f082a7783b2b3ec031 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.h +++ b/content/browser/accessibility/browser_accessibility_cocoa.h -@@ -157,7 +157,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker); +@@ -150,7 +150,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker); @property(nonatomic, readonly) NSNumber* enabled; // Returns a text marker that points to the last character in the document that // can be selected with Voiceover. @@ -161,17 +145,17 @@ index 0282b3c04cf0281820b716d0991af5ac4d6304de..ad0da68df963cc0872dc545ef525128f @property(nonatomic, readonly) NSNumber* expanded; @property(nonatomic, readonly) NSNumber* focused; @property(nonatomic, readonly) NSNumber* grabbed; -@@ -169,7 +171,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker); +@@ -162,7 +164,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker); // Index of a row, column, or tree item. @property(nonatomic, readonly) NSNumber* index; @property(nonatomic, readonly) NSNumber* treeItemRowIndex; +#ifndef MAS_BUILD @property(nonatomic, readonly) NSNumber* insertionPointLineNumber; +#endif - @property(nonatomic, readonly) NSString* invalid; @property(nonatomic, readonly) NSNumber* isMultiSelectable; @property(nonatomic, readonly) NSNumber* loaded; -@@ -191,14 +195,18 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker); + @property(nonatomic, readonly) NSNumber* loadingProgress; +@@ -183,14 +187,18 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker); // The object is selected as a whole. @property(nonatomic, readonly) NSNumber* selected; @property(nonatomic, readonly) NSArray* selectedChildren; @@ -191,18 +175,19 @@ index 0282b3c04cf0281820b716d0991af5ac4d6304de..ad0da68df963cc0872dc545ef525128f // is concerned. @property(nonatomic, readonly) NSString* subrole; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm -index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd5d31c0cb 100644 +index 5f00a94dfe76753e8588b9ff246be64e9338932c..c9456a8dc2673b856df68d5230a370f1d1e4b734 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm -@@ -206,6 +206,7 @@ +@@ -195,6 +195,8 @@ NSString* const NSAccessibilityLengthForTextMarkerRangeParameterizedAttribute = @"AXLengthForTextMarkerRange"; ++ +#ifndef MAS_BUILD // Private attributes that can be used for testing text markers, e.g. in dump // tree tests. NSString* const -@@ -217,6 +218,7 @@ +@@ -206,6 +208,7 @@ NSString* const NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute = @"AXTextMarkerNodeDebugDescription"; @@ -210,15 +195,15 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd // Other private attributes. NSString* const NSAccessibilityIdentifierChromeAttribute = @"ChromeAXNodeId"; -@@ -241,6 +243,7 @@ +@@ -230,6 +233,7 @@ // VoiceOver uses -1 to mean "no limit" for AXResultsLimit. const int kAXResultsLimitNoLimit = -1; +#ifndef MAS_BUILD - extern "C" { - // The following are private accessibility APIs required for cursor navigation -@@ -479,6 +482,7 @@ void AddMisspelledTextAttributes(const BrowserAccessibility::AXRange& ax_range, + // and text selection. VoiceOver started relying on them in Mac OS X 10.11. + // They are public as of the 12.0 SDK. +@@ -464,6 +468,7 @@ void AddMisspelledTextAttributes(const BrowserAccessibility::AXRange& ax_range, AddMisspelledTextAttributes(ax_range, attributed_text); return attributed_text; } @@ -226,7 +211,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd // Returns an autoreleased copy of the AXNodeData's attribute. NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility, -@@ -755,6 +759,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) { +@@ -740,6 +745,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) { 0 == strcmp([value objCType], @encode(NSRange)); } @@ -234,15 +219,15 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd bool content::IsAXTextMarker(id object) { if (object == nil) return false; -@@ -798,6 +803,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) { - kCFAllocatorDefault, anchor_textmarker, focus_textmarker); +@@ -784,6 +790,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) { + static_cast(focus_textmarker)); return [static_cast(cf_marker_range) autorelease]; } +#endif @implementation BrowserAccessibilityCocoa -@@ -838,7 +844,9 @@ + (void)initialize { +@@ -815,7 +822,9 @@ + (void)initialize { {NSAccessibilityEditableAncestorAttribute, @"editableAncestor"}, {NSAccessibilityElementBusyAttribute, @"elementBusy"}, {NSAccessibilityEnabledAttribute, @"enabled"}, @@ -252,7 +237,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd {NSAccessibilityExpandedAttribute, @"expanded"}, {NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"}, {NSAccessibilityFocusedAttribute, @"focused"}, -@@ -850,8 +858,10 @@ + (void)initialize { +@@ -827,8 +836,10 @@ + (void)initialize { {NSAccessibilityHighestEditableAncestorAttribute, @"highestEditableAncestor"}, {NSAccessibilityIndexAttribute, @"index"}, @@ -260,10 +245,10 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd {NSAccessibilityInsertionPointLineNumberAttribute, @"insertionPointLineNumber"}, +#endif - {NSAccessibilityInvalidAttribute, @"invalid"}, {NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"}, {NSAccessibilityLanguageAttribute, @"language"}, -@@ -873,13 +883,17 @@ + (void)initialize { + {NSAccessibilityLinkedUIElementsAttribute, @"linkedUIElements"}, +@@ -849,13 +860,17 @@ + (void)initialize { {NSAccessibilityRowsAttribute, @"rows"}, // TODO(aboxhall): expose // NSAccessibilityServesAsTitleForUIElementsAttribute @@ -281,7 +266,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd {NSAccessibilitySizeAttribute, @"size"}, {NSAccessibilitySortDirectionAttribute, @"sortDirection"}, {NSAccessibilitySubroleAttribute, @"subrole"}, -@@ -1411,6 +1425,7 @@ - (NSNumber*)enabled { +@@ -1259,6 +1274,7 @@ - (NSNumber*)enabled { ax::mojom::Restriction::kDisabled); } @@ -289,7 +274,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd // Returns a text marker that points to the last character in the document that // can be selected with VoiceOver. - (id)endTextMarker { -@@ -1419,6 +1434,7 @@ - (id)endTextMarker { +@@ -1267,6 +1283,7 @@ - (id)endTextMarker { BrowserAccessibility::AXPosition position = _owner->CreateTextPositionAt(0); return CreateTextMarker(position->CreatePositionAtEndOfContent()); } @@ -297,7 +282,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd - (NSNumber*)expanded { if (![self instanceActive]) -@@ -1619,6 +1635,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind +@@ -1467,6 +1484,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind return false; } @@ -305,7 +290,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd - (NSNumber*)AXInsertionPointLineNumber { return [self insertionPointLineNumber]; } -@@ -1648,6 +1665,7 @@ - (NSNumber*)insertionPointLineNumber { +@@ -1496,6 +1514,7 @@ - (NSNumber*)insertionPointLineNumber { caretPosition->AsTextPosition()->text_offset()); return @(std::distance(lineBreaks.begin(), iterator)); } @@ -313,7 +298,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd // Returns whether or not this node should be ignored in the // accessibility tree. -@@ -1998,8 +2016,12 @@ - (BOOL)shouldExposeTitleUIElement { +@@ -1826,8 +1845,12 @@ - (BOOL)shouldExposeTitleUIElement { return content::AXTextEdit(newValue, std::u16string(), nil); } } @@ -326,7 +311,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd } // internal -@@ -2328,6 +2350,7 @@ - (NSArray*)selectedChildren { +@@ -2157,6 +2180,7 @@ - (NSArray*)selectedChildren { return ret; } @@ -334,7 +319,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd - (NSString*)AXSelectedText { return [self selectedText]; } -@@ -2376,7 +2399,9 @@ - (NSValue*)selectedTextRange { +@@ -2205,7 +2229,9 @@ - (NSValue*)selectedTextRange { int selLength = range.GetText().length(); return [NSValue valueWithRange:NSMakeRange(selStart, selLength)]; } @@ -344,7 +329,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd - (id)selectedTextMarkerRange { if (![self instanceActive]) return nil; -@@ -2388,6 +2413,7 @@ - (id)selectedTextMarkerRange { +@@ -2217,6 +2243,7 @@ - (id)selectedTextMarkerRange { // words correctly. return CreateTextMarkerRange(ax_range.AsBackwardRange()); } @@ -352,7 +337,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd - (NSValue*)size { if (![self instanceActive]) -@@ -2420,6 +2446,7 @@ - (NSString*)sortDirection { +@@ -2249,6 +2276,7 @@ - (NSString*)sortDirection { return nil; } @@ -360,7 +345,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd // Returns a text marker that points to the first character in the document that // can be selected with VoiceOver. - (id)startTextMarker { -@@ -2428,6 +2455,7 @@ - (id)startTextMarker { +@@ -2257,6 +2285,7 @@ - (id)startTextMarker { BrowserAccessibility::AXPosition position = _owner->CreateTextPositionAt(0); return CreateTextMarker(position->CreatePositionAtStartOfContent()); } @@ -368,22 +353,22 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd - (NSString*)AXSubrole { return [self subrole]; -@@ -2771,12 +2799,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range { - NSMutableAttributedString* attributedInnerText = +@@ -2600,12 +2629,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range { + NSMutableAttributedString* attributedTextContent = [[[NSMutableAttributedString alloc] - initWithString:base::SysUTF16ToNSString(innerText)] autorelease]; + initWithString:base::SysUTF16ToNSString(textContent)] autorelease]; +#ifndef MAS_BUILD if (!_owner->IsText()) { BrowserAccessibility::AXRange ax_range( _owner->CreateTextPositionAt(0), - _owner->CreateTextPositionAt(static_cast(innerText.length()))); - AddMisspelledTextAttributes(ax_range, attributedInnerText); + _owner->CreateTextPositionAt(static_cast(textContent.length()))); + AddMisspelledTextAttributes(ax_range, attributedTextContent); } +#endif - return [attributedInnerText attributedSubstringFromRange:range]; + return [attributedTextContent attributedSubstringFromRange:range]; } -@@ -2908,6 +2938,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -2737,6 +2768,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return ToBrowserAccessibilityCocoa(cell); } @@ -391,7 +376,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd if ([attribute isEqualToString: NSAccessibilityUIElementForTextMarkerParameterizedAttribute]) { -@@ -3231,6 +3262,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -3062,6 +3094,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return CreateTextMarker(root->CreateTextPositionAt(index)); } @@ -399,7 +384,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd if ([attribute isEqualToString: NSAccessibilityBoundsForRangeParameterizedAttribute]) { -@@ -3261,6 +3293,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -3092,6 +3125,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return nil; } @@ -407,7 +392,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd if ([attribute isEqualToString: NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) { -@@ -3380,6 +3413,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute +@@ -3211,6 +3245,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return @(child->GetIndexInParent()); } @@ -415,7 +400,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd return nil; } -@@ -3946,6 +3980,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { +@@ -3761,6 +3796,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { ->AsTextSelectionPosition())); } } @@ -423,7 +408,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd if ([attribute isEqualToString:NSAccessibilitySelectedTextMarkerRangeAttribute]) { BrowserAccessibility::AXRange range = CreateRangeFromTextMarkerRange(value); -@@ -3956,6 +3991,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { +@@ -3771,6 +3807,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { range.anchor()->AsTextSelectionPosition(), range.focus()->AsTextSelectionPosition())); } @@ -432,7 +417,7 @@ index 06e0766c6023768dc88f4d7deb28b1960c594ebb..980b855b6c52bdc39bf9e79e2b1618bd - (id)accessibilityFocusedUIElement { diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index c4c0e0aaa1be36160152388a304bbc62d73cb01c..44dfc7394784c32e3f3c8bab7b6304229862ce3e 100644 +index 2084f4677670646ba769f2fe68797a5e5647f3f3..49914bdc1cbd8f55fcd55eaf912df04279d86bb7 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm @@ -502,7 +502,7 @@ void PostAnnouncementNotification(NSString* announcement) { @@ -541,7 +526,7 @@ index c15f3a631292b538698625328fb429ee3c9964f5..37e038753ecf1b82ec92c06b2c0729b5 } diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm -index 91ed4a803558524223931d913ca9fd6dd00d7e37..b4c59d1ad7df77743dc4cc8f4e378b21f2b5e553 100644 +index 77a020140dd635148fcd8d9b08d8d1f4ed852415..902e77ce90a60c835a9a324decf3d0dd094f1c85 100644 --- a/device/bluetooth/bluetooth_adapter_mac.mm +++ b/device/bluetooth/bluetooth_adapter_mac.mm @@ -42,6 +42,7 @@ @@ -585,10 +570,10 @@ index 91ed4a803558524223931d913ca9fd6dd00d7e37..b4c59d1ad7df77743dc4cc8f4e378b21 void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 9c8628a08045c7793f088200b58b492b9f0581cf..1c5b6e85bce201fc13c34671b076176793ae053c 100644 +index 5e1b1f542e98f9257938f909a2d92e3117e298af..4b9825694c8b8d6bbe671ebeef8eb57baf8b05a1 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -175,6 +175,12 @@ source_set("audio") { +@@ -174,6 +174,12 @@ source_set("audio") { "mac/scoped_audio_unit.cc", "mac/scoped_audio_unit.h", ] @@ -602,10 +587,10 @@ index 9c8628a08045c7793f088200b58b492b9f0581cf..1c5b6e85bce201fc13c34671b0761767 "AudioToolbox.framework", "AudioUnit.framework", diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc -index 2066a12b1940bcec87ab01e94cb63ea46b1c46db..d6e08b56420077bbdddd81c12a535fea62197aca 100644 +index ebdc6364312ee710d416318836c03aeec9bfb65c..aa9b50de7efaf0e1b64effea93204984c91790b5 100644 --- a/media/audio/mac/audio_manager_mac.cc +++ b/media/audio/mac/audio_manager_mac.cc -@@ -887,7 +887,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( +@@ -886,7 +886,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters( void AudioManagerMac::InitializeOnAudioThread() { DCHECK(GetTaskRunner()->BelongsToCurrentThread()); @@ -615,7 +600,7 @@ index 2066a12b1940bcec87ab01e94cb63ea46b1c46db..d6e08b56420077bbdddd81c12a535fea } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index 1aef5a0d9d4cdfcb669118a4f7244819ff14ed39..e418ef18ed7e1855090f201ab2de9bc240643e84 100644 +index 3a541ac224c53b2809e8634286dac91873d46b72..89c9b095a2a96b9cae5e8d4bba85847f9585f985 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc @@ -140,8 +140,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index 98e24b9d23e8d..380fce21da176 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,7 +7,7 @@ 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 f8fddf1b0a2c7b0eefaa0e7dd550594cc274b91b..39ff43884fbc2b6768d7ddb6e9d63031a973b8fa 100644 +index 0fa1d408f99f087f913c96c9d5fc262c42f2f067..6321d35d649a58c91df621a088c23879901ef6aa 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -119,6 +119,11 @@ @@ -22,7 +22,7 @@ index f8fddf1b0a2c7b0eefaa0e7dd550594cc274b91b..39ff43884fbc2b6768d7ddb6e9d63031 #if BUILDFLAG(IS_CT_SUPPORTED) #include "components/certificate_transparency/chrome_ct_policy_enforcer.h" #include "components/certificate_transparency/chrome_require_ct_delegate.h" -@@ -420,6 +425,79 @@ bool GetFullDataFilePath( +@@ -425,6 +430,79 @@ bool GetFullDataFilePath( } // namespace @@ -102,7 +102,7 @@ index f8fddf1b0a2c7b0eefaa0e7dd550594cc274b91b..39ff43884fbc2b6768d7ddb6e9d63031 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -644,6 +722,13 @@ void NetworkContext::SetClient( +@@ -651,6 +729,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -116,7 +116,7 @@ index f8fddf1b0a2c7b0eefaa0e7dd550594cc274b91b..39ff43884fbc2b6768d7ddb6e9d63031 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2088,6 +2173,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2106,6 +2191,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -127,10 +127,10 @@ index f8fddf1b0a2c7b0eefaa0e7dd550594cc274b91b..39ff43884fbc2b6768d7ddb6e9d63031 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 9f204502a1d58e16ef191efc7bda2315dc0e3d50..8362af824a8dd4f721eebdbff2d544f7f5093d16 100644 +index e5497a2346da9d2d643885c846acb71bf11408be..5535c101c809f23f3adc85b06d42ee34f135da4b 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -99,6 +99,7 @@ class DomainReliabilityMonitor; +@@ -102,6 +102,7 @@ class DomainReliabilityMonitor; namespace network { class CertVerifierWithTrustAnchors; @@ -138,7 +138,7 @@ index 9f204502a1d58e16ef191efc7bda2315dc0e3d50..8362af824a8dd4f721eebdbff2d544f7 class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -213,6 +214,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -216,6 +217,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -147,7 +147,7 @@ index 9f204502a1d58e16ef191efc7bda2315dc0e3d50..8362af824a8dd4f721eebdbff2d544f7 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -746,6 +749,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -755,6 +758,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; #endif @@ -157,10 +157,10 @@ index 9f204502a1d58e16ef191efc7bda2315dc0e3d50..8362af824a8dd4f721eebdbff2d544f7 // CertNetFetcher is not used by the current platform, or if the actual // net::CertVerifier is instantiated outside of the network service. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index f3f625cc6d5457012703c25a89684f9ad9f05768..8f8b496324265b25046a88cbac7decec056f061e 100644 +index 502e989d74e8ad5682401c60f845fb21219d9058..64f046dfc5e3eab241547b2dc4b118daef68d7d6 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -265,6 +265,17 @@ struct NetworkContextFilePaths { +@@ -269,6 +269,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -178,7 +178,7 @@ index f3f625cc6d5457012703c25a89684f9ad9f05768..8f8b496324265b25046a88cbac7decec // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -773,6 +784,9 @@ interface NetworkContext { +@@ -777,6 +788,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index c820b27417ced..dc499c73b2624 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -7,10 +7,10 @@ Pass RenderProcessHost through to PlatformNotificationService so Electron can identify which renderer a notification came from. diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc -index 442b856f8bcfbcea7742188897f0ce0a25cd60f4..6165eb772901faa25514c9bbefd13ff6b45d6b33 100644 +index a6029901f614006207a0d91bda490e85319f7cb7..b2a6f96f51f232a22ef20ea1521ef80976861859 100644 --- a/content/browser/notifications/blink_notification_service_impl.cc +++ b/content/browser/notifications/blink_notification_service_impl.cc -@@ -81,10 +81,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( +@@ -83,10 +83,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( PlatformNotificationContextImpl* notification_context, BrowserContext* browser_context, scoped_refptr service_worker_context, @@ -23,7 +23,7 @@ index 442b856f8bcfbcea7742188897f0ce0a25cd60f4..6165eb772901faa25514c9bbefd13ff6 browser_context_(browser_context), service_worker_context_(std::move(service_worker_context)), origin_(origin), -@@ -147,7 +149,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification( +@@ -149,7 +151,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification( notification_id, std::move(event_listener_remote)); browser_context_->GetPlatformNotificationService()->DisplayNotification( @@ -33,10 +33,10 @@ index 442b856f8bcfbcea7742188897f0ce0a25cd60f4..6165eb772901faa25514c9bbefd13ff6 } diff --git a/content/browser/notifications/blink_notification_service_impl.h b/content/browser/notifications/blink_notification_service_impl.h -index e4b630b54fe782879f7c79afb13aa025dd1505b2..983804b6846a4f5b07e72a1c7c7e0b871b4eddf7 100644 +index 98da5ed077b329f4abc911a3f21bfbbe8b8fb069..dea0f129cd9744bd54d15c041f9f02594228eb8f 100644 --- a/content/browser/notifications/blink_notification_service_impl.h +++ b/content/browser/notifications/blink_notification_service_impl.h -@@ -41,6 +41,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl +@@ -40,6 +40,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl PlatformNotificationContextImpl* notification_context, BrowserContext* browser_context, scoped_refptr service_worker_context, @@ -44,7 +44,7 @@ index e4b630b54fe782879f7c79afb13aa025dd1505b2..983804b6846a4f5b07e72a1c7c7e0b87 const url::Origin& origin, const GURL& document_url, mojo::PendingReceiver receiver); -@@ -101,6 +102,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl +@@ -103,6 +104,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl // The notification context that owns this service instance. PlatformNotificationContextImpl* notification_context_; @@ -53,10 +53,10 @@ index e4b630b54fe782879f7c79afb13aa025dd1505b2..983804b6846a4f5b07e72a1c7c7e0b87 scoped_refptr service_worker_context_; diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc -index e1fe936d73bb74a2708993ce72443f62ebb969f8..ba46243ca95466243afbc82fc689aa43cd84e61b 100644 +index f0d5ea365cf09d2dc06de88fc03e4bf5ddfdf4a6..b68666813ab231a3d4233d3ed2f9655b18d8a280 100644 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc -@@ -127,7 +127,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { +@@ -126,7 +126,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test { notification_service_ = std::make_unique( notification_context_.get(), &browser_context_, @@ -66,7 +66,7 @@ index e1fe936d73bb74a2708993ce72443f62ebb969f8..ba46243ca95466243afbc82fc689aa43 /*document_url=*/GURL(), notification_service_remote_.BindNewPipeAndPassReceiver()); diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc -index 883cfb82286da5237e3b7ec35632bf575be6c413..805c6476e09857af75d391276357b2c2e08ea8c0 100644 +index 8e23ab272000a1244959bf9164d6880660d4a843..ff89f2bdf07e91029841bab7ce7c7a92526c0132 100644 --- a/content/browser/notifications/platform_notification_context_impl.cc +++ b/content/browser/notifications/platform_notification_context_impl.cc @@ -281,13 +281,14 @@ void PlatformNotificationContextImpl::Shutdown() { @@ -87,10 +87,10 @@ index 883cfb82286da5237e3b7ec35632bf575be6c413..805c6476e09857af75d391276357b2c2 void PlatformNotificationContextImpl::RemoveService( diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h -index 78f9ab684d2eeef9a647d82ccb39c1b208e999d4..d55a4e51a0d263ec07ca115715cccc30f89bd9e0 100644 +index 072881f0d2b47c3ed2b3d7e49da5a49ed5176349..4617e81ac64586001e63c536e9b066ddb77b194a 100644 --- a/content/browser/notifications/platform_notification_context_impl.h +++ b/content/browser/notifications/platform_notification_context_impl.h -@@ -48,6 +48,7 @@ class BrowserContext; +@@ -47,6 +47,7 @@ class BrowserContext; struct NotificationDatabaseData; class PlatformNotificationServiceProxy; class ServiceWorkerContextWrapper; @@ -98,7 +98,7 @@ index 78f9ab684d2eeef9a647d82ccb39c1b208e999d4..d55a4e51a0d263ec07ca115715cccc30 // Implementation of the Web Notification storage context. The public methods // defined in this interface must only be called on the UI thread. -@@ -72,6 +73,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl +@@ -76,6 +77,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl // Creates a BlinkNotificationServiceImpl that is owned by this context. // |document_url| is empty when originating from a worker. void CreateService( @@ -107,10 +107,10 @@ index 78f9ab684d2eeef9a647d82ccb39c1b208e999d4..d55a4e51a0d263ec07ca115715cccc30 const GURL& document_url, mojo::PendingReceiver receiver); diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 00a6377d2136771abf68d19bc5cb0a03b2a3d738..7e9d623030976aef80b37d2a224abc9b3013ede7 100644 +index 65f04c931878041c335a2f995c1a48a4f7145813..6284092e8744a28f582f42f45154483bc6d1aa5e 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2245,7 +2245,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2113,7 +2113,7 @@ void RenderProcessHostImpl::CreateNotificationService( document_url = rfh->GetLastCommittedURL(); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -153,10 +153,10 @@ index 7397963a36bec7016ae92fbc4bb741825e5fb8d1..d928e1ea629cd69ff188ce53e311786a const GURL& origin, const GURL& document_url, diff --git a/content/test/mock_platform_notification_service.h b/content/test/mock_platform_notification_service.h -index ac33e0fb5a4eda45a300b7dd60a320468a857ed3..2f85e387c33628ac28ba95f04d4bd7d97b72fc51 100644 +index 7baae145754fd4b236c229335e27e5221ef085ed..5b87cc4bbf6c7d17cb790c8927b613150505dc0b 100644 --- a/content/test/mock_platform_notification_service.h +++ b/content/test/mock_platform_notification_service.h -@@ -52,6 +52,7 @@ class MockPlatformNotificationService : public PlatformNotificationService { +@@ -51,6 +51,7 @@ class MockPlatformNotificationService : public PlatformNotificationService { // PlatformNotificationService implementation. void DisplayNotification( diff --git a/patches/chromium/pepper_plugin_support.patch b/patches/chromium/pepper_plugin_support.patch index 2c0dcd6dcbac9..5cb46958c92ce 100644 --- a/patches/chromium/pepper_plugin_support.patch +++ b/patches/chromium/pepper_plugin_support.patch @@ -7,7 +7,7 @@ This tweaks Chrome's pepper flash and PDF plugin support to make it usable from Electron. diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc -index d75adab3141094e2897b2ed4ca9005bf82d70979..7ee78a7345e29a3ee8836a7a06af9a63258d7340 100644 +index 308e7bff4ea829f5e68a93e77e0205f3f6a509c4..88a1e057ed8873f05e0d11160e7994bc244092d2 100644 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc @@ -7,17 +7,21 @@ @@ -54,18 +54,24 @@ index d75adab3141094e2897b2ed4ca9005bf82d70979..7ee78a7345e29a3ee8836a7a06af9a63 // static PepperIsolatedFileSystemMessageFilter* -@@ -68,8 +72,10 @@ PepperIsolatedFileSystemMessageFilter::PepperIsolatedFileSystemMessageFilter( - profile_directory_(profile_directory), - document_url_(document_url), - ppapi_host_(ppapi_host) { +@@ -64,11 +68,16 @@ PepperIsolatedFileSystemMessageFilter::PepperIsolatedFileSystemMessageFilter( + const base::FilePath& profile_directory, + const GURL& document_url, + ppapi::host::PpapiHost* ppapi_host) +#if 0 + : render_process_id_(render_process_id), + profile_directory_(profile_directory), + document_url_(document_url) { for (size_t i = 0; i < base::size(kPredefinedAllowedCrxFsOrigins); ++i) allowed_crxfs_origins_.insert(kPredefinedAllowedCrxFsOrigins[i]); ++#else ++ : profile_directory_(profile_directory), ++ document_url_(document_url) { +#endif } PepperIsolatedFileSystemMessageFilter:: -@@ -94,6 +100,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived( +@@ -93,6 +102,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived( return PP_ERROR_FAILED; } @@ -73,7 +79,7 @@ index d75adab3141094e2897b2ed4ca9005bf82d70979..7ee78a7345e29a3ee8836a7a06af9a63 Profile* PepperIsolatedFileSystemMessageFilter::GetProfile() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); ProfileManager* profile_manager = g_browser_process->profile_manager(); -@@ -118,6 +125,7 @@ PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(Profile* profile) { +@@ -117,6 +127,7 @@ PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(Profile* profile) { return storage::IsolatedContext::ScopedFSHandle(); #endif } @@ -81,16 +87,16 @@ index d75adab3141094e2897b2ed4ca9005bf82d70979..7ee78a7345e29a3ee8836a7a06af9a63 int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( ppapi::host::HostMessageContext* context, -@@ -126,7 +134,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( +@@ -125,7 +136,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID: break; case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX: - return OpenCrxFileSystem(context); + return PP_ERROR_NOTSUPPORTED; - case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE: - return OpenPluginPrivateFileSystem(context); } -@@ -136,6 +144,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( + NOTREACHED(); + context->reply_msg = +@@ -133,6 +144,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem( return PP_ERROR_FAILED; } @@ -98,19 +104,16 @@ index d75adab3141094e2897b2ed4ca9005bf82d70979..7ee78a7345e29a3ee8836a7a06af9a63 int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem( ppapi::host::HostMessageContext* context) { #if BUILDFLAG(ENABLE_EXTENSIONS) -@@ -176,6 +185,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem( +@@ -173,3 +185,4 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem( return PP_ERROR_NOTSUPPORTED; #endif } +#endif - - int32_t PepperIsolatedFileSystemMessageFilter::OpenPluginPrivateFileSystem( - ppapi::host::HostMessageContext* context) { diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h -index b94f5144538258555cda5d42fe7bd5e5af3ac902..2be302b4c7d85ed4382561202e4c03fb71166069 100644 +index 40fafdbed313800a3f420d9d5a3daf8bbbdb7d95..1367725e04455ba5f299b8341a28f222f51c4cd2 100644 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h +++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h -@@ -20,7 +20,9 @@ +@@ -19,7 +19,9 @@ #include "storage/browser/file_system/isolated_context.h" #include "url/gurl.h" @@ -120,7 +123,7 @@ index b94f5144538258555cda5d42fe7bd5e5af3ac902..2be302b4c7d85ed4382561202e4c03fb namespace content { class BrowserPpapiHost; -@@ -59,6 +61,7 @@ class PepperIsolatedFileSystemMessageFilter +@@ -58,6 +60,7 @@ class PepperIsolatedFileSystemMessageFilter ~PepperIsolatedFileSystemMessageFilter() override; @@ -128,7 +131,7 @@ index b94f5144538258555cda5d42fe7bd5e5af3ac902..2be302b4c7d85ed4382561202e4c03fb Profile* GetProfile(); // Returns filesystem id of isolated filesystem if valid, or empty string -@@ -66,10 +69,13 @@ class PepperIsolatedFileSystemMessageFilter +@@ -65,18 +68,23 @@ class PepperIsolatedFileSystemMessageFilter // allows access on that thread. storage::IsolatedContext::ScopedFSHandle CreateCrxFileSystem( Profile* profile); @@ -138,13 +141,12 @@ index b94f5144538258555cda5d42fe7bd5e5af3ac902..2be302b4c7d85ed4382561202e4c03fb PP_IsolatedFileSystemType_Private type); +#if 0 int32_t OpenCrxFileSystem(ppapi::host::HostMessageContext* context); -+#endif - int32_t OpenPluginPrivateFileSystem(ppapi::host::HostMessageContext* context); const int render_process_id_; -@@ -80,8 +86,10 @@ class PepperIsolatedFileSystemMessageFilter - // Not owned by this object. - ppapi::host::PpapiHost* ppapi_host_; ++#endif + // Keep a copy from original thread. + const base::FilePath profile_directory_; + const GURL document_url_; +#if 0 // Set of origins that can use CrxFs private APIs from NaCl. @@ -213,15 +215,14 @@ index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a61 return nullptr; } diff --git a/chrome/renderer/pepper/pepper_helper.h b/chrome/renderer/pepper/pepper_helper.h -index 0f67ff54227f1a49314592188d719feeb27ae2cf..14fce2e8f9dcbd5273784aaf561a45cb1df19d42 100644 +index 7572241033d2fa74604a45702aac22631680a01c..6416917aa000e93109da1dfacf9c47bf0bdbaa80 100644 --- a/chrome/renderer/pepper/pepper_helper.h +++ b/chrome/renderer/pepper/pepper_helper.h -@@ -6,12 +6,14 @@ +@@ -6,11 +6,13 @@ #define CHROME_RENDERER_PEPPER_PEPPER_HELPER_H_ #include "base/compiler_specific.h" +#include "base/component_export.h" - #include "base/macros.h" #include "content/public/renderer/render_frame_observer.h" // This class listens for Pepper creation events from the RenderFrame and diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 96998ada02b0d..09b6d2e5fc9f2 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -61,7 +61,7 @@ index 7b711bdbaf4afddd6ccf300af7bab26487942243..987a60b81554b676661d8f1a53facbc9 #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/paint_vector_icon.h" diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index c920adbbd8db50dd253d17e954d1a96d7599bfcc..67ba2c16cfa66cb5a8983fa2cb6f5a8d4e791712 100644 +index 75ff4175b80df26667ed2b4d3ba96c5d23aab597..7fa6a713f64c75360c54039563635c2db707d798 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc @@ -15,9 +15,11 @@ @@ -86,7 +86,7 @@ index c920adbbd8db50dd253d17e954d1a96d7599bfcc..67ba2c16cfa66cb5a8983fa2cb6f5a8d #include "components/vector_icons/vector_icons.h" #include "content/public/browser/picture_in_picture_window_controller.h" #include "content/public/browser/web_contents.h" -@@ -56,7 +59,7 @@ +@@ -57,7 +60,7 @@ #include "ui/aura/window.h" #endif @@ -95,7 +95,7 @@ index c920adbbd8db50dd253d17e954d1a96d7599bfcc..67ba2c16cfa66cb5a8983fa2cb6f5a8d #include "chrome/browser/shell_integration_win.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" -@@ -249,7 +252,7 @@ std::unique_ptr OverlayWindowViews::Create( +@@ -250,7 +253,7 @@ std::unique_ptr OverlayWindowViews::Create( overlay_window->Init(std::move(params)); overlay_window->OnRootViewReady(); diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 44696503dcfe2..46c3a0b2fb266 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -75,10 +75,10 @@ index baf39affec92126a6f998636bf35d1f2563fa47f..18c61ff4b2145881fd396b6e397eb7c4 // No need to cancel since the worker already canceled itself. Stop(); diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h -index 5914354ac77532eadb26bd09cffc8470fcf41c4b..18a92f5a9a35b7a86f47f6555b37d3c729c468cd 100644 +index c1808c6351951d653255e722513b735bd67ab677..3f78445c2539d10d63da339f137ed5bc37847e24 100644 --- a/chrome/browser/printing/print_job.h +++ b/chrome/browser/printing/print_job.h -@@ -243,6 +243,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { +@@ -242,6 +242,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { public: // Event type. enum Type { @@ -89,7 +89,7 @@ index 5914354ac77532eadb26bd09cffc8470fcf41c4b..18a92f5a9a35b7a86f47f6555b37d3c7 NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index 288b9f89129de88ea078b2e6d3b2d255dd527a95..e9979d5c9707e94580d4a10b4c48c32ce07cfc70 100644 +index 4b508191cf196b6c528eb97fbdd7baef40922e14..ff18b85688b02d776327325e7d67a944ae24da85 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -21,13 +21,13 @@ @@ -147,7 +147,7 @@ index 288b9f89129de88ea078b2e6d3b2d255dd527a95..e9979d5c9707e94580d4a10b4c48c32c } diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 2011d52338081666b4761e0bf66d01245abd0213..647ac4cd9730c8983868ea165907b7c9a42767aa 100644 +index c3388853baa3c43e0e57ef0ada4977fd3ccd2087..285cd8e2d61385ce25111be3830a3b532436982e 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -28,10 +28,10 @@ @@ -320,7 +320,18 @@ index 2011d52338081666b4761e0bf66d01245abd0213..647ac4cd9730c8983868ea165907b7c9 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -820,6 +846,11 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent( +@@ -752,8 +778,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( + content::RenderFrameHost* render_frame_host, + content::RenderFrameHost::LifecycleState /*old_state*/, + content::RenderFrameHost::LifecycleState new_state) { ++#if 0 // Printing is always enabled. + if (new_state == content::RenderFrameHost::LifecycleState::kActive) + SendPrintingEnabled(printing_enabled_.GetValue(), render_frame_host); ++#endif + } + + void PrintViewManagerBase::DidStartLoading() { +@@ -828,6 +856,11 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent( #endif break; } @@ -332,7 +343,7 @@ index 2011d52338081666b4761e0bf66d01245abd0213..647ac4cd9730c8983868ea165907b7c9 case JobEventDetails::JOB_DONE: // Printing is done, we don't need it anymore. // print_job_->is_job_pending() may still be true, depending on the order -@@ -889,7 +920,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -897,7 +930,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -344,7 +355,7 @@ index 2011d52338081666b4761e0bf66d01245abd0213..647ac4cd9730c8983868ea165907b7c9 if (!weak_this) return false; -@@ -912,8 +946,6 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -920,8 +956,6 @@ bool PrintViewManagerBase::CreateNewPrintJob( /*source_id=*/""); #endif @@ -353,7 +364,7 @@ index 2011d52338081666b4761e0bf66d01245abd0213..647ac4cd9730c8983868ea165907b7c9 printing_succeeded_ = false; return true; } -@@ -965,14 +997,22 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -973,14 +1007,22 @@ void PrintViewManagerBase::ReleasePrintJob() { content::RenderFrameHost* rfh = printing_rfh_; printing_rfh_ = nullptr; @@ -378,7 +389,7 @@ index 2011d52338081666b4761e0bf66d01245abd0213..647ac4cd9730c8983868ea165907b7c9 // Don't close the worker thread. print_job_ = nullptr; } -@@ -1010,7 +1050,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -1018,7 +1060,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -388,10 +399,10 @@ index 2011d52338081666b4761e0bf66d01245abd0213..647ac4cd9730c8983868ea165907b7c9 if (!cookie) { diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index c4bcf96d0ac0130a74a9b5400546dfdf335dbd68..eb946b1f599629f663b79d11039e853a5b013d29 100644 +index 850a38f5291fc5707d0882515f41cd37714a447c..9e86f48aca10de0187a6bf70a304d2d41475eb98 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h -@@ -40,6 +40,8 @@ class PrintJob; +@@ -39,6 +39,8 @@ class PrintJob; class PrintQueriesQueue; class PrinterQuery; @@ -400,7 +411,7 @@ index c4bcf96d0ac0130a74a9b5400546dfdf335dbd68..eb946b1f599629f663b79d11039e853a // Base class for managing the print commands for a WebContents. class PrintViewManagerBase : public content::NotificationObserver, public PrintManager { -@@ -62,7 +64,10 @@ class PrintViewManagerBase : public content::NotificationObserver, +@@ -61,7 +63,10 @@ class PrintViewManagerBase : public content::NotificationObserver, // Prints the current document immediately. Since the rendering is // asynchronous, the actual printing will not be completed on the return of // this function. Returns false if printing is impossible at the moment. @@ -412,7 +423,7 @@ index c4bcf96d0ac0130a74a9b5400546dfdf335dbd68..eb946b1f599629f663b79d11039e853a #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in |print_data| with settings specified in -@@ -257,9 +262,15 @@ class PrintViewManagerBase : public content::NotificationObserver, +@@ -260,9 +265,15 @@ class PrintViewManagerBase : public content::NotificationObserver, // The current RFH that is printing with a system printing dialog. content::RenderFrameHost* printing_rfh_ = nullptr; @@ -442,10 +453,10 @@ index 51ebcb4ae399018d3fd8566656596a7ef1f148af..5f2b807fc364131f4c3e6a1646ec522d // Tells the RenderFrame to switch the CSS to print media type, render every // requested page using the print preview document's frame/node, and then diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8d168e464 100644 +index f9c43096f09b0b5668b360f04fe76e924200c28c..d28d333533f3ebc70de5ceeba90b13fb013e2c24 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -38,6 +38,7 @@ +@@ -39,6 +39,7 @@ #include "printing/metafile_skia.h" #include "printing/mojom/print.mojom.h" #include "printing/print_job_constants.h" @@ -453,7 +464,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 #include "printing/units.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" -@@ -1222,7 +1223,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1225,7 +1226,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -463,7 +474,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 if (!weak_this) return; -@@ -1253,7 +1255,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1256,7 +1258,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -472,8 +483,8 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1268,7 +1270,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { - // that instead. +@@ -1271,7 +1273,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { + // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); - Print(frame, plugin, PrintRequestType::kRegular); @@ -481,7 +492,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1299,7 +1301,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1302,7 +1304,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -491,7 +502,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1346,6 +1349,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1349,6 +1352,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -500,7 +511,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 print_preview_context_.OnPrintPreview(); if (print_preview_context_.IsForArc()) { -@@ -1882,7 +1887,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1885,7 +1890,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -510,7 +521,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 // Check if |this| is still valid. if (!weak_this) return; -@@ -1897,7 +1903,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1900,7 +1906,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -521,7 +532,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1905,7 +1913,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1908,7 +1916,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -530,7 +541,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1924,8 +1932,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1927,8 +1935,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -547,7 +558,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 // Check if |this| is still valid. if (!self) return; -@@ -2173,36 +2188,51 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2176,36 +2191,51 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -611,7 +622,7 @@ index 2760a694a946eb2e4dba1ee228dc5fc13a2fc98e..29760a87ba5103792518562722dd69d8 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2573,18 +2603,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) { +@@ -2578,18 +2608,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) { } bool PrintRenderFrameHelper::CheckForCancel() { diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index 4493f6c48db4a..f67f292c483f1 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -25,10 +25,10 @@ This patch adds a few changes to the Chromium code: before the browser thread is ready. diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h -index 0d7c1db6489d95a40c66808c3f838b0740e46ff6..eec994c4252f17d9c9c41e66d5dae6509ed98a18 100644 +index fd88cc5122ad5e02a6694b2dec9fd0d16a300cc0..13b325ecad9ba48398173e89680287c63efd4fa6 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h -@@ -103,12 +103,19 @@ class ProcessSingleton { +@@ -102,12 +102,19 @@ class ProcessSingleton { base::RepeatingCallback; @@ -48,7 +48,7 @@ index 0d7c1db6489d95a40c66808c3f838b0740e46ff6..eec994c4252f17d9c9c41e66d5dae650 ~ProcessSingleton(); // Notify another process, if available. Otherwise sets ourselves as the -@@ -119,6 +126,8 @@ class ProcessSingleton { +@@ -118,6 +125,8 @@ class ProcessSingleton { // TODO(brettw): Make the implementation of this method non-platform-specific // by making Linux re-use the Windows implementation. NotifyResult NotifyOtherProcessOrCreate(); @@ -57,7 +57,7 @@ index 0d7c1db6489d95a40c66808c3f838b0740e46ff6..eec994c4252f17d9c9c41e66d5dae650 // Sets ourself up as the singleton instance. Returns true on success. If // false is returned, we are not the singleton instance and the caller must -@@ -174,6 +183,8 @@ class ProcessSingleton { +@@ -173,6 +182,8 @@ class ProcessSingleton { #if defined(OS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); @@ -66,7 +66,7 @@ index 0d7c1db6489d95a40c66808c3f838b0740e46ff6..eec994c4252f17d9c9c41e66d5dae650 HWND remote_window_; // The HWND_MESSAGE of another browser. base::win::MessageWindow window_; // The message-only window. bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment. -@@ -223,6 +234,8 @@ class ProcessSingleton { +@@ -222,6 +233,8 @@ class ProcessSingleton { // because it posts messages between threads. class LinuxWatcher; scoped_refptr watcher_; @@ -76,18 +76,26 @@ index 0d7c1db6489d95a40c66808c3f838b0740e46ff6..eec994c4252f17d9c9c41e66d5dae650 #if defined(OS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 4547eb8563e1af57aad991d9d1e2cf02c778380a..a04d139f958a7aaef9b96e8c29317ccf7c97f009 100644 +index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5b87acdf2 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -80,6 +80,7 @@ - #include "base/strings/stringprintf.h" - #include "base/strings/sys_string_conversions.h" +@@ -65,6 +65,7 @@ + #include "base/files/file_descriptor_watcher_posix.h" + #include "base/files/file_path.h" + #include "base/files/file_util.h" ++#include "base/ignore_result.h" + #include "base/location.h" + #include "base/logging.h" + #include "base/memory/ref_counted.h" +@@ -82,6 +83,7 @@ #include "base/strings/utf_string_conversions.h" + #include "base/task/sequenced_task_runner_helpers.h" + #include "base/task/single_thread_task_runner.h" +#include "base/task/post_task.h" #include "base/threading/platform_thread.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" -@@ -95,9 +96,11 @@ +@@ -97,9 +99,11 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" @@ -99,7 +107,7 @@ index 4547eb8563e1af57aad991d9d1e2cf02c778380a..a04d139f958a7aaef9b96e8c29317ccf #if defined(TOOLKIT_VIEWS) && \ (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -289,6 +292,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { +@@ -348,6 +352,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { bool DisplayProfileInUseError(const base::FilePath& lock_path, const std::string& hostname, int pid) { @@ -109,7 +117,7 @@ index 4547eb8563e1af57aad991d9d1e2cf02c778380a..a04d139f958a7aaef9b96e8c29317ccf std::u16string error = l10n_util::GetStringFUTF16( IDS_PROFILE_IN_USE_POSIX, base::NumberToString16(pid), base::ASCIIToUTF16(hostname)); -@@ -308,6 +314,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, +@@ -367,6 +374,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, NOTREACHED(); return false; @@ -117,7 +125,7 @@ index 4547eb8563e1af57aad991d9d1e2cf02c778380a..a04d139f958a7aaef9b96e8c29317ccf } bool IsChromeProcess(pid_t pid) { -@@ -348,6 +355,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { +@@ -407,6 +415,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { return (cookie == ReadLink(path)); } @@ -139,7 +147,7 @@ index 4547eb8563e1af57aad991d9d1e2cf02c778380a..a04d139f958a7aaef9b96e8c29317ccf bool ConnectSocket(ScopedSocket* socket, const base::FilePath& socket_path, const base::FilePath& cookie_path) { -@@ -729,6 +751,10 @@ ProcessSingleton::ProcessSingleton( +@@ -788,6 +811,10 @@ ProcessSingleton::ProcessSingleton( ProcessSingleton::~ProcessSingleton() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -150,7 +158,7 @@ index 4547eb8563e1af57aad991d9d1e2cf02c778380a..a04d139f958a7aaef9b96e8c29317ccf } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -897,6 +923,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -956,6 +983,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { base::Seconds(kTimeoutInSeconds)); } @@ -171,7 +179,7 @@ index 4547eb8563e1af57aad991d9d1e2cf02c778380a..a04d139f958a7aaef9b96e8c29317ccf ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate( const base::CommandLine& command_line, -@@ -999,14 +1039,32 @@ bool ProcessSingleton::Create() { +@@ -1055,14 +1096,32 @@ bool ProcessSingleton::Create() { #endif } @@ -209,7 +217,7 @@ index 4547eb8563e1af57aad991d9d1e2cf02c778380a..a04d139f958a7aaef9b96e8c29317ccf // Check that the directory was created with the correct permissions. int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && -@@ -1046,10 +1104,13 @@ bool ProcessSingleton::Create() { +@@ -1105,10 +1164,13 @@ bool ProcessSingleton::Create() { if (listen(sock, 5) < 0) NOTREACHED() << "listen failed: " << base::safe_strerror(errno); @@ -228,10 +236,10 @@ index 4547eb8563e1af57aad991d9d1e2cf02c778380a..a04d139f958a7aaef9b96e8c29317ccf return true; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index e7cc3c5bc7912b27f1f8ce0fb8f691e28284e238..19d5659d665321da54e05cee01be7da02e0c283b 100644 +index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f86c2fc0f 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -28,7 +28,9 @@ +@@ -27,7 +27,9 @@ #include "base/win/windows_version.h" #include "base/win/wmi.h" #include "chrome/browser/shell_integration.h" @@ -241,7 +249,7 @@ index e7cc3c5bc7912b27f1f8ce0fb8f691e28284e238..19d5659d665321da54e05cee01be7da0 #include "chrome/browser/win/chrome_process_finder.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" -@@ -180,10 +182,15 @@ bool ProcessLaunchNotification( +@@ -179,10 +181,15 @@ bool ProcessLaunchNotification( } bool DisplayShouldKillMessageBox() { @@ -257,7 +265,7 @@ index e7cc3c5bc7912b27f1f8ce0fb8f691e28284e238..19d5659d665321da54e05cee01be7da0 } void SendRemoteProcessInteractionResultHistogram( -@@ -265,9 +272,13 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -264,9 +271,13 @@ bool ProcessSingleton::EscapeVirtualization( } ProcessSingleton::ProcessSingleton( @@ -271,7 +279,7 @@ index e7cc3c5bc7912b27f1f8ce0fb8f691e28284e238..19d5659d665321da54e05cee01be7da0 is_virtualized_(false), lock_file_(INVALID_HANDLE_VALUE), user_data_dir_(user_data_dir), -@@ -372,11 +383,14 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -371,11 +382,14 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { return PROFILE_IN_USE; } @@ -287,7 +295,7 @@ index e7cc3c5bc7912b27f1f8ce0fb8f691e28284e238..19d5659d665321da54e05cee01be7da0 remote_window_ = chrome::FindRunningChromeWindow(user_data_dir_); if (!remote_window_ && !EscapeVirtualization(user_data_dir_)) { -@@ -385,7 +399,7 @@ bool ProcessSingleton::Create() { +@@ -384,7 +398,7 @@ bool ProcessSingleton::Create() { // access. As documented, it's clearer to NOT request ownership on creation // since it isn't guaranteed we will get it. It is better to create it // without ownership and explicitly get the ownership afterward. @@ -296,7 +304,7 @@ index e7cc3c5bc7912b27f1f8ce0fb8f691e28284e238..19d5659d665321da54e05cee01be7da0 if (!only_me.IsValid()) { DPLOG(FATAL) << "CreateMutex failed"; return false; -@@ -424,6 +438,17 @@ bool ProcessSingleton::Create() { +@@ -423,6 +437,17 @@ bool ProcessSingleton::Create() { window_.CreateNamed(base::BindRepeating(&ProcessLaunchNotification, notification_callback_), user_data_dir_.value()); diff --git a/patches/chromium/proxy_config_monitor.patch b/patches/chromium/proxy_config_monitor.patch index 5522b2cccc02b..99c31ef29fe23 100644 --- a/patches/chromium/proxy_config_monitor.patch +++ b/patches/chromium/proxy_config_monitor.patch @@ -67,10 +67,10 @@ index 583ae4a36a5dae700a8e11767839e4d9a5c6e9b4..2510362a4df21fd57c56ec1f336589cc } #endif diff --git a/chrome/browser/net/proxy_config_monitor.h b/chrome/browser/net/proxy_config_monitor.h -index 920a956bce5a24c511df293f4156e33c2455e911..413f8f17ff98038ee4b5dc5dd085257009e7b6bb 100644 +index cc48c2dcb98d49ea3737092e21fdf8a4aa52cb5b..3b82c21a956bebb6bedcbc47a1922eebb9b84f1a 100644 --- a/chrome/browser/net/proxy_config_monitor.h +++ b/chrome/browser/net/proxy_config_monitor.h -@@ -40,11 +40,12 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer, +@@ -39,11 +39,12 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer, { public: @@ -84,7 +84,7 @@ index 920a956bce5a24c511df293f4156e33c2455e911..413f8f17ff98038ee4b5dc5dd0852570 // Creates a ProxyConfigMonitor that gets proxy settings from the // |local_state|, for use with NetworkContexts not // associated with a profile. Must be destroyed before |local_state|. -@@ -94,7 +95,7 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer, +@@ -93,7 +94,7 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer, #if BUILDFLAG(ENABLE_EXTENSIONS) mojo::ReceiverSet error_receiver_set_; diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index edb0c7197ff5a..08a4c327362d6 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -8,7 +8,7 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about ` Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779 diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h -index f540ea381e9b80fd4a8e1e6a4fe4ed577396feb2..b7328fa53fa1c241dc90e9613b33a38cd2810706 100644 +index 059ff2b47e7aa8b9707e71ae9a1793bfdd86d319..529637f8b6af6b8b45f9de61d27b5e9c379c9645 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h @@ -14,6 +14,7 @@ @@ -19,7 +19,7 @@ index f540ea381e9b80fd4a8e1e6a4fe4ed577396feb2..b7328fa53fa1c241dc90e9613b33a38c #include "content/public/common/drop_data.h" #include "services/metrics/public/cpp/ukm_recorder.h" #include "third_party/abseil-cpp/absl/types/optional.h" -@@ -247,6 +248,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { +@@ -252,6 +253,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate { // Returns the associated RenderViewHostDelegateView*, if possible. virtual RenderViewHostDelegateView* GetDelegateView(); @@ -27,13 +27,13 @@ index f540ea381e9b80fd4a8e1e6a4fe4ed577396feb2..b7328fa53fa1c241dc90e9613b33a38c + virtual void OnCursorChanged(const WebCursor& cursor) {} + // Returns true if the provided RenderWidgetHostImpl matches the current - // RenderWidgetHost on the main frame, and false otherwise. - virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*); + // 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 80b15389f7dcb946c9bb29359fa89f5d72f4e99b..725f32c4701f08226e76e4da22ad98d596c62547 100644 +index 9501ae821c3cd16e53e63e28d717856c9f66efd3..c3c7447dd66a339db699f87d7d18464d46aace70 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2019,6 +2019,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -2082,6 +2082,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) view_->UpdateCursor(WebCursor(cursor)); @@ -43,10 +43,10 @@ index 80b15389f7dcb946c9bb29359fa89f5d72f4e99b..725f32c4701f08226e76e4da22ad98d5 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 12ac864159be77519ce6f6dc69941fe1fbdd9c35..48a8529b01468bc80b75670b057b203e54cd9dbb 100644 +index 48565d6590787f8370fdfacadf15fd024f69c906..0577d16d66bdaef6f4044d1737e9cf4cde811520 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4309,6 +4309,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4395,6 +4395,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -55,26 +55,26 @@ index 12ac864159be77519ce6f6dc69941fe1fbdd9c35..48a8529b01468bc80b75670b057b203e + cursor); +} + - bool WebContentsImpl::IsWidgetForMainFrame( + bool WebContentsImpl::IsWidgetForPrimaryMainFrame( RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index b487c7087e277943b116ca5d21c3db3937a3471d..6c5272ad70d7e01ad663b884716efdf77deead08 100644 +index 1d39c8676142d0cae765960d5cb0398f493c2af7..350de81e2622a8bc1bce8d9ef958590e0dd8f866 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -948,6 +948,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -959,6 +959,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, blink::mojom::FrameVisibility visibility) override; void SendScreenRects() override; TextInputManager* GetTextInputManager() override; + void OnCursorChanged(const WebCursor& cursor) override; - bool IsWidgetForMainFrame(RenderWidgetHostImpl* render_widget_host) override; + bool IsWidgetForPrimaryMainFrame( + RenderWidgetHostImpl* render_widget_host) override; bool IsShowingContextMenuOnPage() const override; - void DidChangeScreenOrientation() override; diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h -index 6921e5e094cfdd4a813c11f152e4569f77bba6e6..ca2a5d211ab0f972f6ac3bfc957e4065543fbad0 100644 +index f2cc5890ef582fcca94de4f6d10bce318f1de416..83eb6fb18c46a7b1bbccd7db4a2dfb7f39810b71 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h -@@ -13,6 +13,7 @@ +@@ -12,6 +12,7 @@ #include "base/threading/thread_restrictions.h" #include "components/viz/common/vertical_scroll_direction.h" #include "content/common/content_export.h" @@ -82,13 +82,13 @@ index 6921e5e094cfdd4a813c11f152e4569f77bba6e6..ca2a5d211ab0f972f6ac3bfc957e4065 #include "content/public/browser/allow_service_worker_result.h" #include "content/public/browser/reload_type.h" #include "content/public/browser/render_frame_host.h" -@@ -484,6 +485,9 @@ class CONTENT_EXPORT WebContentsObserver { - // Invoked every time the WebContents changes visibility. - virtual void OnVisibilityChanged(Visibility visibility) {} +@@ -489,6 +490,9 @@ class CONTENT_EXPORT WebContentsObserver { + // Invoked when the primary main frame changes size. + virtual void PrimaryMainFrameWasResized(bool width_changed) {} + // Invoked every time the RenderWidget's cursor changes. + virtual void OnCursorChanged(const WebCursor& cursor) {} + - // Invoked when the main frame changes size. - virtual void MainFrameWasResized(bool width_changed) {} - + // Invoked when the given frame changes its window.name property. + virtual void FrameNameChanged(RenderFrameHost* render_frame_host, + const std::string& name) {} diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index c5e8aaa1f9b5d..b12d9d2799bfd 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch ... something to do with OSR? and maybe 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 9cddf7c7ba6c91b9800e04dbb2ff3f1553c64c5f..33ec9c904798ea316029bc86c8889b191e4eb6ed 100644 +index 8f29a8a014fff5aa146fc6d6de02d025184e40df..7427d82d6ad78251aaa7c3e2e0f499f7d19d688c 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -666,6 +666,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -649,6 +649,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,21 +24,21 @@ index 9cddf7c7ba6c91b9800e04dbb2ff3f1553c64c5f..33ec9c904798ea316029bc86c8889b19 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 3eb1f2f549305dacb437d856cdefcc80367ed9fa..d703e15a04160a1e8df231d395a2dfb54ee9c335 100644 +index 95775111f6d5f01c0b27524a04c202ed08a65e2e..f4fe0970813bb2232e7594813cd4cc2e7d555372 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -25,8 +25,10 @@ - #include "components/viz/host/hit_test/hit_test_query.h" #include "content/browser/renderer_host/display_feature.h" #include "content/browser/renderer_host/event_with_latency_info.h" + #include "content/browser/renderer_host/visible_time_request_trigger.h" +#include "content/browser/web_contents/web_contents_view.h" #include "content/common/content_export.h" #include "content/public/browser/render_frame_metadata_provider.h" +#include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host_view.h" - #include "content/public/browser/visibility.h" + #include "content/public/common/page_visibility_state.h" #include "content/public/common/widget_type.h" -@@ -68,9 +70,11 @@ class CursorManager; +@@ -66,9 +68,11 @@ class CursorManager; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; class RenderWidgetHostViewBaseObserver; @@ -50,7 +50,7 @@ index 3eb1f2f549305dacb437d856cdefcc80367ed9fa..d703e15a04160a1e8df231d395a2dfb5 class WebCursor; class WebContentsAccessibility; class DelegatedFrameHost; -@@ -145,6 +149,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -138,6 +142,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { const gfx::Rect& keyboard_rect) override {} bool IsHTMLFormPopup() const override; @@ -60,7 +60,7 @@ index 3eb1f2f549305dacb437d856cdefcc80367ed9fa..d703e15a04160a1e8df231d395a2dfb5 // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -304,6 +311,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -286,6 +293,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, const ui::LatencyInfo& latency); diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index 1904bf0ad0bc7..4535405564333 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`. Additionally, disables usage of some private APIs in MAS builds. diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 881b0fda3c15db42a6ad68c011c6952147bdaa1d..46e3f1e16093683c5d0205134c2ef9246e99e730 100644 +index 63b3ff0534dc8d83c2c1d2c6f07325092a7a4176..85c5853336505eb41bc16c281f79408818d026fc 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 -@@ -150,6 +150,15 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -153,6 +153,15 @@ void ExtractUnderlines(NSAttributedString* string, } // namespace @@ -29,7 +29,7 @@ index 881b0fda3c15db42a6ad68c011c6952147bdaa1d..46e3f1e16093683c5d0205134c2ef924 // These are not documented, so use only after checking -respondsToSelector:. @interface NSApplication (UndocumentedSpeechMethods) - (void)speakString:(NSString*)string; -@@ -570,6 +579,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { +@@ -573,6 +582,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -39,7 +39,7 @@ index 881b0fda3c15db42a6ad68c011c6952147bdaa1d..46e3f1e16093683c5d0205134c2ef924 return [self acceptsMouseEventsWhenInactive]; } -@@ -646,6 +658,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { +@@ -649,6 +661,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -50,7 +50,7 @@ index 881b0fda3c15db42a6ad68c011c6952147bdaa1d..46e3f1e16093683c5d0205134c2ef924 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -966,6 +982,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -969,6 +985,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSKeyDown && !(modifierFlags & NSCommandKeyMask); @@ -61,7 +61,7 @@ index 881b0fda3c15db42a6ad68c011c6952147bdaa1d..46e3f1e16093683c5d0205134c2ef924 // We only handle key down events and just simply forward other events. if (eventType != NSKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1693,9 +1713,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1707,9 +1727,11 @@ - (NSAccessibilityRole)accessibilityRole { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -73,7 +73,7 @@ index 881b0fda3c15db42a6ad68c011c6952147bdaa1d..46e3f1e16093683c5d0205134c2ef924 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1704,7 +1726,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1718,7 +1740,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index aa44de8e0ccaf..f1d959adfd337 100644 --- a/patches/chromium/resource_file_conflict.patch +++ b/patches/chromium/resource_file_conflict.patch @@ -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 77bcd0dd7ddddfea030d71c31956f873d4ac778a..5a35396df314ab547990a53c90ebb75d337bcc77 100644 +index b137978b640cd18c6a8566b4c53991e9581ecece..fd0b9634796e782c873b5fcb97c84ab52f19cf98 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -1549,7 +1549,7 @@ if (is_chrome_branded && !is_android) { diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 2da2b1ebdf1ed..f436304d47e18 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -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 1546f52724fc7fb3688766c0f5e2622d4eb45b6f..5e48b08a97db44e716e5593dfc68b91e856a70dd 100644 +index 2ea707e9bacf2649eb7ed160b542f664b3996ee3..1e8a71eb6d9342270e4b86a4ec4689924dc436e3 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1292,7 +1292,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1308,7 +1308,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 12d875c1fc16a..7d3290b771bf0 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,10 +22,54 @@ 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 7e9d623030976aef80b37d2a224abc9b3013ede7..9353475f0f41ce96c3bc53a5ff69a137900c8142 100644 +index 6284092e8744a28f582f42f45154483bc6d1aa5e..43a22eb1ce2f94202f35f8080c881748535cbcd1 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -397,10 +397,18 @@ class RendererSandboxedProcessLauncherDelegate +@@ -1832,9 +1832,15 @@ bool RenderProcessHostImpl::Init() { + std::unique_ptr sandbox_delegate = + std::make_unique( + cmd_line.get(), IsJitDisabled()); ++#else ++#if BUILDFLAG(USE_ZYGOTE_HANDLE) ++ bool use_zygote = !cmd_line->HasSwitch(switches::kNoZygote); ++ std::unique_ptr sandbox_delegate = ++ std::make_unique(use_zygote); + #else + std::unique_ptr sandbox_delegate = + std::make_unique(); ++#endif + #endif + auto snapshot_files = GetV8SnapshotFilesToPreload(*cmd_line); + // Spawn the child process asynchronously to avoid blocking the UI thread. +diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +index 9c0e928067d86121ee3732440c80e84dcbbe0dd9..b5c84dc74cf71bc226787c9609dd2c99915710fb 100644 +--- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc ++++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +@@ -25,6 +25,9 @@ namespace content { + + #if BUILDFLAG(USE_ZYGOTE_HANDLE) + ZygoteHandle RendererSandboxedProcessLauncherDelegate::GetZygote() { ++ if (!use_zygote_) { ++ return nullptr; ++ } + const base::CommandLine& browser_command_line = + *base::CommandLine::ForCurrentProcess(); + base::CommandLine::StringType renderer_prefix = +@@ -52,6 +55,9 @@ RendererSandboxedProcessLauncherDelegateWin:: + bool is_jit_disabled) + : renderer_code_integrity_enabled_( + GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) { ++#if BUILDFLAG(USE_ZYGOTE_HANDLE) ++ use_zygote_ = !cmd_line->HasSwitch(switches::kNoZygote); ++#endif + if (is_jit_disabled) { + dynamic_code_can_be_disabled_ = true; + return; +diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h +index bf78e0ddcbb2edfa5bf78b6bd9336d59112e5de1..ac335d76b9d19a3c377926408d7b37157174d818 100644 +--- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h ++++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h +@@ -17,6 +17,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate public: RendererSandboxedProcessLauncherDelegate() = default; @@ -37,17 +81,10 @@ index 7e9d623030976aef80b37d2a224abc9b3013ede7..9353475f0f41ce96c3bc53a5ff69a137 ~RendererSandboxedProcessLauncherDelegate() override = default; #if BUILDFLAG(USE_ZYGOTE_HANDLE) - ZygoteHandle GetZygote() override { -+ if (!use_zygote_) { -+ return nullptr; -+ } - const base::CommandLine& browser_command_line = - *base::CommandLine::ForCurrentProcess(); - base::CommandLine::StringType renderer_prefix = -@@ -418,6 +426,11 @@ class RendererSandboxedProcessLauncherDelegate - sandbox::policy::SandboxType GetSandboxType() override { - return sandbox::policy::SandboxType::kRenderer; - } +@@ -28,6 +33,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate + #endif // defined(OS_MAC) + + sandbox::mojom::Sandbox GetSandboxType() override; + + private: +#if BUILDFLAG(USE_ZYGOTE_HANDLE) @@ -56,29 +93,3 @@ index 7e9d623030976aef80b37d2a224abc9b3013ede7..9353475f0f41ce96c3bc53a5ff69a137 }; #if defined(OS_WIN) -@@ -429,6 +442,9 @@ class RendererSandboxedProcessLauncherDelegateWin - bool is_jit_disabled) - : renderer_code_integrity_enabled_( - GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) { -+#if BUILDFLAG(USE_ZYGOTE_HANDLE) -+ use_zygote_ = !cmd_line->HasSwitch(switches::kNoZygote); -+#endif - if (is_jit_disabled) { - dynamic_code_can_be_disabled_ = true; - return; -@@ -1955,9 +1971,15 @@ bool RenderProcessHostImpl::Init() { - std::unique_ptr sandbox_delegate = - std::make_unique( - cmd_line.get(), IsJitDisabled()); -+#else -+#if BUILDFLAG(USE_ZYGOTE_HANDLE) -+ bool use_zygote = !cmd_line->HasSwitch(switches::kNoZygote); -+ std::unique_ptr sandbox_delegate = -+ std::make_unique(use_zygote); - #else - std::unique_ptr sandbox_delegate = - std::make_unique(); -+#endif - #endif - // Spawn the child process asynchronously to avoid blocking the UI thread. - // As long as there's no renderer prefix, we can use the zygote process diff --git a/patches/chromium/ui_gtk_public_header.patch b/patches/chromium/ui_gtk_public_header.patch index 237ecc6b2b608..fdd714addf3f3 100644 --- a/patches/chromium/ui_gtk_public_header.patch +++ b/patches/chromium/ui_gtk_public_header.patch @@ -6,7 +6,7 @@ Subject: ui_gtk_public_header.patch Allow electron to depend on //ui/gtk/gtk_util.h diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn -index 2d4b2f617d4ffb4e2329dbce8f1de05739c3617f..0f350916b012e04a76d3db8abe199ee693f8abd5 100644 +index a5b8ab7665f30a94c7406bc2db74568a8d506d5e..247af45b9046695ad757e9f476235e52840dd0dd 100644 --- a/ui/gtk/BUILD.gn +++ b/ui/gtk/BUILD.gn @@ -39,7 +39,7 @@ generate_stubs("gtk_stubs") { diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index cb99276a4e34e..a675a34292163 100644 --- a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch +++ b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch @@ -6,10 +6,10 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch Unsandboxed ppapi processes should skip zygote. diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc -index 3946e2d5559ce8b3811e4c87cf917d3afbdae013..4f55b49d6c66f4bfcdf7e3c13c5ca90d7eb0d0b3 100644 +index 720921b36b65d0332d0a59df4b26c1f32dd49928..eec1a915daaaa9305a49a7bd117186e59b5ae5f9 100644 --- a/content/browser/ppapi_plugin_process_host.cc +++ b/content/browser/ppapi_plugin_process_host.cc -@@ -116,6 +116,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate +@@ -115,6 +115,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate ZygoteHandle GetZygote() override { const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); diff --git a/patches/chromium/upload_list_add_loadsync_method.patch b/patches/chromium/upload_list_add_loadsync_method.patch index c83bb6faf9eb5..8c0f69128cde5 100644 --- a/patches/chromium/upload_list_add_loadsync_method.patch +++ b/patches/chromium/upload_list_add_loadsync_method.patch @@ -24,10 +24,10 @@ index c5c8119703c245132433f95fbd3764cfff41f8c3..9aa707d8b13b9c91a21ff5f38e680a7f const base::Time& end, base::OnceClosure callback) { diff --git a/components/upload_list/upload_list.h b/components/upload_list/upload_list.h -index c9e4af694a130d8d225ad96a0eefcefc7d1762b4..15c6be9368aa41f1d8665e1f140ccb6a95d059f8 100644 +index 3180f3133ce6a0270e928a914f758a6329c921f8..e4af112aa09c54791d123cc042c01cb3b98f6dfe 100644 --- a/components/upload_list/upload_list.h +++ b/components/upload_list/upload_list.h -@@ -78,6 +78,8 @@ class UploadList : public base::RefCountedThreadSafe { +@@ -77,6 +77,8 @@ class UploadList : public base::RefCountedThreadSafe { // overwrite the previously supplied one, and the first will not be called. void Load(base::OnceClosure callback); diff --git a/patches/chromium/v8_context_snapshot_generator.patch b/patches/chromium/v8_context_snapshot_generator.patch index 7aa286febe56b..e878445e6d584 100644 --- a/patches/chromium/v8_context_snapshot_generator.patch +++ b/patches/chromium/v8_context_snapshot_generator.patch @@ -7,14 +7,14 @@ v8_context_snapshot_generator is a build time executable. The patch adds the config. diff --git a/tools/v8_context_snapshot/BUILD.gn b/tools/v8_context_snapshot/BUILD.gn -index 6817e654af7cedc6ade586b16ac597e8e5f1cd76..b58b95777dc604ff3ccc9e99258240e27db492e7 100644 +index d868696dbf28bfcb2a1dceda20057c5043819b91..985943ba31b31b3604072493a666979e111a3213 100644 --- a/tools/v8_context_snapshot/BUILD.gn +++ b/tools/v8_context_snapshot/BUILD.gn -@@ -118,6 +118,7 @@ if (use_v8_context_snapshot) { - configs += [ - "//v8:external_startup_data", - ":disable_icf", -+ "//electron/build/config:build_time_executable" - ] +@@ -120,6 +120,7 @@ if (use_v8_context_snapshot) { + configs += [ + "//v8:external_startup_data", + ":disable_icf", ++ "//electron/build/config:build_time_executable", + ] + } } - } diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 604d793723a60..8493f85bd4896 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -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 d5bf3e57440985826332672116d34426c3d27a83..3ac84525bc4375c79e5a30a177335d9e26b78ba6 100644 +index 956c5024919bc18f4aea07c77ead5ff2ad49730a..dd6118f9c5a5d91759a897c1a978be4b592d6a00 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2899,6 +2899,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2961,6 +2961,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { frame_tree_.Init(site_instance.get(), params.renderer_initiated_creation, params.main_frame_name); @@ -25,7 +25,7 @@ index d5bf3e57440985826332672116d34426c3d27a83..3ac84525bc4375c79e5a30a177335d9e WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2909,6 +2915,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2971,6 +2977,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -34,10 +34,10 @@ index d5bf3e57440985826332672116d34426c3d27a83..3ac84525bc4375c79e5a30a177335d9e CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index bfa0e468e11e651efa9457c847575cf231562615..8840d078a341bda1abc79c1f9ee72b2cc07f06d6 100644 +index 8b7f3c9d5649101c87032bb4f7a4d27bf52912d2..f7db5d52cc773dff4913d67f10af3e0ec7d98bee 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -88,10 +88,13 @@ class BrowserContext; +@@ -90,10 +90,13 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; @@ -51,7 +51,7 @@ index bfa0e468e11e651efa9457c847575cf231562615..8840d078a341bda1abc79c1f9ee72b2c class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -228,6 +231,10 @@ class WebContents : public PageNavigator, +@@ -230,6 +233,10 @@ class WebContents : public PageNavigator, // Sandboxing flags set on the new WebContents. network::mojom::WebSandboxFlags starting_sandbox_flags; diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 4eb0eb636b607..a7881b42b4a6a 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,16 +8,17 @@ This allows dragging and dropping between s. Originally landed in https://github.com/electron/libchromiumcontent/pull/267 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc -index 7cd6382dec11dcf25e586955e6e610b8bf7f39fa..895ca9d68c117220d41ad4f1384e857b018269f9 100644 +index dc7c1ed1dc7697919dfcf500fe86804fbc63b65a..5fe865e5010a9bbee45447bb987c20cb6f4b2c1b 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -811,9 +811,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const { - - bool WebContentsViewAura::IsValidDragTarget( - RenderWidgetHostImpl* target_rwh) const { -- return target_rwh->GetProcess()->GetID() == drag_start_process_id_ || -- GetRenderViewHostID(web_contents_->GetRenderViewHost()) != -- drag_start_view_id_; +@@ -878,10 +878,7 @@ bool WebContentsViewAura::IsValidDragTarget( + // TODO(https://crbug.com/1266953): There are some known gaps caused by + // comparing `RenderViewHost` IDs, as `RenderViewHost` ID is not really a + // strong signal for page identity. +- return !drag_start_ || +- target_rwh->GetProcess()->GetID() == drag_start_->process_id || +- GetRenderViewHostID(web_contents_->GetRenderViewHost()) != +- drag_start_->view_id; + return true; } diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index c56ddc8eecd01..9133c85bdd922 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -14,10 +14,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 1c7df171237f441ae13a8b8b0d681d496ee0cc8a..a4ae60f3f7edc53751919b0ec4bc634b98cddd0f 100644 +index fca309296af6f470882b57ae75d9b410c9ef9f12..5f04ae3aff9ac515a6280f4347cddfe76a16cfcb 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -5900,6 +5900,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -5969,6 +5969,15 @@ void RenderFrameHostImpl::EnterFullscreen( notified_instances.insert(parent_site_instance); } diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index bf41f036324ae..7d10df01cc619 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected: https://chromium-review.googlesource.com/c/chromium/src/+/1954347 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index f3852c0eef152176d03922492ca9672498f8f9d0..ef7b6f9ff3e8f899377933a7184d3278d4a9d366 100644 +index 0b098038d2f56e30b990a6dc794398b178e9860d..c5d798c73a268a80a23c8d5cac4d88a190ee18f7 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -358,6 +358,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -355,6 +355,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index f3852c0eef152176d03922492ca9672498f8f9d0..ef7b6f9ff3e8f899377933a7184d3278 // 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 bbfe51c4bcfd5c3301362614e9928e9b4f5d6b1e..081aaf4b2d59ac68b1f5a1403d5e5ae25c4728ea 100644 +index 1b89812ad429734cdc984dee24e0f1b9a040b1e4..0fea1aec4e60e1eb488a9f38f11df3151d294038 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -928,6 +928,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -936,6 +936,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index bbfe51c4bcfd5c3301362614e9928e9b4f5d6b1e..081aaf4b2d59ac68b1f5a1403d5e5ae2 const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 6c0a233f70d811b422f1b0a428eef8eb3e8437b1..dd91faac7c67d9b46cab45ca44cd1a2f9dc78b2c 100644 +index 9622c5554db8c1c83d05b9a1919f647c8616d6d5..6636f116cdb333ea42ffa877a5326abec6d1e6aa 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -211,6 +211,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -210,6 +210,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -55,10 +55,10 @@ index 6c0a233f70d811b422f1b0a428eef8eb3e8437b1..dd91faac7c67d9b46cab45ca44cd1a2f 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 757e70c8dc3342bf6966dc6e785bdc36db17604b..e7286017921bf751391da9d8d0fe4f64404045e4 100644 +index 74fd52490d65a20f4809319851c19450598e9c56..6bde55b51424b76448400749d724e8edeb39321b 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -720,6 +720,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -721,6 +721,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -67,10 +67,10 @@ index 757e70c8dc3342bf6966dc6e785bdc36db17604b..e7286017921bf751391da9d8d0fe4f64 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 2f43a308d29f5b0be9b36c969adb019afa27fb32..c21b1a4c9dc6745e3bd738e903548e566ddf1208 100644 +index 2fb7e54f0a19bfcddde96d91034b765695ebe227..c81d3d757adee5dbd192c8fae66e7b5f3b06abd7 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc -@@ -716,6 +716,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { +@@ -721,6 +721,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { nested_runner_->QuitNow(); } diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index bf9106577b7c7..c15ae5b66a0da 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop initialized. diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index ef7b6f9ff3e8f899377933a7184d3278d4a9d366..8688f1d7f258246901feec75e340c32bf581a2b5 100644 +index c5d798c73a268a80a23c8d5cac4d88a190ee18f7..cddebeb49b07796ee3434550af629080e6284d0c 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -358,6 +358,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -355,6 +355,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index ef7b6f9ff3e8f899377933a7184d3278d4a9d366..8688f1d7f258246901feec75e340c32b // 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 081aaf4b2d59ac68b1f5a1403d5e5ae25c4728ea..c87f5ead78a02390d3bc1b0d98352c9661335263 100644 +index 0fea1aec4e60e1eb488a9f38f11df3151d294038..ac3dc4083c3c1c0630df6df7ef49f53728ea7149 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -940,6 +940,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -948,6 +948,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index 081aaf4b2d59ac68b1f5a1403d5e5ae25c4728ea..c87f5ead78a02390d3bc1b0d98352c96 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 dd91faac7c67d9b46cab45ca44cd1a2f9dc78b2c..517488fc5a72a2b4f9933d3997ab64448e75fe95 100644 +index 6636f116cdb333ea42ffa877a5326abec6d1e6aa..6659ff18c5cc959c43455e629a1736a0505703c0 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -211,6 +211,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -210,6 +210,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -65,10 +65,10 @@ index dd91faac7c67d9b46cab45ca44cd1a2f9dc78b2c..517488fc5a72a2b4f9933d3997ab6444 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 e7286017921bf751391da9d8d0fe4f64404045e4..c364b83625c4b197d263582c49d136ae2d988d39 100644 +index 6bde55b51424b76448400749d724e8edeb39321b..d51e3dfab2ad23efcaaf85aebfbec6353e5c9f78 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -720,6 +720,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -721,6 +721,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -78,10 +78,10 @@ index e7286017921bf751391da9d8d0fe4f64404045e4..c364b83625c4b197d263582c49d136ae virtual bool AllowScriptExtensionForServiceWorker( const WebSecurityOrigin& script_origin) { diff --git a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc -index 8e359fe9c3c9c50bcd85b70c26b6ca7bad9245fa..5fa95eda6835ed5d82182925880d542f8115da6a 100644 +index 3f9cb07b48e78e54a88c8f532361de3096e55942..b26fc5ba9b68611ca6276a326a6bdb2a2e8ea3f2 100644 --- a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc +++ b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc -@@ -257,6 +257,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { +@@ -258,6 +258,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { V8PerContextData* per_context_data = script_state_->PerContextData(); ignore_result(per_context_data->ConstructorForType( global_scope_->GetWrapperTypeInfo())); diff --git a/patches/node/.patches b/patches/node/.patches index 419e5545a403f..3fdf3dd027766 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -27,3 +27,4 @@ fix_event_with_invalid_timestamp_in_trace_log.patch test_fix_test-datetime-change-notify_after_daylight_change.patch test_add_fixture_trim_option.patch fix_crash_caused_by_gethostnamew_on_windows_7.patch +fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 88336661e0835..80e2d2fa296b9 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -661,10 +661,10 @@ index 0000000000000000000000000000000000000000..fb000f8ee7647c375bc190d1729d67bb +} diff --git a/deps/nghttp2/BUILD.gn b/deps/nghttp2/BUILD.gn new file mode 100644 -index 0000000000000000000000000000000000000000..b7a9daa0d099be8ce1b594cd5128e54ab88d1f25 +index 0000000000000000000000000000000000000000..8bfecba74d4d90e9fbf0e2cd301118e4adc6cba8 --- /dev/null +++ b/deps/nghttp2/BUILD.gn -@@ -0,0 +1,48 @@ +@@ -0,0 +1,49 @@ +config("nghttp2_config") { + defines = [ "NGHTTP2_STATICLIB" ] + include_dirs = [ "lib/includes" ] @@ -686,6 +686,7 @@ index 0000000000000000000000000000000000000000..b7a9daa0d099be8ce1b594cd5128e54a + "-Wno-implicit-fallthrough", + "-Wno-string-plus-int", + "-Wno-unreachable-code-return", ++ "-Wno-unused-but-set-variable", + ] + + sources = [ @@ -715,10 +716,10 @@ index 0000000000000000000000000000000000000000..b7a9daa0d099be8ce1b594cd5128e54a +} diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn new file mode 100644 -index 0000000000000000000000000000000000000000..b7002dfebb68199511b63a650c734d3493ccce48 +index 0000000000000000000000000000000000000000..b8deb68cebcf5ac9b831201332edf8c509a7d4c8 --- /dev/null +++ b/deps/uv/BUILD.gn -@@ -0,0 +1,194 @@ +@@ -0,0 +1,195 @@ +config("libuv_config") { + include_dirs = [ "include" ] + @@ -767,6 +768,7 @@ index 0000000000000000000000000000000000000000..b7002dfebb68199511b63a650c734d34 + "-Wno-unused-variable", + "-Wno-unreachable-code", + "-Wno-unreachable-code-return", ++ "-Wno-unused-but-set-variable", + ] + + libs = [] diff --git a/patches/node/chore_fix_-wimplicit-fallthrough.patch b/patches/node/chore_fix_-wimplicit-fallthrough.patch index 53eb074fd600b..5b3103652136e 100644 --- a/patches/node/chore_fix_-wimplicit-fallthrough.patch +++ b/patches/node/chore_fix_-wimplicit-fallthrough.patch @@ -6,7 +6,7 @@ Subject: chore: fix -Wimplicit-fallthrough Upstreamed at https://github.com/nghttp2/nghttp2/pull/1626. diff --git a/deps/nghttp2/BUILD.gn b/deps/nghttp2/BUILD.gn -index b7a9daa0d099be8ce1b594cd5128e54ab88d1f25..3872f5fd74f9ae569bf5043b33ff4b52e58f7341 100644 +index 8bfecba74d4d90e9fbf0e2cd301118e4adc6cba8..63e1149f0c4a39cb944114e5824d6074343301e8 100644 --- a/deps/nghttp2/BUILD.gn +++ b/deps/nghttp2/BUILD.gn @@ -16,7 +16,6 @@ static_library("nghttp2") { @@ -16,7 +16,7 @@ index b7a9daa0d099be8ce1b594cd5128e54ab88d1f25..3872f5fd74f9ae569bf5043b33ff4b52 - "-Wno-implicit-fallthrough", "-Wno-string-plus-int", "-Wno-unreachable-code-return", - ] + "-Wno-unused-but-set-variable", diff --git a/deps/nghttp2/lib/nghttp2_hd.c b/deps/nghttp2/lib/nghttp2_hd.c index 5e8693152599215261e47b152d565bbd9a0083e7..6d54e91dea6d77ad8925ad0452fd2a0a36f35f73 100644 --- a/deps/nghttp2/lib/nghttp2_hd.c diff --git a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch index b44f118eff13c..c8759dba18235 100644 --- a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch +++ b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch @@ -17,7 +17,7 @@ Upstreams: - https://github.com/nodejs/node/pull/39136 diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc -index cc03fddd464b09dd3647e3f5183dc3c49affc94f..9cbe78c05b1c86c0d4a4b8b1f8771862dd3002e5 100644 +index cc03fddd464b09dd3647e3f5183dc3c49affc94f..3aa6b40ab9b10cdd56002e9f020a6f6b1ae02222 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -244,7 +244,7 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) { @@ -66,23 +66,25 @@ index cc03fddd464b09dd3647e3f5183dc3c49affc94f..9cbe78c05b1c86c0d4a4b8b1f8771862 } const char* X509ErrorCode(long err) { // NOLINT(runtime/int) -@@ -771,13 +778,13 @@ MaybeLocal GetClientHelloCiphers( +@@ -771,14 +778,14 @@ MaybeLocal GetClientHelloCiphers( Environment* env, const SSLPointer& ssl) { EscapableHandleScope scope(env->isolate()); - const unsigned char* buf; - size_t len = SSL_client_hello_get0_ciphers(ssl.get(), &buf); -+ const unsigned char* buf = nullptr; ++ // const unsigned char* buf = nullptr; + size_t len = 0; // SSL_client_hello_get0_ciphers(ssl.get(), &buf); size_t count = len / 2; MaybeStackBuffer, 16> ciphers(count); int j = 0; for (size_t n = 0; n < len; n += 2) { - const SSL_CIPHER* cipher = SSL_CIPHER_find(ssl.get(), buf); +- buf += 2; + const SSL_CIPHER* cipher = nullptr; // SSL_CIPHER_find(ssl.get(), buf); - buf += 2; ++ // buf += 2; Local obj = Object::New(env->isolate()); if (!Set(env->context(), + obj, diff --git a/src/crypto/crypto_dh.cc b/src/crypto/crypto_dh.cc index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e1609f519c89 100644 --- a/src/crypto/crypto_dh.cc diff --git a/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch b/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch new file mode 100644 index 0000000000000..1613f28863fd0 --- /dev/null +++ b/patches/node/fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Tue, 16 Nov 2021 20:05:57 +0900 +Subject: fix: suppress clang -Wdeprecated-declarations in libuv + +Should be upstreamed. + +diff --git a/deps/uv/src/win/util.c b/deps/uv/src/win/util.c +index 5ffde08e1aed041c4da679156ed10f7e54bfc386..69aff95f68519acc8fc399c4358702b146f802ca 100644 +--- a/deps/uv/src/win/util.c ++++ b/deps/uv/src/win/util.c +@@ -1949,10 +1949,17 @@ int uv_os_uname(uv_utsname_t* buffer) { + #ifdef _MSC_VER + #pragma warning(suppress : 4996) + #endif ++ #ifdef __clang__ ++ #pragma clang diagnostic push ++ #pragma clang diagnostic ignored "-Wdeprecated-declarations" ++ #endif + if (GetVersionExW(&os_info) == 0) { + r = uv_translate_sys_error(GetLastError()); + goto error; + } ++ #ifdef __clang__ ++ #pragma clang diagnostic pop ++ #endif + } + + /* Populate the version field. */ diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 70d0f3750819a..2231af63933f5 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,10 +9,10 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index f491f2a4e64c6b3d05ccb2a9c8955c456b8f94fb..c621e767b9b09b2ae6c0d8ab8cef37c660f77c71 100644 +index 36cf51ba9aa70f4fdfa48b4ba37f30f7a586e832..044cad70679b4f1b6fe58f4a9fd27d2688f7278f 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -576,7 +576,7 @@ config("internal_config") { +@@ -585,7 +585,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index f491f2a4e64c6b3d05ccb2a9c8955c456b8f94fb..c621e767b9b09b2ae6c0d8ab8cef37c6 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5623,7 +5623,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5656,7 +5656,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index f491f2a4e64c6b3d05ccb2a9c8955c456b8f94fb..c621e767b9b09b2ae6c0d8ab8cef37c6 deps = [ ":v8_libbase", -@@ -5661,6 +5661,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5694,6 +5694,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index e0ea11b067bd5..00a33108a5f81 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,10 +6,10 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index f79d0482ed3f1b42e60e09b4ad07749f9dbdadf0..f87db8a84efc661aad15781f2f949901e5befc17 100644 +index fb497bc59b30d4e828951ecd2b33bf82739e0958..97d8bd604d27dfc357ff4f3ff794cf7e12fa5c12 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -8907,7 +8907,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9072,7 +9072,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index f79d0482ed3f1b42e60e09b4ad07749f9dbdadf0..f87db8a84efc661aad15781f2f949901 isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 4a57a1678eba54bd510120f246d60c4e5b3b09c9..d849e1da41f8fb8f8b1dd1e33733dd74ce2f487f 100644 +index c3e1fd0ff06b8d3d944e37672237a04012fff46b..a2a1f488672f0f0aae5a2dfd00d79bfb0952dbb9 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6033,9 +6033,9 @@ void Heap::DeinitSharedSpaces() { +@@ -6013,9 +6013,9 @@ void Heap::TearDown() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); diff --git a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch index 9df194603efa6..96e30155cd8b1 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index 621f8dddcbf1378078747fdb935ee730e5eb338a..769bb6494b7057417dbc2beee0a6d99256b56c75 100644 +index d85634a305d941adb43b2c22a326ddf592e2b9f2..43dd92240713c3cb38ce12bb8251742779d594e2 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -576,6 +576,10 @@ config("internal_config") { +@@ -585,6 +585,10 @@ config("internal_config") { ":cppgc_header_features", ] diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index 5388c82e87597..719620dda9b39 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build These symbols are required to build v8 with BUILD_V8_SHARED on Windows. diff --git a/src/objects/objects.h b/src/objects/objects.h -index 7cb94dfb740141e6106fb83f7077ec84cc0a76d2..705417fb6112c18b0f55d82ebbe7b42415f92460 100644 +index f49f064bf5a45bd322da165286728279db48c5d2..58865f5ca22fd02b2387a5b94fbb2f016282a113 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h -@@ -850,7 +850,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; +@@ -879,7 +879,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; // Utility superclass for stack-allocated objects that must be updated // on gc. It provides two ways for the gc to update instances, either // iterating or updating after gc. diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 19c83edc9522b..571d8cf51efc8 100644 --- a/patches/v8/expose_mksnapshot.patch +++ b/patches/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index c621e767b9b09b2ae6c0d8ab8cef37c660f77c71..621f8dddcbf1378078747fdb935ee730e5eb338a 100644 +index 044cad70679b4f1b6fe58f4a9fd27d2688f7278f..d85634a305d941adb43b2c22a326ddf592e2b9f2 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5635,7 +5635,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5668,7 +5668,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch index 7d2a6c75e5ec9..0470ce2b9558a 100644 --- a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch @@ -9,10 +9,10 @@ higher versions, but native module compiling with this version will have an issue. diff --git a/include/v8config.h b/include/v8config.h -index b010b65dfd648bc01608befd886613a82dab2a05..fa740c2acde6134312aabfa0aae0c0093450bd48 100644 +index c4d0894e0f96493d55aed8761b1153628e3d651e..75f7db588a6ed674f5799c812b712e3aa4fd2f39 100644 --- a/include/v8config.h +++ b/include/v8config.h -@@ -448,10 +448,13 @@ path. Add it with -I to the command line +@@ -452,10 +452,13 @@ path. Add it with -I to the command line # define V8_NOINLINE /* NOT SUPPORTED */ #endif @@ -28,7 +28,7 @@ index b010b65dfd648bc01608befd886613a82dab2a05..fa740c2acde6134312aabfa0aae0c009 #else # define V8_DEPRECATED(message) #endif -@@ -459,7 +462,11 @@ path. Add it with -I to the command line +@@ -463,7 +466,11 @@ path. Add it with -I to the command line // A macro (V8_DEPRECATE_SOON) to make it easier to see what will be deprecated. #if defined(V8_IMMINENT_DEPRECATION_WARNINGS) diff --git a/patches/v8/workaround_an_undefined_symbol_error.patch b/patches/v8/workaround_an_undefined_symbol_error.patch index a39d7d1f70317..393d3c853c04d 100644 --- a/patches/v8/workaround_an_undefined_symbol_error.patch +++ b/patches/v8/workaround_an_undefined_symbol_error.patch @@ -12,7 +12,7 @@ By moving some functions out of the the arm64-assembler header file, this error no longer seems to happen. diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc -index f6a035a9e7737b26d325074605724a1e52037493..18ef63e33986da557253bb03022c511b8a856acf 100644 +index 627c7ae0213351d39331750b51c8f0db23ea4c4b..84faca065ac752bc2d992188fd7b93d5801d1cf7 100644 --- a/src/codegen/arm64/assembler-arm64.cc +++ b/src/codegen/arm64/assembler-arm64.cc @@ -3629,6 +3629,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift, @@ -39,10 +39,10 @@ index f6a035a9e7737b26d325074605724a1e52037493..18ef63e33986da557253bb03022c511b const Operand& operand, FlagsUpdate S, AddSubOp op) { DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits()); diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h -index 8cdca7bfa83ef7156c9fa8583d29661169132417..c482263e58b4e625724d37c0ab3ccbc405bee1c5 100644 +index dac90f8058c9dd24639ec6e91eda85842788207e..ad773649a5a355a0ca4dade16f9777987719e2b9 100644 --- a/src/codegen/arm64/assembler-arm64.h +++ b/src/codegen/arm64/assembler-arm64.h -@@ -2130,11 +2130,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2121,11 +2121,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { return rm.code() << Rm_offset; } @@ -55,7 +55,7 @@ index 8cdca7bfa83ef7156c9fa8583d29661169132417..c482263e58b4e625724d37c0ab3ccbc4 static Instr Ra(CPURegister ra) { DCHECK_NE(ra.code(), kSPRegInternalCode); -@@ -2158,15 +2154,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { +@@ -2149,15 +2145,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { // These encoding functions allow the stack pointer to be encoded, and // disallow the zero register. diff --git a/shell/app/electron_library_main.mm b/shell/app/electron_library_main.mm index 4f4e9f0583337..a064211de2e56 100644 --- a/shell/app/electron_library_main.mm +++ b/shell/app/electron_library_main.mm @@ -2,6 +2,8 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#include + #include "shell/app/electron_library_main.h" #include "base/at_exit.h" @@ -21,7 +23,7 @@ int ElectronMain(int argc, char* argv[]) { params.argc = argc; params.argv = const_cast(argv); electron::ElectronCommandLine::Init(argc, argv); - return content::ContentMain(params); + return content::ContentMain(std::move(params)); } #if BUILDFLAG(ENABLE_RUN_AS_NODE) diff --git a/shell/app/electron_main.cc b/shell/app/electron_main.cc index e9a0fa4ef0e3b..56292e641c5a2 100644 --- a/shell/app/electron_main.cc +++ b/shell/app/electron_main.cc @@ -13,6 +13,7 @@ #if defined(OS_POSIX) #include +#include "base/ignore_result.h" #endif #if defined(OS_WIN) @@ -24,7 +25,6 @@ #include #include "base/environment.h" -#include "base/macros.h" #include "base/process/launch.h" #include "base/strings/utf_string_conversions.h" #include "base/win/windows_version.h" @@ -289,7 +289,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { params.instance = instance; params.sandbox_info = &sandbox_info; electron::ElectronCommandLine::Init(arguments.argc, arguments.argv); - return content::ContentMain(params); + return content::ContentMain(std::move(params)); } #elif defined(OS_LINUX) // defined(OS_WIN) @@ -315,7 +315,7 @@ int main(int argc, char* argv[]) { // to Crashpad. base::CommandLine::ForCurrentProcess()->AppendSwitch( ::switches::kEnableCrashpad); - return content::ContentMain(params); + return content::ContentMain(std::move(params)); } #else // defined(OS_LINUX) diff --git a/shell/app/electron_main_delegate.cc b/shell/app/electron_main_delegate.cc index 2c588f6a0f58e..54d2969ae5a71 100644 --- a/shell/app/electron_main_delegate.cc +++ b/shell/app/electron_main_delegate.cc @@ -7,6 +7,7 @@ #include #include #include +#include #include "base/base_switches.h" #include "base/command_line.h" @@ -143,7 +144,7 @@ bool ElectronPathProvider(int key, base::FilePath* result) { #else // On Windows, there's no OS-level centralized location for caches, so // store the cache in the app data directory. - int parent_key = base::DIR_APP_DATA; + int parent_key = base::DIR_ROAMING_APP_DATA; #endif if (!base::PathService::Get(parent_key, &cur)) return false; @@ -443,13 +444,14 @@ ElectronMainDelegate::CreateContentUtilityClient() { return utility_client_.get(); } -int ElectronMainDelegate::RunProcess( +absl::variant +ElectronMainDelegate::RunProcess( const std::string& process_type, - const content::MainFunctionParams& main_function_params) { + content::MainFunctionParams main_function_params) { if (process_type == kRelauncherProcess) return relauncher::RelauncherMain(main_function_params); else - return -1; + return std::move(main_function_params); } bool ElectronMainDelegate::ShouldCreateFeatureList() { diff --git a/shell/app/electron_main_delegate.h b/shell/app/electron_main_delegate.h index ff7f5e923b780..afe218de95955 100644 --- a/shell/app/electron_main_delegate.h +++ b/shell/app/electron_main_delegate.h @@ -40,9 +40,9 @@ class ElectronMainDelegate : public content::ContentMainDelegate { content::ContentGpuClient* CreateContentGpuClient() override; content::ContentRendererClient* CreateContentRendererClient() override; content::ContentUtilityClient* CreateContentUtilityClient() override; - int RunProcess( + absl::variant RunProcess( const std::string& process_type, - const content::MainFunctionParams& main_function_params) override; + content::MainFunctionParams main_function_params) override; bool ShouldCreateFeatureList() override; bool ShouldLockSchemeRegistry() override; #if defined(OS_LINUX) diff --git a/shell/app/node_main.cc b/shell/app/node_main.cc index ff0ef3b430fa9..fbc714e2e7ca2 100644 --- a/shell/app/node_main.cc +++ b/shell/app/node_main.cc @@ -186,7 +186,7 @@ int NodeMain(int argc, char* argv[]) { exit(result.exit_code); gin::V8Initializer::LoadV8Snapshot( - gin::V8Initializer::V8SnapshotFileType::kWithAdditionalContext); + gin::V8SnapshotFileType::kWithAdditionalContext); // V8 requires a task scheduler. base::ThreadPoolInstance::CreateAndStartWithDefaultParams("Electron"); diff --git a/shell/app/uv_task_runner.h b/shell/app/uv_task_runner.h index 1d74b28d7c7d8..e56d55fdbaaae 100644 --- a/shell/app/uv_task_runner.h +++ b/shell/app/uv_task_runner.h @@ -8,7 +8,7 @@ #include #include "base/callback.h" -#include "base/single_thread_task_runner.h" +#include "base/task/single_thread_task_runner.h" #include "uv.h" // NOLINT(build/include_directory) namespace base { diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 7328cedf934b0..1ecc88721c445 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -477,7 +477,7 @@ int GetPathConstant(const std::string& name) { #if defined(OS_POSIX) return base::DIR_CACHE; #else - return base::DIR_APP_DATA; + return base::DIR_ROAMING_APP_DATA; #endif else if (name == "userCache") return DIR_USER_CACHE; @@ -1146,7 +1146,7 @@ bool App::Relaunch(gin::Arguments* js_args) { gin_helper::Dictionary options; if (js_args->GetNext(&options)) { - if (options.Get("execPath", &exec_path) | options.Get("args", &args)) + if (options.Get("execPath", &exec_path) || options.Get("args", &args)) override_argv = true; } diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index eb54e2e6eab9b..644df16d75bdb 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/shell/browser/api/electron_api_browser_window.cc @@ -471,7 +471,7 @@ void BrowserWindow::ScheduleUnresponsiveEvent(int ms) { &BrowserWindow::NotifyWindowUnresponsive, GetWeakPtr())); base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, window_unresponsive_closure_.callback(), - base::TimeDelta::FromMilliseconds(ms)); + base::Milliseconds(ms)); } void BrowserWindow::NotifyWindowUnresponsive() { diff --git a/shell/browser/api/electron_api_net_log.cc b/shell/browser/api/electron_api_net_log.cc index 5e30d3290a465..f30aa2aebf8fe 100644 --- a/shell/browser/api/electron_api_net_log.cc +++ b/shell/browser/api/electron_api_net_log.cc @@ -10,8 +10,8 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/task/task_runner_util.h" #include "base/task/thread_pool.h" -#include "base/task_runner_util.h" #include "chrome/browser/browser_process.h" #include "components/net_log/chrome_net_log.h" #include "content/public/browser/storage_partition.h" diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index 21da79fbd27a5..1322378fb20d7 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -124,9 +124,7 @@ uint32_t GetStorageMask(const std::vector& storage_types) { uint32_t storage_mask = 0; for (const auto& it : storage_types) { auto type = base::ToLowerASCII(it); - if (type == "appcache") - storage_mask |= StoragePartition::REMOVE_DATA_MASK_APPCACHE; - else if (type == "cookies") + if (type == "cookies") storage_mask |= StoragePartition::REMOVE_DATA_MASK_COOKIES; else if (type == "filesystem") storage_mask |= StoragePartition::REMOVE_DATA_MASK_FILE_SYSTEMS; @@ -569,7 +567,7 @@ void Session::EnableNetworkEmulation(const gin_helper::Dictionary& options) { options.Get("uploadThroughput", &conditions->upload_throughput); double latency = 0.0; if (options.Get("latency", &latency) && latency) { - conditions->latency = base::TimeDelta::FromMillisecondsD(latency); + conditions->latency = base::Milliseconds(latency); } auto* network_context = diff --git a/shell/browser/api/electron_api_system_preferences_mac.mm b/shell/browser/api/electron_api_system_preferences_mac.mm index f9a9ccbf5549d..56fd1d396921c 100644 --- a/shell/browser/api/electron_api_system_preferences_mac.mm +++ b/shell/browser/api/electron_api_system_preferences_mac.mm @@ -16,9 +16,9 @@ #include "base/mac/scoped_cftyperef.h" #include "base/mac/sdk_forward_declarations.h" -#include "base/sequenced_task_runner.h" #include "base/strings/stringprintf.h" #include "base/strings/sys_string_conversions.h" +#include "base/task/sequenced_task_runner.h" #include "base/threading/sequenced_task_runner_handle.h" #include "base/values.h" #include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.h" diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 6002509c59644..a839de2d5acee 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -14,8 +14,8 @@ #include "base/containers/id_map.h" #include "base/files/file_util.h" +#include "base/ignore_result.h" #include "base/json/json_reader.h" -#include "base/macros.h" #include "base/no_destructor.h" #include "base/strings/utf_string_conversions.h" #include "base/task/current_thread.h" @@ -54,8 +54,6 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_widget_host.h" #include "content/public/browser/render_widget_host_view.h" -#include "content/public/browser/security_style_explanation.h" -#include "content/public/browser/security_style_explanations.h" #include "content/public/browser/service_worker_context.h" #include "content/public/browser/site_instance.h" #include "content/public/browser/storage_partition.h" @@ -402,9 +400,8 @@ absl::optional GetCursorBlinkInterval() { #elif defined(OS_WIN) const auto system_msec = ::GetCaretBlinkTime(); if (system_msec != 0) { - return (system_msec == INFINITE) - ? base::TimeDelta() - : base::TimeDelta::FromMilliseconds(system_msec); + return (system_msec == INFINITE) ? base::TimeDelta() + : base::Milliseconds(system_msec); } #endif return absl::nullopt; @@ -540,7 +537,7 @@ FileSystem CreateFileSystemStruct(content::WebContents* web_contents, const std::string& file_system_id, const std::string& file_system_path, const std::string& type) { - const GURL origin = web_contents->GetURL().GetOrigin(); + const GURL origin = web_contents->GetURL().DeprecatedGetOriginAsURL(); std::string file_system_name = storage::GetIsolatedFileSystemName(origin, file_system_id); std::string root_url = storage::GetIsolatedFileSystemRootURIString( @@ -1356,9 +1353,9 @@ void WebContents::RendererResponsive( Emit("responsive"); } -bool WebContents::HandleContextMenu(content::RenderFrameHost* render_frame_host, +bool WebContents::HandleContextMenu(content::RenderFrameHost& render_frame_host, const content::ContextMenuParams& params) { - Emit("context-menu", std::make_pair(params, render_frame_host)); + Emit("context-menu", std::make_pair(params, &render_frame_host)); return true; } @@ -1565,7 +1562,8 @@ void WebContents::RenderViewDeleted(content::RenderViewHost* render_view_host) { } } -void WebContents::RenderProcessGone(base::TerminationStatus status) { +void WebContents::PrimaryMainFrameRenderProcessGone( + base::TerminationStatus status) { auto weak_this = GetWeakPtr(); Emit("crashed", status == base::TERMINATION_STATUS_PROCESS_WAS_KILLED); @@ -2180,7 +2178,7 @@ bool WebContents::IsLoading() const { } bool WebContents::IsLoadingMainFrame() const { - return web_contents()->IsLoadingToDifferentDocument(); + return web_contents()->ShouldShowLoadingUI(); } bool WebContents::IsWaitingForResponse() const { @@ -2277,8 +2275,8 @@ std::string WebContents::GetMediaSourceID( content::DesktopStreamsRegistry::GetInstance()->RegisterStream( request_frame_host->GetProcess()->GetID(), request_frame_host->GetRoutingID(), - url::Origin::Create( - request_frame_host->GetLastCommittedURL().GetOrigin()), + url::Origin::Create(request_frame_host->GetLastCommittedURL() + .DeprecatedGetOriginAsURL()), media_id, "", content::kRegistryStreamTypeTab); return id; @@ -3460,15 +3458,6 @@ bool WebContents::IsFullscreenForTabOrPending( return html_fullscreen_; } -blink::SecurityStyle WebContents::GetSecurityStyle( - content::WebContents* web_contents, - content::SecurityStyleExplanations* security_style_explanations) { - auto state = security_state::GetVisibleSecurityState(web_contents); - auto security_level = security_state::GetSecurityLevel(*state, false); - return security_state::GetSecurityStyle(security_level, *state, - security_style_explanations); -} - bool WebContents::TakeFocus(content::WebContents* source, bool reverse) { if (source && source->GetOutermostWebContents() == source) { // If this is the outermost web contents and the user has tabbed or diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index c164d4bee7114..01cf5cb9095b3 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -548,7 +548,7 @@ class WebContents : public ExclusiveAccessContext, void RendererResponsive( content::WebContents* source, content::RenderWidgetHost* render_widget_host) override; - bool HandleContextMenu(content::RenderFrameHost* render_frame_host, + bool HandleContextMenu(content::RenderFrameHost& render_frame_host, const content::ContextMenuParams& params) override; bool OnGoToEntryOffset(int offset) override; void FindReply(content::WebContents* web_contents, @@ -585,7 +585,8 @@ class WebContents : public ExclusiveAccessContext, content::RenderFrameHost* new_host) override; void FrameDeleted(int frame_tree_node_id) override; void RenderViewDeleted(content::RenderViewHost*) override; - void RenderProcessGone(base::TerminationStatus status) override; + void PrimaryMainFrameRenderProcessGone( + base::TerminationStatus status) override; void DOMContentLoaded(content::RenderFrameHost* render_frame_host) override; void DidFinishLoad(content::RenderFrameHost* render_frame_host, const GURL& validated_url) override; @@ -677,9 +678,6 @@ class WebContents : public ExclusiveAccessContext, bool IsExclusiveAccessBubbleDisplayed() const override; bool IsFullscreenForTabOrPending(const content::WebContents* source) override; - blink::SecurityStyle GetSecurityStyle( - content::WebContents* web_contents, - content::SecurityStyleExplanations* explanations) override; bool TakeFocus(content::WebContents* source, bool reverse) override; content::PictureInPictureResult EnterPictureInPicture( content::WebContents* web_contents, diff --git a/shell/browser/api/frame_subscriber.cc b/shell/browser/api/frame_subscriber.cc index 90173b567868d..00171d41f125d 100644 --- a/shell/browser/api/frame_subscriber.cc +++ b/shell/browser/api/frame_subscriber.cc @@ -51,8 +51,7 @@ void FrameSubscriber::AttachToHost(content::RenderWidgetHost* host) { video_capturer_->SetMinSizeChangePeriod(base::TimeDelta()); video_capturer_->SetFormat(media::PIXEL_FORMAT_ARGB, gfx::ColorSpace::CreateREC709()); - video_capturer_->SetMinCapturePeriod(base::TimeDelta::FromSeconds(1) / - kMaxFrameRate); + video_capturer_->SetMinCapturePeriod(base::Seconds(1) / kMaxFrameRate); video_capturer_->Start(this); } diff --git a/shell/browser/browser_mac.mm b/shell/browser/browser_mac.mm index 77bd3e18e5210..5080f34fd5002 100644 --- a/shell/browser/browser_mac.mm +++ b/shell/browser/browser_mac.mm @@ -403,7 +403,7 @@ void RemoveFromLoginItems() { // immediately after DockShow. After some experiments, 1 second seems to be // a proper interval. if (!last_dock_show_.is_null() && - base::Time::Now() - last_dock_show_ < base::TimeDelta::FromSeconds(1)) { + base::Time::Now() - last_dock_show_ < base::Seconds(1)) { return; } diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 213687581f202..d6065678a401d 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -918,8 +918,9 @@ ElectronBrowserClient::GetSystemNetworkContext() { std::unique_ptr ElectronBrowserClient::CreateBrowserMainParts( - const content::MainFunctionParams& params) { - auto browser_main_parts = std::make_unique(params); + content::MainFunctionParams params) { + auto browser_main_parts = + std::make_unique(std::move(params)); #if defined(OS_MAC) browser_main_parts_ = browser_main_parts.get(); @@ -1437,10 +1438,9 @@ void ElectronBrowserClient::OverrideURLLoaderFactoryParams( } #if defined(OS_WIN) -bool ElectronBrowserClient::PreSpawnChild( - sandbox::TargetPolicy* policy, - sandbox::policy::SandboxType sandbox_type, - ChildSpawnFlags flags) { +bool ElectronBrowserClient::PreSpawnChild(sandbox::TargetPolicy* policy, + sandbox::mojom::Sandbox sandbox_type, + ChildSpawnFlags flags) { // Allow crashpad to communicate via named pipe. sandbox::ResultCode result = policy->AddRule( sandbox::TargetPolicy::SUBSYS_FILES, diff --git a/shell/browser/electron_browser_client.h b/shell/browser/electron_browser_client.h index f8b20c051de1f..b95624256dd68 100644 --- a/shell/browser/electron_browser_client.h +++ b/shell/browser/electron_browser_client.h @@ -180,7 +180,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, std::unique_ptr CreateDevToolsManagerDelegate() override; std::unique_ptr CreateBrowserMainParts( - const content::MainFunctionParams&) override; + content::MainFunctionParams params) override; base::FilePath GetDefaultDownloadDirectory() override; scoped_refptr GetSystemSharedURLLoaderFactory() override; @@ -232,7 +232,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient, network::mojom::URLLoaderFactoryParams* factory_params) override; #if defined(OS_WIN) bool PreSpawnChild(sandbox::TargetPolicy* policy, - sandbox::policy::SandboxType sandbox_type, + sandbox::mojom::Sandbox sandbox_type, ChildSpawnFlags flags) override; #endif bool BindAssociatedReceiverFromFrame( diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index cf1b95c71a2f2..5cabbb3af45ef 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -64,26 +64,15 @@ #if defined(OS_LINUX) #include "base/environment.h" #include "base/threading/thread_task_runner_handle.h" +#include "device/bluetooth/bluetooth_adapter_factory.h" +#include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h" +#include "ui/base/cursor/cursor_factory.h" +#include "ui/base/ime/linux/linux_input_method_context_factory.h" +#include "ui/gfx/color_utils.h" #include "ui/gtk/gtk_ui_factory.h" #include "ui/gtk/gtk_util.h" -#include "ui/views/linux_ui/linux_ui.h" - -#if defined(USE_OZONE) #include "ui/ozone/public/ozone_platform.h" -#endif - -#if defined(USE_X11) -#include "ui/base/x/x11_util.h" -#include "ui/events/devices/x11/touch_factory_x11.h" -#include "ui/gfx/color_utils.h" -#include "ui/gfx/x/connection.h" -#include "ui/gfx/x/xproto_util.h" -#endif - -#if defined(USE_OZONE) || defined(USE_X11) -#include "ui/base/ui_base_features.h" -#endif - +#include "ui/views/linux_ui/linux_ui.h" #endif #if defined(OS_WIN) @@ -100,11 +89,6 @@ #include "shell/browser/ui/views/electron_views_delegate.h" #endif -#if defined(OS_LINUX) -#include "device/bluetooth/bluetooth_adapter_factory.h" -#include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h" -#endif - #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "extensions/browser/browser_context_keyed_service_factories.h" @@ -227,6 +211,9 @@ int ElectronBrowserMainParts::PreEarlyInitialization() { #if defined(OS_POSIX) HandleSIGCHLD(); #endif +#if defined(OS_LINUX) + ui::OzonePlatform::PreEarlyInitialization(); +#endif return GetExitCode(); } @@ -375,6 +362,7 @@ void ElectronBrowserMainParts::ToolkitInitialized() { #if defined(OS_LINUX) auto linux_ui = BuildGtkUi(); linux_ui->Initialize(); + DCHECK(ui::LinuxInputMethodContextFactory::instance()); // Chromium does not respect GTK dark theme setting, but they may change // in future and this code might be no longer needed. Check the Chromium @@ -386,6 +374,10 @@ void ElectronBrowserMainParts::ToolkitInitialized() { dark_theme_observer_ = std::make_unique(); linux_ui->GetNativeTheme(nullptr)->AddObserver(dark_theme_observer_.get()); views::LinuxUI::SetInstance(std::move(linux_ui)); + + // Cursor theme changes are tracked by LinuxUI (via a CursorThemeManager + // implementation). Start observing them once it's initialized. + ui::CursorFactory::GetInstance()->ObserveThemeChanges(); #endif #if defined(USE_AURA) @@ -430,10 +422,6 @@ int ElectronBrowserMainParts::PreMainMessageLoopRun() { SpellcheckServiceFactory::GetInstance(); #endif -#if defined(USE_X11) - ui::TouchFactory::SetTouchDeviceListFromCommandLine(); -#endif - content::WebUIControllerFactory::RegisterFactory( ElectronWebUIControllerFactory::GetInstance()); @@ -471,15 +459,11 @@ void ElectronBrowserMainParts::WillRunMainMessageLoop( } void ElectronBrowserMainParts::PostCreateMainMessageLoop() { -#if defined(USE_OZONE) - if (features::IsUsingOzonePlatform()) { - auto shutdown_cb = - base::BindOnce(base::RunLoop::QuitCurrentWhenIdleClosureDeprecated()); - ui::OzonePlatform::GetInstance()->PostCreateMainMessageLoop( - std::move(shutdown_cb)); - } -#endif #if defined(OS_LINUX) + auto shutdown_cb = + base::BindOnce(base::RunLoop::QuitCurrentWhenIdleClosureDeprecated()); + ui::OzonePlatform::GetInstance()->PostCreateMainMessageLoop( + std::move(shutdown_cb)); bluez::DBusBluezManagerWrapperLinux::Initialize(); #endif #if defined(OS_POSIX) @@ -519,6 +503,10 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() { fake_browser_process_->PostMainMessageLoopRun(); content::DevToolsAgentHost::StopRemoteDebuggingPipeHandler(); + +#if defined(OS_LINUX) + ui::OzonePlatform::GetInstance()->PostMainMessageLoopRun(); +#endif } #if !defined(OS_MAC) diff --git a/shell/browser/electron_download_manager_delegate.cc b/shell/browser/electron_download_manager_delegate.cc index a937374b133b7..c390fbff9406d 100644 --- a/shell/browser/electron_download_manager_delegate.cc +++ b/shell/browser/electron_download_manager_delegate.cc @@ -9,7 +9,7 @@ #include "base/bind.h" #include "base/files/file_util.h" -#include "base/macros.h" +#include "base/ignore_result.h" #include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "chrome/common/pref_names.h" diff --git a/shell/browser/electron_javascript_dialog_manager.cc b/shell/browser/electron_javascript_dialog_manager.cc index e94d0c99ea4a1..d995777e3703c 100644 --- a/shell/browser/electron_javascript_dialog_manager.cc +++ b/shell/browser/electron_javascript_dialog_manager.cc @@ -46,7 +46,7 @@ void ElectronJavaScriptDialogManager::RunJavaScriptDialog( if (origin_url.SchemeIsFile()) { origin = origin_url.path(); } else { - origin = origin_url.GetOrigin().spec(); + origin = origin_url.DeprecatedGetOriginAsURL().spec(); } if (origin_counts_[origin] == kUserWantsNoMoreDialogs) { diff --git a/shell/browser/extensions/electron_extension_loader.cc b/shell/browser/extensions/electron_extension_loader.cc index 87ca552bf624a..faf736e00508a 100644 --- a/shell/browser/extensions/electron_extension_loader.cc +++ b/shell/browser/extensions/electron_extension_loader.cc @@ -11,10 +11,10 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/logging.h" -#include "base/sequenced_task_runner.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" -#include "base/task_runner_util.h" +#include "base/task/sequenced_task_runner.h" +#include "base/task/task_runner_util.h" #include "base/threading/thread_restrictions.h" #include "base/time/time.h" #include "extensions/browser/extension_file_task_runner.h" diff --git a/shell/browser/extensions/electron_extension_message_filter.h b/shell/browser/extensions/electron_extension_message_filter.h index 25d11dd7647f1..cb0d69a6f3721 100644 --- a/shell/browser/extensions/electron_extension_message_filter.h +++ b/shell/browser/extensions/electron_extension_message_filter.h @@ -8,7 +8,7 @@ #include #include -#include "base/sequenced_task_runner_helpers.h" +#include "base/task/sequenced_task_runner_helpers.h" #include "content/public/browser/browser_message_filter.h" #include "content/public/browser/browser_thread.h" #include "extensions/common/extension_l10n_util.h" diff --git a/shell/browser/extensions/electron_extensions_api_client.cc b/shell/browser/extensions/electron_extensions_api_client.cc index 91de7d230ddfa..b8ac568e10722 100644 --- a/shell/browser/extensions/electron_extensions_api_client.cc +++ b/shell/browser/extensions/electron_extensions_api_client.cc @@ -64,7 +64,7 @@ class ElectronMimeHandlerViewGuestDelegate const ElectronMimeHandlerViewGuestDelegate&) = delete; // MimeHandlerViewGuestDelegate. - bool HandleContextMenu(content::WebContents* web_contents, + bool HandleContextMenu(content::RenderFrameHost& render_frame_host, const content::ContextMenuParams& params) override { // TODO(nornagon): surface this event to JS LOG(INFO) << "HCM"; diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index a08fa5d88406b..50a5eedd4bb90 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -9,18 +9,20 @@ #include #include +#include "base/allocator/partition_alloc_features.h" #include "base/allocator/partition_allocator/partition_alloc.h" #include "base/command_line.h" +#include "base/feature_list.h" #include "base/task/current_thread.h" #include "base/task/thread_pool/initialization_util.h" #include "base/threading/thread_task_runner_handle.h" #include "base/trace_event/trace_event.h" -#include "content/public/common/content_switches.h" #include "gin/array_buffer.h" #include "gin/v8_initializer.h" #include "shell/browser/microtasks_runner.h" #include "shell/common/gin_helper/cleaned_up_at_exit.h" #include "shell/common/node_includes.h" +#include "third_party/blink/public/common/switches.h" namespace { v8::Isolate* g_isolate; @@ -74,6 +76,11 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { public: enum InitializationPolicy { kZeroInitialize, kDontInitialize }; + base::PartitionOptions::LazyCommit lazy_commit = + base::FeatureList::IsEnabled(base::features::kPartitionAllocLazyCommit) + ? base::PartitionOptions::LazyCommit::kEnabled + : base::PartitionOptions::LazyCommit::kDisabled; + ArrayBufferAllocator() { // Ref. // https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/platform/wtf/allocator/partitions.cc;l=94;drc=062c315a858a87f834e16a144c2c8e9591af2beb @@ -82,7 +89,8 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { base::PartitionOptions::Quarantine::kAllowed, base::PartitionOptions::Cookie::kAllowed, base::PartitionOptions::BackupRefPtr::kDisabled, - base::PartitionOptions::UseConfigurablePool::kNo}); + base::PartitionOptions::UseConfigurablePool::kNo, + lazy_commit}); } // Allocate() methods return null to signal allocation failure to V8, which @@ -152,6 +160,8 @@ JavascriptEnvironment::JavascriptEnvironment(uv_loop_t* event_loop) gin::IsolateHolder::kAllowAtomicsWait, gin::IsolateHolder::IsolateType::kUtility, gin::IsolateHolder::IsolateCreationMode::kNormal, + nullptr, + nullptr, isolate_), locker_(isolate_) { isolate_->Enter(); @@ -293,8 +303,7 @@ class TracingControllerImpl : public node::tracing::TracingController { arg_convertables); DCHECK_LE(num_args, 2); base::TimeTicks timestamp = - base::TimeTicks() + - base::TimeDelta::FromMicroseconds(timestampMicroseconds); + base::TimeTicks() + base::Microseconds(timestampMicroseconds); base::trace_event::TraceEventHandle handle = TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP( phase, category_enabled_flag, name, scope, id, bind_id, @@ -323,7 +332,8 @@ v8::Isolate* JavascriptEnvironment::Initialize(uv_loop_t* event_loop) { auto* cmd = base::CommandLine::ForCurrentProcess(); // --js-flags. - std::string js_flags = cmd->GetSwitchValueASCII(switches::kJavaScriptFlags); + std::string js_flags = + cmd->GetSwitchValueASCII(blink::switches::kJavaScriptFlags); if (!js_flags.empty()) v8::V8::SetFlagsFromString(js_flags.c_str(), js_flags.size()); @@ -337,9 +347,10 @@ v8::Isolate* JavascriptEnvironment::Initialize(uv_loop_t* event_loop) { tracing_controller, gin::V8Platform::PageAllocator()); v8::V8::InitializePlatform(platform_); - gin::IsolateHolder::Initialize( - gin::IsolateHolder::kNonStrictMode, new ArrayBufferAllocator(), - nullptr /* external_reference_table */, false /* create_v8_platform */); + gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode, + new ArrayBufferAllocator(), + nullptr /* external_reference_table */, + js_flags, false /* create_v8_platform */); v8::Isolate* isolate = v8::Isolate::Allocate(); platform_->RegisterIsolate(isolate, event_loop); diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index c851ff24b9287..210fe871e0119 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -136,12 +136,12 @@ void NativeWindow::InitFromOptions(const gin_helper::Dictionary& options) { extensions::SizeConstraints size_constraints( use_content_size ? GetContentSizeConstraints() : GetSizeConstraints()); int min_height = 0, min_width = 0; - if (options.Get(options::kMinHeight, &min_height) | + if (options.Get(options::kMinHeight, &min_height) || options.Get(options::kMinWidth, &min_width)) { size_constraints.set_minimum_size(gfx::Size(min_width, min_height)); } int max_height = INT_MAX, max_width = INT_MAX; - if (options.Get(options::kMaxHeight, &max_height) | + if (options.Get(options::kMaxHeight, &max_height) || options.Get(options::kMaxWidth, &max_width)) { size_constraints.set_maximum_size(gfx::Size(max_width, max_height)); } diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 90a096b9fde66..2b7abf15e736f 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -70,7 +70,7 @@ #elif defined(OS_WIN) #include "base/win/win_util.h" -#include "extensions/common/image_util.h" +#include "content/public/common/color_parser.h" #include "shell/browser/ui/views/win_frame_view.h" #include "shell/browser/ui/win/electron_desktop_native_widget_aura.h" #include "skia/ext/skia_utils_win.h" @@ -189,16 +189,16 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options, std::string overlay_color_string; if (titlebar_overlay_obj.Get(options::kOverlayButtonColor, &overlay_color_string)) { - bool success = extensions::image_util::ParseCssColorString( - overlay_color_string, &overlay_button_color_); + bool success = content::ParseCssColorString(overlay_color_string, + &overlay_button_color_); DCHECK(success); } std::string overlay_symbol_color_string; if (titlebar_overlay_obj.Get(options::kOverlaySymbolColor, &overlay_symbol_color_string)) { - bool success = extensions::image_util::ParseCssColorString( - overlay_symbol_color_string, &overlay_symbol_color_); + bool success = content::ParseCssColorString(overlay_symbol_color_string, + &overlay_symbol_color_); DCHECK(success); } } diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 39e86112b555b..69a80127fa37e 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -12,8 +12,8 @@ #include "base/callback_helpers.h" #include "base/location.h" #include "base/memory/ptr_util.h" -#include "base/single_thread_task_runner.h" #include "base/task/post_task.h" +#include "base/task/single_thread_task_runner.h" #include "base/time/time.h" #include "components/viz/common/features.h" #include "components/viz/common/frame_sinks/begin_frame_args.h" @@ -297,7 +297,8 @@ bool OffScreenRenderWidgetHostView::IsSurfaceAvailableForCopy() { return GetDelegatedFrameHost()->CanCopyFromCompositingSurface(); } -void OffScreenRenderWidgetHostView::Show() { +void OffScreenRenderWidgetHostView::ShowWithVisibility( + content::PageVisibilityState /*page_visibility*/) { if (is_showing_) return; @@ -480,16 +481,17 @@ void OffScreenRenderWidgetHostView::CopyFromSurface( std::move(callback)); } -void OffScreenRenderWidgetHostView::GetScreenInfo( - display::ScreenInfo* screen_info) { - screen_info->depth = 24; - screen_info->depth_per_component = 8; - screen_info->orientation_angle = 0; - screen_info->device_scale_factor = GetCurrentDeviceScaleFactor(); - screen_info->orientation_type = +display::ScreenInfo OffScreenRenderWidgetHostView::GetScreenInfo() const { + display::ScreenInfo screen_info; + screen_info.depth = 24; + screen_info.depth_per_component = 8; + screen_info.orientation_angle = 0; + screen_info.device_scale_factor = GetDeviceScaleFactor(); + screen_info.orientation_type = display::mojom::ScreenOrientation::kLandscapePrimary; - screen_info->rect = gfx::Rect(size_); - screen_info->available_rect = gfx::Rect(size_); + screen_info.rect = gfx::Rect(size_); + screen_info.available_rect = gfx::Rect(size_); + return screen_info; } void OffScreenRenderWidgetHostView::TransformPointToRootSurface( @@ -525,7 +527,7 @@ void OffScreenRenderWidgetHostView::ImeCompositionRangeChanged( gfx::Size OffScreenRenderWidgetHostView::GetCompositorViewportPixelSize() { return gfx::ScaleToCeiledSize(GetRequestedRendererSize(), - GetCurrentDeviceScaleFactor()); + GetDeviceScaleFactor()); } ui::Compositor* OffScreenRenderWidgetHostView::GetCompositor() { @@ -685,7 +687,7 @@ void OffScreenRenderWidgetHostView::OnPaint(const gfx::Rect& damage_rect, } gfx::Size OffScreenRenderWidgetHostView::SizeInPixels() { - float sf = GetCurrentDeviceScaleFactor(); + float sf = GetDeviceScaleFactor(); if (IsPopupWidget()) { return gfx::ToFlooredSize( gfx::ConvertSizeToPixels(popup_position_.size(), sf)); @@ -707,7 +709,7 @@ void OffScreenRenderWidgetHostView::CompositeFrame( if (proxy_views_.empty() && !popup_host_view_) { frame = GetBacking(); } else { - float sf = GetCurrentDeviceScaleFactor(); + float sf = GetDeviceScaleFactor(); frame.allocN32Pixels(size_in_pixels.width(), size_in_pixels.height(), false); if (!GetBacking().drawsNothing()) { @@ -742,13 +744,13 @@ void OffScreenRenderWidgetHostView::CompositeFrame( void OffScreenRenderWidgetHostView::OnPopupPaint(const gfx::Rect& damage_rect) { InvalidateBounds(gfx::ToEnclosingRect( - gfx::ConvertRectToPixels(damage_rect, GetCurrentDeviceScaleFactor()))); + gfx::ConvertRectToPixels(damage_rect, GetDeviceScaleFactor()))); } void OffScreenRenderWidgetHostView::OnProxyViewPaint( const gfx::Rect& damage_rect) { InvalidateBounds(gfx::ToEnclosingRect( - gfx::ConvertRectToPixels(damage_rect, GetCurrentDeviceScaleFactor()))); + gfx::ConvertRectToPixels(damage_rect, GetDeviceScaleFactor()))); } void OffScreenRenderWidgetHostView::HoldResize() { @@ -974,8 +976,7 @@ void OffScreenRenderWidgetHostView::SetupFrameRate(bool force) { if (compositor_) { compositor_->SetDisplayVSyncParameters( - base::TimeTicks::Now(), - base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_)); + base::TimeTicks::Now(), base::Microseconds(frame_rate_threshold_us_)); } } @@ -993,7 +994,7 @@ void OffScreenRenderWidgetHostView::ResizeRootLayer(bool force) { display::Display display = display::Screen::GetScreen()->GetDisplayNearestView(GetNativeView()); const float scaleFactor = display.device_scale_factor(); - float sf = GetCurrentDeviceScaleFactor(); + float sf = GetDeviceScaleFactor(); const bool scaleFactorDidChange = scaleFactor != sf; // Initialize a screen_infos_ struct as needed, to cache the scale factor. @@ -1056,4 +1057,19 @@ void OffScreenRenderWidgetHostView::UpdateBackgroundColorFromRenderer( GetRootLayer()->SetColor(color); } +void OffScreenRenderWidgetHostView::NotifyHostAndDelegateOnWasShown( + blink::mojom::RecordContentToVisibleTimeRequestPtr) { + NOTREACHED(); +} + +void OffScreenRenderWidgetHostView::RequestPresentationTimeFromHostOrDelegate( + blink::mojom::RecordContentToVisibleTimeRequestPtr) { + NOTREACHED(); +} + +void OffScreenRenderWidgetHostView:: + CancelPresentationTimeRequestForHostAndDelegate() { + NOTREACHED(); +} + } // namespace electron diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 485a18180cfe1..7f310dedfc61b 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -27,6 +27,7 @@ #include "shell/browser/osr/osr_host_display_client.h" #include "shell/browser/osr/osr_video_consumer.h" #include "shell/browser/osr/osr_view_proxy.h" +#include "third_party/blink/public/mojom/widget/record_content_to_visible_time_request.mojom-forward.h" #include "third_party/blink/public/platform/web_vector.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/ime/text_input_client.h" @@ -85,7 +86,6 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, bool HasFocus(void) override; uint32_t GetCaptureSequenceNumber() const override; bool IsSurfaceAvailableForCopy(void) override; - void Show(void) override; void Hide(void) override; bool IsShowing(void) override; void EnsureSurfaceSynchronizedForWebTest() override; @@ -126,6 +126,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, void TextInputStateChanged(const ui::mojom::TextInputState& params) override; void ImeCancelComposition(void) override; void RenderProcessGone() override; + void ShowWithVisibility(content::PageVisibilityState page_visibility) final; void Destroy(void) override; void UpdateTooltipUnderCursor(const std::u16string&) override; content::CursorManager* GetCursorManager() override; @@ -133,12 +134,17 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, const gfx::Rect& src_rect, const gfx::Size& output_size, base::OnceCallback callback) override; - void GetScreenInfo(display::ScreenInfo* screen_info) override; + display::ScreenInfo GetScreenInfo() const override; void TransformPointToRootSurface(gfx::PointF* point) override; gfx::Rect GetBoundsInRootWindow(void) override; absl::optional GetDisplayFeature() override; void SetDisplayFeatureForTesting( const content::DisplayFeature* display_feature) override; + void NotifyHostAndDelegateOnWasShown( + blink::mojom::RecordContentToVisibleTimeRequestPtr) final; + void RequestPresentationTimeFromHostOrDelegate( + blink::mojom::RecordContentToVisibleTimeRequestPtr) final; + void CancelPresentationTimeRequestForHostAndDelegate() final; viz::SurfaceId GetCurrentSurfaceId() const override; std::unique_ptr CreateSyntheticGestureTarget() override; diff --git a/shell/browser/osr/osr_video_consumer.cc b/shell/browser/osr/osr_video_consumer.cc index c2eb11ecbd2a6..10a5f0b484bff 100644 --- a/shell/browser/osr/osr_video_consumer.cc +++ b/shell/browser/osr/osr_video_consumer.cc @@ -40,8 +40,7 @@ void OffScreenVideoConsumer::SetActive(bool active) { } void OffScreenVideoConsumer::SetFrameRate(int frame_rate) { - video_capturer_->SetMinCapturePeriod(base::TimeDelta::FromSeconds(1) / - frame_rate); + video_capturer_->SetMinCapturePeriod(base::Seconds(1) / frame_rate); } void OffScreenVideoConsumer::SizeChanged() { diff --git a/shell/browser/osr/osr_web_contents_view.cc b/shell/browser/osr/osr_web_contents_view.cc index f1acacf0380bd..7ce4bbcd35f92 100644 --- a/shell/browser/osr/osr_web_contents_view.cc +++ b/shell/browser/osr/osr_web_contents_view.cc @@ -152,6 +152,8 @@ void OffScreenWebContentsView::RenderViewHostChanged( void OffScreenWebContentsView::SetOverscrollControllerEnabled(bool enabled) {} +void OffScreenWebContentsView::OnCapturerCountChanged() {} + #if defined(OS_MAC) bool OffScreenWebContentsView::CloseTabAfterEventTrackingIfNeeded() { return false; diff --git a/shell/browser/osr/osr_web_contents_view.h b/shell/browser/osr/osr_web_contents_view.h index 0e02728f48c67..ccff07155b70e 100644 --- a/shell/browser/osr/osr_web_contents_view.h +++ b/shell/browser/osr/osr_web_contents_view.h @@ -62,6 +62,7 @@ class OffScreenWebContentsView : public content::WebContentsView, void RenderViewHostChanged(content::RenderViewHost* old_host, content::RenderViewHost* new_host) override; void SetOverscrollControllerEnabled(bool enabled) override; + void OnCapturerCountChanged() override; #if defined(OS_MAC) bool CloseTabAfterEventTrackingIfNeeded() override; diff --git a/shell/browser/plugins/plugin_utils.h b/shell/browser/plugins/plugin_utils.h index 0aaec62c3d2e3..1630b14bb23a6 100644 --- a/shell/browser/plugins/plugin_utils.h +++ b/shell/browser/plugins/plugin_utils.h @@ -16,6 +16,7 @@ class BrowserContext; class PluginUtils { public: // disable copy + PluginUtils() = delete; PluginUtils(const PluginUtils&) = delete; PluginUtils& operator=(const PluginUtils&) = delete; diff --git a/shell/browser/ui/autofill_popup.cc b/shell/browser/ui/autofill_popup.cc index 066f5b21abfc3..7d9f759bb9fd1 100644 --- a/shell/browser/ui/autofill_popup.cc +++ b/shell/browser/ui/autofill_popup.cc @@ -8,7 +8,6 @@ #include "base/feature_list.h" #include "base/i18n/rtl.h" -#include "chrome/browser/ui/views/autofill/autofill_popup_view_utils.h" #include "components/autofill/core/common/autofill_features.h" #include "electron/buildflags/buildflags.h" #include "mojo/public/cpp/bindings/associated_remote.h" @@ -31,6 +30,134 @@ namespace electron { +void CalculatePopupXAndWidthHorizontallyCentered( + int popup_preferred_width, + const gfx::Rect& content_area_bounds, + const gfx::Rect& element_bounds, + bool is_rtl, + gfx::Rect* bubble_bounds) { + // The preferred horizontal starting point for the pop-up is at the horizontal + // center of the field. + int preferred_starting_point = + base::clamp(element_bounds.x() + (element_bounds.size().width() / 2), + content_area_bounds.x(), content_area_bounds.right()); + + // The space available to the left and to the right. + int space_to_right = content_area_bounds.right() - preferred_starting_point; + int space_to_left = preferred_starting_point - content_area_bounds.x(); + + // Calculate the pop-up width. This is either the preferred pop-up width, or + // alternatively the maximum space available if there is not sufficient space + // for the preferred width. + int popup_width = + std::min(popup_preferred_width, space_to_left + space_to_right); + + // Calculates the space that is available to grow into the preferred + // direction. In RTL, this is the space to the right side of the content + // area, in LTR this is the space to the left side of the content area. + int space_to_grow_in_preferred_direction = + is_rtl ? space_to_left : space_to_right; + + // Calculate how much the pop-up needs to grow into the non-preferred + // direction. + int amount_to_grow_in_unpreffered_direction = + std::max(0, popup_width - space_to_grow_in_preferred_direction); + + bubble_bounds->set_width(popup_width); + if (is_rtl) { + // Note, in RTL the |pop_up_width| must be subtracted to achieve + // right-alignment of the pop-up with the element. + bubble_bounds->set_x(preferred_starting_point - popup_width + + amount_to_grow_in_unpreffered_direction); + } else { + bubble_bounds->set_x(preferred_starting_point - + amount_to_grow_in_unpreffered_direction); + } +} + +void CalculatePopupXAndWidth(int popup_preferred_width, + const gfx::Rect& content_area_bounds, + const gfx::Rect& element_bounds, + bool is_rtl, + gfx::Rect* bubble_bounds) { + int right_growth_start = base::clamp( + element_bounds.x(), content_area_bounds.x(), content_area_bounds.right()); + int left_growth_end = + base::clamp(element_bounds.right(), content_area_bounds.x(), + content_area_bounds.right()); + + int right_available = content_area_bounds.right() - right_growth_start; + int left_available = left_growth_end - content_area_bounds.x(); + + int popup_width = std::min(popup_preferred_width, + std::max(left_available, right_available)); + + // Prefer to grow towards the end (right for LTR, left for RTL). But if there + // is not enough space available in the desired direction and more space in + // the other direction, reverse it. + bool grow_left = false; + if (is_rtl) { + grow_left = + left_available >= popup_width || left_available >= right_available; + } else { + grow_left = + right_available < popup_width && right_available < left_available; + } + + bubble_bounds->set_width(popup_width); + bubble_bounds->set_x(grow_left ? left_growth_end - popup_width + : right_growth_start); +} + +void CalculatePopupYAndHeight(int popup_preferred_height, + const gfx::Rect& content_area_bounds, + const gfx::Rect& element_bounds, + gfx::Rect* bubble_bounds) { + int top_growth_end = base::clamp(element_bounds.y(), content_area_bounds.y(), + content_area_bounds.bottom()); + int bottom_growth_start = + base::clamp(element_bounds.bottom(), content_area_bounds.y(), + content_area_bounds.bottom()); + + int top_available = top_growth_end - content_area_bounds.y(); + int bottom_available = content_area_bounds.bottom() - bottom_growth_start; + + bubble_bounds->set_height(popup_preferred_height); + bubble_bounds->set_y(top_growth_end); + + if (bottom_available >= popup_preferred_height || + bottom_available >= top_available) { + bubble_bounds->AdjustToFit( + gfx::Rect(bubble_bounds->x(), element_bounds.bottom(), + bubble_bounds->width(), bottom_available)); + } else { + bubble_bounds->AdjustToFit( + gfx::Rect(bubble_bounds->x(), content_area_bounds.y(), + bubble_bounds->width(), top_available)); + } +} + +gfx::Rect CalculatePopupBounds(const gfx::Size& desired_size, + const gfx::Rect& content_area_bounds, + const gfx::Rect& element_bounds, + bool is_rtl, + bool horizontally_centered) { + gfx::Rect bubble_bounds; + + if (horizontally_centered) { + CalculatePopupXAndWidthHorizontallyCentered( + desired_size.width(), content_area_bounds, element_bounds, is_rtl, + &bubble_bounds); + } else { + CalculatePopupXAndWidth(desired_size.width(), content_area_bounds, + element_bounds, is_rtl, &bubble_bounds); + } + CalculatePopupYAndHeight(desired_size.height(), content_area_bounds, + element_bounds, &bubble_bounds); + + return bubble_bounds; +} + AutofillPopup::AutofillPopup() { bold_font_list_ = gfx::FontList().DeriveWithWeight(gfx::Font::Weight::BOLD); smaller_font_list_ = diff --git a/shell/browser/ui/cocoa/electron_bundle_mover.mm b/shell/browser/ui/cocoa/electron_bundle_mover.mm index 0bbe3f6c81665..b7e61f97059dc 100644 --- a/shell/browser/ui/cocoa/electron_bundle_mover.mm +++ b/shell/browser/ui/cocoa/electron_bundle_mover.mm @@ -84,7 +84,7 @@ // Check if we can write to the applications directory // and then make sure that if the app already exists we can overwrite it bool needAuthorization = - ![fileManager isWritableFileAtPath:applicationsDirectory] | + ![fileManager isWritableFileAtPath:applicationsDirectory] || ([fileManager fileExistsAtPath:destinationPath] && ![fileManager isWritableFileAtPath:destinationPath]); diff --git a/shell/browser/ui/drag_util_views.cc b/shell/browser/ui/drag_util_views.cc index f151028ed1eeb..d8e96eea3d856 100644 --- a/shell/browser/ui/drag_util_views.cc +++ b/shell/browser/ui/drag_util_views.cc @@ -24,9 +24,8 @@ void DragFileItems(const std::vector& files, // Set up our OLE machinery auto data = std::make_unique(); - button_drag_utils::SetDragImage( - GURL(), files[0].LossyDisplayName(), icon.AsImageSkia(), nullptr, - *views::Widget::GetTopLevelWidgetForNativeView(view), data.get()); + button_drag_utils::SetDragImage(GURL(), files[0].LossyDisplayName(), + icon.AsImageSkia(), nullptr, data.get()); std::vector file_infos; file_infos.reserve(files.size()); diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index e7c64bf957c32..7a6856f86dff3 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -175,9 +175,8 @@ GURL GetDevToolsURL(bool can_dock) { return GURL(url_string); } -constexpr base::TimeDelta kInitialBackoffDelay = - base::TimeDelta::FromMilliseconds(250); -constexpr base::TimeDelta kMaxBackoffDelay = base::TimeDelta::FromSeconds(10); +constexpr base::TimeDelta kInitialBackoffDelay = base::Milliseconds(250); +constexpr base::TimeDelta kMaxBackoffDelay = base::Seconds(10); } // namespace @@ -954,6 +953,13 @@ void InspectableWebContents::ClearPreferences() { sync_disabled_update.Get()->Clear(); } +void InspectableWebContents::GetSyncInformation(DispatchCallback callback) { + // TODO(anyone): do we want devtool syncing in Electron? + base::Value result(base::Value::Type::DICTIONARY); + result.SetBoolKey("isSyncActive", false); + std::move(callback).Run(&result); +} + void InspectableWebContents::ConnectionReady() {} void InspectableWebContents::RegisterExtensionsAPI(const std::string& origin, @@ -1111,7 +1117,7 @@ void InspectableWebContents::DidFinishNavigation( !navigation_handle->HasCommitted()) return; content::RenderFrameHost* frame = navigation_handle->GetRenderFrameHost(); - auto origin = navigation_handle->GetURL().GetOrigin().spec(); + auto origin = navigation_handle->GetURL().DeprecatedGetOriginAsURL().spec(); auto it = extensions_api_.find(origin); if (it == extensions_api_.end()) return; diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index 3650b5300dd7a..a874ba946326f 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -146,6 +146,7 @@ class InspectableWebContents const std::string& value) override; void RemovePreference(const std::string& name) override; void ClearPreferences() override; + void GetSyncInformation(DispatchCallback callback) override; void ConnectionReady() override; void RegisterExtensionsAPI(const std::string& origin, const std::string& script) override; diff --git a/shell/browser/ui/views/autofill_popup_view.cc b/shell/browser/ui/views/autofill_popup_view.cc index 60d8d7eaa96ac..f6e15a82c068b 100644 --- a/shell/browser/ui/views/autofill_popup_view.cc +++ b/shell/browser/ui/views/autofill_popup_view.cc @@ -306,7 +306,7 @@ void AutofillPopupView::OnMouseMoved(const ui::MouseEvent& event) { // A synthesized mouse move will be sent when the popup is first shown. // Don't preview a suggestion if the mouse happens to be hovering there. #if defined(OS_WIN) - if (base::Time::Now() - show_time_ <= base::TimeDelta::FromMilliseconds(50)) + if (base::Time::Now() - show_time_ <= base::Milliseconds(50)) return; #else if (event.flags() & ui::EF_IS_SYNTHESIZED) diff --git a/shell/browser/zoom_level_delegate.cc b/shell/browser/zoom_level_delegate.cc index dccdba702dd6a..148e2ff3a2e66 100644 --- a/shell/browser/zoom_level_delegate.cc +++ b/shell/browser/zoom_level_delegate.cc @@ -69,7 +69,11 @@ double ZoomLevelDelegate::GetDefaultZoomLevelPref() const { pref_service_->GetDictionary(kPartitionDefaultZoomLevel); // If no default has been previously set, the default returned is the // value used to initialize default_zoom_level in this function. - default_zoom_level_dictionary->GetDouble(partition_key_, &default_zoom_level); + absl::optional maybe_default_zoom_level = + default_zoom_level_dictionary->FindDoubleKey(partition_key_); + if (maybe_default_zoom_level.has_value()) + default_zoom_level = maybe_default_zoom_level.value(); + return default_zoom_level; } diff --git a/shell/common/api/electron_bindings.cc b/shell/common/api/electron_bindings.cc index 7bd3a57cae74d..7beff0572347a 100644 --- a/shell/common/api/electron_bindings.cc +++ b/shell/common/api/electron_bindings.cc @@ -131,7 +131,7 @@ void ElectronBindings::Crash() { // static void ElectronBindings::Hang() { for (;;) - base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1)); + base::PlatformThread::Sleep(base::Seconds(1)); } // static diff --git a/shell/common/electron_command_line.h b/shell/common/electron_command_line.h index 0d1aad4e76eba..32f09608f2899 100644 --- a/shell/common/electron_command_line.h +++ b/shell/common/electron_command_line.h @@ -14,6 +14,7 @@ namespace electron { class ElectronCommandLine { public: // disable copy + ElectronCommandLine() = delete; ElectronCommandLine(const ElectronCommandLine&) = delete; ElectronCommandLine& operator=(const ElectronCommandLine&) = delete; diff --git a/shell/common/electron_paths.h b/shell/common/electron_paths.h index 19bcabb2ed368..438f49d2b846c 100644 --- a/shell/common/electron_paths.h +++ b/shell/common/electron_paths.h @@ -37,7 +37,9 @@ enum { PATH_END, // End of new paths. Those that follow redirect to base::DIR_* -#if !defined(OS_LINUX) +#if defined(OS_WIN) + DIR_APP_DATA = base::DIR_ROAMING_APP_DATA, +#elif defined(OS_MAC) DIR_APP_DATA = base::DIR_APP_DATA, #endif }; diff --git a/shell/common/gin_converters/net_converter.cc b/shell/common/gin_converters/net_converter.cc index 53e74b2bd4d10..27cee52efb42c 100644 --- a/shell/common/gin_converters/net_converter.cc +++ b/shell/common/gin_converters/net_converter.cc @@ -334,9 +334,12 @@ bool Converter>::FromV8( } int offset = 0, length = -1; double modification_time = 0.0; + absl::optional maybe_modification_time = + dict->FindDoubleKey("modificationTime"); + if (maybe_modification_time.has_value()) + modification_time = maybe_modification_time.value(); dict->GetInteger("offset", &offset); dict->GetInteger("file", &length); - dict->GetDouble("modificationTime", &modification_time); (*out)->AppendFileRange(base::FilePath::FromUTF8Unsafe(*file), static_cast(offset), static_cast(length), diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 4a2cfb80a3d22..51c553eaa306a 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -17,9 +17,9 @@ #include "base/environment.h" #include "base/path_service.h" #include "base/run_loop.h" -#include "base/single_thread_task_runner.h" #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" +#include "base/task/single_thread_task_runner.h" #include "base/threading/thread_task_runner_handle.h" #include "base/trace_event/trace_event.h" #include "content/public/browser/browser_thread.h" diff --git a/shell/renderer/api/electron_api_context_bridge.cc b/shell/renderer/api/electron_api_context_bridge.cc index c937c616b2763..598a6e98b0895 100644 --- a/shell/renderer/api/electron_api_context_bridge.cc +++ b/shell/renderer/api/electron_api_context_bridge.cc @@ -11,7 +11,7 @@ #include #include "base/feature_list.h" -#include "base/macros.h" +#include "base/ignore_result.h" #include "base/no_destructor.h" #include "base/strings/string_number_conversions.h" #include "base/trace_event/trace_event.h" diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index c0e3c4afeaf8b..d0f7b79479b25 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -680,7 +680,8 @@ class WebFrameRenderer : public gin::Wrappable, has_user_gesture, blink::WebLocalFrame::kSynchronous, new ScriptExecutionCallback(std::move(promise), std::move(completion_callback)), - blink::BackForwardCacheAware::kAllow); + blink::BackForwardCacheAware::kAllow, + blink::WebLocalFrame::PromiseBehavior::kDontWait); return handle; } @@ -745,7 +746,8 @@ class WebFrameRenderer : public gin::Wrappable, scriptExecutionType, new ScriptExecutionCallback(std::move(promise), std::move(completion_callback)), - blink::BackForwardCacheAware::kPossiblyDisallow); + blink::BackForwardCacheAware::kPossiblyDisallow, + blink::WebLocalFrame::PromiseBehavior::kDontWait); return handle; } diff --git a/shell/renderer/electron_api_service_impl.cc b/shell/renderer/electron_api_service_impl.cc index dd5a68890d31d..558588d7c8af8 100644 --- a/shell/renderer/electron_api_service_impl.cc +++ b/shell/renderer/electron_api_service_impl.cc @@ -9,7 +9,7 @@ #include #include "base/environment.h" -#include "base/macros.h" +#include "base/ignore_result.h" #include "base/threading/thread_restrictions.h" #include "base/trace_event/trace_event.h" #include "gin/data_object_builder.h" diff --git a/shell/renderer/electron_sandboxed_renderer_client.cc b/shell/renderer/electron_sandboxed_renderer_client.cc index e80295042ecdc..b83c092aaa12f 100644 --- a/shell/renderer/electron_sandboxed_renderer_client.cc +++ b/shell/renderer/electron_sandboxed_renderer_client.cc @@ -9,7 +9,7 @@ #include "base/base_paths.h" #include "base/command_line.h" #include "base/files/file_path.h" -#include "base/macros.h" +#include "base/ignore_result.h" #include "base/path_service.h" #include "base/process/process_handle.h" #include "base/process/process_metrics.h" diff --git a/shell/utility/electron_content_utility_client.cc b/shell/utility/electron_content_utility_client.cc index ae7edafe15532..6cdcf513103ef 100644 --- a/shell/utility/electron_content_utility_client.cc +++ b/shell/utility/electron_content_utility_client.cc @@ -11,7 +11,8 @@ #include "base/threading/sequenced_task_runner_handle.h" #include "content/public/utility/utility_thread.h" #include "mojo/public/cpp/bindings/service_factory.h" -#include "sandbox/policy/switches.h" +#include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/sandbox_type.h" #include "services/proxy_resolver/proxy_resolver_factory_impl.h" #include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h" #include "services/service_manager/public/cpp/service.h" @@ -91,9 +92,10 @@ ElectronContentUtilityClient::~ElectronContentUtilityClient() = default; void ElectronContentUtilityClient::ExposeInterfacesToBrowser( mojo::BinderMap* binders) { #if defined(OS_WIN) - base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - utility_process_running_elevated_ = command_line->HasSwitch( - sandbox::policy::switches::kNoSandboxAndElevatedPrivileges); + auto& cmd_line = *base::CommandLine::ForCurrentProcess(); + auto sandbox_type = sandbox::policy::SandboxTypeFromCommandLine(cmd_line); + utility_process_running_elevated_ = + sandbox_type == sandbox::mojom::Sandbox::kNoSandboxAndElevatedPrivileges; #endif // If our process runs with elevated privileges, only add elevated Mojo diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 81a048bec1e65..ee40a3099b181 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -4569,9 +4569,9 @@ describe('BrowserWindow module', () => { w1.loadURL('about:blank'); const w2 = new BrowserWindow({ x: 300, y: 300, width: 300, height: 200 }); w2.loadURL('about:blank'); + const w1Focused = emittedOnce(w1, 'focus'); w1.webContents.focus(); - // Give focus some time to switch to w1 - await delay(); + await w1Focused; expect(w1.webContents.isFocused()).to.be.true('focuses window'); }); }); diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index 87e238bd646bd..09d6a445f8b01 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -1804,7 +1804,8 @@ describe('webContents module', () => { } }); - describe('using a large document', () => { + // TODO(codebytere): Re-enable after Chromium fixes upstream v8_scriptormodule_legacy_lifetime crash. + xdescribe('using a large document', () => { beforeEach(async () => { w = new BrowserWindow({ show: false, webPreferences: { sandbox: true } }); await w.loadFile(path.join(__dirname, 'fixtures', 'api', 'print-to-pdf.html')); diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index 322dbe3eff623..b6e4546ffb94b 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -242,7 +242,8 @@ describe('web security', () => { await p; }); - it('bypasses CORB when web security is disabled', async () => { + // TODO(codebytere): Re-enable after Chromium fixes upstream v8_scriptormodule_legacy_lifetime crash. + xit('bypasses CORB when web security is disabled', async () => { const w = new BrowserWindow({ show: false, webPreferences: { webSecurity: false, nodeIntegration: true, contextIsolation: false } }); const p = emittedOnce(ipcMain, 'success'); await w.loadURL(`data:text/html, From e53f1af97e5478b515c7991e89470c1d17c77271 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 24 Nov 2021 05:02:04 -0800 Subject: [PATCH 017/268] Bump v18.0.0-nightly.20211124 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index e92de12167428..84baccb4c56f8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211123 \ No newline at end of file +18.0.0-nightly.20211124 \ No newline at end of file diff --git a/package.json b/package.json index abdd918e31ea7..8966aeb17a6bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211123", + "version": "18.0.0-nightly.20211124", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 92b0ecb3431da..8598c1b2cbd56 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211123 - PRODUCTVERSION 18,0,0,20211123 + FILEVERSION 18,0,0,20211124 + PRODUCTVERSION 18,0,0,20211124 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b49a9629c098595a029254670d9143240c45dc5d Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 24 Nov 2021 07:28:53 -0800 Subject: [PATCH 018/268] Revert "Bump v18.0.0-nightly.20211124" This reverts commit e53f1af97e5478b515c7991e89470c1d17c77271. --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 84baccb4c56f8..e92de12167428 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211124 \ No newline at end of file +18.0.0-nightly.20211123 \ No newline at end of file diff --git a/package.json b/package.json index 8966aeb17a6bd..abdd918e31ea7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211124", + "version": "18.0.0-nightly.20211123", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 8598c1b2cbd56..92b0ecb3431da 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211124 - PRODUCTVERSION 18,0,0,20211124 + FILEVERSION 18,0,0,20211123 + PRODUCTVERSION 18,0,0,20211123 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f1b8f9692d0446151c1fd5ef48852b2e3063a1a5 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 24 Nov 2021 15:35:48 -0500 Subject: [PATCH 019/268] chore: update patches (#31988) --- patches/chromium/fix_aspect_ratio_with_max_size.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 4e3f76c81bad0..287ce201bee5a 100644 --- a/patches/chromium/fix_aspect_ratio_with_max_size.patch +++ b/patches/chromium/fix_aspect_ratio_with_max_size.patch @@ -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 a235cab941ec583a8dc9cb5e4105c2d7baae02df..f7c1232b0893c366aeeb77e6df0bbd275b6f7bd4 100644 +index 338d3e54444e8c47a683c74d3eab511c7121d49a..ad394625721fc45ae38f330b0fa98c8673add7ed 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3569,6 +3569,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3568,6 +3568,21 @@ 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); From 3834aaf4e98d7b826afa7113f12e8783b75e27dd Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 24 Nov 2021 12:47:25 -0800 Subject: [PATCH 020/268] Bump v18.0.0-nightly.20211124 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index e92de12167428..84baccb4c56f8 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211123 \ No newline at end of file +18.0.0-nightly.20211124 \ No newline at end of file diff --git a/package.json b/package.json index abdd918e31ea7..8966aeb17a6bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211123", + "version": "18.0.0-nightly.20211124", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 92b0ecb3431da..8598c1b2cbd56 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211123 - PRODUCTVERSION 18,0,0,20211123 + FILEVERSION 18,0,0,20211124 + PRODUCTVERSION 18,0,0,20211124 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4609d4cb7add2a1f1d721c831c6837e6ba77ce63 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 25 Nov 2021 05:01:26 -0800 Subject: [PATCH 021/268] Bump v18.0.0-nightly.20211125 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 84baccb4c56f8..3c32ac714fda7 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211124 \ No newline at end of file +18.0.0-nightly.20211125 \ No newline at end of file diff --git a/package.json b/package.json index 8966aeb17a6bd..ef52812759d79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211124", + "version": "18.0.0-nightly.20211125", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 8598c1b2cbd56..210b706650213 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211124 - PRODUCTVERSION 18,0,0,20211124 + FILEVERSION 18,0,0,20211125 + PRODUCTVERSION 18,0,0,20211125 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b4b0667d5281d0caaba6f1bb9f33094fde37b58d Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Thu, 25 Nov 2021 16:10:07 -0800 Subject: [PATCH 022/268] chore: make Discord invite non-vanity (#31991) --- README.md | 2 +- docs/tutorial/support.md | 2 +- lib/browser/default-menu.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fbb5c5081f592..fe13fee42f5c8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![CircleCI Build Status](https://circleci.com/gh/electron/electron/tree/main.svg?style=shield)](https://circleci.com/gh/electron/electron/tree/main) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/4lggi9dpjc1qob7k/branch/main?svg=true)](https://ci.appveyor.com/project/electron-bot/electron-ljo26/branch/main) -[![Electron Discord Invite](https://img.shields.io/discord/745037351163527189?color=%237289DA&label=chat&logo=discord&logoColor=white)](https://discord.com/invite/electron) +[![Electron Discord Invite](https://img.shields.io/discord/745037351163527189?color=%237289DA&label=chat&logo=discord&logoColor=white)](https://discord.com/invite/APGC3k5yaH) :memo: Available Translations: 🇨🇳 🇧🇷 🇪🇸 🇯🇵 🇷🇺 🇫🇷 🇺🇸 🇩🇪. View these docs in other languages at [electron/i18n](https://github.com/electron/i18n/tree/master/content/). diff --git a/docs/tutorial/support.md b/docs/tutorial/support.md index 8f1d4601915d8..e757ec22e21f1 100644 --- a/docs/tutorial/support.md +++ b/docs/tutorial/support.md @@ -10,7 +10,7 @@ for answers to questions, or to join in discussion with other developers who use Electron, you can interact with the community in these locations: -* [`Electron's Discord`](https://discord.com/invite/electron) has channels for: +* [Electron's Discord server](https://discord.com/invite/APGC3k5yaH) has channels for: * Getting help * Ecosystem apps like [Electron Forge](https://github.com/electron-userland/electron-forge) and [Electron Fiddle](https://github.com/electron/fiddle) * Sharing ideas with other Electron app developers diff --git a/lib/browser/default-menu.ts b/lib/browser/default-menu.ts index 0c1013c0a8c3f..b91a7caea4d92 100644 --- a/lib/browser/default-menu.ts +++ b/lib/browser/default-menu.ts @@ -31,7 +31,7 @@ export const setDefaultApplicationMenu = () => { { label: 'Community Discussions', click: async () => { - await shell.openExternal('https://discord.gg/electron'); + await shell.openExternal('https://discord.com/invite/APGC3k5yaH'); } }, { From 24d272ca41ab209015a22a95a016ff2aa49a619c Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 26 Nov 2021 05:01:27 -0800 Subject: [PATCH 023/268] Bump v18.0.0-nightly.20211126 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 3c32ac714fda7..dd5b184d78912 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211125 \ No newline at end of file +18.0.0-nightly.20211126 \ No newline at end of file diff --git a/package.json b/package.json index ef52812759d79..1aa784053cb3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211125", + "version": "18.0.0-nightly.20211126", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 210b706650213..4232a8a6dde51 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211125 - PRODUCTVERSION 18,0,0,20211125 + FILEVERSION 18,0,0,20211126 + PRODUCTVERSION 18,0,0,20211126 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 46634bc0f221a7dac32e4e5a8db00959cab36039 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 29 Nov 2021 05:03:23 -0800 Subject: [PATCH 024/268] Bump v18.0.0-nightly.20211129 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index dd5b184d78912..29b7daf145ed1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211126 \ No newline at end of file +18.0.0-nightly.20211129 \ No newline at end of file diff --git a/package.json b/package.json index 1aa784053cb3d..514ac88dc186e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211126", + "version": "18.0.0-nightly.20211129", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 4232a8a6dde51..36c264a5de006 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211126 - PRODUCTVERSION 18,0,0,20211126 + FILEVERSION 18,0,0,20211129 + PRODUCTVERSION 18,0,0,20211129 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 43f36b5b244879272846594d1d138b83dee830a5 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Mon, 29 Nov 2021 15:09:07 -0800 Subject: [PATCH 025/268] build: add CI path-filtering for docs-only changes (#31741) build: (wip) initial dynamic config research * build: (wip) test path filtering option * build: (wip) remove doc-only script, use path filtering to check changes * build: (wip) add docker image with Electron dependencies * build: (wip) clean up config * build (wip): readd parameters, executors and env*s * build: re-add steps and commands * build: change doc-only to ts-compile-doc-only * build: re-add workflows and jobs * build: split configs to setup & build * build: move lint to "always run" config * build: clean up, remove old reference config * build: bump to path-filtering 0.1.0 * build: remove ts-compile step from build-linux * build: remove nightly-linux-release-test, linux-checks-nightly * build: don't run build on publish * build: set base-revision to main (runs branch vs commit) * build: update config from chromium roll --- .circleci/build_config.yml | 2413 ++++++++++++++++++++++++++ .circleci/config.yml | 2526 +--------------------------- script/release/ci-release-build.js | 6 +- 3 files changed, 2449 insertions(+), 2496 deletions(-) create mode 100644 .circleci/build_config.yml diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml new file mode 100644 index 0000000000000..f53bb9a7d1216 --- /dev/null +++ b/.circleci/build_config.yml @@ -0,0 +1,2413 @@ +version: 2.1 + +parameters: + run-docs-only: + type: boolean + default: false + + upload-to-s3: + type: string + default: '1' + + run-build-linux: + type: boolean + default: false + + run-build-mac: + type: boolean + default: false + + run-linux-publish: + type: boolean + default: false + + linux-publish-arch-limit: + type: enum + default: all + enum: ["all", "arm", "arm64", "x64", "ia32"] + + run-macos-publish: + type: boolean + default: false + + macos-publish-arch-limit: + type: enum + default: all + enum: ["all", "osx-x64", "osx-arm64", "mas-x64", "mas-arm64"] + +# Executors +executors: + linux-docker: + parameters: + size: + description: "Docker executor size" + default: 2xlarge+ + type: enum + enum: ["medium", "xlarge", "2xlarge+"] + docker: + - image: ghcr.io/electron/build:27db4a3e3512bfd2e47f58cea69922da0835f1d9 + resource_class: << parameters.size >> + + macos: + parameters: + size: + description: "macOS executor size" + default: large + type: enum + enum: ["medium", "large"] + macos: + xcode: "12.4.0" + resource_class: << parameters.size >> + + # Electron Runners + apple-silicon: + resource_class: electronjs/macos-arm64 + machine: true + + linux-arm: + resource_class: electronjs/linux-arm + machine: true + + linux-arm64: + resource_class: electronjs/linux-arm64 + machine: true + +# The config expects the following environment variables to be set: +# - "SLACK_WEBHOOK" Slack hook URL to send notifications. +# +# The publishing scripts expect access tokens to be defined as env vars, +# but those are not covered here. +# +# CircleCI docs on variables: +# https://circleci.com/docs/2.0/env-vars/ + +# Build configurations options. +env-testing-build: &env-testing-build + GN_CONFIG: //electron/build/args/testing.gn + CHECK_DIST_MANIFEST: '1' + +env-release-build: &env-release-build + GN_CONFIG: //electron/build/args/release.gn + STRIP_BINARIES: true + GENERATE_SYMBOLS: true + CHECK_DIST_MANIFEST: '1' + IS_RELEASE: true + +env-headless-testing: &env-headless-testing + DISPLAY: ':99.0' + +env-stack-dumping: &env-stack-dumping + ELECTRON_ENABLE_STACK_DUMPING: '1' + +env-browsertests: &env-browsertests + GN_CONFIG: //electron/build/args/native_tests.gn + BUILD_TARGET: electron/spec:chromium_browsertests + TESTS_CONFIG: src/electron/spec/configs/browsertests.yml + +env-unittests: &env-unittests + GN_CONFIG: //electron/build/args/native_tests.gn + BUILD_TARGET: electron/spec:chromium_unittests + TESTS_CONFIG: src/electron/spec/configs/unittests.yml + +# Build targets options. +env-ia32: &env-ia32 + GN_EXTRA_ARGS: 'target_cpu = "x86"' + NPM_CONFIG_ARCH: ia32 + TARGET_ARCH: ia32 + +env-arm: &env-arm + GN_EXTRA_ARGS: 'target_cpu = "arm"' + MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm + BUILD_NATIVE_MKSNAPSHOT: 1 + TARGET_ARCH: arm + +env-apple-silicon: &env-apple-silicon + GN_EXTRA_ARGS: 'target_cpu = "arm64" use_prebuilt_v8_context_snapshot = true' + TARGET_ARCH: arm64 + USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1 + npm_config_arch: arm64 + +env-arm64: &env-arm64 + GN_EXTRA_ARGS: 'target_cpu = "arm64" fatal_linker_warnings = false enable_linux_installer = false' + MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm64 + BUILD_NATIVE_MKSNAPSHOT: 1 + TARGET_ARCH: arm64 + +env-mas: &env-mas + GN_EXTRA_ARGS: 'is_mas_build = true' + MAS_BUILD: 'true' + +env-mas-apple-silicon: &env-mas-apple-silicon + GN_EXTRA_ARGS: 'target_cpu = "arm64" is_mas_build = true use_prebuilt_v8_context_snapshot = true' + MAS_BUILD: 'true' + TARGET_ARCH: arm64 + USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1 + +env-send-slack-notifications: &env-send-slack-notifications + NOTIFY_SLACK: true + +env-global: &env-global + ELECTRON_OUT_DIR: Default + +env-linux-medium: &env-linux-medium + <<: *env-global + NUMBER_OF_NINJA_PROCESSES: 3 + +env-linux-2xlarge: &env-linux-2xlarge + <<: *env-global + NUMBER_OF_NINJA_PROCESSES: 34 + +env-linux-2xlarge-release: &env-linux-2xlarge-release + <<: *env-global + NUMBER_OF_NINJA_PROCESSES: 16 + +env-machine-mac: &env-machine-mac + <<: *env-global + NUMBER_OF_NINJA_PROCESSES: 6 + +env-mac-large: &env-mac-large + <<: *env-global + NUMBER_OF_NINJA_PROCESSES: 18 + +env-mac-large-release: &env-mac-large-release + <<: *env-global + NUMBER_OF_NINJA_PROCESSES: 8 + +env-ninja-status: &env-ninja-status + NINJA_STATUS: "[%r processes, %f/%t @ %o/s : %es] " + +env-disable-run-as-node: &env-disable-run-as-node + GN_BUILDFLAG_ARGS: 'enable_run_as_node = false' + +env-32bit-release: &env-32bit-release + # Set symbol level to 1 for 32 bit releases because of https://crbug.com/648948 + GN_BUILDFLAG_ARGS: 'symbol_level = 1' + +env-macos-build: &env-macos-build + # Disable pre-compiled headers to reduce out size, only useful for rebuilds + GN_BUILDFLAG_ARGS: 'enable_precompiled_headers = false' + +# Individual (shared) steps. +step-maybe-notify-slack-failure: &step-maybe-notify-slack-failure + run: + name: Send a Slack notification on failure + command: | + if [ "$NOTIFY_SLACK" == "true" ]; then + export MESSAGE="Build failed for *<$CIRCLE_BUILD_URL|$CIRCLE_JOB>* nightly build from *$CIRCLE_BRANCH*." + curl -g -H "Content-Type: application/json" -X POST \ + -d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$CIRCLE_JOB nightly build results\",\"title_link\": \"$CIRCLE_BUILD_URL\"}]}" $SLACK_WEBHOOK + fi + when: on_fail + +step-maybe-notify-slack-success: &step-maybe-notify-slack-success + run: + name: Send a Slack notification on success + command: | + if [ "$NOTIFY_SLACK" == "true" ]; then + export MESSAGE="Build succeeded for *<$CIRCLE_BUILD_URL|$CIRCLE_JOB>* nightly build from *$CIRCLE_BRANCH*." + curl -g -H "Content-Type: application/json" -X POST \ + -d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"good\",\"title\": \"$CIRCLE_JOB nightly build results\",\"title_link\": \"$CIRCLE_BUILD_URL\"}]}" $SLACK_WEBHOOK + fi + when: on_success + +step-maybe-cleanup-arm64-mac: &step-maybe-cleanup-arm64-mac + run: + name: Cleanup after testing + command: | + if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then + killall Electron || echo "No Electron processes left running" + killall Safari || echo "No Safari processes left running" + rm -rf ~/Library/Application\ Support/Electron* + rm -rf ~/Library/Application\ Support/electron* + security delete-generic-password -l "Chromium Safe Storage" || echo "✓ Keychain does not contain password from tests" + security delete-generic-password -l "Electron Test Main Safe Storage" || echo "✓ Keychain does not contain password from tests" + elif [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then + XVFB=/usr/bin/Xvfb + /sbin/start-stop-daemon --stop --exec $XVFB || echo "Xvfb not running" + pkill electron || echo "electron not running" + rm -rf ~/.config/Electron* + rm -rf ~/.config/electron* + fi + + when: always + +step-checkout-electron: &step-checkout-electron + checkout: + path: src/electron + +step-depot-tools-get: &step-depot-tools-get + run: + name: Get depot tools + command: | + git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git + +step-depot-tools-add-to-path: &step-depot-tools-add-to-path + run: + name: Add depot tools to PATH + command: echo 'export PATH="$PATH:'"$PWD"'/depot_tools"' >> $BASH_ENV + +step-gclient-sync: &step-gclient-sync + run: + name: Gclient sync + command: | + # If we did not restore a complete sync then we need to sync for realz + if [ ! -s "src/electron/.circle-sync-done" ]; then + gclient config \ + --name "src/electron" \ + --unmanaged \ + $GCLIENT_EXTRA_ARGS \ + "$CIRCLE_REPOSITORY_URL" + + ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags + if [ "$IS_RELEASE" != "true" ]; then + # Re-export all the patches to check if there were changes. + python src/electron/script/export_all_patches.py src/electron/patches/config.json + cd src/electron + git update-index --refresh || true + if ! git diff-index --quiet HEAD --; then + # There are changes to the patches. Make a git commit with the updated patches + git add patches + GIT_COMMITTER_NAME="PatchUp" GIT_COMMITTER_EMAIL="73610968+patchup[bot]@users.noreply.github.com" git commit -m "chore: update patches" --author="PatchUp <73610968+patchup[bot]@users.noreply.github.com>" + # Export it + mkdir -p ../../patches + git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch + if (node ./script/push-patch.js 2> /dev/null > /dev/null); then + echo + echo "======================================================================" + echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch" + echo "A new CI job will kick off shortly" + echo "======================================================================" + exit 1 + else + echo + echo "======================================================================" + echo "There were changes to the patches when applying." + echo "Check the CI artifacts for a patch you can apply to fix it." + echo "======================================================================" + exit 1 + fi + fi + fi + fi + +step-setup-env-for-build: &step-setup-env-for-build + run: + name: Setup Environment Variables + command: | + # To find `gn` executable. + echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/src/buildtools"' >> $BASH_ENV + +step-setup-goma-for-build: &step-setup-goma-for-build + run: + name: Setup Goma + command: | + echo 'export NUMBER_OF_NINJA_PROCESSES=300' >> $BASH_ENV + if [ "`uname`" == "Darwin" ]; then + echo 'ulimit -n 10000' >> $BASH_ENV + echo 'sudo launchctl limit maxfiles 65536 200000' >> $BASH_ENV + fi + if [ ! -z "$RAW_GOMA_AUTH" ]; then + echo $RAW_GOMA_AUTH > ~/.goma_oauth2_config + fi + git clone https://github.com/electron/build-tools.git + cd build-tools + npm install + mkdir third_party + node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })" + export GOMA_FALLBACK_ON_AUTH_FAILURE=true + third_party/goma/goma_ctl.py ensure_start + echo 'export GN_GOMA_FILE='`node -e "console.log(require('./src/utils/goma.js').gnFilePath)"` >> $BASH_ENV + echo 'export LOCAL_GOMA_DIR='`node -e "console.log(require('./src/utils/goma.js').dir)"` >> $BASH_ENV + echo 'export GOMA_FALLBACK_ON_AUTH_FAILURE=true' >> $BASH_ENV + cd .. + +step-restore-brew-cache: &step-restore-brew-cache + restore_cache: + paths: + - /usr/local/Cellar/gnu-tar + - /usr/local/bin/gtar + keys: + - v4-brew-cache-{{ arch }} + +step-save-brew-cache: &step-save-brew-cache + save_cache: + paths: + - /usr/local/Cellar/gnu-tar + - /usr/local/bin/gtar + key: v4-brew-cache-{{ arch }} + name: Persisting brew cache + +step-get-more-space-on-mac: &step-get-more-space-on-mac + run: + name: Free up space on MacOS + command: | + if [ "`uname`" == "Darwin" ]; then + sudo mkdir -p $TMPDIR/del-target + if [ "$TARGET_ARCH" == "arm64" ]; then + # Remount the root volume as writable, don't ask questions plz + sudo mount -uw / + fi + tmpify() { + if [ -d "$1" ]; then + sudo mv "$1" $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1) + fi + } + + strip_arm_deep() { + opwd=$(pwd) + cd $1 + f=$(find . -perm +111 -type f) + for fp in $f + do + if [[ $(file "$fp") == *"universal binary"* ]]; then + if [[ $(file "$fp") == *"arm64e)"* ]]; then + sudo lipo -remove arm64e "$fp" -o "$fp" || true + fi + if [[ $(file "$fp") == *"arm64)"* ]]; then + sudo lipo -remove arm64 "$fp" -o "$fp" || true + fi + fi + done + + cd $opwd + } + + tmpify /Library/Developer/CoreSimulator + tmpify ~/Library/Developer/CoreSimulator + tmpify $(xcode-select -p)/Platforms/AppleTVOS.platform + tmpify $(xcode-select -p)/Platforms/iPhoneOS.platform + tmpify $(xcode-select -p)/Platforms/WatchOS.platform + tmpify $(xcode-select -p)/Platforms/WatchSimulator.platform + tmpify $(xcode-select -p)/Platforms/AppleTVSimulator.platform + tmpify $(xcode-select -p)/Platforms/iPhoneSimulator.platform + tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios + tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift + tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0 + tmpify ~/.rubies + tmpify ~/Library/Caches/Homebrew + tmpify /usr/local/Homebrew + sudo rm -rf $TMPDIR/del-target + + if [ "$TARGET_ARCH" == "arm64" ]; then + sudo rm -rf "/System/Library/Desktop Pictures" + sudo rm -rf /System/Library/Templates/Data + sudo rm -rf /System/Library/Speech/Voices + sudo rm -rf "/System/Library/Screen Savers" + sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs + sudo rm -rf "/System/Volumes/Data/Library/Application Support/Apple/Photos/Print Products" + sudo rm -rf /System/Volumes/Data/Library/Java + sudo rm -rf /System/Volumes/Data/Library/Ruby + sudo rm -rf /System/Volumes/Data/Library/Printers + sudo rm -rf /System/iOSSupport + sudo rm -rf /System/Applications/*.app + sudo rm -rf /System/Applications/Utilities/*.app + sudo rm -rf /System/Library/LinguisticData + sudo rm -rf /System/Volumes/Data/private/var/db/dyld/* + # sudo rm -rf /System/Library/Fonts/* + # sudo rm -rf /System/Library/PreferencePanes + sudo rm -rf /System/Library/AssetsV2/* + sudo rm -rf /Applications/Safari.app + sudo rm -rf ~/project/src/build/linux + sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data + sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS + + # lipo off some huge binaries arm64 versions to save space + strip_arm_deep $(xcode-select -p)/../SharedFrameworks + strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr + fi + fi + background: true + +# On macOS delete all .git directories under src/ expect for +# third_party/angle/ because of build time generation of file +# gen/angle/commit.h depends on third_party/angle/.git/HEAD +# https://chromium-review.googlesource.com/c/angle/angle/+/2074924 +# TODO: maybe better to always leave out */.git/HEAD file for all targets ? +step-delete-git-directories: &step-delete-git-directories + run: + name: Delete all .git directories under src on MacOS to free space + command: | + if [ "`uname`" == "Darwin" ]; then + cd src + ( find . -type d -name ".git" -not -path "./third_party/angle/*" ) | xargs rm -rf + fi + +# On macOS the yarn install command during gclient sync was run on a linux +# machine and therefore installed a slightly different set of dependencies +# Notably "fsevents" is a macOS only dependency, we rerun yarn install once +# we are on a macOS machine to get the correct state +step-install-npm-deps-on-mac: &step-install-npm-deps-on-mac + run: + name: Install node_modules on MacOS + command: | + if [ "`uname`" == "Darwin" ]; then + cd src/electron + node script/yarn install + fi + +# This step handles the differences between the linux "gclient sync" +# and the expected state on macOS +step-fix-sync: &step-fix-sync + run: + name: Fix Sync + command: | + if [ "`uname`" == "Darwin" ]; then + # Fix Clang Install (wrong binary) + rm -rf src/third_party/llvm-build + python3 src/tools/clang/scripts/update.py + fi + + cd src/third_party/angle + git remote set-url origin https://chromium.googlesource.com/angle/angle.git + git fetch + +step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac + run: + name: Import and trust self-signed codesigning cert on MacOS + command: | + if [ "$TARGET_ARCH" != "arm64" ] && [ "`uname`" == "Darwin" ]; then + cd src/electron + ./script/codesign/generate-identity.sh + fi + +step-install-gnutar-on-mac: &step-install-gnutar-on-mac + run: + name: Install gnu-tar on macos + command: | + if [ "`uname`" == "Darwin" ]; then + if [ ! -d /usr/local/Cellar/gnu-tar/ ]; then + brew update + brew install gnu-tar + fi + ln -fs /usr/local/bin/gtar /usr/local/bin/tar + fi + +step-gn-gen-default: &step-gn-gen-default + run: + name: Default GN gen + command: | + cd src + gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS" + +step-gn-check: &step-gn-check + run: + name: GN check + command: | + cd src + gn check out/Default //electron:electron_lib + gn check out/Default //electron:electron_app + gn check out/Default //electron/shell/common/api:mojo + # Check the hunspell filenames + node electron/script/gen-hunspell-filenames.js --check + node electron/script/gen-libc++-filenames.js --check + +step-electron-build: &step-electron-build + run: + name: Electron build + no_output_timeout: 30m + command: | + # On arm platforms we generate a cross-arch ffmpeg that ninja does not seem + # to realize is not correct / should be rebuilt. We delete it here so it is + # rebuilt + if [ "$TRIGGER_ARM_TEST" == "true" ]; then + rm -f src/out/Default/libffmpeg.so + fi + cd src + # Enable if things get really bad + # if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then + # diskutil erasevolume HFS+ "xcode_disk" `hdiutil attach -nomount ram://12582912` + # mv /Applications/Xcode-12.beta.5.app /Volumes/xcode_disk/ + # ln -s /Volumes/xcode_disk/Xcode-12.beta.5.app /Applications/Xcode-12.beta.5.app + # fi + + # Lets generate a snapshot and mksnapshot and then delete all the x-compiled generated files to save space + if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" == "1" ]; then + ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES + ninja -C out/Default tools/v8_context_snapshot -j $NUMBER_OF_NINJA_PROCESSES + gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args + (cd out/Default; zip mksnapshot.zip mksnapshot_args clang_x64_v8_arm64/gen/v8/embedded.S) + rm -rf out/Default/clang_x64_v8_arm64/gen + rm -rf out/Default/clang_x64_v8_arm64/obj + rm -rf out/Default/clang_x64/obj + + # Regenerate because we just deleted some ninja files + gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS" + fi + NINJA_SUMMARIZE_BUILD=1 autoninja -C out/Default electron -j $NUMBER_OF_NINJA_PROCESSES + cp out/Default/.ninja_log out/electron_ninja_log + node electron/script/check-symlinks.js + +step-native-unittests-build: &step-native-unittests-build + run: + name: Build native test targets + no_output_timeout: 30m + command: | + cd src + ninja -C out/Default shell_browser_ui_unittests -j $NUMBER_OF_NINJA_PROCESSES + +step-maybe-electron-dist-strip: &step-maybe-electron-dist-strip + run: + name: Strip electron binaries + command: | + if [ "$STRIP_BINARIES" == "true" ] && [ "`uname`" == "Linux" ]; then + if [ x"$TARGET_ARCH" == x ]; then + target_cpu=x64 + elif [ "$TARGET_ARCH" == "ia32" ]; then + target_cpu=x86 + else + target_cpu="$TARGET_ARCH" + fi + cd src + electron/script/copy-debug-symbols.py --target-cpu="$target_cpu" --out-dir=out/Default/debug --compress + electron/script/strip-binaries.py --target-cpu="$target_cpu" + electron/script/add-debug-link.py --target-cpu="$target_cpu" --debug-dir=out/Default/debug + fi + +step-electron-dist-build: &step-electron-dist-build + run: + name: Build dist.zip + command: | + cd src + if [ "$SKIP_DIST_ZIP" != "1" ]; then + ninja -C out/Default electron:electron_dist_zip + if [ "$CHECK_DIST_MANIFEST" == "1" ]; then + if [ "`uname`" == "Darwin" ]; then + target_os=mac + target_cpu=x64 + if [ x"$MAS_BUILD" == x"true" ]; then + target_os=mac_mas + fi + if [ "$TARGET_ARCH" == "arm64" ]; then + target_cpu=arm64 + fi + elif [ "`uname`" == "Linux" ]; then + target_os=linux + if [ x"$TARGET_ARCH" == x ]; then + target_cpu=x64 + elif [ "$TARGET_ARCH" == "ia32" ]; then + target_cpu=x86 + else + target_cpu="$TARGET_ARCH" + fi + else + echo "Unknown system: `uname`" + exit 1 + fi + electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.$target_os.$target_cpu.manifest + fi + fi + +step-electron-chromedriver-build: &step-electron-chromedriver-build + run: + name: Build chromedriver.zip + command: | + cd src + if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then + gn gen out/chromedriver --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") is_component_ffmpeg=false proprietary_codecs=false $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS" + export CHROMEDRIVER_DIR="out/chromedriver" + else + export CHROMEDRIVER_DIR="out/Default" + fi + ninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES + if [ "`uname`" == "Linux" ]; then + electron/script/strip-binaries.py --target-cpu="$TARGET_ARCH" --file $PWD/$CHROMEDRIVER_DIR/chromedriver + fi + ninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver_zip + if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then + cp out/chromedriver/chromedriver.zip out/Default + fi + +step-nodejs-headers-build: &step-nodejs-headers-build + run: + name: Build Node.js headers + command: | + cd src + ninja -C out/Default third_party/electron_node:headers + +step-electron-publish: &step-electron-publish + run: + name: Publish Electron Dist + command: | + if [ "`uname`" == "Darwin" ]; then + rm -rf src/out/Default/obj + fi + + cd src/electron + if [ "$UPLOAD_TO_S3" == "1" ]; then + echo 'Uploading Electron release distribution to S3' + script/release/uploaders/upload.py --verbose --upload_to_s3 + else + echo 'Uploading Electron release distribution to Github releases' + script/release/uploaders/upload.py --verbose + fi + +step-persist-data-for-tests: &step-persist-data-for-tests + persist_to_workspace: + root: . + paths: + # Build artifacts + - src/out/Default/dist.zip + - src/out/Default/mksnapshot.zip + - src/out/Default/chromedriver.zip + - src/out/Default/shell_browser_ui_unittests + - src/out/Default/gen/node_headers + - src/out/ffmpeg/ffmpeg.zip + - src/electron + - src/third_party/electron_node + - src/third_party/nan + - src/cross-arch-snapshots + - src/third_party/llvm-build + - src/build/linux + - src/buildtools/third_party/libc++ + - src/buildtools/third_party/libc++abi + - src/out/Default/obj/buildtools/third_party + +step-electron-dist-unzip: &step-electron-dist-unzip + run: + name: Unzip dist.zip + command: | + cd src/out/Default + # -o overwrite files WITHOUT prompting + # TODO(alexeykuzmin): Remove '-o' when it's no longer needed. + # -: allows to extract archive members into locations outside + # of the current ``extraction root folder''. + # ASan builds have the llvm-symbolizer binaries listed as + # runtime_deps, with their paths as `../../third_party/...` + # unzip exits with non-zero code on such zip files unless -: is + # passed. + unzip -:o dist.zip + +step-ffmpeg-unzip: &step-ffmpeg-unzip + run: + name: Unzip ffmpeg.zip + command: | + cd src/out/ffmpeg + unzip -:o ffmpeg.zip + +step-mksnapshot-unzip: &step-mksnapshot-unzip + run: + name: Unzip mksnapshot.zip + command: | + cd src/out/Default + unzip -:o mksnapshot.zip + +step-chromedriver-unzip: &step-chromedriver-unzip + run: + name: Unzip chromedriver.zip + command: | + cd src/out/Default + unzip -:o chromedriver.zip + +step-ffmpeg-gn-gen: &step-ffmpeg-gn-gen + run: + name: ffmpeg GN gen + command: | + cd src + gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS" + +step-ffmpeg-build: &step-ffmpeg-build + run: + name: Non proprietary ffmpeg build + command: | + cd src + ninja -C out/ffmpeg electron:electron_ffmpeg_zip -j $NUMBER_OF_NINJA_PROCESSES + +step-verify-ffmpeg: &step-verify-ffmpeg + run: + name: Verify ffmpeg + command: | + cd src + python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg + +step-verify-mksnapshot: &step-verify-mksnapshot + run: + name: Verify mksnapshot + command: | + if [ "$IS_ASAN" != "1" ]; then + cd src + if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then + python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/cross-arch-snapshots + else + python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default + fi + fi + +step-verify-chromedriver: &step-verify-chromedriver + run: + name: Verify ChromeDriver + command: | + if [ "$IS_ASAN" != "1" ]; then + cd src + python electron/script/verify-chromedriver.py --source-root "$PWD" --build-dir out/Default + fi + +step-setup-linux-for-headless-testing: &step-setup-linux-for-headless-testing + run: + name: Setup for headless testing + command: | + if [ "`uname`" != "Darwin" ]; then + sh -e /etc/init.d/xvfb start + fi + +step-show-goma-stats: &step-show-goma-stats + run: + shell: /bin/bash + name: Check goma stats after build + command: | + set +e + set +o pipefail + $LOCAL_GOMA_DIR/goma_ctl.py stat + $LOCAL_GOMA_DIR/diagnose_goma_log.py + true + when: always + +step-mksnapshot-build: &step-mksnapshot-build + run: + name: mksnapshot build + command: | + cd src + if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" != "1" ]; then + ninja -C out/Default electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES + gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args + fi + if [ "`uname`" != "Darwin" ]; then + if [ "$TARGET_ARCH" == "arm" ]; then + electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot + electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator + elif [ "$TARGET_ARCH" == "arm64" ]; then + electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot + electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/v8_context_snapshot_generator + else + electron/script/strip-binaries.py --file $PWD/out/Default/mksnapshot + electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator + fi + fi + if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" != "1" ] && [ "$SKIP_DIST_ZIP" != "1" ]; then + ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES + (cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S) + fi + +step-hunspell-build: &step-hunspell-build + run: + name: hunspell build + command: | + cd src + if [ "$SKIP_DIST_ZIP" != "1" ]; then + ninja -C out/Default electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES + fi + +step-maybe-generate-libcxx: &step-maybe-generate-libcxx + run: + name: maybe generate libcxx + command: | + cd src + if [ "`uname`" == "Linux" ]; then + ninja -C out/Default electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES + ninja -C out/Default electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES + ninja -C out/Default electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES + fi + +step-maybe-generate-breakpad-symbols: &step-maybe-generate-breakpad-symbols + run: + name: Generate breakpad symbols + no_output_timeout: 30m + command: | + if [ "$GENERATE_SYMBOLS" == "true" ]; then + cd src + ninja -C out/Default electron:electron_symbols + fi + +step-maybe-zip-symbols: &step-maybe-zip-symbols + run: + name: Zip symbols + command: | + cd src + export BUILD_PATH="$PWD/out/Default" + ninja -C out/Default electron:licenses + ninja -C out/Default electron:electron_version + DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH + +step-maybe-cross-arch-snapshot: &step-maybe-cross-arch-snapshot + run: + name: Generate cross arch snapshot (arm/arm64) + command: | + if [ "$GENERATE_CROSS_ARCH_SNAPSHOT" == "true" ] && [ -z "$CIRCLE_PR_NUMBER" ]; then + cd src + if [ "$TARGET_ARCH" == "arm" ]; then + export MKSNAPSHOT_PATH="clang_x86_v8_arm" + elif [ "$TARGET_ARCH" == "arm64" ]; then + export MKSNAPSHOT_PATH="clang_x64_v8_arm64" + fi + cp "out/Default/$MKSNAPSHOT_PATH/mksnapshot" out/Default + cp "out/Default/$MKSNAPSHOT_PATH/v8_context_snapshot_generator" out/Default + if [ "`uname`" == "Linux" ]; then + cp "out/Default/$MKSNAPSHOT_PATH/libffmpeg.so" out/Default + elif [ "`uname`" == "Darwin" ]; then + cp "out/Default/$MKSNAPSHOT_PATH/libffmpeg.dylib" out/Default + fi + python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --create-snapshot-only + mkdir cross-arch-snapshots + cp out/Default-mksnapshot-test/*.bin cross-arch-snapshots + fi + +step-maybe-generate-typescript-defs: &step-maybe-generate-typescript-defs + run: + name: Generate type declarations + command: | + if [ "`uname`" == "Darwin" ]; then + cd src/electron + node script/yarn create-typescript-definitions + fi + +step-fix-known-hosts-linux: &step-fix-known-hosts-linux + run: + name: Fix Known Hosts on Linux + command: | + if [ "`uname`" == "Linux" ]; then + ./src/electron/.circleci/fix-known-hosts.sh + fi + +# Checkout Steps +step-generate-deps-hash: &step-generate-deps-hash + run: + name: Generate DEPS Hash + command: node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target + +step-touch-sync-done: &step-touch-sync-done + run: + name: Touch Sync Done + command: touch src/electron/.circle-sync-done + +# Restore exact src cache based on the hash of DEPS and patches/* +# If no cache is matched EXACTLY then the .circle-sync-done file is empty +# If a cache is matched EXACTLY then the .circle-sync-done file contains "done" +step-maybe-restore-src-cache: &step-maybe-restore-src-cache + restore_cache: + keys: + - v8-src-cache-{{ checksum "src/electron/.depshash" }} + name: Restoring src cache +step-maybe-restore-src-cache-marker: &step-maybe-restore-src-cache-marker + restore_cache: + keys: + - v1-src-cache-marker-{{ checksum "src/electron/.depshash" }} + name: Restoring src cache marker + +# Restore exact or closest git cache based on the hash of DEPS and .circle-sync-done +# If the src cache was restored above then this will match an empty cache +# If the src cache was not restored above then this will match a close git cache +step-maybe-restore-git-cache: &step-maybe-restore-git-cache + restore_cache: + paths: + - ~/.gclient-cache + keys: + - v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} + - v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }} + name: Conditionally restoring git cache + +step-restore-out-cache: &step-restore-out-cache + restore_cache: + paths: + - ./src/out/Default + keys: + - v9-out-cache-{{ checksum "src/electron/.depshash" }}-{{ checksum "src/electron/.depshash-target" }} + name: Restoring out cache + +step-set-git-cache-path: &step-set-git-cache-path + run: + name: Set GIT_CACHE_PATH to make gclient to use the cache + command: | + # CircleCI does not support interpolation when setting environment variables. + # https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-shell-command + echo 'export GIT_CACHE_PATH="$HOME/.gclient-cache"' >> $BASH_ENV + +# Persist the git cache based on the hash of DEPS and .circle-sync-done +# If the src cache was restored above then this will persist an empty cache +step-save-git-cache: &step-save-git-cache + save_cache: + paths: + - ~/.gclient-cache + key: v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} + name: Persisting git cache + +step-save-out-cache: &step-save-out-cache + save_cache: + paths: + - ./src/out/Default + key: v9-out-cache-{{ checksum "src/electron/.depshash" }}-{{ checksum "src/electron/.depshash-target" }} + name: Persisting out cache + +step-run-electron-only-hooks: &step-run-electron-only-hooks + run: + name: Run Electron Only Hooks + command: gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]" + +step-generate-deps-hash-cleanly: &step-generate-deps-hash-cleanly + run: + name: Generate DEPS Hash + command: (cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target + +# Mark the sync as done for future cache saving +step-mark-sync-done: &step-mark-sync-done + run: + name: Mark Sync Done + command: echo DONE > src/electron/.circle-sync-done + +# Minimize the size of the cache +step-minimize-workspace-size-from-checkout: &step-minimize-workspace-size-from-checkout + run: + name: Remove some unused data to avoid storing it in the workspace/cache + command: | + rm -rf src/android_webview + rm -rf src/ios/chrome + rm -rf src/third_party/blink/web_tests + rm -rf src/third_party/blink/perf_tests + rm -rf src/third_party/WebKit/LayoutTests + rm -rf third_party/electron_node/deps/openssl + rm -rf third_party/electron_node/deps/v8 + rm -rf chrome/test/data/xr/webvr_info + +# Save the src cache based on the deps hash +step-save-src-cache: &step-save-src-cache + save_cache: + paths: + - /var/portal + key: v8-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }} + name: Persisting src cache +step-make-src-cache-marker: &step-make-src-cache-marker + run: + name: Making src cache marker + command: touch .src-cache-marker +step-save-src-cache-marker: &step-save-src-cache-marker + save_cache: + paths: + - .src-cache-marker + key: v1-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }} + +step-maybe-early-exit-no-doc-change: &step-maybe-early-exit-no-doc-change + run: + name: Shortcircuit job if change is not doc only + command: | + if [ ! -s src/electron/.skip-ci-build ]; then + circleci-agent step halt + fi + +step-ts-compile: &step-ts-compile + run: + name: Run TS/JS compile on doc only change + command: | + cd src + ninja -C out/Default electron:default_app_js -j $NUMBER_OF_NINJA_PROCESSES + ninja -C out/Default electron:electron_js2c -j $NUMBER_OF_NINJA_PROCESSES + +# List of all steps. +steps-electron-gn-check: &steps-electron-gn-check + steps: + - attach_workspace: + at: . + - *step-depot-tools-add-to-path + - *step-setup-env-for-build + - *step-setup-goma-for-build + - *step-gn-gen-default + - *step-gn-check + +steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-change + steps: + # Checkout - Copied from steps-checkout + - *step-checkout-electron + - *step-depot-tools-get + - *step-depot-tools-add-to-path + - *step-restore-brew-cache + - *step-install-gnutar-on-mac + - *step-get-more-space-on-mac + - *step-generate-deps-hash + - *step-touch-sync-done + - maybe-restore-portaled-src-cache + - *step-maybe-restore-git-cache + - *step-set-git-cache-path + # This sync call only runs if .circle-sync-done is an EMPTY file + - *step-gclient-sync + # These next few steps reset Electron to the correct commit regardless of which cache was restored + - run: + name: Wipe Electron + command: rm -rf src/electron + - *step-checkout-electron + - *step-run-electron-only-hooks + - *step-generate-deps-hash-cleanly + - *step-mark-sync-done + - *step-minimize-workspace-size-from-checkout + + - *step-depot-tools-add-to-path + - *step-setup-env-for-build + - *step-setup-goma-for-build + - *step-get-more-space-on-mac + - *step-install-npm-deps-on-mac + - *step-fix-sync + - *step-gn-gen-default + + #Compile ts/js to verify doc change didn't break anything + - *step-ts-compile + +steps-native-tests: &steps-native-tests + steps: + - attach_workspace: + at: . + - *step-depot-tools-add-to-path + - *step-setup-env-for-build + - *step-setup-goma-for-build + - *step-gn-gen-default + + - run: + name: Build tests + command: | + cd src + ninja -C out/Default $BUILD_TARGET + - *step-show-goma-stats + + - *step-setup-linux-for-headless-testing + - run: + name: Run tests + command: | + mkdir test_results + python src/electron/script/native-tests.py run \ + --config $TESTS_CONFIG \ + --tests-dir src/out/Default \ + --output-dir test_results \ + $TESTS_ARGS + + - store_artifacts: + path: test_results + destination: test_results # Put it in the root folder. + - store_test_results: + path: test_results + +steps-verify-ffmpeg: &steps-verify-ffmpeg + steps: + - attach_workspace: + at: . + - *step-depot-tools-add-to-path + - *step-electron-dist-unzip + - *step-ffmpeg-unzip + - *step-setup-linux-for-headless-testing + + - *step-verify-ffmpeg + - *step-maybe-notify-slack-failure + +steps-tests: &steps-tests + steps: + - attach_workspace: + at: . + - *step-depot-tools-add-to-path + - *step-electron-dist-unzip + - *step-mksnapshot-unzip + - *step-chromedriver-unzip + - *step-setup-linux-for-headless-testing + - *step-restore-brew-cache + - *step-fix-known-hosts-linux + - *step-install-signing-cert-on-mac + + - run: + name: Run Electron tests + environment: + MOCHA_REPORTER: mocha-multi-reporters + ELECTRON_TEST_RESULTS_DIR: junit + MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap + ELECTRON_DISABLE_SECURITY_WARNINGS: 1 + command: | + cd src + if [ "$IS_ASAN" == "1" ]; then + ASAN_SYMBOLIZE="$PWD/tools/valgrind/asan/asan_symbolize.py --executable-path=$PWD/out/Default/electron" + export ASAN_OPTIONS="symbolize=0 handle_abort=1" + export G_SLICE=always-malloc + export NSS_DISABLE_ARENA_FREE_LIST=1 + export NSS_DISABLE_UNLOAD=1 + export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer + export MOCHA_TIMEOUT=180000 + echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)" + (cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec-main/*-spec.ts | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE + (cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.js | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE + else + if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then + export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true + (cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging) + (cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging) + else + if [ "$TARGET_ARCH" == "ia32" ]; then + npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js + fi + (cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec-main/*-spec.ts | circleci tests split --split-by=timings)) + (cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.js | circleci tests split --split-by=timings)) + fi + fi + - run: + name: Check test results existence + command: | + cd src + + # Check if test results exist and are not empty. + if [ ! -s "junit/test-results-remote.xml" ]; then + exit 1 + fi + if [ ! -s "junit/test-results-main.xml" ]; then + exit 1 + fi + - store_test_results: + path: src/junit + + - *step-verify-mksnapshot + - *step-verify-chromedriver + + - *step-maybe-notify-slack-failure + + - *step-maybe-cleanup-arm64-mac + +steps-test-nan: &steps-test-nan + steps: + - attach_workspace: + at: . + - *step-depot-tools-add-to-path + - *step-electron-dist-unzip + - *step-setup-linux-for-headless-testing + - *step-fix-known-hosts-linux + - run: + name: Run Nan Tests + command: | + cd src + node electron/script/nan-spec-runner.js + +steps-test-node: &steps-test-node + steps: + - attach_workspace: + at: . + - *step-depot-tools-add-to-path + - *step-electron-dist-unzip + - *step-setup-linux-for-headless-testing + - *step-fix-known-hosts-linux + - run: + name: Run Node Tests + command: | + cd src + node electron/script/node-spec-runner.js --default --jUnitDir=junit + - store_test_results: + path: src/junit + +# Command Aliases +commands: + maybe-restore-portaled-src-cache: + parameters: + halt-if-successful: + type: boolean + default: false + steps: + - run: + name: Prepare for cross-OS sync restore + command: | + sudo mkdir -p /var/portal + sudo chown -R $(id -u):$(id -g) /var/portal + - when: + condition: << parameters.halt-if-successful >> + steps: + - *step-maybe-restore-src-cache-marker + - run: + name: Halt the job early if the src cache exists + command: | + if [ -f ".src-cache-marker" ]; then + circleci-agent step halt + fi + - *step-maybe-restore-src-cache + - run: + name: Fix the src cache restore point on macOS + command: | + if [ -d "/var/portal/src" ]; then + echo Relocating Cache + rm -rf src + mv /var/portal/src ./ + fi + + move_and_store_all_artifacts: + steps: + - run: + name: Move all generated artifacts to upload folder + command: | + rm -rf generated_artifacts + mkdir generated_artifacts + mv_if_exist() { + if [ -f "$1" ] || [ -d "$1" ]; then + echo Storing $1 + mv $1 generated_artifacts + else + echo Skipping $1 - It is not present on disk + fi + } + mv_if_exist src/out/Default/dist.zip + mv_if_exist src/out/Default/shell_browser_ui_unittests + mv_if_exist src/out/Default/gen/node_headers.tar.gz + mv_if_exist src/out/Default/symbols.zip + mv_if_exist src/out/Default/mksnapshot.zip + mv_if_exist src/out/Default/chromedriver.zip + mv_if_exist src/out/ffmpeg/ffmpeg.zip + mv_if_exist src/out/Default/hunspell_dictionaries.zip + mv_if_exist src/cross-arch-snapshots + mv_if_exist src/out/electron_ninja_log + when: always + - store_artifacts: + path: generated_artifacts + destination: ./ + - store_artifacts: + path: generated_artifacts/cross-arch-snapshots + destination: cross-arch-snapshots + + checkout-from-cache: + steps: + - *step-checkout-electron + - *step-depot-tools-get + - *step-depot-tools-add-to-path + - *step-generate-deps-hash + - maybe-restore-portaled-src-cache + - run: + name: Ensure src checkout worked + command: | + if [ ! -d "src/third_party/blink" ]; then + echo src cache was not restored for some reason, idk what happened here... + exit 1 + fi + - run: + name: Wipe Electron + command: rm -rf src/electron + - *step-checkout-electron + - *step-run-electron-only-hooks + - *step-generate-deps-hash-cleanly + electron-build: + parameters: + attach: + type: boolean + default: false + persist: + type: boolean + default: true + persist-checkout: + type: boolean + default: false + checkout: + type: boolean + default: true + checkout-and-assume-cache: + type: boolean + default: false + save-git-cache: + type: boolean + default: false + checkout-to-create-src-cache: + type: boolean + default: false + build: + type: boolean + default: true + use-out-cache: + type: boolean + default: true + restore-src-cache: + type: boolean + default: true + build-nonproprietary-ffmpeg: + type: boolean + default: true + steps: + - when: + condition: << parameters.attach >> + steps: + - attach_workspace: + at: . + - run: rm -rf src/electron + - *step-restore-brew-cache + - *step-install-gnutar-on-mac + - *step-save-brew-cache + - when: + condition: << parameters.checkout-and-assume-cache >> + steps: + - checkout-from-cache + - when: + condition: << parameters.checkout >> + steps: + # Checkout - Copied from steps-checkout + - *step-checkout-electron + - *step-depot-tools-get + - *step-depot-tools-add-to-path + - *step-get-more-space-on-mac + - *step-generate-deps-hash + - *step-touch-sync-done + - when: + condition: << parameters.restore-src-cache >> + steps: + - maybe-restore-portaled-src-cache: + halt-if-successful: << parameters.checkout-to-create-src-cache >> + - *step-maybe-restore-git-cache + - *step-set-git-cache-path + # This sync call only runs if .circle-sync-done is an EMPTY file + - *step-gclient-sync + - store_artifacts: + path: patches + - when: + condition: << parameters.save-git-cache >> + steps: + - *step-save-git-cache + # These next few steps reset Electron to the correct commit regardless of which cache was restored + - run: + name: Wipe Electron + command: rm -rf src/electron + - *step-checkout-electron + - *step-run-electron-only-hooks + - *step-generate-deps-hash-cleanly + - *step-mark-sync-done + - *step-minimize-workspace-size-from-checkout + - *step-delete-git-directories + - when: + condition: << parameters.persist-checkout >> + steps: + - persist_to_workspace: + root: . + paths: + - depot_tools + - src + - when: + condition: << parameters.checkout-to-create-src-cache >> + steps: + - run: + name: Move src folder to the cross-OS portal + command: | + sudo mkdir -p /var/portal + sudo chown -R $(id -u):$(id -g) /var/portal + mv ./src /var/portal + - *step-save-src-cache + - *step-make-src-cache-marker + - *step-save-src-cache-marker + + - when: + condition: << parameters.build >> + steps: + - *step-depot-tools-add-to-path + - *step-setup-env-for-build + - *step-setup-goma-for-build + - *step-get-more-space-on-mac + - *step-fix-sync + - *step-delete-git-directories + + # Electron app + - when: + condition: << parameters.use-out-cache >> + steps: + - *step-restore-out-cache + - *step-gn-gen-default + - *step-electron-build + - *step-maybe-electron-dist-strip + - *step-electron-dist-build + + # Native test targets + - *step-native-unittests-build + + # Node.js headers + - *step-nodejs-headers-build + + - *step-show-goma-stats + + # mksnapshot + - *step-mksnapshot-build + - *step-maybe-cross-arch-snapshot + + # chromedriver + - *step-electron-chromedriver-build + + - when: + condition: << parameters.build-nonproprietary-ffmpeg >> + steps: + # ffmpeg + - *step-ffmpeg-gn-gen + - *step-ffmpeg-build + + # hunspell + - *step-hunspell-build + + # Save all data needed for a further tests run. + - when: + condition: << parameters.persist >> + steps: + - *step-persist-data-for-tests + + - when: + condition: << parameters.build >> + steps: + - *step-maybe-generate-breakpad-symbols + - *step-maybe-zip-symbols + + - when: + condition: << parameters.build >> + steps: + - move_and_store_all_artifacts + - run: + name: Remove the big things on macOS, this seems to be better on average + command: | + if [ "`uname`" == "Darwin" ]; then + mkdir -p src/out/Default + cd src/out/Default + find . -type f -size +50M -delete + mkdir -p gen/electron + cd gen/electron + # These files do not seem to like being in a cache, let us remove them + find . -type f -name '*_pkg_info' -delete + fi + - when: + condition: << parameters.use-out-cache >> + steps: + - *step-save-out-cache + + - *step-maybe-notify-slack-failure + + electron-publish: + parameters: + attach: + type: boolean + default: false + checkout: + type: boolean + default: true + steps: + - when: + condition: << parameters.attach >> + steps: + - attach_workspace: + at: . + - when: + condition: << parameters.checkout >> + steps: + - *step-depot-tools-get + - *step-depot-tools-add-to-path + - *step-restore-brew-cache + - *step-get-more-space-on-mac + - when: + condition: << parameters.checkout >> + steps: + - *step-checkout-electron + - *step-touch-sync-done + - *step-maybe-restore-git-cache + - *step-set-git-cache-path + - *step-gclient-sync + - *step-delete-git-directories + - *step-minimize-workspace-size-from-checkout + - *step-fix-sync + - *step-setup-env-for-build + - *step-setup-goma-for-build + - *step-gn-gen-default + + # Electron app + - *step-electron-build + - *step-show-goma-stats + - *step-maybe-generate-breakpad-symbols + - *step-maybe-electron-dist-strip + - *step-electron-dist-build + - *step-maybe-zip-symbols + + # mksnapshot + - *step-mksnapshot-build + + # chromedriver + - *step-electron-chromedriver-build + + # Node.js headers + - *step-nodejs-headers-build + + # ffmpeg + - *step-ffmpeg-gn-gen + - *step-ffmpeg-build + + # hunspell + - *step-hunspell-build + + # libcxx + - *step-maybe-generate-libcxx + + # typescript defs + - *step-maybe-generate-typescript-defs + + # Publish + - *step-electron-publish + - move_and_store_all_artifacts + +# List of all jobs. +jobs: + # Layer 0: Docs. Standalone. + ts-compile-doc-change: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-testing-build + <<: *steps-electron-ts-compile-for-doc-change + + # Layer 1: Checkout. + linux-checkout-for-workspace: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: false + build: false + checkout: true + persist-checkout: true + + linux-make-src-cache: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: false + build: false + checkout: true + save-git-cache: true + checkout-to-create-src-cache: true + + linux-checkout-for-native-tests: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_pyyaml=True' + steps: + - electron-build: + persist: false + build: false + checkout: true + persist-checkout: true + + linux-checkout-for-native-tests-with-no-patches: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + GCLIENT_EXTRA_ARGS: '--custom-var=apply_patches=False --custom-var=checkout_pyyaml=True' + steps: + - electron-build: + persist: false + build: false + checkout: true + persist-checkout: true + + mac-checkout: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + <<: *env-testing-build + <<: *env-macos-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' + steps: + - electron-build: + persist: false + build: false + checkout: true + persist-checkout: true + restore-src-cache: false + + mac-checkout-for-workspace: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + <<: *env-testing-build + <<: *env-macos-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' + steps: + - electron-build: + persist: false + build: false + checkout: true + persist-checkout: true + + mac-make-src-cache: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + <<: *env-testing-build + <<: *env-macos-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' + steps: + - electron-build: + persist: false + build: false + checkout: true + save-git-cache: true + checkout-to-create-src-cache: true + + # Layer 2: Builds. + linux-x64-testing: + executor: linux-docker + environment: + <<: *env-global + <<: *env-testing-build + <<: *env-ninja-status + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: true + checkout: true + use-out-cache: false + + linux-x64-testing-asan: + executor: linux-docker + environment: + <<: *env-global + <<: *env-testing-build + <<: *env-ninja-status + CHECK_DIST_MANIFEST: '0' + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + GN_EXTRA_ARGS: 'is_asan = true' + steps: + - electron-build: + persist: true + checkout: true + use-out-cache: false + build-nonproprietary-ffmpeg: false + + linux-x64-testing-no-run-as-node: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + <<: *env-testing-build + <<: *env-ninja-status + <<: *env-disable-run-as-node + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: false + checkout: true + use-out-cache: false + + linux-x64-testing-gn-check: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-testing-build + <<: *steps-electron-gn-check + + linux-x64-release: + executor: linux-docker + environment: + <<: *env-linux-2xlarge-release + <<: *env-release-build + <<: *env-send-slack-notifications + <<: *env-ninja-status + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: true + checkout: true + + linux-x64-publish: + executor: linux-docker + environment: + <<: *env-linux-2xlarge-release + <<: *env-release-build + UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + <<: *env-ninja-status + steps: + - run: echo running + - when: + condition: + or: + - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>] + - equal: ["x64", << pipeline.parameters.linux-publish-arch-limit >>] + steps: + - electron-publish: + attach: false + checkout: true + + linux-ia32-testing: + executor: linux-docker + environment: + <<: *env-global + <<: *env-ia32 + <<: *env-testing-build + <<: *env-ninja-status + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: true + checkout: true + use-out-cache: false + + linux-ia32-release: + executor: linux-docker + environment: + <<: *env-linux-2xlarge-release + <<: *env-ia32 + <<: *env-release-build + <<: *env-send-slack-notifications + <<: *env-ninja-status + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: true + checkout: true + + linux-ia32-publish: + executor: linux-docker + environment: + <<: *env-linux-2xlarge-release + <<: *env-ia32 + <<: *env-release-build + <<: *env-32bit-release + UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + <<: *env-ninja-status + steps: + - run: echo running + - when: + condition: + or: + - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>] + - equal: ["ia32", << pipeline.parameters.linux-publish-arch-limit >>] + steps: + - electron-publish: + attach: false + checkout: true + + linux-arm-testing: + executor: linux-docker + environment: + <<: *env-global + <<: *env-arm + <<: *env-testing-build + <<: *env-ninja-status + TRIGGER_ARM_TEST: true + GENERATE_CROSS_ARCH_SNAPSHOT: true + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: true + checkout: true + use-out-cache: false + + linux-arm-release: + executor: linux-docker + environment: + <<: *env-linux-2xlarge-release + <<: *env-arm + <<: *env-release-build + <<: *env-send-slack-notifications + <<: *env-ninja-status + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: false + checkout: true + + linux-arm-publish: + executor: linux-docker + environment: + <<: *env-linux-2xlarge-release + <<: *env-arm + <<: *env-release-build + <<: *env-32bit-release + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True' + UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + <<: *env-ninja-status + steps: + - run: echo running + - when: + condition: + or: + - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>] + - equal: ["arm", << pipeline.parameters.linux-publish-arch-limit >>] + steps: + - electron-publish: + attach: false + checkout: true + + linux-arm64-testing: + executor: linux-docker + environment: + <<: *env-global + <<: *env-arm64 + <<: *env-testing-build + <<: *env-ninja-status + TRIGGER_ARM_TEST: true + GENERATE_CROSS_ARCH_SNAPSHOT: true + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: true + checkout: true + use-out-cache: false + + linux-arm64-testing-gn-check: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-arm64 + <<: *env-testing-build + <<: *steps-electron-gn-check + + linux-arm64-release: + executor: linux-docker + environment: + <<: *env-linux-2xlarge-release + <<: *env-arm64 + <<: *env-release-build + <<: *env-send-slack-notifications + <<: *env-ninja-status + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' + steps: + - electron-build: + persist: false + checkout: true + + linux-arm64-publish: + executor: linux-docker + environment: + <<: *env-linux-2xlarge-release + <<: *env-arm64 + <<: *env-release-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True' + UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + <<: *env-ninja-status + steps: + - run: echo running + - when: + condition: + or: + - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>] + - equal: ["arm64", << pipeline.parameters.linux-publish-arch-limit >>] + steps: + - electron-publish: + attach: false + checkout: true + + osx-testing-x64: + executor: macos + environment: + <<: *env-mac-large + <<: *env-testing-build + <<: *env-ninja-status + <<: *env-macos-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' + steps: + - electron-build: + persist: true + checkout: false + checkout-and-assume-cache: true + attach: true + + osx-testing-x64-gn-check: + executor: + name: macos + size: medium + environment: + <<: *env-machine-mac + <<: *env-testing-build + <<: *steps-electron-gn-check + + osx-publish-x64-skip-checkout: + executor: macos + environment: + <<: *env-mac-large-release + <<: *env-release-build + UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + <<: *env-ninja-status + steps: + - run: echo running + - when: + condition: + or: + - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>] + - equal: ["osx-x64", << pipeline.parameters.macos-publish-arch-limit >>] + steps: + - electron-publish: + attach: true + checkout: false + + osx-publish-arm64-skip-checkout: + executor: macos + environment: + <<: *env-mac-large-release + <<: *env-release-build + <<: *env-apple-silicon + UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + <<: *env-ninja-status + steps: + - run: echo running + - when: + condition: + or: + - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>] + - equal: ["osx-arm64", << pipeline.parameters.macos-publish-arch-limit >>] + steps: + - electron-publish: + attach: true + checkout: false + + osx-testing-arm64: + executor: macos + environment: + <<: *env-mac-large + <<: *env-testing-build + <<: *env-ninja-status + <<: *env-macos-build + <<: *env-apple-silicon + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' + GENERATE_CROSS_ARCH_SNAPSHOT: true + steps: + - electron-build: + persist: true + checkout: false + checkout-and-assume-cache: true + attach: true + + mas-testing-x64: + executor: macos + environment: + <<: *env-mac-large + <<: *env-mas + <<: *env-testing-build + <<: *env-ninja-status + <<: *env-macos-build + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' + steps: + - electron-build: + persist: true + checkout: false + checkout-and-assume-cache: true + attach: true + + mas-testing-x64-gn-check: + executor: + name: macos + size: medium + environment: + <<: *env-machine-mac + <<: *env-mas + <<: *env-testing-build + <<: *steps-electron-gn-check + + mas-publish-x64-skip-checkout: + executor: macos + environment: + <<: *env-mac-large-release + <<: *env-mas + <<: *env-release-build + UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + steps: + - run: echo running + - when: + condition: + or: + - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>] + - equal: ["mas-x64", << pipeline.parameters.macos-publish-arch-limit >>] + steps: + - electron-publish: + attach: true + checkout: false + + mas-publish-arm64-skip-checkout: + executor: macos + environment: + <<: *env-mac-large-release + <<: *env-mas-apple-silicon + <<: *env-release-build + UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> + <<: *env-ninja-status + steps: + - run: echo running + - when: + condition: + or: + - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>] + - equal: ["mas-arm64", << pipeline.parameters.macos-publish-arch-limit >>] + steps: + - electron-publish: + attach: true + checkout: false + + mas-testing-arm64: + executor: macos + environment: + <<: *env-mac-large + <<: *env-testing-build + <<: *env-ninja-status + <<: *env-macos-build + <<: *env-mas-apple-silicon + GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' + GENERATE_CROSS_ARCH_SNAPSHOT: true + steps: + - electron-build: + persist: true + checkout: false + checkout-and-assume-cache: true + attach: true + + # Layer 3: Tests. + linux-x64-unittests: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + <<: *env-unittests + <<: *env-headless-testing + <<: *steps-native-tests + + linux-x64-disabled-unittests: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + <<: *env-unittests + <<: *env-headless-testing + TESTS_ARGS: '--only-disabled-tests' + <<: *steps-native-tests + + linux-x64-chromium-unittests: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + <<: *env-unittests + <<: *env-headless-testing + TESTS_ARGS: '--include-disabled-tests' + <<: *steps-native-tests + + linux-x64-browsertests: + executor: linux-docker + environment: + <<: *env-linux-2xlarge + <<: *env-browsertests + <<: *env-testing-build + <<: *env-headless-testing + <<: *steps-native-tests + + linux-x64-testing-tests: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-headless-testing + <<: *env-stack-dumping + parallelism: 3 + <<: *steps-tests + + linux-x64-testing-asan-tests: + executor: + name: linux-docker + size: xlarge + environment: + <<: *env-linux-medium + <<: *env-headless-testing + <<: *env-stack-dumping + IS_ASAN: '1' + DISABLE_CRASH_REPORTER_TESTS: '1' + parallelism: 3 + <<: *steps-tests + + linux-x64-testing-nan: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-headless-testing + <<: *env-stack-dumping + <<: *steps-test-nan + + linux-x64-testing-node: + executor: linux-docker + environment: + <<: *env-linux-medium + <<: *env-headless-testing + <<: *env-stack-dumping + <<: *steps-test-node + + linux-x64-release-tests: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-headless-testing + <<: *env-send-slack-notifications + <<: *steps-tests + + linux-x64-verify-ffmpeg: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-headless-testing + <<: *env-send-slack-notifications + <<: *steps-verify-ffmpeg + + linux-ia32-testing-tests: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-ia32 + <<: *env-headless-testing + <<: *env-stack-dumping + parallelism: 3 + <<: *steps-tests + + linux-ia32-testing-nan: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-ia32 + <<: *env-headless-testing + <<: *env-stack-dumping + <<: *steps-test-nan + + linux-ia32-testing-node: + executor: linux-docker + environment: + <<: *env-linux-medium + <<: *env-ia32 + <<: *env-headless-testing + <<: *env-stack-dumping + <<: *steps-test-node + + linux-ia32-release-tests: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-ia32 + <<: *env-headless-testing + <<: *env-send-slack-notifications + <<: *steps-tests + + linux-ia32-verify-ffmpeg: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-ia32 + <<: *env-headless-testing + <<: *env-send-slack-notifications + <<: *steps-verify-ffmpeg + + linux-arm-testing-tests: + executor: linux-arm + environment: + <<: *env-arm + <<: *env-global + <<: *env-headless-testing + <<: *env-stack-dumping + <<: *steps-tests + + linux-arm64-testing-tests: + executor: linux-arm64 + environment: + <<: *env-arm64 + <<: *env-global + <<: *env-headless-testing + <<: *env-stack-dumping + <<: *steps-tests + + osx-testing-x64-tests: + executor: + name: macos + size: medium + environment: + <<: *env-mac-large + <<: *env-stack-dumping + parallelism: 2 + <<: *steps-tests + + osx-testing-arm64-tests: + executor: apple-silicon + environment: + <<: *env-mac-large + <<: *env-stack-dumping + <<: *env-apple-silicon + <<: *steps-tests + + mas-testing-x64-tests: + executor: + name: macos + size: medium + environment: + <<: *env-mac-large + <<: *env-stack-dumping + parallelism: 2 + <<: *steps-tests + + mas-testing-arm64-tests: + executor: apple-silicon + environment: + <<: *env-mac-large + <<: *env-stack-dumping + <<: *env-apple-silicon + <<: *steps-tests + + # Layer 4: Summary. + linux-release-summary: + executor: + name: linux-docker + size: medium + environment: + <<: *env-linux-medium + <<: *env-send-slack-notifications + steps: + - *step-maybe-notify-slack-success + +# List all workflows +workflows: + docs-only: + when: + and: + - equal: [false, << pipeline.parameters.run-macos-publish >>] + - equal: [false, << pipeline.parameters.run-linux-publish >>] + - equal: [true, << pipeline.parameters.run-docs-only >>] + jobs: + - ts-compile-doc-change + + publish-linux: + when: << pipeline.parameters.run-linux-publish >> + jobs: + - linux-x64-publish: + context: release-env + - linux-ia32-publish: + context: release-env + - linux-arm-publish: + context: release-env + - linux-arm64-publish: + context: release-env + + publish-macos: + when: << pipeline.parameters.run-macos-publish >> + jobs: + - mac-checkout + - osx-publish-x64-skip-checkout: + requires: + - mac-checkout + context: release-env + - mas-publish-x64-skip-checkout: + requires: + - mac-checkout + context: release-env + - osx-publish-arm64-skip-checkout: + requires: + - mac-checkout + context: release-env + - mas-publish-arm64-skip-checkout: + requires: + - mac-checkout + context: release-env + + build-linux: + when: + and: + - equal: [false, << pipeline.parameters.run-macos-publish >>] + - equal: [false, << pipeline.parameters.run-linux-publish >>] + - equal: [true, << pipeline.parameters.run-build-linux >>] + jobs: + - linux-checkout-for-workspace + - linux-make-src-cache + - linux-x64-testing + - linux-x64-testing-asan + - linux-x64-testing-no-run-as-node + - linux-x64-testing-gn-check: + requires: + - linux-checkout-for-workspace + - linux-x64-testing-tests: + requires: + - linux-x64-testing + - linux-x64-testing-asan-tests: + requires: + - linux-x64-testing-asan + - linux-x64-testing-nan: + requires: + - linux-x64-testing + - linux-x64-testing-node: + requires: + - linux-x64-testing + - linux-ia32-testing + - linux-ia32-testing-tests: + requires: + - linux-ia32-testing + - linux-ia32-testing-nan: + requires: + - linux-ia32-testing + - linux-ia32-testing-node: + requires: + - linux-ia32-testing + - linux-arm-testing + - linux-arm-testing-tests: + filters: + branches: + # Do not run this on forked pull requests + ignore: /pull\/[0-9]+/ + requires: + - linux-arm-testing + - linux-arm64-testing + - linux-arm64-testing-tests: + filters: + branches: + # Do not run this on forked pull requests + ignore: /pull\/[0-9]+/ + requires: + - linux-arm64-testing + - linux-arm64-testing-gn-check: + requires: + - linux-checkout-for-workspace + + build-mac: + when: + and: + - equal: [false, << pipeline.parameters.run-macos-publish >>] + - equal: [false, << pipeline.parameters.run-linux-publish >>] + - equal: [true, << pipeline.parameters.run-build-mac >>] + jobs: + - mac-checkout-for-workspace + - mac-make-src-cache + - osx-testing-x64: + requires: + - mac-make-src-cache + - osx-testing-x64-gn-check: + requires: + - mac-checkout-for-workspace + - osx-testing-x64-tests: + requires: + - osx-testing-x64 + - osx-testing-arm64: + requires: + - mac-make-src-cache + - osx-testing-arm64-tests: + filters: + branches: + # Do not run this on forked pull requests + ignore: /pull\/[0-9]+/ + requires: + - osx-testing-arm64 + - mas-testing-x64: + requires: + - mac-make-src-cache + - mas-testing-x64-gn-check: + requires: + - mac-checkout-for-workspace + - mas-testing-x64-tests: + requires: + - mas-testing-x64 + - mas-testing-arm64: + requires: + - mac-make-src-cache + - mas-testing-arm64-tests: + filters: + branches: + # Do not run this on forked pull requests + ignore: /pull\/[0-9]+/ + requires: + - mas-testing-arm64 diff --git a/.circleci/config.yml b/.circleci/config.yml index 5afe973dd51c2..344b434438134 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,21 +1,29 @@ version: 2.1 +# Required for dynamic configuration +setup: true + +# Orbs +orbs: + path-filtering: circleci/path-filtering@0.1.0 + +# All input parameters to pass to build config parameters: + run-docs-only: + type: boolean + default: false + upload-to-s3: type: string default: '1' - run-lint: - type: boolean - default: true - run-build-linux: type: boolean - default: true + default: false run-build-mac: type: boolean - default: true + default: false run-linux-publish: type: boolean @@ -35,6 +43,14 @@ parameters: default: all enum: ["all", "osx-x64", "osx-arm64", "mas-x64", "mas-arm64"] +# Envs +env-global: &env-global + ELECTRON_OUT_DIR: Default + +env-linux-medium: &env-linux-medium + <<: *env-global + NUMBER_OF_NINJA_PROCESSES: 3 + # Executors executors: linux-docker: @@ -48,987 +64,11 @@ executors: - image: ghcr.io/electron/build:27db4a3e3512bfd2e47f58cea69922da0835f1d9 resource_class: << parameters.size >> - macos: - parameters: - size: - description: "macOS executor size" - default: large - type: enum - enum: ["medium", "large"] - macos: - xcode: "12.4.0" - resource_class: << parameters.size >> - - # Electron Runners - apple-silicon: - resource_class: electronjs/macos-arm64 - machine: true - - linux-arm: - resource_class: electronjs/linux-arm - machine: true - - linux-arm64: - resource_class: electronjs/linux-arm64 - machine: true - -# The config expects the following environment variables to be set: -# - "SLACK_WEBHOOK" Slack hook URL to send notifications. -# -# The publishing scripts expect access tokens to be defined as env vars, -# but those are not covered here. -# -# CircleCI docs on variables: -# https://circleci.com/docs/2.0/env-vars/ - -# Build configurations options. -env-testing-build: &env-testing-build - GN_CONFIG: //electron/build/args/testing.gn - CHECK_DIST_MANIFEST: '1' - -env-release-build: &env-release-build - GN_CONFIG: //electron/build/args/release.gn - STRIP_BINARIES: true - GENERATE_SYMBOLS: true - CHECK_DIST_MANIFEST: '1' - IS_RELEASE: true - -env-headless-testing: &env-headless-testing - DISPLAY: ':99.0' - -env-stack-dumping: &env-stack-dumping - ELECTRON_ENABLE_STACK_DUMPING: '1' - -env-browsertests: &env-browsertests - GN_CONFIG: //electron/build/args/native_tests.gn - BUILD_TARGET: electron/spec:chromium_browsertests - TESTS_CONFIG: src/electron/spec/configs/browsertests.yml - -env-unittests: &env-unittests - GN_CONFIG: //electron/build/args/native_tests.gn - BUILD_TARGET: electron/spec:chromium_unittests - TESTS_CONFIG: src/electron/spec/configs/unittests.yml - -# Build targets options. -env-ia32: &env-ia32 - GN_EXTRA_ARGS: 'target_cpu = "x86"' - NPM_CONFIG_ARCH: ia32 - TARGET_ARCH: ia32 - -env-arm: &env-arm - GN_EXTRA_ARGS: 'target_cpu = "arm"' - MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm - BUILD_NATIVE_MKSNAPSHOT: 1 - TARGET_ARCH: arm - -env-apple-silicon: &env-apple-silicon - GN_EXTRA_ARGS: 'target_cpu = "arm64" use_prebuilt_v8_context_snapshot = true' - TARGET_ARCH: arm64 - USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1 - npm_config_arch: arm64 - -env-arm64: &env-arm64 - GN_EXTRA_ARGS: 'target_cpu = "arm64" fatal_linker_warnings = false enable_linux_installer = false' - MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm64 - BUILD_NATIVE_MKSNAPSHOT: 1 - TARGET_ARCH: arm64 - -env-mas: &env-mas - GN_EXTRA_ARGS: 'is_mas_build = true' - MAS_BUILD: 'true' - -env-mas-apple-silicon: &env-mas-apple-silicon - GN_EXTRA_ARGS: 'target_cpu = "arm64" is_mas_build = true use_prebuilt_v8_context_snapshot = true' - MAS_BUILD: 'true' - TARGET_ARCH: arm64 - USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1 - -env-send-slack-notifications: &env-send-slack-notifications - NOTIFY_SLACK: true - -env-global: &env-global - ELECTRON_OUT_DIR: Default - -env-linux-medium: &env-linux-medium - <<: *env-global - NUMBER_OF_NINJA_PROCESSES: 3 - -env-linux-2xlarge: &env-linux-2xlarge - <<: *env-global - NUMBER_OF_NINJA_PROCESSES: 34 - -env-linux-2xlarge-release: &env-linux-2xlarge-release - <<: *env-global - NUMBER_OF_NINJA_PROCESSES: 16 - -env-machine-mac: &env-machine-mac - <<: *env-global - NUMBER_OF_NINJA_PROCESSES: 6 - -env-mac-large: &env-mac-large - <<: *env-global - NUMBER_OF_NINJA_PROCESSES: 18 - -env-mac-large-release: &env-mac-large-release - <<: *env-global - NUMBER_OF_NINJA_PROCESSES: 8 - -env-ninja-status: &env-ninja-status - NINJA_STATUS: "[%r processes, %f/%t @ %o/s : %es] " - -env-disable-run-as-node: &env-disable-run-as-node - GN_BUILDFLAG_ARGS: 'enable_run_as_node = false' - -env-32bit-release: &env-32bit-release - # Set symbol level to 1 for 32 bit releases because of https://crbug.com/648948 - GN_BUILDFLAG_ARGS: 'symbol_level = 1' - -env-macos-build: &env-macos-build - # Disable pre-compiled headers to reduce out size, only useful for rebuilds - GN_BUILDFLAG_ARGS: 'enable_precompiled_headers = false' - -# Individual (shared) steps. -step-maybe-notify-slack-failure: &step-maybe-notify-slack-failure - run: - name: Send a Slack notification on failure - command: | - if [ "$NOTIFY_SLACK" == "true" ]; then - export MESSAGE="Build failed for *<$CIRCLE_BUILD_URL|$CIRCLE_JOB>* nightly build from *$CIRCLE_BRANCH*." - curl -g -H "Content-Type: application/json" -X POST \ - -d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$CIRCLE_JOB nightly build results\",\"title_link\": \"$CIRCLE_BUILD_URL\"}]}" $SLACK_WEBHOOK - fi - when: on_fail - -step-maybe-notify-slack-success: &step-maybe-notify-slack-success - run: - name: Send a Slack notification on success - command: | - if [ "$NOTIFY_SLACK" == "true" ]; then - export MESSAGE="Build succeeded for *<$CIRCLE_BUILD_URL|$CIRCLE_JOB>* nightly build from *$CIRCLE_BRANCH*." - curl -g -H "Content-Type: application/json" -X POST \ - -d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"good\",\"title\": \"$CIRCLE_JOB nightly build results\",\"title_link\": \"$CIRCLE_BUILD_URL\"}]}" $SLACK_WEBHOOK - fi - when: on_success - -step-maybe-cleanup-arm64-mac: &step-maybe-cleanup-arm64-mac - run: - name: Cleanup after testing - command: | - if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then - killall Electron || echo "No Electron processes left running" - killall Safari || echo "No Safari processes left running" - rm -rf ~/Library/Application\ Support/Electron* - rm -rf ~/Library/Application\ Support/electron* - security delete-generic-password -l "Chromium Safe Storage" || echo "✓ Keychain does not contain password from tests" - security delete-generic-password -l "Electron Test Main Safe Storage" || echo "✓ Keychain does not contain password from tests" - elif [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then - XVFB=/usr/bin/Xvfb - /sbin/start-stop-daemon --stop --exec $XVFB || echo "Xvfb not running" - pkill electron || echo "electron not running" - rm -rf ~/.config/Electron* - rm -rf ~/.config/electron* - fi - - when: always - +# List of always run steps step-checkout-electron: &step-checkout-electron checkout: path: src/electron -step-depot-tools-get: &step-depot-tools-get - run: - name: Get depot tools - command: | - git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git - -step-depot-tools-add-to-path: &step-depot-tools-add-to-path - run: - name: Add depot tools to PATH - command: echo 'export PATH="$PATH:'"$PWD"'/depot_tools"' >> $BASH_ENV - -step-gclient-sync: &step-gclient-sync - run: - name: Gclient sync - command: | - # If we did not restore a complete sync then we need to sync for realz - if [ ! -s "src/electron/.circle-sync-done" ]; then - gclient config \ - --name "src/electron" \ - --unmanaged \ - $GCLIENT_EXTRA_ARGS \ - "$CIRCLE_REPOSITORY_URL" - - ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags - if [ "$IS_RELEASE" != "true" ]; then - # Re-export all the patches to check if there were changes. - python src/electron/script/export_all_patches.py src/electron/patches/config.json - cd src/electron - git update-index --refresh || true - if ! git diff-index --quiet HEAD --; then - # There are changes to the patches. Make a git commit with the updated patches - git add patches - GIT_COMMITTER_NAME="PatchUp" GIT_COMMITTER_EMAIL="73610968+patchup[bot]@users.noreply.github.com" git commit -m "chore: update patches" --author="PatchUp <73610968+patchup[bot]@users.noreply.github.com>" - # Export it - mkdir -p ../../patches - git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch - if (node ./script/push-patch.js 2> /dev/null > /dev/null); then - echo - echo "======================================================================" - echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch" - echo "A new CI job will kick off shortly" - echo "======================================================================" - exit 1 - else - echo - echo "======================================================================" - echo "There were changes to the patches when applying." - echo "Check the CI artifacts for a patch you can apply to fix it." - echo "======================================================================" - exit 1 - fi - fi - fi - fi - -step-setup-env-for-build: &step-setup-env-for-build - run: - name: Setup Environment Variables - command: | - # To find `gn` executable. - echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/src/buildtools"' >> $BASH_ENV - -step-setup-goma-for-build: &step-setup-goma-for-build - run: - name: Setup Goma - command: | - echo 'export NUMBER_OF_NINJA_PROCESSES=300' >> $BASH_ENV - if [ "`uname`" == "Darwin" ]; then - echo 'ulimit -n 10000' >> $BASH_ENV - echo 'sudo launchctl limit maxfiles 65536 200000' >> $BASH_ENV - fi - if [ ! -z "$RAW_GOMA_AUTH" ]; then - echo $RAW_GOMA_AUTH > ~/.goma_oauth2_config - fi - git clone https://github.com/electron/build-tools.git - cd build-tools - npm install - mkdir third_party - node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })" - export GOMA_FALLBACK_ON_AUTH_FAILURE=true - third_party/goma/goma_ctl.py ensure_start - echo 'export GN_GOMA_FILE='`node -e "console.log(require('./src/utils/goma.js').gnFilePath)"` >> $BASH_ENV - echo 'export LOCAL_GOMA_DIR='`node -e "console.log(require('./src/utils/goma.js').dir)"` >> $BASH_ENV - echo 'export GOMA_FALLBACK_ON_AUTH_FAILURE=true' >> $BASH_ENV - cd .. - -step-restore-brew-cache: &step-restore-brew-cache - restore_cache: - paths: - - /usr/local/Cellar/gnu-tar - - /usr/local/bin/gtar - keys: - - v4-brew-cache-{{ arch }} - -step-save-brew-cache: &step-save-brew-cache - save_cache: - paths: - - /usr/local/Cellar/gnu-tar - - /usr/local/bin/gtar - key: v4-brew-cache-{{ arch }} - name: Persisting brew cache - -step-get-more-space-on-mac: &step-get-more-space-on-mac - run: - name: Free up space on MacOS - command: | - if [ "`uname`" == "Darwin" ]; then - sudo mkdir -p $TMPDIR/del-target - if [ "$TARGET_ARCH" == "arm64" ]; then - # Remount the root volume as writable, don't ask questions plz - sudo mount -uw / - fi - tmpify() { - if [ -d "$1" ]; then - sudo mv "$1" $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1) - fi - } - - strip_arm_deep() { - opwd=$(pwd) - cd $1 - f=$(find . -perm +111 -type f) - for fp in $f - do - if [[ $(file "$fp") == *"universal binary"* ]]; then - if [[ $(file "$fp") == *"arm64e)"* ]]; then - sudo lipo -remove arm64e "$fp" -o "$fp" || true - fi - if [[ $(file "$fp") == *"arm64)"* ]]; then - sudo lipo -remove arm64 "$fp" -o "$fp" || true - fi - fi - done - - cd $opwd - } - - tmpify /Library/Developer/CoreSimulator - tmpify ~/Library/Developer/CoreSimulator - tmpify $(xcode-select -p)/Platforms/AppleTVOS.platform - tmpify $(xcode-select -p)/Platforms/iPhoneOS.platform - tmpify $(xcode-select -p)/Platforms/WatchOS.platform - tmpify $(xcode-select -p)/Platforms/WatchSimulator.platform - tmpify $(xcode-select -p)/Platforms/AppleTVSimulator.platform - tmpify $(xcode-select -p)/Platforms/iPhoneSimulator.platform - tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios - tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift - tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0 - tmpify ~/.rubies - tmpify ~/Library/Caches/Homebrew - tmpify /usr/local/Homebrew - sudo rm -rf $TMPDIR/del-target - - if [ "$TARGET_ARCH" == "arm64" ]; then - sudo rm -rf "/System/Library/Desktop Pictures" - sudo rm -rf /System/Library/Templates/Data - sudo rm -rf /System/Library/Speech/Voices - sudo rm -rf "/System/Library/Screen Savers" - sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs - sudo rm -rf "/System/Volumes/Data/Library/Application Support/Apple/Photos/Print Products" - sudo rm -rf /System/Volumes/Data/Library/Java - sudo rm -rf /System/Volumes/Data/Library/Ruby - sudo rm -rf /System/Volumes/Data/Library/Printers - sudo rm -rf /System/iOSSupport - sudo rm -rf /System/Applications/*.app - sudo rm -rf /System/Applications/Utilities/*.app - sudo rm -rf /System/Library/LinguisticData - sudo rm -rf /System/Volumes/Data/private/var/db/dyld/* - # sudo rm -rf /System/Library/Fonts/* - # sudo rm -rf /System/Library/PreferencePanes - sudo rm -rf /System/Library/AssetsV2/* - sudo rm -rf /Applications/Safari.app - sudo rm -rf ~/project/src/build/linux - sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data - sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS - - # lipo off some huge binaries arm64 versions to save space - strip_arm_deep $(xcode-select -p)/../SharedFrameworks - strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr - fi - fi - background: true - -# On macOS delete all .git directories under src/ expect for -# third_party/angle/ because of build time generation of file -# gen/angle/commit.h depends on third_party/angle/.git/HEAD -# https://chromium-review.googlesource.com/c/angle/angle/+/2074924 -# TODO: maybe better to always leave out */.git/HEAD file for all targets ? -step-delete-git-directories: &step-delete-git-directories - run: - name: Delete all .git directories under src on MacOS to free space - command: | - if [ "`uname`" == "Darwin" ]; then - cd src - ( find . -type d -name ".git" -not -path "./third_party/angle/*" ) | xargs rm -rf - fi - -# On macOS the yarn install command during gclient sync was run on a linux -# machine and therefore installed a slightly different set of dependencies -# Notably "fsevents" is a macOS only dependency, we rerun yarn install once -# we are on a macOS machine to get the correct state -step-install-npm-deps-on-mac: &step-install-npm-deps-on-mac - run: - name: Install node_modules on MacOS - command: | - if [ "`uname`" == "Darwin" ]; then - cd src/electron - node script/yarn install - fi - -# This step handles the differences between the linux "gclient sync" -# and the expected state on macOS -step-fix-sync: &step-fix-sync - run: - name: Fix Sync - command: | - if [ "`uname`" == "Darwin" ]; then - # Fix Clang Install (wrong binary) - rm -rf src/third_party/llvm-build - python3 src/tools/clang/scripts/update.py - fi - - cd src/third_party/angle - git remote set-url origin https://chromium.googlesource.com/angle/angle.git - git fetch - -step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac - run: - name: Import and trust self-signed codesigning cert on MacOS - command: | - if [ "$TARGET_ARCH" != "arm64" ] && [ "`uname`" == "Darwin" ]; then - cd src/electron - ./script/codesign/generate-identity.sh - fi - -step-install-gnutar-on-mac: &step-install-gnutar-on-mac - run: - name: Install gnu-tar on macos - command: | - if [ "`uname`" == "Darwin" ]; then - if [ ! -d /usr/local/Cellar/gnu-tar/ ]; then - brew update - brew install gnu-tar - fi - ln -fs /usr/local/bin/gtar /usr/local/bin/tar - fi - -step-gn-gen-default: &step-gn-gen-default - run: - name: Default GN gen - command: | - cd src - gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS" - -step-gn-check: &step-gn-check - run: - name: GN check - command: | - cd src - gn check out/Default //electron:electron_lib - gn check out/Default //electron:electron_app - gn check out/Default //electron/shell/common/api:mojo - # Check the hunspell filenames - node electron/script/gen-hunspell-filenames.js --check - node electron/script/gen-libc++-filenames.js --check - -step-electron-build: &step-electron-build - run: - name: Electron build - no_output_timeout: 30m - command: | - # On arm platforms we generate a cross-arch ffmpeg that ninja does not seem - # to realize is not correct / should be rebuilt. We delete it here so it is - # rebuilt - if [ "$TRIGGER_ARM_TEST" == "true" ]; then - rm -f src/out/Default/libffmpeg.so - fi - cd src - # Enable if things get really bad - # if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then - # diskutil erasevolume HFS+ "xcode_disk" `hdiutil attach -nomount ram://12582912` - # mv /Applications/Xcode-12.beta.5.app /Volumes/xcode_disk/ - # ln -s /Volumes/xcode_disk/Xcode-12.beta.5.app /Applications/Xcode-12.beta.5.app - # fi - - # Lets generate a snapshot and mksnapshot and then delete all the x-compiled generated files to save space - if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" == "1" ]; then - ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES - ninja -C out/Default tools/v8_context_snapshot -j $NUMBER_OF_NINJA_PROCESSES - gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args - (cd out/Default; zip mksnapshot.zip mksnapshot_args clang_x64_v8_arm64/gen/v8/embedded.S) - rm -rf out/Default/clang_x64_v8_arm64/gen - rm -rf out/Default/clang_x64_v8_arm64/obj - rm -rf out/Default/clang_x64/obj - - # Regenerate because we just deleted some ninja files - gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS" - fi - NINJA_SUMMARIZE_BUILD=1 autoninja -C out/Default electron -j $NUMBER_OF_NINJA_PROCESSES - cp out/Default/.ninja_log out/electron_ninja_log - node electron/script/check-symlinks.js - -step-native-unittests-build: &step-native-unittests-build - run: - name: Build native test targets - no_output_timeout: 30m - command: | - cd src - ninja -C out/Default shell_browser_ui_unittests -j $NUMBER_OF_NINJA_PROCESSES - -step-maybe-electron-dist-strip: &step-maybe-electron-dist-strip - run: - name: Strip electron binaries - command: | - if [ "$STRIP_BINARIES" == "true" ] && [ "`uname`" == "Linux" ]; then - if [ x"$TARGET_ARCH" == x ]; then - target_cpu=x64 - elif [ "$TARGET_ARCH" == "ia32" ]; then - target_cpu=x86 - else - target_cpu="$TARGET_ARCH" - fi - cd src - electron/script/copy-debug-symbols.py --target-cpu="$target_cpu" --out-dir=out/Default/debug --compress - electron/script/strip-binaries.py --target-cpu="$target_cpu" - electron/script/add-debug-link.py --target-cpu="$target_cpu" --debug-dir=out/Default/debug - fi - -step-electron-dist-build: &step-electron-dist-build - run: - name: Build dist.zip - command: | - cd src - if [ "$SKIP_DIST_ZIP" != "1" ]; then - ninja -C out/Default electron:electron_dist_zip - if [ "$CHECK_DIST_MANIFEST" == "1" ]; then - if [ "`uname`" == "Darwin" ]; then - target_os=mac - target_cpu=x64 - if [ x"$MAS_BUILD" == x"true" ]; then - target_os=mac_mas - fi - if [ "$TARGET_ARCH" == "arm64" ]; then - target_cpu=arm64 - fi - elif [ "`uname`" == "Linux" ]; then - target_os=linux - if [ x"$TARGET_ARCH" == x ]; then - target_cpu=x64 - elif [ "$TARGET_ARCH" == "ia32" ]; then - target_cpu=x86 - else - target_cpu="$TARGET_ARCH" - fi - else - echo "Unknown system: `uname`" - exit 1 - fi - electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.$target_os.$target_cpu.manifest - fi - fi - -step-electron-chromedriver-build: &step-electron-chromedriver-build - run: - name: Build chromedriver.zip - command: | - cd src - if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then - gn gen out/chromedriver --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") is_component_ffmpeg=false proprietary_codecs=false $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS" - export CHROMEDRIVER_DIR="out/chromedriver" - else - export CHROMEDRIVER_DIR="out/Default" - fi - ninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES - if [ "`uname`" == "Linux" ]; then - electron/script/strip-binaries.py --target-cpu="$TARGET_ARCH" --file $PWD/$CHROMEDRIVER_DIR/chromedriver - fi - ninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver_zip - if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then - cp out/chromedriver/chromedriver.zip out/Default - fi - -step-nodejs-headers-build: &step-nodejs-headers-build - run: - name: Build Node.js headers - command: | - cd src - ninja -C out/Default third_party/electron_node:headers - -step-electron-publish: &step-electron-publish - run: - name: Publish Electron Dist - command: | - if [ "`uname`" == "Darwin" ]; then - rm -rf src/out/Default/obj - fi - - cd src/electron - if [ "$UPLOAD_TO_S3" == "1" ]; then - echo 'Uploading Electron release distribution to S3' - script/release/uploaders/upload.py --verbose --upload_to_s3 - else - echo 'Uploading Electron release distribution to Github releases' - script/release/uploaders/upload.py --verbose - fi - -step-persist-data-for-tests: &step-persist-data-for-tests - persist_to_workspace: - root: . - paths: - # Build artifacts - - src/out/Default/dist.zip - - src/out/Default/mksnapshot.zip - - src/out/Default/chromedriver.zip - - src/out/Default/shell_browser_ui_unittests - - src/out/Default/gen/node_headers - - src/out/ffmpeg/ffmpeg.zip - - src/electron - - src/third_party/electron_node - - src/third_party/nan - - src/cross-arch-snapshots - - src/third_party/llvm-build - - src/build/linux - - src/buildtools/third_party/libc++ - - src/buildtools/third_party/libc++abi - - src/out/Default/obj/buildtools/third_party - -step-electron-dist-unzip: &step-electron-dist-unzip - run: - name: Unzip dist.zip - command: | - cd src/out/Default - # -o overwrite files WITHOUT prompting - # TODO(alexeykuzmin): Remove '-o' when it's no longer needed. - # -: allows to extract archive members into locations outside - # of the current ``extraction root folder''. - # ASan builds have the llvm-symbolizer binaries listed as - # runtime_deps, with their paths as `../../third_party/...` - # unzip exits with non-zero code on such zip files unless -: is - # passed. - unzip -:o dist.zip - -step-ffmpeg-unzip: &step-ffmpeg-unzip - run: - name: Unzip ffmpeg.zip - command: | - cd src/out/ffmpeg - unzip -:o ffmpeg.zip - -step-mksnapshot-unzip: &step-mksnapshot-unzip - run: - name: Unzip mksnapshot.zip - command: | - cd src/out/Default - unzip -:o mksnapshot.zip - -step-chromedriver-unzip: &step-chromedriver-unzip - run: - name: Unzip chromedriver.zip - command: | - cd src/out/Default - unzip -:o chromedriver.zip - -step-ffmpeg-gn-gen: &step-ffmpeg-gn-gen - run: - name: ffmpeg GN gen - command: | - cd src - gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS" - -step-ffmpeg-build: &step-ffmpeg-build - run: - name: Non proprietary ffmpeg build - command: | - cd src - ninja -C out/ffmpeg electron:electron_ffmpeg_zip -j $NUMBER_OF_NINJA_PROCESSES - -step-verify-ffmpeg: &step-verify-ffmpeg - run: - name: Verify ffmpeg - command: | - cd src - python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg - -step-verify-mksnapshot: &step-verify-mksnapshot - run: - name: Verify mksnapshot - command: | - if [ "$IS_ASAN" != "1" ]; then - cd src - if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then - python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/cross-arch-snapshots - else - python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default - fi - fi - -step-verify-chromedriver: &step-verify-chromedriver - run: - name: Verify ChromeDriver - command: | - if [ "$IS_ASAN" != "1" ]; then - cd src - python electron/script/verify-chromedriver.py --source-root "$PWD" --build-dir out/Default - fi - -step-setup-linux-for-headless-testing: &step-setup-linux-for-headless-testing - run: - name: Setup for headless testing - command: | - if [ "`uname`" != "Darwin" ]; then - sh -e /etc/init.d/xvfb start - fi - -step-show-goma-stats: &step-show-goma-stats - run: - shell: /bin/bash - name: Check goma stats after build - command: | - set +e - set +o pipefail - $LOCAL_GOMA_DIR/goma_ctl.py stat - $LOCAL_GOMA_DIR/diagnose_goma_log.py - true - when: always - -step-mksnapshot-build: &step-mksnapshot-build - run: - name: mksnapshot build - command: | - cd src - if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" != "1" ]; then - ninja -C out/Default electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES - gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args - fi - if [ "`uname`" != "Darwin" ]; then - if [ "$TARGET_ARCH" == "arm" ]; then - electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot - electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator - elif [ "$TARGET_ARCH" == "arm64" ]; then - electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot - electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/v8_context_snapshot_generator - else - electron/script/strip-binaries.py --file $PWD/out/Default/mksnapshot - electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator - fi - fi - if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" != "1" ] && [ "$SKIP_DIST_ZIP" != "1" ]; then - ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES - (cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S) - fi - -step-hunspell-build: &step-hunspell-build - run: - name: hunspell build - command: | - cd src - if [ "$SKIP_DIST_ZIP" != "1" ]; then - ninja -C out/Default electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES - fi - -step-maybe-generate-libcxx: &step-maybe-generate-libcxx - run: - name: maybe generate libcxx - command: | - cd src - if [ "`uname`" == "Linux" ]; then - ninja -C out/Default electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES - ninja -C out/Default electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES - ninja -C out/Default electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES - fi - -step-maybe-generate-breakpad-symbols: &step-maybe-generate-breakpad-symbols - run: - name: Generate breakpad symbols - no_output_timeout: 30m - command: | - if [ "$GENERATE_SYMBOLS" == "true" ]; then - cd src - ninja -C out/Default electron:electron_symbols - fi - -step-maybe-zip-symbols: &step-maybe-zip-symbols - run: - name: Zip symbols - command: | - cd src - export BUILD_PATH="$PWD/out/Default" - ninja -C out/Default electron:licenses - ninja -C out/Default electron:electron_version - DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH - -step-maybe-cross-arch-snapshot: &step-maybe-cross-arch-snapshot - run: - name: Generate cross arch snapshot (arm/arm64) - command: | - if [ "$GENERATE_CROSS_ARCH_SNAPSHOT" == "true" ] && [ -z "$CIRCLE_PR_NUMBER" ]; then - cd src - if [ "$TARGET_ARCH" == "arm" ]; then - export MKSNAPSHOT_PATH="clang_x86_v8_arm" - elif [ "$TARGET_ARCH" == "arm64" ]; then - export MKSNAPSHOT_PATH="clang_x64_v8_arm64" - fi - cp "out/Default/$MKSNAPSHOT_PATH/mksnapshot" out/Default - cp "out/Default/$MKSNAPSHOT_PATH/v8_context_snapshot_generator" out/Default - if [ "`uname`" == "Linux" ]; then - cp "out/Default/$MKSNAPSHOT_PATH/libffmpeg.so" out/Default - elif [ "`uname`" == "Darwin" ]; then - cp "out/Default/$MKSNAPSHOT_PATH/libffmpeg.dylib" out/Default - fi - python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --create-snapshot-only - mkdir cross-arch-snapshots - cp out/Default-mksnapshot-test/*.bin cross-arch-snapshots - fi - -step-maybe-generate-typescript-defs: &step-maybe-generate-typescript-defs - run: - name: Generate type declarations - command: | - if [ "`uname`" == "Darwin" ]; then - cd src/electron - node script/yarn create-typescript-definitions - fi - -step-fix-known-hosts-linux: &step-fix-known-hosts-linux - run: - name: Fix Known Hosts on Linux - command: | - if [ "`uname`" == "Linux" ]; then - ./src/electron/.circleci/fix-known-hosts.sh - fi - -# Checkout Steps -step-generate-deps-hash: &step-generate-deps-hash - run: - name: Generate DEPS Hash - command: node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target - -step-touch-sync-done: &step-touch-sync-done - run: - name: Touch Sync Done - command: touch src/electron/.circle-sync-done - -# Restore exact src cache based on the hash of DEPS and patches/* -# If no cache is matched EXACTLY then the .circle-sync-done file is empty -# If a cache is matched EXACTLY then the .circle-sync-done file contains "done" -step-maybe-restore-src-cache: &step-maybe-restore-src-cache - restore_cache: - keys: - - v8-src-cache-{{ checksum "src/electron/.depshash" }} - name: Restoring src cache -step-maybe-restore-src-cache-marker: &step-maybe-restore-src-cache-marker - restore_cache: - keys: - - v1-src-cache-marker-{{ checksum "src/electron/.depshash" }} - name: Restoring src cache marker - -# Restore exact or closest git cache based on the hash of DEPS and .circle-sync-done -# If the src cache was restored above then this will match an empty cache -# If the src cache was not restored above then this will match a close git cache -step-maybe-restore-git-cache: &step-maybe-restore-git-cache - restore_cache: - paths: - - ~/.gclient-cache - keys: - - v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} - - v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }} - name: Conditionally restoring git cache - -step-restore-out-cache: &step-restore-out-cache - restore_cache: - paths: - - ./src/out/Default - keys: - - v9-out-cache-{{ checksum "src/electron/.depshash" }}-{{ checksum "src/electron/.depshash-target" }} - name: Restoring out cache - -step-set-git-cache-path: &step-set-git-cache-path - run: - name: Set GIT_CACHE_PATH to make gclient to use the cache - command: | - # CircleCI does not support interpolation when setting environment variables. - # https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-shell-command - echo 'export GIT_CACHE_PATH="$HOME/.gclient-cache"' >> $BASH_ENV - -# Persist the git cache based on the hash of DEPS and .circle-sync-done -# If the src cache was restored above then this will persist an empty cache -step-save-git-cache: &step-save-git-cache - save_cache: - paths: - - ~/.gclient-cache - key: v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} - name: Persisting git cache - -step-save-out-cache: &step-save-out-cache - save_cache: - paths: - - ./src/out/Default - key: v9-out-cache-{{ checksum "src/electron/.depshash" }}-{{ checksum "src/electron/.depshash-target" }} - name: Persisting out cache - -step-run-electron-only-hooks: &step-run-electron-only-hooks - run: - name: Run Electron Only Hooks - command: gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]" - -step-generate-deps-hash-cleanly: &step-generate-deps-hash-cleanly - run: - name: Generate DEPS Hash - command: (cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target - -# Mark the sync as done for future cache saving -step-mark-sync-done: &step-mark-sync-done - run: - name: Mark Sync Done - command: echo DONE > src/electron/.circle-sync-done - -# Minimize the size of the cache -step-minimize-workspace-size-from-checkout: &step-minimize-workspace-size-from-checkout - run: - name: Remove some unused data to avoid storing it in the workspace/cache - command: | - rm -rf src/android_webview - rm -rf src/ios/chrome - rm -rf src/third_party/blink/web_tests - rm -rf src/third_party/blink/perf_tests - rm -rf src/third_party/WebKit/LayoutTests - rm -rf third_party/electron_node/deps/openssl - rm -rf third_party/electron_node/deps/v8 - rm -rf chrome/test/data/xr/webvr_info - -# Save the src cache based on the deps hash -step-save-src-cache: &step-save-src-cache - save_cache: - paths: - - /var/portal - key: v8-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }} - name: Persisting src cache -step-make-src-cache-marker: &step-make-src-cache-marker - run: - name: Making src cache marker - command: touch .src-cache-marker -step-save-src-cache-marker: &step-save-src-cache-marker - save_cache: - paths: - - .src-cache-marker - key: v1-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }} - -# Check for doc only change -step-check-for-doc-only-change: &step-check-for-doc-only-change - run: - name: Check if commit is doc only change - command: | - cd src/electron - node script/yarn install --frozen-lockfile - if node script/doc-only-change.js --prNumber=$CIRCLE_PR_NUMBER --prURL=$CIRCLE_PULL_REQUEST --prBranch=$CIRCLE_BRANCH; then - #PR is doc only change; save file with value true to indicate doc only change - echo "true" > .skip-ci-build - else - #PR is not a doc only change; create empty file to indicate check has been done - touch .skip-ci-build - fi - -step-persist-doc-only-change: &step-persist-doc-only-change - persist_to_workspace: - root: . - paths: - - src/electron/.skip-ci-build - -step-maybe-early-exit-doc-only-change: &step-maybe-early-exit-doc-only-change - run: - name: Shortcircuit build if doc only change - command: | - if [ -s src/electron/.skip-ci-build ]; then - circleci-agent step halt - fi - -step-maybe-early-exit-no-doc-change: &step-maybe-early-exit-no-doc-change - run: - name: Shortcircuit job if change is not doc only - command: | - if [ ! -s src/electron/.skip-ci-build ]; then - circleci-agent step halt - fi - -step-ts-compile: &step-ts-compile - run: - name: Run TS/JS compile on doc only change - command: | - cd src - ninja -C out/Default electron:default_app_js -j $NUMBER_OF_NINJA_PROCESSES - ninja -C out/Default electron:electron_js2c -j $NUMBER_OF_NINJA_PROCESSES - -# Lists of steps. steps-lint: &steps-lint steps: - *step-checkout-electron @@ -1078,551 +118,8 @@ steps-lint: &steps-lint cd src/electron node script/yarn tsc -p tsconfig.script.json -steps-electron-gn-check: &steps-electron-gn-check - steps: - - attach_workspace: - at: . - - *step-maybe-early-exit-doc-only-change - - *step-depot-tools-add-to-path - - *step-setup-env-for-build - - *step-setup-goma-for-build - - *step-gn-gen-default - - *step-gn-check - -steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-change - steps: - # Checkout - Copied ffrom steps-checkout - - *step-checkout-electron - - *step-check-for-doc-only-change - - *step-maybe-early-exit-no-doc-change - - *step-depot-tools-get - - *step-depot-tools-add-to-path - - *step-restore-brew-cache - - *step-install-gnutar-on-mac - - *step-get-more-space-on-mac - - *step-generate-deps-hash - - *step-touch-sync-done - - maybe-restore-portaled-src-cache - - *step-maybe-restore-git-cache - - *step-set-git-cache-path - # This sync call only runs if .circle-sync-done is an EMPTY file - - *step-gclient-sync - # These next few steps reset Electron to the correct commit regardless of which cache was restored - - run: - name: Wipe Electron - command: rm -rf src/electron - - *step-checkout-electron - - *step-run-electron-only-hooks - - *step-generate-deps-hash-cleanly - - *step-mark-sync-done - - *step-minimize-workspace-size-from-checkout - - - *step-depot-tools-add-to-path - - *step-setup-env-for-build - - *step-setup-goma-for-build - - *step-get-more-space-on-mac - - *step-install-npm-deps-on-mac - - *step-fix-sync - - *step-gn-gen-default - - #Compile ts/js to verify doc change didn't break anything - - *step-ts-compile - -steps-native-tests: &steps-native-tests - steps: - - attach_workspace: - at: . - - *step-depot-tools-add-to-path - - *step-setup-env-for-build - - *step-setup-goma-for-build - - *step-gn-gen-default - - - run: - name: Build tests - command: | - cd src - ninja -C out/Default $BUILD_TARGET - - *step-show-goma-stats - - - *step-setup-linux-for-headless-testing - - run: - name: Run tests - command: | - mkdir test_results - python src/electron/script/native-tests.py run \ - --config $TESTS_CONFIG \ - --tests-dir src/out/Default \ - --output-dir test_results \ - $TESTS_ARGS - - - store_artifacts: - path: test_results - destination: test_results # Put it in the root folder. - - store_test_results: - path: test_results - -steps-verify-ffmpeg: &steps-verify-ffmpeg - steps: - - attach_workspace: - at: . - - *step-depot-tools-add-to-path - - *step-electron-dist-unzip - - *step-ffmpeg-unzip - - *step-setup-linux-for-headless-testing - - - *step-verify-ffmpeg - - *step-maybe-notify-slack-failure - -steps-tests: &steps-tests - steps: - - attach_workspace: - at: . - - *step-maybe-early-exit-doc-only-change - - *step-depot-tools-add-to-path - - *step-electron-dist-unzip - - *step-mksnapshot-unzip - - *step-chromedriver-unzip - - *step-setup-linux-for-headless-testing - - *step-restore-brew-cache - - *step-fix-known-hosts-linux - - *step-install-signing-cert-on-mac - - - run: - name: Run Electron tests - environment: - MOCHA_REPORTER: mocha-multi-reporters - ELECTRON_TEST_RESULTS_DIR: junit - MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap - ELECTRON_DISABLE_SECURITY_WARNINGS: 1 - command: | - cd src - if [ "$IS_ASAN" == "1" ]; then - ASAN_SYMBOLIZE="$PWD/tools/valgrind/asan/asan_symbolize.py --executable-path=$PWD/out/Default/electron" - export ASAN_OPTIONS="symbolize=0 handle_abort=1" - export G_SLICE=always-malloc - export NSS_DISABLE_ARENA_FREE_LIST=1 - export NSS_DISABLE_UNLOAD=1 - export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer - export MOCHA_TIMEOUT=180000 - echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)" - (cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec-main/*-spec.ts | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE - (cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.js | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE - else - if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then - export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true - (cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging) - (cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging) - else - if [ "$TARGET_ARCH" == "ia32" ]; then - npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js - fi - (cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec-main/*-spec.ts | circleci tests split --split-by=timings)) - (cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.js | circleci tests split --split-by=timings)) - fi - fi - - run: - name: Check test results existence - command: | - cd src - - # Check if test results exist and are not empty. - if [ ! -s "junit/test-results-remote.xml" ]; then - exit 1 - fi - if [ ! -s "junit/test-results-main.xml" ]; then - exit 1 - fi - - store_test_results: - path: src/junit - - - *step-verify-mksnapshot - - *step-verify-chromedriver - - - *step-maybe-notify-slack-failure - - - *step-maybe-cleanup-arm64-mac - -steps-test-nan: &steps-test-nan - steps: - - attach_workspace: - at: . - - *step-maybe-early-exit-doc-only-change - - *step-depot-tools-add-to-path - - *step-electron-dist-unzip - - *step-setup-linux-for-headless-testing - - *step-fix-known-hosts-linux - - run: - name: Run Nan Tests - command: | - cd src - node electron/script/nan-spec-runner.js - -steps-test-node: &steps-test-node - steps: - - attach_workspace: - at: . - - *step-maybe-early-exit-doc-only-change - - *step-depot-tools-add-to-path - - *step-electron-dist-unzip - - *step-setup-linux-for-headless-testing - - *step-fix-known-hosts-linux - - run: - name: Run Node Tests - command: | - cd src - node electron/script/node-spec-runner.js --default --jUnitDir=junit - - store_test_results: - path: src/junit - -# Command Aliases -commands: - maybe-restore-portaled-src-cache: - parameters: - halt-if-successful: - type: boolean - default: false - steps: - - run: - name: Prepare for cross-OS sync restore - command: | - sudo mkdir -p /var/portal - sudo chown -R $(id -u):$(id -g) /var/portal - - when: - condition: << parameters.halt-if-successful >> - steps: - - *step-maybe-restore-src-cache-marker - - run: - name: Halt the job early if the src cache exists - command: | - if [ -f ".src-cache-marker" ]; then - circleci-agent step halt - fi - - *step-maybe-restore-src-cache - - run: - name: Fix the src cache restore point on macOS - command: | - if [ -d "/var/portal/src" ]; then - echo Relocating Cache - rm -rf src - mv /var/portal/src ./ - fi - - move_and_store_all_artifacts: - steps: - - run: - name: Move all generated artifacts to upload folder - command: | - rm -rf generated_artifacts - mkdir generated_artifacts - mv_if_exist() { - if [ -f "$1" ] || [ -d "$1" ]; then - echo Storing $1 - mv $1 generated_artifacts - else - echo Skipping $1 - It is not present on disk - fi - } - mv_if_exist src/out/Default/dist.zip - mv_if_exist src/out/Default/shell_browser_ui_unittests - mv_if_exist src/out/Default/gen/node_headers.tar.gz - mv_if_exist src/out/Default/symbols.zip - mv_if_exist src/out/Default/mksnapshot.zip - mv_if_exist src/out/Default/chromedriver.zip - mv_if_exist src/out/ffmpeg/ffmpeg.zip - mv_if_exist src/out/Default/hunspell_dictionaries.zip - mv_if_exist src/cross-arch-snapshots - mv_if_exist src/out/electron_ninja_log - when: always - - store_artifacts: - path: generated_artifacts - destination: ./ - - store_artifacts: - path: generated_artifacts/cross-arch-snapshots - destination: cross-arch-snapshots - - checkout-from-cache: - steps: - - *step-checkout-electron - - *step-maybe-early-exit-doc-only-change - - *step-depot-tools-get - - *step-depot-tools-add-to-path - - *step-generate-deps-hash - - maybe-restore-portaled-src-cache - - run: - name: Ensure src checkout worked - command: | - if [ ! -d "src/third_party/blink" ]; then - echo src cache was not restored for some reason, idk what happened here... - exit 1 - fi - - run: - name: Wipe Electron - command: rm -rf src/electron - - *step-checkout-electron - - *step-run-electron-only-hooks - - *step-generate-deps-hash-cleanly - electron-build: - parameters: - attach: - type: boolean - default: false - persist: - type: boolean - default: true - persist-checkout: - type: boolean - default: false - checkout: - type: boolean - default: true - checkout-and-assume-cache: - type: boolean - default: false - save-git-cache: - type: boolean - default: false - checkout-to-create-src-cache: - type: boolean - default: false - build: - type: boolean - default: true - use-out-cache: - type: boolean - default: true - restore-src-cache: - type: boolean - default: true - build-nonproprietary-ffmpeg: - type: boolean - default: true - steps: - - when: - condition: << parameters.attach >> - steps: - - attach_workspace: - at: . - - *step-maybe-early-exit-doc-only-change - - run: rm -rf src/electron - - *step-restore-brew-cache - - *step-install-gnutar-on-mac - - *step-save-brew-cache - - when: - condition: << parameters.checkout-and-assume-cache >> - steps: - - checkout-from-cache - - when: - condition: << parameters.checkout >> - steps: - # Checkout - Copied ffrom steps-checkout - - *step-checkout-electron - - *step-check-for-doc-only-change - - *step-persist-doc-only-change - - *step-maybe-early-exit-doc-only-change - - *step-depot-tools-get - - *step-depot-tools-add-to-path - - *step-get-more-space-on-mac - - *step-generate-deps-hash - - *step-touch-sync-done - - when: - condition: << parameters.restore-src-cache >> - steps: - - maybe-restore-portaled-src-cache: - halt-if-successful: << parameters.checkout-to-create-src-cache >> - - *step-maybe-restore-git-cache - - *step-set-git-cache-path - # This sync call only runs if .circle-sync-done is an EMPTY file - - *step-gclient-sync - - store_artifacts: - path: patches - - when: - condition: << parameters.save-git-cache >> - steps: - - *step-save-git-cache - # These next few steps reset Electron to the correct commit regardless of which cache was restored - - run: - name: Wipe Electron - command: rm -rf src/electron - - *step-checkout-electron - - *step-run-electron-only-hooks - - *step-generate-deps-hash-cleanly - - *step-mark-sync-done - - *step-minimize-workspace-size-from-checkout - - *step-delete-git-directories - - when: - condition: << parameters.persist-checkout >> - steps: - - persist_to_workspace: - root: . - paths: - - depot_tools - - src - - when: - condition: << parameters.checkout-to-create-src-cache >> - steps: - - run: - name: Move src folder to the cross-OS portal - command: | - sudo mkdir -p /var/portal - sudo chown -R $(id -u):$(id -g) /var/portal - mv ./src /var/portal - - *step-save-src-cache - - *step-make-src-cache-marker - - *step-save-src-cache-marker - - - when: - condition: << parameters.build >> - steps: - - *step-depot-tools-add-to-path - - *step-setup-env-for-build - - *step-setup-goma-for-build - - *step-get-more-space-on-mac - - *step-fix-sync - - *step-delete-git-directories - - # Electron app - - when: - condition: << parameters.use-out-cache >> - steps: - - *step-restore-out-cache - - *step-gn-gen-default - - *step-electron-build - - *step-maybe-electron-dist-strip - - *step-electron-dist-build - - # Native test targets - - *step-native-unittests-build - - # Node.js headers - - *step-nodejs-headers-build - - - *step-show-goma-stats - - # mksnapshot - - *step-mksnapshot-build - - *step-maybe-cross-arch-snapshot - - # chromedriver - - *step-electron-chromedriver-build - - - when: - condition: << parameters.build-nonproprietary-ffmpeg >> - steps: - # ffmpeg - - *step-ffmpeg-gn-gen - - *step-ffmpeg-build - - # hunspell - - *step-hunspell-build - - # Save all data needed for a further tests run. - - when: - condition: << parameters.persist >> - steps: - - *step-persist-data-for-tests - - - when: - condition: << parameters.build >> - steps: - - *step-maybe-generate-breakpad-symbols - - *step-maybe-zip-symbols - - - when: - condition: << parameters.build >> - steps: - - move_and_store_all_artifacts - - run: - name: Remove the big things on macOS, this seems to be better on average - command: | - if [ "`uname`" == "Darwin" ]; then - mkdir -p src/out/Default - cd src/out/Default - find . -type f -size +50M -delete - mkdir -p gen/electron - cd gen/electron - # These files do not seem to like being in a cache, let us remove them - find . -type f -name '*_pkg_info' -delete - fi - - when: - condition: << parameters.use-out-cache >> - steps: - - *step-save-out-cache - - - *step-maybe-notify-slack-failure - - electron-publish: - parameters: - attach: - type: boolean - default: false - checkout: - type: boolean - default: true - steps: - - when: - condition: << parameters.attach >> - steps: - - attach_workspace: - at: . - - when: - condition: << parameters.checkout >> - steps: - - *step-depot-tools-get - - *step-depot-tools-add-to-path - - *step-restore-brew-cache - - *step-get-more-space-on-mac - - when: - condition: << parameters.checkout >> - steps: - - *step-checkout-electron - - *step-touch-sync-done - - *step-maybe-restore-git-cache - - *step-set-git-cache-path - - *step-gclient-sync - - *step-delete-git-directories - - *step-minimize-workspace-size-from-checkout - - *step-fix-sync - - *step-setup-env-for-build - - *step-setup-goma-for-build - - *step-gn-gen-default - - # Electron app - - *step-electron-build - - *step-show-goma-stats - - *step-maybe-generate-breakpad-symbols - - *step-maybe-electron-dist-strip - - *step-electron-dist-build - - *step-maybe-zip-symbols - - # mksnapshot - - *step-mksnapshot-build - - # chromedriver - - *step-electron-chromedriver-build - - # Node.js headers - - *step-nodejs-headers-build - - # ffmpeg - - *step-ffmpeg-gn-gen - - *step-ffmpeg-build - - # hunspell - - *step-hunspell-build - - # libcxx - - *step-maybe-generate-libcxx - - # typescript defs - - *step-maybe-generate-typescript-defs - - # Publish - - *step-electron-publish - - move_and_store_all_artifacts - -# List of all jobs. +# List of always run jobs. jobs: - # Layer 0: Lint. Standalone. lint: executor: name: linux-docker @@ -1631,971 +128,18 @@ jobs: <<: *env-linux-medium <<: *steps-lint - ts-compile-doc-change: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-testing-build - <<: *steps-electron-ts-compile-for-doc-change - - # Layer 1: Checkout. - linux-checkout-for-workspace: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: false - build: false - checkout: true - persist-checkout: true - - linux-make-src-cache: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: false - build: false - checkout: true - save-git-cache: true - checkout-to-create-src-cache: true - - linux-checkout-for-native-tests: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_pyyaml=True' - steps: - - electron-build: - persist: false - build: false - checkout: true - persist-checkout: true - - linux-checkout-for-native-tests-with-no-patches: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - GCLIENT_EXTRA_ARGS: '--custom-var=apply_patches=False --custom-var=checkout_pyyaml=True' - steps: - - electron-build: - persist: false - build: false - checkout: true - persist-checkout: true - - mac-checkout: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - <<: *env-testing-build - <<: *env-macos-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' - steps: - - electron-build: - persist: false - build: false - checkout: true - persist-checkout: true - restore-src-cache: false - - mac-checkout-for-workspace: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - <<: *env-testing-build - <<: *env-macos-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' - steps: - - electron-build: - persist: false - build: false - checkout: true - persist-checkout: true - - mac-make-src-cache: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - <<: *env-testing-build - <<: *env-macos-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' - steps: - - electron-build: - persist: false - build: false - checkout: true - save-git-cache: true - checkout-to-create-src-cache: true - - # Layer 2: Builds. - linux-x64-testing: - executor: linux-docker - environment: - <<: *env-global - <<: *env-testing-build - <<: *env-ninja-status - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: true - checkout: true - use-out-cache: false - - linux-x64-testing-asan: - executor: linux-docker - environment: - <<: *env-global - <<: *env-testing-build - <<: *env-ninja-status - CHECK_DIST_MANIFEST: '0' - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - GN_EXTRA_ARGS: 'is_asan = true' - steps: - - electron-build: - persist: true - checkout: true - use-out-cache: false - build-nonproprietary-ffmpeg: false - - linux-x64-testing-no-run-as-node: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - <<: *env-testing-build - <<: *env-ninja-status - <<: *env-disable-run-as-node - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: false - checkout: true - use-out-cache: false - - linux-x64-testing-gn-check: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-testing-build - <<: *steps-electron-gn-check - - linux-x64-release: - executor: linux-docker - environment: - <<: *env-linux-2xlarge-release - <<: *env-release-build - <<: *env-send-slack-notifications - <<: *env-ninja-status - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: true - checkout: true - - linux-x64-publish: - executor: linux-docker - environment: - <<: *env-linux-2xlarge-release - <<: *env-release-build - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> - <<: *env-ninja-status - steps: - - run: echo running - - when: - condition: - or: - - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>] - - equal: ["x64", << pipeline.parameters.linux-publish-arch-limit >>] - steps: - - electron-publish: - attach: false - checkout: true - - linux-ia32-testing: - executor: linux-docker - environment: - <<: *env-global - <<: *env-ia32 - <<: *env-testing-build - <<: *env-ninja-status - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: true - checkout: true - use-out-cache: false - - linux-ia32-release: - executor: linux-docker - environment: - <<: *env-linux-2xlarge-release - <<: *env-ia32 - <<: *env-release-build - <<: *env-send-slack-notifications - <<: *env-ninja-status - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: true - checkout: true - - linux-ia32-publish: - executor: linux-docker - environment: - <<: *env-linux-2xlarge-release - <<: *env-ia32 - <<: *env-release-build - <<: *env-32bit-release - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> - <<: *env-ninja-status - steps: - - run: echo running - - when: - condition: - or: - - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>] - - equal: ["ia32", << pipeline.parameters.linux-publish-arch-limit >>] - steps: - - electron-publish: - attach: false - checkout: true - - linux-arm-testing: - executor: linux-docker - environment: - <<: *env-global - <<: *env-arm - <<: *env-testing-build - <<: *env-ninja-status - TRIGGER_ARM_TEST: true - GENERATE_CROSS_ARCH_SNAPSHOT: true - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: true - checkout: true - use-out-cache: false - - linux-arm-release: - executor: linux-docker - environment: - <<: *env-linux-2xlarge-release - <<: *env-arm - <<: *env-release-build - <<: *env-send-slack-notifications - <<: *env-ninja-status - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: false - checkout: true - - linux-arm-publish: - executor: linux-docker - environment: - <<: *env-linux-2xlarge-release - <<: *env-arm - <<: *env-release-build - <<: *env-32bit-release - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True' - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> - <<: *env-ninja-status - steps: - - run: echo running - - when: - condition: - or: - - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>] - - equal: ["arm", << pipeline.parameters.linux-publish-arch-limit >>] - steps: - - electron-publish: - attach: false - checkout: true - - linux-arm64-testing: - executor: linux-docker - environment: - <<: *env-global - <<: *env-arm64 - <<: *env-testing-build - <<: *env-ninja-status - TRIGGER_ARM_TEST: true - GENERATE_CROSS_ARCH_SNAPSHOT: true - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: true - checkout: true - use-out-cache: false - - linux-arm64-testing-gn-check: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-arm64 - <<: *env-testing-build - <<: *steps-electron-gn-check - - linux-arm64-release: - executor: linux-docker - environment: - <<: *env-linux-2xlarge-release - <<: *env-arm64 - <<: *env-release-build - <<: *env-send-slack-notifications - <<: *env-ninja-status - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: false - checkout: true - - linux-arm64-publish: - executor: linux-docker - environment: - <<: *env-linux-2xlarge-release - <<: *env-arm64 - <<: *env-release-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True' - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> - <<: *env-ninja-status - steps: - - run: echo running - - when: - condition: - or: - - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>] - - equal: ["arm64", << pipeline.parameters.linux-publish-arch-limit >>] - steps: - - electron-publish: - attach: false - checkout: true - - osx-testing-x64: - executor: macos - environment: - <<: *env-mac-large - <<: *env-testing-build - <<: *env-ninja-status - <<: *env-macos-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' - steps: - - electron-build: - persist: true - checkout: false - checkout-and-assume-cache: true - attach: true - - osx-testing-x64-gn-check: - executor: - name: macos - size: medium - environment: - <<: *env-machine-mac - <<: *env-testing-build - <<: *steps-electron-gn-check - - osx-publish-x64-skip-checkout: - executor: macos - environment: - <<: *env-mac-large-release - <<: *env-release-build - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> - <<: *env-ninja-status - steps: - - run: echo running - - when: - condition: - or: - - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>] - - equal: ["osx-x64", << pipeline.parameters.macos-publish-arch-limit >>] - steps: - - electron-publish: - attach: true - checkout: false - - osx-publish-arm64-skip-checkout: - executor: macos - environment: - <<: *env-mac-large-release - <<: *env-release-build - <<: *env-apple-silicon - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> - <<: *env-ninja-status - steps: - - run: echo running - - when: - condition: - or: - - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>] - - equal: ["osx-arm64", << pipeline.parameters.macos-publish-arch-limit >>] - steps: - - electron-publish: - attach: true - checkout: false - - osx-testing-arm64: - executor: macos - environment: - <<: *env-mac-large - <<: *env-testing-build - <<: *env-ninja-status - <<: *env-macos-build - <<: *env-apple-silicon - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' - GENERATE_CROSS_ARCH_SNAPSHOT: true - steps: - - electron-build: - persist: true - checkout: false - checkout-and-assume-cache: true - attach: true - - mas-testing-x64: - executor: macos - environment: - <<: *env-mac-large - <<: *env-mas - <<: *env-testing-build - <<: *env-ninja-status - <<: *env-macos-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' - steps: - - electron-build: - persist: true - checkout: false - checkout-and-assume-cache: true - attach: true - - mas-testing-x64-gn-check: - executor: - name: macos - size: medium - environment: - <<: *env-machine-mac - <<: *env-mas - <<: *env-testing-build - <<: *steps-electron-gn-check - - mas-publish-x64-skip-checkout: - executor: macos - environment: - <<: *env-mac-large-release - <<: *env-mas - <<: *env-release-build - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> - steps: - - run: echo running - - when: - condition: - or: - - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>] - - equal: ["mas-x64", << pipeline.parameters.macos-publish-arch-limit >>] - steps: - - electron-publish: - attach: true - checkout: false - - mas-publish-arm64-skip-checkout: - executor: macos - environment: - <<: *env-mac-large-release - <<: *env-mas-apple-silicon - <<: *env-release-build - UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >> - <<: *env-ninja-status - steps: - - run: echo running - - when: - condition: - or: - - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>] - - equal: ["mas-arm64", << pipeline.parameters.macos-publish-arch-limit >>] - steps: - - electron-publish: - attach: true - checkout: false - - mas-testing-arm64: - executor: macos - environment: - <<: *env-mac-large - <<: *env-testing-build - <<: *env-ninja-status - <<: *env-macos-build - <<: *env-mas-apple-silicon - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' - GENERATE_CROSS_ARCH_SNAPSHOT: true - steps: - - electron-build: - persist: true - checkout: false - checkout-and-assume-cache: true - attach: true - - # Layer 3: Tests. - linux-x64-unittests: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - <<: *env-unittests - <<: *env-headless-testing - <<: *steps-native-tests - - linux-x64-disabled-unittests: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - <<: *env-unittests - <<: *env-headless-testing - TESTS_ARGS: '--only-disabled-tests' - <<: *steps-native-tests - - linux-x64-chromium-unittests: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - <<: *env-unittests - <<: *env-headless-testing - TESTS_ARGS: '--include-disabled-tests' - <<: *steps-native-tests - - linux-x64-browsertests: - executor: linux-docker - environment: - <<: *env-linux-2xlarge - <<: *env-browsertests - <<: *env-testing-build - <<: *env-headless-testing - <<: *steps-native-tests - - linux-x64-testing-tests: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-stack-dumping - parallelism: 3 - <<: *steps-tests - - linux-x64-testing-asan-tests: - executor: - name: linux-docker - size: xlarge - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-stack-dumping - IS_ASAN: '1' - DISABLE_CRASH_REPORTER_TESTS: '1' - parallelism: 3 - <<: *steps-tests - - linux-x64-testing-nan: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-stack-dumping - <<: *steps-test-nan - - linux-x64-testing-node: - executor: linux-docker - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-stack-dumping - <<: *steps-test-node - - linux-x64-release-tests: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-send-slack-notifications - <<: *steps-tests - - linux-x64-verify-ffmpeg: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-send-slack-notifications - <<: *steps-verify-ffmpeg - - linux-ia32-testing-tests: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-ia32 - <<: *env-headless-testing - <<: *env-stack-dumping - parallelism: 3 - <<: *steps-tests - - linux-ia32-testing-nan: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-ia32 - <<: *env-headless-testing - <<: *env-stack-dumping - <<: *steps-test-nan - - linux-ia32-testing-node: - executor: linux-docker - environment: - <<: *env-linux-medium - <<: *env-ia32 - <<: *env-headless-testing - <<: *env-stack-dumping - <<: *steps-test-node - - linux-ia32-release-tests: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-ia32 - <<: *env-headless-testing - <<: *env-send-slack-notifications - <<: *steps-tests - - linux-ia32-verify-ffmpeg: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-ia32 - <<: *env-headless-testing - <<: *env-send-slack-notifications - <<: *steps-verify-ffmpeg - - linux-arm-testing-tests: - executor: linux-arm - environment: - <<: *env-arm - <<: *env-global - <<: *env-headless-testing - <<: *env-stack-dumping - <<: *steps-tests - - linux-arm64-testing-tests: - executor: linux-arm64 - environment: - <<: *env-arm64 - <<: *env-global - <<: *env-headless-testing - <<: *env-stack-dumping - <<: *steps-tests - - osx-testing-x64-tests: - executor: - name: macos - size: medium - environment: - <<: *env-mac-large - <<: *env-stack-dumping - parallelism: 2 - <<: *steps-tests - - osx-testing-arm64-tests: - executor: apple-silicon - environment: - <<: *env-mac-large - <<: *env-stack-dumping - <<: *env-apple-silicon - <<: *steps-tests - - mas-testing-x64-tests: - executor: - name: macos - size: medium - environment: - <<: *env-mac-large - <<: *env-stack-dumping - parallelism: 2 - <<: *steps-tests - - mas-testing-arm64-tests: - executor: apple-silicon - environment: - <<: *env-mac-large - <<: *env-stack-dumping - <<: *env-apple-silicon - <<: *steps-tests - - # Layer 4: Summary. - linux-release-summary: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-send-slack-notifications - steps: - - *step-maybe-notify-slack-success - +# Initial setup workflow workflows: - version: 2.1 - - publish-linux: - when: << pipeline.parameters.run-linux-publish >> - jobs: - - linux-x64-publish: - context: release-env - - linux-ia32-publish: - context: release-env - - linux-arm-publish: - context: release-env - - linux-arm64-publish: - context: release-env - - publish-macos: - when: << pipeline.parameters.run-macos-publish >> - jobs: - - mac-checkout - - osx-publish-x64-skip-checkout: - requires: - - mac-checkout - context: release-env - - mas-publish-x64-skip-checkout: - requires: - - mac-checkout - context: release-env - - osx-publish-arm64-skip-checkout: - requires: - - mac-checkout - context: release-env - - mas-publish-arm64-skip-checkout: - requires: - - mac-checkout - context: release-env - lint: - when: << pipeline.parameters.run-lint >> jobs: + # Job inherited from path-filtering orb + - path-filtering/filter: + base-revision: main + # Params for mapping; `path-to-test parameter-to-set value-for-parameter` for each row + mapping: | + ^((?!docs/).)*$ run-build-mac true + ^((?!docs/).)*$ run-build-linux true + docs/.* run-docs-only true + ^((?!docs/).)*$ run-docs-only false + config-path: .circleci/build_config.yml - lint - - build-linux: - when: << pipeline.parameters.run-build-linux >> - jobs: - - linux-checkout-for-workspace - - linux-make-src-cache - - - linux-x64-testing - - linux-x64-testing-asan - - linux-x64-testing-no-run-as-node - - linux-x64-testing-gn-check: - requires: - - linux-checkout-for-workspace - - linux-x64-testing-tests: - requires: - - linux-x64-testing - - linux-x64-testing-asan-tests: - requires: - - linux-x64-testing-asan - - linux-x64-testing-nan: - requires: - - linux-x64-testing - - linux-x64-testing-node: - requires: - - linux-x64-testing - - - linux-ia32-testing - - linux-ia32-testing-tests: - requires: - - linux-ia32-testing - - linux-ia32-testing-nan: - requires: - - linux-ia32-testing - - linux-ia32-testing-node: - requires: - - linux-ia32-testing - - - linux-arm-testing - - linux-arm-testing-tests: - filters: - branches: - # Do not run this on forked pull requests - ignore: /pull\/[0-9]+/ - requires: - - linux-arm-testing - - - linux-arm64-testing - - linux-arm64-testing-tests: - filters: - branches: - # Do not run this on forked pull requests - ignore: /pull\/[0-9]+/ - requires: - - linux-arm64-testing - - - linux-arm64-testing-gn-check: - requires: - - linux-checkout-for-workspace - - ts-compile-doc-change - - build-mac: - when: << pipeline.parameters.run-build-mac >> - jobs: - - mac-checkout-for-workspace - - mac-make-src-cache - - - osx-testing-x64: - requires: - - mac-make-src-cache - - - osx-testing-x64-gn-check: - requires: - - mac-checkout-for-workspace - - - osx-testing-x64-tests: - requires: - - osx-testing-x64 - - - osx-testing-arm64: - requires: - - mac-make-src-cache - - - osx-testing-arm64-tests: - filters: - branches: - # Do not run this on forked pull requests - ignore: /pull\/[0-9]+/ - requires: - - osx-testing-arm64 - - - mas-testing-x64: - requires: - - mac-make-src-cache - - - mas-testing-x64-gn-check: - requires: - - mac-checkout-for-workspace - - - mas-testing-x64-tests: - requires: - - mas-testing-x64 - - - mas-testing-arm64: - requires: - - mac-make-src-cache - - - mas-testing-arm64-tests: - filters: - branches: - # Do not run this on forked pull requests - ignore: /pull\/[0-9]+/ - requires: - - mas-testing-arm64 - - nightly-linux-release-test: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - master - jobs: - - linux-checkout-for-workspace - - linux-make-src-cache - - - linux-x64-release - - linux-x64-release-tests: - requires: - - linux-x64-release - - linux-x64-verify-ffmpeg: - requires: - - linux-x64-release - - linux-release-summary: - name: linux-x64-release-summary - requires: - - linux-x64-release - - linux-x64-release-tests - - linux-x64-verify-ffmpeg - - - linux-ia32-release - - linux-ia32-release-tests: - requires: - - linux-ia32-release - - linux-ia32-verify-ffmpeg: - requires: - - linux-ia32-release - - linux-release-summary: - name: linux-ia32-release-summary - requires: - - linux-ia32-release - - linux-ia32-release-tests - - linux-ia32-verify-ffmpeg - - - linux-arm-release - - linux-release-summary: - name: linux-arm-release-summary - requires: - - linux-arm-release - - - linux-arm64-release - - linux-release-summary: - name: linux-arm64-release-summary - requires: - - linux-arm64-release - - # Various slow and non-essential checks we run only nightly. - # Sanitizer jobs should be added here. - linux-checks-nightly: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - master - jobs: - - linux-checkout-for-native-tests - - # TODO(alexeykuzmin): Enable it back. - # Tons of crashes right now, see - # https://circleci.com/gh/electron/electron/67463 -# - linux-x64-browsertests: -# requires: -# - linux-checkout-for-native-tests - - - linux-x64-unittests: - requires: - - linux-checkout-for-native-tests - - - linux-x64-disabled-unittests: - requires: - - linux-checkout-for-native-tests - - - linux-checkout-for-native-tests-with-no-patches - - - linux-x64-chromium-unittests: - requires: - - linux-checkout-for-native-tests-with-no-patches diff --git a/script/release/ci-release-build.js b/script/release/ci-release-build.js index 278f2e5c70b7c..063f09594baf8 100644 --- a/script/release/ci-release-build.js +++ b/script/release/ci-release-build.js @@ -59,11 +59,7 @@ async function circleCIcall (targetBranch, workflowName, options) { console.log(`Triggering CircleCI to run build job: ${workflowName} on branch: ${targetBranch} with release flag.`); const buildRequest = { branch: targetBranch, - parameters: { - 'run-lint': false, - 'run-build-linux': false, - 'run-build-mac': false - } + parameters: {} }; if (options.ghRelease) { buildRequest.parameters['upload-to-s3'] = '0'; From 395b43b2937b0147606abb1e27a27cdf27167a87 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 30 Nov 2021 05:00:57 -0800 Subject: [PATCH 026/268] Bump v18.0.0-nightly.20211130 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 29b7daf145ed1..03992f1167ffd 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211129 \ No newline at end of file +18.0.0-nightly.20211130 \ No newline at end of file diff --git a/package.json b/package.json index 514ac88dc186e..e1b9738f44f49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211129", + "version": "18.0.0-nightly.20211130", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 36c264a5de006..a4c06c77fed36 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211129 - PRODUCTVERSION 18,0,0,20211129 + FILEVERSION 18,0,0,20211130 + PRODUCTVERSION 18,0,0,20211130 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 3278ff6a05169436a63983ed401a474652ef00e6 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 30 Nov 2021 09:16:09 -0800 Subject: [PATCH 027/268] Revert "Bump v18.0.0-nightly.20211130" This reverts commit 395b43b2937b0147606abb1e27a27cdf27167a87. --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 03992f1167ffd..29b7daf145ed1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211130 \ No newline at end of file +18.0.0-nightly.20211129 \ No newline at end of file diff --git a/package.json b/package.json index e1b9738f44f49..514ac88dc186e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211130", + "version": "18.0.0-nightly.20211129", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index a4c06c77fed36..36c264a5de006 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211130 - PRODUCTVERSION 18,0,0,20211130 + FILEVERSION 18,0,0,20211129 + PRODUCTVERSION 18,0,0,20211129 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 83a4b234d72b3e25ffda3ff192d5c4273bd47cbf Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Tue, 30 Nov 2021 09:17:04 -0800 Subject: [PATCH 028/268] build: account for path-filtering workflow in release-build script (#32063) * build: account for path-filtering workflow in release-build script * build: update syntax for workflow id Co-authored-by: John Kleinschmidt Co-authored-by: John Kleinschmidt --- script/release/ci-release-build.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/release/ci-release-build.js b/script/release/ci-release-build.js index 063f09594baf8..86189ba6a292d 100644 --- a/script/release/ci-release-build.js +++ b/script/release/ci-release-build.js @@ -110,8 +110,9 @@ async function getCircleCIWorkflowId (pipelineId) { switch (pipelineInfo.state) { case 'created': { const workflows = await circleCIRequest(`${pipelineInfoUrl}/workflow`, 'GET'); - if (workflows.items.length === 1) { - workflowId = workflows.items[0].id; + // The logic below expects two workflow.items: publish [0] & setup [1] + if (workflows.items.length === 2) { + workflowId = workflows.items.find(item => item.name.includes('publish')).id; break; } console.log('Unxpected number of workflows, response was:', pipelineInfo); From 90410e0419d71d854e5982a219fa6789765980a7 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 30 Nov 2021 09:18:59 -0800 Subject: [PATCH 029/268] Bump v18.0.0-nightly.20211130 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 29b7daf145ed1..03992f1167ffd 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211129 \ No newline at end of file +18.0.0-nightly.20211130 \ No newline at end of file diff --git a/package.json b/package.json index 514ac88dc186e..e1b9738f44f49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211129", + "version": "18.0.0-nightly.20211130", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 36c264a5de006..a4c06c77fed36 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211129 - PRODUCTVERSION 18,0,0,20211129 + FILEVERSION 18,0,0,20211130 + PRODUCTVERSION 18,0,0,20211130 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From ab92455fc8568a2c8287cc9c252e888c72c0ba21 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 30 Nov 2021 09:49:21 -0800 Subject: [PATCH 030/268] Revert "Bump v18.0.0-nightly.20211130" This reverts commit 90410e0419d71d854e5982a219fa6789765980a7. --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 03992f1167ffd..29b7daf145ed1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211130 \ No newline at end of file +18.0.0-nightly.20211129 \ No newline at end of file diff --git a/package.json b/package.json index e1b9738f44f49..514ac88dc186e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211130", + "version": "18.0.0-nightly.20211129", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index a4c06c77fed36..36c264a5de006 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211130 - PRODUCTVERSION 18,0,0,20211130 + FILEVERSION 18,0,0,20211129 + PRODUCTVERSION 18,0,0,20211129 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 3d34fd7c916f82f10ad2c24d486f427549b12ab2 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 30 Nov 2021 11:14:36 -0800 Subject: [PATCH 031/268] Bump v18.0.0-nightly.20211130 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 29b7daf145ed1..03992f1167ffd 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211129 \ No newline at end of file +18.0.0-nightly.20211130 \ No newline at end of file diff --git a/package.json b/package.json index 514ac88dc186e..e1b9738f44f49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211129", + "version": "18.0.0-nightly.20211130", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 36c264a5de006..a4c06c77fed36 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211129 - PRODUCTVERSION 18,0,0,20211129 + FILEVERSION 18,0,0,20211130 + PRODUCTVERSION 18,0,0,20211130 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From bc8cfbac59c98062fad7549703f7aa51ab907e3f Mon Sep 17 00:00:00 2001 From: Black-Hole <158blackhole@gmail.com> Date: Wed, 1 Dec 2021 05:40:58 +0800 Subject: [PATCH 032/268] docs: add debug build (#31979) * docs: add debug build * docs: move debug config document to debugging.md * fix: debug.gn import failed * docs: modify debug.gn folder on doc * docs: imporve gn import path --- docs/development/debugging.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/development/debugging.md b/docs/development/debugging.md index 4c6cc27b065f9..775a31199b95e 100644 --- a/docs/development/debugging.md +++ b/docs/development/debugging.md @@ -35,6 +35,28 @@ base::debug::StackTrace().Print(); This will allow you to observe call chains and identify potential issue areas. +## Breakpoint Debugging + +> Note that this will increase the size of the build significantly, taking up around 50G of disk space + +Write the following file to `electron/.git/info/exclude/debug.gn` + +```gn +import("//electron/build/args/testing.gn") +is_debug = true +symbol_level = 2 +forbid_non_component_debug_builds = false +``` + +Then execute: + +```sh +$ gn gen out/Debug --args="import(\"//electron/.git/info/exclude/debug.gn\") $GN_EXTRA_ARGS" +$ ninja -C out/Debug electron +``` + +Now you can use `LLDB` for breakpoint debugging. + ## Platform-Specific Debugging From ed7f9ad5c27dc54867bc0388ba3e04d196705578 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 1 Dec 2021 12:12:39 +1300 Subject: [PATCH 033/268] fix: avoid double call in OnRefreshComplete on aura platforms (#32052) --- patches/chromium/desktop_media_list.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 905f210b05366..0af807197c43e 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -5,6 +5,7 @@ Subject: desktop_media_list.patch * Use our grit resources instead of the chrome ones. * Disabled WindowCaptureMacV2 feature for https://github.com/electron/electron/pull/30507 +* Ensure "OnRefreshComplete()" even if there are no items in the list diff --git a/chrome/browser/media/webrtc/desktop_media_list.h b/chrome/browser/media/webrtc/desktop_media_list.h index 57cfc646f8ea545271c22d79ec158a04b148bc9c..db4d608d3bed841ddf7225d0918e82112c8d08b5 100644 @@ -52,7 +53,7 @@ index 98cc4e039ba2b5a467175b15650a7b8ef38e8249..f5aea6a5916b9aa56ee7b81a8de97dc4 const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index f777d8e6aa8a36d273a1a23f5e71390fad7e434f..68aa85a344168bcd74f4e9d1f7538934e980eba7 100644 +index f777d8e6aa8a36d273a1a23f5e71390fad7e434f..c59706f0e244afa9408a5bfeaf5a51ad10c1f885 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc @@ -16,7 +16,7 @@ @@ -75,12 +76,15 @@ index f777d8e6aa8a36d273a1a23f5e71390fad7e434f..68aa85a344168bcd74f4e9d1f7538934 #endif } // namespace -@@ -427,6 +428,8 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( +@@ -427,6 +428,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails, base::Unretained(worker_.get()), std::move(native_ids), thumbnail_size_)); + } else { -+ OnRefreshComplete(); ++#if defined(USE_AURA) ++ pending_native_thumbnail_capture_ = true; ++#endif ++ UpdateNativeThumbnailsFinished(); } } From cce427dc465239dfdce76d1d5b8efdfd302483e5 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 1 Dec 2021 05:00:57 -0800 Subject: [PATCH 034/268] Bump v18.0.0-nightly.20211201 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 03992f1167ffd..fe01c16117dd7 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211130 \ No newline at end of file +18.0.0-nightly.20211201 \ No newline at end of file diff --git a/package.json b/package.json index e1b9738f44f49..806d4509f3345 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211130", + "version": "18.0.0-nightly.20211201", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index a4c06c77fed36..d61a3d159f76b 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211130 - PRODUCTVERSION 18,0,0,20211130 + FILEVERSION 18,0,0,20211201 + PRODUCTVERSION 18,0,0,20211201 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From eabfd6c1b9000f1178e4d363443e043103e9f520 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Wed, 1 Dec 2021 22:19:36 -0600 Subject: [PATCH 035/268] fix: gtk_native_dialog_run() calls show() internally (#32049) In the synchronous code path, gtk_native_dialog_run() will call gtk_native_dialog_show(). Previously this was causing an assertion to be hit at run time. --- shell/browser/ui/file_dialog_gtk.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shell/browser/ui/file_dialog_gtk.cc b/shell/browser/ui/file_dialog_gtk.cc index 06af5030a1c25..26b59f935acaa 100644 --- a/shell/browser/ui/file_dialog_gtk.cc +++ b/shell/browser/ui/file_dialog_gtk.cc @@ -412,9 +412,8 @@ void FileChooserDialog::OnUpdatePreview(GtkFileChooser* chooser) { } // namespace void ShowFileDialog(const FileChooserDialog& dialog) { - if (*supports_gtk_file_chooser_native) { - dl_gtk_native_dialog_show(static_cast(dialog.dialog())); - } else { + // gtk_native_dialog_run() will call gtk_native_dialog_show() for us. + if (!*supports_gtk_file_chooser_native) { gtk_widget_show_all(GTK_WIDGET(dialog.dialog())); } } From 0c5b01f5f61f2c4cd0da43d558e1edb093e6e078 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 05:05:03 -0800 Subject: [PATCH 036/268] Bump v18.0.0-nightly.20211202 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index fe01c16117dd7..38bad1b1194d4 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211201 \ No newline at end of file +18.0.0-nightly.20211202 \ No newline at end of file diff --git a/package.json b/package.json index 806d4509f3345..aaa7dade4a339 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211201", + "version": "18.0.0-nightly.20211202", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index d61a3d159f76b..a74d9eb5caa0e 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211201 - PRODUCTVERSION 18,0,0,20211201 + FILEVERSION 18,0,0,20211202 + PRODUCTVERSION 18,0,0,20211202 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f3df76dbdc58cb704637b89357e1400791c92cfe Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 3 Dec 2021 05:02:32 -0800 Subject: [PATCH 037/268] Bump v18.0.0-nightly.20211203 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 38bad1b1194d4..85c55fe5c4864 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211202 \ No newline at end of file +18.0.0-nightly.20211203 \ No newline at end of file diff --git a/package.json b/package.json index aaa7dade4a339..ecdedb8ac9869 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211202", + "version": "18.0.0-nightly.20211203", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index a74d9eb5caa0e..a071b14eaef97 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211202 - PRODUCTVERSION 18,0,0,20211202 + FILEVERSION 18,0,0,20211203 + PRODUCTVERSION 18,0,0,20211203 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f46e9c320535d24c34047d0ba4a9cdf9246c6363 Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Mon, 6 Dec 2021 10:28:41 +0800 Subject: [PATCH 038/268] docs: change China mirror domain to npmmirror.com (#32076) --- README.md | 2 +- docs/tutorial/installation.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fe13fee42f5c8..f0af41e5940b3 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ const child = proc.spawn(electron) ### Mirrors -- [China](https://npm.taobao.org/mirrors/electron) +- [China](https://npmmirror.com/mirrors/electron) ## Documentation Translations diff --git a/docs/tutorial/installation.md b/docs/tutorial/installation.md index b3cab195ad3ee..eda9ec3aa1754 100644 --- a/docs/tutorial/installation.md +++ b/docs/tutorial/installation.md @@ -73,7 +73,7 @@ url = ELECTRON_MIRROR + ELECTRON_CUSTOM_DIR + '/' + ELECTRON_CUSTOM_FILENAME For instance, to use the China CDN mirror: ```shell -ELECTRON_MIRROR="https://cdn.npm.taobao.org/dist/electron/" +ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" ``` By default, `ELECTRON_CUSTOM_DIR` is set to `v$VERSION`. To change the format, @@ -83,12 +83,12 @@ resolves to `version-5.0.0`, `{{ version }}` resolves to `5.0.0`, and use the China non-CDN mirror: ```shell -ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/" +ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" ELECTRON_CUSTOM_DIR="{{ version }}" ``` The above configuration will download from URLs such as -`https://npm.taobao.org/mirrors/electron/8.0.0/electron-v8.0.0-linux-x64.zip`. +`https://npmmirror.com/mirrors/electron/8.0.0/electron-v8.0.0-linux-x64.zip`. If your mirror serves artifacts with different checksums to the official Electron release you may have to set `ELECTRON_USE_REMOTE_CHECKSUMS=1` to From 77287febf43e86c086ab49029b7e4b94b844a0d9 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 6 Dec 2021 03:44:41 +0100 Subject: [PATCH 039/268] refactor: use process type specific electron imports in default_app (#32097) --- default_app/default_app.ts | 3 ++- default_app/main.ts | 2 +- default_app/preload.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/default_app/default_app.ts b/default_app/default_app.ts index 5e52422f1f304..44bc2ebd9affc 100644 --- a/default_app/default_app.ts +++ b/default_app/default_app.ts @@ -1,4 +1,5 @@ -import { app, dialog, BrowserWindow, shell, ipcMain } from 'electron'; +import { shell } from 'electron/common'; +import { app, dialog, BrowserWindow, ipcMain } from 'electron/main'; import * as path from 'path'; import * as url from 'url'; diff --git a/default_app/main.ts b/default_app/main.ts index c1b309170c82a..38172b788279b 100644 --- a/default_app/main.ts +++ b/default_app/main.ts @@ -1,4 +1,4 @@ -import * as electron from 'electron'; +import * as electron from 'electron/main'; import * as fs from 'fs'; import * as path from 'path'; diff --git a/default_app/preload.ts b/default_app/preload.ts index c446398912aa2..aedaa6e6b7aed 100644 --- a/default_app/preload.ts +++ b/default_app/preload.ts @@ -1,4 +1,4 @@ -import { ipcRenderer, contextBridge } from 'electron'; +import { ipcRenderer, contextBridge } from 'electron/renderer'; const policy = window.trustedTypes.createPolicy('electron-default-app', { // we trust the SVG contents From 35ac7fb8e61be744206918684a6881d460591620 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 6 Dec 2021 12:54:14 +0900 Subject: [PATCH 040/268] fix: window.open not overriding parent's webPreferences (#32057) * fix: window.open not overriding parent's webPreferences * test: remove "nativeWindowOpen: false" from renderer tests --- docs/api/window-open.md | 3 ++ lib/browser/api/web-contents.ts | 26 +++++------ lib/browser/guest-window-manager.ts | 4 ++ shell/renderer/api/electron_api_web_frame.cc | 8 ++++ .../electron_render_frame_observer.cc | 46 +++++++++++++++++++ .../renderer/electron_render_frame_observer.h | 1 + shell/renderer/electron_renderer_client.cc | 1 + shell/renderer/web_worker_observer.cc | 2 + spec-main/chromium-spec.ts | 11 +++++ .../setimmediate-window-open-crash/index.html | 16 +++---- spec/chromium-spec.js | 10 ---- spec/static/main.js | 3 +- 12 files changed, 98 insertions(+), 33 deletions(-) diff --git a/docs/api/window-open.md b/docs/api/window-open.md index 5d5667cec0c66..de931c078c962 100644 --- a/docs/api/window-open.md +++ b/docs/api/window-open.md @@ -64,6 +64,9 @@ window.open('https://github.com', '_blank', 'top=500,left=200,frame=false,nodeIn `features` will be passed to any registered `webContents`'s `did-create-window` event handler in the `options` argument. * `frameName` follows the specification of `windowName` located in the [native documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#parameters). +* When opening `about:blank`, the child window's `WebPreferences` will be copied + from the parent window, and there is no way to override it because Chromium + skips browser side navigation in this case. To customize or cancel the creation of the window, you can optionally set an override handler with `webContents.setWindowOpenHandler()` from the main diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 959e16eb38205..e0336ccf62885 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -680,16 +680,6 @@ WebContents.prototype._init = function () { postBody }; windowOpenOverriddenOptions = this._callWindowOpenHandler(event, details); - // if attempting to use this API with the deprecated new-window event, - // windowOpenOverriddenOptions will always return null. This ensures - // short-term backwards compatibility until new-window is removed. - const parsedFeatures = parseFeatures(rawFeatures); - const overriddenFeatures: BrowserWindowConstructorOptions = { - ...parsedFeatures.options, - webPreferences: parsedFeatures.webPreferences - }; - windowOpenOverriddenOptions = windowOpenOverriddenOptions || overriddenFeatures; - if (!event.defaultPrevented) { const secureOverrideWebPreferences = windowOpenOverriddenOptions ? { // Allow setting of backgroundColor as a webPreference even though @@ -699,9 +689,19 @@ WebContents.prototype._init = function () { transparent: windowOpenOverriddenOptions.transparent, ...windowOpenOverriddenOptions.webPreferences } : undefined; - this._setNextChildWebPreferences( - makeWebPreferences({ embedder: event.sender, secureOverrideWebPreferences }) - ); + // TODO(zcbenz): The features string is parsed twice: here where it is + // passed to C++, and in |makeBrowserWindowOptions| later where it is + // not actually used since the WebContents is created here. + // We should be able to remove the latter once the |nativeWindowOpen| + // option is removed. + const { webPreferences: parsedWebPreferences } = parseFeatures(rawFeatures); + // Parameters should keep same with |makeBrowserWindowOptions|. + const webPreferences = makeWebPreferences({ + embedder: event.sender, + insecureParsedWebPreferences: parsedWebPreferences, + secureOverrideWebPreferences + }); + this._setNextChildWebPreferences(webPreferences); } }); diff --git a/lib/browser/guest-window-manager.ts b/lib/browser/guest-window-manager.ts index 08b2ecbc92137..980cc705912eb 100644 --- a/lib/browser/guest-window-manager.ts +++ b/lib/browser/guest-window-manager.ts @@ -217,6 +217,10 @@ function makeBrowserWindowOptions ({ embedder, features, overrideOptions }: { height: 600, ...parsedOptions, ...overrideOptions, + // Note that for |nativeWindowOpen: true| the WebContents is created in + // |api::WebContents::WebContentsCreatedWithFullParams|, with prefs + // parsed in the |-will-add-new-contents| event. + // The |webPreferences| here is only used by |nativeWindowOpen: false|. webPreferences: makeWebPreferences({ embedder, insecureParsedWebPreferences: parsedWebPreferences, diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index d0f7b79479b25..a114d3a8470a6 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -500,6 +500,14 @@ class WebFrameRenderer : public gin::Wrappable, // NOTE: openerId is internal-only. return gin::ConvertToV8(isolate, prefs.opener_id); } else if (pref_name == "isWebView") { + // FIXME(zcbenz): For child windows opened with window.open('') from + // webview, the WebPreferences is inherited from webview and the value + // of |is_webview| is wrong. + // Please check ElectronRenderFrameObserver::DidInstallConditionalFeatures + // for the background. + auto* web_frame = render_frame->GetWebFrame(); + if (web_frame->Opener()) + return gin::ConvertToV8(isolate, false); return gin::ConvertToV8(isolate, prefs.is_webview); } else if (pref_name == options::kHiddenPage) { // NOTE: hiddenPage is internal-only. diff --git a/shell/renderer/electron_render_frame_observer.cc b/shell/renderer/electron_render_frame_observer.cc index 0f10e16fed207..4947ac06f6559 100644 --- a/shell/renderer/electron_render_frame_observer.cc +++ b/shell/renderer/electron_render_frame_observer.cc @@ -31,6 +31,7 @@ #include "third_party/blink/public/web/web_element.h" #include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_script_source.h" +#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h" // nogncheck #include "ui/base/resource/resource_bundle.h" namespace electron { @@ -58,12 +59,57 @@ ElectronRenderFrameObserver::ElectronRenderFrameObserver( } void ElectronRenderFrameObserver::DidClearWindowObject() { + // Do a delayed Node.js initialization for child window. + // Check DidInstallConditionalFeatures below for the background. + auto* web_frame = + static_cast(render_frame_->GetWebFrame()); + if (has_delayed_node_initialization_ && web_frame->Opener() && + !web_frame->IsOnInitialEmptyDocument()) { + v8::Isolate* isolate = blink::MainThreadIsolate(); + v8::HandleScope handle_scope(isolate); + v8::MicrotasksScope microtasks_scope( + isolate, v8::MicrotasksScope::kDoNotRunMicrotasks); + v8::Handle context = web_frame->MainWorldScriptContext(); + v8::Context::Scope context_scope(context); + // DidClearWindowObject only emits for the main world. + DidInstallConditionalFeatures(context, MAIN_WORLD_ID); + } + renderer_client_->DidClearWindowObject(render_frame_); } void ElectronRenderFrameObserver::DidInstallConditionalFeatures( v8::Handle context, int world_id) { + // When a child window is created with window.open, its WebPreferences will + // be copied from its parent, and Chromium will intialize JS context in it + // immediately. + // Normally the WebPreferences is overriden in browser before navigation, + // but this behavior bypasses the browser side navigation and the child + // window will get wrong WebPreferences in the initialization. + // This will end up initializing Node.js in the child window with wrong + // WebPreferences, leads to problem that child window having node integration + // while "nodeIntegration=no" is passed. + // We work around this issue by delaying the child window's initialization of + // Node.js if this is the initial empty document, and only do it when the + // acutal page has started to load. + auto* web_frame = + static_cast(render_frame_->GetWebFrame()); + if (web_frame->Opener() && web_frame->IsOnInitialEmptyDocument()) { + // FIXME(zcbenz): Chromium does not do any browser side navigation for + // window.open('about:blank'), so there is no way to override WebPreferences + // of it. We should not delay Node.js initialization as there will be no + // further loadings. + // Please check http://crbug.com/1215096 for updates which may help remove + // this hack. + GURL url = web_frame->GetDocument().Url(); + if (!url.IsAboutBlank()) { + has_delayed_node_initialization_ = true; + return; + } + } + has_delayed_node_initialization_ = false; + auto* isolate = context->GetIsolate(); v8::MicrotasksScope microtasks_scope( isolate, v8::MicrotasksScope::kDoNotRunMicrotasks); diff --git a/shell/renderer/electron_render_frame_observer.h b/shell/renderer/electron_render_frame_observer.h index bbfd4970489c6..b7a3718172ac7 100644 --- a/shell/renderer/electron_render_frame_observer.h +++ b/shell/renderer/electron_render_frame_observer.h @@ -44,6 +44,7 @@ class ElectronRenderFrameObserver : public content::RenderFrameObserver { void OnTakeHeapSnapshot(IPC::PlatformFileForTransit file_handle, const std::string& channel); + bool has_delayed_node_initialization_ = false; content::RenderFrame* render_frame_; RendererClientBase* renderer_client_; }; diff --git a/shell/renderer/electron_renderer_client.cc b/shell/renderer/electron_renderer_client.cc index a7a98839fb54e..c507bdcffccbb 100644 --- a/shell/renderer/electron_renderer_client.cc +++ b/shell/renderer/electron_renderer_client.cc @@ -157,6 +157,7 @@ void ElectronRendererClient::WillReleaseScriptContext( // We also do this if we have disable electron site instance overrides to // avoid memory leaks auto prefs = render_frame->GetBlinkPreferences(); + gin_helper::MicrotasksScope microtasks_scope(env->isolate()); node::FreeEnvironment(env); if (env == node_bindings_->uv_env()) node::FreeIsolateData(node_bindings_->isolate_data()); diff --git a/shell/renderer/web_worker_observer.cc b/shell/renderer/web_worker_observer.cc index 2faec5ffc4347..287be9ead13f0 100644 --- a/shell/renderer/web_worker_observer.cc +++ b/shell/renderer/web_worker_observer.cc @@ -37,6 +37,8 @@ WebWorkerObserver::WebWorkerObserver() WebWorkerObserver::~WebWorkerObserver() { lazy_tls.Pointer()->Set(nullptr); + gin_helper::MicrotasksScope microtasks_scope( + node_bindings_->uv_env()->isolate()); node::FreeEnvironment(node_bindings_->uv_env()); node::FreeIsolateData(node_bindings_->isolate_data()); } diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index b6e4546ffb94b..951c158fb969b 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -814,6 +814,17 @@ describe('chromium features', () => { expect(typeofProcessGlobal).to.equal('undefined'); }); + it('can disable node integration when it is enabled on the parent window with nativeWindowOpen: true', async () => { + const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, nativeWindowOpen: true } }); + w.loadURL('about:blank'); + w.webContents.executeJavaScript(` + { b = window.open('about:blank', '', 'nodeIntegration=no,show=no'); null } + `); + const [, contents] = await emittedOnce(app, 'web-contents-created'); + const typeofProcessGlobal = await contents.executeJavaScript('typeof process'); + expect(typeofProcessGlobal).to.equal('undefined'); + }); + it('disables JavaScript when it is disabled on the parent window', async () => { const w = new BrowserWindow({ show: true, webPreferences: { nodeIntegration: true } }); w.webContents.loadFile(path.resolve(__dirname, 'fixtures', 'blank.html')); diff --git a/spec-main/fixtures/crash-cases/setimmediate-window-open-crash/index.html b/spec-main/fixtures/crash-cases/setimmediate-window-open-crash/index.html index 9bb131aef4548..f0c803fc08c8e 100644 --- a/spec-main/fixtures/crash-cases/setimmediate-window-open-crash/index.html +++ b/spec-main/fixtures/crash-cases/setimmediate-window-open-crash/index.html @@ -1,10 +1,12 @@ diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 26e43b12ae749..86737f78860a1 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -154,16 +154,6 @@ describe('chromium feature', () => { }); }); - describe('window.postMessage', () => { - it('throws an exception when the targetOrigin cannot be converted to a string', () => { - const b = window.open(''); - expect(() => { - b.postMessage('test', { toString: null }); - }).to.throw('Cannot convert object to primitive value'); - b.close(); - }); - }); - describe('window.opener.postMessage', () => { it('sets source and origin correctly', async () => { const message = waitForEvent(window, 'message'); diff --git a/spec/static/main.js b/spec/static/main.js index f60970d3998b7..f259a3612fd31 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -109,8 +109,7 @@ app.whenReady().then(async function () { backgroundThrottling: false, nodeIntegration: true, webviewTag: true, - contextIsolation: false, - nativeWindowOpen: false + contextIsolation: false } }); window.loadFile('static/index.html', { From 12c5b9eaac372ef240d7b6c9013f01eb497beebf Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 05:01:29 -0800 Subject: [PATCH 041/268] Bump v18.0.0-nightly.20211206 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 85c55fe5c4864..b8b69dcfdbd8b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211203 \ No newline at end of file +18.0.0-nightly.20211206 \ No newline at end of file diff --git a/package.json b/package.json index ecdedb8ac9869..95d0bda40ffc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211203", + "version": "18.0.0-nightly.20211206", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index a071b14eaef97..d137277686a2d 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211203 - PRODUCTVERSION 18,0,0,20211203 + FILEVERSION 18,0,0,20211206 + PRODUCTVERSION 18,0,0,20211206 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From df7eb209a59769e83f26ab8119afc9aaf3253484 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 7 Dec 2021 05:01:42 -0800 Subject: [PATCH 042/268] Bump v18.0.0-nightly.20211207 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index b8b69dcfdbd8b..87138529e6bd6 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211206 \ No newline at end of file +18.0.0-nightly.20211207 \ No newline at end of file diff --git a/package.json b/package.json index 95d0bda40ffc4..46004e7870949 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211206", + "version": "18.0.0-nightly.20211207", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index d137277686a2d..ed30a1ae45259 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211206 - PRODUCTVERSION 18,0,0,20211206 + FILEVERSION 18,0,0,20211207 + PRODUCTVERSION 18,0,0,20211207 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d53399ea3107709b79a8801d1509d50c132fcec2 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 7 Dec 2021 08:21:50 -0800 Subject: [PATCH 043/268] Revert "Bump v18.0.0-nightly.20211207" This reverts commit df7eb209a59769e83f26ab8119afc9aaf3253484. --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 87138529e6bd6..b8b69dcfdbd8b 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211207 \ No newline at end of file +18.0.0-nightly.20211206 \ No newline at end of file diff --git a/package.json b/package.json index 46004e7870949..95d0bda40ffc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211207", + "version": "18.0.0-nightly.20211206", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index ed30a1ae45259..d137277686a2d 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211207 - PRODUCTVERSION 18,0,0,20211207 + FILEVERSION 18,0,0,20211206 + PRODUCTVERSION 18,0,0,20211206 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f6150758476b15f1aa8a5130130b452b02dbe537 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 7 Dec 2021 14:57:31 -0800 Subject: [PATCH 044/268] Bump v18.0.0-nightly.20211207 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index b8b69dcfdbd8b..87138529e6bd6 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211206 \ No newline at end of file +18.0.0-nightly.20211207 \ No newline at end of file diff --git a/package.json b/package.json index 95d0bda40ffc4..46004e7870949 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211206", + "version": "18.0.0-nightly.20211207", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index d137277686a2d..ed30a1ae45259 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211206 - PRODUCTVERSION 18,0,0,20211206 + FILEVERSION 18,0,0,20211207 + PRODUCTVERSION 18,0,0,20211207 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From cf0959f8340208f24baeaee29f381c2a96276c8c Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 8 Dec 2021 05:01:41 -0800 Subject: [PATCH 045/268] Bump v18.0.0-nightly.20211208 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 87138529e6bd6..9c8482249f105 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211207 \ No newline at end of file +18.0.0-nightly.20211208 \ No newline at end of file diff --git a/package.json b/package.json index 46004e7870949..3527312c49e72 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211207", + "version": "18.0.0-nightly.20211208", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index ed30a1ae45259..50ca1790ced51 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211207 - PRODUCTVERSION 18,0,0,20211207 + FILEVERSION 18,0,0,20211208 + PRODUCTVERSION 18,0,0,20211208 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 1341b0a6b73fb5fdb9aeadcfffd1285a1a884e24 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 9 Dec 2021 05:01:05 -0800 Subject: [PATCH 046/268] Bump v18.0.0-nightly.20211209 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 9c8482249f105..5532153681c7d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211208 \ No newline at end of file +18.0.0-nightly.20211209 \ No newline at end of file diff --git a/package.json b/package.json index 3527312c49e72..fb4b0f5edaa5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211208", + "version": "18.0.0-nightly.20211209", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 50ca1790ced51..65d8321ac822b 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211208 - PRODUCTVERSION 18,0,0,20211208 + FILEVERSION 18,0,0,20211209 + PRODUCTVERSION 18,0,0,20211209 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c4e471fbe2f89f4c665ef706f12e04f6d2bfb9d9 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 05:02:25 -0800 Subject: [PATCH 047/268] Bump v18.0.0-nightly.20211210 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 5532153681c7d..e6cb05236e0e4 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211209 \ No newline at end of file +18.0.0-nightly.20211210 \ No newline at end of file diff --git a/package.json b/package.json index fb4b0f5edaa5a..bc9221289f024 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211209", + "version": "18.0.0-nightly.20211210", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 65d8321ac822b..4be3982cb983a 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211209 - PRODUCTVERSION 18,0,0,20211209 + FILEVERSION 18,0,0,20211210 + PRODUCTVERSION 18,0,0,20211210 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6d9e2e3ad080f97d379ad4ca8af389d09eadd397 Mon Sep 17 00:00:00 2001 From: stephen9357 Date: Mon, 13 Dec 2021 14:42:43 +0800 Subject: [PATCH 048/268] docs: Fix environment variable name (#32094) The names of environment variables are case-sensitive on Linux and Mac. --- docs/tutorial/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/installation.md b/docs/tutorial/installation.md index eda9ec3aa1754..be604a73c398d 100644 --- a/docs/tutorial/installation.md +++ b/docs/tutorial/installation.md @@ -91,7 +91,7 @@ The above configuration will download from URLs such as `https://npmmirror.com/mirrors/electron/8.0.0/electron-v8.0.0-linux-x64.zip`. If your mirror serves artifacts with different checksums to the official -Electron release you may have to set `ELECTRON_USE_REMOTE_CHECKSUMS=1` to +Electron release you may have to set `electron_use_remote_checksums=1` to force Electron to use the remote `SHASUMS256.txt` file to verify the checksum instead of the embedded checksums. From f887ca0082d50879490834e4dbb0e92f2fbcb1de Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 13 Dec 2021 05:01:46 -0800 Subject: [PATCH 049/268] Bump v18.0.0-nightly.20211213 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index e6cb05236e0e4..38c9069cbbe85 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211210 \ No newline at end of file +18.0.0-nightly.20211213 \ No newline at end of file diff --git a/package.json b/package.json index bc9221289f024..b85943948d006 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211210", + "version": "18.0.0-nightly.20211213", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 4be3982cb983a..a56e062bb09b9 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211210 - PRODUCTVERSION 18,0,0,20211210 + FILEVERSION 18,0,0,20211213 + PRODUCTVERSION 18,0,0,20211213 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 292409a3017e4c9e56f6bf9479cbb59c0160a72a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 14 Dec 2021 05:01:26 -0800 Subject: [PATCH 050/268] Bump v18.0.0-nightly.20211214 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 38c9069cbbe85..f56282cb890e9 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211213 \ No newline at end of file +18.0.0-nightly.20211214 \ No newline at end of file diff --git a/package.json b/package.json index b85943948d006..e9c8c181da147 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211213", + "version": "18.0.0-nightly.20211214", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index a56e062bb09b9..d982ca17a9c37 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211213 - PRODUCTVERSION 18,0,0,20211213 + FILEVERSION 18,0,0,20211214 + PRODUCTVERSION 18,0,0,20211214 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d5b6a2f800134d2134a55c3102c9a830986419a9 Mon Sep 17 00:00:00 2001 From: Dennis <70665154+dennisrijsdijk@users.noreply.github.com> Date: Tue, 14 Dec 2021 22:25:56 +0100 Subject: [PATCH 051/268] Update discord url to electronjs (#32173) The discord url in this page is discord.gg/electron, which refers to a (supposed) roblox scripting group. --- docs/tutorial/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/introduction.md b/docs/tutorial/introduction.md index feaaf52029f93..fe26df6498f8f 100644 --- a/docs/tutorial/introduction.md +++ b/docs/tutorial/introduction.md @@ -56,4 +56,4 @@ problem. If not, feel free to fill out our bug report template and submit a new [comic]: https://www.google.com/googlebooks/chrome/ [fiddle]: https://electronjs.org/fiddle [issue-tracker]: https://github.com/electron/electron/issues -[discord]: https://discord.gg/electron +[discord]: https://discord.gg/electronjs From 1facbb4a099396fd2db23224226741bdd16717e8 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 15 Dec 2021 05:02:27 -0800 Subject: [PATCH 052/268] Bump v18.0.0-nightly.20211215 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index f56282cb890e9..f7687cd4e5d8d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211214 \ No newline at end of file +18.0.0-nightly.20211215 \ No newline at end of file diff --git a/package.json b/package.json index e9c8c181da147..6f92a3deb1bca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211214", + "version": "18.0.0-nightly.20211215", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index d982ca17a9c37..f51aeb6fbb5ed 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211214 - PRODUCTVERSION 18,0,0,20211214 + FILEVERSION 18,0,0,20211215 + PRODUCTVERSION 18,0,0,20211215 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a11f5cbb271091f5354550aa6c5da1164246c80f Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 16 Dec 2021 08:46:48 +1300 Subject: [PATCH 053/268] fix: ensure bluetooth devices are not returned by default (#32178) --- docs/api/web-contents.md | 2 ++ lib/browser/api/web-contents.ts | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 43eee11e5db43..54f322ffa5d04 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -736,6 +736,8 @@ first available device will be selected. `callback` should be called with `deviceId` to be selected, passing empty string to `callback` will cancel the request. +If no event listener is added for this event, all bluetooth requests will be cancelled. + ```javascript const { app, BrowserWindow } = require('electron') diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index e0336ccf62885..56582425a4180 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -749,6 +749,14 @@ WebContents.prototype._init = function () { } }); + this.on('select-bluetooth-device', (event, devices, callback) => { + if (this.listenerCount('select-bluetooth-device') === 0) { + // Cancel it if there are no handlers + event.preventDefault(); + callback(''); + } + }); + const event = process._linkedBinding('electron_browser_event').createEmpty(); app.emit('web-contents-created', event, this); From c1b3b3064b7b0a7aafd4ec75d7c59fd44f2b6b21 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 16 Dec 2021 05:00:36 -0800 Subject: [PATCH 054/268] Bump v18.0.0-nightly.20211216 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index f7687cd4e5d8d..17ad9b096528a 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211215 \ No newline at end of file +18.0.0-nightly.20211216 \ No newline at end of file diff --git a/package.json b/package.json index 6f92a3deb1bca..99e6808b3bd54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211215", + "version": "18.0.0-nightly.20211216", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index f51aeb6fbb5ed..b31955b8da90b 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211215 - PRODUCTVERSION 18,0,0,20211215 + FILEVERSION 18,0,0,20211216 + PRODUCTVERSION 18,0,0,20211216 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From e9420982d237bd17261075e8830d9f0cdff724cd Mon Sep 17 00:00:00 2001 From: Micha Hanselmann Date: Thu, 16 Dec 2021 18:23:30 +0100 Subject: [PATCH 055/268] fix: older systems crash when playing media files (#32046) * fix: win7 crash when playing media * reset * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- ...media_key_usage_with_globalshortcuts.patch | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch index 1a543dcf533d1..9ee02ccf3acd2 100644 --- a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch +++ b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch @@ -59,7 +59,7 @@ index ad366d0fd4c3a637d75a102ab56984f0d01bfc04..d63eb133fd4bab1ea309bb8c742acf88 // 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 5938f75742b793868638e693a9a8c8dc686dfc46..1137ea6c6b2b14f912b400e3cc43dc6fd0243407 100644 +index 5938f75742b793868638e693a9a8c8dc686dfc46..7f30f3fdd2c63612232e31c331b26b17ad729efb 100644 --- a/content/browser/media/media_keys_listener_manager_impl.cc +++ b/content/browser/media/media_keys_listener_manager_impl.cc @@ -55,7 +55,12 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey( @@ -76,32 +76,28 @@ index 5938f75742b793868638e693a9a8c8dc686dfc46..1137ea6c6b2b14f912b400e3cc43dc6f !media_keys_listener_->StartWatchingMediaKey(key_code)) { return false; } -@@ -231,18 +236,16 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { - media::AudioManager::GetGlobalAppName()); +@@ -232,18 +237,18 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { #endif -- if (system_media_controls_) { -- system_media_controls_->AddObserver(this); -- system_media_controls_notifier_ = -- std::make_unique( -- system_media_controls_.get()); + if (system_media_controls_) { ++ // This is required for proper functioning of MediaMetadata. + system_media_controls_->AddObserver(this); + system_media_controls_notifier_ = + std::make_unique( + system_media_controls_.get()); - } else { - // If we can't access system media controls, then directly listen for media - // key keypresses instead. - media_keys_listener_ = ui::MediaKeysListener::Create( - this, ui::MediaKeysListener::Scope::kGlobal); - DCHECK(media_keys_listener_); -- } -+ // This is required for proper functioning of MediaMetadata. -+ system_media_controls_->AddObserver(this); -+ system_media_controls_notifier_ = -+ std::make_unique( -+ system_media_controls_.get()); -+ + } + + // Directly listen for media key keypresses when using GlobalShortcuts. + media_keys_listener_ = ui::MediaKeysListener::Create( + this, ui::MediaKeysListener::Scope::kGlobal); + DCHECK(media_keys_listener_); - ++ EnsureAuxiliaryServices(); } + From eaae6c15534130a61c7290c8fec31a290255c05a Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Thu, 16 Dec 2021 14:41:25 -0800 Subject: [PATCH 056/268] chore: bump node to v16.13.1 (main) (#32086) * chore: bump node in DEPS to v16.13.1 * update patches * update c-ares BUILD.gn Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: clavin --- DEPS | 2 +- patches/node/.patches | 2 - ...m_env_option_to_disable_node_options.patch | 2 +- patches/node/build_add_gn_build_files.patch | 15 +++---- ...f_original-fs_and_custom_embedder_js.patch | 2 +- ...de_entrypoint_to_be_a_builtin_module.patch | 4 +- ...is_on_64bit_arch_and_ptr_compression.patch | 8 ++-- .../node/feat_initialize_asar_support.patch | 6 +-- ..._values_for_variables_in_common_gypi.patch | 2 +- ...everse_jsargs_defines_in_common_gypi.patch | 4 +- .../fix_crypto_tests_to_run_with_bssl.patch | 4 +- ..._with_invalid_timestamp_in_trace_log.patch | 28 ------------- ...ingssl_and_openssl_incompatibilities.patch | 30 +++++++------- ...-change-notify_after_daylight_change.patch | 39 ------------------- 14 files changed, 40 insertions(+), 108 deletions(-) delete mode 100644 patches/node/fix_event_with_invalid_timestamp_in_trace_log.patch delete mode 100644 patches/node/test_fix_test-datetime-change-notify_after_daylight_change.patch diff --git a/DEPS b/DEPS index 4f4988611701d..a71c6c0cee697 100644 --- a/DEPS +++ b/DEPS @@ -17,7 +17,7 @@ vars = { 'chromium_version': '98.0.4706.0', 'node_version': - 'v16.13.0', + 'v16.13.1', 'nan_version': # The following commit hash of NAN is v2.14.2 with *only* changes to the # test suite. This should be updated to a specific tag when one becomes diff --git a/patches/node/.patches b/patches/node/.patches index 3fdf3dd027766..a337ddbaf86dd 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -23,8 +23,6 @@ add_should_read_node_options_from_env_option_to_disable_node_options.patch repl_fix_crash_when_sharedarraybuffer_disabled.patch fix_readbarrier_undefined_symbol_error_on_woa_arm64.patch chore_fix_-wimplicit-fallthrough.patch -fix_event_with_invalid_timestamp_in_trace_log.patch -test_fix_test-datetime-change-notify_after_daylight_change.patch test_add_fixture_trim_option.patch fix_crash_caused_by_gethostnamew_on_windows_7.patch fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch diff --git a/patches/node/add_should_read_node_options_from_env_option_to_disable_node_options.patch b/patches/node/add_should_read_node_options_from_env_option_to_disable_node_options.patch index b039b541e891a..8f7b86fbef1fb 100644 --- a/patches/node/add_should_read_node_options_from_env_option_to_disable_node_options.patch +++ b/patches/node/add_should_read_node_options_from_env_option_to_disable_node_options.patch @@ -7,7 +7,7 @@ Subject: add should_read_node_options_from_env option to disable NODE_OPTIONS We can remove the NODE_OPTIONS environment variable but it in theory could be injected / re-inserted at runtime and be used for workers. In order to ensure the fuse is respected we need a hard runtime toggle for NODE_OPTION support. diff --git a/src/env.cc b/src/env.cc -index 1cc7da1ce15f43905ce607adcc1a23ed9d92948a..16af6aec3791df1363682f1ed024c52208b9a8f6 100644 +index 2cb2dccdf32ba4ad58972bb1d2b185996104b5ee..0abd61d6ddd1fb55afde40b38cf7c9400a8c3d41 100644 --- a/src/env.cc +++ b/src/env.cc @@ -329,6 +329,9 @@ std::string GetExecPath(const std::vector& argv) { diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 80e2d2fa296b9..45aff3442ca84 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -406,19 +406,16 @@ index 0000000000000000000000000000000000000000..d0641c5cbc3c527ce7a73d12118fb42d +} diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn new file mode 100644 -index 0000000000000000000000000000000000000000..8e0aa4b7a858ab432dca9da9ead9fcf44f6009f4 +index 0000000000000000000000000000000000000000..71a37834f4e693c190eb7e7d04e3f5ce67c487ad --- /dev/null +++ b/deps/cares/BUILD.gn -@@ -0,0 +1,133 @@ +@@ -0,0 +1,134 @@ +config("cares_config") { + include_dirs = [ "include", "src/lib" ] +} +static_library("cares") { + defines = [ "CARES_STATICLIB" ] -+ include_dirs = [ -+ "include", -+ "src/lib", -+ ] ++ include_dirs = [ "include" ] + public_configs = [ ":cares_config" ] + + libs = [] @@ -431,8 +428,11 @@ index 0000000000000000000000000000000000000000..8e0aa4b7a858ab432dca9da9ead9fcf4 + sources = [ + "include/ares.h", + "include/ares_dns.h", ++ "include/ares_nameser.h", + "include/ares_rules.h", + "include/ares_version.h", ++ "src/lib/ares__addrinfo2hostent.c", ++ "src/lib/ares__addrinfo_localhost.c", + "src/lib/ares_android.c", + "src/lib/ares_cancel.c", + "src/lib/ares__close_sockets.c", @@ -475,6 +475,7 @@ index 0000000000000000000000000000000000000000..8e0aa4b7a858ab432dca9da9ead9fcf4 + "src/lib/ares_parse_soa_reply.c", + "src/lib/ares_parse_srv_reply.c", + "src/lib/ares_parse_txt_reply.c", ++ "src/lib/ares_parse_uri_reply.c", + "src/lib/ares_platform.h", + "src/lib/ares_private.h", + "src/lib/ares_process.c", @@ -1774,7 +1775,7 @@ index 0000000000000000000000000000000000000000..d1d6b51e8c0c5bc6a5d09e217eb30483 + args = rebase_path(inputs + outputs, root_build_dir) +} diff --git a/src/node_version.h b/src/node_version.h -index 08e957472cfeca84af8cdc951af3c0de99c7b56c..330d77e868a50e1d0b71d773ab6b4b337ab20428 100644 +index e46385fd509a4852e3e2ded064fd2b84d95921a4..fa098c7bf3aaa08c060ea014b7a96b719fea6abf 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -89,7 +89,10 @@ diff --git a/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch b/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch index 8c6063c0eab23..711d8326bb029 100644 --- a/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch +++ b/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch @@ -35,7 +35,7 @@ index b45af42d12ff7df8a9e125e87f51af3456811c23..c84ff7feb07aebf656ada7e37d812d9d async function* watch(filename, options = {}) { const path = toNamespacedPath(getValidatedPath(filename)); diff --git a/src/node_native_module.cc b/src/node_native_module.cc -index c4fd96c75c1862289d9cabccfbc9bfc3a5ee523d..3c9e5498e6b9c62813ef93ca77558ead753ac797 100644 +index 006a30903184d76d6c11849784e6c6b38fd39807..edde37f281c10a1cb69db642149cc300744499cb 100644 --- a/src/node_native_module.cc +++ b/src/node_native_module.cc @@ -20,6 +20,7 @@ NativeModuleLoader NativeModuleLoader::instance_; diff --git a/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch b/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch index 0158ba8a35a25..a5087a9679b6c 100644 --- a/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch +++ b/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch @@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form of this. diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js -index 9d2799c3c9ac3b216c2289ae4e037dd228844d23..5b31df1207d4417a6f9b784574e3779650ba21d2 100644 +index 4d4996e9868c35ac3e0babbf08c38d90a6857abc..419ffd9d5deb84eb94381259d3084411f6c3341b 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js -@@ -105,10 +105,12 @@ function patchProcessObject(expandArgv1) { +@@ -104,10 +104,12 @@ function patchProcessObject(expandArgv1) { if (expandArgv1 && process.argv[1] && !StringPrototypeStartsWith(process.argv[1], '-')) { // Expand process.argv[1] into a full path. diff --git a/patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch b/patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch index 7c19775effbf8..3beda4a974e9f 100644 --- a/patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch +++ b/patches/node/enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch @@ -8,7 +8,7 @@ node modules will have different (wrong) ideas about how v8 structs are laid out in memory on 64-bit machines, and will summarily fail to work. diff --git a/common.gypi b/common.gypi -index 506d91edaa1dc1ffbcad7986d05c9e667c296a8e..caf0aa630892297b2751f44b44ae68974ece900e 100644 +index 4b6a965f65b9ad711507e4dd7ade4d54d52277cc..9e4064b263819756f17fb712a54bd6f828c5be35 100644 --- a/common.gypi +++ b/common.gypi @@ -64,7 +64,7 @@ @@ -20,9 +20,9 @@ index 506d91edaa1dc1ffbcad7986d05c9e667c296a8e..caf0aa630892297b2751f44b44ae6897 # Disable V8 untrusted code mitigations. # See https://github.com/v8/v8/wiki/Untrusted-code-mitigations -@@ -125,6 +125,9 @@ - 'obj_dir%': '<(PRODUCT_DIR)/obj.target', - 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a', +@@ -130,6 +130,9 @@ + 'v8_enable_pointer_compression': 0, + 'v8_enable_31bit_smis_on_64bit_arch': 0, }], + ['target_arch == "arm64" or target_arch == "x64"', { + 'v8_enable_pointer_compression': 1, diff --git a/patches/node/feat_initialize_asar_support.patch b/patches/node/feat_initialize_asar_support.patch index d10aba22dba37..b32de0a339035 100644 --- a/patches/node/feat_initialize_asar_support.patch +++ b/patches/node/feat_initialize_asar_support.patch @@ -6,10 +6,10 @@ Subject: feat: initialize asar support This patch initializes asar support in Node.js. diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js -index a4c73cba5481b3005474742483a554c93358c4e1..9d2799c3c9ac3b216c2289ae4e037dd228844d23 100644 +index f2a10641906e317270e7f27f4ee3ee1956802113..4d4996e9868c35ac3e0babbf08c38d90a6857abc 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js -@@ -77,6 +77,7 @@ function prepareMainThreadExecution(expandArgv1 = false) { +@@ -76,6 +76,7 @@ function prepareMainThreadExecution(expandArgv1 = false) { assert(!CJSLoader.hasLoadedAnyUserCJSModule); loadPreloadModules(); initializeFrozenIntrinsics(); @@ -17,7 +17,7 @@ index a4c73cba5481b3005474742483a554c93358c4e1..9d2799c3c9ac3b216c2289ae4e037dd2 } function patchProcessObject(expandArgv1) { -@@ -485,6 +486,10 @@ function loadPreloadModules() { +@@ -484,6 +485,10 @@ function loadPreloadModules() { } } diff --git a/patches/node/fix_add_default_values_for_variables_in_common_gypi.patch b/patches/node/fix_add_default_values_for_variables_in_common_gypi.patch index 0dba3949a3ee2..fc9a9c0e2182d 100644 --- a/patches/node/fix_add_default_values_for_variables_in_common_gypi.patch +++ b/patches/node/fix_add_default_values_for_variables_in_common_gypi.patch @@ -7,7 +7,7 @@ common.gypi is a file that's included in the node header bundle, despite the fact that we do not build node with gyp. diff --git a/common.gypi b/common.gypi -index 6862acc20b31c5bd819159911c0f3d4a2e42a0c1..506d91edaa1dc1ffbcad7986d05c9e667c296a8e 100644 +index b8d61f0d32709f3476dd2fd870d3959ab8f16a60..4b6a965f65b9ad711507e4dd7ade4d54d52277cc 100644 --- a/common.gypi +++ b/common.gypi @@ -81,6 +81,23 @@ diff --git a/patches/node/fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch b/patches/node/fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch index 225c294847f20..7b1e9bff157a1 100644 --- a/patches/node/fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch +++ b/patches/node/fix_add_v8_enable_reverse_jsargs_defines_in_common_gypi.patch @@ -6,7 +6,7 @@ Subject: fix: add v8_enable_reverse_jsargs defines in common.gypi This can be removed once node upgrades V8 and inevitably has to do this exact same thing. Also hi node people if you are looking at this. diff --git a/common.gypi b/common.gypi -index caf0aa630892297b2751f44b44ae68974ece900e..8a85c7c3d0ab0e2906c417f2cc2fc9ca584fd601 100644 +index 9e4064b263819756f17fb712a54bd6f828c5be35..2e59efb38d95231fcbcbb5a7859a6cfad3cf232c 100644 --- a/common.gypi +++ b/common.gypi @@ -65,6 +65,7 @@ @@ -25,7 +25,7 @@ index caf0aa630892297b2751f44b44ae68974ece900e..8a85c7c3d0ab0e2906c417f2cc2fc9ca ##### end V8 defaults ##### # When building native modules using 'npm install' with the system npm, -@@ -385,6 +387,9 @@ +@@ -390,6 +392,9 @@ ['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', { 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'], }], diff --git a/patches/node/fix_crypto_tests_to_run_with_bssl.patch b/patches/node/fix_crypto_tests_to_run_with_bssl.patch index 3e744b9bb15bd..7774100703837 100644 --- a/patches/node/fix_crypto_tests_to_run_with_bssl.patch +++ b/patches/node/fix_crypto_tests_to_run_with_bssl.patch @@ -391,7 +391,7 @@ index dd073274aef765e8f1e403aa2c8baf9694b521cb..fc6339e040debe61ecc61a3eb5b26823 } diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js -index cae9301517c37c7e90292d71fe5a6086cf55e0be..b9bc86e4d8b897cec583dea16f64f680252d2efa 100644 +index 18721fcf289e5545408e309db050a2ff0f4b0140..e5235e0a5fbd68416b4a9480818901b411ed91bd 100644 --- a/test/parallel/test-crypto-dh.js +++ b/test/parallel/test-crypto-dh.js @@ -49,7 +49,7 @@ for (const bits of [-1, 0, 1]) { @@ -421,7 +421,7 @@ index cae9301517c37c7e90292d71fe5a6086cf55e0be..b9bc86e4d8b897cec583dea16f64f680 }; assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex); assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex); -@@ -155,18 +155,17 @@ assert.strictEqual(secret1, secret4); +@@ -133,18 +133,17 @@ assert.strictEqual(secret1, secret4); let wrongBlockLength; if (common.hasOpenSSL3) { wrongBlockLength = { diff --git a/patches/node/fix_event_with_invalid_timestamp_in_trace_log.patch b/patches/node/fix_event_with_invalid_timestamp_in_trace_log.patch deleted file mode 100644 index f99fb893729d4..0000000000000 --- a/patches/node/fix_event_with_invalid_timestamp_in_trace_log.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Cezary Kulakowski -Date: Fri, 8 Oct 2021 11:18:58 +0200 -Subject: fix: event with invalid timestamp in trace log - -When node is started within Electron's environment it doesn't -initialize v8 and time of v8's start is never set. As a result -we log v8's start time as 0 and it breaks timestamps in the -trace log. With this change we log v8's start time only when -it was initialized by node. - -diff --git a/src/env.cc b/src/env.cc -index 16af6aec3791df1363682f1ed024c52208b9a8f6..ada0faa93bc223ffbea79a4308796df73ea8ae4e 100644 ---- a/src/env.cc -+++ b/src/env.cc -@@ -461,8 +461,10 @@ void Environment::InitializeMainContext(Local context, - environment_start_time_); - performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_NODE_START, - per_process::node_start_time); -- performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_V8_START, -- performance::performance_v8_start); -+ if (per_process::v8_initialized) { -+ performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_V8_START, -+ performance::performance_v8_start); -+ } - } - - Environment::~Environment() { diff --git a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch index c8759dba18235..51914f82b814e 100644 --- a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch +++ b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch @@ -86,10 +86,10 @@ index cc03fddd464b09dd3647e3f5183dc3c49affc94f..3aa6b40ab9b10cdd56002e9f020a6f6b if (!Set(env->context(), obj, diff --git a/src/crypto/crypto_dh.cc b/src/crypto/crypto_dh.cc -index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e1609f519c89 100644 +index 7e99759654e8b9272c48e0e6c0637f4327dc1615..612ed87ce396e285719a9efc8c346adb6d29b366 100644 --- a/src/crypto/crypto_dh.cc +++ b/src/crypto/crypto_dh.cc -@@ -122,13 +122,11 @@ void DiffieHellman::MemoryInfo(MemoryTracker* tracker) const { +@@ -144,13 +144,11 @@ void DiffieHellman::MemoryInfo(MemoryTracker* tracker) const { bool DiffieHellman::Init(const char* p, int p_len, int g) { dh_.reset(DH_new()); if (p_len <= 0) { @@ -105,7 +105,7 @@ index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e160 return false; } BIGNUM* bn_p = -@@ -146,21 +144,18 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) { +@@ -168,21 +166,18 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) { bool DiffieHellman::Init(const char* p, int p_len, const char* g, int g_len) { dh_.reset(DH_new()); if (p_len <= 0) { @@ -130,7 +130,7 @@ index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e160 return false; } BIGNUM* bn_p = -@@ -480,16 +475,20 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) { +@@ -502,16 +497,20 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) { if (!BN_set_word(bn_g.get(), params->params.generator) || !DH_set0_pqg(dh.get(), prime, nullptr, bn_g.get())) return EVPKeyCtxPointer(); @@ -152,7 +152,7 @@ index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e160 if (!param_ctx || EVP_PKEY_paramgen_init(param_ctx.get()) <= 0 || EVP_PKEY_CTX_set_dh_paramgen_prime_len( -@@ -501,8 +500,10 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) { +@@ -523,8 +522,10 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) { EVP_PKEY_paramgen(param_ctx.get(), &raw_params) <= 0) { return EVPKeyCtxPointer(); } @@ -165,7 +165,7 @@ index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e160 EVPKeyCtxPointer ctx(EVP_PKEY_CTX_new(key_params.get(), nullptr)); diff --git a/src/crypto/crypto_dsa.cc b/src/crypto/crypto_dsa.cc -index 271db427fa8539feb30c1712574976fb1f623e91..b2b6af1f9e6db54bdff0be7a567255f47da7b918 100644 +index c7894baf00ee9ce4684f4c752f1c7c9b98163741..655895dbff8b88daa53c7b40a5feca42a461b689 100644 --- a/src/crypto/crypto_dsa.cc +++ b/src/crypto/crypto_dsa.cc @@ -29,7 +29,7 @@ namespace crypto { @@ -211,7 +211,7 @@ index 0aa96ada47abe4b66fb616c665101278bbe0afb6..1e9a4863c5faea5f6b275483ca16f3a6 void HKDFConfig::MemoryInfo(MemoryTracker* tracker) const { diff --git a/src/crypto/crypto_random.cc b/src/crypto/crypto_random.cc -index 7cb4513f9ad0eaadd055b169520ae1e5073b7e2d..50a6663966cdb147a702df21240fa449850c3549 100644 +index fc88deb460314c2620d842ec30141bcd13109d60..c097ccfcffb1158317ba09e7c4beb725ccbab74f 100644 --- a/src/crypto/crypto_random.cc +++ b/src/crypto/crypto_random.cc @@ -150,7 +150,7 @@ Maybe RandomPrimeTraits::AdditionalConfig( @@ -224,7 +224,7 @@ index 7cb4513f9ad0eaadd055b169520ae1e5073b7e2d..50a6663966cdb147a702df21240fa449 THROW_ERR_CRYPTO_OPERATION_FAILED(env, "could not generate prime"); return Nothing(); diff --git a/src/crypto/crypto_rsa.cc b/src/crypto/crypto_rsa.cc -index d2307c33f5de8733b1343225a3fe6a700d1f51e4..0870657be060a58aa3337c0b9e4b8cabe4a31128 100644 +index ae4550e9fde8120c35409e495d5b763a95546509..188a7efe76df2a1aa2eb2746f4d748361bba4fb4 100644 --- a/src/crypto/crypto_rsa.cc +++ b/src/crypto/crypto_rsa.cc @@ -621,10 +621,11 @@ Maybe GetRsaKeyDetail( @@ -244,10 +244,10 @@ index d2307c33f5de8733b1343225a3fe6a700d1f51e4..0870657be060a58aa3337c0b9e4b8cab if (target diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc -index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d28652c405e1 100644 +index fec0a493c985f1fb716dd6222e438b430947f2a1..1a7d26ad134b094d02023c99934b8ac7a4bb18d7 100644 --- a/src/crypto/crypto_util.cc +++ b/src/crypto/crypto_util.cc -@@ -491,24 +491,14 @@ Maybe Decorate(Environment* env, Local obj, +@@ -503,24 +503,14 @@ Maybe Decorate(Environment* env, Local obj, V(BIO) \ V(PKCS7) \ V(X509V3) \ @@ -272,7 +272,7 @@ index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d286 V(USER) \ #define V(name) case ERR_LIB_##name: lib = #name "_"; break; -@@ -668,7 +658,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { +@@ -680,7 +670,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { CHECK(args[0]->IsUint32()); Environment* env = Environment::GetCurrent(args); uint32_t len = args[0].As()->Value(); @@ -281,7 +281,7 @@ index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d286 if (data == nullptr) { // There's no memory available for the allocation. // Return nothing. -@@ -680,7 +670,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { +@@ -692,7 +682,7 @@ void SecureBuffer(const FunctionCallbackInfo& args) { data, len, [](void* data, size_t len, void* deleter_data) { @@ -290,7 +290,7 @@ index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d286 }, data); Local buffer = ArrayBuffer::New(env->isolate(), store); -@@ -688,10 +678,12 @@ void SecureBuffer(const FunctionCallbackInfo& args) { +@@ -700,10 +690,12 @@ void SecureBuffer(const FunctionCallbackInfo& args) { } void SecureHeapUsed(const FunctionCallbackInfo& args) { @@ -304,10 +304,10 @@ index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d286 } // namespace diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h -index ac95612a0b1a856d7fe07efde59786e811f1b98d..aa62753d7c929027f5265fa4330b0429c726f7ef 100644 +index 463a19f516d23fdb56eb83025f4a3f2b3f4a426b..86e66e29ee644f86cb8ac20f37061fc03dc3099b 100644 --- a/src/crypto/crypto_util.h +++ b/src/crypto/crypto_util.h -@@ -15,7 +15,9 @@ +@@ -16,7 +16,9 @@ #include #include #include diff --git a/patches/node/test_fix_test-datetime-change-notify_after_daylight_change.patch b/patches/node/test_fix_test-datetime-change-notify_after_daylight_change.patch deleted file mode 100644 index 6842d7694eb1e..0000000000000 --- a/patches/node/test_fix_test-datetime-change-notify_after_daylight_change.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Piotr Rybak -Date: Sun, 31 Oct 2021 17:58:09 +0900 -Subject: test: fix test-datetime-change-notify after daylight change -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Add standard timezone name for Dublin without daylight saving - -PR-URL: https://github.com/nodejs/node/pull/40684 -Reviewed-By: Michaël Zasso -Reviewed-By: Tobias Nießen -Reviewed-By: Voltrex -(cherry picked from commit 747ef34fb0c9c1f2924ab1b79ea000c87e67a8eb) - -diff --git a/test/parallel/test-datetime-change-notify.js b/test/parallel/test-datetime-change-notify.js -index 9cd6d7abfd898ac6781b04422362a6b459b7dc2c..01843511907077857be22c9bc7e7f8568fc677d1 100644 ---- a/test/parallel/test-datetime-change-notify.js -+++ b/test/parallel/test-datetime-change-notify.js -@@ -18,15 +18,15 @@ const cases = [ - }, - { - timeZone: 'America/New_York', -- expected: /Eastern (Standard|Daylight) Time/, -+ expected: /Eastern (?:Standard|Daylight) Time/, - }, - { - timeZone: 'America/Los_Angeles', -- expected: /Pacific (Standard|Daylight) Time/, -+ expected: /Pacific (?:Standard|Daylight) Time/, - }, - { - timeZone: 'Europe/Dublin', -- expected: /Irish/, -+ expected: /Irish Standard Time|Greenwich Mean Time/, - }, - ]; - From 909dbe68908228a2fef6f475d10c3dba4cc39b03 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 17 Dec 2021 05:01:12 -0800 Subject: [PATCH 057/268] Bump v18.0.0-nightly.20211217 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 17ad9b096528a..c0b8229fa553f 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211216 \ No newline at end of file +18.0.0-nightly.20211217 \ No newline at end of file diff --git a/package.json b/package.json index 99e6808b3bd54..b5e3d4748db93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211216", + "version": "18.0.0-nightly.20211217", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index b31955b8da90b..8a7be0b58330d 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211216 - PRODUCTVERSION 18,0,0,20211216 + FILEVERSION 18,0,0,20211217 + PRODUCTVERSION 18,0,0,20211217 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From ffbaa1d83f6612ae7f7aac03feeca62973cd36ba Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Fri, 17 Dec 2021 16:55:43 -0800 Subject: [PATCH 058/268] fix: check for single bluetooth listener (#32240) --- lib/browser/api/web-contents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 56582425a4180..6c82d9c431efd 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -750,7 +750,7 @@ WebContents.prototype._init = function () { }); this.on('select-bluetooth-device', (event, devices, callback) => { - if (this.listenerCount('select-bluetooth-device') === 0) { + if (this.listenerCount('select-bluetooth-device') === 1) { // Cancel it if there are no handlers event.preventDefault(); callback(''); From 2b25e737a74c689a9965ed61574ef22ba237ee02 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 05:02:21 -0800 Subject: [PATCH 059/268] Bump v18.0.0-nightly.20211220 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index c0b8229fa553f..228eec2133954 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211217 \ No newline at end of file +18.0.0-nightly.20211220 \ No newline at end of file diff --git a/package.json b/package.json index b5e3d4748db93..0556d0bc67b5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211217", + "version": "18.0.0-nightly.20211220", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 8a7be0b58330d..3c6d6bbcf5e02 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211217 - PRODUCTVERSION 18,0,0,20211217 + FILEVERSION 18,0,0,20211220 + PRODUCTVERSION 18,0,0,20211220 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 79eaef4aab0d93c28a945b1e6dd9eca6e3b7eb54 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 21 Dec 2021 05:01:15 -0800 Subject: [PATCH 060/268] Bump v18.0.0-nightly.20211221 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 228eec2133954..ab0de8c9f7b2a 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211220 \ No newline at end of file +18.0.0-nightly.20211221 \ No newline at end of file diff --git a/package.json b/package.json index 0556d0bc67b5c..a7b9af4586fbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211220", + "version": "18.0.0-nightly.20211221", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 3c6d6bbcf5e02..e0c19a5338c5a 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211220 - PRODUCTVERSION 18,0,0,20211220 + FILEVERSION 18,0,0,20211221 + PRODUCTVERSION 18,0,0,20211221 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b433163d7a27aafbb9f3eaf28b95a87cdf6943f3 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 22 Dec 2021 05:04:57 -0800 Subject: [PATCH 061/268] Bump v18.0.0-nightly.20211222 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index ab0de8c9f7b2a..72e661a13f421 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211221 \ No newline at end of file +18.0.0-nightly.20211222 \ No newline at end of file diff --git a/package.json b/package.json index a7b9af4586fbd..fe942cdc34c13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211221", + "version": "18.0.0-nightly.20211222", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index e0c19a5338c5a..25642611aad1a 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211221 - PRODUCTVERSION 18,0,0,20211221 + FILEVERSION 18,0,0,20211222 + PRODUCTVERSION 18,0,0,20211222 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f17e8996ac169e3e92f732594cf4a14ddd177ef4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 23 Dec 2021 05:02:41 -0800 Subject: [PATCH 062/268] Bump v18.0.0-nightly.20211223 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 72e661a13f421..82b12cc42c5ca 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211222 \ No newline at end of file +18.0.0-nightly.20211223 \ No newline at end of file diff --git a/package.json b/package.json index fe942cdc34c13..600483c9f0892 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211222", + "version": "18.0.0-nightly.20211223", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 25642611aad1a..25e210d5ab7e8 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211222 - PRODUCTVERSION 18,0,0,20211222 + FILEVERSION 18,0,0,20211223 + PRODUCTVERSION 18,0,0,20211223 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 66a55ba77873bcc640149258ec0583ca244fa12a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 27 Dec 2021 05:01:32 -0800 Subject: [PATCH 063/268] Bump v18.0.0-nightly.20211227 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 82b12cc42c5ca..164e6fc560a00 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211223 \ No newline at end of file +18.0.0-nightly.20211227 \ No newline at end of file diff --git a/package.json b/package.json index 600483c9f0892..d84a3fedd7877 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211223", + "version": "18.0.0-nightly.20211227", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 25e210d5ab7e8..7783e87420559 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211223 - PRODUCTVERSION 18,0,0,20211223 + FILEVERSION 18,0,0,20211227 + PRODUCTVERSION 18,0,0,20211227 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6b2adea86762e0f82046f24152b4aca02a8b8be5 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 27 Dec 2021 11:35:06 -0800 Subject: [PATCH 064/268] Revert "Bump v18.0.0-nightly.20211227" This reverts commit 66a55ba77873bcc640149258ec0583ca244fa12a. --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 164e6fc560a00..82b12cc42c5ca 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211227 \ No newline at end of file +18.0.0-nightly.20211223 \ No newline at end of file diff --git a/package.json b/package.json index d84a3fedd7877..600483c9f0892 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211227", + "version": "18.0.0-nightly.20211223", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 7783e87420559..25e210d5ab7e8 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211227 - PRODUCTVERSION 18,0,0,20211227 + FILEVERSION 18,0,0,20211223 + PRODUCTVERSION 18,0,0,20211223 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d59a4a0771cdc61e088d978c281df9acba8fb658 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 28 Dec 2021 05:01:13 -0800 Subject: [PATCH 065/268] Bump v18.0.0-nightly.20211228 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 82b12cc42c5ca..4f1710f2fd0eb 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211223 \ No newline at end of file +18.0.0-nightly.20211228 \ No newline at end of file diff --git a/package.json b/package.json index 600483c9f0892..c53d758e7734a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211223", + "version": "18.0.0-nightly.20211228", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 25e210d5ab7e8..0f2ee29559cb6 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211223 - PRODUCTVERSION 18,0,0,20211223 + FILEVERSION 18,0,0,20211228 + PRODUCTVERSION 18,0,0,20211228 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f1b0d30d8d15a8131381c63ad4d495e347552f43 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 05:01:36 -0800 Subject: [PATCH 066/268] Bump v18.0.0-nightly.20211229 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 4f1710f2fd0eb..9b185936c2d50 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211228 \ No newline at end of file +18.0.0-nightly.20211229 \ No newline at end of file diff --git a/package.json b/package.json index c53d758e7734a..0482b5d667447 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211228", + "version": "18.0.0-nightly.20211229", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 0f2ee29559cb6..22ac25c1eacc1 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211228 - PRODUCTVERSION 18,0,0,20211228 + FILEVERSION 18,0,0,20211229 + PRODUCTVERSION 18,0,0,20211229 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From ac39cb14e9eb91441d060e6820d1957ee7a40f19 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 31 Dec 2021 05:01:03 -0800 Subject: [PATCH 067/268] Bump v18.0.0-nightly.20211231 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 9b185936c2d50..9a2be77f58a27 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211229 \ No newline at end of file +18.0.0-nightly.20211231 \ No newline at end of file diff --git a/package.json b/package.json index 0482b5d667447..994cbff7fcb68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211229", + "version": "18.0.0-nightly.20211231", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 22ac25c1eacc1..6bcfa47b77543 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211229 - PRODUCTVERSION 18,0,0,20211229 + FILEVERSION 18,0,0,20211231 + PRODUCTVERSION 18,0,0,20211231 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 1d8612ad5d7d74ba39908ee565a9457dd573ef84 Mon Sep 17 00:00:00 2001 From: Jack Nemitz <62447711+terminalPoltergeist@users.noreply.github.com> Date: Mon, 3 Jan 2022 02:59:55 -0600 Subject: [PATCH 068/268] Fix typo in quick-start.md (#32282) Resolve a grammar issue in the quick-start guide. --- docs/tutorial/quick-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/quick-start.md b/docs/tutorial/quick-start.md index 08904e4418a47..3f033ebafb141 100644 --- a/docs/tutorial/quick-start.md +++ b/docs/tutorial/quick-start.md @@ -119,7 +119,7 @@ of your project. Before we can create a window for our application, we need to create the content that will be loaded into it. In Electron, each window displays web contents that can be loaded -from either from a local HTML file or a remote URL. +from either a local HTML file or a remote URL. For this tutorial, you will be doing the former. Create an `index.html` file in the root folder of your project: From f766bb483daf644633f0f2b753317d25fc7e1c5b Mon Sep 17 00:00:00 2001 From: ganthern Date: Mon, 3 Jan 2022 10:35:19 +0100 Subject: [PATCH 069/268] docs: fix typo in bug report issue template (#32208) --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 6bd7487b0d071..706d63103ed76 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -12,7 +12,7 @@ body: required: true - label: I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to. required: true - - label: I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success. + - label: I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success. required: true - type: input attributes: From 84451e7daf5eaa27901bd37c15d1bc1d44421e64 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 3 Jan 2022 05:04:24 -0800 Subject: [PATCH 070/268] Bump v18.0.0-nightly.20220103 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 9a2be77f58a27..8ad606cbd2819 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20211231 \ No newline at end of file +18.0.0-nightly.20220103 \ No newline at end of file diff --git a/package.json b/package.json index 994cbff7fcb68..bc9afab6f990e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20211231", + "version": "18.0.0-nightly.20220103", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 6bcfa47b77543..3530a5bd73e3e 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20211231 - PRODUCTVERSION 18,0,0,20211231 + FILEVERSION 18,0,0,20220103 + PRODUCTVERSION 18,0,0,20220103 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 727453ef04042cfce0dae5d42535d9728c3c9d2d Mon Sep 17 00:00:00 2001 From: Romain Pokrzywka Date: Mon, 3 Jan 2022 10:57:00 -0600 Subject: [PATCH 071/268] build: remove stale dependency for webrtc desktop capture module (#32304) WebRTC has changed how they integrate into Chromium, they don't expose their dependencies externally anymore. Instead, one must now go through webrtc_overrides: https://chromium.googlesource.com/chromium/src.git/+/cbc90fd093956 We're already including webrtc_overrides as a dependency which includes the modules, so this extra deps isn't needed anymore. --- BUILD.gn | 6 ------ 1 file changed, 6 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 452dc4cbdc8a5..09125f865a8b3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -632,12 +632,6 @@ source_set("electron_lib") { } if (enable_desktop_capturer) { - if (is_component_build && !is_linux) { - # On windows the implementation relies on unexported - # DxgiDuplicatorController class. On macOS the implementation - # relies on unexported webrtc::GetWindowOwnerPid method. - deps += [ "//third_party/webrtc/modules/desktop_capture" ] - } sources += [ "shell/browser/api/electron_api_desktop_capturer.cc", "shell/browser/api/electron_api_desktop_capturer.h", From 195d2b5b3ef88d36f0afbb4a811c86951106862b Mon Sep 17 00:00:00 2001 From: Oran C Date: Mon, 3 Jan 2022 12:18:02 -0700 Subject: [PATCH 072/268] [fix] Docs rendering issue with rendering on electronjs quick-start (#32293) there is a issue with rendering on the bottom of page https://www.electronjs.org/docs/v14-x-y/tutorial/quick-start which looks like this ![](https://dl3.pushbulletusercontent.com/MXsLhjaoKRj1bhu4R73E3WLiuKCBMkgh/image.png) all id did is remove the spacing and it should fix the issue. sometimes having spaces before a "```" will cause issues hope this helps! --- docs/tutorial/quick-start.md | 74 ++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/docs/tutorial/quick-start.md b/docs/tutorial/quick-start.md index 3f033ebafb141..91c3317d336d6 100644 --- a/docs/tutorial/quick-start.md +++ b/docs/tutorial/quick-start.md @@ -463,46 +463,46 @@ The fastest way to distribute your newly created app is using 1. Add Electron Forge as a development dependency of your app, and use its `import` command to set up Forge's scaffolding: - ```sh npm2yarn - npm install --save-dev @electron-forge/cli - npx electron-forge import +```sh npm2yarn +npm install --save-dev @electron-forge/cli +npx electron-forge import - ✔ Checking your system - ✔ Initializing Git Repository - ✔ Writing modified package.json file - ✔ Installing dependencies - ✔ Writing modified package.json file - ✔ Fixing .gitignore +✔ Checking your system +✔ Initializing Git Repository +✔ Writing modified package.json file +✔ Installing dependencies +✔ Writing modified package.json file +✔ Fixing .gitignore - We have ATTEMPTED to convert your app to be in a format that electron-forge understands. +We have ATTEMPTED to convert your app to be in a format that electron-forge understands. - Thanks for using "electron-forge"!!! - ``` +Thanks for using "electron-forge"!!! +``` 1. Create a distributable using Forge's `make` command: - ```sh npm2yarn - npm run make - - > my-electron-app@1.0.0 make /my-electron-app - > electron-forge make - - ✔ Checking your system - ✔ Resolving Forge Config - We need to package your application before we can make it - ✔ Preparing to Package Application for arch: x64 - ✔ Preparing native dependencies - ✔ Packaging Application - Making for the following targets: zip - ✔ Making for target: zip - On platform: darwin - For arch: x64 - ``` - - Electron Forge creates the `out` folder where your package will be located: - - ```plain - // Example for macOS - out/ - ├── out/make/zip/darwin/x64/my-electron-app-darwin-x64-1.0.0.zip - ├── ... - └── out/my-electron-app-darwin-x64/my-electron-app.app/Contents/MacOS/my-electron-app - ``` +```sh npm2yarn +npm run make + +> my-electron-app@1.0.0 make /my-electron-app +> electron-forge make + +✔ Checking your system +✔ Resolving Forge Config +We need to package your application before we can make it +✔ Preparing to Package Application for arch: x64 +✔ Preparing native dependencies +✔ Packaging Application +Making for the following targets: zip +✔ Making for target: zip - On platform: darwin - For arch: x64 +``` + +Electron Forge creates the `out` folder where your package will be located: + +```plain +// Example for macOS +out/ +├── out/make/zip/darwin/x64/my-electron-app-darwin-x64-1.0.0.zip +├── ... +└── out/my-electron-app-darwin-x64/my-electron-app.app/Contents/MacOS/my-electron-app +``` From 2c700da4de0031d2e620f77b1415613eaf335793 Mon Sep 17 00:00:00 2001 From: Duncan Hewett Date: Mon, 3 Jan 2022 11:48:15 -0800 Subject: [PATCH 073/268] docs: add Bugsnag as a 3rd party crash server (#32053) --- docs/api/crash-reporter.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api/crash-reporter.md b/docs/api/crash-reporter.md index 194d0c4971fb1..9ef7ecc313281 100644 --- a/docs/api/crash-reporter.md +++ b/docs/api/crash-reporter.md @@ -27,6 +27,7 @@ Or use a 3rd party hosted solution: * [Backtrace](https://backtrace.io/electron/) * [Sentry](https://docs.sentry.io/clients/electron) * [BugSplat](https://www.bugsplat.com/docs/platforms/electron) +* [Bugsnag](https://docs.bugsnag.com/platforms/electron/) Crash reports are stored temporarily before being uploaded in a directory underneath the app's user data directory, called 'Crashpad'. You can override From 4600d7e7f659092e31ca125f2a871067802ac14f Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Tue, 4 Jan 2022 03:24:58 +0530 Subject: [PATCH 074/268] fix: crash caused by app.getLocaleCountryCode() (#32256) CFLocaleGetValue() returned null and crashed the process when app.getLocaleCountryCode() was run on a CircleCI metal resource class macOS instance with Xcode 12.5.1. This change fixes that logic and adds further checks to make the code future-proof. Here too people are complaining that the returned country code migth be null: https://stackoverflow.com/questions/15202454/nslocalecountrycode-returns-nil Signed-off-by: Darshan Sen --- shell/browser/api/electron_api_app.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 1ecc88721c445..a9262afd261f8 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -1054,11 +1054,14 @@ std::string App::GetLocaleCountryCode() { CFLocaleRef locale = CFLocaleCopyCurrent(); CFStringRef value = CFStringRef( static_cast(CFLocaleGetValue(locale, kCFLocaleCountryCode))); - const CFIndex kCStringSize = 128; - char temporaryCString[kCStringSize] = {0}; - CFStringGetCString(value, temporaryCString, kCStringSize, - kCFStringEncodingUTF8); - region = temporaryCString; + if (value != nil) { + char temporaryCString[3]; + const CFIndex kCStringSize = sizeof(temporaryCString); + if (CFStringGetCString(value, temporaryCString, kCStringSize, + kCFStringEncodingUTF8)) { + region = temporaryCString; + } + } #else const char* locale_ptr = setlocale(LC_TIME, nullptr); if (!locale_ptr) From 84f1d78558cb2cf6765191299c9b03ad59c0e6b4 Mon Sep 17 00:00:00 2001 From: Maciej Krawczyk Date: Tue, 4 Jan 2022 02:12:55 +0100 Subject: [PATCH 075/268] docs: correct webFrame description (#32205) The current description incorrectly states that the webFrame export represents the top frame but it actually represents the current frame. --- docs/api/web-frame.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/web-frame.md b/docs/api/web-frame.md index 1d6da963a2cb0..9384fe2c98613 100644 --- a/docs/api/web-frame.md +++ b/docs/api/web-frame.md @@ -5,8 +5,8 @@ Process: [Renderer](../glossary.md#renderer-process) `webFrame` export of the Electron module is an instance of the `WebFrame` -class representing the top frame of the current `BrowserWindow`. Sub-frames can -be retrieved by certain properties and methods (e.g. `webFrame.firstChild`). +class representing the current frame. Sub-frames can be retrieved by +certain properties and methods (e.g. `webFrame.firstChild`). An example of zooming current page to 200%. From cbdb2e6ec2fae7749b7ebf0a3488ce702493b320 Mon Sep 17 00:00:00 2001 From: Shubham Kumar <41825906+Shubham-Kumar-2000@users.noreply.github.com> Date: Tue, 4 Jan 2022 07:17:28 +0530 Subject: [PATCH 076/268] fix: #32141 register wrong command for setAsDefaultProtocolClient for windows (#32220) --- shell/browser/browser_win.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/browser_win.cc b/shell/browser/browser_win.cc index 0ed7ec0100b84..6cfc75f4a44ba 100644 --- a/shell/browser/browser_win.cc +++ b/shell/browser/browser_win.cc @@ -66,7 +66,7 @@ bool GetProtocolLaunchPath(gin::Arguments* args, std::wstring* exe) { // Read in optional args arg std::vector launch_args; if (args->GetNext(&launch_args) && !launch_args.empty()) - *exe = base::StringPrintf(L"\"%ls\" %ls \"%%1\"", exe->c_str(), + *exe = base::StringPrintf(L"\"%ls\" \"%ls\" \"%%1\"", exe->c_str(), base::JoinString(launch_args, L" ").c_str()); else *exe = base::StringPrintf(L"\"%ls\" \"%%1\"", exe->c_str()); From b63c190fe6ac20f9b84e2813ab4c049862dc753a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 4 Jan 2022 05:01:25 -0800 Subject: [PATCH 077/268] Bump v18.0.0-nightly.20220104 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 8ad606cbd2819..e128679c68fea 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220103 \ No newline at end of file +18.0.0-nightly.20220104 \ No newline at end of file diff --git a/package.json b/package.json index bc9afab6f990e..317d621090149 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220103", + "version": "18.0.0-nightly.20220104", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 3530a5bd73e3e..49f54bcb593bc 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220103 - PRODUCTVERSION 18,0,0,20220103 + FILEVERSION 18,0,0,20220104 + PRODUCTVERSION 18,0,0,20220104 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 62c1c86be915134d9025e5fccbda94789af674f9 Mon Sep 17 00:00:00 2001 From: vulture Date: Wed, 5 Jan 2022 01:36:48 -0800 Subject: [PATCH 078/268] Rename patch file to .patch to conform to naming standard which utilizes .gitattributes settings (#32324) Co-authored-by: stsean --- patches/chromium/.patches | 2 +- ...e_enterprise_APIs => mas_gate_private_enterprise_APIs.patch} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename patches/chromium/{mas_gate_private_enterprise_APIs => mas_gate_private_enterprise_APIs.patch} (100%) diff --git a/patches/chromium/.patches b/patches/chromium/.patches index e28f249beeccd..df4766e95c9b5 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -107,7 +107,7 @@ process_singleton.patch fix_expose_decrementcapturercount_in_web_contents_impl.patch add_ui_scopedcliboardwriter_writeunsaferawdata.patch feat_add_data_parameter_to_processsingleton.patch -mas_gate_private_enterprise_APIs +mas_gate_private_enterprise_APIs.patch load_v8_snapshot_in_browser_process.patch fix_patch_out_permissions_checks_in_exclusive_access.patch fix_aspect_ratio_with_max_size.patch diff --git a/patches/chromium/mas_gate_private_enterprise_APIs b/patches/chromium/mas_gate_private_enterprise_APIs.patch similarity index 100% rename from patches/chromium/mas_gate_private_enterprise_APIs rename to patches/chromium/mas_gate_private_enterprise_APIs.patch From dd4eae8a3b7f707bcd3d083d553988a29e332189 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 5 Jan 2022 05:01:56 -0800 Subject: [PATCH 079/268] Bump v18.0.0-nightly.20220105 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index e128679c68fea..ba97c2ebbdac3 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220104 \ No newline at end of file +18.0.0-nightly.20220105 \ No newline at end of file diff --git a/package.json b/package.json index 317d621090149..620ae5ed7009d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220104", + "version": "18.0.0-nightly.20220105", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 49f54bcb593bc..c2fd002b5c3eb 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220104 - PRODUCTVERSION 18,0,0,20220104 + FILEVERSION 18,0,0,20220105 + PRODUCTVERSION 18,0,0,20220105 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b61805b63a32b70a3d6d0bef4cc58c580ff8ea38 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Wed, 5 Jan 2022 11:43:28 -0800 Subject: [PATCH 080/268] fix: use allocationtype kold in v8 scriptormodule legacy lifetime (#32339) --- patches/v8/.patches | 1 + ...in_v8_scriptormodule_legacy_lifetime.patch | 56 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch diff --git a/patches/v8/.patches b/patches/v8/.patches index ff0b6eb65d118..5d74c796bcf93 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -6,3 +6,4 @@ workaround_an_undefined_symbol_error.patch do_not_export_private_v8_symbols_on_windows.patch fix_build_deprecated_attirbute_for_older_msvc_versions.patch fix_disable_implies_dcheck_for_node_stream_array_buffers.patch +fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch diff --git a/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch b/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch new file mode 100644 index 0000000000000..c7868d98cf43a --- /dev/null +++ b/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch @@ -0,0 +1,56 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: VerteDinde +Date: Tue, 4 Jan 2022 14:55:00 -0800 +Subject: fix: use allocationtype kold in v8 scriptormodule legacy lifetime + +Changed in this CL: https://chromium-review.googlesource.com/c/v8/v8/+/3211575 +Upstream proposed fix: https://chromium-review.googlesource.com/c/v8/v8/+/3354087 + +Enabling V8_SCRIPTORMODULE_LEGACY_LIFETIME is necessary to fix ESM in +Node.js, but Blink expects old allocations so we change this in the +interim while Node.js works to remove their usage of WeakRefs to +ScriptOrModule. + +This patch can be removed when the upsteam fix is merged, or +when support is added in Node.js + +diff --git a/src/heap/factory-base.cc b/src/heap/factory-base.cc +index 89eb0defc2c1f1d2f6f59c3fb107d844e0c7f986..509cc193f339fc2d44ee493c6fe6c17c024b55fb 100644 +--- a/src/heap/factory-base.cc ++++ b/src/heap/factory-base.cc +@@ -247,7 +247,7 @@ Handle - `)}`); - }); - const { url, frameName, features, disposition, referrer, postBody } = details; - expect(url).to.equal('http://example.com/'); - expect(frameName).to.equal(''); - expect(features).to.deep.equal(''); - expect(disposition).to.equal('foreground-tab'); - expect(referrer).to.deep.equal({ - policy: 'strict-origin-when-cross-origin', - url: '' - }); - expect(postBody).to.deep.equal({ - contentType: 'application/x-www-form-urlencoded', - data: [{ - type: 'rawData', - bytes: Buffer.from('key=value') - }] - }); + it('is called when shift-clicking on a link', async () => { + const denied = new Promise((resolve) => { + browserWindow.webContents.setWindowOpenHandler(() => { + setTimeout(resolve); + return { action: 'deny' }; }); + }); + browserWindow.webContents.on('new-window', () => { + assert.fail('new-window should not to be called with an overridden window.open'); + }); - it('does fire window creation events if an override returns action: allow', async () => { - browserWindow.webContents.setWindowOpenHandler(() => ({ action: 'allow' })); + browserWindow.webContents.on('did-create-window', () => { + assert.fail('did-create-window should not to be called with an overridden window.open'); + }); - setImmediate(() => { - browserWindow.webContents.executeJavaScript("window.open('about:blank', '', 'show=no') && true"); - }); + await browserWindow.webContents.loadURL('data:text/html,link'); + browserWindow.webContents.sendInputEvent({ type: 'mouseDown', x: 10, y: 10, button: 'left', clickCount: 1, modifiers: ['shift'] }); + browserWindow.webContents.sendInputEvent({ type: 'mouseUp', x: 10, y: 10, button: 'left', clickCount: 1, modifiers: ['shift'] }); - await Promise.all([ - emittedOnce(browserWindow.webContents, 'did-create-window'), - emittedOnce(browserWindow.webContents, 'new-window') - ]); - }); + await denied; + }); - it('can change webPreferences of child windows', (done) => { - browserWindow.webContents.setWindowOpenHandler(() => ({ action: 'allow', overrideBrowserWindowOptions: { webPreferences: { defaultFontSize: 30 } } })); + it('fires handler with correct params', async () => { + const testFrameName = 'test-frame-name'; + const testFeatures = 'top=10&left=10&something-unknown&show=no'; + const testUrl = 'app://does-not-exist/'; + const details = await new Promise(resolve => { + browserWindow.webContents.setWindowOpenHandler((details) => { + setTimeout(() => resolve(details)); + return { action: 'deny' }; + }); - browserWindow.webContents.on('did-create-window', async (childWindow) => { - await childWindow.webContents.executeJavaScript("document.write('hello')"); - const size = await childWindow.webContents.executeJavaScript("getComputedStyle(document.querySelector('body')).fontSize"); - expect(size).to.equal('30px'); - done(); - }); + browserWindow.webContents.executeJavaScript(`window.open('${testUrl}', '${testFrameName}', '${testFeatures}') && true`); + }); + const { url, frameName, features, disposition, referrer } = details; + expect(url).to.equal(testUrl); + expect(frameName).to.equal(testFrameName); + expect(features).to.equal(testFeatures); + expect(disposition).to.equal('new-window'); + expect(referrer).to.deep.equal({ + policy: 'strict-origin-when-cross-origin', + url: '' + }); + }); - browserWindow.webContents.executeJavaScript("window.open('about:blank', '', 'show=no') && true"); + it('includes post body', async () => { + const details = await new Promise(resolve => { + browserWindow.webContents.setWindowOpenHandler((details) => { + setTimeout(() => resolve(details)); + return { action: 'deny' }; }); - it('does not hang parent window when denying window.open', async () => { - browserWindow.webContents.setWindowOpenHandler(() => ({ action: 'deny' })); - browserWindow.webContents.executeJavaScript("window.open('https://127.0.0.1')"); - expect(await browserWindow.webContents.executeJavaScript('42')).to.equal(42); - }); + browserWindow.webContents.loadURL(`data:text/html,${encodeURIComponent(` +
+ +
+ + `)}`); + }); + const { url, frameName, features, disposition, referrer, postBody } = details; + expect(url).to.equal('http://example.com/'); + expect(frameName).to.equal(''); + expect(features).to.deep.equal(''); + expect(disposition).to.equal('foreground-tab'); + expect(referrer).to.deep.equal({ + policy: 'strict-origin-when-cross-origin', + url: '' + }); + expect(postBody).to.deep.equal({ + contentType: 'application/x-www-form-urlencoded', + data: [{ + type: 'rawData', + bytes: Buffer.from('key=value') + }] }); - } + }); + + it('does fire window creation events if an override returns action: allow', async () => { + browserWindow.webContents.setWindowOpenHandler(() => ({ action: 'allow' })); + + setImmediate(() => { + browserWindow.webContents.executeJavaScript("window.open('about:blank', '', 'show=no') && true"); + }); + + await Promise.all([ + emittedOnce(browserWindow.webContents, 'did-create-window'), + emittedOnce(browserWindow.webContents, 'new-window') + ]); + }); + + it('can change webPreferences of child windows', (done) => { + browserWindow.webContents.setWindowOpenHandler(() => ({ action: 'allow', overrideBrowserWindowOptions: { webPreferences: { defaultFontSize: 30 } } })); + + browserWindow.webContents.on('did-create-window', async (childWindow) => { + await childWindow.webContents.executeJavaScript("document.write('hello')"); + const size = await childWindow.webContents.executeJavaScript("getComputedStyle(document.querySelector('body')).fontSize"); + expect(size).to.equal('30px'); + done(); + }); + + browserWindow.webContents.executeJavaScript("window.open('about:blank', '', 'show=no') && true"); + }); + + it('does not hang parent window when denying window.open', async () => { + browserWindow.webContents.setWindowOpenHandler(() => ({ action: 'deny' })); + browserWindow.webContents.executeJavaScript("window.open('https://127.0.0.1')"); + expect(await browserWindow.webContents.executeJavaScript('42')).to.equal(42); + }); }); function stringifySnapshots (snapshots: any, pretty = false) { @@ -282,9 +236,6 @@ function stringifySnapshots (snapshots: any, pretty = false) { if (['sender', 'webContents'].includes(key)) { return '[WebContents]'; } - if (key === 'openerId' && typeof value === 'number') { - return 'placeholder-opener-id'; - } if (key === 'processId' && typeof value === 'number') { return 'placeholder-process-id'; } @@ -296,8 +247,5 @@ function stringifySnapshots (snapshots: any, pretty = false) { } function parseSnapshots (snapshotsJson: string) { - return JSON.parse(snapshotsJson, (key, value) => { - if (key === 'openerId' && value === 'placeholder-opener-id') return 1; - return value; - }); + return JSON.parse(snapshotsJson); } diff --git a/spec-main/webview-spec.ts b/spec-main/webview-spec.ts index 99a8d4e8d1b0c..bcb05b7206904 100644 --- a/spec-main/webview-spec.ts +++ b/spec-main/webview-spec.ts @@ -503,7 +503,7 @@ describe(' tag', function () { }); }); - describe('nativeWindowOpen option', () => { + describe('child windows', () => { let w: BrowserWindow; beforeEach(async () => { w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, webviewTag: true, contextIsolation: false } }); @@ -516,7 +516,7 @@ describe(' tag', function () { loadWebView(w.webContents, { allowpopups: 'on', nodeintegration: 'on', - webpreferences: 'nativeWindowOpen=1,contextIsolation=no', + webpreferences: 'contextIsolation=no', src: `file://${path.join(fixtures, 'api', 'native-window-open-blank.html')}` }); @@ -529,7 +529,7 @@ describe(' tag', function () { loadWebView(w.webContents, { allowpopups: 'on', nodeintegration: 'on', - webpreferences: 'nativeWindowOpen=1,contextIsolation=no', + webpreferences: 'contextIsolation=no', src: `file://${path.join(fixtures, 'api', 'native-window-open-file.html')}` }); @@ -541,7 +541,7 @@ describe(' tag', function () { // Don't wait for loading to finish. loadWebView(w.webContents, { nodeintegration: 'on', - webpreferences: 'nativeWindowOpen=1,contextIsolation=no', + webpreferences: 'contextIsolation=no', src: `file://${path.join(fixtures, 'api', 'native-window-open-no-allowpopups.html')}` }); @@ -554,7 +554,7 @@ describe(' tag', function () { loadWebView(w.webContents, { allowpopups: 'on', nodeintegration: 'on', - webpreferences: 'nativeWindowOpen=1,contextIsolation=no', + webpreferences: 'contextIsolation=no', src: `file://${path.join(fixtures, 'api', 'native-window-open-cross-origin.html')}` }); @@ -570,7 +570,7 @@ describe(' tag', function () { const attributes = { allowpopups: 'on', nodeintegration: 'on', - webpreferences: 'nativeWindowOpen=1,contextIsolation=no', + webpreferences: 'contextIsolation=no', src: `file://${fixtures}/pages/window-open.html` }; const { url, frameName } = await w.webContents.executeJavaScript(` @@ -594,7 +594,7 @@ describe(' tag', function () { // Don't wait for loading to finish. loadWebView(w.webContents, { allowpopups: 'on', - webpreferences: 'nativeWindowOpen=1,contextIsolation=no', + webpreferences: 'contextIsolation=no', src: `file://${fixtures}/pages/window-open.html` }); @@ -607,7 +607,7 @@ describe(' tag', function () { loadWebView(w.webContents, { allowpopups: 'on', - webpreferences: 'nativeWindowOpen=1,contextIsolation=no', + webpreferences: 'contextIsolation=no', src: `file://${fixtures}/pages/window-open.html` }); @@ -617,7 +617,6 @@ describe(' tag', function () { it('does not crash when creating window with noopener', async () => { loadWebView(w.webContents, { allowpopups: 'on', - webpreferences: 'nativeWindowOpen=1', src: `file://${path.join(fixtures, 'api', 'native-window-open-noopener.html')}` }); await emittedOnce(app, 'browser-window-created'); diff --git a/spec/webview-spec.js b/spec/webview-spec.js index ebc5ecab387d4..3cff1700b72c1 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -490,7 +490,6 @@ describe(' tag', function () { generateSpecs('without sandbox'); generateSpecs('with sandbox', 'sandbox=yes'); - generateSpecs('with nativeWindowOpen', 'nativeWindowOpen=yes'); }); describe('webpreferences attribute', () => { diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index 2f1521a9df4d3..d0e6f8e0b2ba2 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -45,7 +45,6 @@ declare namespace NodeJS { deleteHiddenValue(obj: any, key: string): void; requestGarbageCollectionForTesting(): void; runUntilIdle(): void; - isSameOrigin(a: string, b: string): boolean; triggerFatalErrorForTesting(): void; } @@ -108,9 +107,7 @@ declare namespace NodeJS { interface InternalWebPreferences { isWebView: boolean; hiddenPage: boolean; - nativeWindowOpen: boolean; nodeIntegration: boolean; - openerId: number; preload: string preloadScripts: string[]; webviewTag: boolean; diff --git a/typings/internal-electron.d.ts b/typings/internal-electron.d.ts index 20135dd4ea11c..0a0ab49b8fbb2 100644 --- a/typings/internal-electron.d.ts +++ b/typings/internal-electron.d.ts @@ -96,7 +96,6 @@ declare namespace Electron { } interface WebPreferences { - openerId?: number | null; disablePopups?: boolean; preloadURL?: string; embedder?: Electron.WebContents; From 5af6b898d92432369ce9495e75d75b02af651531 Mon Sep 17 00:00:00 2001 From: Mitchell Cohen Date: Thu, 6 Jan 2022 13:41:28 -0500 Subject: [PATCH 086/268] feat: add Substitutions menu roles on macOS (#32024) --- docs/api/menu-item.md | 6 ++++- lib/browser/api/menu-item-roles.ts | 25 ++++++++++++++++++- .../ui/cocoa/electron_menu_controller.mm | 4 +++ spec-main/api-menu-item-spec.ts | 12 ++++++--- 4 files changed, 42 insertions(+), 5 deletions(-) diff --git a/docs/api/menu-item.md b/docs/api/menu-item.md index 45727011f43c7..bd50f27777198 100644 --- a/docs/api/menu-item.md +++ b/docs/api/menu-item.md @@ -14,7 +14,7 @@ See [`Menu`](menu.md) for examples. * `menuItem` MenuItem * `browserWindow` [BrowserWindow](browser-window.md) | undefined - This will not be defined if no window is open. * `event` [KeyboardEvent](structures/keyboard-event.md) - * `role` string (optional) - Can be `undo`, `redo`, `cut`, `copy`, `paste`, `pasteAndMatchStyle`, `delete`, `selectAll`, `reload`, `forceReload`, `toggleDevTools`, `resetZoom`, `zoomIn`, `zoomOut`, `toggleSpellChecker`, `togglefullscreen`, `window`, `minimize`, `close`, `help`, `about`, `services`, `hide`, `hideOthers`, `unhide`, `quit`, `startSpeaking`, `stopSpeaking`, `zoom`, `front`, `appMenu`, `fileMenu`, `editMenu`, `viewMenu`, `shareMenu`, `recentDocuments`, `toggleTabBar`, `selectNextTab`, `selectPreviousTab`, `mergeAllWindows`, `clearRecentDocuments`, `moveTabToNewWindow` or `windowMenu` - Define the action of the menu item, when specified the + * `role` string (optional) - Can be `undo`, `redo`, `cut`, `copy`, `paste`, `pasteAndMatchStyle`, `delete`, `selectAll`, `reload`, `forceReload`, `toggleDevTools`, `resetZoom`, `zoomIn`, `zoomOut`, `toggleSpellChecker`, `togglefullscreen`, `window`, `minimize`, `close`, `help`, `about`, `services`, `hide`, `hideOthers`, `unhide`, `quit`, 'showSubstitutions', 'toggleSmartQuotes', 'toggleSmartDashes', 'toggleTextReplacement', `startSpeaking`, `stopSpeaking`, `zoom`, `front`, `appMenu`, `fileMenu`, `editMenu`, `viewMenu`, `shareMenu`, `recentDocuments`, `toggleTabBar`, `selectNextTab`, `selectPreviousTab`, `mergeAllWindows`, `clearRecentDocuments`, `moveTabToNewWindow` or `windowMenu` - Define the action of the menu item, when specified the `click` property will be ignored. See [roles](#roles). * `type` string (optional) - Can be `normal`, `separator`, `submenu`, `checkbox` or `radio`. @@ -100,6 +100,10 @@ The following additional roles are available on _macOS_: * `hide` - Map to the `hide` action. * `hideOthers` - Map to the `hideOtherApplications` action. * `unhide` - Map to the `unhideAllApplications` action. +* `showSubstitutions` - Map to the `orderFrontSubstitutionsPanel` action. +* `toggleSmartQuotes` - Map to the `toggleAutomaticQuoteSubstitution` action. +* `toggleSmartDashes` - Map to the `toggleAutomaticDashSubstitution` action. +* `toggleTextReplacement` - Map to the `toggleAutomaticTextReplacement` action. * `startSpeaking` - Map to the `startSpeaking` action. * `stopSpeaking` - Map to the `stopSpeaking` action. * `front` - Map to the `arrangeInFront` action. diff --git a/lib/browser/api/menu-item-roles.ts b/lib/browser/api/menu-item-roles.ts index 34ffe1b6e2cac..08157029dfc3f 100644 --- a/lib/browser/api/menu-item-roles.ts +++ b/lib/browser/api/menu-item-roles.ts @@ -5,7 +5,8 @@ const isWindows = process.platform === 'win32'; const isLinux = process.platform === 'linux'; type RoleId = 'about' | 'close' | 'copy' | 'cut' | 'delete' | 'forcereload' | 'front' | 'help' | 'hide' | 'hideothers' | 'minimize' | - 'paste' | 'pasteandmatchstyle' | 'quit' | 'redo' | 'reload' | 'resetzoom' | 'selectall' | 'services' | 'recentdocuments' | 'clearrecentdocuments' | 'startspeaking' | 'stopspeaking' | + 'paste' | 'pasteandmatchstyle' | 'quit' | 'redo' | 'reload' | 'resetzoom' | 'selectall' | 'services' | 'recentdocuments' | 'clearrecentdocuments' | + 'showsubstitutions' | 'togglesmartquotes' | 'togglesmartdashes' | 'toggletextreplacement' | 'startspeaking' | 'stopspeaking' | 'toggledevtools' | 'togglefullscreen' | 'undo' | 'unhide' | 'window' | 'zoom' | 'zoomin' | 'zoomout' | 'togglespellchecker' | 'appmenu' | 'filemenu' | 'editmenu' | 'viewmenu' | 'windowmenu' | 'sharemenu' interface Role { @@ -133,6 +134,18 @@ export const roleList: Record = { clearrecentdocuments: { label: 'Clear Menu' }, + showsubstitutions: { + label: 'Show Substitutions' + }, + togglesmartquotes: { + label: 'Smart Quotes' + }, + togglesmartdashes: { + label: 'Smart Dashes' + }, + toggletextreplacement: { + label: 'Text Replacement' + }, startspeaking: { label: 'Start Speaking' }, @@ -237,6 +250,16 @@ export const roleList: Record = { { role: 'delete' }, { role: 'selectAll' }, { type: 'separator' }, + { + label: 'Substitutions', + submenu: [ + { role: 'showSubstitutions' }, + { type: 'separator' }, + { role: 'toggleSmartQuotes' }, + { role: 'toggleSmartDashes' }, + { role: 'toggleTextReplacement' } + ] + }, { label: 'Speech', submenu: [ diff --git a/shell/browser/ui/cocoa/electron_menu_controller.mm b/shell/browser/ui/cocoa/electron_menu_controller.mm index 2c1462aa058b5..d2ffeb77637a3 100644 --- a/shell/browser/ui/cocoa/electron_menu_controller.mm +++ b/shell/browser/ui/cocoa/electron_menu_controller.mm @@ -50,6 +50,10 @@ {@selector(delete:), "delete"}, {@selector(pasteAndMatchStyle:), "pasteandmatchstyle"}, {@selector(selectAll:), "selectall"}, + {@selector(orderFrontSubstitutionsPanel:), "showsubstitutions"}, + {@selector(toggleAutomaticQuoteSubstitution:), "togglesmartquotes"}, + {@selector(toggleAutomaticDashSubstitution:), "togglesmartdashes"}, + {@selector(toggleAutomaticTextReplacement:), "toggletextreplacement"}, {@selector(startSpeaking:), "startspeaking"}, {@selector(stopSpeaking:), "stopspeaking"}, {@selector(performMiniaturize:), "minimize"}, diff --git a/spec-main/api-menu-item-spec.ts b/spec-main/api-menu-item-spec.ts index 4a3d501232efa..268c223ec0885 100644 --- a/spec-main/api-menu-item-spec.ts +++ b/spec-main/api-menu-item-spec.ts @@ -351,9 +351,15 @@ describe('MenuItems', () => { expect(item.submenu!.items[7].role).to.equal('delete'); expect(item.submenu!.items[8].role).to.equal('selectall'); expect(item.submenu!.items[9].type).to.equal('separator'); - expect(item.submenu!.items[10].label).to.equal('Speech'); - expect(item.submenu!.items[10].submenu!.items[0].role).to.equal('startspeaking'); - expect(item.submenu!.items[10].submenu!.items[1].role).to.equal('stopspeaking'); + expect(item.submenu!.items[10].label).to.equal('Substitutions'); + expect(item.submenu!.items[10].submenu!.items[0].role).to.equal('showsubstitutions'); + expect(item.submenu!.items[10].submenu!.items[1].type).to.equal('separator'); + expect(item.submenu!.items[10].submenu!.items[2].role).to.equal('togglesmartquotes'); + expect(item.submenu!.items[10].submenu!.items[3].role).to.equal('togglesmartdashes'); + expect(item.submenu!.items[10].submenu!.items[4].role).to.equal('toggletextreplacement'); + expect(item.submenu!.items[11].label).to.equal('Speech'); + expect(item.submenu!.items[11].submenu!.items[0].role).to.equal('startspeaking'); + expect(item.submenu!.items[11].submenu!.items[1].role).to.equal('stopspeaking'); } else { expect(item.submenu!.items[6].role).to.equal('delete'); expect(item.submenu!.items[7].type).to.equal('separator'); From a0153323429a6858cc257d17a68e103088a07ce7 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Thu, 6 Jan 2022 12:01:55 -0800 Subject: [PATCH 087/268] fix: drop nativeWindowOpen deprecation warning (#32370) --- lib/browser/api/web-contents.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index 60e1e7cadcda0..5705cec695a07 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -1,4 +1,4 @@ -import { app, ipcMain, session, deprecate, webFrameMain } from 'electron/main'; +import { app, ipcMain, session, webFrameMain } from 'electron/main'; import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/main'; import * as url from 'url'; @@ -733,11 +733,6 @@ WebContents.prototype._init = function () { } }); }); - - const prefs = this.getLastWebPreferences() || {}; - if (prefs.nativeWindowOpen === false) { - deprecate.log('Deprecation Warning: Disabling nativeWindowOpen is deprecated. The nativeWindowOpen option will be removed in Electron 18.'); - } } this.on('login', (event, ...args) => { From 88ae6c0635c435aa7637e769ad8bb96502ede016 Mon Sep 17 00:00:00 2001 From: Raymond Zhao Date: Fri, 7 Jan 2022 00:38:34 -0800 Subject: [PATCH 088/268] fix: Don't create console window when creating process (#32340) * fix: Don't create console window when creating process * Update patches/node/fix_don_t_create_console_window_when_creating_process.patch Co-authored-by: Robo * Remove extra line in description Co-authored-by: Robo --- patches/node/.patches | 1 + ...console_window_when_creating_process.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 patches/node/fix_don_t_create_console_window_when_creating_process.patch diff --git a/patches/node/.patches b/patches/node/.patches index a337ddbaf86dd..1343e5cda9701 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -26,3 +26,4 @@ chore_fix_-wimplicit-fallthrough.patch test_add_fixture_trim_option.patch fix_crash_caused_by_gethostnamew_on_windows_7.patch fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch +fix_don_t_create_console_window_when_creating_process.patch diff --git a/patches/node/fix_don_t_create_console_window_when_creating_process.patch b/patches/node/fix_don_t_create_console_window_when_creating_process.patch new file mode 100644 index 0000000000000..2ae896f558c86 --- /dev/null +++ b/patches/node/fix_don_t_create_console_window_when_creating_process.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Raymond Zhao +Date: Tue, 4 Jan 2022 16:11:41 -0800 +Subject: fix: Don't create console window when creating process + +This patch prevents console windows from being created during +execSync calls, or spawnSync calls where shell is true. Otherwise, +Windows users will see command prompts pop up for those calls. + +The patch has been upstreamed at https://github.com/nodejs/node/pull/41412. + +diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc +index 1141aceae984fba6ed07cd272a79d4007b9b03fe..afd08519d7f8974adff4060513f6160519a0b6b3 100644 +--- a/src/spawn_sync.cc ++++ b/src/spawn_sync.cc +@@ -810,6 +810,9 @@ Maybe SyncProcessRunner::ParseOptions(Local js_value) { + if (js_win_hide->BooleanValue(isolate)) + uv_process_options_.flags |= UV_PROCESS_WINDOWS_HIDE; + ++ if (env()->hide_console_windows()) ++ uv_process_options_.flags |= UV_PROCESS_WINDOWS_HIDE_CONSOLE; ++ + Local js_wva = + js_options->Get(context, env()->windows_verbatim_arguments_string()) + .ToLocalChecked(); From 7678a0aebb0fc539e9be4e9aa568fcc1393ab819 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Fri, 7 Jan 2022 09:52:47 +0100 Subject: [PATCH 089/268] chore: cleanup spec-main/ambient.d.ts (#32363) --- shell/browser/api/electron_api_web_contents.h | 1 - spec-main/ambient.d.ts | 12 +---------- spec-main/api-protocol-spec.ts | 4 ---- spec-main/api-web-contents-spec.ts | 21 +++++++++---------- spec-main/chromium-spec.ts | 2 -- 5 files changed, 11 insertions(+), 29 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 01cf5cb9095b3..8cd2a316d4c28 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -317,7 +317,6 @@ class WebContents : public ExclusiveAccessContext, std::vector GetPreloadPaths() const; // Returns the web preferences of current WebContents. - v8::Local GetWebPreferences(v8::Isolate* isolate) const; v8::Local GetLastWebPreferences(v8::Isolate* isolate) const; // Returns the owner window. diff --git a/spec-main/ambient.d.ts b/spec-main/ambient.d.ts index 36d9261b98b70..97fda55407db7 100644 --- a/spec-main/ambient.d.ts +++ b/spec-main/ambient.d.ts @@ -1,14 +1,4 @@ declare let standardScheme: string; - -declare namespace Electron { - interface WebContents { - getOwnerBrowserWindow(): BrowserWindow | null; - getWebPreferences(): WebPreferences | null; - } - - interface Session { - destroy(): void; - } -} +declare let serviceWorkerScheme: string; declare module 'dbus-native'; diff --git a/spec-main/api-protocol-spec.ts b/spec-main/api-protocol-spec.ts index 4f92a046b33fc..71437da6fe102 100644 --- a/spec-main/api-protocol-spec.ts +++ b/spec-main/api-protocol-spec.ts @@ -743,7 +743,6 @@ describe('protocol module', () => { }); describe('protocol.registerSchemesAsPrivileged allowServiceWorkers', () => { - const { serviceWorkerScheme } = global as any; protocol.registerStringProtocol(serviceWorkerScheme, (request, cb) => { if (request.url.endsWith('.js')) { cb({ @@ -773,7 +772,6 @@ describe('protocol module', () => { }); describe('protocol.registerSchemesAsPrivileged standard', () => { - const standardScheme = (global as any).standardScheme; const origin = `${standardScheme}://fake-host`; const imageURL = `${origin}/test.png`; const filePath = path.join(fixturesPath, 'pages', 'b.html'); @@ -854,7 +852,6 @@ describe('protocol module', () => { }); describe('protocol.registerSchemesAsPrivileged cors-fetch', function () { - const standardScheme = (global as any).standardScheme; let w: BrowserWindow = null as unknown as BrowserWindow; beforeEach(async () => { w = new BrowserWindow({ show: false }); @@ -957,7 +954,6 @@ describe('protocol module', () => { const pagePath = path.join(fixturesPath, 'pages', 'video.html'); const videoSourceImagePath = path.join(fixturesPath, 'video-source-image.webp'); const videoPath = path.join(fixturesPath, 'video.webm'); - const standardScheme = (global as any).standardScheme; let w: BrowserWindow = null as unknown as BrowserWindow; before(async () => { diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index c8e325dab76ae..c4aa16b67729b 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -893,7 +893,6 @@ describe('webContents module', () => { }); describe('zoom api', () => { - const scheme = (global as any).standardScheme; const hostZoomMap: Record = { host1: 0.3, host2: 0.7, @@ -902,7 +901,7 @@ describe('webContents module', () => { before(() => { const protocol = session.defaultSession.protocol; - protocol.registerStringProtocol(scheme, (request, callback) => { + protocol.registerStringProtocol(standardScheme, (request, callback) => { const response = ` @@ -76,7 +76,7 @@ } function getJSOverlayProperties() { - const {x, y, width, height} = navigator.windowControlsOverlay.getBoundingClientRect(); + const {x, y, width, height} = navigator.windowControlsOverlay.getTitlebarAreaRect(); return {x, y, width, height}; } From d640260592b325a11fb9c70a94eab9bfce4a5bb2 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 05:01:39 -0800 Subject: [PATCH 100/268] Bump v18.0.0-nightly.20220111 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 3019e14c4cb56..f5d516358f662 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220110 \ No newline at end of file +18.0.0-nightly.20220111 \ No newline at end of file diff --git a/package.json b/package.json index 87ac1ecdbb845..97c72d18e4c6d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220110", + "version": "18.0.0-nightly.20220111", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 7a2fa8ed5edc9..55c25b0cf3503 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220110 - PRODUCTVERSION 18,0,0,20220110 + FILEVERSION 18,0,0,20220111 + PRODUCTVERSION 18,0,0,20220111 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From cb927af4554c00e3b2a1639f46d811f53001f4e1 Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 10:12:30 -0600 Subject: [PATCH 101/268] chore: bump node to v16.13.2 (main) (#32418) * chore: bump node in DEPS to v16.13.2 * chore: update patches Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> --- DEPS | 2 +- patches/node/build_add_gn_build_files.patch | 2 +- ...dle_boringssl_and_openssl_incompatibilities.patch | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/DEPS b/DEPS index 199b1754b9792..858f9f05f58f6 100644 --- a/DEPS +++ b/DEPS @@ -17,7 +17,7 @@ vars = { 'chromium_version': '99.0.4767.0', 'node_version': - 'v16.13.1', + 'v16.13.2', 'nan_version': # The following commit hash of NAN is v2.14.2 with *only* changes to the # test suite. This should be updated to a specific tag when one becomes diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index e05cb57aca8c1..3d78f40a42624 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -1778,7 +1778,7 @@ index 0000000000000000000000000000000000000000..d1d6b51e8c0c5bc6a5d09e217eb30483 + args = rebase_path(inputs + outputs, root_build_dir) +} diff --git a/src/node_version.h b/src/node_version.h -index e46385fd509a4852e3e2ded064fd2b84d95921a4..fa098c7bf3aaa08c060ea014b7a96b719fea6abf 100644 +index 31e75367f8263f575f37243475acb58bb5c40d04..8f102792fe66847dad0ba7176299cf09686cd182 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -89,7 +89,10 @@ diff --git a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch index 51914f82b814e..a91c0a3cdd949 100644 --- a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch +++ b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch @@ -17,10 +17,10 @@ Upstreams: - https://github.com/nodejs/node/pull/39136 diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc -index cc03fddd464b09dd3647e3f5183dc3c49affc94f..3aa6b40ab9b10cdd56002e9f020a6f6b1ae02222 100644 +index fe828bafa6422cc1f1717afddbd4b199055e9c43..74c56954e5e2d8efc3d8495860addc0138f39f3a 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc -@@ -244,7 +244,7 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) { +@@ -176,7 +176,7 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) { const unsigned char* buf; size_t len; size_t rem; @@ -29,7 +29,7 @@ index cc03fddd464b09dd3647e3f5183dc3c49affc94f..3aa6b40ab9b10cdd56002e9f020a6f6b if (!SSL_client_hello_get0_ext( ssl.get(), TLSEXT_TYPE_application_layer_protocol_negotiation, -@@ -257,13 +257,15 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) { +@@ -189,13 +189,15 @@ const char* GetClientHelloALPN(const SSLPointer& ssl) { len = (buf[0] << 8) | buf[1]; if (len + 2 != rem) return nullptr; return reinterpret_cast(buf + 3); @@ -46,7 +46,7 @@ index cc03fddd464b09dd3647e3f5183dc3c49affc94f..3aa6b40ab9b10cdd56002e9f020a6f6b if (!SSL_client_hello_get0_ext( ssl.get(), TLSEXT_TYPE_server_name, -@@ -285,6 +287,8 @@ const char* GetClientHelloServerName(const SSLPointer& ssl) { +@@ -217,6 +219,8 @@ const char* GetClientHelloServerName(const SSLPointer& ssl) { if (len + 2 > rem) return nullptr; return reinterpret_cast(buf + 5); @@ -55,7 +55,7 @@ index cc03fddd464b09dd3647e3f5183dc3c49affc94f..3aa6b40ab9b10cdd56002e9f020a6f6b } const char* GetServerName(SSL* ssl) { -@@ -292,7 +296,10 @@ const char* GetServerName(SSL* ssl) { +@@ -224,7 +228,10 @@ const char* GetServerName(SSL* ssl) { } bool SetGroups(SecureContext* sc, const char* groups) { @@ -66,7 +66,7 @@ index cc03fddd464b09dd3647e3f5183dc3c49affc94f..3aa6b40ab9b10cdd56002e9f020a6f6b } const char* X509ErrorCode(long err) { // NOLINT(runtime/int) -@@ -771,14 +778,14 @@ MaybeLocal GetClientHelloCiphers( +@@ -1117,14 +1124,14 @@ MaybeLocal GetClientHelloCiphers( Environment* env, const SSLPointer& ssl) { EscapableHandleScope scope(env->isolate()); From 5d90ff083fb76d2172e09edd5b58eb6c373bb352 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 11 Jan 2022 13:24:54 -0600 Subject: [PATCH 102/268] build: pin colors to v1.4.0 in package.json (#32420) --- package.json | 4 ++-- yarn.lock | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 97c72d18e4c6d..4e3935d6b9e0a 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "asar": "^3.1.0", "aws-sdk": "^2.814.0", "check-for-leaks": "^1.2.1", - "colors": "^1.4.0", + "colors": "1.4.0", "dotenv-safe": "^4.0.4", "dugite": "^1.103.0", "eslint": "^7.4.0", @@ -141,4 +141,4 @@ "node script/gen-hunspell-filenames.js" ] } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 84fedf4790b0a..8a9863b918391 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1700,16 +1700,16 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colors@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + colors@^1.1.2: version "1.3.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== -colors@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - commander@^2.20.0, commander@^2.9.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" From 94db8cd45ecb7a7d149ca73ad2ab0206cac5a9aa Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 11 Jan 2022 11:27:24 -0800 Subject: [PATCH 103/268] chore: update notification provenance patch (#32415) --- .../chromium/notification_provenance.patch | 34 ++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index fd478384514d0..78dad69115f51 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -3,9 +3,33 @@ From: Jeremy Apthorp Date: Fri, 5 Oct 2018 14:22:06 -0700 Subject: notification_provenance.patch -Pass RenderProcessHost through to PlatformNotificationService +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 e2aec3c3faf1dc35788c577b10f2944097a3b020..0c2ce17a3ce7ff70f47485b85fa8c70e8a1230b2 100644 +--- a/chrome/browser/notifications/platform_notification_service_impl.cc ++++ b/chrome/browser/notifications/platform_notification_service_impl.cc +@@ -196,6 +196,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( + + // TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close) + void PlatformNotificationServiceImpl::DisplayNotification( ++ content::RenderFrameHost* render_frame_host, + const std::string& notification_id, + 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 b0e64049d411305d58802fd290bb0480e9b36fee..4afcf3b7a5b841409b0e1c4c2f32fd4878f12768 100644 +--- a/chrome/browser/notifications/platform_notification_service_impl.h ++++ b/chrome/browser/notifications/platform_notification_service_impl.h +@@ -56,6 +56,7 @@ class PlatformNotificationServiceImpl + + // content::PlatformNotificationService implementation. + void DisplayNotification( ++ content::RenderFrameHost* render_frame_host, + const std::string& notification_id, + const GURL& origin, + const GURL& document_url, diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc index 442b856f8bcfbcea7742188897f0ce0a25cd60f4..6165eb772901faa25514c9bbefd13ff6b45d6b33 100644 --- a/content/browser/notifications/blink_notification_service_impl.cc @@ -141,26 +165,26 @@ index 9646cbeb31141e3518f51482801431f3a6010360..b13b6ab07b4931b892749c84879d9a6a const GURL& origin, const GURL& document_url, diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc -index 7397963a36bec7016ae92fbc4bb741825e5fb8d1..d928e1ea629cd69ff188ce53e311786acc069222 100644 +index 7397963a36bec7016ae92fbc4bb741825e5fb8d1..d1818311fd657d3c099cdce41898daf4ab3ede8b 100644 --- a/content/test/mock_platform_notification_service.cc +++ b/content/test/mock_platform_notification_service.cc @@ -29,6 +29,7 @@ MockPlatformNotificationService::MockPlatformNotificationService( MockPlatformNotificationService::~MockPlatformNotificationService() = default; void MockPlatformNotificationService::DisplayNotification( -+ RenderProcessHost* render_process_host, ++ RenderFrameHost* render_frame_host, const std::string& notification_id, const GURL& origin, const GURL& document_url, diff --git a/content/test/mock_platform_notification_service.h b/content/test/mock_platform_notification_service.h -index 45ad11f0fc5f0abebbc05836221528e59da6c26b..a78bde7fbec5f3fe3ed59a6b45265a1a02206764 100644 +index 45ad11f0fc5f0abebbc05836221528e59da6c26b..7f914f69d597dbd149d554dc0282c27ed234c7ed 100644 --- a/content/test/mock_platform_notification_service.h +++ b/content/test/mock_platform_notification_service.h @@ -52,6 +52,7 @@ class MockPlatformNotificationService : public PlatformNotificationService { // PlatformNotificationService implementation. void DisplayNotification( -+ RenderProcessHost* render_process_host, ++ RenderFrameHost* render_frame_host, const std::string& notification_id, const GURL& origin, const GURL& document_url, From 2bbba9e2423bf6e99dc7c4269cc4caf4572f7548 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 11 Jan 2022 23:39:30 -0800 Subject: [PATCH 104/268] chore: fix incorrect usage of reference (#32413) --- ...ide_iswebcontentscreationoverridden_with_full_params.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 6b5577858e5a8..2480d28370db8 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -108,7 +108,7 @@ index 6688ba8ba2fb7d930773144cdbc43f1f6fa2b685..22015c7b9b50e1264551ce226757f90e } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index da521ddb3d244d264f11f42a86dce97ba84fac55..bc4b2a73fe790fb59eac87d4487a831ccea6f6a2 100644 +index da521ddb3d244d264f11f42a86dce97ba84fac55..8f12ce6257f72786c96428fbbd6040fdf0b87025 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -1762,12 +1762,11 @@ bool Browser::IsWebContentsCreationOverridden( @@ -122,7 +122,7 @@ index da521ddb3d244d264f11f42a86dce97ba84fac55..bc4b2a73fe790fb59eac87d4487a831c content::mojom::WindowContainerType::BACKGROUND && ShouldCreateBackgroundContents(source_site_instance, opener_url, - frame_name); -+ params->frame_name); ++ params.frame_name); } WebContents* Browser::CreateCustomWebContents( From cbe68bdbb875c6ce963e2b8ee1cd930fb44ad4f0 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 11 Jan 2022 23:39:49 -0800 Subject: [PATCH 105/268] chore: update DesktopMediaList patch (#32414) --- patches/chromium/desktop_media_list.patch | 35 +++++++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 7d2ee4bd3b68c..a2b70a8a8fe6d 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -8,15 +8,16 @@ Subject: desktop_media_list.patch * Ensure "OnRefreshComplete()" even if there are no items in the list diff --git a/chrome/browser/media/webrtc/desktop_media_list.h b/chrome/browser/media/webrtc/desktop_media_list.h -index 57cfc646f8ea545271c22d79ec158a04b148bc9c..db4d608d3bed841ddf7225d0918e82112c8d08b5 100644 +index 57cfc646f8ea545271c22d79ec158a04b148bc9c..c5339603930f68e7019ca33d8b9f148cf4ac86af 100644 --- a/chrome/browser/media/webrtc/desktop_media_list.h +++ b/chrome/browser/media/webrtc/desktop_media_list.h -@@ -94,7 +94,7 @@ class DesktopMediaList { +@@ -94,7 +94,8 @@ class DesktopMediaList { // once per DesktopMediaList instance. It should not be called after // StartUpdating(), and StartUpdating() should not be called until |callback| // has been called. - virtual void Update(UpdateCallback callback) = 0; -+ virtual void Update(UpdateCallback callback, bool fetch_thumbnails = false) = 0; ++ virtual void Update(UpdateCallback callback, ++ bool refresh_thumbnails = false) = 0; virtual int GetSourceCount() const = 0; virtual const Source& GetSource(int index) const = 0; @@ -52,6 +53,34 @@ index c56bc6dcc73cf0e0d5e0e64d45436ccac833cd66..69aaecca38ede55ee71310698710e3f1 int GetSourceCount() const override; const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; +diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.cc b/chrome/browser/media/webrtc/fake_desktop_media_list.cc +index b1db454db6b7982962541cef18c09425b8f5fa5a..1e37f85d7f786807af331ccc347d84d9b4d7177c 100644 +--- a/chrome/browser/media/webrtc/fake_desktop_media_list.cc ++++ b/chrome/browser/media/webrtc/fake_desktop_media_list.cc +@@ -75,7 +75,8 @@ void FakeDesktopMediaList::StartUpdating(DesktopMediaListObserver* observer) { + thumbnail_ = gfx::ImageSkia::CreateFrom1xBitmap(bitmap); + } + +-void FakeDesktopMediaList::Update(UpdateCallback callback) { ++void FakeDesktopMediaList::Update(UpdateCallback callback, ++ bool refresh_thumbnails) { + std::move(callback).Run(); + } + +diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.h b/chrome/browser/media/webrtc/fake_desktop_media_list.h +index 1e4a652634fbde2ca9a256baca840bbc5a0e001f..546f5bc3a2f79035f0eec196d9e704b849992a6f 100644 +--- a/chrome/browser/media/webrtc/fake_desktop_media_list.h ++++ b/chrome/browser/media/webrtc/fake_desktop_media_list.h +@@ -32,7 +32,8 @@ class FakeDesktopMediaList : public DesktopMediaList { + void SetThumbnailSize(const gfx::Size& thumbnail_size) override; + void SetViewDialogWindowId(content::DesktopMediaID dialog_id) override; + void StartUpdating(DesktopMediaListObserver* observer) override; +- void Update(UpdateCallback callback) override; ++ void Update(UpdateCallback callback, ++ bool refresh_thumbnails = false) override; + int GetSourceCount() const override; + const Source& GetSource(int index) const override; + DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..ab2dcc4d5fa19790114cae9611aa815e48386bb7 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc From 99ee1fc0eba003e6d5791e11880fa6c06e509a59 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Wed, 12 Jan 2022 08:41:20 +0100 Subject: [PATCH 106/268] fix: will-attach-webview handler modifying params.instanceId does not break (#32386) --- lib/browser/guest-view-manager.ts | 30 +++++++++++++++----------- lib/renderer/web-view/web-view-impl.ts | 4 +--- spec/static/main.js | 6 ++++++ spec/webview-spec.js | 8 +++++++ typings/internal-electron.d.ts | 2 +- 5 files changed, 34 insertions(+), 16 deletions(-) diff --git a/lib/browser/guest-view-manager.ts b/lib/browser/guest-view-manager.ts index fd6a0ac0d3704..c973586e807d5 100644 --- a/lib/browser/guest-view-manager.ts +++ b/lib/browser/guest-view-manager.ts @@ -73,6 +73,17 @@ function makeWebPreferences (embedder: Electron.WebContents, params: Record) { + const opts: Electron.LoadURLOptions = {}; + if (params.httpreferrer) { + opts.httpReferrer = params.httpreferrer; + } + if (params.useragent) { + opts.userAgent = params.useragent; + } + return opts; +} + // Create a new guest instance. const createGuest = function (embedder: Electron.WebContents, embedderFrameId: number, elementInstanceId: number, params: Record) { // eslint-disable-next-line no-undef @@ -96,7 +107,7 @@ const createGuest = function (embedder: Electron.WebContents, embedderFrameId: n // Init guest web view after attached. guest.once('did-attach' as any, function (this: Electron.WebContents, event: Electron.Event) { - params = this.attachParams!; + const params = this.attachParams!; delete this.attachParams; const previouslyAttached = this.viewInstanceId != null; @@ -108,14 +119,7 @@ const createGuest = function (embedder: Electron.WebContents, embedderFrameId: n } if (params.src) { - const opts: Electron.LoadURLOptions = {}; - if (params.httpreferrer) { - opts.httpReferrer = params.httpreferrer; - } - if (params.useragent) { - opts.userAgent = params.useragent; - } - this.loadURL(params.src, opts); + this.loadURL(params.src, params.opts); } embedder.emit('did-attach-webview', event, guest); }); @@ -204,13 +208,15 @@ const attachGuest = function (embedder: Electron.WebContents, embedderFrameId: n return false; } + const { instanceId } = params; + // If this guest is already attached to an element then remove it if (guestInstance.elementInstanceId) { const oldKey = `${guestInstance.embedder.id}-${guestInstance.elementInstanceId}`; embedderElementsMap.delete(oldKey); // Remove guest from embedder if moving across web views - if (guest.viewInstanceId !== params.instanceId) { + if (guest.viewInstanceId !== instanceId) { webViewManager.removeGuest(guestInstance.embedder, guestInstanceId); guestInstance.embedder._sendInternal(`${IPC_MESSAGES.GUEST_VIEW_INTERNAL_DESTROY_GUEST}-${guest.viewInstanceId}`); } @@ -221,12 +227,12 @@ const attachGuest = function (embedder: Electron.WebContents, embedderFrameId: n const event = eventBinding.createWithSender(embedder); embedder.emit('will-attach-webview', event, webPreferences, params); if (event.defaultPrevented) { - if (guest.viewInstanceId == null) guest.viewInstanceId = params.instanceId; + if (guest.viewInstanceId == null) guest.viewInstanceId = instanceId; guest.destroy(); return false; } - guest.attachParams = params; + guest.attachParams = { instanceId, src: params.src, opts: makeLoadURLOptions(params) }; embedderElementsMap.set(key, guestInstanceId); guest.setEmbedder(embedder); diff --git a/lib/renderer/web-view/web-view-impl.ts b/lib/renderer/web-view/web-view-impl.ts index d12eff2f69b94..691b477e1bdb2 100644 --- a/lib/renderer/web-view/web-view-impl.ts +++ b/lib/renderer/web-view/web-view-impl.ts @@ -25,7 +25,6 @@ export class WebViewImpl { public hasFocus = false public internalInstanceId?: number; public resizeObserver?: ResizeObserver; - public userAgentOverride?: string; public viewInstanceId: number // on* Event handlers. @@ -180,8 +179,7 @@ export class WebViewImpl { buildParams () { const params: Record = { - instanceId: this.viewInstanceId, - userAgentOverride: this.userAgentOverride + instanceId: this.viewInstanceId }; for (const [attributeName, attribute] of this.attributes) { diff --git a/spec/static/main.js b/spec/static/main.js index f259a3612fd31..28ec06f524cc7 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -138,6 +138,12 @@ ipcMain.on('prevent-next-will-attach-webview', (event) => { event.sender.once('will-attach-webview', event => event.preventDefault()); }); +ipcMain.on('break-next-will-attach-webview', (event, id) => { + event.sender.once('will-attach-webview', (event, webPreferences, params) => { + params.instanceId = null; + }); +}); + ipcMain.on('disable-node-on-next-will-attach-webview', (event, id) => { event.sender.once('will-attach-webview', (event, webPreferences, params) => { params.src = `file://${path.join(__dirname, '..', 'fixtures', 'pages', 'c.html')}`; diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 3cff1700b72c1..2ded4b0fdedcc 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -1163,6 +1163,14 @@ describe(' tag', function () { }); }); + it('handler modifying params.instanceId does not break ', async () => { + ipcRenderer.send('break-next-will-attach-webview'); + + await startLoadingWebViewAndWaitForMessage(webview, { + src: `file://${fixtures}/pages/a.html` + }); + }); + it('supports preventing a webview from being created', async () => { ipcRenderer.send('prevent-next-will-attach-webview'); diff --git a/typings/internal-electron.d.ts b/typings/internal-electron.d.ts index 0a0ab49b8fbb2..666775c16a257 100644 --- a/typings/internal-electron.d.ts +++ b/typings/internal-electron.d.ts @@ -81,7 +81,7 @@ declare namespace Electron { attachToIframe(embedderWebContents: Electron.WebContents, embedderFrameId: number): void; detachFromOuterFrame(): void; setEmbedder(embedder: Electron.WebContents): void; - attachParams?: Record; + attachParams?: { instanceId: number; src: string, opts: LoadURLOptions }; viewInstanceId: number; } From de436f040fa6125bafbbabc459e88f97cdbc97c9 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 12 Jan 2022 05:01:36 -0800 Subject: [PATCH 107/268] Bump v18.0.0-nightly.20220112 --- ELECTRON_VERSION | 2 +- package.json | 4 ++-- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index f5d516358f662..efccecb8a96be 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220111 \ No newline at end of file +18.0.0-nightly.20220112 \ No newline at end of file diff --git a/package.json b/package.json index 4e3935d6b9e0a..0ac9e401accf6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220111", + "version": "18.0.0-nightly.20220112", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -141,4 +141,4 @@ "node script/gen-hunspell-filenames.js" ] } -} +} \ No newline at end of file diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 55c25b0cf3503..8fcae67c85e45 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220111 - PRODUCTVERSION 18,0,0,20220111 + FILEVERSION 18,0,0,20220112 + PRODUCTVERSION 18,0,0,20220112 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 0a7bc4f5d147f0aafe5a8ada0054485bc2a45514 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 12 Jan 2022 10:44:28 -0800 Subject: [PATCH 108/268] feat: expose blowfish cipher family (#32356) Closes #20238 --- patches/boringssl/.patches | 1 + .../boringssl/expose_blowfish_ciphers.patch | 47 +++++++++++++++++++ patches/chromium/boringssl_build_gn.patch | 7 +-- spec/node-spec.js | 6 +++ 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 patches/boringssl/expose_blowfish_ciphers.patch diff --git a/patches/boringssl/.patches b/patches/boringssl/.patches index a812a6b79a6dc..a6b762255d86e 100644 --- a/patches/boringssl/.patches +++ b/patches/boringssl/.patches @@ -2,3 +2,4 @@ expose_ripemd160.patch expose_aes-cfb.patch expose_des-ede3.patch fix_sync_evp_get_cipherbynid_and_evp_get_cipherbyname.patch +expose_blowfish_ciphers.patch diff --git a/patches/boringssl/expose_blowfish_ciphers.patch b/patches/boringssl/expose_blowfish_ciphers.patch new file mode 100644 index 0000000000000..cb6239201dc4d --- /dev/null +++ b/patches/boringssl/expose_blowfish_ciphers.patch @@ -0,0 +1,47 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Wed, 5 Jan 2022 13:08:10 -0800 +Subject: expose blowfish ciphers + +This exposes the (decrepit) blowfish cipher family, bf-cbc, bf-cfb and +bf-ecb through the EVP interface. This adds references to decrepit code +from non-decrepit code, so upstream is unlikely to take the patch. + +diff --git a/crypto/cipher_extra/cipher_extra.c b/crypto/cipher_extra/cipher_extra.c +index cfdb69e3c556fea11aa7c2d28d4b7da524df15c3..95bd172c99874610ec9157c52df4fe0232e78c7f 100644 +--- a/crypto/cipher_extra/cipher_extra.c ++++ b/crypto/cipher_extra/cipher_extra.c +@@ -89,6 +89,9 @@ static const struct { + {NID_aes_256_ecb, "aes-256-ecb", EVP_aes_256_ecb}, + {NID_aes_256_gcm, "aes-256-gcm", EVP_aes_256_gcm}, + {NID_aes_256_ofb128, "aes-256-ofb", EVP_aes_256_ofb}, ++ {NID_bf_cbc, "bf-cbc", EVP_bf_cbc}, ++ {NID_bf_cfb64, "bf-cfb", EVP_bf_cfb}, ++ {NID_bf_ecb, "bf-ecb", EVP_bf_ecb}, + {NID_des_cbc, "des-cbc", EVP_des_cbc}, + {NID_des_ecb, "des-ecb", EVP_des_ecb}, + {NID_des_ede_cbc, "des-ede-cbc", EVP_des_ede_cbc}, +diff --git a/decrepit/evp/evp_do_all.c b/decrepit/evp/evp_do_all.c +index 5e71420b765019edea82a33884ace539cd91bda5..43fc792697519325725e9ce87801c5dc176c70a1 100644 +--- a/decrepit/evp/evp_do_all.c ++++ b/decrepit/evp/evp_do_all.c +@@ -36,6 +36,9 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher, + callback(EVP_aes_128_gcm(), "AES-128-GCM", NULL, arg); + callback(EVP_aes_192_gcm(), "AES-192-GCM", NULL, arg); + callback(EVP_aes_256_gcm(), "AES-256-GCM", NULL, arg); ++ callback(EVP_bf_cbc(), "BF-CBC", NULL, arg); ++ callback(EVP_bf_cfb(), "BF-CFB", NULL, arg); ++ callback(EVP_bf_ecb(), "BF-ECB", NULL, arg); + callback(EVP_des_cbc(), "DES-CBC", NULL, arg); + callback(EVP_des_ecb(), "DES-ECB", NULL, arg); + callback(EVP_des_ede(), "DES-EDE", NULL, arg); +@@ -63,6 +66,9 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher, + callback(EVP_aes_128_gcm(), "aes-128-gcm", NULL, arg); + callback(EVP_aes_192_gcm(), "aes-192-gcm", NULL, arg); + callback(EVP_aes_256_gcm(), "aes-256-gcm", NULL, arg); ++ callback(EVP_bf_cbc(), "bf-cbc", NULL, arg); ++ callback(EVP_bf_cfb(), "bf-cfb", NULL, arg); ++ callback(EVP_bf_ecb(), "bf-ecb", NULL, arg); + callback(EVP_des_cbc(), "des-cbc", NULL, arg); + callback(EVP_des_ecb(), "des-ecb", NULL, arg); + callback(EVP_des_ede(), "des-ede", NULL, arg); diff --git a/patches/chromium/boringssl_build_gn.patch b/patches/chromium/boringssl_build_gn.patch index 1a2c2bd29f2dd..309ff79d0a556 100644 --- a/patches/chromium/boringssl_build_gn.patch +++ b/patches/chromium/boringssl_build_gn.patch @@ -6,10 +6,10 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index 91ce539f2cdf3c17645126088ecb00e36befd1b8..8f3c9ccc10f8204c21d1f28444eef77724255aa9 100644 +index 91ce539f2cdf3c17645126088ecb00e36befd1b8..8e1d78fdb56372836cea73e35cb4e03059cf5ec5 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn -@@ -47,6 +47,19 @@ config("no_asm_config") { +@@ -47,6 +47,20 @@ config("no_asm_config") { all_sources = crypto_sources + ssl_sources all_headers = crypto_headers + ssl_headers @@ -21,9 +21,10 @@ index 91ce539f2cdf3c17645126088ecb00e36befd1b8..8f3c9ccc10f8204c21d1f28444eef777 + ] + + all_sources += [ ++ "src/decrepit/blowfish/blowfish.c", ++ "src/decrepit/cfb/cfb.c", + "src/decrepit/ripemd/internal.h", + "src/decrepit/ripemd/ripemd.c", -+ "src/decrepit/cfb/cfb.c", + ] +} diff --git a/spec/node-spec.js b/spec/node-spec.js index 7437143554a66..05af8764c08c6 100644 --- a/spec/node-spec.js +++ b/spec/node-spec.js @@ -396,6 +396,12 @@ describe('node feature', () => { require('crypto').createCipheriv('aes-256-cfb', '0123456789abcdef0123456789abcdef', '0123456789abcdef'); }); + it('should be able to create a bf-{cbc,cfb,ecb} ciphers', () => { + require('crypto').createCipheriv('bf-cbc', Buffer.from('0123456789abcdef'), Buffer.from('01234567')); + require('crypto').createCipheriv('bf-cfb', Buffer.from('0123456789abcdef'), Buffer.from('01234567')); + require('crypto').createCipheriv('bf-ecb', Buffer.from('0123456789abcdef'), Buffer.from('01234567')); + }); + it('should list des-ede-cbc in getCiphers', () => { expect(require('crypto').getCiphers()).to.include('des-ede-cbc'); }); From 506d82a90221905a1380b8b848e0e44f5300a4f3 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Wed, 12 Jan 2022 16:41:06 -0800 Subject: [PATCH 109/268] chore: update IsWebContentsCreationOverridden patch (#32421) --- ...tscreationoverridden_with_full_params.patch | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 2480d28370db8..ae811011c4ef2 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -168,6 +168,20 @@ index b6833e34c5840a4d3a545d1c4a44b2b08d7fc9ea..5ebc16a3545a73e58516cb0fbdddca43 // The profile used for the presentation. raw_ptr 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 2c560d379ee6c08465455ea1dc2c5a59ddb65487..4fd703722db5d679b08acdb8fc080b089dd8c433 100644 +--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc ++++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc +@@ -70,8 +70,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView { + content::SiteInstance* source_site_instance, + content::mojom::WindowContainerType window_container_type, + const GURL& opener_url, +- const std::string& frame_name, +- const GURL& target_url) override { ++ const content::mojom::CreateNewWindowParams& params) override { + return true; + } + 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 1aec422b4c83b823c92d76847366fe0d4d04cd00..ea8354f49b14631cf8671decc1ee96beb18d9561 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc @@ -358,7 +372,7 @@ index 38b5f8871464fc59c26e619dc2cdcc00711e2ce5..1ba0ac9d291a06f8a23e814742c38fdf 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 6fa4fa667839531f3ca6ca80f8bf17e135739688..65ad95abf4459a342194ea0d970d6b268024d87f 100644 +index 6fa4fa667839531f3ca6ca80f8bf17e135739688..bf56fbe1b7aee1a41a18d1cd98641034ba97a903 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc @@ -177,8 +177,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { @@ -367,7 +381,7 @@ index 6fa4fa667839531f3ca6ca80f8bf17e135739688..65ad95abf4459a342194ea0d970d6b26 const GURL& opener_url, - const std::string& frame_name, - const GURL& target_url) override { -+ const mojom::CreateNewWindowParams& params) override { ++ const content::mojom::CreateNewWindowParams& params) override { return headless_web_contents_->browser_context() ->options() ->block_new_web_contents(); From f4548985f481691d40352b6e12b9c41277cf992c Mon Sep 17 00:00:00 2001 From: Gellert Hegyi Date: Thu, 13 Jan 2022 01:42:42 +0100 Subject: [PATCH 110/268] fix: use setAspectRatio for frameless window on mac (#32287) * fix(window): setAspectRatio for frameless windows * dummy * undo dummy Co-authored-by: Jeremy Rose --- shell/browser/native_window_mac.mm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 6dfba95f44e19..07d0999777c76 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -1600,10 +1600,15 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) { NativeWindow::SetAspectRatio(aspect_ratio, extra_size); // Reset the behaviour to default if aspect_ratio is set to 0 or less. - if (aspect_ratio > 0.0) - [window_ setContentAspectRatio:NSMakeSize(aspect_ratio, 1.0)]; - else + if (aspect_ratio > 0.0) { + NSSize aspect_ratio_size = NSMakeSize(aspect_ratio, 1.0); + if (has_frame()) + [window_ setContentAspectRatio:aspect_ratio_size]; + else + [window_ setAspectRatio:aspect_ratio_size]; + } else { [window_ setResizeIncrements:NSMakeSize(1.0, 1.0)]; + } } void NativeWindowMac::PreviewFile(const std::string& path, From ddd66543f72b9a4296b8f9094b1667055d130bd6 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 12 Jan 2022 19:30:15 -0600 Subject: [PATCH 111/268] docs: explicitly allow string for MessageBoxOptions.icon (#32422) Fixes #32390. See #19782 for context. --- docs/api/dialog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/dialog.md b/docs/api/dialog.md index 90eed112c92df..bc536e15baee1 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -285,7 +285,7 @@ If `browserWindow` is not shown dialog will not be attached to it. In such case include a checkbox with the given label. * `checkboxChecked` boolean (optional) - Initial checked state of the checkbox. `false` by default. - * `icon` [NativeImage](native-image.md) (optional) + * `icon` ([NativeImage](native-image.md) | string) (optional) * `textWidth` Integer (optional) _macOS_ - Custom width of the text in the message box. * `cancelId` Integer (optional) - The index of the button to be used to cancel the dialog, via the `Esc` key. By default this is assigned to the first button with "cancel" or "no" as the From 1aaa0fad694948a1c53355af12fe1e5ccc3e3e3f Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 13 Jan 2022 05:01:31 -0800 Subject: [PATCH 112/268] Bump v18.0.0-nightly.20220113 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index efccecb8a96be..25895041ff7d1 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220112 \ No newline at end of file +18.0.0-nightly.20220113 \ No newline at end of file diff --git a/package.json b/package.json index 0ac9e401accf6..62765fffa902c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220112", + "version": "18.0.0-nightly.20220113", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 8fcae67c85e45..c1cce76706fa1 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220112 - PRODUCTVERSION 18,0,0,20220112 + FILEVERSION 18,0,0,20220113 + PRODUCTVERSION 18,0,0,20220113 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6c88e3b8e71408e095446a4e956e4cb087066041 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 13 Jan 2022 14:52:48 +0100 Subject: [PATCH 113/268] fix: optional postMessage transfer arg (#32433) --- shell/browser/api/electron_api_web_frame_main.cc | 2 +- shell/renderer/api/electron_api_ipc_renderer.cc | 2 +- spec-main/api-ipc-spec.ts | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/shell/browser/api/electron_api_web_frame_main.cc b/shell/browser/api/electron_api_web_frame_main.cc index c5a5945ba0a2a..e7ba32a33f782 100644 --- a/shell/browser/api/electron_api_web_frame_main.cc +++ b/shell/browser/api/electron_api_web_frame_main.cc @@ -210,7 +210,7 @@ void WebFrameMain::PostMessage(v8::Isolate* isolate, } std::vector> wrapped_ports; - if (transfer) { + if (transfer && !transfer.value()->IsUndefined()) { if (!gin::ConvertFromV8(isolate, *transfer, &wrapped_ports)) { isolate->ThrowException(v8::Exception::Error( gin::StringToV8(isolate, "Invalid value for transfer"))); diff --git a/shell/renderer/api/electron_api_ipc_renderer.cc b/shell/renderer/api/electron_api_ipc_renderer.cc index 8f983fd0f535f..74bf0e1dccc05 100644 --- a/shell/renderer/api/electron_api_ipc_renderer.cc +++ b/shell/renderer/api/electron_api_ipc_renderer.cc @@ -146,7 +146,7 @@ class IPCRenderer : public gin::Wrappable, } std::vector> transferables; - if (transfer) { + if (transfer && !transfer.value()->IsUndefined()) { if (!gin::ConvertFromV8(isolate, *transfer, &transferables)) { thrower.ThrowTypeError("Invalid value for transfer"); return; diff --git a/spec-main/api-ipc-spec.ts b/spec-main/api-ipc-spec.ts index 5b3963cc4a552..c25a01d320dc4 100644 --- a/spec-main/api-ipc-spec.ts +++ b/spec-main/api-ipc-spec.ts @@ -216,6 +216,18 @@ describe('ipc module', () => { expect(port).to.be.an.instanceOf(EventEmitter); }); + it('can sent a message without a transfer', async () => { + const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } }); + w.loadURL('about:blank'); + const p = emittedOnce(ipcMain, 'port'); + await w.webContents.executeJavaScript(`(${function () { + require('electron').ipcRenderer.postMessage('port', 'hi'); + }})()`); + const [ev, msg] = await p; + expect(msg).to.equal('hi'); + expect(ev.ports).to.deep.equal([]); + }); + it('can communicate between main and renderer', async () => { const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, contextIsolation: false } }); w.loadURL('about:blank'); From 7f4efb67472cdc05d277754ee5f95f0f83247125 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 13 Jan 2022 16:21:28 +0100 Subject: [PATCH 114/268] fix: desktop screen capture on macOS not releasing (#32435) --- patches/chromium/desktop_media_list.patch | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index a2b70a8a8fe6d..636f3f8bff8be 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -82,7 +82,7 @@ index 1e4a652634fbde2ca9a256baca840bbc5a0e001f..546f5bc3a2f79035f0eec196d9e704b8 const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..ab2dcc4d5fa19790114cae9611aa815e48386bb7 100644 +index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87acf0b622 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc @@ -17,7 +17,7 @@ @@ -105,7 +105,17 @@ index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..ab2dcc4d5fa19790114cae9611aa815e #endif } // namespace -@@ -435,6 +436,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( +@@ -274,6 +275,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { + FROM_HERE, + base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished, + media_list_)); ++ ++ // This call is necessary to release underlying OS screen capture mechanisms. ++ capturer_.reset(); + } + + void NativeDesktopMediaList::Worker::OnCaptureResult( +@@ -435,6 +439,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails, base::Unretained(worker_.get()), std::move(native_ids), thumbnail_size_)); From f75a2740190fd9770120830a5a6b6e86d2360734 Mon Sep 17 00:00:00 2001 From: Takao Baba Date: Fri, 14 Jan 2022 06:23:36 +0900 Subject: [PATCH 115/268] fix: Corrupted title of alert dialog (#32434) --- shell/browser/ui/message_box_win.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/browser/ui/message_box_win.cc b/shell/browser/ui/message_box_win.cc index 31484724d013d..724228e010189 100644 --- a/shell/browser/ui/message_box_win.cc +++ b/shell/browser/ui/message_box_win.cc @@ -171,8 +171,9 @@ DialogResult ShowTaskDialogWstr(NativeWindow* parent, // TaskDialogIndirect doesn't allow empty name, if we set empty title it // will show "electron.exe" in title. + std::wstring app_name; if (title.empty()) { - std::wstring app_name = base::UTF8ToWide(Browser::Get()->GetName()); + app_name = base::UTF8ToWide(Browser::Get()->GetName()); config.pszWindowTitle = app_name.c_str(); } else { config.pszWindowTitle = base::as_wcstr(title); From 868794a6bd03e08124c745be15896ed67e9a5e30 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 05:01:00 -0800 Subject: [PATCH 116/268] Bump v18.0.0-nightly.20220114 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 25895041ff7d1..2b2cd46c63049 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220113 \ No newline at end of file +18.0.0-nightly.20220114 \ No newline at end of file diff --git a/package.json b/package.json index 62765fffa902c..e8c42d5e6c681 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220113", + "version": "18.0.0-nightly.20220114", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index c1cce76706fa1..aa9235ea4c13b 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220113 - PRODUCTVERSION 18,0,0,20220113 + FILEVERSION 18,0,0,20220114 + PRODUCTVERSION 18,0,0,20220114 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From fac61122d560029c9b5f59852d08857f6855d70c Mon Sep 17 00:00:00 2001 From: David Sanders Date: Sun, 16 Jan 2022 23:36:19 -0800 Subject: [PATCH 117/268] docs: fix anchors for broken relative links (#32478) --- docs/api/browser-window.md | 4 ++-- docs/api/environment-variables.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 2f830fcefce12..c59e8874f1635 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -996,7 +996,7 @@ APIs like `win.setSize`. is `true`). Default is `#FFF` (white). Sets the background color of the window. See [Setting -`backgroundColor`](#setting-backgroundcolor). +`backgroundColor`](#setting-the-backgroundcolor-property). #### `win.previewFile(path[, displayName])` _macOS_ @@ -1041,7 +1041,7 @@ Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as ` #### `win.getBackgroundColor()` Returns `string` - Gets the background color of the window. See [Setting -`backgroundColor`](#setting-backgroundcolor). +`backgroundColor`](#setting-the-backgroundcolor-property). #### `win.setContentBounds(bounds[, animate])` diff --git a/docs/api/environment-variables.md b/docs/api/environment-variables.md index cf3adfc846b11..09b12e3124fb6 100644 --- a/docs/api/environment-variables.md +++ b/docs/api/environment-variables.md @@ -122,7 +122,7 @@ Prints Chromium's internal logging to the console. Setting this variable is the same as passing `--enable-logging` on the command line. For more info, see `--enable-logging` in [command-line -switches](./command-line-switches.md#enable-loggingfile). +switches](./command-line-switches.md#--enable-loggingfile). ### `ELECTRON_LOG_FILE` @@ -130,7 +130,7 @@ Sets the file destination for Chromium's internal logging. Setting this variable is the same as passing `--log-file` on the command line. For more info, see `--log-file` in [command-line -switches](./command-line-switches.md#log-filepath). +switches](./command-line-switches.md#--log-filepath). ### `ELECTRON_DEBUG_DRAG_REGIONS` From 6e6f5efad95e6899694484ea8da1e5dcc67b3992 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Sun, 16 Jan 2022 23:46:33 -0800 Subject: [PATCH 118/268] fix: re-enable PartitionAlloc on macOS (#32442) * fix: re-enable PartitionAlloc on macOS * no need to copy ignore_result on linux * factor out FixStdioStreams * include buildflags.h in electron_main_linux * #include electron/fuses * more missing includes --- BUILD.gn | 27 +++- filenames.gni | 5 - patches/chromium/.patches | 1 - .../build_disable_partitionalloc_on_mac.patch | 22 --- shell/app/electron_main.h | 10 -- shell/app/electron_main_linux.cc | 52 ++++++ shell/app/electron_main_mac.cc | 69 ++++++++ ...{electron_main.cc => electron_main_win.cc} | 151 ++---------------- shell/app/uv_stdio_fix.cc | 32 ++++ shell/app/uv_stdio_fix.h | 10 ++ 10 files changed, 197 insertions(+), 182 deletions(-) delete mode 100644 patches/chromium/build_disable_partitionalloc_on_mac.patch delete mode 100644 shell/app/electron_main.h create mode 100644 shell/app/electron_main_linux.cc create mode 100644 shell/app/electron_main_mac.cc rename shell/app/{electron_main.cc => electron_main_win.cc} (69%) create mode 100644 shell/app/uv_stdio_fix.cc create mode 100644 shell/app/uv_stdio_fix.h diff --git a/BUILD.gn b/BUILD.gn index 16e38288ff538..3aa40b4855f8e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -900,8 +900,12 @@ if (is_mac) { deps += [ "//sandbox/mac:seatbelt" ] } defines = [ "HELPER_EXECUTABLE" ] - sources = filenames.app_sources - sources += [ "shell/common/electron_constants.cc" ] + sources = [ + "shell/app/electron_main_mac.cc", + "shell/app/uv_stdio_fix.cc", + "shell/app/uv_stdio_fix.h", + "shell/common/electron_constants.cc", + ] include_dirs = [ "." ] info_plist = "shell/renderer/resources/mac/Info.plist" extra_substitutions = @@ -1040,15 +1044,18 @@ if (is_mac) { mac_app_bundle("electron_app") { output_name = electron_product_name - sources = filenames.app_sources - sources += [ "shell/common/electron_constants.cc" ] + sources = [ + "shell/app/electron_main_mac.cc", + "shell/app/uv_stdio_fix.cc", + "shell/app/uv_stdio_fix.h", + "shell/common/electron_constants.cc", + ] include_dirs = [ "." ] deps = [ ":electron_app_framework_bundle_data", ":electron_app_plist", ":electron_app_resources", ":electron_fuses", - "//base", "//electron/buildflags", ] if (is_mas_build) { @@ -1150,7 +1157,15 @@ if (is_mac) { executable("electron_app") { output_name = electron_project_name - sources = filenames.app_sources + if (is_win) { + sources = [ "shell/app/electron_main_win.cc" ] + } else if (is_linux) { + sources = [ + "shell/app/electron_main_linux.cc", + "shell/app/uv_stdio_fix.cc", + "shell/app/uv_stdio_fix.h", + ] + } include_dirs = [ "." ] deps = [ ":default_app_asar", diff --git a/filenames.gni b/filenames.gni index 060276156c2c7..b7d61a9858cf5 100644 --- a/filenames.gni +++ b/filenames.gni @@ -734,11 +734,6 @@ filenames = { "shell/renderer/extensions/electron_extensions_renderer_client.h", ] - app_sources = [ - "shell/app/electron_main.cc", - "shell/app/electron_main.h", - ] - framework_sources = [ "shell/app/electron_library_main.h", "shell/app/electron_library_main.mm", diff --git a/patches/chromium/.patches b/patches/chromium/.patches index df308c3326bcb..30954526811f5 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -109,7 +109,6 @@ mas_gate_private_enterprise_APIs.patch load_v8_snapshot_in_browser_process.patch fix_patch_out_permissions_checks_in_exclusive_access.patch fix_aspect_ratio_with_max_size.patch -build_disable_partitionalloc_on_mac.patch revert_stop_using_nsrunloop_in_renderer_process.patch fix_dont_delete_SerialPortManager_on_main_thread.patch feat_add_data_transfer_to_requestsingleinstancelock.patch diff --git a/patches/chromium/build_disable_partitionalloc_on_mac.patch b/patches/chromium/build_disable_partitionalloc_on_mac.patch deleted file mode 100644 index f69913ae5734a..0000000000000 --- a/patches/chromium/build_disable_partitionalloc_on_mac.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: clavin -Date: Tue, 21 Dec 2021 10:17:37 -0700 -Subject: build: disable PartitionAlloc on mac - -PartitionAlloc on mac requires some restructuring in Electron as well as considerations about the mas build. In the mean time, disabling it should be fine. - -This patch can be removed once the mac app runs safely with PartitionAlloc on (i.e. removing dependency to //base in the main app) & the situation with mas is figured out. - -diff --git a/base/allocator/allocator.gni b/base/allocator/allocator.gni -index 7d579d6e2297c047415eeeb641c70871b5c3f80d..e6edb52dd15af0f369160696fb2a34b0f80680a4 100644 ---- a/base/allocator/allocator.gni -+++ b/base/allocator/allocator.gni -@@ -18,7 +18,7 @@ _is_using_sanitizers = is_asan || is_hwasan || is_lsan || is_tsan || is_msan - # - Windows: debug CRT is not compatible, see below. - _disable_partition_alloc = is_component_build || (is_win && is_debug) - _is_partition_alloc_platform = -- is_android || is_win || is_mac || is_linux || is_chromeos -+ is_android || is_win || is_linux || is_chromeos - - # The debug CRT on Windows has some debug features that are incompatible with - # the shim. NaCl in particular does seem to link some binaries statically diff --git a/shell/app/electron_main.h b/shell/app/electron_main.h deleted file mode 100644 index aa75d6faadf54..0000000000000 --- a/shell/app/electron_main.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2013 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#ifndef ELECTRON_SHELL_APP_ELECTRON_MAIN_H_ -#define ELECTRON_SHELL_APP_ELECTRON_MAIN_H_ - -#include "content/public/app/content_main.h" - -#endif // ELECTRON_SHELL_APP_ELECTRON_MAIN_H_ diff --git a/shell/app/electron_main_linux.cc b/shell/app/electron_main_linux.cc new file mode 100644 index 0000000000000..7f886cd77bc90 --- /dev/null +++ b/shell/app/electron_main_linux.cc @@ -0,0 +1,52 @@ +// Copyright (c) 2022 Slack Technologies, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include +#include + +#include "base/at_exit.h" +#include "base/base_switches.h" +#include "base/command_line.h" +#include "base/i18n/icu_util.h" +#include "content/public/app/content_main.h" +#include "electron/buildflags/buildflags.h" +#include "electron/fuses.h" +#include "shell/app/electron_main_delegate.h" // NOLINT +#include "shell/app/node_main.h" +#include "shell/app/uv_stdio_fix.h" +#include "shell/common/electron_command_line.h" +#include "shell/common/electron_constants.h" + +namespace { + +ALLOW_UNUSED_TYPE bool IsEnvSet(const char* name) { + char* indicator = getenv(name); + return indicator && indicator[0] != '\0'; +} + +} // namespace + +int main(int argc, char* argv[]) { + FixStdioStreams(); + +#if BUILDFLAG(ENABLE_RUN_AS_NODE) + if (electron::fuses::IsRunAsNodeEnabled() && IsEnvSet(electron::kRunAsNode)) { + base::i18n::InitializeICU(); + base::AtExitManager atexit_manager; + return electron::NodeMain(argc, argv); + } +#endif + + electron::ElectronMainDelegate delegate; + content::ContentMainParams params(&delegate); + electron::ElectronCommandLine::Init(argc, argv); + params.argc = argc; + params.argv = const_cast(argv); + base::CommandLine::Init(params.argc, params.argv); + // TODO(https://crbug.com/1176772): Remove when Chrome Linux is fully migrated + // to Crashpad. + base::CommandLine::ForCurrentProcess()->AppendSwitch( + ::switches::kEnableCrashpad); + return content::ContentMain(std::move(params)); +} diff --git a/shell/app/electron_main_mac.cc b/shell/app/electron_main_mac.cc new file mode 100644 index 0000000000000..164dd9704698b --- /dev/null +++ b/shell/app/electron_main_mac.cc @@ -0,0 +1,69 @@ +// Copyright (c) 2022 Slack Technologies, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include +#include + +#include "electron/buildflags/buildflags.h" +#include "electron/fuses.h" +#include "shell/app/electron_library_main.h" +#include "shell/app/uv_stdio_fix.h" +#include "shell/common/electron_constants.h" + +#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD) +#include +#include + +#include "sandbox/mac/seatbelt_exec.h" // nogncheck +#endif + +namespace { + +ALLOW_UNUSED_TYPE bool IsEnvSet(const char* name) { + char* indicator = getenv(name); + return indicator && indicator[0] != '\0'; +} + +} // namespace + +int main(int argc, char* argv[]) { + FixStdioStreams(); + +#if BUILDFLAG(ENABLE_RUN_AS_NODE) + if (electron::fuses::IsRunAsNodeEnabled() && IsEnvSet(electron::kRunAsNode)) { + return ElectronInitializeICUandStartNode(argc, argv); + } +#endif + +#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD) + uint32_t exec_path_size = 0; + int rv = _NSGetExecutablePath(NULL, &exec_path_size); + if (rv != -1) { + fprintf(stderr, "_NSGetExecutablePath: get length failed\n"); + abort(); + } + + auto exec_path = std::make_unique(exec_path_size); + rv = _NSGetExecutablePath(exec_path.get(), &exec_path_size); + if (rv != 0) { + fprintf(stderr, "_NSGetExecutablePath: get path failed\n"); + abort(); + } + sandbox::SeatbeltExecServer::CreateFromArgumentsResult seatbelt = + sandbox::SeatbeltExecServer::CreateFromArguments(exec_path.get(), argc, + argv); + if (seatbelt.sandbox_required) { + if (!seatbelt.server) { + fprintf(stderr, "Failed to create seatbelt sandbox server.\n"); + abort(); + } + if (!seatbelt.server->InitializeSandbox()) { + fprintf(stderr, "Failed to initialize sandbox.\n"); + abort(); + } + } +#endif // defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD) + + return ElectronMain(argc, argv); +} diff --git a/shell/app/electron_main.cc b/shell/app/electron_main_win.cc similarity index 69% rename from shell/app/electron_main.cc rename to shell/app/electron_main_win.cc index b1657a6837310..0d73818a91082 100644 --- a/shell/app/electron_main.cc +++ b/shell/app/electron_main_win.cc @@ -1,8 +1,13 @@ -// Copyright (c) 2013 GitHub, Inc. +// Copyright (c) 2022 Slack Technologies, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#include "shell/app/electron_main.h" +#include // windows.h must be included first + +#include // ensures that ATL statics like `_AtlWinModule` are initialized (it's an issue in static debug build) +#include +#include +#include #include #include @@ -11,101 +16,42 @@ #include #include -#if defined(OS_POSIX) -#include -#include "base/ignore_result.h" -#endif - -#if defined(OS_WIN) -#include // windows.h must be included first - -#include // ensures that ATL statics like `_AtlWinModule` are initialized (it's an issue in static debug build) -#include -#include -#include - +#include "base/at_exit.h" #include "base/environment.h" +#include "base/i18n/icu_util.h" #include "base/process/launch.h" #include "base/strings/utf_string_conversions.h" #include "base/win/windows_version.h" #include "components/browser_watcher/exit_code_watcher_win.h" #include "components/crash/core/app/crash_switches.h" #include "components/crash/core/app/run_as_crashpad_handler_win.h" +#include "content/public/app/content_main.h" #include "content/public/app/sandbox_helper_win.h" +#include "electron/buildflags/buildflags.h" +#include "electron/fuses.h" #include "sandbox/win/src/sandbox_types.h" #include "shell/app/command_line_args.h" #include "shell/app/electron_main_delegate.h" -#include "third_party/crashpad/crashpad/util/win/initial_client_data.h" - -#elif defined(OS_LINUX) // defined(OS_WIN) -#include -#include -#include "base/base_switches.h" -#include "base/command_line.h" -#include "content/public/app/content_main.h" -#include "shell/app/electron_main_delegate.h" // NOLINT -#else // defined(OS_LINUX) -#include -#include -#include -#include "shell/app/electron_library_main.h" -#endif // defined(OS_MAC) - -#include "base/at_exit.h" -#include "base/i18n/icu_util.h" -#include "electron/buildflags/buildflags.h" -#include "electron/fuses.h" #include "shell/app/node_main.h" #include "shell/common/electron_command_line.h" #include "shell/common/electron_constants.h" - -#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD) -#include "sandbox/mac/seatbelt_exec.h" // nogncheck -#endif +#include "third_party/crashpad/crashpad/util/win/initial_client_data.h" namespace { -#if defined(OS_WIN) // Redefined here so we don't have to introduce a dependency on //content // from //electron:electron_app const char kUserDataDir[] = "user-data-dir"; const char kProcessType[] = "type"; -#endif ALLOW_UNUSED_TYPE bool IsEnvSet(const char* name) { -#if defined(OS_WIN) size_t required_size; getenv_s(&required_size, nullptr, 0, name); return required_size != 0; -#else - char* indicator = getenv(name); - return indicator && indicator[0] != '\0'; -#endif } -#if defined(OS_POSIX) -void FixStdioStreams() { - // libuv may mark stdin/stdout/stderr as close-on-exec, which interferes - // with chromium's subprocess spawning. As a workaround, we detect if these - // streams are closed on startup, and reopen them as /dev/null if necessary. - // Otherwise, an unrelated file descriptor will be assigned as stdout/stderr - // which may cause various errors when attempting to write to them. - // - // For details see https://github.com/libuv/libuv/issues/2062 - struct stat st; - if (fstat(STDIN_FILENO, &st) < 0 && errno == EBADF) - ignore_result(freopen("/dev/null", "r", stdin)); - if (fstat(STDOUT_FILENO, &st) < 0 && errno == EBADF) - ignore_result(freopen("/dev/null", "w", stdout)); - if (fstat(STDERR_FILENO, &st) < 0 && errno == EBADF) - ignore_result(freopen("/dev/null", "w", stderr)); -} -#endif - } // namespace -#if defined(OS_WIN) - namespace crash_reporter { extern const char kCrashpadProcess[]; } @@ -291,74 +237,3 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { electron::ElectronCommandLine::Init(arguments.argc, arguments.argv); return content::ContentMain(std::move(params)); } - -#elif defined(OS_LINUX) // defined(OS_WIN) - -int main(int argc, char* argv[]) { - FixStdioStreams(); - -#if BUILDFLAG(ENABLE_RUN_AS_NODE) - if (electron::fuses::IsRunAsNodeEnabled() && IsEnvSet(electron::kRunAsNode)) { - base::i18n::InitializeICU(); - base::AtExitManager atexit_manager; - return electron::NodeMain(argc, argv); - } -#endif - - electron::ElectronMainDelegate delegate; - content::ContentMainParams params(&delegate); - electron::ElectronCommandLine::Init(argc, argv); - params.argc = argc; - params.argv = const_cast(argv); - base::CommandLine::Init(params.argc, params.argv); - // TODO(https://crbug.com/1176772): Remove when Chrome Linux is fully migrated - // to Crashpad. - base::CommandLine::ForCurrentProcess()->AppendSwitch( - ::switches::kEnableCrashpad); - return content::ContentMain(std::move(params)); -} - -#else // defined(OS_LINUX) - -int main(int argc, char* argv[]) { - FixStdioStreams(); - -#if BUILDFLAG(ENABLE_RUN_AS_NODE) - if (electron::fuses::IsRunAsNodeEnabled() && IsEnvSet(electron::kRunAsNode)) { - return ElectronInitializeICUandStartNode(argc, argv); - } -#endif - -#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD) - uint32_t exec_path_size = 0; - int rv = _NSGetExecutablePath(NULL, &exec_path_size); - if (rv != -1) { - fprintf(stderr, "_NSGetExecutablePath: get length failed\n"); - abort(); - } - - auto exec_path = std::make_unique(exec_path_size); - rv = _NSGetExecutablePath(exec_path.get(), &exec_path_size); - if (rv != 0) { - fprintf(stderr, "_NSGetExecutablePath: get path failed\n"); - abort(); - } - sandbox::SeatbeltExecServer::CreateFromArgumentsResult seatbelt = - sandbox::SeatbeltExecServer::CreateFromArguments(exec_path.get(), argc, - argv); - if (seatbelt.sandbox_required) { - if (!seatbelt.server) { - fprintf(stderr, "Failed to create seatbelt sandbox server.\n"); - abort(); - } - if (!seatbelt.server->InitializeSandbox()) { - fprintf(stderr, "Failed to initialize sandbox.\n"); - abort(); - } - } -#endif // defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD) - - return ElectronMain(argc, argv); -} - -#endif // defined(OS_MAC) diff --git a/shell/app/uv_stdio_fix.cc b/shell/app/uv_stdio_fix.cc new file mode 100644 index 0000000000000..c4a7ee98e2469 --- /dev/null +++ b/shell/app/uv_stdio_fix.cc @@ -0,0 +1,32 @@ +// Copyright (c) 2022 Slack Technologies, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "shell/app/uv_stdio_fix.h" + +#include +#include +#include +#include + +// Copied from //base/ignore_result.h to avoid taking a dependency on //base on +// macOS. +template +inline void ignore_result(const T&) {} + +void FixStdioStreams() { + // libuv may mark stdin/stdout/stderr as close-on-exec, which interferes + // with chromium's subprocess spawning. As a workaround, we detect if these + // streams are closed on startup, and reopen them as /dev/null if necessary. + // Otherwise, an unrelated file descriptor will be assigned as stdout/stderr + // which may cause various errors when attempting to write to them. + // + // For details see https://github.com/libuv/libuv/issues/2062 + struct stat st; + if (fstat(STDIN_FILENO, &st) < 0 && errno == EBADF) + ignore_result(freopen("/dev/null", "r", stdin)); + if (fstat(STDOUT_FILENO, &st) < 0 && errno == EBADF) + ignore_result(freopen("/dev/null", "w", stdout)); + if (fstat(STDERR_FILENO, &st) < 0 && errno == EBADF) + ignore_result(freopen("/dev/null", "w", stderr)); +} diff --git a/shell/app/uv_stdio_fix.h b/shell/app/uv_stdio_fix.h new file mode 100644 index 0000000000000..6a8bf8d3d05ad --- /dev/null +++ b/shell/app/uv_stdio_fix.h @@ -0,0 +1,10 @@ +// Copyright (c) 2022 Slack Technologies, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#ifndef ELECTRON_SHELL_APP_UV_STDIO_FIX_H_ +#define ELECTRON_SHELL_APP_UV_STDIO_FIX_H_ + +void FixStdioStreams(); + +#endif // ELECTRON_SHELL_APP_UV_STDIO_FIX_H_ From 2a8d49a0591a74b3732717ce52724e38f0e73055 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 17 Jan 2022 08:46:52 +0100 Subject: [PATCH 119/268] fix: maximize/unmaximize firing on linux (#32441) --- shell/browser/ui/x/window_state_watcher.cc | 10 ++++++---- shell/browser/ui/x/window_state_watcher.h | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/shell/browser/ui/x/window_state_watcher.cc b/shell/browser/ui/x/window_state_watcher.cc index 380f5c2d112a1..42e553b45e0cb 100644 --- a/shell/browser/ui/x/window_state_watcher.cc +++ b/shell/browser/ui/x/window_state_watcher.cc @@ -21,7 +21,9 @@ WindowStateWatcher::WindowStateWatcher(NativeWindowViews* window) x11::GetAtom("_NET_WM_STATE_MAXIMIZED_VERT")), net_wm_state_maximized_horz_atom_( x11::GetAtom("_NET_WM_STATE_MAXIMIZED_HORZ")), - net_wm_state_fullscreen_atom_(x11::GetAtom("_NET_WM_STATE_FULLSCREEN")) { + net_wm_state_fullscreen_atom_(x11::GetAtom("_NET_WM_STATE_FULLSCREEN")), + was_minimized_(window_->IsMinimized()), + was_maximized_(window_->IsMaximized()) { ui::X11EventSource::GetInstance()->connection()->AddEventObserver(this); } @@ -31,9 +33,6 @@ WindowStateWatcher::~WindowStateWatcher() { void WindowStateWatcher::OnEvent(const x11::Event& x11_event) { if (IsWindowStateEvent(x11_event)) { - const bool was_minimized_ = window_->IsMinimized(); - const bool was_maximized_ = window_->IsMaximized(); - std::vector wm_states; if (GetArrayProperty( static_cast(window_->GetAcceleratedWidget()), @@ -67,6 +66,9 @@ void WindowStateWatcher::OnEvent(const x11::Event& x11_event) { else window_->NotifyWindowLeaveFullScreen(); } + + was_minimized_ = is_minimized; + was_maximized_ = is_maximized; } } } diff --git a/shell/browser/ui/x/window_state_watcher.h b/shell/browser/ui/x/window_state_watcher.h index 525694b105b1b..81b1117579c84 100644 --- a/shell/browser/ui/x/window_state_watcher.h +++ b/shell/browser/ui/x/window_state_watcher.h @@ -35,6 +35,9 @@ class WindowStateWatcher : public x11::EventObserver { const x11::Atom net_wm_state_maximized_vert_atom_; const x11::Atom net_wm_state_maximized_horz_atom_; const x11::Atom net_wm_state_fullscreen_atom_; + + bool was_minimized_ = false; + bool was_maximized_ = false; }; } // namespace electron From 0c75b3b2eaa294c08629f83391a4c2f3d73c51b0 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Sun, 16 Jan 2022 23:47:14 -0800 Subject: [PATCH 120/268] fix: check for maximized window before unmaximizings (#32438) --- shell/browser/native_window_views.cc | 12 +++++++----- spec-main/api-browser-window-spec.ts | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 2b7abf15e736f..022e7598b4ad0 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -581,14 +581,16 @@ void NativeWindowViews::Maximize() { #endif void NativeWindowViews::Unmaximize() { + if (IsMaximized()) { #if defined(OS_WIN) - if (transparent()) { - SetBounds(restore_bounds_, false); - return; - } + if (transparent()) { + SetBounds(restore_bounds_, false); + return; + } #endif - widget()->Restore(); + widget()->Restore(); + } } bool NativeWindowViews::IsMaximized() { diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index fddfaa6f3bd07..121dbe10e9f65 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3379,6 +3379,29 @@ describe('BrowserWindow module', () => { w.unmaximize(); expectBoundsEqual(w.getPosition(), initialPosition); }); + + // TODO(dsanders11): Enable once minimize event works on Linux again. + // See https://github.com/electron/electron/issues/28699 + ifit(process.platform !== 'linux')('should not restore a minimized window', async () => { + const w = new BrowserWindow(); + const minimize = emittedOnce(w, 'minimize'); + w.minimize(); + await minimize; + w.unmaximize(); + await delay(1000); + expect(w.isMinimized()).to.be.true(); + }); + + it('should not change the size or position of a normal window', async () => { + const w = new BrowserWindow(); + + const initialSize = w.getSize(); + const initialPosition = w.getPosition(); + w.unmaximize(); + await delay(1000); + expectBoundsEqual(w.getSize(), initialSize); + expectBoundsEqual(w.getPosition(), initialPosition); + }); }); describe('setFullScreen(false)', () => { From b93f5fb0660f028bf21aead5d002d90ec75b72bb Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 05:02:43 -0800 Subject: [PATCH 121/268] Bump v18.0.0-nightly.20220117 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 2b2cd46c63049..273420170aec4 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220114 \ No newline at end of file +18.0.0-nightly.20220117 \ No newline at end of file diff --git a/package.json b/package.json index e8c42d5e6c681..5aa50db56a5b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220114", + "version": "18.0.0-nightly.20220117", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index aa9235ea4c13b..994947657b86c 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220114 - PRODUCTVERSION 18,0,0,20220114 + FILEVERSION 18,0,0,20220117 + PRODUCTVERSION 18,0,0,20220117 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 015d54ac10d362455a50d453f8738df95a7bb75a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 18 Jan 2022 05:01:15 -0800 Subject: [PATCH 122/268] Bump v18.0.0-nightly.20220118 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 273420170aec4..3ddab8c1cf696 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220117 \ No newline at end of file +18.0.0-nightly.20220118 \ No newline at end of file diff --git a/package.json b/package.json index 5aa50db56a5b0..08e5989e75882 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220117", + "version": "18.0.0-nightly.20220118", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 994947657b86c..a4e919ecc5339 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220117 - PRODUCTVERSION 18,0,0,20220117 + FILEVERSION 18,0,0,20220118 + PRODUCTVERSION 18,0,0,20220118 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6860429bf4736ac14591f6ce277342e91498d163 Mon Sep 17 00:00:00 2001 From: Julia Nam <52333291+julianam27@users.noreply.github.com> Date: Tue, 18 Jan 2022 12:02:35 -0500 Subject: [PATCH 123/268] Remove broken link and update CircleCI's name (#32448) --- docs/tutorial/testing-on-headless-ci.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/tutorial/testing-on-headless-ci.md b/docs/tutorial/testing-on-headless-ci.md index 153d621ce36ba..3594d03fbd4b6 100644 --- a/docs/tutorial/testing-on-headless-ci.md +++ b/docs/tutorial/testing-on-headless-ci.md @@ -3,7 +3,7 @@ Being based on Chromium, Electron requires a display driver to function. If Chromium can't find a display driver, Electron will fail to launch - and therefore not executing any of your tests, regardless of how you are running -them. Testing Electron-based apps on Travis, Circle, Jenkins or similar Systems +them. Testing Electron-based apps on Travis, CircleCI, Jenkins or similar Systems requires therefore a little bit of configuration. In essence, we need to use a virtual display driver. @@ -49,10 +49,9 @@ install: For Jenkins, a [Xvfb plugin is available](https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin). -### Circle CI +### CircleCI -Circle CI is awesome and has Xvfb and `$DISPLAY` -[already set up, so no further configuration is required](https://circleci.com/docs/environment#browsers). +CircleCI is awesome and has Xvfb and `$DISPLAY` already set up, so no further configuration is required. ### AppVeyor From ac0d6bdb1eb20a7801e80b8ae5ab7314d00c3a2b Mon Sep 17 00:00:00 2001 From: AN Date: Tue, 18 Jan 2022 11:06:22 -0600 Subject: [PATCH 124/268] Clarify will-redirect event doc (#32093) --- docs/api/web-contents.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 0ee3e965d527b..df97b90e7e7aa 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -290,7 +290,7 @@ Returns: * `frameProcessId` Integer * `frameRoutingId` Integer -Emitted as a server side redirect occurs during navigation. For example a 302 +Emitted when a server side redirect occurs during navigation. For example a 302 redirect. This event will be emitted after `did-start-navigation` and always before the From 4903d47ef33122d47b1efe8d62677a9b9fd9d1a0 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Tue, 18 Jan 2022 09:14:48 -0800 Subject: [PATCH 125/268] docs: fix broken images for symbol server setup (#32485) --- .../development/debugging-with-symbol-server.md | 5 +++-- docs/images/vs-options-debugging-symbols.png | Bin 0 -> 32856 bytes docs/images/vs-tools-options.png | Bin 0 -> 15540 bytes 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 docs/images/vs-options-debugging-symbols.png create mode 100644 docs/images/vs-tools-options.png diff --git a/docs/development/debugging-with-symbol-server.md b/docs/development/debugging-with-symbol-server.md index 8bcde9c16dcb6..336eb7a54f3f9 100644 --- a/docs/development/debugging-with-symbol-server.md +++ b/docs/development/debugging-with-symbol-server.md @@ -43,8 +43,9 @@ SRV*c:\code\symbols\*https://msdl.microsoft.com/download/symbols;SRV*c:\code\sym ## Using the symbol server in Visual Studio -![Tools -> Options](https://mdn.mozillademos.org/files/733/symbol-server-vc8express-menu.jpg) -![Symbols Settings](https://mdn.mozillademos.org/files/2497/2005_options.gif) +![Tools -> Options](../images/vs-tools-options.png) + +![Symbols Settings](../images/vs-options-debugging-symbols.png) ## Troubleshooting: Symbols will not load diff --git a/docs/images/vs-options-debugging-symbols.png b/docs/images/vs-options-debugging-symbols.png new file mode 100644 index 0000000000000000000000000000000000000000..30ab3961379a9a52ab3247282ca8b82df4818130 GIT binary patch literal 32856 zcmb5V1yoegzcwr=3L>qPgwhStJ%DsdHwZ{KLr5zjASK1!~jD`%peT$ zp3(bX_pWcd+5-6_t0uF z9|E7qmD>>jztF%Ma#HsyAryPS%>!#m70G+|YGSdk%`kv_EEjow@V$GueW)L_Bv#z# z_wEHADo9Iey*D{r#dD$9&SJc-sw8&W{9c*d`c46X8^VSy8npVBD^g+Y#i*ivY>Poe zf&yhjn~g^##a;Qve- zb=4oa3xa(4%^4!Xfy+kBVg0BV#B==bF6&h$5dm-|VSNJA09P(|w~H$3zqA-gA%7nk ze$Xp~dO|(ztso=n5f-8+P}CFBmO&ets3GS@hld|mHvf98rLDa;&)&2WbOs&IDA<;{ z^4b|C<4ICX{vq6-XegK?j4u**dUar-WF;AsOx0^$CLZZ0fEqJ*m~P{`vhApcGvEYU zSy}n5rzi2ZH$!afoK+nNa!-E*xDw5H=LffbQEDw7lyLOM`R!ZRXJuul27Q!j&LiAk z)iyrxM9r^89#;h5UCgD~qUO2ul>GVg6Y9IoKxq#TJ_7@T-)ZB1g${C%sg^FW)b?D z!krp<&~rJZAbR7*Xn;t!HCz>6ah-l1zE9xFBP>o&&kCs}Njn~7GLaqU=ezqLeVHHU zZoEUtnKD^sW7RSEYn%5Z&Ica4QRlRbk9w^w2^z`Bqc*(tTSOCl*INku@Lb~|IL=>x zL`B?z$C;=jYADy6747=vPb_9%{X}(mo7TPc$jve{_g@TUbUW|edUVnJ4Dl*)Gu+4; zR-Xr0i?!PEOqsJ|d;PNX%@5co^#T4wn4z7|tMqr%l!7kvV#Plr5S~0?(uj@gZA^1A z(QcLB{TgkLf2yru8((U8aULDJKlH*=Qg8p3>+7H;ZYeTrm80L>BvWB4yWe!_GF=S1 zi_}0J51Uo_Ebo@s)aA?qHV9#g#t=s)>@-PTnIR=+*Da+?{n*D0N|@`M+EnnBlf}57 zs5#P-9W{+-JE0^d5-KXuX)LBc_;!Bq?e-^c4|!7_b#xKs-QL$xh_Fh^d;1mdM zA2k-a4(4_klgId0I>TDXFU~rn{?2x@`w?{?k(#Jk;qWwk-ZY1B)X`HS#p83yerZ`_ zRkqmkR|%nCM9M@TtkWEu{rLOQFGmD@}Za{52fqJLjoD^zoE!qFy zhE}Z1^&e~X&pDeeGJTbR8bP|A%BkIzMDD-r732SAum5A1{}_GTi8yptE@f1Nrc?`x zH=pK(npowQI8;CMY_`hOx-h(WO3Q!y32JC{jGwPjW*;6tj0xOtTNOTK3DxeTl_iTV>b_c3C>tm;?Sb;?~(7?ls^`qf<1?9+m0>BaFs>E(&7E9gC-(8uWtluF6<>&~zeUCfBY&I4D5jL#uI&q^MTJc-JH9eD;9UadU3Xb(Zu=tYzx+Gc&yu0~x2D$?q z`JMFZ85s1Ojf0%$*lG*?ZE~=GN=V`S;Qo|RI=M+9nKG49Xx7k|m^u0+??+$&TlJD?tDCcRZ(5GR^=^~O+3MA z!h%sJ>ArMs~k6CRij^7D6 z*AE6`D0{p9kldkv{P4I$k@*2Be(YcWUo*N zIAPGE3mt4TZ%R?_{e0E=cE>p#IEz|}z`iE_+AGQ#*qbhb7q|FDc3q#2cyI;&ieUU* zmvi%^X~hlu7T$F`@3Wfw=`79ciSwZ<<~UJ>Ric6H6rS|t2aFl&afT>HwGrfvUbS2Y ze5jprsKT=P|;Ql*0~y*ke*c`%HpP5}?|Qx0?$$6?vB zlWy&dK0YG@OfPGqE$b0?wQI9N;swB(r^wgp}3PGMIPqJFUm5c(xtKdRjQ_ z(PCiOl7JB~>9X0sEXBWkc-CNc#LiK`Fi18EeEb*)>{@8I$9FefJCrVGV*)AaTqF&< z*>T9vj3!?c0E2I_5M(U97kDlgnE$$^eM=0mUq@w>K}kso1p|gZIWT}N6~W)!&~AuL zpkCm6dkGzDn`(v68N$_$ss!ik1N#Ts8t@&_QTf4Qf{WJ;d_JRO>iuEEJYf&rg>EW* z#k9tf5)x5di*kpSVH*uDPoS40EPtJvBk_}}Pz%9v>SOS~1myqY7uAWyPa@Rl+UJ%G z4)1!fIr~tDqwqitNDEll|N609Ha=W`)vh@u=8L=W+eOec+I5!KTDR%#wrOrh2W1!% z7nahV;$5pe7w4g5Hj>Q#=g%O>sZf#iazw6W=)L6bPx+yC+FV7C;%M-PU)zxUVz$>p& zjgi>EYuYDxczI5Sl((y0NH4*_ThRb`nQ2;q>m^kVPwL&x`kh$7<%sG2McPw0@tc6I z0BYQ@GvS>6wzv}-tCSMY+o!t;|m=Z|ky6um7`pTeYG z`khaLzMdVa^31R9Zss-r?!i8{xk4UyIqwW?gZ(_YQpDw%QaB&|JxS&0J{-sd{{=^% zP%u>3Ns$tw51ggKE$Y(1KVgAPyE1@LGop>dw6XGIu2)*XdIm{LKTI?vs^x#>6wKF=k}`iSgFGrF)>J zth_t9@9?9wHrl~3eCw@~VeAJJ+-{?PVXWZgHm(yr-Ja~Ap~2ly`$$%zVRJ`(O9gF} z(U0AW(^EIaXm8=#N(ar|p%z1~rbV=lg^%8E-+pgUNn;$Ddk(~&XXDDTonME1;BN;; zIaZ$dlxA?XJ22EGTZyz)sr2rHxO#0qSEQ_WCWmFbS=AgO5V?S@hNWfO@p^l5te++3 zg`COMw+PCO7N`nMvzlrc9wBO5*b{U+#V;e&(!J(LBHcMNz!_2t-G1wx{#QlS>q-)w zjeC2x^Y|QR?-qSn^IXIuKa7VRE;kLDeAKUF(q*-<0j$oUUztdKPvPw{Dy*59b_WJ@ zQbqPFL1hZ14sP+6)QSTj?s<)k&v~HM6UO$$P(@1Q#|WKKJl-_2f@xl^*tv-N_7qVG zQi0!~k;PI%auZn|+j}O7lvtaP+VsG?<2$jV=1p84ZNDFA9Y#SdOg@4sZ?ZttSA~#Y z2l}wtbsH;aY2p3NI9Ko?pJQKyDEm?h_A z+%vd%>sV_CgeHL(TzZY`e&O=W^*bw6-_!yYSCW6Qnu3s*FN)4O6#7mX0*wi%~+i8drkk&P22nF(QXK<0h_5G3I*3g`>!10Qxq1X#Ku{s6+}%> zykpL`Td3>ST-sNd11LCR1@gA1X z7aQLo9ElQsbU^68k|fkK-`%)lZ*Z%jPIn32hLLPXB+0~B_^I9toujG3uoPXcxg8}o z|1_NM^ZbR$f^y#~E;_v`$SuHn9@)E>gH_G!M8V#I25dDxTH!jS{U664>8fGu{8 z9uM^GqsJU-!=T3FuQNg^M@Lw{3Yh(DPc%AkdB97y?I^eVj;+FM=N;x@Slbv=-D5ww zkDEY2AXU-SMgGWTg(Xsb8vIdGj?}YUWF7Cp!4&SZdtMJFUeL2xE%pS&eyvadsePps znFIj=+t!{Z{}8Lb6kaZlCZ|arKs4F%(BaI1p)G)VFy!%fRg-1rhUEz^5^Y~q##QgQ zx9#_dD$eG(;kB%8=?_P*++w8UX0IZkFh9jT)xxu?7~0lxgPm(->xTq3f@X+k>mc<4 zmoiQ-Uu|@(fr^TXt6w93P2I2TX{^j%xp~gPdXS5>ToV z-LD9L(LCdj)D~4wLr9@LVmIMhjgc^Y(qL7@IO$gXnq7fdvYsPcKA$?8FyuyZ22ZXW zQFw)a*cjaIvYevA{v17sprOKmf3ktH1GBZ96^YqP-H0Gi?}ELqp=@qg4-aV2u-6Xe zfJJPfUbCdz3(l$!l|6r=C?}L9QV8G^3anpB?!;OqVqe$1C`4a(C7Q7mNBYhYZ)@xsjG zsVdd7t)Y6?w6~K{z6j^YxS4q+W!P$GY9Ggb(&Q=IJJGv+!GmD;fI{vo>ZP1NBp(aW zVC46B6to~K`y;C+NfNSMRqdyWe*4ooQ+TAq(sOY|A;bKkF`3qndkZi}07K6N41Evd z8=(Xkd-o(A%qqX^w|mH|89inr`E(@SWBX>yoef`2&eyCedFaud6Vak>^6VVDP2+so z-uLcg%w+S86${gJ17h9{Q}zTdO8fbi$~C#`$N@wpmbAHu{Jglj59GyB`TFL7_86BlGU z&fZX)?G>-bku~IO3jX|~ggrU1Q9f4rfZFdj8ZM=9e$KV`-HoX$yKCIv7(93}!XG-! z@I=XmgWp<$v*;~{A~}RURdIqNOV%AB3okw&Uck@2UFFEzffZoTatk||P~a4q*9N!n ze64CrGm~Quo-rFYD{A>w>#4@d^(tI)eCfbp)a;i~-F=?ZGCBK#zWXoxSgf_ai;}xV zZ4vj>XBiCtN)-JpmY^4#Rk;pETbTD4CP~?yR?6CvoU#F!t>wKh#^YUqwIWbH~R?`{Wi^1kLp^)lvLRFUq$HgjSiE3VxR;9 z>RSW>r{znQ>@5isezXqT=eeGja&TN@HHtE5vPRe^d?}nT?B<&_RbJ@|^*KA^P0@R- zcYJ2w6DRdX@?}>{bePHx*<4PT|9V&Mp2)kkk4)s|v{03Wd8c7tjTq4Q88vH8$v})mux|v8 zIvIE_smS-4;WsZ!1-TvskY&VuRwlG}(va9+1?#;*mX_K{R9P?YE&bp+TnH<+qg21qyo*+=8*}&` zR*5ys*uf#UBp~9gk#>DwFC3er`QAFIA4OQ}XWs^2@hy%Qj2Dg**mwC9TlZW<3rq}T zCu4I1I#Vwmq(lnAA@6fsa|z!A39ajY=d3QUil+UG71ND5aA3dZW^|h(5oF%HFViNk ztlou#_N&vDTF%;r$L1G9iKB2T)lvn{0KpVaA*5^W_a!fy)1Kc3f}hT=6$Ckb^s$45 zCU>5;z2)BEb6y=WP^3H%iFJ6RA<{woQGb2^OLu0tO)m>z+|u=nX@;y$OL83oW*=f( z7-@1T{!{TsfEB^~yN`;c@MLo%~zyb6;<6>(1p$Y$2!E zTgXESDDBs|Q92dFJ*^cXS`?g?`k4wsFTXP$)>%?_B`LdM@?t^cQ|6hu%A)~V#O4V& z$-0>x18a2kd$=%(n>fveFq^e1R9{gT5(FVb&Ec7nf-D3Zdp9{fCfFt-#MQ1YW~Y+v z<*%~WY@B8HRwr%NP)OwDC#`csW<{=)I1{8b;vKISa4dWu%nLbo$YFB{>Bnx!gUBu4 zEmHUO?3b>!dTg;>dAwJ#8>}(W)-G$PDF5^niZz3k@^VD$s{fqHFQ4TsL@V62i;tV#`S$Z5O zKwmZc12u(~j&w#MIWxJY|J^`7Xy8`WU;RG0h6RKu~Wkx&-vuq=Jp zS=DWS2T&t~+gSWrG8J!R*l5ou30b1uU5xy>U;;yz53Hu@6;56D`+dx>$vP6Ai!tVj zTmCN=#4Ei$_c`Hj@=|$0!&;FkB{&rnTw*Jzu0rXTuxg{E8&WA%;^gZ~!Z5}biPw=; z7#uxT+N92=#52Wc%6TBu>Nn^E%Y8_>NsyVf|GIuT?88i^weP{@@IvRHt0lM+g$*%P z#D6+lk%h=y2TjPAU+2GJuZd*wXlsc&*vF=)#mv>Ej>H{Q7^g;Aun*(uymC~ua#lRF@MznPqNEIt*R`{ zy};-lDLm$KPTrX|-LRaSw8NzQT|Y~m0&}qKfi!2(0_!1yMte#YhaB=)LsCmd-HdYpuq%-T5i|kE+4-F4EO?BkD*b%) zDXy0GxBc&lX{zNWwrD1h9v(;+rLp0) zRr_anXFz`Gx7XT>n3t7u5{vncA>A|;{OM^*xt=ou9FiF7C%qqv^?U_1TQcK z$(}quTGk28c=(X8P;=M~(fIW&3HiGSt9O6ymQW|jjnJ6JBF2%W(^-F<1y)n&tVoq> z8da51J$m+DtQj#YZ!^N-<(j>j;gSG-#Z12HTQCD8-cG%MwjTUjqu*Qmf(CYa9Dn_R4>FbV|L0MnZZoDQ?$quD%Md^#?LvbV8 z0;bk?o9fpS&gi!@uU5QN1Z{n*;1|FC*pX%}gvycVp17&0^_<)JK|hsug^Ogb?O|WY2%33@sLGTNGhEyp=M7@!`v;Uq@yIyTDZW;;-r3mA@QS3<}8Eh?$Z9Y~TOG)M( zg#Dyx8$X&C93(>9E>RZ43zEx!G+&B2piS4ye60k=RP)y?=EwfBJ~{kxC1+LTFNJGc+Y#oOfNVea6f)zr$WFPyV!1CV4?90m zueoMikbEg;-&nyLTb80f*LEM^e43O3tM+WQ7&b>XTu}gY7aD*(R4@Z6D^sey2ErBR z=xqJbyT=uTTVBz^!*rrE#u4^E*;3TI17}{6hm`gJaOHHPDM9 z&si5NE9olQ4sn0(SqLKPDXcmtuao{@)bCVbw#Htbua{L7RzyMdBB-bNPP(kNsypQW z0N>3Ye)1+5heii#bGxZ{TRs+GSF~@joSI%|vSp^^7$bL0q>YQUd3OoAv%VPy zr9SsX{@&%Na(l+e+>5!Hjw~0pJtmm%5Oh-HJNIdQXka(_Y_OxFY1KMxm={*`McBIv zTdJy0zb!M*E~By}K#17D_xG&5>?@x!UF>G|Ee<2_9Jy`f6yJ^~HF&RUV^Oz^-Q$B* znvXY*J*>-T=v9LtB54~@i8}oQZ^YFwlaPtX6qkvB+M;wS!#xSP7SSEe3(oMX4a}=U z@n<^QnvY7k7JDM8Bf{sD`o&*r$xDnc4inNq7=7mw z)wxm#&ernZatxQoN^h&7do^;pebGp0C@ulgB@f+rAT@&uJvtw-s+SJh^(dR>QoE}k zQ9!TpN!gmhh1SEx@om6~Lv+aneM_$O#|El(ZjU$QvD2q9PL%yAB2y0P_i%@=os`Qt zfGFBv+VN2-M{JqCl#TmwHY{@VroCXMuXFk_fQ;JEmkEuFeHF+B5q<(4s6GD1Ql0Kb zXnS^`MV-64IAFM$FPoII_S*Na3TFZ=UY|n5N!$*kwJt{wAM2WOe4PWhRu%;XPRt~UG((9h z$-(Bwxxyh=))7 zyiKpuYGTFDJ<~%^NzfY*wbmB@z6Qnj*rMvM14RkID8F@^P%{+Gmww6v3NLO)lM{7^ zJS&0gPK9!PFH~H%(L@Diq15r=EVWVJ@}F9Q=%&Wej|Uox!)QsXqRecjs8lK?v&LV= zi;7gtoxer*RQ&PTcD*5yzVIRCBSWsqB(1ZGD{h8qTcq9xjfQ{BBmlICRuP;H7_eO) zVpCtx=z*eKjf1AbZ(XW5z;Tx1#?($uO}m(5K8y8HAARHE)68ZbRit}*>q{=%Q3El# zKTUxgX|c^;1D~;K^N^c@zsi#3ZPKIXt3-~r8UJMnrMJO3U>e2h$s-iVto4HhAr5`A z11w%z`jQ!yfTONNvH#Fw{|{Vvu0zkI!}pXwHh!ZtKkdPyQ>JM+??n}OC{sK&hJ?}J zU4Ms$742>qW#gyE4(t#stBU+O8RpInf8ocHU8N|&#g6a-V`{y-@vfNUt1tNf!IYxw+O zrOeG%J+pv*w?;lygD1Z!+3Sq)q6^xp_YIMJr<9oW-6UfhioztFAPYe>870LNC>~Qp*5)FgTw{Y zX|HH|Z7S>})@StVvJY6F1THM47({(rh@rv6Me7bX;Gg;&QF*v4GqInL9`iu1;sr?L z^V^$hKGP0SufK06!vJLoFVdAHVrR3I@T;n{U5$0yc3aOve89%BYe7~bTXXI|-$qg% zgmM;K)33nf^g<6ZgKJ9sQ{vpkPFMLp$~(x3pFb3F2Wdk+ienFTRho*~;Uw71i)ja* zQTcyG5d|!^f+<|AXkzw-M}9gOC&UTu_MXU(1)3Oh8FDitP|VpDyY6r@cyh|cP}?K; zwwWlQBz_0LzM#&U8a+1Phrr)pklS#vPXVo}3^*?}6%sKzKM{|4ZG33uwD+Tn%=9MGckC%}00(|IborHU-HCOa3>f!Q3t4mhRf!C% z0UJb*dJ(w?{~^EsUo<9`L=fxybJOApra~YmP=)>jzX+sj;6hRP{KF1d(yRK#e*zZ8 zV!)u#oyEzKv{z`d*5ff>8%ojqHBWEZ2EYL`9khBtIkl9m8(3(4JMaEhlpD9~dD;>K zYFfjlKskDbv-{UBGxQaDTB77h_`brX2+Jt?q1bPUSxN2B`jt$qfK({Dq=mb7H9BGz zgJQXC&ZA1-6}lj|yil9Qd@$)2+eo?mgSAu1zD?rm*m>GtOX-N8%_QOcTJ{Bo2LO}9 zCN#a@CrBq=iAP=iEH)@j_PXD@Nm(pOdo}ymQ(w8S!HPb&*F$s{dr=M_-a98AglVBM z?&W4L;@VcH=^ySXGGam#K8HaNab8w|5?zE(u>!tI25T26>x9waC;$_cIY@-T=Ln#oSqjUHzx5c9yBI+}=f;Bb zXFkr2O8Xfr9#*YFxmO95)Y57HmvaQX{^#l?cfLL-fQ1CWhj(a%W`^AbayvHiMVf}L zZF%L=UsVJyp$Qo?Aq=bz@Andx(u142sUP^jeISnUO=>F~ugZN7Bbh{!$WaOiCJ-S+ z$+Ic>I;bTBun@I<@7C%WzLgM;F{9PXfLvje@9wMVZA|K)}d} zU#kd3ZA^IW;Qx?M6~D9cDV^l8V5lcM*Ag&WxWr#eqtarmOzhe=m1A%7VU` zx_zqoY4dlYmB^)0S(*AOZ`5|k*_Y$ac)?|XI{reMEKU}hs_}Qx;$=8@$BzMHQvbnw zXfL;$Py3#e(;N+)`kv#q3V!+v-E+>FPZOi`aA5S3%zZw653b{MqtCMs8b-dh0l88^ zty|R%&(FThbfzgiH?HY5DF_+N4{%xv)aAzmA|6Xt1$?2Un)LaiQGgRV&drU)xr#6D z3|sxtMxZ5sb{5l|7l&7YQ%<;zKLARp?*TX|E5loyL_^8;fN_4_5Y--XwZOj=1J9z- z@LTtipmy^Dj=5rWHMNBF^}NDSrm1RX`!`jE3t!^FApPopkh z{0IMH{bAyUD5D?4D+Q!VDq^W=G&b-E0{(L99BkkAqf6825a22{UC)UcAT()!c*i?Z=ou-n}hq586S@MFc(xm7AK&Y_ovS3XA9y|d`c8%P%Q)VD(L;9#4o9`G z+7;GtEI}5WBC!;cLy$V$@`^Hzjach_4hK~~seW|))6$aB*yGZsR(SFGy zT$94byRmCS+g_uvX2@Mw+&$4$+S^?chzPZBgD4Y>e`UY_|*M zU*3!!UA)RVcT}dR?$I>oKU-i}JrPkHvr^^w3U?{H&QVukOi8tLRo2gh_T8;pv8J4* zZHw1lW}RO7CtfaI-%T^Gw&(}o5`hl|4-oycXI`VPiE|`(#$V;!zC)6gz(wzjU4`cJ zlNN_s@ccEc;lWXmY)VQ0iQ^N@TMw=2k0(Qd!giy)1O?VT-=iM?I^5}c(cr7~B3wL$ z^x>9TrqA0qvKl*+UDN5t;*GiDEoxUFu0l4sn=orx_>Ca$?%hJ)UA>WXCDNwn+bxFJ ze!ZyQQ|t;~w>$GVbF%$S1KPtK9sy2;9D7#|a6@HR4tT$zPH=->$Bw~t%b=!6p)l{g zCVKkqNV2|j-j6G<;q438ip1rvk21$c=El=`{jG^8M>2UVX^YLh+k&E0Hwq zTp~eyQ+^)O@0odQaxIx4r`Nbl?62H)~3Sd^ z)?n8(VbxxXm`Os6Bw%G647PZe}X$`K5qs(MZ7Q zCFKZ`$A!r%P$U1&s~>iU%rI8y^}g+1DPF|saweSi6rQK2*V&64Cy{@07-M#|3Ph0z1LAI7u5Pbt;)_(TNQ%SX93 zOnb%ZL=RQ<8V0yOdrJ8G5B;&WE3kblz9t7>>Y9l4_N`|`K-cXKFnOErA{I20Z%&rN zu3MU4hP>(BKzFKYB*Ia**Qzm?uU_J7FLiE>nO$;js3aO|__Po?%a1N%K3Kph%(`pz znee>j=eio$|HEog0=HA@^UE9itT#}WO^lJfSku5XP05j48pdhtZ=s@{3){ZgXJRC$ z$Df!(T_~?qrz>H{T5c%Y=LSIoIf0inJDx^l<8m;#6g_{e*SZP0;Bgsl0JX^99V_m) zFsK7+v1MJgoPd7iLUIbMjghb;e$B-M3A+UDq*1zE+;1EQY-IY~dKuJ8k7#$Dl?}w7 zODwxF4v6T?09E>x4*}J&MDzpmK+=E?6SoYAt@k?46Q$+&yyc&G=pFj(N)8samZSvw z>hK>+<>)+@jGkMo+oYJ*8a*q1f|^bg{QX z#?MrblsezX1LgORXn`Y^v7r{8R1!#-FjgIqf6)Y4_>N)Z854!GE%r_T6@@leO4Hw3 zT+$(q#8wUCO7&T$jLM*7y`J+lr_wisW7Wb!`CO#AJ|au=xpaNDyZ7fC=rZ>gaNw5O zA{I#yAt0?{@e$;-<1!Trbpgt^nz$X}sNG1JiWI5})taE~Vs9nsEtZq)PUP!D!J107 z^wA~|kUD5K`pZ24M6fn8IM9B|S2;4@sikkK6T_MK8j1($J{d(e(qiUtpLu+BmaJIt#%YYDo3*6VP3@e_Ds%HzBMHH${a$smuy)^>Nru@1IWt&j4LJH z7~demN-jA3&whENVnV)Qa)o)lq?WhUgy!nj`>iwbYUi}%6HhQ~LI5Z)p76U0rY!Rs zT)arpy?BTHXphpbUHkv!GByXw z?Kt`#-g?O*%ZYFV?E{#C&xtoAZbg~4EyA(yiVhEh8(DjiGt^pO*5k)qRik7t+N3rQ zg85&I(kZpyn3slrtPgP4w^Y``a4KVXOIB3eNyUUdqDZ&7Wtj% zFctgBK#$(^2Y=XiA{#tPj|ZJXY%|neD;iuiINnhRv>`X^3?Qz1RukQvL0=`zcVG}L z3szA#l?3Gn0C-kefL0?<=4S&~%?9Jp$jzOEjK_7?byh`19W=>{&l9dnmSP2W;8*0bJtt`T`(#L;3I@LoFp3>(0Y0s>6a#3@Ex? z@zuFZvb&^cdT zmQ6Sn*P%S6FTcMh$jeT)Jm&;EFd}?tY`|ZtIDp2Q^!B%)@aR~-^?kIjfgMh^OdEcf z9x=E01-* zqUt%C-00C2u+gymfk-BxUfnj^oXbS+o5v2DlG*coT&ld(`Dl>RuBY}p>dF1rHTYDL zE+vaTwNQChn(oQ>m}+$@^&F(Wk8LcvZr)80)GOoGKr(H56Ubd!p8t?#z8~kCT$dk; z>StMTq0;|se62tI$_c}gCpyVeTKlVb<2?E5+8W^U<&xVv!0LAE8jF<@`5Nmbppt)Jp%CoMCPV98=Ef+xXlYa~4 z#O{ZbLeA3GocQO<9vceo?{nM}3*Nn4cGOA6uTipdKWxkXi)AKGeqy(e(;zOvKAzg9 z*NIT57qB^61E9=m)nhAteiA3E78MIdAA&v;{k66bpP0W2SoLK7BY#K)%gR9Oc+1Mz zyGQ5pOt*!$cK*-z=X{ zf065A6nmwK(d;B%90pX-s1AZ8$SF8A)qb#(SJH^e%hcG>L=3Xwe)g8Sj?HW`gPYuW z%-IdMY+v2SH-jo47sA+NtHM|>HXXbV24a#^WA zUTJdqE3d=tyT6YMt9s-k(%@j$MQK8*ab>mRtAUI>I@^u>@(8O0{5fkk1x#o^0lOA@ zccAp^6(yjon>5*}e!~fMkbn=tc-)Zft5-RDMoY-_Zsn!%r0`-tR0(f8CUa8g4O5im zhBFmM#gkk0-BjCe)IPRH(4J->N`5zfkjXkGo)vi}YMH3Lv`nqhrn+=C=X3DnP>sSe znO}-gMIx*FM`!@W=g`S5|3hgQ)ifitlkdNTYmYj7S2+hw@iIp;SFVzimvUAo6Fc)a zU2ikF;W9C{*4Lu5p42*r?_D!_s>YcPp@&~ij2QgIopS7_??Ip*ueb>&mr$;As$?~I zF6*V>LoOnPh@OC-Ayn*Ha(AjcAm_tE_A^DQ(^(SMVfkY;O5BRtFb0Z!(+S$_ZpXjgxX}pNsH(V>@+3!nGVvFfo`wYlud}?=LEYxi#A8QHfye`PAs<6mzzss72o?_JY>YD_8wcLV94e{dd@9n1oU@) zEw%uWpH}v&9WDEu9z;@18{G@uNu|5?Nof##?=QO;u-1~T)HI&N2bI>^0ocpp`ur$~ z`G*-A54|bxA>_Z>35NtcsD3>jnfsF8ty1b{6pQzPXJ6wFQJ>`yG-DX$I>QONCcTc7 zW;Er;Pw&Y>6XkeOT7RSO?DxEKU)n|U>cU!WN@|F8y37Zw>?;o~aZUVL<%tjt8Qk$k zpSpMuGL#7=-6Ex+*o3CnX0syLUIOpch>MiIs6 zfAOR~j;pix6(F#)BXex^@ms0q_dvQdrA8TanT)X^B1I^8ruBn` zZ&NQx>a1bD_0n_fz9ric`-Rm-&a(i|CywG}fm2CIHT)O;<$d#Km*{r(G{eevS=*6P zHB+aGgS3A8z4GRI>8g2!Q48Is#oLvRzfq1U324_f|wiW#IdrXxaI5&l3f690>K z#%l>K!bwL}cSkwSAP(dk$u;UvAcv%p;v);DD$YkJ_^m#h6k@;sGvh!NG?g`5Tn{K# z7={G+^DqF#N&-f-O&NbM-r`7SE$<8+C4|J3WnQx5TM z4T9^8oYSl@x44c$;t64zJZQ;?<_}@SssVS?F~_QB+LF8SYk#!goEvYcykfqc_5 z1nMud18=?0Vm|N989MVFe^xu1t99+Ybhy{~O*mxGa!Y@I_(o5dRK0td4HlCtK%Y_ zgAlL@z9Q<~{_ky|xgND4gW`svr7UMaJEvXDG$1^od~;`Lo4=mZZxQk6wY1iT$@jPs z&cW@N`8bkM8WtA7<_&z6VmIovm+@Nyf!@s>_yZU2ml4M@N>C;SR?aLU0>?M=8y`v5 z2bP`7<|FZb8X*auEtV{x6bI4l8#Qe{E*|fn4PK<{=N_4?z%q3Z2%Midg+R1_qH>f3bztG(NAp-|3J?Qu+44GvzcbgkRvO zSPV6%jtsvAtF=PiFyG@Ya#GH9h zpxsj+R6cj6yTKu9=2%r|dL(3pUi;wiuT(^C*#`|l)l{gf+q+BA(8cz?DyMz?kN8YV zsH56ujLftN>HF~hJ!!31ke}TdDuParr0~|wcOrQNn+^%uZxFrBGEx^~c)y0f)IAt@ zywSwF9#K?ym@gg;o<|$cuARCZF0uaTs9StFc=9vprM)4%)|1vzJaYMm|p3+ z9>1qxN>Py0I+brj(qtHu+6$b~bS#zZKa0e72qvvN|Jr!b8y;_c9it^WmPed&)i!H| z3%(R(>vh2mwM`hhAb$-RGm8v7f#@qDxx887th|Jpd!m;E_pZz(FBzVQnk^;3XU-{+ z$}pcR9O(jPp4`B@jvBGSAM))~dkBk}QN^}^VevzMX&^qXG^NFX?}~+=Wm^Y@7mo_s zLz*@+AnMKy2aT&fq{iFHO)j`zxr>k^KFVe&gh$U$siVvMd8Nn&@w+;b!tsqpU#A53 z%0k^2i$+Z^VWP7!%UNi$O?%gFzn?;O9|~kgKZnpSc*;!*co18U58FS!tp<&JFe!fn zTUE6HV>1*{?)h1gsY~PYuT%98yFKj`hAWi@lnl}$ERYc_nTe$37b5Td9w0u2U;;*Z)t)R zdI2b>a;*fM+8_^(jD|el6Bp^2d_Qklu0|54ne-X57R?y(vFpoiXIsyZe31KH&{s?R z?9Xc}UgIu8*&~4%9CC;*7e8-AvYGYQ3Q4(Y63m#=A)|+O`#&Q&V9qh-+ghaXj?zG- z8lg9JKbyKj2^~obpY-QwmaET*E$DVfgPqo7Pi*~bx z%amMWSecmi{US&2WZt$<<;B(B%PWcb*f9X01itx^w}hy_KKR#CvFenRv@l{-(B7A#MU$W;f;&YLGAkgL zRvq+y^~hjGO|^`;+*>KmXJ&t011dg>ta<-Kwa4_nJ66={pe4_=3tK|UYC#`iM*e1; zV?0t-i;3A-U+beGhI^TjbjJ}o!W)N1g!4&sQmU4j;rQ%HZG5Y*>)mV~X~$JSvrhWE z{7zm!&Zsiq#{Q*wQz`_)?4H;{A(FIvwk8f73!h$!+}v;8SU_bHG`Vg&Ostde_3`)D z+IPgF<*?B#m?C>?f$Y>JnP!i9;kcLwhY9gn4}rZ1y!Eo1)iri4VzzK!!eMdy8Noq1cHWJJc5plkZ1q%9!j~^xN;#sQJvFGu?O~B-E!S0Qr z^MwqGlJJ`6&28!T^G?kgc&Ain*B`wKuB}LJlZm042@8WpseKfssqj31~ z^pqzu)Ew&FUxCj0Wpq79Qn*8Mcz8MkKyhLeref;2sf zI@pg9^8)wfz5t2!pS)Bm<9KIGyU)d$i$s3R2Z-e1{ZS$&NF4 z<34BZ>j~_%rZxQ*dV1X{RzPPcHTs%=E4`4H!zw zf1A~`d!sjOOv`EMNA#WW)H&y#s zpx0JiaF}w~*Mb51^%z6yorW%(($sEGUVoUricKu95%m?nmCCVDV@1Oo0Ufk8OmX zUj$81cSUbkq-;)G5q4>o|D&a~grDw;1wo1R`lJej-8~Q zJBH1NHS~u}Xw5T;7T5E9`_1Lv9P*26zN7KlR^myj^D?_vAVq^GJ59URPWR%ztLte{ z&Q1bUS#T8Bm)t}SLpXUd?rZ!3p9pdi<(`%%>m0plyn}O%Z=F(e-YYHE-pCyj1C3m^ z;Ek`N3T6Cu(;lXv)&v-qdD72YE=(nl*qxV>Yj>>;o1Ll755&obM_en_M;7cwF0!EM zm94rbDjXj~MsdkpvqY5~^VF;z7Xu>Bw|mBoE7$av57xR=uq|3@kOe?{28?aUlS)3y!;wno4F%W7KffQJT@;zh=At_ga>}_ayEbu$znXsn1k8I;K>`Yr7)|#X_U@! zWM?0dpxx+3Q&En4v~&@8HO*^Qv=699*cOmZu2-gbl({pmk=4|j)j~~ zrcwAp{hjVjQs~WOZPbQU#61Pl;jv0aN2TEBvoZcin+cK8++*~G=Y!arn{K(=En-qm z8$3_6kF4+Y&f80I9&5$A{n}`l{_2)ebq)3lD+|2rP6y}N_R8HOaladN|-(=u{l zkH4DTG=jO_*Yb~O7>;sC?J!#yOJa#sjl8^%kN)9`-5DHyklnq3-A*{|tVMqGNmm|~z`t+6<#!ZjeYi4)I;>Zn>IL_|6*ctjj}Rv)N-!p25ysEFGf zp-MPRYlNDh&uweX{jiX= z!7$%aN>-R0=hf;gN~aW;`!M;(R+XKyQp{b(uyu!SGEN7=?J$?qNmqpj-a}_h73o=Q^LsBt5b|5Sdc1ecW-UkdG4nyu6qP=69A@sA5x} ztm9ZD790UudDa-LOT&-usCHgY%oZbD7Fd`-LSJ?zF>D7R$hK<_wza2BVxRi`V{Nht zGA<2jsdlhvZ&M`)Hl4jL5)F0SOHbszIND;V=^Stq7x={xk8mL*5EgdZW@35XGM5+W zu6Of8-9>f(F-dJ3(}<$xmxt>(aZ_A=P8r8vZ-U=8V*__#2qZ?5ni|L32&Ltoss zM19&T54@#Ir`3i^ehGPOT?N@tJ7^l5QI613e^+{?Tx&^+so9Is>EgbVvL%?*%R!H3 zD+$(JDkku!v~A33J>ZtuD~W5^IM184@(MTil1B@xtvrkD(E{#0>Q zvNyhx)vEc+?cOy~RCI~;{FG&F;r(@)n~M;ds@{;el`2ck!9zYGzFJ$PgK{%>TI#d8 z`B91=_p)9&{pN~_*0L?0nU2aYsxil|uMO?ym@rfQr;jULt_lA%;eC4Q!W&&%s9QPj zO~ly*APo>dI1jmYg`I)0o$YRWHFJ+Vi^GJ%$;k>hpvG64ec!ce;X2P+x!Ah(LaeD#GcCaBT*ZqxV|Cfu{s>igm z3uBW=#>#Ljotef^61a!>Oo~U{TCa?JVvKKtB|Scpir;~Gqmx%sy=cZ@u#U9YD)ze=QIH ztj8^M;NgQ8bnrRDguDs|pmYI>6~OmP`+m1}mx!{kG(=(7tp+~XJ$6;6C6^<=m7in2 zmIrptb`u*i`Fq%*i@&(QY^?NAAG+*5dqBKu^M&E?#GIDA66ZO$r+Wz|-ifB+F~!B; zlfx9iuD|R&luX1@+%UjA`z-oxaa1r%nH_bJ-dV(me-RSiWn?9>pPcQ1{R&~FsNQ20 zbyyP1lhB&7yZOinS4~L*rTiK&polbSuPr74)PIZk8)k0WPbx)0?2RRupHSE}$1eX$ zP}6ni`vMy->k2ZT7WFzEC9C!%3W}gmLJHrSQcTVp6L)aDK>A(aRjOwL|7<92UD+Q( zE&Ii7nAwLWQAj1I7?arDj$B(l+scFffvbDs*Q5N)I759$@z?z>CJrV&0{L=&Lxx{+ z#SuD`tpZ|PH+s^(TL$R?z9FFDy>h8hcCA=+q1W``6aQ3r=r)AqJqMS4IdQRVnA{VV zknD9xS&0oCEVahQp5=p(5kYq0G09m0w z?q9OPL>a;HwdNVU>+n0t(~%#kg@XT_{5}QC8+l2mMwXdE`gKO`i$E5rR_BT60gMb} zdS#JFX8vZpbhONtLW+`HaJ87B<_0tS2VHt=z}n5lk)~@dd@r4e>~~%g#K|Lf;X)2y zQRZHY2B18-R@~QIy#b$Vd?`gL*FV}~Lu`EnHzp6x(8$^sm-;I;6KyDZ@!>Ci^?9TY zI$kww;sjH=)fqSKXh<1UHrz&GFH#J^9TRP-KHyBv=J=3L zGGJv|SW#igI2b0&OAW&3@XuefGuOZ~D6%d2s0l-VdzY0BXByi*`_VJ2TGqu+=8YpL zSoj4O3HGcX`izK?t6Av!y!m_cnfGC?^>ZI{GEjlf^uJ+ zPRWM{-YH9|ROK)e>=Ta*UVOhXOD6f;ti>jKN9VPmGQlJdJ*QT2r|X2(!mP_DtB6T1 zS-~+}RQBYr<8kkXxR{KUB?AUuJU_1!Dz|N)qWhxnGO*bFW2*H9QVCh{jIH~g5U$Iao2Rky638Kz-u_gT3)-e>HJ z;C>hIeY+&+Ga`1WBoW)v)kXUgA>sB6U>se(^A^29&%l>fbs#3JI@iC z)&B=9SrE_N6~H!KmSUcl`e}kcdpQvBZHxEim==XpG_P1lVRB{_sNzR2{qZ`qG62di zcOTB<&!37n_h1ZU_rBivqE;eW)Z+5_50hS>;mgO|e{J4uYIw6Y(JK4n4dQf9LGN=} zUIm~6Y~|L6k@zYzW$jOxDZGseBf1aLYIJbte8d@3HL}uCKk<-{I{SO8>^b*C%hM((yY+`1Xrw)C9_-FP zdbl2tzKZ_DKNK_ZPsYpN6%Uy66lKFEb&)6TS0PyG4bzR$LYKzQuXijV6q5rDHZKEa zH8=0a%MG5J*K*r?-kPp3N#J4cvdP#w&9Ah1VQey%+Qjq{-Hjm@d{K)J01Bf1!JnP5!WF z&z}6%1|7)!CUeTdI8$LoaxPcdc7e1sRNhtMWA9b5(hr>Hip3>m6a#b{k^>V1PuEEt zGyO3W|4<5Tw`9f}6CGnnH4Q{H#mj&c5xpSLH8(>6UGo~?oU0D%>Ys2|er|re`g!Zw z^Vc-gl{rf*p1v;vn(je_LO2uO4lO?{j^IZ2w8eInF3n|+*C>V3IqMr5E$dp=qPeQA zyB=G8wWdH-K6k0+Oa7G-rL{WvbqZ5ZPYDw+h+h%vP)$Iq^+nE&XX8D#4|?rQW=Ikv z$m)yS8Wa5kB6};IABwgkf5jXg{1MtvQIl^e`6H^$a$fx#uB5H}VF>Cj*0->S5wo>m zKf=C}exNmI!zrP4%~jJJ9}5l%%wgD|4^b;Kdi?b$owxddth{>77g8}haeOnsxWg|) zJa%W=a8!UIo%ulnxynpTYU>T1AEiR-!dlzR-(7a<2(PdFhorJ{J7HM#;a5k1v$90E zGGfs{ON34S^5*8Rj3!%c$8_o+xDmmB7Dj8#T{&NTY>77aXey_}63FF!L!Kuw+Mt`H zH|i#~L{&B8DW%iqe2rWH)J}nCQu%Sd=3nP-IX(8A8K|_WzFgnEl5~{xA;J?oyw7M) zUMW;0-uE4f{I>4&Idw#~g?nk-f1@NAu>W)kQN3;C9?ZrlMfNFglL!je@y*#M4;=Da zZA=iGm~%CxU~OG+DVY|*fzMPrT3p^V>lH{Knt@ERB}6i)>dvGQ>lgjeLPSZC(LY{J z>$#^uzRocyq{w*8o|yKm+4gP*m8IjFJf2X|q53GD?3cXGQQRvXB1%z`yT6T0M`I{T z(hNt%MIMYfF4$l}>DCEmgzphbJC>6<*W*J*EnHo%20PM}a@`-!$k+bP^%yX?CKbiG zT8KINAF+g{cX~>(DA^?b+rh?wFdKSfE>o0!a<}5)P9n;sJ-sKk!$6Drxw8rmuJxHl zt;n*9x^`L66!T8~V@#v_>(t|b7b}kRgGI5HZcxP1uG{>G=FpXm*`Q}KaxE@f%~KyY z5fgdh(zVnS_D9!hr*D-|i42VOfAyi})L1vy2BO*pl`u(YKP-oa>Zwa-bczPjeG!`I^Yjx9L!k;g^PA9H?KrG~;{V6G`|Uc;j0(!QNc{u!Vob z-xMVMxJ0EqTf?JL+8Qz+7+yBNS)x4&*P5@ZGQT zt}X;PO{55qUIg0J?qM3kLZIpHlg}Z?1=aj3cG@PKTk0DJVaR>8v7n07Iv9YCd}y`I zC@F&F-oDEuyz2K}!|fAbW?Fe&sDr9gQmG{-HaGhzFYSlOphM(Z!~dFUC(F_y!iQ4_ znIOoaP@<~u&QrN=(y&K}^pZUFUO}2M^S7&M=f{#L_~y%s@oY}F z##8$XIZ9YLp8>3v^=5x-KVWX+8!*w=Z)LA&7W%j4J}G!#M(UHapo`a={8V0+{@D|v zSDkDnWcN=uUP;xJOUQFSktE;)an3&S5gE8&A-h=MPzd*!@=J+)iOdmFzMd@$g$wNO?7tn2`oD zhbVLOzzbvPhiV5loOCa}#1DXbG+h)ax~gn?(G z@D%{?ExCko!0{onxx^&R-NZn)X)5cwFL*>J?4*U_7l0PTsbw1jfJstqd9q&PsH$gI z>n}r~iiw}MI4DYFhmD8pfKrVJ*fvsD;3=)0k0%vRL(00_JQ9J_VEYQf6oK41y;kkv zV)H4nKl^nh$L|bfY2)?O^R?6$f`Wn8URY!mfDhbV1jMyk6t3u;b%+NRbFlzE&zSHA z#JGJn?H-qbYc)P)dO$@r>b(6L#qDYe%_P#@RplR_+KQ6s8{-w_O?HwFsAn4pq_hNBhGqd;83&L+9a>1nT1 zgAW|ej{{IRsfcg}$gjG(5Ii8TA8f31t>*h7Gs}=C8pzL0?#MstCAzm|c# z)jl~K{h>co^|}^%V@}PaO`D6CVT5wBXzejV9dQt)7B3{UHC?WF8yd6AMW&Li34iPz{27oM4e%jDt~1jOD0| z(P3Wh!OfDs2Wv;hGhqj9lk$T6IX|)CGAPx_Qg{&BP4+OyMY^ZL*qpcZ^xzEiU~EBk z&{9e|N&?tS&YMM{ob&s{Ki*_5j;DS8*S9xX>x&r=bjD*q&#;vcSI}-@ z?LLiT{3WWf=$+dewr^2)25N%udY_M%Mg_kS(?-hH_Oxf#I8GnXp?PkPiIYa>z|Q6= zsum*@4zP_lWa9`pa$=w9&)GBzm+YAuf9I`8Xp_^tXm6@k@o50*1TBfW(sh&bQ@j&6 zI6w};k7~Ig>55hdbiNG@kkBo61vq#hwEx`PT?MUFnUf6@X7N>tPM>{IHp*tNUu~fbis?VPp^26tu=U zyne_Ow++-W?g{)ua>qi>AgxJDz&FVbgj2cVy4sVEWa3RpgF+a%okr7)ru2M;X2Q;Q zPwcRUZwl(#EX2&bKsek&iAP(3iYVM{Gpvv*NYJ~K^?A_qeGZF~qj(!osHIxyfPH)h zbuq9aKTw!LR13iS%|TrhcpVlW^nEyTC**0|rE2_vGA*ymZ0M{sN~JD0uk9Z@XX~vu z%Qikx57XNUyUj4M>>ptJ=aU+8Bu8gw7Va@>)zpgOnfqmyI*B0uh?8Px(-|V=kn>k? zx?6oP5^M$YTcI}j;N(S6EWe;z+(!HZH_XF#gViFivy3(T{8W zZG6MetaqiG5KRwzGmGgcHCW)s3_Sl$y1crgy!^epJE##eQoM89Yv=ar_BP_7mfjZ_ zwgNT;Hm<3z*5-;m{DAv8JlY&^|IOr_(#>@vI^H|DWuZFP*68v4m99T|bt)ecwZh)_ ze<~BT>-JEevcMVwOJattd8jord&b@@cf9Zdt()~I&%8F9ySTwcTGhWMxpYcP*yW(L z%sRy~-tJM}^NHN+z{f`gD|`JP)YZCjed< zgLuIr!xFu`E*vY*g79SQQZ{9XC91@);4g zWxpd>R1N^yjWz$LZsor^<}u0(rMLv4Ioki$jIhnMz|DUVJ+*gser(-{gE#2UJB;b) zNCih-ea#vi5(o1cZc zktqhc;&q1b3hDDY-^b)AcDZXqIh#fK?<5>dR+-oga^}zhXbVKReL7EtitJ^`Rpc^+ z3c&ao@UUIrVVr)}atds~?xSivhmkzU-*4+~5BC8Ubf1mL<3mre7-OZ$uw#9wW$&%v z(l9dCl?J@NU`d8QgumWrzN!L-i=Q9#%we+V{r6uU3<*W1jK@;|OwpeWsbV7Dm^ARY z^F=y3<8eeoZj=TJUqkTYd7mp3{eU}=N*ZTl`0CSU@gigxAYx1rp%%-(wp>23wM#k6 zw)d(BeqVa@(v8{HB2(c0N1r~5egh}|*=JrQkQ_AW+=R1>qNG`nO;m4NEK_VugZ*N<53!kE%`gY@GOF#X|TT~LVHWKk+xBpIr!_+I8STHJgp*UQ&FCe zb*YF0qc{WYdPKtD6sEB>B)6C%nfYY&Ge}YBcKwm0>4mWf-$QJd&wiCX+G!vxHTTb> z8JWX5rhQimR^<;|!+j{Jp*g1)XZF07+uH-jdNj5$dD?WuMA*-zGW`Z@rxqNmyWvSn zT38(6Z%>#))?cQo7VKJ?wkaboh(A1k6~P~#Qw?u+sqDkwV$wSZyjMpMF&f$d_i7Gv zmF}%*A2$;0tyLx(R!FH65cVoxVF?|btE;rZ0bWG2D2}9+2i+9_{PCJZqlR+I0RBiy8FH`5wTM*WBueg-(qckCPI#9t zjMR{FBo%-pyj&0ZCl(_aJ%Z~^>!VS_CEV(RSS3}AL zRz2Msf4@1P53DyAgKd+olgp-fR)JH~`4AQ4_bLMp9fWkccXsT=fIz{cI0*Fpc|I>Cl|5jEWcpRa!Js z4NMsx^355l7k*!0VJq4$iSSLm$k)v3fsg{lL zApmmg3eB?a%9-ItXNmO5A?B(Z?;@5LT{+@=fpFAPZq0f=x*$in(U4htrj2;gWtU*L{=)IB+?X0N#$?bw3W%?0fF z?+_YoKiwf;wTrweX2%JLC2Pw1-Y%@*@cT}iQsqZ-E?+s^NDeXeIvO_@vQwen@zeci z#j_dXb)4T|;G7=V0l7}A=evJ#L|?z$?WNn&fvUj1-=9Q5%+CYHoet=ehQVAikx-Oy zN)jf#bW^`6iHNXQB;`708m_P!JjOrR&|@y*2wgf!J-IJ(9M`aJ#>yLEB)1uGZ;&um zBF5uDbSv|4)94g^OePL=4CV3tm#<*EhK6SMg?MV>-(9f4KUMdqkLBu5ncg|K2&uZ# zVJ^mp{k-PMKn+I>(q7p!7iSC{xmP$cP_Caf{JN@BJu{cR0)tZZd|L^>2wtbG_QFZ= z8e-|*G`JDoW4dAAZsAo$aNX%D*5P%9Pj!ScIO&5Inty_ zVM>)yBTRk{xFtQrZo@<0*W>8)_4(b>nbh0GMyHE@ASrq@|-X0Op^nIN3JS zjM#+toUOeRCB1xR3u;%4g8smVq~|Wn!^ax8LTjISlIGRz(HPeg1RS~hX0Q=(rn-_4 zH9CbOWYXIwVcbA{ac9Yn19NRg7=)+=Wa0F$l~-G*gWqriPg+{q70F}{oe*9XVs6zNxK*Iy;il2iORRO8&|&8?Tc*|Oaj z(7eqc?!CEK0cIV0!SvL*MFpFz0p^s(<#azQe|K`9ZeMeInvj+H#FsO4&{!<53)F61So)#LFUqUfwSNojPcf9v*B zo3*S^Vatazp61_DG-=&Ph)V{;gJ1MJ5$@=n(f?k*V9r3R(%7>;0qvJPafr72rl9dp z-2s^zLvpvJ*SbP`#Q&lwKbQ3S=V&z@3x;0DnX$Bneq*Q`f%~;{*J% zA8QBDrU)EG$UF`dvujlEehyM-pao7~KRcf#b+!7Gx_|c4%&g~sr<~?g7YjJ&mXT!E zuvH5xHG8|IDO&t4ud;ziB=|cMVoywncxy2?JX(QttD(B;pFqdV4dP~B7%XQZq%~>V| z!yhsqhR^2SsoFc}Gbq>OOS4|*pm(j(^|QQeN5!N+GI|!9KmpTFfGj8=NB`7pA@Gnb zM>(bW%dHq0cny1b(L_}|73h6}*Q;ZE=F9AF2%vTe8Ess_m<|~v>D2Ou;WuxCYYwZUx_q?v*2)@B> z9#a@X+}@>gXZ@1xW2wnRxROP@3@HC4^0GgPB&h~yw{CiS7Whin8&Z5V$tXb$M~H0M z7bPGIZ`TyU(EtMrGE=;qVBD(tE7rJv2LW6P{r6JxGG6YDHwO49xmhM>PfmcsBfTe! zF>L$4<9JE|NDr0s>W_dOKQ8yHZbzE~_);9WLbxAb{+IuMq09h;+4P7fj~_P`Uto$C zb`i8=49lr!i!2V$>(2hWe1ezGdLGNUUa_`)P>WVQ;v?x|_~>|KdO0>G*NUduZm;y` z&%<5g+D0CcZE5M7mzNHYh^ED@LRL36r0}%)#MjHmM@Q?2@8(sdEA->U!QYB>;@@6% z^ddmB07Q+?6z1eHzz1E(0ROc9qhjzzr~DKUqIA=_@^G5C%B}ziPD>jH<6r19FvJJ3 zeQ~~>n0J785uVN72ES0#?$4qe(aiIAJ?xG1tV2$A(Od6-vSEXNKG#NB3jIAOWIu9vJ4J{`Q)_Ep}CGs5zK(D>6Jq&pEg+piiq6hGr4 zpoKga83@%1yPI(3V}XnoOhl4p!5%+sW@aoaMzH(teBie4+KS8Fm+_~A=iIZpCMdx@ z8OQ}ozpypN;hJDJ#p|7^FF~U&v2bbfTZ^Kzw?u!!li%bS@0trB_nAN*nk$SzNDij1 z`wlJCr&42|*mYj#3<_SUW~OHY8$akZCEcl@TM9Y`CL!1-riM+tItxl}_-8UBWvu~5 z&o*w28?~ORKc3-LTa){U`Gz_n=8bONBco@t+A5RMw4}gH!rH3^ddfX^GibQ^KO|Do z{H7~YveZg7Zd(mBcRsnr>!rju*WXGiW?n05cQx>2fXg)HL6il_DtVBz^cN%&$9eGjU~Somfi}hRuaUFMXp&*16vB zF`**tDKaKso9vZ9)58BvH$Rw=u^fB3JR%VI`qK$cL-DM_#ag!gutBNuX9Rh`Bv^Wb zm~+2u3BO?M0Kvs_5@*>SEg*QoV>ejO1w|NUrdZ&kH+bISP&?78<3z`u-;?eHf{WP*K*m)89KA`(z zUg!h>mYY+lkvvDblNQn#lbcQU`bB*@kt8_9Oj&C`X0N~010dR+#5>7lvd#q##PE9S z0@(V8Hh3AQW1$RQ!;-?X`L2qIZ{><0&~yQ^&Liz zMlJ_#<=uivp6vao1uV#9ZC&@0FQJjwG?3XsK;}nWv_V&ya261=9_BlX-D}7W`0dT z;8>Q<8Ne33bB+aWQD=WzJsY@B1n)UKq$${AQa%UK&;Ti^#zN~@=V^zrweO5fw^cjo z8J1&VoMtl!?WcVWlAEqsnlL~zoh zCFiN*JOIG-oX7@_+)|vZiiBF&7mO_fw*oV^09Abf{Cfp_;eziYG;namzNewGb#Pgd zmgk@1yaB-Bu z>V4}TVMDt1V3^r#@t0S+(rbCmt;P#aQQX0h^H%lBfpWYfm$5dugoscdI>CKB91}r| zy~hlc1=;|rlFRc&s;Xgh-Akdd zfh=aLtQWKfCn|2|WUdF#>hx9Vz$ls5h2(2Kg*a=$LB48&!YUd zS0*0IV$pfVkH|RYeFu;)%~_5zd*R%R7jHcZluO`tYml#?u#ET6m7!9eQO()i`-QQ= zFKiBY$~{qcf`Yy%`mLJHR&hF2-*DcVc77#(M5lvQWbM{(QlTbenyU8+Le+LB6hp5Q zX6%#}D-47Z4HUzZCp<`N61gN-Z__3$HHEmMW|H!zWDYlSDB?X}zSS!;_P$-8v3=5^ z8)7eCcYK>Xs!F&Q&oqNbvP%3Ax}S%kb~PltZIfr#=K>0{?5u`4x7?ek-s}rTl;m>V z`=X%aHOyXV50O?+!58vv%gTNo9|iV2_v&xh0~NB3H2AI@wDnMdvc)C4e^Uw-H4@_~ z>19o4;8oah3bGS|YlqxoSQgWWNJ*jD=L{b^`?ewZ8D$#q%Jh{M9VSfa?RguMpgS58 zc&=D~aSD0&Jslc6!+h3}V#S(n%1 z$J*O{K4T^Bdy<>(xapUdXW1M^h84dXpD&uB(gAyfO@F;U&iG9@W^f!8CcEG8mXG@O z02$$e`ckI-@Ywaa#e02kj7qa^J~xSAQ?R>_a&MlJ@M~Id<5Yay5vta_tG}=L_vm|G zNZ2J*i$DBkLabty>jV5ywa;pUrN?ASLaRYlpx}lbP1%LQ2s)s}J|O!R*wiw*U2Y#F z+ynh2Ngs1~CgKu>S+xZ*{wlrsLk}H6k6cx!IHY} z+U8|JOe`sAK@5_gKgM~J6)|5_wEuM7CnIzz-&#uLz>z=EEZB{<`;?lfEv7<9Ja+yN zIjQ{gX%_zsLekdpDJrVjeNGIbvOKiGVK7#6TX?wp(JyvCHF0b)oHm6hXN>5?g+gQi+8=-v&S&b1|j~9FY{f zn%Gbc4gXSn?8S4y8m_Hqu%ev3W9VfD4?MzHTZyqZE z@`Q|m`r0}r)dR74)jO(VLa?vQVi)vxSDzf5w1Z;RDu-9&6~-&rM7(wRQg_cahfx5s-O zsCvst04^ti4nx1f?SL;RF>9cuc42 z^@1jIs3MYou?F4RG2t|{B>`@ca!iDxg)rX_V}D3ulj~^7)>^8+|C3_Y=FZ@6Pszlz zM}G+5SflgtMZtScy=w{giX^0Gc^Rt7t}*@U`ctgKnXxggQl_YB?E`+d{dn3D&bqB3 zxTW-@;tkc^A&y87k`X!%I`w0%~!xe@b)^w-AAF zWQict;dF?dz=2Y{C8$el@UYqCY{DwiqA~JVie62y?-rytxTogOV3x(sLPq>5V43); z(BcAkF(Y(e9KRj<^1irFG4RP}(5GhU*lGgXCxlL*ytT(;4&D0Z@f@gzdWD4tN3&#^l~(fH-RkI(J-!s+p{A=zPG#NryqLlkSth`8^Pq|%bSlKu+Ktp2 z>>eC1#j5$+2D>C+v`d3c${%BBV)aZ70t69!3#!Ds#9G`>M5-?><9D|tu`rFx73Uqn zh_c1bar8$BL0_9z_Jj2#&ov1>N>?gE6wF+>zj>RN`|tbPq4{QRg4ZcsNa*G0=5Ncf zw{t98bAm-50Bzf zU;27k$^PkaK-&1ZB(C0lgyOLt!QQ5IzvDDBbTu^Iw0S>C$I4}#(}{4dH>Y7Omso4X zrDQ_qQ4P7Np;!I)_g0-jit!kpgGdtGf|GVfBYkSc-FOpUDI1P5>_2#<0wLZ_r_eZl4Xuer%tJx9G;b)aH zyDjN@<4i`>COJN}Qbb92S%c0P@^{%-fvI+V$k^AfXPuD=d)sT2*NpcM=_ z;;VoDKC7fJFN0Gr_bs3lT0fr;(LYLWywQ<(S8-OERXeZxnpTUk=S`rK4!nVO8P_U@ z*(wp7Y{RWJDNY~q)|_wsV5e>Cxw|^EnAGsh_|=h+Mlsh_KOHTGrFU%{^tk4H*9q|o{Ds!=IXguIT2PjZR1tc72qK!^G3Qz^1b)}0XWU$K>z>% literal 0 HcmV?d00001 diff --git a/docs/images/vs-tools-options.png b/docs/images/vs-tools-options.png new file mode 100644 index 0000000000000000000000000000000000000000..4acad752afbd05b5fef593c5f19d8fa25b905fb3 GIT binary patch literal 15540 zcmch;cT`jT)-D>Pi3s|Nh=>RldQ(~`N>M=RNR<*mN~j4)?;t2Pn)F_zODD7tLJ_4y z=%EIYP6(j|q@RWF-uv6<+M&CUtVu4@Og1_|F67M8mIK~=~EGv9PE8X^=B;OS8nz&(jc&K;$6;(fu@#EERGJ9;diVV0C|; zO~+`KbEEhPcF(zRHg|s%1`~K9f~9r?2j5IyS!Lhboph?tnw}dqcH-(FqnD@eb)KUE zvDch;0R@e%N_4RHE|Ro8I_O~Eqbh~`H8rQ_sP1w;LVOt+Ax&H4&GZgLR6+HbVws&o zjQegGZ@XS_AJ2vldekrFq=#={B+O-p;@b1uY_^x#erFs;?D2GE?D@bPa(n-pEW^Dc z{SXRhalcfA4aeQ^#P>4|9qb6e%Rd;)q>VCNnkIx68}F>NhtwpmZyxq0>Q~i5x+gtW z>JkNqBXCd5`sWD6jtR^B9Z6;zGxc~zv>$fq?m>6Gw~OWRDjqS-v!FLTRW9py5A|#D zeSMM7u9r&2e%Oq4A96qpHt=D!+V0V25(b}AhMavbl@O?SDfhA2)cVQ*r2a{Uq+4@% zdG`A72%qe@*x_&-9BCFQ%a7h@pBZGET;F%7w{yrg!K+Q)TH#sVr!7keWjpJM!*wvK z`c;AqgqqOA^^c%@u73AAlx*5sYjDGIO(&8|?J#c-G&v8@-HnDLmBCHE>cl#E^!C>P zw{a4&+<09>#eotl9@Fy3B?IR_Yg~UBKBHfSr7{p|MrUq(g_--377tC#eV@u6q&U={ zo;b%N58W@%cQq}SLA=J5kb}xuu`~}!)VW(@2+g>VOoLw+Rc!DoY1BKz2)%_n#y5O+ zb0TC&=q;C7YjpJU`zM#GO5*BXhh2NJ(4ADp;v|-=KUmgdf$**g4op>*W%3LoZU%Um zjXvRY_5PIvZLb@^jGG1C$DMlXTfb+-Up(!Zgb+D>3BjhqPk%;XHBMav7QQ8yKHM>^ zoyi!6cs68-3Hj0zb+SEJvX1?C3vYo33tjnnRrAFnX7WsUm$iB^3W*NHfsKH75$*aY zlYac-_v2?JvERE>gIyrVFgsOuysB3Kr~7i0z$WFke*CpdZ$-ZM*E=K}!w04p+naXl zX`5>AjkvnXzfC6Vg&$__pQ_iNR%EJIPw4d4l(mVn{5BKPrI47BuHRi(Uqwz<@1;5T z>@B7k@h7a)6R3exTM_XwWLgvQ`JsHTsJyuYxL|ON9jVo2~U-or6f3D2$`uTbvtS9=sVc$$00J&@^{q^i7Stk ztj2<#!*`{qN4`qS*dCY}WiV)*4KS_l%JxWWt>1F5?VH=K$FKC$G|Z9Up`VOUF7H&Q z)a15hmT0@0{PKMq4FrtCS!_!O_4(I+&J+S|_;M4KB<70E_gbnHu{&R3PFlEPTTMJ1xx$I9#YtmJkuo9dO93sW_2wEM zM-?GnoqhpLmrwNVG@@rJxt`5UUFxy>md4JXB368uOH;9(&?t6^#~s_y$S9S4vo~No z_4BFc>AktqgxG-F839_Jv0W<0j+q9^3+^)K)w&IP7a3N^oeo&kX;Hdb58UfpSzb*1 z)yTONkw#~`IKNZ1FBuzQBS3fd)DZ&vk9HOgW~R{YjbHrA2e5ghw1kjm3->yly7mP@ z@l1#z@VI4>zo-)jNp;DqRg>$)k*%fQ)lLBzHP;)gpR`tXY*#hVJ87Brl_MNO8%rF^ zYYA-m3p3J)^s)&d&9?fCO%Jc9vOawj@0L#W!Ln=T(t4r6JsnV!OI+@*&Ras$1r~_> zatFL{S=0XWl5(ryfju)4d3^6Zn4ANLb``7EV*(AI_2Q#fDGx8OY>dIJ_=_|w z6=LwE+V{oOg8YnT3J$28D(g3dvJ?E*u5kWleZV|bmsf){87~!&tnhpi+WX=Jy|+JB zRryQ5q&AsW@Tt0-uOyLJWDwtk@830zamAIW8AGvfz9Y3Ql@sVhEzs_j;D$L6WpHp;U{|w zOMw&j#+gwjUJdRi0fquc-8&P>rOPc+xzPeOe&a`9bKE4(tC2H@=b7vReM#3newz-% z*h}qSBvOCh^Ib6aw2(T6#!{ zX!0}Qb3&IcOl2$^x^8*3L4(ZDItKPomrwziiMQ4z$iC^yuA_0DU&oQfBSPiVQ>71- z)(u91l0{RgOS?v&hY~$YdZ#6X1GQ9Jxq8N+Lyre-RKRIHkyk}g){*ygO)b553(c@P zm;gi1M~7TeOTtU}=sCM_ye2$=_`<_EOqIhfWuYmH=!cNn-o$!ihv5D=QW_PG~goyj>5p*3l8->+{zPM(YSzwQybM3?9OUY3rXf~sJviwAZie27~kbI(n~3G;=xg_7aHrovR&`u zhtIe>$1c^-&V6UB zH2jyIH0t7lN@kb=A(J_HO3*UoCMZ)3V2I1-rVl8S*r`E~W-6rFe%xs%o%^NWn;^H> zaCABw`YAw#$L^iocZDrr%>S+Q*^fS$9sOc5#j3YNoc-Rf1JWL;g&K?E?f+{Yl&N~O zW+OXvNNjQno}vbRQLbSO=cExR|WtBDM)4I{e-No3hhrNz%QWMXed{agu2sk$LrSYYCoDcr%E&(;*tKl`% z=s$t-EZbchpIdyNFVH!EGRt-n=>LnM7MV41vQ9jKKSkND7(iDOFEGS$O`EiWs6n=& zF4k8s-W)N%Q??y`$4HT9JFHXDQQXCdheK4@sjW9>I!s+RPJ!>5gJ{WjiuoUH+q$tT zsv={%g4{7YO@E=k3}2tvwa5$cJS~%!X(Yi4-KR_@RTc&|%4cLn5L%{Ay)ZFZK~PNw zjSECKHN4V7KEZ@2*OsnD=oEJQLQ+Wr*sRF(8_{HBK}DlZS5bkabU<-jDyFm@8U}yV zY7>`w(J32O6}6)repO?CJF#>W>S_sRt?@6M%W_X_9&~NV5dUmoF`q+wId1Y6R-WO_ z>Z_K*JBhRh9NdoVlRbKEyyin2Q z)D3)>!?(0CG(2CMlHn*Kkr3(7CEZ!Z*FCO{%P}#2CuZO_S8EbJhp>hfR+K>7DVrnM zI}{&l47m!A%kLX$Qwp8WQ{kwKK$33Ki(3RY+jdzyh3Ac!BYIylh()9IU=vPTshK;g z5Qm*MacFItL|zPhl00dSU=1NfXm-Pp1=SYZ4(e=Qn~phUKXuJTn|i{W{AGhm6rw(z zFH?}bt?rX6*3=N6%Hrv1yeKN}H>xBL?sYT$8a1@vz?W7XEA<<%tWodog^drEmH-F@ zPu!`#sH}Fs<7nLGIiy|hO5!5np^h@6QCE6T4cC?m5~jKGgKDA6X!T}BJ*-d$&ezo! zU)$s}wrEcp9@j?z=kat6(0+kiS^MpDaQegZ@=nA@KKPQ1`Ui1qt}fF4EV9HH@_uzM z4SG;eq8(4ibig6Z=jZD{qk-{PAdo^5jZ3f22zchG5EpQG>iT5sfFJ<^eJNgWvCeY- zK?|=z90PYjjIr~M&Uc&1KpwR4hh+a0mBw2#lIbxHJu+qIK*j=o5%|%ic|aTXQ+i#$ z3B20v4lJs?+47AkuR-g&O$s^iY#T%Iw)E+WncfjC zXbjQ;AO)>f>6&nFut~`p;q)ZqlnqM_LeVa$=oZl1PBQ#Fh%+=9SpAB>CUV1B=NC^& zlDQeAHgUysNIV2`8Z5ji^B#1Ay+iCWMU8Wi>b)yBSPohJS5(ag=OSg--D_qd5JOVp zQ3JnL8+@RLBiN<-S9aWlJYt;^ndRM&g#~!I^qs%ca>a031znqcrE~7qPmRk|%)V5H}*F-6+ zZ`VPNH|0w|tO_r*%j~|w)|zJ9(b4?_FwP|>ti*NuELgQ$izSJOsRV@QF*D*HGF;$~ zvmQ#Sf?(`&WBWTAm<>MLjU?&UqSg5`hO{5#w!%+#)Vx_w>K&Y%j{R;QcEf0hfduQX zd(+{izQrH~X8BS&B6=@<9k~>AvT-SYr|EdTX(YR8Q}Q2waK#@O@mc&XL$vWRHN;p+ zcXm1>`%*W21%D55ZmEQ&UQBy~S4ZF<7UX8?O56_jA!|;bUlOYmU5f-yzv#1i;h!IS zN#zsc3be$ocVe=BD$)4ew9;yw;Zs6QaR!D3mUzq-*9MUm71m4EcTM_(KFCdZD1`We z?7dX53AN++*2!U@debILq)!^5c24}>=ivY>s!y&gda=s1YbPF&+{-nrW7M3wkw5)? zic-Wz8=V{Dmu82Pf{0roVw7W8NQvx(%C7OXk4=R? zBgN?*N|!N}8b#Yl{MFzUAH0C&x!J!&;3hhza(o6dcfE>1qKZ+U-Y{C*Y^$j2Lr}t8 zzrt8e8;gTG#Z=_`!`RftkfGQxAcipna*zfvAM758!@uI_o%p;@I7)Tjiv2UD}%p2l&snjs=&HbCXY(1 zXZu<6{(&l0g*g{;FP7N*x-TI<^6vaL9JiMU8a2+-{bn+7^sFTghG*piJ#ROAXg4H+ z=@~_zK%LYi1N?^R$mHBMm^AyNhw`~d*uY~fyr2hYArNRlo)ehyL275X@?V`U0MLMc z7({pe)&2s(Cge@q87F!_nm|F*Z{M|$WzxFgTYpj@rR=SpMx1DBgWMHGVrS+@di()P7hrdw2b9#w+X7)l;jDF73m3~HeW=7cZ5LybVY*+p7bWvD zqmzUv6;c#gu@ffpckc#_mq~z&@8Y^;Sky&$N0|i~_2bpI8S-;Fhc0~l*p;De#&cs5 zHk=4F@5__QPUnhp2eCGFzR52rw}b~9syQOVok(1Ttt z*=9OHy2CkjaD2C2F){W7onr6!KHnF;vnFLJ@1}RK>kpjs*teb}O+YzfO<2Hl@7%1! z%Z6vS((^9m$7WPx?;9JYgQ(regQqyhH^h(%+J_LL6ggTY`M!&c1fP(NSc+yrepL|7 z{UNx;dT^3RAx>MaP^8y5pC)LV&orn49C*)%K5_G@SYn4mjTFNE>CkRy3AgXP^KS(E zM;ub}3vvNV3ME_kBsbGv!do9#T2ucpXzVU<5_FIlW10M13ze)KtCTU}^llHw+Q#%c ze>L`-8GNC_2>prpp&gUK?m;Ty_BazMrg{dk$A?tr?U&~#tl0jt9d>WC5~vD zzKD8hb5YYStRWT_hInTfjmp@X;Yv{sIwg4L*-}d+LvD1MfdyhZw(2KkXlmQHp$5D< z3p#JUOy}+i>3-SvonisDbnV-sxJwO^X&BTMbH#f#U-PTSa8uSK3XUHm-T?hVvS_VV zmr$|9s>`V|3ceYgY1;x>groQ-b%mnF9b9Ux#=XU`G+fp4Ijfy^_-9cy6{5|u3Y{d0a$1iD~-#3$4LC=5O zrGVt6vD?frVlNV-$uCJ*bV1q*7&#S;)xgW#OCN*0_hA(j1{B4bRu z1AokD=jS*0r#YfW4W3)fw(34m(-76xRhDk#19wMn1K6{2->&aE@~}ePXGREmWw;RE0Ym*B~h`P}(^c%+N`$JW*NL?n22c{OI$; z!SrPdb)=#puPj%`TV~o9x_P+^aRTQzra!VXQIemPGTtxSjGdTboffTRJ7JNB4R_;> zFWRJg;3>cV{eimm*K-ORFfkoLYr*(Mn!p(M;}vI?uZu;Jy)Urh(x?BJ;Y$Q7>&^mG z9vj#JGozA5vKU2=OSW>ax|wrpBQVV&3(rq_BMg z?sieWd)4akP@8-I(K)KMst}_KDz_O1m+Q^rhhEH-$5Sn#8C#Sxqy{1ile88VGH9&e%K4XqIFaPd-`3jo;zbv{{TibP z?}1_9T#SORMrW`S-EKZp3@WAJDVtnspHMHRF{tB*`udHoS4efHuRT9J@u4Zie|s+1Z)BABFa z$J3skOCn}GqMrI*&S)K(X!b(LE0jEKUy)wlQKYfn`l`rGo%HKBlZ%BSB_lNu-hxCa zND|rT=M-@Q8_9|OS%xTC!KiYHTTJ+|_^nZMGY5g8%~wM9c3FnVVp`FI2CVK4pXm{dUE%ev$Kra8emWlrH~dva z*??-XygYTE+n=s0yv zP|KmlaojUI73)4qX?7)50#<)$$IEDR_+oAQKxzkPq_XPLsLiX{6vu`dFH4r9+8(7y z6c+)~%@Zfd*FR~fJyOS zIdR}xWV+AIbddXCNL`uMw7kQP|6wl*$1r@-TSarqG^mj>_-Uas$+*wYU!V*j#n=VW z*VNKSaKt_4^UToW``SNeV^oB5|GMG+!Dnc-y4Td$HCIOZrcbC-Ku+d36xOZoJCo?p zXOn*>mJafwd8?x1Mj+6TcJ!p!euIG@m63(&dT-ggaUoR(%I)o{*L?vstCS5em{~y; z;TY~TGAB9xK^8yq<``ir9#nncv{zx+{;Fi;=!c`I0MyaYRiisOJ-&n zn&&l(@yW_#cdkAVs*gbrX2!@!k7=8pQ!+P}U=!VoR#kOUW$EJq zBoY#Ca^vGzk|g+A6)|>;*B(B`CIeufs{+KW@jhtGhXVQRKJ(P@14hmRv1 zrjUyu*1H{wEzQsAIJcx`_%jK$H!4RDWufoK&KNLfL z;R#3WKb8$iZoeXT_453eJ7@Ca&#R*tyw-yypL2~kkT=VftOrh@?kHysv-r-S}6n>5;@gF^FA;@3)JcMkOzrO)m1-BAB6@| zRY!0HJp;^$mMuvEMjfe!G;2Wy?uf)<%c*(JIF1@Xjwta=n70 zeCWK(=khOW#b)$H67uv`v34HcOaQU*m~4<=B-zDKGuy7u#p7A4t0IT5`n6w+P9+M= zl`Z129HJ8QHLQ&q+uv)M9VJLfHbBc668{1P288z{}_zI6I6Q8GVOwSuwp5iINs1*g9_V?bLuwN7d4uFrZcY1l7#iAaFl$Z!|w|Imy7 znZo?9Wsd12fDRijfE=qgBukAmV(xa3$ua$W=?nr{gq~Rm|1SdL-&BXY1~sVqKI{c@w&sREYrmIEL&GuHD~0YFGCK=&1-?fQF{Jk z-fl!v2y8<>btEr9w^vk#A#z?&CV0j;I9&7lnCyyYNsm#=6Tc!_oAM~V-C@nxi0kQ< zQnoRFdN!H0gZ>M_CU5wA)Ad}cV&s7I^Q?_RV<8^dVN+u?3nr&Z0yY`XWnO7LL2)1Q zT+M083INaNT;hqt@DZtAPcODmv-JZmMIH;ht|eUlE+AEru_KPNiFv|$Tu@E-QN|m$ zB)+yNm@cs>R(;f7WJXj$PO7w3Y^@pt?8?%2)XGa&t<{?${F=s16J6RC)1)^OsKid) z^}~AqLfGHDBQ!6iCY)0Y?B7CnXkXjHI@6OhSoNbHW4%2=aI%56#cSb-w3l}aHT_j0 zWey~#Jtn!Pt`9$n`jj{|#^Y*{{`EQ3;ZLjL&0H(F27gjGXynXlFaFbk(OJ?u+X;B5s5^4 zUhhaIFX-ZOBZb>`-YR8gg<%2j1jI0>^Y~D){vxZWit(RdyRF)Ea=69a1?$D97XV1m z2oFe)e7FBaIiyX!4sGCZFYyklol1T=TGD?`_oHRCs~ zpUGRv8^V{cVx3cd3oM$vl^2aYQbcKzzyU8@6~T?SeGyM9gxTGzZWV?58_MK!#5||V z6}h1vPp+lR1sjX-Ag41yZiQaEc8xTY(YVl-c?;mVCEU_*;iyh$=&R=rKi>ERyY=Ga zW_@70U>GqVwait$oi@0T${HACK9XuIE8{kAt1r9lPv}pR5_dTx zc%DJg+J!TdEscqmk`BUiotA@xNRpumT3obJfIww`xEUE(ObpmV`2dE})OFFvQJ=mp z6u0qdQ}|Z)@rkW;LEgbkwHD*JxpI`t-at`9Dt+N7lz{6E78!@^%oM1Uka`ui*o3BJ zp=zK!DKEkfS8Bss__#1BFZ}76*pDrbuLdbBETe;&N$`x>BGfJ8N&zB1*7PF50qt+s z49|a&A7)fbN9SmOdVM3^cikJ(6fjMf#f-Zcv5Z(~+0TJ`PKGn1s;A#`0O+C+i+-7- zduvM3!vXbL;&#jviv7qtv8VSxpkG>ot)2k4EmKV=cb;VtfWt@uVu$`&WcfFr0{(EE zZ1>##Kj0IA;zM2ZG&r}+IR&BlZvfYyH5*`hRuJzR|I42A2=hm|_osgp&lN+|XR0ZZ zx6V19GH;(|%2v@22|y3fJfQM80EcHOW4uW{y8zs{&kaVgaflb_%h|t%4V{5d!ldZ) zXZB4gQ|Vt8Rq&Fz-#QxfZN#mYK$(JPlIJ4)ERZ<9LEEI{BU!W-f!3F@9ReZ{cAw&G;i&5Q&?(0+4**4~A-UI=}6H&oEekYKvpx zOQ6^;oa?%nSlqcwz3^B_ueizYtyT(^uz2%C(3t!<1IXjNyddwD-conQ>Z9kisdZR=%sg5LeC@>=+)$8(1f{9dq)e8Lm##_CpAmOvjZh!x<^ z-#%6%ymL7XbYHb*(HJEey~fbW6_PmG06U*nCCv2lW?QL&)BXiXbxfy~uUIM8Ti*?7 zUfEK(Wl6sh(;nMlW;@$<)mX3^Tqx}Zjv5Q z$lPiWms-pd%ePG4ix-pB;~DB&@sshJQ%+kb^5W>Cu@g?TAyq}Y&gBCAV##TIvBsvp zbKa27z~&7{*4Fass}eecY2^zb;~;PdIWPiye}X{YFaBL+|H%vZUkB;`Fp6m=)gzQkq-mbq5UrgV{I`coh~&NoR)-;Djc zK8SCQEZ9f1q)BVnVTm@yWR1L6qT>7iT^#?sfJJHOEW>NQ+!vQ1}~m-Uv-|H~#@~ zBGDLrk{KUrj6TtK@C_fuPSm(qwi?|?#jaW?ksCet5HHg$?|I2XT-;{VTTXJpBd~`? zFlkT~6ocNw?PcMKykOk#=jh|z6!`f`3=ZOL;?Vk}%ZF(JPoV;`7fkbEjefWwcGqH$nY8!6sJ$ zg&@JB?&U-YKJ!NvBtc{MfvanpywCZUqgjT}R6sEmhz0O*f~P1K7}`av*A)wQ(;R5K za@6ydRFY1*)ep~d88wMX#DWGvYT{A>Qs?feRvJtY`J2XAnKf5={e z=z81(jLKb|u8VbGIGZ3QQ6^P8K%5UJdjSM^0Uh^W3u0eG=jV`s_W)3>s-{&Vax$Lbgk zvE&u-D|}tF>XORqjrX49-Q|lP_Xm6VEnCDIp+jWsN&pH+^>OReCyth7wY>T0z%=a) zoc_Ae^xt?%JU6)Y?bF~-<+Piz@z?Z^K7)d;;4a>x*`gQCp{tk=*o0K3+$NWUH89_l?!bBdN}xlR@|u^ZUy92c`Dne*UQG_tW$z$Bf&CFG za4HBidb@+5a^mVzv`t-ob;_Ft^x~bvS)5h}IPGV~-2a|A|9ivVX=#Kt2YTD}D=u;5 z)xc=849ND^CNF&>(AED4^A*rCws#^2i30`~vtln@!i+-y?_No1wyQ3d^2VAxZ1#tr z`H9u!ms$TQH@gFesAq{U^nJB6nbq+ zB7qFrQ*R&3#HSLKHmb@u@m$XX287?}mszt9L1$^2RbA#n+7wLA==p934`78IwAcYM z&BCn6(yaUj?_WOd>LSyP9$eg>8qczGf5vIKz^1}vU&imed+H-tx4)(0h2PVQW!Gt! z=6*NfaZ~5zw-TE(eJF2OJ@Aj98|fj+H+fFZ@(ha1Vrb7r)7WyFt0(uUGqlv*IE$;P zJC$RWNH?7sJ{cLEH{%kSq`_4tqs)V?wbAmK72{u+tYCR#WM!=0ai+SBf3ocKraPILYa7&lZ%m)LLbo}HDU%V_Q=O$iB*cQ;FX7ePVf#u28 zGhxR$2y8^kB+Y5nr&O8Bf{KAXiLebZN#7?Or(b%0*>No8#fhArRrkuYmjyta*%~+R zLc8olYo)ucvf7$;W4E4T8 z)=YJlA|J}Q9YcOJo*WZuXWX8EE<4rYd{F<~kdQtlOx9}p?yZlcKk}Wrxv2mY<^QJ| z`z48FHP0|03o5xL)9#LUbpa}B`P{?*mJ<9Yp#oMeUMUt8l^XZhHmi@P4JI2xw4l=( z!_2Z#0~WpeWSJs>d$^&ovAvo^Ffhx&x8-J4rQqn||LG`GmG{lIzJstC$wz&n`1hz* znCsZl>$)7)ccX=R=l5LXN+=85*|Hx1kPB21_V+(y_m#+cyLY;Bdy=$6mw?f^iE^YZ3K6Z9Q~uk(&OiIzBrC zn3bAInb|+wUH2+&{k#uWgzLy#c4)gR@z0J%@awq#jsj8mS+bLCG7#H#?A_}O7$Dr| zt7M$uJzbS^w^E`9}al ze(~I6RERacteTm#-)e0GP)TZndKZGBN48%(#TvpVoLq7<->gDJ&UP>+lYkwJ(llTP zgN5H@6r|?m{=X4YavC<%+={knr&H zy&F(xpjH9w{_g~w|K>mZbLruqPQ~Y_(VkW2y-~bG)Pa;}S2!;+0U^RoL}~uUI{?hSZVI zjkm4Q1{LIEa0*Fw{-eql-4uoVLafvt0B4)8Q)7p9n=D+x$w9MpAM-VtyB#+$3bBz? ztmVfAOfKvsq$JUddK(q~^mq6W*NqYcSOuZ; zTuPJWO-R}6PxnNGFS;qu}CP`O}g)#@Bvt0`JPX zO}VH~_gtfIdUAQB7$(jFi$+c#Wm9#XR_0lgJ^${NL-kX+vLwE;?G~B`4|^GmY(#Qd z9yrEdfz~`Ch+l>$OndyRL3~W)HZ*>6slBgI%X}bjHRz}b44G!}wK67Kb>9ZLm2+ve zCt7mpqWeYw58bVCbME=G5LMc90ICAy4Br_;!S!0G+5)c-dbYoG_a*HvxQC+a6{5AU zRbDDVXeP=6MNlbJlLq#k!c+XxT{!x01y7YG^#6=H43%}(4WUWs9yK;+OAuiSe|8N6GYB!uVPx3^vuGln%_Ruq71>;9$ z>-ENUY1w0E*W9+3M_F6o^U^km)%Y3kIk2z!w;M@7*c;%7YCb_e% zgR2H=@jh7&S z2FT5}$kjgs3Ke%e8US$S>8+dkOoTE41`L;&alHnOV^2vfuCx|c|JDBxzS9?YxJwwq zp?#}uFt@-@AAas6`zuz)yLij{5r`F7T==ZD&p&0wYerh82+{zkbdaDN^2-0umRD3+ z$nY>K`HesP%ly>#e%ULs@=t)P{Ee0!7)o^LSXYx9_De7U4&xn-2gHT6>8&<$&?}$} z&&JWXXEv$mm-P^5ft5Gr0>~{4(73Z;6Rd7p(%W}@s;MG&(u6AQmhNXEOrAbT7G5%e zZg!CW8buX5;%i$TtwZS2MUSsDt8}2rPk=&CYn0~qAN2Kg*ZOs{dqH&6Q^lK64D8tE zU6@6qfitdxFc15Ncu3eL2TAaTPui^$hJjvP5^MeNIR+m*;^NT(8-nwdeHipuV?j=P zaOMnX2T=qO0QT|mY$d?S_)iVfTN{gA+~Ku5_nb%P@3>CWE`*ak0_B;oAm~Nr@~;uI zbYSYUSS31(GbO;CUU6A4;Ooijx66W=L0@NA*yU5@g7Mi7J43EwlG4Z4(dI7J5w~CCH!@E zt!_Gl!AwuO_@69^E>CQ#o>+r$N|c zU>;^BV%)hX&44Yq(-e9y{&ZtQ_RuC{_oRAg?V*S1IaZJYt*60_>h;p9@gzFa zjKis=hFS28pHA(R%O~d3Zrq0K$(-zJnkQ}mXvcNB(;sF>Z%zF+si8-{xceXlGEV~w zR^PPVlZ_d_?RH&O)NMNirp6Kt zChDL%_Kp$fx$vg>b%VxzZbve}t$)wEyy!a@}!s2EjryRLKI?C4Xg>4(9C-P)!i zY+z-c=F~3DpPe}CrHXATaCQ|js4ZZd?AV$2W}=||q60=XQr7PAbx9p#~lLNLp2>bH3*(}i%)Csb4Xa}c>Rv_lT~)uOrU!$?ABrpy?2xeGSUG zguL`o5YGd!=MB!Nu;St-;6ZA@gRFgI&LpESdzG@<>Wynq7f;GWHn7@wonK5R1j zV_ARIz@4Y33E1%fY2akWya~drs5$yL3&Xcyk`m8BlH6`Jvo~Y!Cy@gLTPV3XD|K{z z>ziin_&T^Gq7MQ8^-C41ks#R^pl87LTYCxI1d^k;Ja7N|XUL_Ubrf-xTGp%6SFPD+ ztMjz_>T)p1=I_IUv3-neN%bWk>PVU~JpA;)EOM1)d}dE-lFg(Hu}yI)jJmsK=?nB^?VXSLkwZXX z|6BqyX{uJQ^eV2Dn$06g4~_R45xnN6mj&`MS8LjrqwSVtvPmBvb9Gv!7edpT;ft`B zfR(nWqFJV<-~Db)_gnDd;I=?Dc5aAKjjUHg^I6TVRk9i$J$m$zBOJx@$kc0Ab#VBu zPvtMkAh0`0Ll)uFg6iA#6$A;cmIYh~gqY)Vv(3_0B&qLVfk9jF!j1Ef5a8|KEC(X# zPl1!zWYP>X3f#Q+8(~^FEW3AWrv}sFzl+G=Ii`$lI_hp34m`muL25ixw)UHZUlZAO zX5(4aQv{ClaM$Pd!Jv{kq4Z2nmSV^L%D}IDUj2tnCs;Mw8>FwqYsJ!VM77=7AolCXf@2t}VjZ(8fGugv&%+ARnakAn>0W?P1^=ctxvmF<} z>t3^C;~b+7e}>>qgHQp-^(?fYP3KlRu-EJLyKKl7T9;Q(ql&IrxiE))}RGop!1?-O>u4f-T{Wr({ jf9G=jU%yl3fbE^?VZYE#>TAG Date: Tue, 18 Jan 2022 12:26:47 -0500 Subject: [PATCH 126/268] build(deps): bump shelljs from 0.8.3 to 0.8.5 (#32481) Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.3 to 0.8.5. - [Release notes](https://github.com/shelljs/shelljs/releases) - [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md) - [Commits](https://github.com/shelljs/shelljs/compare/v0.8.3...v0.8.5) --- updated-dependencies: - dependency-name: shelljs dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 66 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8a9863b918391..cb41734ab98ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1164,9 +1164,9 @@ bail@^2.0.0: integrity sha512-d5FoTAr2S5DSUPKl85WNm2yUwsINN8eidIdIwsOge2t33DaOfOdSmmsI11jMN3GmALCXaw+Y6HMVHDzePshFAA== balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base64-js@^1.0.2: version "1.3.0" @@ -3210,22 +3210,10 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@^7.0.0, glob@^7.0.5, glob@^7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.3: - version "7.1.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.5.tgz#6714c69bee20f3c3e64c4dd905553e532b40cdc0" - integrity sha512-J9dlskqUXK1OeTOYBEn5s8aMukWMwWfs+rPTn/jn50Ux4MNXVhubL1wu/j2t+H4NVI+cXEcCaYellqaPVGXNqQ== +glob@^7.0.0, glob@^7.0.5, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -3234,7 +3222,7 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.6, glob@~7.1.6: +glob@~7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -3629,12 +3617,7 @@ inquirer@^7.0.0: strip-ansi "^6.0.0" through "^2.3.6" -interpret@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" - integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== - -interpret@^1.4.0: +interpret@^1.0.0, interpret@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== @@ -3710,6 +3693,13 @@ is-callable@^1.2.0: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.0.tgz#83336560b54a38e35e3a2df7afd0454d691468bb" integrity sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== +is-core-module@^2.8.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -5482,7 +5472,7 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -6473,7 +6463,16 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0: +resolve@^1.1.6: + version "1.21.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.21.0.tgz#b51adc97f3472e6a5cf4444d34bc9d6b9037591f" + integrity sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA== + dependencies: + is-core-module "^2.8.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^1.10.0: version "1.11.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e" integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw== @@ -6743,9 +6742,9 @@ shebang-regex@^3.0.0: integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== shelljs@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.3.tgz#a7f3319520ebf09ee81275b2368adb286659b097" - integrity sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A== + version "0.8.5" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" + integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -7201,6 +7200,11 @@ supports-color@^9.0.0: dependencies: has-flag "^5.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + table@^5.2.3: version "5.4.6" resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" From edfadda899df4c4bc8e1125653d27e25128b98da Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 19 Jan 2022 05:01:13 -0800 Subject: [PATCH 127/268] Bump v18.0.0-nightly.20220119 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 3ddab8c1cf696..ecb38aac1f5f0 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220118 \ No newline at end of file +18.0.0-nightly.20220119 \ No newline at end of file diff --git a/package.json b/package.json index 08e5989e75882..72d73b596dd4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220118", + "version": "18.0.0-nightly.20220119", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index a4e919ecc5339..a67c47195b9dc 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220118 - PRODUCTVERSION 18,0,0,20220118 + FILEVERSION 18,0,0,20220119 + PRODUCTVERSION 18,0,0,20220119 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b89361a991e496b00303fdf4eb841c4021c836a7 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 19 Jan 2022 18:58:32 +0100 Subject: [PATCH 128/268] fix: crash when saving edited PDF files (#32512) --- patches/chromium/.patches | 1 + ...x_crash_when_saving_edited_pdf_files.patch | 86 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 patches/chromium/fix_crash_when_saving_edited_pdf_files.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 30954526811f5..c2f0b55b8b8c2 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -112,3 +112,4 @@ fix_aspect_ratio_with_max_size.patch revert_stop_using_nsrunloop_in_renderer_process.patch fix_dont_delete_SerialPortManager_on_main_thread.patch feat_add_data_transfer_to_requestsingleinstancelock.patch +fix_crash_when_saving_edited_pdf_files.patch diff --git a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch new file mode 100644 index 0000000000000..409db5c2413c1 --- /dev/null +++ b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch @@ -0,0 +1,86 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Mon, 17 Jan 2022 23:47:54 +0100 +Subject: fix: crash when saving edited PDF files + +This commit fixes a crash that persists any time a user attempts to +download an edited PDF. This was happening because the logic flow for +downloading of any edited PDF triggers a call to +chrome.fileSystem.chooseEntry, which we do not support and which +therefore causes unmapped page access crashes. + +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.js b/chrome/browser/resources/pdf/pdf_viewer.js +index 42407ef7c214bed1eb44165a87c6d0dc44f0ad7f..64225caf3738549520b35259628559ec6c15d901 100644 +--- a/chrome/browser/resources/pdf/pdf_viewer.js ++++ b/chrome/browser/resources/pdf/pdf_viewer.js +@@ -967,25 +967,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { + dataArray = [result.dataToSave]; + } + ++ const a = document.createElement('a'); ++ a.download = this.attachments_[index].name; + const blob = new Blob(dataArray); +- const fileName = this.attachments_[index].name; +- chrome.fileSystem.chooseEntry( +- {type: 'saveFile', suggestedName: fileName}, entry => { +- if (chrome.runtime.lastError) { +- if (chrome.runtime.lastError.message !== 'User cancelled') { +- console.error( +- 'chrome.fileSystem.chooseEntry failed: ' + +- chrome.runtime.lastError.message); +- } +- return; +- } +- entry.createWriter(writer => { +- writer.write(blob); +- // Unblock closing the window now that the user has saved +- // successfully. +- chrome.mimeHandlerPrivate.setShowBeforeUnloadDialog(false); +- }); +- }); ++ a.href = URL.createObjectURL(blob); ++ a.click(); ++ URL.revokeObjectURL(a.href); + } + + /** +@@ -1112,30 +1099,13 @@ export class PDFViewerElement extends PDFViewerBaseElement { + if (!fileName.toLowerCase().endsWith('.pdf')) { + fileName = fileName + '.pdf'; + } +- // Create blob before callback to avoid race condition. ++ ++ const a = document.createElement('a'); ++ a.download = fileName; + const blob = new Blob([result.dataToSave], {type: 'application/pdf'}); +- chrome.fileSystem.chooseEntry( +- { +- type: 'saveFile', +- accepts: [{description: '*.pdf', extensions: ['pdf']}], +- suggestedName: fileName +- }, +- entry => { +- if (chrome.runtime.lastError) { +- if (chrome.runtime.lastError.message !== 'User cancelled') { +- console.error( +- 'chrome.fileSystem.chooseEntry failed: ' + +- chrome.runtime.lastError.message); +- } +- return; +- } +- entry.createWriter(writer => { +- writer.write(blob); +- // Unblock closing the window now that the user has saved +- // successfully. +- chrome.mimeHandlerPrivate.setShowBeforeUnloadDialog(false); +- }); +- }); ++ a.href = URL.createObjectURL(blob); ++ a.click(); ++ URL.revokeObjectURL(a.href); + + // + // Saving in Annotation mode is destructive: crbug.com/919364 From df50a0efb10e26ff7f7a79e295342a9abec4c129 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 19 Jan 2022 21:51:12 +0100 Subject: [PATCH 129/268] fix: undefined backgroundColor (#32517) --- shell/browser/api/electron_api_browser_window.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index 1d9d9630bed1a..35ae2fa910718 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/shell/browser/api/electron_api_browser_window.cc @@ -37,7 +37,6 @@ BrowserWindow::BrowserWindow(gin::Arguments* args, gin::Dictionary::CreateEmpty(isolate); options.Get(options::kWebPreferences, &web_preferences); - v8::Local value; bool transparent = false; options.Get(options::kTransparent, &transparent); @@ -47,8 +46,9 @@ BrowserWindow::BrowserWindow(gin::Arguments* args, #endif // Copy the backgroundColor to webContents. - if (options.Get(options::kBackgroundColor, &value)) { - web_preferences.SetHidden(options::kBackgroundColor, value); + std::string color; + if (options.Get(options::kBackgroundColor, &color)) { + web_preferences.SetHidden(options::kBackgroundColor, color); } else if (!vibrancy_type.empty() || transparent) { // If the BrowserWindow is transparent or a vibrancy type has been set, // also propagate transparency to the WebContents unless a separate @@ -79,6 +79,7 @@ BrowserWindow::BrowserWindow(gin::Arguments* args, } // Copy the webContents option to webPreferences. + v8::Local value; if (options.Get("webContents", &value)) { web_preferences.SetHidden("webContents", value); } From 84e24600123570dab941161fb9edea053cc9a5d1 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Wed, 19 Jan 2022 19:48:48 -0800 Subject: [PATCH 130/268] fix: strip crashpad_handler binary (#32540) --- script/lib/config.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/script/lib/config.py b/script/lib/config.py index da0826fa6941d..a5bbce59b7eec 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -14,14 +14,15 @@ }[sys.platform] LINUX_BINARIES = [ - 'electron', 'chrome-sandbox', - 'libffmpeg.so', - 'libGLESv2.so', + 'crashpad_handler', + 'electron', 'libEGL.so', - 'swiftshader/libGLESv2.so', - 'swiftshader/libEGL.so', + 'libGLESv2.so', + 'libffmpeg.so', 'libvk_swiftshader.so' + 'swiftshader/libEGL.so', + 'swiftshader/libGLESv2.so', ] verbose_mode = False From d619804fc815b7cc789354d11f340f61dfa9b9a5 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 05:01:34 -0800 Subject: [PATCH 131/268] Bump v18.0.0-nightly.20220120 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index ecb38aac1f5f0..51a55ce4ae64d 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220119 \ No newline at end of file +18.0.0-nightly.20220120 \ No newline at end of file diff --git a/package.json b/package.json index 72d73b596dd4e..909ac4518bd84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220119", + "version": "18.0.0-nightly.20220120", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index a67c47195b9dc..39d9bf4fc6ad1 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220119 - PRODUCTVERSION 18,0,0,20220119 + FILEVERSION 18,0,0,20220120 + PRODUCTVERSION 18,0,0,20220120 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 6b413568681fd236a10a54bf9ddb7281cd6bcb51 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 20 Jan 2022 13:59:02 -0500 Subject: [PATCH 132/268] test: disable flaky test on WOA (#32542) --- spec-main/webview-spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec-main/webview-spec.ts b/spec-main/webview-spec.ts index bcb05b7206904..c6cd59bde06fa 100644 --- a/spec-main/webview-spec.ts +++ b/spec-main/webview-spec.ts @@ -227,7 +227,8 @@ describe(' tag', function () { }); }); - it('loads devtools extensions registered on the parent window', async () => { + // This test is flaky on WOA, so skip it there. + ifit(process.platform !== 'win32' || process.arch !== 'arm64')('loads devtools extensions registered on the parent window', async () => { const w = new BrowserWindow({ show: false, webPreferences: { From 87b3f6db9d76fdfd1cb5cb899273b5b720c93cc4 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Thu, 20 Jan 2022 15:42:43 -0800 Subject: [PATCH 133/268] fix: undisable AXTextMarker and related APIs on MAS (#32543) --- patches/chromium/mas_no_private_api.patch | 417 ---------------------- 1 file changed, 417 deletions(-) diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 9aa4b99ac8201..71b40012bb4e9 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -6,423 +6,6 @@ Subject: mas: avoid some private APIs Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be excluded for people who want to submit their apps to the Mac App store. -diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm -index dc33d3674d6c3cf794a401a4c41bd1980ccd9a51..b44a24bcde38e407f93b13e5699323055d4a8a62 100644 ---- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm -+++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm -@@ -275,6 +275,7 @@ - return PopulateArray((NSArray*)value, indexer); - } - -+#ifndef MAS_BUILD - // AXTextMarker - if (content::IsAXTextMarker(value)) { - return PopulateTextPosition(content::AXTextMarkerToAXPosition(value), -@@ -284,6 +285,7 @@ - // AXTextMarkerRange - if (content::IsAXTextMarkerRange(value)) - return PopulateTextMarkerRange(value, indexer); -+#endif - - return AXNSObjectToBaseValue(value, indexer); - } -@@ -322,7 +324,7 @@ - AXMakeConst(affinity)); - return set; - } -- -+#ifndef MAS_BUILD - base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange( - id marker_range, - const AXTreeIndexerMac* indexer) const { -@@ -338,7 +340,7 @@ - PopulateTextPosition(ax_range.focus()->Clone(), indexer)); - return dict; - } -- -+#endif - base::Value AccessibilityTreeFormatterMac::PopulateArray( - NSArray* node_array, - const AXTreeIndexerMac* indexer) const { -diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h -index 2b05b9e3b9a5f4ad1951fbbbfa34adf129d8f408..0ca278cf6bb0ecc2127f5507941cf592449e2e61 100644 ---- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h -+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h -@@ -89,12 +89,14 @@ class CONTENT_EXPORT AttributeInvoker final { - const ui::AXPropertyNode&, - bool log_failure = true) const; - -+#ifndef MAS_BUILD - id DictNodeToTextMarker(const ui::AXPropertyNode&, - bool log_failure = true) const; - id PropertyNodeToTextMarker(const ui::AXPropertyNode&, - bool log_failure = true) const; - id PropertyNodeToTextMarkerRange(const ui::AXPropertyNode&, - bool log_failure = true) const; -+#endif - - gfx::NativeViewAccessible LineIndexToNode( - const std::u16string line_index) const; -diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm -index 696d87b7aaf0c9de9c071bd97197192720752010..ebf3935d20ba22ccc0473252a1323be4bd003eec 100644 ---- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm -+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm -@@ -189,9 +189,11 @@ - if (IsNSAccessibilityElement(target) || IsAXUIElement(target)) - return InvokeForAXElement(target, property_node); - -+#ifndef MAS_BUILD - if (content::IsAXTextMarkerRange(target)) { - return InvokeForAXTextMarkerRange(target, property_node); - } -+#endif - - if ([target isKindOfClass:[NSArray class]]) - return InvokeForArray(target, property_node); -@@ -389,6 +391,7 @@ - property_name == "AXTextMarkerRangeForUIElement") { // UIElement - return OptionalNSObject::NotNullOrError(PropertyNodeToUIElement(arg_node)); - } -+#ifndef MAS_BUILD - if (property_name == "AXIndexForTextMarker" || - property_name == "AXNextWordEndTextMarkerForTextMarker" || - property_name == -@@ -400,6 +403,7 @@ - return OptionalNSObject::NotNullOrError( - PropertyNodeToTextMarkerRange(arg_node)); - } -+#endif - - return OptionalNSObject::NotApplicable(); - } -@@ -412,6 +416,7 @@ - return value; - - // NSRange -+#ifndef MAS_BUILD - value = PropertyNodeToRange(property_node, false); - if (value) - return value; -@@ -428,6 +433,10 @@ - - // TextMarkerRange - return PropertyNodeToTextMarkerRange(property_node, false); -+#else -+ -+ return PropertyNodeToRange(property_node, false); -+#endif - } - - // NSNumber. Format: integer. -@@ -538,6 +547,7 @@ - return uielement; - } - -+#ifndef MAS_BUILD - id AttributeInvoker::DictNodeToTextMarker(const AXPropertyNode& dictnode, - bool log_failure) const { - if (!dictnode.IsDict()) { -@@ -627,6 +637,7 @@ - - return content::AXTextMarkerRangeFrom(anchor_textmarker, focus_textmarker); - } -+#endif - - } // namespace a11y - } // namespace content -diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h -index 8ba9ceef621eaa8539d2e127ab75c23ab671f2a1..cdcf397f3fb4fb98b48fcd5080edb883eeb9b52e 100644 ---- a/content/browser/accessibility/browser_accessibility_cocoa.h -+++ b/content/browser/accessibility/browser_accessibility_cocoa.h -@@ -148,7 +148,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker); - @property(nonatomic, readonly) NSNumber* enabled; - // Returns a text marker that points to the last character in the document that - // can be selected with Voiceover. -+#ifndef MAS_BUILD - @property(nonatomic, readonly) id endTextMarker; -+#endif - @property(nonatomic, readonly) NSNumber* expanded; - @property(nonatomic, readonly) NSNumber* focused; - @property(nonatomic, readonly) NSNumber* grabbed; -@@ -160,7 +162,9 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker); - // Index of a row, column, or tree item. - @property(nonatomic, readonly) NSNumber* index; - @property(nonatomic, readonly) NSNumber* treeItemRowIndex; -+#ifndef MAS_BUILD - @property(nonatomic, readonly) NSNumber* insertionPointLineNumber; -+#endif - @property(nonatomic, readonly) NSNumber* isMultiSelectable; - @property(nonatomic, readonly) NSNumber* loaded; - @property(nonatomic, readonly) NSNumber* loadingProgress; -@@ -179,14 +183,18 @@ id AXTextMarkerRangeFrom(id anchor_text_marker, id focus_text_marker); - // The object is selected as a whole. - @property(nonatomic, readonly) NSNumber* selected; - @property(nonatomic, readonly) NSArray* selectedChildren; -+#ifndef MAS_BUILD - @property(nonatomic, readonly) NSString* selectedText; - @property(nonatomic, readonly) NSValue* selectedTextRange; - @property(nonatomic, readonly) id selectedTextMarkerRange; -+#endif - @property(nonatomic, readonly) NSValue* size; - @property(nonatomic, readonly) NSString* sortDirection; - // Returns a text marker that points to the first character in the document that - // can be selected with Voiceover. -+#ifndef MAS_BUILD - @property(nonatomic, readonly) id startTextMarker; -+#endif - // A string indicating the subrole of this object as far as accessibility - // is concerned. - @property(nonatomic, readonly) NSString* subrole; -diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm -index 34fbe096ddcc84b156384f12a23f278c0f94e385..043c9b8113c4f15f0248839a69b7ee76e3da2794 100644 ---- a/content/browser/accessibility/browser_accessibility_cocoa.mm -+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm -@@ -188,6 +188,7 @@ - - // Private attributes that can be used for testing text markers, e.g. in dump - // tree tests. -+#ifndef MAS_BUILD - NSString* const - NSAccessibilityTextMarkerDebugDescriptionParameterizedAttribute = - @"AXTextMarkerDebugDescription"; -@@ -197,6 +198,7 @@ - NSString* const - NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute = - @"AXTextMarkerNodeDebugDescription"; -+#endif - - // Other private attributes. - NSString* const NSAccessibilityIdentifierChromeAttribute = @"ChromeAXNodeId"; -@@ -224,6 +226,7 @@ - // The following are private accessibility APIs required for cursor navigation - // and text selection. VoiceOver started relying on them in Mac OS X 10.11. - // They are public as of the 12.0 SDK. -+#ifndef MAS_BUILD - #if !defined(MAC_OS_VERSION_12_0) || \ - MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_12_0 - using AXTextMarkerRangeRef = CFTypeRef; -@@ -455,6 +458,7 @@ void AddMisspelledTextAttributes(const BrowserAccessibility::AXRange& ax_range, - AddMisspelledTextAttributes(ax_range, attributed_text); - return attributed_text; - } -+#endif - - // Returns an autoreleased copy of the AXNodeData's attribute. - NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility, -@@ -716,6 +720,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) { - 0 == strcmp([value objCType], @encode(NSRange)); - } - -+#ifndef MAS_BUILD - bool content::IsAXTextMarker(id object) { - if (object == nil) - return false; -@@ -760,6 +765,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) { - static_cast(focus_textmarker)); - return [static_cast(cf_marker_range) autorelease]; - } -+#endif - - @implementation BrowserAccessibilityCocoa - -@@ -784,7 +790,9 @@ + (void)initialize { - {NSAccessibilityEditableAncestorAttribute, @"editableAncestor"}, - {NSAccessibilityElementBusyAttribute, @"elementBusy"}, - {NSAccessibilityEnabledAttribute, @"enabled"}, -+#ifndef MAS_BUILD - {NSAccessibilityEndTextMarkerAttribute, @"endTextMarker"}, -+#endif - {NSAccessibilityExpandedAttribute, @"expanded"}, - {NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"}, - {NSAccessibilityFocusedAttribute, @"focused"}, -@@ -794,8 +802,10 @@ + (void)initialize { - {NSAccessibilityHighestEditableAncestorAttribute, - @"highestEditableAncestor"}, - {NSAccessibilityIndexAttribute, @"index"}, -+#ifndef MAS_BUILD - {NSAccessibilityInsertionPointLineNumberAttribute, - @"insertionPointLineNumber"}, -+#endif - {NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"}, - {NSAccessibilityLanguageAttribute, @"language"}, - {NSAccessibilityLinkedUIElementsAttribute, @"linkedUIElements"}, -@@ -814,13 +824,17 @@ + (void)initialize { - {NSAccessibilityRowsAttribute, @"rows"}, - // TODO(aboxhall): expose - // NSAccessibilityServesAsTitleForUIElementsAttribute -+#ifndef MAS_BUILD - {NSAccessibilityStartTextMarkerAttribute, @"startTextMarker"}, -+#endif - {NSAccessibilitySelectedAttribute, @"selected"}, - {NSAccessibilitySelectedChildrenAttribute, @"selectedChildren"}, -+#ifndef MAS_BUILD - {NSAccessibilitySelectedTextAttribute, @"selectedText"}, - {NSAccessibilitySelectedTextRangeAttribute, @"selectedTextRange"}, - {NSAccessibilitySelectedTextMarkerRangeAttribute, - @"selectedTextMarkerRange"}, -+#endif - {NSAccessibilitySizeAttribute, @"size"}, - {NSAccessibilitySortDirectionAttribute, @"sortDirection"}, - {NSAccessibilitySubroleAttribute, @"subrole"}, -@@ -1160,12 +1174,14 @@ - (NSNumber*)enabled { - - // Returns a text marker that points to the last character in the document that - // can be selected with VoiceOver. -+#ifndef MAS_BUILD - - (id)endTextMarker { - if (![self instanceActive]) - return nil; - BrowserAccessibility::AXPosition position = _owner->CreateTextPositionAt(0); - return CreateTextMarker(position->CreatePositionAtEndOfContent()); - } -+#endif - - - (NSNumber*)expanded { - if (![self instanceActive]) -@@ -1338,6 +1354,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind - return false; - } - -+#ifndef MAS_BUILD - - (NSNumber*)AXInsertionPointLineNumber { - return [self insertionPointLineNumber]; - } -@@ -1368,6 +1385,7 @@ - (NSNumber*)insertionPointLineNumber { - caretPosition->AsTextPosition()->text_offset()); - return @(std::distance(lineStarts.begin(), iterator)); - } -+#endif - - // Returns whether or not this node should be ignored in the - // accessibility tree. -@@ -1692,8 +1710,12 @@ - (BOOL)shouldExposeTitleUIElement { - return content::AXTextEdit(newValue, std::u16string(), nil); - } - } -+#ifndef MAS_BUILD - return content::AXTextEdit(insertedText, deletedText, - CreateTextMarker(_owner->CreateTextPositionAt(i))); -+#else -+ return content::AXTextEdit(insertedText, deletedText, nil); -+#endif - } - - // internal -@@ -1881,6 +1903,7 @@ - (NSArray*)selectedChildren { - return ret; - } - -+#ifndef MAS_BUILD - - (NSString*)AXSelectedText { - return [self selectedText]; - } -@@ -1941,6 +1964,7 @@ - (id)selectedTextMarkerRange { - // words correctly. - return CreateTextMarkerRange(ax_range.AsBackwardRange()); - } -+#endif - - - (NSValue*)size { - if (![self instanceActive]) -@@ -1975,12 +1999,14 @@ - (NSString*)sortDirection { - - // Returns a text marker that points to the first character in the document that - // can be selected with VoiceOver. -+#ifndef MAS_BUILD - - (id)startTextMarker { - if (![self instanceActive]) - return nil; - BrowserAccessibility::AXPosition position = _owner->CreateTextPositionAt(0); - return CreateTextMarker(position->CreatePositionAtStartOfContent()); - } -+#endif - - - (NSString*)AXSubrole { - return [self subrole]; -@@ -2308,12 +2334,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range { - NSMutableAttributedString* attributedTextContent = - [[[NSMutableAttributedString alloc] - initWithString:base::SysUTF16ToNSString(textContent)] autorelease]; -+#ifndef MAS_BUILD - if (!_owner->IsText()) { - BrowserAccessibility::AXRange ax_range( - _owner->CreateTextPositionAt(0), - _owner->CreateTextPositionAt(static_cast(textContent.length()))); - AddMisspelledTextAttributes(ax_range, attributedTextContent); - } -+#endif - - return [attributedTextContent attributedSubstringFromRange:range]; - } -@@ -2448,6 +2476,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute - return ToBrowserAccessibilityCocoa(cell); - } - -+#ifndef MAS_BUILD - if ([attribute - isEqualToString: - NSAccessibilityUIElementForTextMarkerParameterizedAttribute]) { -@@ -2786,6 +2815,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute - - return CreateTextMarker(root->CreateTextPositionAt(index)); - } -+#endif - - if ([attribute isEqualToString: - NSAccessibilityBoundsForRangeParameterizedAttribute]) { -@@ -2816,6 +2846,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute - return nil; - } - -+#ifndef MAS_BUILD - if ([attribute - isEqualToString: - NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) { -@@ -2935,6 +2966,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute - - return @(child->GetIndexInParent()); - } -+#endif - - return nil; - } -@@ -3453,6 +3485,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { - ->AsTextSelectionPosition())); - } - } -+#ifndef MAS_BUILD - if ([attribute - isEqualToString:NSAccessibilitySelectedTextMarkerRangeAttribute]) { - BrowserAccessibility::AXRange range = CreateRangeFromTextMarkerRange(value); -@@ -3463,6 +3496,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { - range.anchor()->AsTextSelectionPosition(), - range.focus()->AsTextSelectionPosition())); - } -+#endif - } - - - (id)accessibilityFocusedUIElement { -diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index 2084f4677670646ba769f2fe68797a5e5647f3f3..49914bdc1cbd8f55fcd55eaf912df04279d86bb7 100644 ---- a/content/browser/accessibility/browser_accessibility_manager_mac.mm -+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm -@@ -502,7 +502,7 @@ void PostAnnouncementNotification(NSString* announcement) { - if (native_focus_object && [native_focus_object instanceActive]) { - [user_info setObject:native_focus_object - forKey:ui::NSAccessibilityTextChangeElement]; -- -+#ifndef MAS_BUILD - id selected_text = [native_focus_object selectedTextMarkerRange]; - if (selected_text) { - NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute = -@@ -510,6 +510,7 @@ void PostAnnouncementNotification(NSString* announcement) { - [user_info setObject:selected_text - forKey:NSAccessibilitySelectedTextMarkerRangeAttribute]; - } -+#endif - } - - return user_info; diff --git a/content/common/pseudonymization_salt.cc b/content/common/pseudonymization_salt.cc index 28e003bef910abff022def659fe18d4cd0549f8a..530bcbdb5d350f6486dc1e8536f7b279be69e241 100644 --- a/content/common/pseudonymization_salt.cc From 6fb013fc108447805b498cd7a4e155cc3fef11e0 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 20 Jan 2022 19:58:04 -0500 Subject: [PATCH 134/268] ci: call autoninja without ninjalog_uploader_wrapper.py (#32569) --- .circleci/build_config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index f53bb9a7d1216..73e3edcfa795e 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -240,6 +240,12 @@ step-depot-tools-get: &step-depot-tools-get name: Get depot tools command: | git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git + # remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems + if [ "`uname`" == "Darwin" ]; then + sed -i '' '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja + else + sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja + fi step-depot-tools-add-to-path: &step-depot-tools-add-to-path run: From 11a8a296b5eaebbe7e8b73d9f4180a795598b4e5 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 19:35:20 -0800 Subject: [PATCH 135/268] Revert "Bump v18.0.0-nightly.20220120" This reverts commit d619804fc815b7cc789354d11f340f61dfa9b9a5. --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 51a55ce4ae64d..ecb38aac1f5f0 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220120 \ No newline at end of file +18.0.0-nightly.20220119 \ No newline at end of file diff --git a/package.json b/package.json index 909ac4518bd84..72d73b596dd4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220120", + "version": "18.0.0-nightly.20220119", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 39d9bf4fc6ad1..a67c47195b9dc 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220120 - PRODUCTVERSION 18,0,0,20220120 + FILEVERSION 18,0,0,20220119 + PRODUCTVERSION 18,0,0,20220119 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f5e138a5e3d75db7e88f9937972ddde3da481e04 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 21 Jan 2022 05:02:26 -0800 Subject: [PATCH 136/268] Bump v18.0.0-nightly.20220121 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index ecb38aac1f5f0..7ef4fd0d3d6d0 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220119 \ No newline at end of file +18.0.0-nightly.20220121 \ No newline at end of file diff --git a/package.json b/package.json index 72d73b596dd4e..fab3c8334db4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220119", + "version": "18.0.0-nightly.20220121", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index a67c47195b9dc..8bc72a4632d53 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220119 - PRODUCTVERSION 18,0,0,20220119 + FILEVERSION 18,0,0,20220121 + PRODUCTVERSION 18,0,0,20220121 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 7032be660d9ead9f4ec8d089b8013be108cc5825 Mon Sep 17 00:00:00 2001 From: Jeremy Rose Date: Fri, 21 Jan 2022 10:04:06 -0800 Subject: [PATCH 137/268] fix: bundle a11y strings in resources (#32564) --- electron_paks.gni | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electron_paks.gni b/electron_paks.gni index 0257db3fa9b1d..e85e26cf3077f 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -179,6 +179,7 @@ template("electron_paks") { "${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_", "${root_gen_dir}/services/strings/services_strings_", "${root_gen_dir}/ui/strings/app_locale_settings_", + "${root_gen_dir}/ui/strings/ax_strings_", "${root_gen_dir}/ui/strings/ui_strings_", ] deps = [ @@ -188,6 +189,7 @@ template("electron_paks") { "//services/strings", "//third_party/blink/public/strings", "//ui/strings:app_locale_settings", + "//ui/strings:ax_strings", "//ui/strings:ui_strings", ] From 9d054755d6b9b97e7be0c33de35cc525b7f787c5 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 24 Jan 2022 10:34:23 +0100 Subject: [PATCH 138/268] refactor: implement ajax() in tests using native fetch instead of jQuery (#32579) --- script/lint.js | 2 +- spec-main/.eslintrc | 1 - spec-main/api-protocol-spec.ts | 63 +++++++++-------- spec-main/api-web-request-spec.ts | 65 ++++++++---------- spec-main/fixtures/pages/fetch.html | 15 +++++ spec-main/fixtures/pages/jquery-3.6.0.min.js | 2 + spec-main/fixtures/pages/jquery.html | 16 +---- spec/.eslintrc | 1 - spec/asar-spec.js | 71 +++++++------------- spec/fixtures/pages/basic-auth.html | 29 ++++---- spec/fixtures/pages/dom-ready.html | 4 +- spec/static/index.html | 1 - spec/static/jquery-2.0.3.min.js | 6 -- 13 files changed, 116 insertions(+), 160 deletions(-) create mode 100644 spec-main/fixtures/pages/fetch.html create mode 100644 spec-main/fixtures/pages/jquery-3.6.0.min.js delete mode 100644 spec/static/jquery-2.0.3.min.js diff --git a/script/lint.js b/script/lint.js index a66423bb0f305..5e7489ee8ddd6 100755 --- a/script/lint.js +++ b/script/lint.js @@ -16,7 +16,7 @@ const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, 'third_party', 'depot_tools'); const IGNORELIST = new Set([ ['shell', 'browser', 'resources', 'win', 'resource.h'], ['shell', 'common', 'node_includes.h'], - ['spec', 'static', 'jquery-2.0.3.min.js'], + ['spec-main', 'fixtures', 'pages', 'jquery-3.6.0.min.js'], ['spec', 'ts-smoke', 'electron', 'main.ts'], ['spec', 'ts-smoke', 'electron', 'renderer.ts'], ['spec', 'ts-smoke', 'runner.js'] diff --git a/spec-main/.eslintrc b/spec-main/.eslintrc index a26475e27dde3..60be8a0dac951 100644 --- a/spec-main/.eslintrc +++ b/spec-main/.eslintrc @@ -2,7 +2,6 @@ "env": { "browser": true, "mocha": true, - "jquery": true, "serviceworker": true }, "globals": { diff --git a/spec-main/api-protocol-spec.ts b/spec-main/api-protocol-spec.ts index 71437da6fe102..980c289cb1e7f 100644 --- a/spec-main/api-protocol-spec.ts +++ b/spec-main/api-protocol-spec.ts @@ -29,7 +29,7 @@ const unregisterProtocol = protocol.unregisterProtocol; const uninterceptProtocol = protocol.uninterceptProtocol; const text = 'valar morghulis'; -const protocolName = 'sp'; +const protocolName = 'no-cors'; const postData = { name: 'post test', type: 'string' @@ -80,7 +80,7 @@ describe('protocol module', () => { // Note that we need to do navigation every time after a protocol is // registered or unregistered, otherwise the new protocol won't be // recognized by current page when NetworkService is used. - await contents.loadFile(path.join(__dirname, 'fixtures', 'pages', 'jquery.html')); + await contents.loadFile(path.join(__dirname, 'fixtures', 'pages', 'fetch.html')); return contents.executeJavaScript(`ajax("${url}", ${JSON.stringify(options)})`); } @@ -110,7 +110,7 @@ describe('protocol module', () => { it('sends error when callback is called with nothing', async () => { registerBufferProtocol(protocolName, (req, cb: any) => cb()); - await expect(ajax(protocolName + '://fake-host')).to.eventually.be.rejectedWith(Error, '404'); + await expect(ajax(protocolName + '://fake-host')).to.eventually.be.rejected(); }); it('does not crash when callback is called in next tick', async () => { @@ -157,7 +157,7 @@ describe('protocol module', () => { registerStringProtocol(protocolName, (request, callback) => callback(text)); const r = await ajax(protocolName + '://fake-host'); expect(r.data).to.equal(text); - expect(r.headers).to.include('access-control-allow-origin: *'); + expect(r.headers).to.have.property('access-control-allow-origin', '*'); }); it('sends object as response', async () => { @@ -174,7 +174,7 @@ describe('protocol module', () => { it('fails when sending object other than string', async () => { const notAString = () => {}; registerStringProtocol(protocolName, (request, callback) => callback(notAString as any)); - await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejectedWith(Error, '404'); + await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejected(); }); }); @@ -190,7 +190,7 @@ describe('protocol module', () => { registerBufferProtocol(protocolName, (request, callback) => callback(buffer)); const r = await ajax(protocolName + '://fake-host'); expect(r.data).to.equal(text); - expect(r.headers).to.include('access-control-allow-origin: *'); + expect(r.headers).to.have.property('access-control-allow-origin', '*'); }); it('sends object as response', async () => { @@ -206,7 +206,7 @@ describe('protocol module', () => { it('fails when sending string', async () => { registerBufferProtocol(protocolName, (request, callback) => callback(text as any)); - await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejectedWith(Error, '404'); + await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejected(); }); }); @@ -226,7 +226,7 @@ describe('protocol module', () => { registerFileProtocol(protocolName, (request, callback) => callback(filePath)); const r = await ajax(protocolName + '://fake-host'); expect(r.data).to.equal(String(fileContent)); - expect(r.headers).to.include('access-control-allow-origin: *'); + expect(r.headers).to.have.property('access-control-allow-origin', '*'); }); it('sets custom headers', async () => { @@ -236,7 +236,7 @@ describe('protocol module', () => { })); const r = await ajax(protocolName + '://fake-host'); expect(r.data).to.equal(String(fileContent)); - expect(r.headers).to.include('x-great-header: sogreat'); + expect(r.headers).to.have.property('x-great-header', 'sogreat'); }); it.skip('throws an error when custom headers are invalid', (done) => { @@ -247,7 +247,7 @@ describe('protocol module', () => { })).to.throw(Error, 'Value of \'X-Great-Header\' header has to be a string'); done(); }); - ajax(protocolName + '://fake-host'); + ajax(protocolName + '://fake-host').catch(() => {}); }); it('sends object as response', async () => { @@ -265,12 +265,12 @@ describe('protocol module', () => { it('fails when sending unexist-file', async () => { const fakeFilePath = path.join(fixturesPath, 'test.asar', 'a.asar', 'not-exist'); registerFileProtocol(protocolName, (request, callback) => callback(fakeFilePath)); - await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejectedWith(Error, '404'); + await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejected(); }); it('fails when sending unsupported content', async () => { registerFileProtocol(protocolName, (request, callback) => callback(new Date() as any)); - await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejectedWith(Error, '404'); + await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejected(); }); }); @@ -292,12 +292,12 @@ describe('protocol module', () => { it('fails when sending invalid url', async () => { registerHttpProtocol(protocolName, (request, callback) => callback({ url: 'url' })); - await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejectedWith(Error, '404'); + await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejected(); }); it('fails when sending unsupported content', async () => { registerHttpProtocol(protocolName, (request, callback) => callback(new Date() as any)); - await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejectedWith(Error, '404'); + await expect(ajax(protocolName + '://fake-host')).to.be.eventually.rejected(); }); it('works when target URL redirects', async () => { @@ -331,7 +331,7 @@ describe('protocol module', () => { done(e); } }); - ajax(protocolName + '://fake-host'); + ajax(protocolName + '://fake-host').catch(() => {}); }); }); @@ -359,7 +359,7 @@ describe('protocol module', () => { const r = await ajax(protocolName + '://fake-host'); expect(r.data).to.equal(text); expect(r.status).to.equal(200); - expect(r.headers).to.include('x-electron: a, b'); + expect(r.headers).to.have.property('x-electron', 'a, b'); }); it('sends custom status code', async () => { @@ -368,7 +368,7 @@ describe('protocol module', () => { data: null as any })); const r = await ajax(protocolName + '://fake-host'); - expect(r.data).to.be.undefined('data'); + expect(r.data).to.be.empty('data'); expect(r.status).to.equal(204); }); @@ -382,7 +382,7 @@ describe('protocol module', () => { }); }); const r = await ajax(protocolName + '://fake-host', { headers: { 'x-return-headers': 'yes' } }); - expect(r.data['x-return-headers']).to.equal('yes'); + expect(JSON.parse(r.data)['x-return-headers']).to.equal('yes'); }); it('returns response multiple response headers with the same name', async () => { @@ -399,7 +399,8 @@ describe('protocol module', () => { // SUBTLE: when the response headers have multiple values it // separates values by ", ". When the response headers are incorrectly // converting an array to a string it separates values by ",". - expect(r.headers).to.equal('header1: value1, value2\r\nheader2: value3\r\n'); + expect(r.headers).to.have.property('header1', 'value1, value2'); + expect(r.headers).to.have.property('header2', 'value3'); }); it('can handle large responses', async () => { @@ -456,7 +457,7 @@ describe('protocol module', () => { }); }); const hasEndedPromise = emittedOnce(events, 'end'); - ajax(protocolName + '://fake-host'); + ajax(protocolName + '://fake-host').catch(() => {}); await hasEndedPromise; }); @@ -478,9 +479,9 @@ describe('protocol module', () => { const hasRespondedPromise = emittedOnce(events, 'respond'); const hasClosedPromise = emittedOnce(events, 'close'); - ajax(protocolName + '://fake-host'); + ajax(protocolName + '://fake-host').catch(() => {}); await hasRespondedPromise; - await contents.loadFile(path.join(__dirname, 'fixtures', 'pages', 'jquery.html')); + await contents.loadFile(path.join(__dirname, 'fixtures', 'pages', 'fetch.html')); await hasClosedPromise; }); }); @@ -527,7 +528,7 @@ describe('protocol module', () => { it('sends error when callback is called with nothing', async () => { interceptStringProtocol('http', (request, callback: any) => callback()); - await expect(ajax('http://fake-host')).to.be.eventually.rejectedWith(Error, '404'); + await expect(ajax('http://fake-host')).to.be.eventually.rejected(); }); }); @@ -546,8 +547,7 @@ describe('protocol module', () => { }); }); const r = await ajax('http://fake-host'); - expect(r.data).to.be.an('object'); - expect(r.data).to.have.property('value').that.is.equal(1); + expect(JSON.parse(r.data)).to.have.property('value').that.is.equal(1); }); it('can set content-type with charset', async () => { @@ -558,8 +558,7 @@ describe('protocol module', () => { }); }); const r = await ajax('http://fake-host'); - expect(r.data).to.be.an('object'); - expect(r.data).to.have.property('value').that.is.equal(1); + expect(JSON.parse(r.data)).to.have.property('value').that.is.equal(1); }); it('can receive post data', async () => { @@ -567,7 +566,7 @@ describe('protocol module', () => { const uploadData = request.uploadData![0].bytes.toString(); callback({ data: uploadData }); }); - const r = await ajax('http://fake-host', { type: 'POST', data: postData }); + const r = await ajax('http://fake-host', { method: 'POST', body: qs.stringify(postData) }); expect({ ...qs.parse(r.data) }).to.deep.equal(postData); }); }); @@ -584,8 +583,8 @@ describe('protocol module', () => { const uploadData = request.uploadData![0].bytes; callback(uploadData); }); - const r = await ajax('http://fake-host', { type: 'POST', data: postData }); - expect(r.data).to.equal('name=post+test&type=string'); + const r = await ajax('http://fake-host', { method: 'POST', body: qs.stringify(postData) }); + expect(qs.parse(r.data)).to.deep.equal({ name: 'post test', type: 'string' }); }); }); @@ -651,7 +650,7 @@ describe('protocol module', () => { done(e); } }); - ajax('http://fake-host'); + ajax('http://fake-host').catch(() => {}); }); }); @@ -666,7 +665,7 @@ describe('protocol module', () => { interceptStreamProtocol('http', (request, callback) => { callback(getStream(3, request.uploadData![0].bytes.toString())); }); - const r = await ajax('http://fake-host', { type: 'POST', data: postData }); + const r = await ajax('http://fake-host', { method: 'POST', body: qs.stringify(postData) }); expect({ ...qs.parse(r.data) }).to.deep.equal(postData); }); diff --git a/spec-main/api-web-request-spec.ts b/spec-main/api-web-request-spec.ts index ea088b64fa484..f939f4af5a668 100644 --- a/spec-main/api-web-request-spec.ts +++ b/spec-main/api-web-request-spec.ts @@ -36,7 +36,7 @@ describe('webRequest module', () => { let defaultURL: string; before((done) => { - protocol.registerStringProtocol('neworigin', (req, cb) => cb('')); + protocol.registerStringProtocol('cors', (req, cb) => cb('')); server.listen(0, '127.0.0.1', () => { const port = (server.address() as AddressInfo).port; defaultURL = `http://127.0.0.1:${port}/`; @@ -46,14 +46,14 @@ describe('webRequest module', () => { after(() => { server.close(); - protocol.unregisterProtocol('neworigin'); + protocol.unregisterProtocol('cors'); }); let contents: WebContents = null as unknown as WebContents; // NB. sandbox: true is used because it makes navigations much (~8x) faster. before(async () => { contents = (webContents as any).create({ sandbox: true }); - await contents.loadFile(path.join(fixturesPath, 'pages', 'jquery.html')); + await contents.loadFile(path.join(fixturesPath, 'pages', 'fetch.html')); }); after(() => (contents as any).destroy()); @@ -72,7 +72,7 @@ describe('webRequest module', () => { cancel: true }); }); - await expect(ajax(defaultURL)).to.eventually.be.rejectedWith('404'); + await expect(ajax(defaultURL)).to.eventually.be.rejected(); }); it('can filter URLs', async () => { @@ -82,7 +82,7 @@ describe('webRequest module', () => { }); const { data } = await ajax(`${defaultURL}nofilter/test`); expect(data).to.equal('/nofilter/test'); - await expect(ajax(`${defaultURL}filter/test`)).to.eventually.be.rejectedWith('404'); + await expect(ajax(`${defaultURL}filter/test`)).to.eventually.be.rejected(); }); it('receives details object', async () => { @@ -117,9 +117,9 @@ describe('webRequest module', () => { callback({ cancel: true }); }); await expect(ajax(defaultURL, { - type: 'POST', - data: postData - })).to.eventually.be.rejectedWith('404'); + method: 'POST', + body: qs.stringify(postData) + })).to.eventually.be.rejected(); }); it('can redirect the request', async () => { @@ -151,7 +151,7 @@ describe('webRequest module', () => { protocol: 'file', slashes: true }); - await expect(ajax(fileURL)).to.eventually.be.rejectedWith('404'); + await expect(ajax(fileURL)).to.eventually.be.rejected(); }); }); @@ -182,12 +182,12 @@ describe('webRequest module', () => { }); it('can change the request headers on a custom protocol redirect', async () => { - protocol.registerStringProtocol('custom-scheme', (req, callback) => { - if (req.url === 'custom-scheme://fake-host/redirect') { + protocol.registerStringProtocol('no-cors', (req, callback) => { + if (req.url === 'no-cors://fake-host/redirect') { callback({ statusCode: 302, headers: { - Location: 'custom-scheme://fake-host' + Location: 'no-cors://fake-host' } }); } else { @@ -202,7 +202,7 @@ describe('webRequest module', () => { // Note that we need to do navigation every time after a protocol is // registered or unregistered, otherwise the new protocol won't be // recognized by current page when NetworkService is used. - await contents.loadFile(path.join(__dirname, 'fixtures', 'pages', 'jquery.html')); + await contents.loadFile(path.join(__dirname, 'fixtures', 'pages', 'fetch.html')); try { ses.webRequest.onBeforeSendHeaders((details, callback) => { @@ -210,10 +210,10 @@ describe('webRequest module', () => { requestHeaders.Accept = '*/*;test/header'; callback({ requestHeaders: requestHeaders }); }); - const { data } = await ajax('custom-scheme://fake-host/redirect'); + const { data } = await ajax('no-cors://fake-host/redirect'); expect(data).to.equal('header-received'); } finally { - protocol.unregisterProtocol('custom-scheme'); + protocol.unregisterProtocol('no-cors'); } }); @@ -233,7 +233,7 @@ describe('webRequest module', () => { called = true; callback({ requestHeaders: details.requestHeaders }); }); - await ajax('neworigin://host'); + await ajax('cors://host'); expect(called).to.be.true(); }); @@ -320,7 +320,7 @@ describe('webRequest module', () => { callback({ responseHeaders: responseHeaders }); }); const { headers } = await ajax(defaultURL); - expect(headers).to.match(/^custom: Changed$/m); + expect(headers).to.to.have.property('custom', 'Changed'); }); it('can change response origin', async () => { @@ -330,7 +330,7 @@ describe('webRequest module', () => { callback({ responseHeaders: responseHeaders }); }); const { headers } = await ajax(defaultURL); - expect(headers).to.match(/^access-control-allow-origin: http:\/\/new-origin$/m); + expect(headers).to.to.have.property('access-control-allow-origin', 'http://new-origin'); }); it('can change headers of CORS responses', async () => { @@ -339,8 +339,8 @@ describe('webRequest module', () => { responseHeaders.Custom = ['Changed'] as any; callback({ responseHeaders: responseHeaders }); }); - const { headers } = await ajax('neworigin://host'); - expect(headers).to.match(/^custom: Changed$/m); + const { headers } = await ajax('cors://host'); + expect(headers).to.to.have.property('custom', 'Changed'); }); it('does not change header by default', async () => { @@ -348,7 +348,7 @@ describe('webRequest module', () => { callback({}); }); const { data, headers } = await ajax(defaultURL); - expect(headers).to.match(/^custom: Header$/m); + expect(headers).to.to.have.property('custom', 'Header'); expect(data).to.equal('/'); }); @@ -358,7 +358,7 @@ describe('webRequest module', () => { callback({}); }); const { data, headers } = await ajax(defaultURL + 'contentDisposition'); - expect(headers).to.match(/^content-disposition: attachment; filename=aa%E4%B8%ADaa.txt$/m); + expect(headers).to.to.have.property('content-disposition', 'attachment; filename=aa%E4%B8%ADaa.txt'); expect(data).to.equal('/contentDisposition'); }); @@ -368,7 +368,7 @@ describe('webRequest module', () => { callback({ responseHeaders: responseHeaders }); }); const { headers } = await ajax(defaultURL + 'serverRedirect'); - expect(headers).to.match(/^custom: Header$/m); + expect(headers).to.to.have.property('custom', 'Header'); }); it('can change the header status', async () => { @@ -379,19 +379,8 @@ describe('webRequest module', () => { statusLine: 'HTTP/1.1 404 Not Found' }); }); - const { headers } = await contents.executeJavaScript(`new Promise((resolve, reject) => { - const options = { - ...${JSON.stringify({ url: defaultURL })}, - success: (data, status, request) => { - reject(new Error('expected failure')) - }, - error: (xhr) => { - resolve({ headers: xhr.getAllResponseHeaders() }) - } - } - $.ajax(options) - })`); - expect(headers).to.match(/^custom: Header$/m); + const { headers } = await ajax(defaultURL); + expect(headers).to.to.have.property('custom', 'Header'); }); }); @@ -408,7 +397,7 @@ describe('webRequest module', () => { expect(details.responseHeaders!.Custom).to.deep.equal(['Header']); }); const { data, headers } = await ajax(defaultURL); - expect(headers).to.match(/^custom: Header$/m); + expect(headers).to.to.have.property('custom', 'Header'); expect(data).to.equal('/'); }); }); @@ -468,7 +457,7 @@ describe('webRequest module', () => { ses.webRequest.onErrorOccurred((details) => { expect(details.error).to.equal('net::ERR_BLOCKED_BY_CLIENT'); }); - await expect(ajax(defaultURL)).to.eventually.be.rejectedWith('404'); + await expect(ajax(defaultURL)).to.eventually.be.rejected(); }); }); diff --git a/spec-main/fixtures/pages/fetch.html b/spec-main/fixtures/pages/fetch.html new file mode 100644 index 0000000000000..9e2ef6409579c --- /dev/null +++ b/spec-main/fixtures/pages/fetch.html @@ -0,0 +1,15 @@ + + + + + diff --git a/spec-main/fixtures/pages/jquery-3.6.0.min.js b/spec-main/fixtures/pages/jquery-3.6.0.min.js new file mode 100644 index 0000000000000..c4c6022f2982e --- /dev/null +++ b/spec-main/fixtures/pages/jquery-3.6.0.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 - + - diff --git a/spec/.eslintrc b/spec/.eslintrc index a26475e27dde3..60be8a0dac951 100644 --- a/spec/.eslintrc +++ b/spec/.eslintrc @@ -2,7 +2,6 @@ "env": { "browser": true, "mocha": true, - "jquery": true, "serviceworker": true }, "globals": { diff --git a/spec/asar-spec.js b/spec/asar-spec.js index 0a432d6bdfb47..4468bf85e2997 100644 --- a/spec/asar-spec.js +++ b/spec/asar-spec.js @@ -1599,67 +1599,42 @@ describe('asar package', function () { }); describe('asar protocol', function () { - it('can request a file in package', function (done) { + it('can request a file in package', async function () { const p = path.resolve(asarDir, 'a.asar', 'file1'); - $.get('file://' + p, function (data) { - try { - expect(data.trim()).to.equal('file1'); - done(); - } catch (e) { - done(e); - } - }); + const response = await fetch('file://' + p); + const data = await response.text(); + expect(data.trim()).to.equal('file1'); }); - it('can request a file in package with unpacked files', function (done) { + it('can request a file in package with unpacked files', async function () { const p = path.resolve(asarDir, 'unpack.asar', 'a.txt'); - $.get('file://' + p, function (data) { - try { - expect(data.trim()).to.equal('a'); - done(); - } catch (e) { - done(e); - } - }); + const response = await fetch('file://' + p); + const data = await response.text(); + expect(data.trim()).to.equal('a'); }); - it('can request a linked file in package', function (done) { + it('can request a linked file in package', async function () { const p = path.resolve(asarDir, 'a.asar', 'link2', 'link1'); - $.get('file://' + p, function (data) { - try { - expect(data.trim()).to.equal('file1'); - done(); - } catch (e) { - done(e); - } - }); + const response = await fetch('file://' + p); + const data = await response.text(); + expect(data.trim()).to.equal('file1'); }); - it('can request a file in filesystem', function (done) { + it('can request a file in filesystem', async function () { const p = path.resolve(asarDir, 'file'); - $.get('file://' + p, function (data) { - try { - expect(data.trim()).to.equal('file'); - done(); - } catch (e) { - done(e); - } - }); + const response = await fetch('file://' + p); + const data = await response.text(); + expect(data.trim()).to.equal('file'); }); - it('gets 404 when file is not found', function (done) { + it('gets error when file is not found', async function () { const p = path.resolve(asarDir, 'a.asar', 'no-exist'); - $.ajax({ - url: 'file://' + p, - error: function (err) { - try { - expect(err.status).to.equal(404); - done(); - } catch (e) { - done(e); - } - } - }); + try { + const response = await fetch('file://' + p); + expect(response.status).to.equal(404); + } catch (error) { + expect(error.message).to.equal('Failed to fetch'); + } }); }); diff --git a/spec/fixtures/pages/basic-auth.html b/spec/fixtures/pages/basic-auth.html index ec9383ca4d083..9202396682b84 100644 --- a/spec/fixtures/pages/basic-auth.html +++ b/spec/fixtures/pages/basic-auth.html @@ -1,22 +1,21 @@ - diff --git a/spec/fixtures/pages/dom-ready.html b/spec/fixtures/pages/dom-ready.html index 541852f9ab0c0..1d409eb9c6e84 100644 --- a/spec/fixtures/pages/dom-ready.html +++ b/spec/fixtures/pages/dom-ready.html @@ -1,8 +1,8 @@ - diff --git a/spec/static/index.html b/spec/static/index.html index 773d715fe4530..7c316a69f130a 100644 --- a/spec/static/index.html +++ b/spec/static/index.html @@ -1,5 +1,4 @@ - + + diff --git a/spec-main/fixtures/apps/background-color-transparent/main.js b/spec-main/fixtures/apps/background-color-transparent/main.js new file mode 100644 index 0000000000000..8d1da05c6c1db --- /dev/null +++ b/spec-main/fixtures/apps/background-color-transparent/main.js @@ -0,0 +1,59 @@ +const { app, BrowserWindow, desktopCapturer, ipcMain } = require('electron'); +const getColors = require('get-image-colors'); + +const colors = {}; + +// Fetch the test window. +const getWindow = async () => { + const sources = await desktopCapturer.getSources({ types: ['window'] }); + const filtered = sources.filter(s => s.name === 'test-color-window'); + + if (filtered.length === 0) { + throw new Error('Could not find test window'); + } + + return filtered[0]; +}; + +async function createWindow () { + const mainWindow = new BrowserWindow({ + frame: false, + transparent: true, + vibrancy: 'under-window', + webPreferences: { + contextIsolation: false, + nodeIntegration: true + } + }); + + await mainWindow.loadFile('index.html'); + + // Get initial green background color. + const window = await getWindow(); + const buf = window.thumbnail.toPNG(); + const result = await getColors(buf, { count: 1, type: 'image/png' }); + colors.green = result[0].hex(); +} + +ipcMain.on('set-transparent', async () => { + // Get updated background color. + const window = await getWindow(); + const buf = window.thumbnail.toPNG(); + const result = await getColors(buf, { count: 1, type: 'image/png' }); + colors.transparent = result[0].hex(); + + const { green, transparent } = colors; + process.exit(green === transparent ? 1 : 0); +}); + +app.whenReady().then(() => { + createWindow(); + + app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) createWindow(); + }); +}); + +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') app.quit(); +}); diff --git a/spec-main/fixtures/apps/background-color-transparent/package.json b/spec-main/fixtures/apps/background-color-transparent/package.json new file mode 100644 index 0000000000000..0ea4852f44c3f --- /dev/null +++ b/spec-main/fixtures/apps/background-color-transparent/package.json @@ -0,0 +1,4 @@ +{ + "name": "background-color-transparent", + "main": "main.js" +} diff --git a/spec-main/fixtures/apps/background-color-transparent/renderer.js b/spec-main/fixtures/apps/background-color-transparent/renderer.js new file mode 100644 index 0000000000000..1312f5f129052 --- /dev/null +++ b/spec-main/fixtures/apps/background-color-transparent/renderer.js @@ -0,0 +1,9 @@ +const { ipcRenderer } = require('electron'); + +window.setTimeout(async (_) => { + document.body.style.background = 'transparent'; + + window.setTimeout(async (_) => { + ipcRenderer.send('set-transparent'); + }, 2000); +}, 3000); diff --git a/spec-main/package.json b/spec-main/package.json index 75aba1733f769..dfbfd1330da34 100644 --- a/spec-main/package.json +++ b/spec-main/package.json @@ -16,6 +16,7 @@ "dependencies": { "chai-as-promised": "^7.1.1", "dirty-chai": "^2.0.1", + "get-image-colors": "^4.0.0", "pdfjs-dist": "^2.2.228" } } diff --git a/spec-main/yarn.lock b/spec-main/yarn.lock index ac95e59b66787..6d02b0452d444 100644 --- a/spec-main/yarn.lock +++ b/spec-main/yarn.lock @@ -77,11 +77,60 @@ ajv@^6.1.0: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^6.12.3: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +asn1@~0.2.3: + version "0.2.6" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" + integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== +boolbase@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= + busboy@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.3.1.tgz#170899274c5bf38aae27d5c62b71268cd585fd1b" @@ -89,6 +138,11 @@ busboy@^0.3.1: dependencies: dicer "0.3.0" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + chai-as-promised@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" @@ -101,6 +155,107 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= +cheerio@^0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e" + integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4= + dependencies: + css-select "~1.2.0" + dom-serializer "~0.1.0" + entities "~1.1.1" + htmlparser2 "^3.9.1" + lodash.assignin "^4.0.9" + lodash.bind "^4.1.4" + lodash.defaults "^4.0.1" + lodash.filter "^4.4.0" + lodash.flatten "^4.2.0" + lodash.foreach "^4.3.0" + lodash.map "^4.4.0" + lodash.merge "^4.4.0" + lodash.pick "^4.2.1" + lodash.reduce "^4.4.0" + lodash.reject "^4.4.0" + lodash.some "^4.4.0" + +chroma-js@^1.1.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-1.4.1.tgz#eb2d9c4d1ff24616be84b35119f4d26f8205f134" + integrity sha512-jTwQiT859RTFN/vIf7s+Vl/Z2LcMrvMv3WUFmd/4u76AdlFC0NTNgqEEFPcRiHmAswPsMiQEDZLM8vX8qXpZNQ== + +chroma-js@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-2.1.2.tgz#1075cb9ae25bcb2017c109394168b5cf3aa500ec" + integrity sha512-ri/ouYDWuxfus3UcaMxC1Tfp3IE9K5iQzxc2hSxbBRVNQFut1UuGAsZmiAf2mOUubzGJwgMSv9lHg+XqLaz1QQ== + dependencies: + cross-env "^6.0.3" + +combined-stream@^1.0.6, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +core-util-is@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-env@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-6.0.3.tgz#4256b71e49b3a40637a0ce70768a6ef5c72ae941" + integrity sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag== + dependencies: + cross-spawn "^7.0.0" + +cross-spawn@^7.0.0: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +css-select@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858" + integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg= + dependencies: + boolbase "~1.0.0" + css-what "2.1" + domutils "1.5.1" + nth-check "~1.0.1" + +css-what@2.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" + integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== + +cwise-compiler@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/cwise-compiler/-/cwise-compiler-1.1.3.tgz#f4d667410e850d3a313a7d2db7b1e505bb034cc5" + integrity sha1-9NZnQQ6FDToxOn0tt7HlBbsDTMU= + dependencies: + uniq "^1.0.0" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +data-uri-to-buffer@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-0.0.3.tgz#18ae979a6a0ca994b0625853916d2662bbae0b1a" + integrity sha1-GK6XmmoMqZSwYlhTkW0mYruuCxo= + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + dicer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.3.0.tgz#eacd98b3bfbf92e8ab5c2fdb71aaac44bb06b872" @@ -118,6 +273,63 @@ dirty-chai@^2.0.1: resolved "https://registry.yarnpkg.com/dirty-chai/-/dirty-chai-2.0.1.tgz#6b2162ef17f7943589da840abc96e75bda01aff3" integrity sha512-ys79pWKvDMowIDEPC6Fig8d5THiC0DJ2gmTeGzVAoEH18J8OzLud0Jh7I9IWg3NSk8x2UocznUuFmfHCXYZx9w== +dom-serializer@0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51" + integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== + dependencies: + domelementtype "^2.0.1" + entities "^2.0.0" + +dom-serializer@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0" + integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA== + dependencies: + domelementtype "^1.3.0" + entities "^1.1.1" + +domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" + integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== + +domelementtype@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" + integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== + +domhandler@^2.3.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803" + integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== + dependencies: + domelementtype "1" + +domutils@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8= + dependencies: + dom-serializer "0" + domelementtype "1" + +domutils@^1.5.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a" + integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== + dependencies: + dom-serializer "0" + domelementtype "1" + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + "echo@file:fixtures/native-addon/echo": version "0.0.1" @@ -126,6 +338,31 @@ emojis-list@^2.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= +entities@^1.1.1, entities@~1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" + integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== + +entities@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" + integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" + integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== + fast-deep-equal@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" @@ -136,21 +373,184 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +get-image-colors@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/get-image-colors/-/get-image-colors-4.0.0.tgz#c8fe161c386b5ae6300d953eac6bccc05a56069d" + integrity sha512-qQZ5vyqgJkQp1c8ZRwKGL03oDsyBBUKiwr4GbB2T4F+tHpfQrw1PjKMQai7jcjRdC2wIHl2rV+6ZuHKttpyk7A== + dependencies: + chroma-js "^2.1.0" + get-pixels "^3.3.2" + get-rgba-palette "^2.0.1" + get-svg-colors "^1.5.1" + pify "^5.0.0" + +get-pixels@^3.3.2: + version "3.3.3" + resolved "https://registry.yarnpkg.com/get-pixels/-/get-pixels-3.3.3.tgz#71e2dfd4befb810b5478a61c6354800976ce01c7" + integrity sha512-5kyGBn90i9tSMUVHTqkgCHsoWoR+/lGbl4yC83Gefyr0HLIhgSWEx/2F/3YgsZ7UpYNuM6pDhDK7zebrUJ5nXg== + dependencies: + data-uri-to-buffer "0.0.3" + jpeg-js "^0.4.1" + mime-types "^2.0.1" + ndarray "^1.0.13" + ndarray-pack "^1.1.1" + node-bitmap "0.0.1" + omggif "^1.0.5" + parse-data-uri "^0.2.0" + pngjs "^3.3.3" + request "^2.44.0" + through "^2.3.4" + +get-rgba-palette@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/get-rgba-palette/-/get-rgba-palette-2.0.1.tgz#5ce70f75c6ef52882f54dd079e5ed68b5a2323ca" + integrity sha1-XOcPdcbvUogvVN0Hnl7Wi1ojI8o= + dependencies: + quantize "^1.0.1" + +get-svg-colors@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/get-svg-colors/-/get-svg-colors-1.5.1.tgz#59f4004f5fb4fc0b0eaaec36dce004b3b10f188b" + integrity sha512-G3gXrkLrlmv2gqZvs05ap/kcGbchhNtUNaoaP6dIefRcrGPqSa17dGp5ap/2yN8Xs2Wi5mWn16Ww+nFuVU8lTw== + dependencies: + cheerio "^0.22.0" + chroma-js "^1.1.1" + is-svg "^3.0.0" + lodash.compact "^3.0.0" + lodash.uniq "^4.5.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +html-comment-regex@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" + integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== + +htmlparser2@^3.9.1: + version "3.10.1" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" + integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== + dependencies: + domelementtype "^1.3.1" + domhandler "^2.3.0" + domutils "^1.5.1" + entities "^1.1.1" + inherits "^2.0.1" + readable-stream "^3.1.1" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +inherits@^2.0.1, inherits@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +iota-array@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/iota-array/-/iota-array-1.0.0.tgz#81ef57fe5d05814cd58c2483632a99c30a0e8087" + integrity sha1-ge9X/l0FgUzVjCSDYyqZwwoOgIc= + +is-buffer@^1.0.2: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-svg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75" + integrity sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ== + dependencies: + html-comment-regex "^1.1.0" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +jpeg-js@^0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.3.tgz#6158e09f1983ad773813704be80680550eff977b" + integrity sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q== + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json-schema@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" + integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + json5@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -158,6 +558,16 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" +jsprim@^1.2.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" + integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.4.0" + verror "1.10.0" + just-extend@^4.0.2: version "4.1.0" resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-4.1.0.tgz#7278a4027d889601640ee0ce0e5a00b992467da4" @@ -172,16 +582,114 @@ loader-utils@^1.0.0: emojis-list "^2.0.0" json5 "^1.0.1" +lodash.assignin@^4.0.9: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2" + integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI= + +lodash.bind@^4.1.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" + integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU= + +lodash.compact@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash.compact/-/lodash.compact-3.0.1.tgz#540ce3837745975807471e16b4a2ba21e7256ca5" + integrity sha1-VAzjg3dFl1gHRx4WtKK6IeclbKU= + +lodash.defaults@^4.0.1: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= + +lodash.filter@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace" + integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4= + +lodash.flatten@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + +lodash.foreach@^4.3.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53" + integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM= + lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= +lodash.map@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" + integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= + +lodash.merge@^4.4.0: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= + +lodash.reduce@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" + integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs= + +lodash.reject@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415" + integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU= + +lodash.some@^4.4.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d" + integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= + +lodash.uniq@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= + +mime-db@1.51.0: + version "1.51.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" + integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== + +mime-types@^2.0.1, mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.34" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" + integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== + dependencies: + mime-db "1.51.0" + minimist@^1.2.0: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +ndarray-pack@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ndarray-pack/-/ndarray-pack-1.2.1.tgz#8caebeaaa24d5ecf70ff86020637977da8ee585a" + integrity sha1-jK6+qqJNXs9w/4YCBjeXfajuWFo= + dependencies: + cwise-compiler "^1.1.2" + ndarray "^1.0.13" + +ndarray@^1.0.13: + version "1.0.19" + resolved "https://registry.yarnpkg.com/ndarray/-/ndarray-1.0.19.tgz#6785b5f5dfa58b83e31ae5b2a058cfd1ab3f694e" + integrity sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ== + dependencies: + iota-array "^1.0.0" + is-buffer "^1.0.2" + nise@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/nise/-/nise-4.0.3.tgz#9f79ff02fa002ed5ffbc538ad58518fa011dc913" @@ -193,11 +701,45 @@ nise@^4.0.1: just-extend "^4.0.2" path-to-regexp "^1.7.0" +node-bitmap@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/node-bitmap/-/node-bitmap-0.0.1.tgz#180eac7003e0c707618ef31368f62f84b2a69091" + integrity sha1-GA6scAPgxwdhjvMTaPYvhLKmkJE= + node-ensure@^0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/node-ensure/-/node-ensure-0.0.0.tgz#ecae764150de99861ec5c810fd5d096b183932a7" integrity sha1-7K52QVDemYYexcgQ/V0Jaxg5Mqc= +nth-check@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c" + integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== + dependencies: + boolbase "~1.0.0" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +omggif@^1.0.5: + version "1.0.10" + resolved "https://registry.yarnpkg.com/omggif/-/omggif-1.0.10.tgz#ddaaf90d4a42f532e9e7cb3a95ecdd47f17c7b19" + integrity sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw== + +parse-data-uri@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/parse-data-uri/-/parse-data-uri-0.2.0.tgz#bf04d851dd5c87b0ab238e5d01ace494b604b4c9" + integrity sha1-vwTYUd1ch7CrI45dAazklLYEtMk= + dependencies: + data-uri-to-buffer "0.0.3" + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + path-to-regexp@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" @@ -213,7 +755,27 @@ pdfjs-dist@^2.2.228: node-ensure "^0.0.0" worker-loader "^2.0.0" -punycode@^2.1.0: +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +pify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" + integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== + +pngjs@^3.3.3: + version "3.4.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" + integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== + +psl@^1.1.28: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== @@ -223,6 +785,61 @@ q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= +qs@~6.5.2: + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== + +quantize@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/quantize/-/quantize-1.0.2.tgz#d25ac200a77b6d70f40127ca171a10e33c8546de" + integrity sha1-0lrCAKd7bXD0ASfKFxoQ4zyFRt4= + +readable-stream@^3.1.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +request@^2.44.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + schema-utils@^0.4.0: version "0.4.7" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" @@ -231,6 +848,18 @@ schema-utils@^0.4.0: ajv "^6.1.0" ajv-keywords "^3.1.0" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + sinon@^9.0.1: version "9.0.2" resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.0.2.tgz#b9017e24633f4b1c98dfb6e784a5f0509f5fd85d" @@ -244,11 +873,33 @@ sinon@^9.0.1: nise "^4.0.1" supports-color "^7.1.0" +sshpk@^1.7.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" + integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + streamsearch@0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo= +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + supports-color@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" @@ -256,11 +907,41 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +through@^2.3.4: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + type-detect@4.0.8, type-detect@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +uniq@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= + uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" @@ -268,9 +949,35 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + uv-dlopen@./fixtures/native-addon/uv-dlopen/: version "0.0.1" +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + worker-loader@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-2.0.0.tgz#45fda3ef76aca815771a89107399ee4119b430ac" From 63908ccf89ff8a3f06eee8335675750c12497b86 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Thu, 27 Jan 2022 17:45:06 -0500 Subject: [PATCH 159/268] Revert "ci: update to Ubuntu 20.04 docker image (#32614)" (#32656) This reverts commit 8803e7f02026fac62985eaf9745fd9ae0760cd18. --- .circleci/build_config.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index ba50c4f322147..26274eab16758 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -45,7 +45,7 @@ executors: type: enum enum: ["medium", "xlarge", "2xlarge+"] docker: - - image: ghcr.io/electron/build:e6bebd08a51a0d78ec23e5b3fd7e7c0846412328 + - image: ghcr.io/electron/build:27db4a3e3512bfd2e47f58cea69922da0835f1d9 resource_class: << parameters.size >> macos: @@ -890,12 +890,12 @@ step-touch-sync-done: &step-touch-sync-done step-maybe-restore-src-cache: &step-maybe-restore-src-cache restore_cache: keys: - - v10-src-cache-{{ checksum "src/electron/.depshash" }} + - v8-src-cache-{{ checksum "src/electron/.depshash" }} name: Restoring src cache step-maybe-restore-src-cache-marker: &step-maybe-restore-src-cache-marker restore_cache: keys: - - v3-src-cache-marker-{{ checksum "src/electron/.depshash" }} + - v1-src-cache-marker-{{ checksum "src/electron/.depshash" }} name: Restoring src cache marker # Restore exact or closest git cache based on the hash of DEPS and .circle-sync-done @@ -906,8 +906,8 @@ step-maybe-restore-git-cache: &step-maybe-restore-git-cache paths: - ~/.gclient-cache keys: - - v3-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} - - v3-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }} + - v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} + - v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }} name: Conditionally restoring git cache step-restore-out-cache: &step-restore-out-cache @@ -932,7 +932,7 @@ step-save-git-cache: &step-save-git-cache save_cache: paths: - ~/.gclient-cache - key: v3-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} + key: v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} name: Persisting git cache step-save-out-cache: &step-save-out-cache @@ -977,7 +977,7 @@ step-save-src-cache: &step-save-src-cache save_cache: paths: - /var/portal - key: v10-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }} + key: v8-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }} name: Persisting src cache step-make-src-cache-marker: &step-make-src-cache-marker run: @@ -987,7 +987,7 @@ step-save-src-cache-marker: &step-save-src-cache-marker save_cache: paths: - .src-cache-marker - key: v3-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }} + key: v1-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }} step-maybe-early-exit-no-doc-change: &step-maybe-early-exit-no-doc-change run: From e693738f7c15542695cf7d2ca325fcf77d9dd625 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Fri, 28 Jan 2022 05:02:11 -0800 Subject: [PATCH 160/268] Bump v18.0.0-nightly.20220128 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 2f1ee79f54243..87eab9f828181 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220127 \ No newline at end of file +18.0.0-nightly.20220128 \ No newline at end of file diff --git a/package.json b/package.json index a84c4eaff0d79..3ff42cc053ee8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220127", + "version": "18.0.0-nightly.20220128", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 3578fe11ee83e..426326a020ea6 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220127 - PRODUCTVERSION 18,0,0,20220127 + FILEVERSION 18,0,0,20220128 + PRODUCTVERSION 18,0,0,20220128 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From d657cd8ed66aebe303caa26d620081249300556c Mon Sep 17 00:00:00 2001 From: Harshil jain Date: Sat, 29 Jan 2022 02:10:20 +0530 Subject: [PATCH 161/268] docs: Remove the latin words from doc (#32641) --- docs/api/dock.md | 2 +- docs/api/menu-item.md | 2 +- docs/development/build-instructions-gn.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api/dock.md b/docs/api/dock.md index e242761b5c6c3..3e798e793192e 100644 --- a/docs/api/dock.md +++ b/docs/api/dock.md @@ -28,7 +28,7 @@ When `informational` is passed, the dock icon will bounce for one second. However, the request remains active until either the application becomes active or the request is canceled. -**Nota Bene:** This method can only be used while the app is not focused; when the app is focused it will return -1. +**Note:** This method can only be used while the app is not focused; when the app is focused it will return -1. #### `dock.cancelBounce(id)` _macOS_ diff --git a/docs/api/menu-item.md b/docs/api/menu-item.md index bd50f27777198..3d38a292b4c41 100644 --- a/docs/api/menu-item.md +++ b/docs/api/menu-item.md @@ -124,7 +124,7 @@ When specifying a `role` on macOS, `label` and `accelerator` are the only options that will affect the menu item. All other options will be ignored. Lowercase `role`, e.g. `toggledevtools`, is still supported. -**Nota Bene:** The `enabled` and `visibility` properties are not available for top-level menu items in the tray on macOS. +**Note:** The `enabled` and `visibility` properties are not available for top-level menu items in the tray on macOS. ### Instance Properties diff --git a/docs/development/build-instructions-gn.md b/docs/development/build-instructions-gn.md index 3da281866e7dd..951c894fc8826 100644 --- a/docs/development/build-instructions-gn.md +++ b/docs/development/build-instructions-gn.md @@ -136,7 +136,7 @@ $ gn gen out/Release --args="import(\"//electron/build/args/release.gn\") $GN_EX ``` **To build, run `ninja` with the `electron` target:** -Nota Bene: This will also take a while and probably heat up your lap. +Note: This will also take a while and probably heat up your lap. For the testing configuration: From c6d061c2d46199508bd361545fc2a436e9344a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C5=A0uppa?= Date: Mon, 31 Jan 2022 10:57:52 +0100 Subject: [PATCH 162/268] Update config.py (#32666) * Fix missing comma --- script/lib/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/lib/config.py b/script/lib/config.py index a5bbce59b7eec..67eed8ddb10f0 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -20,7 +20,7 @@ 'libEGL.so', 'libGLESv2.so', 'libffmpeg.so', - 'libvk_swiftshader.so' + 'libvk_swiftshader.so', 'swiftshader/libEGL.so', 'swiftshader/libGLESv2.so', ] From 32ae67c87311ae07ea301093912b82a3dbac702e Mon Sep 17 00:00:00 2001 From: Harshil jain Date: Mon, 31 Jan 2022 17:06:47 +0530 Subject: [PATCH 163/268] docs: update the build docs for electron to improve doc readability (#32663) --- docs/development/build-instructions-gn.md | 35 ++++++++++------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/docs/development/build-instructions-gn.md b/docs/development/build-instructions-gn.md index 951c894fc8826..70b5c48ed857c 100644 --- a/docs/development/build-instructions-gn.md +++ b/docs/development/build-instructions-gn.md @@ -98,43 +98,38 @@ $ gclient sync -f ## Building +**Set the environment variable for chromium build tools** + +On Linux & MacOS + ```sh $ cd src $ export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools -$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\") $GN_EXTRA_ARGS" ``` -Or on Windows (without the optional argument): +On Windows: ```sh $ cd src $ set CHROMIUM_BUILDTOOLS_PATH=%cd%\buildtools -$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")" ``` -This will generate a build directory `out/Testing` under `src/` with -the testing build configuration. You can replace `Testing` with another name, -but it should be a subdirectory of `out`. -Also you shouldn't have to run `gn gen` again—if you want to change the -build arguments, you can run `gn args out/Testing` to bring up an editor. - -To see the list of available build configuration options, run `gn args -out/Testing --list`. - -**For generating Testing build config of -Electron:** +**To generate Testing build config of Electron:** ```sh -$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\") $GN_EXTRA_ARGS" +$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")" ``` -**For generating Release (aka "non-component" or "static") build config of -Electron:** +**To generate Release build config of Electron:** ```sh -$ gn gen out/Release --args="import(\"//electron/build/args/release.gn\") $GN_EXTRA_ARGS" +$ gn gen out/Release --args="import(\"//electron/build/args/release.gn\")" ``` +**Note:** This will generate a `out/Testing` or `out/Release` build directory under `src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`. + +Also you shouldn't have to run `gn gen` again—if you want to change the build arguments, you can run `gn args out/Testing` to bring up an editor. To see the list of available build configuration options, run `gn args out/Testing --list`. + **To build, run `ninja` with the `electron` target:** Note: This will also take a while and probably heat up your lap. @@ -169,13 +164,13 @@ $ ./out/Testing/electron On linux, first strip the debugging and symbol information: ```sh -electron/script/strip-binaries.py -d out/Release +$ electron/script/strip-binaries.py -d out/Release ``` To package the electron build as a distributable zip file: ```sh -ninja -C out/Release electron:electron_dist_zip +$ ninja -C out/Release electron:electron_dist_zip ``` ### Cross-compiling From db9ab806947b30927b651c0f4f5b1f5ca7473ecd Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 31 Jan 2022 12:37:40 +0100 Subject: [PATCH 164/268] chore: update to latest TypeScript (#32596) --- default_app/main.ts | 6 +-- .../api/auto-updater/squirrel-update-win.ts | 2 +- lib/browser/ipc-main-impl.ts | 2 +- package.json | 4 +- spec-main/api-context-bridge-spec.ts | 2 +- spec-main/api-ipc-spec.ts | 2 +- spec-main/api-web-contents-spec.ts | 2 +- spec-main/node-spec.ts | 2 +- tsconfig.spec.json | 3 -- typings/internal-ambient.d.ts | 51 ------------------- yarn.lock | 8 +-- 11 files changed, 15 insertions(+), 69 deletions(-) diff --git a/default_app/main.ts b/default_app/main.ts index 38172b788279b..f2834624f7430 100644 --- a/default_app/main.ts +++ b/default_app/main.ts @@ -92,7 +92,7 @@ function loadApplicationPackage (packagePath: string) { try { packageJson = require(packageJsonPath); } catch (e) { - showErrorMessage(`Unable to parse ${packageJsonPath}\n\n${e.message}`); + showErrorMessage(`Unable to parse ${packageJsonPath}\n\n${(e as Error).message}`); return; } @@ -111,7 +111,7 @@ function loadApplicationPackage (packagePath: string) { const filePath = Module._resolveFilename(packagePath, module, true); app.setAppPath(appPath || path.dirname(filePath)); } catch (e) { - showErrorMessage(`Unable to find Electron app at ${packagePath}\n\n${e.message}`); + showErrorMessage(`Unable to find Electron app at ${packagePath}\n\n${(e as Error).message}`); return; } @@ -119,7 +119,7 @@ function loadApplicationPackage (packagePath: string) { Module._load(packagePath, module, true); } catch (e) { console.error('App threw an error during load'); - console.error(e.stack || e); + console.error((e as Error).stack || e); throw e; } } diff --git a/lib/browser/api/auto-updater/squirrel-update-win.ts b/lib/browser/api/auto-updater/squirrel-update-win.ts index 0a197ab8906c1..82d867f4f8fc6 100644 --- a/lib/browser/api/auto-updater/squirrel-update-win.ts +++ b/lib/browser/api/auto-updater/squirrel-update-win.ts @@ -35,7 +35,7 @@ const spawnUpdate = function (args: string[], detached: boolean, callback: Funct spawnedArgs = args || []; } } catch (error1) { - error = error1; + error = error1 as Error; // Shouldn't happen, but still guard it. process.nextTick(function () { diff --git a/lib/browser/ipc-main-impl.ts b/lib/browser/ipc-main-impl.ts index 6b5012b2b4b0f..9118f03e19498 100644 --- a/lib/browser/ipc-main-impl.ts +++ b/lib/browser/ipc-main-impl.ts @@ -15,7 +15,7 @@ export class IpcMainImpl extends EventEmitter { try { e._reply(await Promise.resolve(fn(e, ...args))); } catch (err) { - e._throw(err); + e._throw(err as Error); } }); } diff --git a/package.json b/package.json index 3ff42cc053ee8..ecacfa66b6dc0 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "timers-browserify": "1.4.2", "ts-loader": "^8.0.2", "ts-node": "6.2.0", - "typescript": "^4.1.3", + "typescript": "^4.5.5", "webpack": "^4.43.0", "webpack-cli": "^3.3.12", "wrapper-webpack-plugin": "^2.1.0" @@ -141,4 +141,4 @@ "node script/gen-hunspell-filenames.js" ] } -} \ No newline at end of file +} diff --git a/spec-main/api-context-bridge-spec.ts b/spec-main/api-context-bridge-spec.ts index 5a979611f1f63..dc3601dbf8841 100644 --- a/spec-main/api-context-bridge-spec.ts +++ b/spec-main/api-context-bridge-spec.ts @@ -372,7 +372,7 @@ describe('contextBridge', () => { try { root.example(); } catch (e) { - return e.message; + return (e as Error).message; } }); expect(result).equal('oh no'); diff --git a/spec-main/api-ipc-spec.ts b/spec-main/api-ipc-spec.ts index c25a01d320dc4..44ee2cfe498e8 100644 --- a/spec-main/api-ipc-spec.ts +++ b/spec-main/api-ipc-spec.ts @@ -24,7 +24,7 @@ describe('ipc module', () => { const result = await ipcRenderer.invoke('test', ...args); ipcRenderer.send('result', { result }); } catch (e) { - ipcRenderer.send('result', { error: e.message }); + ipcRenderer.send('result', { error: (e as Error).message }); } } diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index c4aa16b67729b..a9ceda2cdd93d 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -357,7 +357,7 @@ describe('webContents module', () => { }); it('sets appropriate error information on rejection', async () => { - let err; + let err: any; try { await w.loadURL('file:non-existent'); } catch (e) { diff --git a/spec-main/node-spec.ts b/spec-main/node-spec.ts index 41fc0e2369d1a..af6c11360f202 100644 --- a/spec-main/node-spec.ts +++ b/spec-main/node-spec.ts @@ -213,7 +213,7 @@ describe('node feature', () => { ifdescribe(features.isRunAsNodeEnabled())('inspector', () => { let child: childProcess.ChildProcessWithoutNullStreams; - let exitPromise: Promise; + let exitPromise: Promise | null; afterEach(async () => { if (child && exitPromise) { diff --git a/tsconfig.spec.json b/tsconfig.spec.json index d08253b41fc91..a5e21627ebcf5 100644 --- a/tsconfig.spec.json +++ b/tsconfig.spec.json @@ -1,8 +1,5 @@ { "extends": "./tsconfig.json", - "compilerOptions": { - "rootDir": "spec-main" - }, "include": [ "spec-main", "typings" diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index d0e6f8e0b2ba2..92d707c8edacc 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -294,60 +294,9 @@ declare interface Window { } }; WebView: typeof ElectronInternal.WebViewElement; - ResizeObserver: ResizeObserver; trustedTypes: TrustedTypePolicyFactory; } -/** - * The ResizeObserver interface is used to observe changes to Element's content - * rect. - * - * It is modeled after MutationObserver and IntersectionObserver. - */ -declare class ResizeObserver { - constructor (callback: ResizeObserverCallback); - - /** - * Adds target to the list of observed elements. - */ - observe: (target: Element) => void; - - /** - * Removes target from the list of observed elements. - */ - unobserve: (target: Element) => void; - - /** - * Clears both the observationTargets and activeTargets lists. - */ - disconnect: () => void; -} - -/** - * This callback delivers ResizeObserver's notifications. It is invoked by a - * broadcast active observations algorithm. - */ -interface ResizeObserverCallback { - (entries: ResizeObserverEntry[], observer: ResizeObserver): void; -} - -interface ResizeObserverEntry { - /** - * @param target The Element whose size has changed. - */ - new (target: Element): ResizeObserverEntry; - - /** - * The Element whose size has changed. - */ - readonly target: Element; - - /** - * Element's content rect when ResizeObserverCallback is invoked. - */ - readonly contentRect: DOMRectReadOnly; -} - // https://w3c.github.io/webappsec-trusted-types/dist/spec/#trusted-types type TrustedHTML = string; diff --git a/yarn.lock b/yarn.lock index f3e5cd47f952c..5059edbeab68e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7498,10 +7498,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" - integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== +typescript@^4.5.5: + version "4.5.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" + integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6" From 8e0e2d40e207387f2a021c379ef1de0e97d26349 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 31 Jan 2022 05:01:27 -0800 Subject: [PATCH 165/268] Bump v18.0.0-nightly.20220131 --- ELECTRON_VERSION | 2 +- package.json | 4 ++-- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 87eab9f828181..12e9a0087ceb3 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220128 \ No newline at end of file +18.0.0-nightly.20220131 \ No newline at end of file diff --git a/package.json b/package.json index ecacfa66b6dc0..e37d2364e5260 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220128", + "version": "18.0.0-nightly.20220131", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -141,4 +141,4 @@ "node script/gen-hunspell-filenames.js" ] } -} +} \ No newline at end of file diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 426326a020ea6..b01583077efe8 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220128 - PRODUCTVERSION 18,0,0,20220128 + FILEVERSION 18,0,0,20220131 + PRODUCTVERSION 18,0,0,20220131 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 365933f1f3b85a028c45b74ecaa164a93132bdfc Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 31 Jan 2022 14:04:45 -0500 Subject: [PATCH 166/268] fix: expose all serial devices to setDevicePermissionHandler (#32651) --- .../browser/serial/serial_chooser_context.cc | 36 ++++--------------- shell/browser/serial/serial_chooser_context.h | 6 ---- 2 files changed, 6 insertions(+), 36 deletions(-) diff --git a/shell/browser/serial/serial_chooser_context.cc b/shell/browser/serial/serial_chooser_context.cc index 594c9b41694d5..49a57a4ffdf79 100644 --- a/shell/browser/serial/serial_chooser_context.cc +++ b/shell/browser/serial/serial_chooser_context.cc @@ -95,36 +95,18 @@ void SerialChooserContext::GrantPortPermission( const device::mojom::SerialPortInfo& port, content::RenderFrameHost* render_frame_host) { base::Value value = PortInfoToValue(port); - port_info_.insert({port.token, value.Clone()}); - - if (CanStorePersistentEntry(port)) { - auto* web_contents = - content::WebContents::FromRenderFrameHost(render_frame_host); - auto* permission_helper = - WebContentsPermissionHelper::FromWebContents(web_contents); - permission_helper->GrantSerialPortPermission(origin, std::move(value), - render_frame_host); - return; - } - - ephemeral_ports_[origin].insert(port.token); + auto* web_contents = + content::WebContents::FromRenderFrameHost(render_frame_host); + auto* permission_helper = + WebContentsPermissionHelper::FromWebContents(web_contents); + permission_helper->GrantSerialPortPermission(origin, std::move(value), + render_frame_host); } bool SerialChooserContext::HasPortPermission( const url::Origin& origin, const device::mojom::SerialPortInfo& port, content::RenderFrameHost* render_frame_host) { - auto it = ephemeral_ports_.find(origin); - if (it != ephemeral_ports_.end()) { - const std::set ports = it->second; - if (base::Contains(ports, port.token)) - return true; - } - - if (!CanStorePersistentEntry(port)) { - return false; - } - auto* web_contents = content::WebContents::FromRenderFrameHost(render_frame_host); auto* permission_helper = @@ -194,8 +176,6 @@ void SerialChooserContext::OnPortRemoved( device::mojom::SerialPortInfoPtr port) { for (auto& observer : port_observer_list_) observer.OnPortRemoved(*port); - - port_info_.erase(port->token); } void SerialChooserContext::EnsurePortManagerConnection() { @@ -221,10 +201,6 @@ void SerialChooserContext::SetUpPortManagerConnection( void SerialChooserContext::OnPortManagerConnectionError() { port_manager_.reset(); client_receiver_.reset(); - - port_info_.clear(); - - ephemeral_ports_.clear(); } } // namespace electron diff --git a/shell/browser/serial/serial_chooser_context.h b/shell/browser/serial/serial_chooser_context.h index 313ec7065c0d6..0183b5877a514 100644 --- a/shell/browser/serial/serial_chooser_context.h +++ b/shell/browser/serial/serial_chooser_context.h @@ -82,12 +82,6 @@ class SerialChooserContext : public KeyedService, mojo::PendingRemote manager); void OnPortManagerConnectionError(); - // Tracks the set of ports to which an origin has access to. - std::map> ephemeral_ports_; - - // Holds information about ports in |ephemeral_ports_|. - std::map port_info_; - mojo::Remote port_manager_; mojo::Receiver client_receiver_{this}; base::ObserverList port_observer_list_; From f5dc2a653528fb84ad8aac1fb4f2a7075f35ad2f Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Mon, 31 Jan 2022 22:10:57 +0100 Subject: [PATCH 167/268] fix: transparent window max/unmax event firing (#32643) --- shell/browser/native_window_views.cc | 1 + shell/browser/native_window_views_win.cc | 1 + spec-main/api-browser-window-spec.ts | 35 ++++++++++++++++++++++-- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index d7d4a9bd827f5..0ba1637fe069a 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -594,6 +594,7 @@ void NativeWindowViews::Unmaximize() { #if defined(OS_WIN) if (transparent()) { SetBounds(restore_bounds_, false); + NotifyWindowUnmaximize(); return; } #endif diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 05335aed07d66..cf4eb4855f4c2 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -187,6 +187,7 @@ void NativeWindowViews::Maximize() { auto display = display::Screen::GetScreen()->GetDisplayNearestWindow( GetNativeWindow()); SetBounds(display.work_area(), false); + NotifyWindowMaximize(); } } diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 30dced06784de..b1613fea6dce2 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1119,7 +1119,7 @@ describe('BrowserWindow module', () => { await unmaximize; expectBoundsEqual(w.getNormalBounds(), bounds); }); - it('can check transparent window maximization', async () => { + it('correctly checks transparent window maximization state', async () => { w.destroy(); w = new BrowserWindow({ show: false, @@ -1128,12 +1128,12 @@ describe('BrowserWindow module', () => { transparent: true }); - const maximize = emittedOnce(w, 'resize'); + const maximize = emittedOnce(w, 'maximize'); w.show(); w.maximize(); await maximize; expect(w.isMaximized()).to.equal(true); - const unmaximize = emittedOnce(w, 'resize'); + const unmaximize = emittedOnce(w, 'unmaximize'); w.unmaximize(); await unmaximize; expect(w.isMaximized()).to.equal(false); @@ -3266,6 +3266,19 @@ describe('BrowserWindow module', () => { await maximize; }); + it('emits an event when a transparent window is maximized', async () => { + const w = new BrowserWindow({ + show: false, + frame: false, + transparent: true + }); + + const maximize = emittedOnce(w, 'maximize'); + w.show(); + w.maximize(); + await maximize; + }); + it('emits only one event when frameless window is maximized', () => { const w = new BrowserWindow({ show: false, frame: false }); let emitted = 0; @@ -3284,6 +3297,22 @@ describe('BrowserWindow module', () => { await unmaximize; }); + it('emits an event when a transparent window is unmaximized', async () => { + const w = new BrowserWindow({ + show: false, + frame: false, + transparent: true + }); + + const maximize = emittedOnce(w, 'maximize'); + const unmaximize = emittedOnce(w, 'unmaximize'); + w.show(); + w.maximize(); + await maximize; + w.unmaximize(); + await unmaximize; + }); + it('emits an event when window is minimized', async () => { const w = new BrowserWindow({ show: false }); const minimize = emittedOnce(w, 'minimize'); From e34d7f5d6f7c34332a11010ca786e2e1271b2629 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Tue, 1 Feb 2022 03:57:33 -0500 Subject: [PATCH 168/268] docs: fix missing tag end in clipboard example (#32673) --- docs/api/clipboard.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/clipboard.md b/docs/api/clipboard.md index d593b1281e1dd..3d43c3715de4c 100644 --- a/docs/api/clipboard.md +++ b/docs/api/clipboard.md @@ -76,7 +76,7 @@ Writes `markup` to the clipboard. ```js const { clipboard } = require('electron') -clipboard.writeHTML('HiHi') ``` ### `clipboard.readImage([type])` From aeee9cfb7876a770fed9a1dc9669c2beeacf9ed9 Mon Sep 17 00:00:00 2001 From: Samuel Maddock Date: Tue, 1 Feb 2022 05:28:57 -0500 Subject: [PATCH 169/268] feat: add focus and blur events for WebContents (#25873) test: add focus and blur WebContents event tests test: confirm that webcontents focus event is fired on browserwindow focus fix: mac focus event test timeout --- docs/api/web-contents.md | 8 +++ .../browser/api/electron_api_web_contents.cc | 10 ++++ shell/browser/api/electron_api_web_contents.h | 4 ++ spec-main/api-web-contents-spec.ts | 56 ++++++++++++++++++- 4 files changed, 75 insertions(+), 3 deletions(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index df97b90e7e7aa..8bf9d9a8b8062 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -508,6 +508,14 @@ Returns: Emitted when the user is requesting to change the zoom level using the mouse wheel. +#### Event: 'blur' + +Emitted when the `WebContents` loses focus. + +#### Event: 'focus' + +Emitted when the `WebContents` gains focus. + #### Event: 'devtools-opened' Emitted when DevTools is opened. diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 69dd0b925390a..dd53ce0dba80e 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1629,6 +1629,16 @@ void WebContents::DidAcquireFullscreen(content::RenderFrameHost* rfh) { set_fullscreen_frame(rfh); } +void WebContents::OnWebContentsFocused( + content::RenderWidgetHost* render_widget_host) { + Emit("focus"); +} + +void WebContents::OnWebContentsLostFocus( + content::RenderWidgetHost* render_widget_host) { + Emit("blur"); +} + void WebContents::DOMContentLoaded( content::RenderFrameHost* render_frame_host) { auto* web_frame = WebFrameMain::FromRenderFrameHost(render_frame_host); diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 984e3c1c26747..48cb59a2867d2 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -621,6 +621,10 @@ class WebContents : public ExclusiveAccessContext, void DidChangeThemeColor() override; void OnCursorChanged(const content::WebCursor& cursor) override; void DidAcquireFullscreen(content::RenderFrameHost* rfh) override; + void OnWebContentsFocused( + content::RenderWidgetHost* render_widget_host) override; + void OnWebContentsLostFocus( + content::RenderWidgetHost* render_widget_host) override; // InspectableWebContentsDelegate: void DevToolsReloadPage() override; diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index a9ceda2cdd93d..911947a27e6e0 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -807,10 +807,10 @@ describe('webContents module', () => { }); }); - describe('focus()', () => { - describe('when the web contents is hidden', () => { + describe('focus APIs', () => { + describe('focus()', () => { afterEach(closeAllWindows); - it('does not blur the focused window', async () => { + it('does not blur the focused window when the web contents is hidden', async () => { const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true } }); w.show(); await w.loadURL('about:blank'); @@ -825,6 +825,56 @@ describe('webContents module', () => { expect(childFocused).to.be.false(); }); }); + + describe('focus event', () => { + afterEach(closeAllWindows); + it('is triggered when web contents is focused', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadURL('about:blank'); + const devToolsOpened = emittedOnce(w.webContents, 'devtools-opened'); + w.webContents.openDevTools(); + await devToolsOpened; + w.webContents.devToolsWebContents!.focus(); + const focusPromise = emittedOnce(w.webContents, 'focus'); + w.webContents.focus(); + await expect(focusPromise).to.eventually.be.fulfilled(); + }); + + it('is triggered when BrowserWindow is focused', async () => { + const window1 = new BrowserWindow({ show: false }); + const window2 = new BrowserWindow({ show: false }); + + await Promise.all([ + window1.loadURL('about:blank'), + window2.loadURL('about:blank') + ]); + + window1.showInactive(); + window2.showInactive(); + + let focusPromise = emittedOnce(window1.webContents, 'focus'); + window1.focus(); + await expect(focusPromise).to.eventually.be.fulfilled(); + + focusPromise = emittedOnce(window2.webContents, 'focus'); + window2.focus(); + await expect(focusPromise).to.eventually.be.fulfilled(); + }); + }); + + describe('blur event', () => { + afterEach(closeAllWindows); + it('is triggered when web contents is blurred', async () => { + const w = new BrowserWindow({ show: true }); + await w.loadURL('about:blank'); + const blurPromise = emittedOnce(w.webContents, 'blur'); + const devToolsOpened = emittedOnce(w.webContents, 'devtools-opened'); + w.webContents.openDevTools({ mode: 'detach' }); + await devToolsOpened; + w.webContents.devToolsWebContents!.focus(); + await expect(blurPromise).to.eventually.be.fulfilled(); + }); + }); }); describe('getOSProcessId()', () => { From 2289a52fb30c2eacdf66333cd163774d00819c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Tue, 1 Feb 2022 12:47:49 +0100 Subject: [PATCH 170/268] docs: fix typo in BrowserWindow description (#32667) --- docs/api/browser-window.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index e989caf6393a2..140eaaa2284a0 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -388,7 +388,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. contain the layout of the document—without requiring scrolling. Enabling this will cause the `preferred-size-changed` event to be emitted on the `WebContents` when the preferred size changes. Default is `false`. - * `titleBarOverlay` Object | Boolean (optional) - When using a frameless window in conjuction with `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars]. Specifying `true` will result in an overlay with default system colors. Default is `false`. + * `titleBarOverlay` Object | Boolean (optional) - When using a frameless window in conjunction with `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars]. Specifying `true` will result in an overlay with default system colors. Default is `false`. * `color` String (optional) _Windows_ - The CSS color of the Window Controls Overlay when enabled. Default is the system color. * `symbolColor` String (optional) _Windows_ - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color. * `height` Integer (optional) _macOS_ _Windows_ - The height of the title bar and Window Controls Overlay in pixels. Default is system height. From 939bfa50f6c9b8a497b7147b3412081805fa0af4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Tue, 1 Feb 2022 05:01:37 -0800 Subject: [PATCH 171/268] Bump v18.0.0-nightly.20220201 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 12e9a0087ceb3..d8c23d2a23ac7 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220131 \ No newline at end of file +18.0.0-nightly.20220201 \ No newline at end of file diff --git a/package.json b/package.json index e37d2364e5260..17364c42ece0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220131", + "version": "18.0.0-nightly.20220201", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index b01583077efe8..0e94c61a98fec 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220131 - PRODUCTVERSION 18,0,0,20220131 + FILEVERSION 18,0,0,20220201 + PRODUCTVERSION 18,0,0,20220201 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From b346f909e74dc3a82df2ba269029dc3dbd365add Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Tue, 1 Feb 2022 11:54:27 -0500 Subject: [PATCH 172/268] ci: fixup gclient cache on ubuntu 20 (#32691) * ci: fixup gclient cache on ubuntu 20 * ci: update to Ubuntu 20.04 docker image --- .circleci/build_config.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 26274eab16758..ff88d9a5188c6 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -45,7 +45,7 @@ executors: type: enum enum: ["medium", "xlarge", "2xlarge+"] docker: - - image: ghcr.io/electron/build:27db4a3e3512bfd2e47f58cea69922da0835f1d9 + - image: ghcr.io/electron/build:e6bebd08a51a0d78ec23e5b3fd7e7c0846412328 resource_class: << parameters.size >> macos: @@ -890,12 +890,12 @@ step-touch-sync-done: &step-touch-sync-done step-maybe-restore-src-cache: &step-maybe-restore-src-cache restore_cache: keys: - - v8-src-cache-{{ checksum "src/electron/.depshash" }} + - v12-src-cache-{{ checksum "src/electron/.depshash" }} name: Restoring src cache step-maybe-restore-src-cache-marker: &step-maybe-restore-src-cache-marker restore_cache: keys: - - v1-src-cache-marker-{{ checksum "src/electron/.depshash" }} + - v5-src-cache-marker-{{ checksum "src/electron/.depshash" }} name: Restoring src cache marker # Restore exact or closest git cache based on the hash of DEPS and .circle-sync-done @@ -904,10 +904,10 @@ step-maybe-restore-src-cache-marker: &step-maybe-restore-src-cache-marker step-maybe-restore-git-cache: &step-maybe-restore-git-cache restore_cache: paths: - - ~/.gclient-cache + - gclient-cache keys: - - v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} - - v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }} + - v5-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} + - v5-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }} name: Conditionally restoring git cache step-restore-out-cache: &step-restore-out-cache @@ -924,15 +924,15 @@ step-set-git-cache-path: &step-set-git-cache-path command: | # CircleCI does not support interpolation when setting environment variables. # https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-shell-command - echo 'export GIT_CACHE_PATH="$HOME/.gclient-cache"' >> $BASH_ENV + echo 'export GIT_CACHE_PATH="$PWD/gclient-cache"' >> $BASH_ENV # Persist the git cache based on the hash of DEPS and .circle-sync-done # If the src cache was restored above then this will persist an empty cache step-save-git-cache: &step-save-git-cache save_cache: paths: - - ~/.gclient-cache - key: v2-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} + - gclient-cache + key: v5-gclient-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} name: Persisting git cache step-save-out-cache: &step-save-out-cache @@ -977,7 +977,7 @@ step-save-src-cache: &step-save-src-cache save_cache: paths: - /var/portal - key: v8-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }} + key: v12-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }} name: Persisting src cache step-make-src-cache-marker: &step-make-src-cache-marker run: @@ -987,7 +987,7 @@ step-save-src-cache-marker: &step-save-src-cache-marker save_cache: paths: - .src-cache-marker - key: v1-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }} + key: v5-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }} step-maybe-early-exit-no-doc-change: &step-maybe-early-exit-no-doc-change run: @@ -1352,10 +1352,6 @@ commands: - *step-gclient-sync - store_artifacts: path: patches - - when: - condition: << parameters.save-git-cache >> - steps: - - *step-save-git-cache # These next few steps reset Electron to the correct commit regardless of which cache was restored - run: name: Wipe Electron @@ -1364,6 +1360,11 @@ commands: - *step-run-electron-only-hooks - *step-generate-deps-hash-cleanly - *step-mark-sync-done + # Save git cache AFTER sync marked done because other jobs expect that to be the case + - when: + condition: << parameters.save-git-cache >> + steps: + - *step-save-git-cache - *step-minimize-workspace-size-from-checkout - *step-delete-git-directories - when: From 56c6d25e98d6c0caef124dc81113f264efccc8ef Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 1 Feb 2022 20:00:09 +0100 Subject: [PATCH 173/268] fix: crash on printer dialog cancellation (#32632) * fix: crash on printer dialog cancellation * fix: remove commented out code * chore: address review --- patches/chromium/printing.patch | 237 +++++++++++++++----------------- 1 file changed, 114 insertions(+), 123 deletions(-) diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index aa2bc07b27898..cc7c628d48689 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -11,7 +11,7 @@ majority of changes originally come from these PRs: This patch also fixes callback for manual user cancellation and success. diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc -index 0de0532d64897c91ce0f72d165976e12e1dec03e..13167ca3f9c0d4895fecd40ab1e2d397c6e85a0b 100644 +index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7d1aae142 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc @@ -88,6 +88,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { @@ -54,50 +54,11 @@ index 0de0532d64897c91ce0f72d165976e12e1dec03e..13167ca3f9c0d4895fecd40ab1e2d397 ? PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3_WITH_TYPE42_FONTS : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } -@@ -504,6 +510,20 @@ void PrintJob::OnPageDone(PrintedPage* page) { - } - #endif // defined(OS_WIN) - -+void PrintJob::OnUserInitCancelled() { -+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI); -+ // Make sure a `Cancel()` is broadcast. -+ auto details = base::MakeRefCounted(JobEventDetails::USER_INIT_CANCELED, -+ 0, nullptr); -+ content::NotificationService::current()->Notify( -+ chrome::NOTIFICATION_PRINT_JOB_EVENT, content::Source(this), -+ content::Details(details.get())); -+ -+ for (auto& observer : observers_) { -+ observer.OnUserInitCancelled(); -+ } -+} -+ - void PrintJob::OnFailed() { - DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h -index e19f62354edb8acad722c6680296b7d2f55f51fe..b5539171655d78634ee89faf3516d23ce5718353 100644 +index e19f62354edb8acad722c6680296b7d2f55f51fe..51c41b4dbab81ffe5840d59ef45b661cf5c5534b 100644 --- a/chrome/browser/printing/print_job.h +++ b/chrome/browser/printing/print_job.h -@@ -53,6 +53,7 @@ class PrintJob : public base::RefCountedThreadSafe { - public: - virtual void OnDocDone(int job_id, PrintedDocument* document) {} - virtual void OnJobDone() {} -+ virtual void OnUserInitCancelled() {} - virtual void OnFailed() {} - }; - -@@ -100,6 +101,9 @@ class PrintJob : public base::RefCountedThreadSafe { - // Called when the document is done printing. - virtual void OnDocDone(int job_id, PrintedDocument* document); - -+ // Called if the user cancels the print job. -+ virtual void OnUserInitCancelled(); -+ - // Called if the document fails to print. - virtual void OnFailed(); - -@@ -257,6 +261,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { +@@ -257,6 +257,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { public: // Event type. enum Type { @@ -108,7 +69,7 @@ index e19f62354edb8acad722c6680296b7d2f55f51fe..b5539171655d78634ee89faf3516d23c NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..b4ab0984765c9711ddacf32f7147108cdfbc5096 100644 +index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..4283a5743c695a7376722f80925722d9e7a6496e 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,13 +20,13 @@ @@ -126,18 +87,7 @@ index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..b4ab0984765c9711ddacf32f7147108c #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -125,6 +125,10 @@ void FailedNotificationCallback(PrintJob* print_job) { - print_job->OnFailed(); - } - -+void UserInitCancelledNotificationCallback(PrintJob* print_job) { -+ print_job->OnUserInitCancelled(); -+} -+ - #if defined(OS_WIN) - void PageNotificationCallback(PrintJob* print_job, PrintedPage* page) { - print_job->OnPageDone(page); -@@ -245,16 +249,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, +@@ -245,16 +245,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, #endif // defined(OS_LINUX) && defined(USE_CUPS) } @@ -162,21 +112,8 @@ index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..b4ab0984765c9711ddacf32f7147108c } #if defined(OS_CHROMEOS) -@@ -270,6 +279,12 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD( - - void PrintJobWorker::GetSettingsDone(SettingsCallback callback, - mojom::ResultCode result) { -+ if (result == mojom::ResultCode::kCanceled) { -+ print_job_->PostTask( -+ FROM_HERE, -+ base::BindOnce(&UserInitCancelledNotificationCallback, -+ base::RetainedRef(print_job_.get()))); -+ } - std::move(callback).Run(printing_context_->TakeAndResetSettings(), result); - } - diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf91d439102 100644 +index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e0478e3b15c 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -29,10 +29,10 @@ @@ -228,7 +165,26 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -319,12 +325,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -270,6 +276,7 @@ void ScriptedPrintReplyOnIO( + mojom::PrintManagerHost::ScriptedPrintCallback callback) { + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); ++ + if (printer_query->last_status() == mojom::ResultCode::kSuccess && + printer_query->settings().dpi()) { + RenderParamsFromPrintSettings(printer_query->settings(), +@@ -279,8 +286,9 @@ void ScriptedPrintReplyOnIO( + } + bool has_valid_cookie = params->params->document_cookie; + bool has_dpi = !params->params->dpi.IsEmpty(); ++ bool canceled = printer_query->last_status() == mojom::ResultCode::kCanceled; + content::GetUIThreadTaskRunner({})->PostTask( +- FROM_HERE, base::BindOnce(std::move(callback), std::move(params))); ++ FROM_HERE, base::BindOnce(std::move(callback), std::move(params), canceled)); + + if (has_dpi && has_valid_cookie) { + queue->QueuePrinterQuery(std::move(printer_query)); +@@ -319,12 +327,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -243,7 +199,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -332,7 +340,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -332,7 +342,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -255,22 +211,39 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 auto weak_this = weak_ptr_factory_.GetWeakPtr(); DisconnectFromCurrentPrintJob(); if (!weak_this) -@@ -347,7 +358,13 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { +@@ -347,7 +360,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { // go in `ReleasePrintJob()`. SetPrintingRFH(rfh); - GetPrintRenderFrame(rfh)->PrintRequestedPages(); + callback_ = std::move(callback); + -+ if (!callback_.is_null()) { -+ print_job_->AddObserver(*this); -+ } -+ + GetPrintRenderFrame(rfh)->PrintRequestedPages(silent, std::move(settings)); for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); -@@ -506,9 +523,9 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -491,7 +506,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( + void PrintViewManagerBase::ScriptedPrintReply( + ScriptedPrintCallback callback, + int process_id, +- mojom::PrintPagesParamsPtr params) { ++ mojom::PrintPagesParamsPtr params, ++ bool canceled) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + + if (!content::RenderProcessHost::FromID(process_id)) { +@@ -499,16 +515,19 @@ void PrintViewManagerBase::ScriptedPrintReply( + return; + } + ++ if (canceled) ++ UserInitCanceled(); ++ + set_cookie(params->params->document_cookie); +- std::move(callback).Run(std::move(params)); ++ std::move(callback).Run(std::move(params), canceled); + } + void PrintViewManagerBase::UpdatePrintingEnabled() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // The Unretained() is safe because ForEachFrame() is synchronous. @@ -283,7 +256,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 } void PrintViewManagerBase::NavigationStopped() { -@@ -622,12 +639,13 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -622,12 +641,13 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -298,7 +271,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame(); auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::GetDefaultPrintSettingsReply, -@@ -645,18 +663,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -645,18 +665,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -320,7 +293,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -666,6 +686,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -666,6 +688,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.SetIntKey(kSettingRasterizePdfDpi, value); } @@ -328,7 +301,16 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -714,7 +735,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { +@@ -691,7 +714,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, + // didn't happen for some reason. + bad_message::ReceivedBadMessage( + render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); +- std::move(callback).Run(CreateEmptyPrintPagesParamsPtr()); ++ std::move(callback).Run(CreateEmptyPrintPagesParamsPtr(), false); + return; + } + int process_id = render_process_host->GetID(); +@@ -714,7 +737,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { PrintManager::PrintingFailed(cookie); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -336,7 +318,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 #endif ReleasePrinterQuery(); -@@ -729,6 +749,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -729,6 +751,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -348,7 +330,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -739,8 +764,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -739,8 +766,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -359,19 +341,19 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 } void PrintViewManagerBase::DidStartLoading() { -@@ -808,6 +835,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -808,6 +837,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } -+void PrintViewManagerBase::OnUserInitCancelled() { -+ printing_cancelled_ = true; ++void PrintViewManagerBase::UserInitCanceled() { ++ printing_canceled_ = true; + ReleasePrintJob(); +} + void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -869,7 +901,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -869,7 +903,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -383,40 +365,21 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 if (!weak_this) return false; -@@ -891,8 +926,6 @@ bool PrintViewManagerBase::CreateNewPrintJob( - : PrintJob::Source::PRINT_PREVIEW, - /*source_id=*/""); - #endif -- print_job_->AddObserver(*this); -- - printing_succeeded_ = false; - return true; - } -@@ -944,14 +977,21 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -944,6 +981,13 @@ void PrintViewManagerBase::ReleasePrintJob() { content::RenderFrameHost* rfh = printing_rfh_; printing_rfh_ = nullptr; + if (!callback_.is_null()) { -+ print_job_->RemoveObserver(*this); -+ + std::string cb_str = ""; + if (!printing_succeeded_) -+ cb_str = printing_cancelled_ ? "cancelled" : "failed"; ++ cb_str = printing_canceled_ ? "canceled" : "failed"; + std::move(callback_).Run(printing_succeeded_, cb_str); + } + if (!print_job_) return; - if (rfh) - GetPrintRenderFrame(rfh)->PrintingDone(printing_succeeded_); - -- print_job_->RemoveObserver(*this); -- - // Don't close the worker thread. - print_job_ = nullptr; - } -@@ -989,7 +1029,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -989,7 +1033,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -426,7 +389,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..1320afa83016ea72e5dbc23b1ed63cf9 if (!cookie) { diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..1562d6331a9cafd530db42c436e878bac427566d 100644 +index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..fb3af5e3f57f868fd00716f76f70aa63c4cb99c9 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -37,6 +37,8 @@ namespace printing { @@ -450,15 +413,25 @@ index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..1562d6331a9cafd530db42c436e878ba #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in |print_data| with settings specified in -@@ -143,6 +148,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { - // PrintJob::Observer overrides: - void OnDocDone(int job_id, PrintedDocument* document) override; - void OnJobDone() override; -+ void OnUserInitCancelled() override; - void OnFailed() override; - - base::ObserverList& GetObservers() { return observers_; } -@@ -252,9 +258,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -106,6 +111,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { + ScriptedPrintCallback callback) override; + void ShowInvalidPrinterSettingsError() override; + void PrintingFailed(int32_t cookie) override; ++ void UserInitCanceled(); + + // Adds and removes observers for `PrintViewManagerBase` events. The order in + // which notifications are sent to observers is undefined. Observers must be +@@ -197,7 +203,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { + // Runs `callback` with `params` to reply to ScriptedPrint(). + void ScriptedPrintReply(ScriptedPrintCallback callback, + int process_id, +- mojom::PrintPagesParamsPtr params); ++ mojom::PrintPagesParamsPtr params, ++ bool canceled); + + // Requests the RenderView to render all the missing pages for the print job. + // No-op if no print job is pending. Returns true if at least one page has +@@ -252,9 +259,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -468,14 +441,14 @@ index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..1562d6331a9cafd530db42c436e878ba // Indication of success of the print job. bool printing_succeeded_ = false; -+ // Indication of whether the print job was manually cancelled -+ bool printing_cancelled_ = false; ++ // Indication of whether the print job was manually canceled ++ bool printing_canceled_ = false; + // Set while running an inner message loop inside RenderAllMissingPagesNow(). // This means we are _blocking_ until all the necessary pages have been // rendered or the print settings are being loaded. diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom -index 51ebcb4ae399018d3fd8566656596a7ef1f148af..5f2b807fc364131f4c3e6a1646ec522ddc826d9c 100644 +index 51ebcb4ae399018d3fd8566656596a7ef1f148af..c0fbff95137e2e5bccb9702a8cc858df2d989964 100644 --- a/components/printing/common/print.mojom +++ b/components/printing/common/print.mojom @@ -274,7 +274,7 @@ interface PrintPreviewUI { @@ -487,8 +460,17 @@ index 51ebcb4ae399018d3fd8566656596a7ef1f148af..5f2b807fc364131f4c3e6a1646ec522d // Tells the RenderFrame to switch the CSS to print media type, render every // requested page using the print preview document's frame/node, and then +@@ -341,7 +341,7 @@ interface PrintManagerHost { + // Request the print settings from the user. This step is about showing + // UI to the user to select the final print settings. + [Sync] +- ScriptedPrint(ScriptedPrintParams params) => (PrintPagesParams settings); ++ ScriptedPrint(ScriptedPrintParams params) => (PrintPagesParams settings, bool canceled); + + // Tells the browser that there are invalid printer settings. + ShowInvalidPrinterSettingsError(); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..260b5521dccadf07eba2c67fa3d9c3da80b49104 100644 +index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19544cfe12 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -39,6 +39,7 @@ @@ -657,6 +639,15 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..260b5521dccadf07eba2c67fa3d9c3da notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; +@@ -2350,7 +2380,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( + std::move(params), + base::BindOnce( + [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, +- mojom::PrintPagesParamsPtr input) { ++ mojom::PrintPagesParamsPtr input, bool canceled) { + *output = std::move(input); + std::move(quit_closure).Run(); + }, @@ -2579,18 +2609,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) { } From 4d2968bfc12f4e45642694d1d955af43989dfdf1 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 08:20:06 -0800 Subject: [PATCH 174/268] Bump v18.0.0-alpha.1 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index d8c23d2a23ac7..caf1cac749446 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-nightly.20220201 \ No newline at end of file +18.0.0-alpha.1 \ No newline at end of file diff --git a/package.json b/package.json index 17364c42ece0c..b4336f0a35113 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-nightly.20220201", + "version": "18.0.0-alpha.1", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 0e94c61a98fec..5a9810cf9424e 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,20220201 - PRODUCTVERSION 18,0,0,20220201 + FILEVERSION 18,0,0,1 + PRODUCTVERSION 18,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 907e9c8c0ea203e577d1844d031d00cb1b8b3c20 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 09:27:25 -0800 Subject: [PATCH 175/268] docs: Update E18 release date (#32722) Co-authored-by: Sofia Nguy --- docs/tutorial/electron-timelines.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/tutorial/electron-timelines.md b/docs/tutorial/electron-timelines.md index eacc826928bd7..16418ab398c51 100644 --- a/docs/tutorial/electron-timelines.md +++ b/docs/tutorial/electron-timelines.md @@ -26,4 +26,5 @@ Special notes: | 14.0.0 | -- | 2021-May-27 | 2021-Aug-31 | M93 | v14.17 | | 15.0.0 | 2021-Jul-20 | 2021-Sep-01 | 2021-Sep-21 | M94 | v16.5 | | 16.0.0 | 2021-Sep-23 | 2021-Oct-20 | 2021-Nov-16 | M96 | v16.9 | -| 17.0.0 | 2021-Nov-18 | 2022-Jan-06 | 2022-Feb-01 | M98 | TBD | +| 17.0.0 | 2021-Nov-18 | 2022-Jan-06 | 2022-Feb-01 | M98 | v16.13 | +| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | M100 | TBD | From f7f41fee997d22555c428efb536f3ff09a3c5d8c Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 18:32:37 -0500 Subject: [PATCH 176/268] test: fix failing tests of focus/blur events of WebContents (#32724) Co-authored-by: Cheng Zhao --- docs/api/web-contents.md | 9 +++++++++ spec-main/api-web-contents-spec.ts | 28 ++++++++++++++++------------ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 8bf9d9a8b8062..ac44742ac59c1 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -516,6 +516,15 @@ Emitted when the `WebContents` loses focus. Emitted when the `WebContents` gains focus. +Note that on macOS, having focus means the `WebContents` is the first responder +of window, so switching focus between windows would not trigger the `focus` and +`blur` events of `WebContents`, as the first responder of each window is not +changed. + +The `focus` and `blur` events of `WebContents` should only be used to detect +focus change between different `WebContents` and `BrowserView` in the same +window. + #### Event: 'devtools-opened' Emitted when DevTools is opened. diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index 911947a27e6e0..3d04494a50d1a 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -826,15 +826,20 @@ describe('webContents module', () => { }); }); + const moveFocusToDevTools = async (win: BrowserWindow) => { + const devToolsOpened = emittedOnce(win.webContents, 'devtools-opened'); + win.webContents.openDevTools({ mode: 'right' }); + await devToolsOpened; + win.webContents.devToolsWebContents!.focus(); + }; + describe('focus event', () => { afterEach(closeAllWindows); + it('is triggered when web contents is focused', async () => { const w = new BrowserWindow({ show: false }); await w.loadURL('about:blank'); - const devToolsOpened = emittedOnce(w.webContents, 'devtools-opened'); - w.webContents.openDevTools(); - await devToolsOpened; - w.webContents.devToolsWebContents!.focus(); + await moveFocusToDevTools(w); const focusPromise = emittedOnce(w.webContents, 'focus'); w.webContents.focus(); await expect(focusPromise).to.eventually.be.fulfilled(); @@ -849,16 +854,17 @@ describe('webContents module', () => { window2.loadURL('about:blank') ]); + const focusPromise1 = emittedOnce(window1.webContents, 'focus'); + const focusPromise2 = emittedOnce(window2.webContents, 'focus'); + window1.showInactive(); window2.showInactive(); - let focusPromise = emittedOnce(window1.webContents, 'focus'); window1.focus(); - await expect(focusPromise).to.eventually.be.fulfilled(); + await expect(focusPromise1).to.eventually.be.fulfilled(); - focusPromise = emittedOnce(window2.webContents, 'focus'); window2.focus(); - await expect(focusPromise).to.eventually.be.fulfilled(); + await expect(focusPromise2).to.eventually.be.fulfilled(); }); }); @@ -867,11 +873,9 @@ describe('webContents module', () => { it('is triggered when web contents is blurred', async () => { const w = new BrowserWindow({ show: true }); await w.loadURL('about:blank'); + w.webContents.focus(); const blurPromise = emittedOnce(w.webContents, 'blur'); - const devToolsOpened = emittedOnce(w.webContents, 'devtools-opened'); - w.webContents.openDevTools({ mode: 'detach' }); - await devToolsOpened; - w.webContents.devToolsWebContents!.focus(); + await moveFocusToDevTools(w); await expect(blurPromise).to.eventually.be.fulfilled(); }); }); From 94f4c18d7cdfe7784698902b06c6e35c94e02532 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 21:51:16 +0900 Subject: [PATCH 177/268] fix: some frameless windows showing a frame on Windows (#32714) Co-authored-by: Shelley Vohr --- shell/browser/native_window_views.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 0ba1637fe069a..2c8b8d190d30c 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -329,15 +329,14 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options, // Set Window style so that we get a minimize and maximize animation when // frameless. DWORD frame_style = WS_CAPTION | WS_OVERLAPPED; - if (resizable_) + if (resizable_ && thick_frame_) frame_style |= WS_THICKFRAME; if (minimizable_) frame_style |= WS_MINIMIZEBOX; if (maximizable_) frame_style |= WS_MAXIMIZEBOX; - // We should not show a frame for transparent window. - if (!thick_frame_) - frame_style &= ~(WS_THICKFRAME | WS_CAPTION); + if (!thick_frame_ || !has_frame()) + frame_style &= ~WS_CAPTION; ::SetWindowLong(GetAcceleratedWidget(), GWL_STYLE, frame_style); } From ad2b1364256e551726413248a06a6275cfba16c1 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 09:46:32 -0500 Subject: [PATCH 178/268] fix: WCO window hover on window controls on Windows (#32723) * fix: WCO window hover on window controls * Update shell/browser/ui/win/electron_desktop_window_tree_host_win.cc Co-authored-by: Robo * Trigger Build Co-authored-by: clavin Co-authored-by: Calvin Co-authored-by: Robo Co-authored-by: John Kleinschmidt --- .../electron_desktop_window_tree_host_win.cc | 17 +++++++++++++++++ .../win/electron_desktop_window_tree_host_win.h | 1 + 2 files changed, 18 insertions(+) diff --git a/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc b/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc index 03d0846c7f8f5..16e71fac12b39 100644 --- a/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc +++ b/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc @@ -99,4 +99,21 @@ bool ElectronDesktopWindowTreeHostWin::GetClientAreaInsets( return false; } +bool ElectronDesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { + // Call the default implementation of this method to get the event to its + // proper handler. + bool handled = views::DesktopWindowTreeHostWin::HandleMouseEvent(event); + + // On WCO-enabled windows, we need to mark non-client mouse moved events as + // handled so they don't incorrectly propogate back to the OS. + if (native_window_view_->IsWindowControlsOverlayEnabled() && + event->type() == ui::ET_MOUSE_MOVED && + (event->flags() & ui::EF_IS_NON_CLIENT) != 0) { + event->SetHandled(); + handled = true; + } + + return handled; +} + } // namespace electron diff --git a/shell/browser/ui/win/electron_desktop_window_tree_host_win.h b/shell/browser/ui/win/electron_desktop_window_tree_host_win.h index 3fd831aae1ed0..8c7be1175a193 100644 --- a/shell/browser/ui/win/electron_desktop_window_tree_host_win.h +++ b/shell/browser/ui/win/electron_desktop_window_tree_host_win.h @@ -36,6 +36,7 @@ class ElectronDesktopWindowTreeHostWin bool GetDwmFrameInsetsInPixels(gfx::Insets* insets) const override; bool GetClientAreaInsets(gfx::Insets* insets, HMONITOR monitor) const override; + bool HandleMouseEvent(ui::MouseEvent* event) override; private: NativeWindowViews* native_window_view_; // weak ref From 5b45cb3f77ea3063be74ffa971124343961bbc78 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 7 Feb 2022 06:13:30 -0800 Subject: [PATCH 179/268] Bump v18.0.0-alpha.2 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index caf1cac749446..081b2e72063cf 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-alpha.1 \ No newline at end of file +18.0.0-alpha.2 \ No newline at end of file diff --git a/package.json b/package.json index b4336f0a35113..040379329d556 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-alpha.1", + "version": "18.0.0-alpha.2", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 5a9810cf9424e..3690e60087416 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,1 - PRODUCTVERSION 18,0,0,1 + FILEVERSION 18,0,0,2 + PRODUCTVERSION 18,0,0,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From f72efecf957988bb4861a0664eb42cc5fae10470 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 12:59:45 +0100 Subject: [PATCH 180/268] test: improve webContents.savePage() specs (#32745) Co-authored-by: Shelley Vohr --- spec-main/api-browser-window-spec.ts | 31 ++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index b1613fea6dce2..c181cb4f29b44 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3419,20 +3419,39 @@ describe('BrowserWindow module', () => { const savePageJsPath = path.join(savePageDir, 'save_page_files', 'test.js'); const savePageCssPath = path.join(savePageDir, 'save_page_files', 'test.css'); - after(() => { + afterEach(() => { + closeAllWindows(); + try { fs.unlinkSync(savePageCssPath); fs.unlinkSync(savePageJsPath); fs.unlinkSync(savePageHtmlPath); fs.rmdirSync(path.join(savePageDir, 'save_page_files')); fs.rmdirSync(savePageDir); - } catch (e) { - // Ignore error - } + } catch {} + }); + + it('should save page to disk with HTMLOnly', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadFile(path.join(fixtures, 'pages', 'save_page', 'index.html')); + await w.webContents.savePage(savePageHtmlPath, 'HTMLOnly'); + + expect(fs.existsSync(savePageHtmlPath)).to.be.true('html path'); + expect(fs.existsSync(savePageJsPath)).to.be.false('js path'); + expect(fs.existsSync(savePageCssPath)).to.be.false('css path'); + }); + + it('should save page to disk with MHTML', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadFile(path.join(fixtures, 'pages', 'save_page', 'index.html')); + await w.webContents.savePage(savePageHtmlPath, 'MHTML'); + + expect(fs.existsSync(savePageHtmlPath)).to.be.true('html path'); + expect(fs.existsSync(savePageJsPath)).to.be.false('js path'); + expect(fs.existsSync(savePageCssPath)).to.be.false('css path'); }); - afterEach(closeAllWindows); - it('should save page to disk', async () => { + it('should save page to disk with HTMLComplete', async () => { const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(fixtures, 'pages', 'save_page', 'index.html')); await w.webContents.savePage(savePageHtmlPath, 'HTMLComplete'); From 9d8dde5c76f9455fdfbb679f2277d213e3f3b17e Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 12:59:17 -0600 Subject: [PATCH 181/268] docs: clarify meaning of cssOrigin (#32810) Co-authored-by: Jeremy Rose --- docs/api/web-contents.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index ac44742ac59c1..6073f165e8f2f 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -1101,7 +1101,7 @@ Returns `string` - The user agent for this web page. * `css` string * `options` Object (optional) - * `cssOrigin` string (optional) - Can be either 'user' or 'author'; Specifying 'user' enables you to prevent websites from overriding the CSS you insert. Default is 'author'. + * `cssOrigin` string (optional) - Can be either 'user' or 'author'. Sets the [cascade origin](https://www.w3.org/TR/css3-cascade/#cascade-origin) of the inserted stylesheet. Default is 'author'. Returns `Promise` - A promise that resolves with a key for the inserted CSS that can later be used to remove the CSS via `contents.removeInsertedCSS(key)`. From 2871698148bd5d1ef3075369de3088cfc46be3cc Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 11:12:29 -0500 Subject: [PATCH 182/268] build: rebuild the `dist_zip`s when the deps get modified (#32820) * build: rebuild the dist_zips when the deps get modified The dist.zip generated by the electron_dist_zip action was not getting updated when changes were being made to the dependencies, like the source files. It turns out, we were using data_deps for the dependencies instead of deps. Here is the difference: data_deps: things needed to ultimately run the thing built by a target deps: things needed to build the target So the difference in treatment of both sets of dependencies is actually intentional. Signed-off-by: Darshan Sen * fixup! build: rebuild the dist_zips when the deps get modified Signed-off-by: Darshan Sen Co-authored-by: Darshan Sen --- BUILD.gn | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 3aa40b4855f8e..a2d9691301c2e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1401,11 +1401,13 @@ dist_zip("electron_dist_zip") { if (is_linux) { data_deps += [ "//sandbox/linux:chrome_sandbox" ] } + deps = data_deps outputs = [ "$root_build_dir/dist.zip" ] } dist_zip("electron_ffmpeg_zip") { data_deps = [ "//third_party/ffmpeg" ] + deps = data_deps outputs = [ "$root_build_dir/ffmpeg.zip" ] } @@ -1423,6 +1425,7 @@ group("electron_chromedriver") { dist_zip("electron_chromedriver_zip") { testonly = true data_deps = electron_chromedriver_deps + deps = data_deps outputs = [ "$root_build_dir/chromedriver.zip" ] } @@ -1441,6 +1444,7 @@ group("electron_mksnapshot") { dist_zip("electron_mksnapshot_zip") { data_deps = mksnapshot_deps + deps = data_deps outputs = [ "$root_build_dir/mksnapshot.zip" ] } @@ -1451,6 +1455,7 @@ copy("hunspell_dictionaries") { dist_zip("hunspell_dictionaries_zip") { data_deps = [ ":hunspell_dictionaries" ] + deps = data_deps flatten = true outputs = [ "$root_build_dir/hunspell_dictionaries.zip" ] @@ -1464,6 +1469,7 @@ copy("libcxx_headers") { dist_zip("libcxx_headers_zip") { data_deps = [ ":libcxx_headers" ] + deps = data_deps flatten = true flatten_relative_to = rebase_path( "$target_gen_dir/electron_libcxx_include/buildtools/third_party/libc++/trunk", @@ -1479,6 +1485,7 @@ copy("libcxxabi_headers") { dist_zip("libcxxabi_headers_zip") { data_deps = [ ":libcxxabi_headers" ] + deps = data_deps flatten = true flatten_relative_to = rebase_path( "$target_gen_dir/electron_libcxxabi_include/buildtools/third_party/libc++abi/trunk", From 36008e0deac7151a6ee862a5ee436428df62bc17 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 9 Feb 2022 12:00:38 -0600 Subject: [PATCH 183/268] test: disable the test that makes spec runner hang on exit (#32838) Co-authored-by: Cheng Zhao --- spec/chromium-spec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 86737f78860a1..afcc2b668a756 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -8,7 +8,7 @@ const ChildProcess = require('child_process'); const { ipcRenderer } = require('electron'); const { emittedOnce, waitForEvent } = require('./events-helpers'); const { resolveGetters } = require('./expect-helpers'); -const { ifdescribe, delay } = require('./spec-helpers'); +const { ifit, ifdescribe, delay } = require('./spec-helpers'); const features = process._linkedBinding('electron_common_features'); /* Most of the APIs here don't use standard callbacks */ @@ -81,7 +81,8 @@ describe('chromium feature', () => { expect(event.data).to.equal(`size: ${width} ${height}`); }); - it('disables node integration when it is disabled on the parent window', async () => { + // FIXME(zcbenz): This test is making the spec runner hang on exit on Windows. + ifit(process.platform !== 'win32')('disables node integration when it is disabled on the parent window', async () => { const windowUrl = require('url').format({ pathname: `${fixtures}/pages/window-opener-no-node-integration.html`, protocol: 'file', From 493751b321dbf3c6fb4203d2961ebbd249a386de Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 20:34:11 +0900 Subject: [PATCH 184/268] Make ElectronBrowser mojo interface frame associated. (#32851) Co-authored-by: Marek Haranczyk --- shell/browser/electron_browser_client.cc | 21 ++++++++++++------- .../browser/electron_browser_handler_impl.cc | 4 ++-- shell/browser/electron_browser_handler_impl.h | 9 ++++---- .../renderer/api/electron_api_ipc_renderer.cc | 9 ++++---- shell/renderer/api/electron_api_web_frame.cc | 14 ++++++------- .../electron_render_frame_observer.cc | 13 ++++++------ 6 files changed, 38 insertions(+), 32 deletions(-) diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 6f2a2f9a8fc19..dfc0043bd25ae 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -1450,6 +1450,12 @@ bool ElectronBrowserClient::PreSpawnChild(sandbox::TargetPolicy* policy, } #endif // defined(OS_WIN) +void BindElectronBrowser( + mojo::PendingAssociatedReceiver receiver, + content::RenderFrameHost* frame_host) { + ElectronBrowserHandlerImpl::Create(frame_host, std::move(receiver)); +} + bool ElectronBrowserClient::BindAssociatedReceiverFromFrame( content::RenderFrameHost* render_frame_host, const std::string& interface_name, @@ -1461,6 +1467,13 @@ bool ElectronBrowserClient::BindAssociatedReceiverFromFrame( render_frame_host); return true; } + if (interface_name == electron::mojom::ElectronBrowser::Name_) { + BindElectronBrowser( + mojo::PendingAssociatedReceiver( + std::move(*handle)), + render_frame_host); + return true; + } #if BUILDFLAG(ENABLE_PRINTING) if (interface_name == printing::mojom::PrintManagerHost::Name_) { mojo::PendingAssociatedReceiver receiver( @@ -1522,12 +1535,6 @@ void ElectronBrowserClient::BindHostReceiverForRenderer( #endif } -void BindElectronBrowser( - content::RenderFrameHost* frame_host, - mojo::PendingReceiver receiver) { - ElectronBrowserHandlerImpl::Create(frame_host, std::move(receiver)); -} - #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) void BindMimeHandlerService( content::RenderFrameHost* frame_host, @@ -1576,8 +1583,6 @@ void ElectronBrowserClient::RegisterBrowserInterfaceBindersForFrame( base::BindRepeating(&BindNetworkHintsHandler)); map->Add( base::BindRepeating(&badging::BadgeManager::BindFrameReceiver)); - map->Add( - base::BindRepeating(&BindElectronBrowser)); map->Add(base::BindRepeating( &content::KeyboardLockServiceImpl::CreateMojoService)); #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS) diff --git a/shell/browser/electron_browser_handler_impl.cc b/shell/browser/electron_browser_handler_impl.cc index 665d2b2897b3c..e66968b0cb132 100644 --- a/shell/browser/electron_browser_handler_impl.cc +++ b/shell/browser/electron_browser_handler_impl.cc @@ -15,7 +15,7 @@ namespace electron { ElectronBrowserHandlerImpl::ElectronBrowserHandlerImpl( content::RenderFrameHost* frame_host, - mojo::PendingReceiver receiver) + mojo::PendingAssociatedReceiver receiver) : render_process_id_(frame_host->GetProcess()->GetID()), render_frame_id_(frame_host->GetRoutingID()) { content::WebContents* web_contents = @@ -135,7 +135,7 @@ content::RenderFrameHost* ElectronBrowserHandlerImpl::GetRenderFrameHost() { // static void ElectronBrowserHandlerImpl::Create( content::RenderFrameHost* frame_host, - mojo::PendingReceiver receiver) { + mojo::PendingAssociatedReceiver receiver) { new ElectronBrowserHandlerImpl(frame_host, std::move(receiver)); } } // namespace electron diff --git a/shell/browser/electron_browser_handler_impl.h b/shell/browser/electron_browser_handler_impl.h index f37cd56b7cd81..fea3f11907d1d 100644 --- a/shell/browser/electron_browser_handler_impl.h +++ b/shell/browser/electron_browser_handler_impl.h @@ -23,10 +23,11 @@ class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser, public: explicit ElectronBrowserHandlerImpl( content::RenderFrameHost* render_frame_host, - mojo::PendingReceiver receiver); + mojo::PendingAssociatedReceiver receiver); - static void Create(content::RenderFrameHost* frame_host, - mojo::PendingReceiver receiver); + static void Create( + content::RenderFrameHost* frame_host, + mojo::PendingAssociatedReceiver receiver); // disable copy ElectronBrowserHandlerImpl(const ElectronBrowserHandlerImpl&) = delete; @@ -75,7 +76,7 @@ class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser, const int render_process_id_; const int render_frame_id_; - mojo::Receiver receiver_{this}; + mojo::AssociatedReceiver receiver_{this}; base::WeakPtrFactory weak_factory_{this}; }; diff --git a/shell/renderer/api/electron_api_ipc_renderer.cc b/shell/renderer/api/electron_api_ipc_renderer.cc index 74bf0e1dccc05..6b4f2698a968a 100644 --- a/shell/renderer/api/electron_api_ipc_renderer.cc +++ b/shell/renderer/api/electron_api_ipc_renderer.cc @@ -22,7 +22,7 @@ #include "shell/common/node_bindings.h" #include "shell/common/node_includes.h" #include "shell/common/v8_value_serializer.h" -#include "third_party/blink/public/common/browser_interface_broker_proxy.h" +#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/web/web_local_frame.h" #include "third_party/blink/public/web/web_message_port_converter.h" @@ -59,8 +59,8 @@ class IPCRenderer : public gin::Wrappable, v8::Global(isolate, isolate->GetCurrentContext()); weak_context_.SetWeak(); - render_frame->GetBrowserInterfaceBroker()->GetInterface( - electron_browser_remote_.BindNewPipeAndPassReceiver()); + render_frame->GetRemoteAssociatedInterfaces()->GetInterface( + &electron_browser_remote_); } void OnDestruct() override { electron_browser_remote_.reset(); } @@ -223,7 +223,8 @@ class IPCRenderer : public gin::Wrappable, } v8::Global weak_context_; - mojo::Remote electron_browser_remote_; + mojo::AssociatedRemote + electron_browser_remote_; }; gin::WrapperInfo IPCRenderer::kWrapperInfo = {gin::kEmbedderNativeGin}; diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index 14c0a7ac08276..25d2b5433b680 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -34,7 +34,7 @@ #include "shell/renderer/api/electron_api_context_bridge.h" #include "shell/renderer/api/electron_api_spell_check_client.h" #include "shell/renderer/renderer_client_base.h" -#include "third_party/blink/public/common/browser_interface_broker_proxy.h" +#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/page/page_zoom.h" #include "third_party/blink/public/common/web_cache/web_cache_resource_type_stats.h" #include "third_party/blink/public/common/web_preferences/web_preferences.h" @@ -453,9 +453,9 @@ class WebFrameRenderer : public gin::Wrappable, if (!MaybeGetRenderFrame(isolate, "setZoomLevel", &render_frame)) return; - mojo::Remote browser_remote; - render_frame->GetBrowserInterfaceBroker()->GetInterface( - browser_remote.BindNewPipeAndPassReceiver()); + mojo::AssociatedRemote browser_remote; + render_frame->GetRemoteAssociatedInterfaces()->GetInterface( + &browser_remote); browser_remote->SetTemporaryZoomLevel(level); } @@ -465,9 +465,9 @@ class WebFrameRenderer : public gin::Wrappable, if (!MaybeGetRenderFrame(isolate, "getZoomLevel", &render_frame)) return result; - mojo::Remote browser_remote; - render_frame->GetBrowserInterfaceBroker()->GetInterface( - browser_remote.BindNewPipeAndPassReceiver()); + mojo::AssociatedRemote browser_remote; + render_frame->GetRemoteAssociatedInterfaces()->GetInterface( + &browser_remote); browser_remote->DoGetZoomLevel(&result); return result; } diff --git a/shell/renderer/electron_render_frame_observer.cc b/shell/renderer/electron_render_frame_observer.cc index 4947ac06f6559..ba1a122868c64 100644 --- a/shell/renderer/electron_render_frame_observer.cc +++ b/shell/renderer/electron_render_frame_observer.cc @@ -22,7 +22,7 @@ #include "shell/common/options_switches.h" #include "shell/common/world_ids.h" #include "shell/renderer/renderer_client_base.h" -#include "third_party/blink/public/common/browser_interface_broker_proxy.h" +#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/web_preferences/web_preferences.h" #include "third_party/blink/public/platform/web_isolated_world_info.h" #include "third_party/blink/public/web/blink.h" @@ -149,9 +149,8 @@ void ElectronRenderFrameObserver::DraggableRegionsChanged() { regions.push_back(std::move(region)); } - mojo::Remote browser_remote; - render_frame_->GetBrowserInterfaceBroker()->GetInterface( - browser_remote.BindNewPipeAndPassReceiver()); + mojo::AssociatedRemote browser_remote; + render_frame_->GetRemoteAssociatedInterfaces()->GetInterface(&browser_remote); browser_remote->UpdateDraggableRegions(std::move(regions)); } @@ -169,9 +168,9 @@ void ElectronRenderFrameObserver::OnDestruct() { void ElectronRenderFrameObserver::DidMeaningfulLayout( blink::WebMeaningfulLayout layout_type) { if (layout_type == blink::WebMeaningfulLayout::kVisuallyNonEmpty) { - mojo::Remote browser_remote; - render_frame_->GetBrowserInterfaceBroker()->GetInterface( - browser_remote.BindNewPipeAndPassReceiver()); + mojo::AssociatedRemote browser_remote; + render_frame_->GetRemoteAssociatedInterfaces()->GetInterface( + &browser_remote); browser_remote->OnFirstNonEmptyLayout(); } } From 87590da2fb40e90da34c61014cb29756779df4d6 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 07:44:33 -0800 Subject: [PATCH 185/268] Bump v18.0.0-alpha.3 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 081b2e72063cf..ea5af15de95c4 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-alpha.2 \ No newline at end of file +18.0.0-alpha.3 \ No newline at end of file diff --git a/package.json b/package.json index 040379329d556..47d00849fd1b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-alpha.2", + "version": "18.0.0-alpha.3", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 3690e60087416..bcec1aa3ba1a1 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,2 - PRODUCTVERSION 18,0,0,2 + FILEVERSION 18,0,0,3 + PRODUCTVERSION 18,0,0,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 2b97ff3fbaf80e133d4b003589cb178a689d97a2 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 15 Feb 2022 14:36:39 -0800 Subject: [PATCH 186/268] docs: fix relative link in developer documentation (#32922) Co-authored-by: Erick Zhao --- docs/development/pull-requests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/pull-requests.md b/docs/development/pull-requests.md index 492b3caa6afd2..fa4b6dfbdf19b 100644 --- a/docs/development/pull-requests.md +++ b/docs/development/pull-requests.md @@ -180,7 +180,7 @@ $ git push origin my-branch ### Step 9: Opening the Pull Request From within GitHub, opening a new pull request will present you with a template -that should be filled out. It can be found [here](../../.github/PULL_REQUEST_TEMPLATE.md). +that should be filled out. It can be found [here](https://github.com/electron/electron/blob/main/.github/PULL_REQUEST_TEMPLATE.md). If you do not adequately complete this template, your PR may be delayed in being merged as maintainers seek more information or clarify ambiguities. From 0012e01c8684c03266739b9acf9708e1c9654ab4 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 10:21:31 +0900 Subject: [PATCH 187/268] docs: update checklists (#32931) Co-authored-by: Erick Zhao --- docs/tutorial/performance.md | 66 ++++---- docs/tutorial/security.md | 297 +++++++++++++++++++---------------- 2 files changed, 195 insertions(+), 168 deletions(-) diff --git a/docs/tutorial/performance.md b/docs/tutorial/performance.md index 99fefa7a4d460..f1648769ef4f1 100644 --- a/docs/tutorial/performance.md +++ b/docs/tutorial/performance.md @@ -1,3 +1,11 @@ +--- +title: Performance +description: A set of guidelines for building performant Electron apps +slug: performance +hide_title: true +toc_max_heading_level: 3 +--- + # Performance Developers frequently ask about strategies to optimize the performance of @@ -49,7 +57,7 @@ at once, consider the [Chrome Tracing](https://www.chromium.org/developers/how-t * [Get Started With Analyzing Runtime Performance][chrome-devtools-tutorial] * [Talk: "Visual Studio Code - The First Second"][vscode-first-second] -## Checklist +## Checklist: Performance recommendations Chances are that your app could be a little leaner, faster, and generally less resource-hungry if you attempt these steps. @@ -62,7 +70,7 @@ resource-hungry if you attempt these steps. 6. [Unnecessary or blocking network requests](#6-unnecessary-or-blocking-network-requests) 7. [Bundle your code](#7-bundle-your-code) -## 1) Carelessly including modules +### 1. Carelessly including modules Before adding a Node.js module to your application, examine said module. How many dependencies does that module include? What kind of resources does @@ -70,7 +78,7 @@ it need to simply be called in a `require()` statement? You might find that the module with the most downloads on the NPM package registry or the most stars on GitHub is not in fact the leanest or smallest one available. -### Why? +#### Why? The reasoning behind this recommendation is best illustrated with a real-world example. During the early days of Electron, reliable detection of network @@ -99,7 +107,7 @@ running Linux might be bad news for your app's performance. In this particular example, the correct solution was to use no module at all, and to instead use connectivity checks included in later versions of Chromium. -### How? +#### How? When considering a module, we recommend that you check: @@ -128,7 +136,7 @@ In this example, on the author's machine, we saw that loading `request` took almost half a second, whereas `node-fetch` took dramatically less memory and less than 50ms. -## 2) Loading and running code too soon +### 2. Loading and running code too soon If you have expensive setup operations, consider deferring those. Inspect all the work being executed right after the application starts. Instead of firing @@ -141,7 +149,7 @@ using the same strategy _and_ are using sizable modules that you do not immediately need, apply the same strategy and defer loading to a more opportune time. -### Why? +#### Why? Loading modules is a surprisingly expensive operation, especially on Windows. When your app starts, it should not make users wait for operations that are @@ -157,14 +165,14 @@ immediately display the file to you without any code highlighting, prioritizing your ability to interact with the text. Once it has done that work, it will move on to code highlighting. -### How? +#### How? Let's consider an example and assume that your application is parsing files in the fictitious `.foo` format. In order to do that, it relies on the equally fictitious `foo-parser` module. In traditional Node.js development, you might write code that eagerly loads dependencies: -```js +```js title='parser.js' const fs = require('fs') const fooParser = require('foo-parser') @@ -187,7 +195,7 @@ In the above example, we're doing a lot of work that's being executed as soon as the file is loaded. Do we need to get parsed files right away? Could we do this work a little later, when `getParsedFiles()` is actually called? -```js +```js title='parser.js' // "fs" is likely already being loaded, so the `require()` call is cheap const fs = require('fs') @@ -223,7 +231,7 @@ module.exports = { parser } In short, allocate resources "just in time" rather than allocating them all when your app starts. -## 3) Blocking the main process +### 3. Blocking the main process Electron's main process (sometimes called "browser process") is special: It is the parent process to all your app's other processes and the primary process @@ -235,7 +243,7 @@ Under no circumstances should you block this process and the UI thread with long-running operations. Blocking the UI thread means that your entire app will freeze until the main process is ready to continue processing. -### Why? +#### Why? The main process and its UI thread are essentially the control tower for major operations inside your app. When the operating system tells your app about a @@ -246,31 +254,31 @@ the GPU process about that – once again going through the main process. Electron and Chromium are careful to put heavy disk I/O and CPU-bound operations onto new threads to avoid blocking the UI thread. You should do the same. -### How? +#### How? Electron's powerful multi-process architecture stands ready to assist you with your long-running tasks, but also includes a small number of performance traps. -1) For long running CPU-heavy tasks, make use of +1. For long running CPU-heavy tasks, make use of [worker threads][worker-threads], consider moving them to the BrowserWindow, or (as a last resort) spawn a dedicated process. -2) Avoid using the synchronous IPC and the `remote` module as much as possible. -While there are legitimate use cases, it is far too easy to unknowingly block -the UI thread using the `remote` module. +2. Avoid using the synchronous IPC and the `@electron/remote` module as much +as possible. While there are legitimate use cases, it is far too easy to +unknowingly block the UI thread. -3) Avoid using blocking I/O operations in the main process. In short, whenever +3. Avoid using blocking I/O operations in the main process. In short, whenever core Node.js modules (like `fs` or `child_process`) offer a synchronous or an asynchronous version, you should prefer the asynchronous and non-blocking variant. -## 4) Blocking the renderer process +### 4. Blocking the renderer process Since Electron ships with a current version of Chrome, you can make use of the latest and greatest features the Web Platform offers to defer or offload heavy operations in a way that keeps your app smooth and responsive. -### Why? +#### Why? Your app probably has a lot of JavaScript to run in the renderer process. The trick is to execute operations as quickly as possible without taking away @@ -280,7 +288,7 @@ at 60fps. Orchestrating the flow of operations in your renderer's code is particularly useful if users complain about your app sometimes "stuttering". -### How? +#### How? Generally speaking, all advice for building performant web apps for modern browsers apply to Electron's renderers, too. The two primary tools at your @@ -300,14 +308,14 @@ some caveats to consider – consult Electron's for any operation that requires a lot of CPU power for an extended period of time. -## 5) Unnecessary polyfills +### 5. Unnecessary polyfills One of Electron's great benefits is that you know exactly which engine will parse your JavaScript, HTML, and CSS. If you're re-purposing code that was written for the web at large, make sure to not polyfill features included in Electron. -### Why? +#### Why? When building a web application for today's Internet, the oldest environments dictate what features you can and cannot use. Even though Electron supports @@ -323,7 +331,7 @@ It is rare for a JavaScript-based polyfill to be faster than the equivalent native feature in Electron. Do not slow down your Electron app by shipping your own version of standard web platform features. -### How? +#### How? Operate under the assumption that polyfills in current versions of Electron are unnecessary. If you have doubts, check [caniuse.com](https://caniuse.com/) @@ -338,12 +346,12 @@ If you're using a transpiler/compiler like TypeScript, examine its configuration and ensure that you're targeting the latest ECMAScript version supported by Electron. -## 6) Unnecessary or blocking network requests +### 6. Unnecessary or blocking network requests Avoid fetching rarely changing resources from the internet if they could easily be bundled with your application. -### Why? +#### Why? Many users of Electron start with an entirely web-based app that they're turning into a desktop application. As web developers, we are used to loading @@ -360,7 +368,7 @@ will take care of the rest. When building an Electron app, your users are better served if you download the fonts and include them in your app's bundle. -### How? +#### How? In an ideal world, your application wouldn't need the network to operate at all. To get there, you must understand what resources your app is downloading @@ -387,21 +395,21 @@ without shipping an application update is a powerful strategy. For advanced control over how resources are being loaded, consider investing in [Service Workers][service-workers]. -## 7) Bundle your code +### 7. Bundle your code As already pointed out in "[Loading and running code too soon](#2-loading-and-running-code-too-soon)", calling `require()` is an expensive operation. If you are able to do so, bundle your application's code into a single file. -### Why? +#### Why? Modern JavaScript development usually involves many files and modules. While that's perfectly fine for developing with Electron, we heavily recommend that you bundle all your code into one single file to ensure that the overhead included in calling `require()` is only paid once when your application loads. -### How? +#### How? There are numerous JavaScript bundlers out there and we know better than to anger the community by recommending one tool over another. We do however diff --git a/docs/tutorial/security.md b/docs/tutorial/security.md index 1fd876827bd40..688dda5a68961 100644 --- a/docs/tutorial/security.md +++ b/docs/tutorial/security.md @@ -1,6 +1,24 @@ -# Security, Native Capabilities, and Your Responsibility +--- +title: Security +description: A set of guidelines for building secure Electron apps +slug: security +hide_title: true +toc_max_heading_level: 3 +--- +# Security + +:::info Reporting security issues +For information on how to properly disclose an Electron vulnerability, +see [SECURITY.md](https://github.com/electron/electron/tree/main/SECURITY.md). + +For upstream Chromium vulnerabilities: Electron keeps up to date with alternating +Chromium releases. For more information, see the +[Electron Release Timelines](../tutorial/electron-timelines.md) document. +::: + +## Preface -As web developers, we usually enjoy the strong security net of the browser - +As web developers, we usually enjoy the strong security net of the browser — the risks associated with the code we write are relatively small. Our websites are granted limited powers in a sandbox, and we trust that our users enjoy a browser built by a large team of engineers that is able to quickly respond to @@ -17,20 +35,12 @@ With that in mind, be aware that displaying arbitrary content from untrusted sources poses a severe security risk that Electron is not intended to handle. In fact, the most popular Electron apps (Atom, Slack, Visual Studio Code, etc) display primarily local content (or trusted, secure remote content without Node -integration) – if your application executes code from an online source, it is +integration) — if your application executes code from an online source, it is your responsibility to ensure that the code is not malicious. -## Reporting Security Issues - -For information on how to properly disclose an Electron vulnerability, -see [SECURITY.md](https://github.com/electron/electron/tree/main/SECURITY.md) - -## Chromium Security Issues and Upgrades +## General guidelines -Electron keeps up to date with alternating Chromium releases. For more information, -see the [Electron Release Cadence blog post](https://electronjs.org/blog/12-week-cadence). - -## Security Is Everyone's Responsibility +### Security is everyone's responsibility It is important to remember that the security of your Electron application is the result of the overall security of the framework foundation @@ -56,7 +66,7 @@ is your own code. Common web vulnerabilities, such as Cross-Site Scripting (XSS) have a higher security impact on Electron applications hence it is highly recommended to adopt secure software development best practices and perform security testing. -## Isolation For Untrusted Content +### Isolation for untrusted content A security issue exists whenever you receive code from an untrusted source (e.g. a remote server) and execute it locally. As an example, consider a remote @@ -65,72 +75,74 @@ an attacker somehow manages to change said content (either by attacking the source directly, or by sitting between your app and the actual destination), they will be able to execute native code on the user's machine. -> :warning: Under no circumstances should you load and execute remote code with +:::warning +Under no circumstances should you load and execute remote code with Node.js integration enabled. Instead, use only local files (packaged together with your application) to execute Node.js code. To display remote content, use the [``][webview-tag] tag or [`BrowserView`][browser-view], make sure to disable the `nodeIntegration` and enable `contextIsolation`. +::: -## Electron Security Warnings - -From Electron 2.0 on, developers will see warnings and recommendations printed -to the developer console. They only show up when the binary's name is Electron, -indicating that a developer is currently looking at the console. +:::info Electron security warnings +Security warnings and recommendations are printed to the developer console. +They only show up when the binary's name is Electron, indicating that a developer +is currently looking at the console. You can force-enable or force-disable these warnings by setting `ELECTRON_ENABLE_SECURITY_WARNINGS` or `ELECTRON_DISABLE_SECURITY_WARNINGS` on either `process.env` or the `window` object. +::: -## Checklist: Security Recommendations +## Checklist: Security recommendations You should at least follow these steps to improve the security of your application: 1. [Only load secure content](#1-only-load-secure-content) 2. [Disable the Node.js integration in all renderers that display remote content](#2-do-not-enable-nodejs-integration-for-remote-content) 3. [Enable context isolation in all renderers that display remote content](#3-enable-context-isolation-for-remote-content) -4. [Enable sandboxing](#4-enable-sandboxing) +4. [Enable process sandboxing](#4-enable-process-sandboxing) 5. [Use `ses.setPermissionRequestHandler()` in all sessions that load remote content](#5-handle-session-permission-requests-from-remote-content) 6. [Do not disable `webSecurity`](#6-do-not-disable-websecurity) 7. [Define a `Content-Security-Policy`](#7-define-a-content-security-policy) and use restrictive rules (i.e. `script-src 'self'`) -8. [Do not set `allowRunningInsecureContent` to `true`](#8-do-not-set-allowrunninginsecurecontent-to-true) +8. [Do not enable `allowRunningInsecureContent`](#8-do-not-enable-allowrunninginsecurecontent) 9. [Do not enable experimental features](#9-do-not-enable-experimental-features) 10. [Do not use `enableBlinkFeatures`](#10-do-not-use-enableblinkfeatures) -11. [``: Do not use `allowpopups`](#11-do-not-use-allowpopups) +11. [``: Do not use `allowpopups`](#11-do-not-use-allowpopups-for-webviews) 12. [``: Verify options and params](#12-verify-webview-options-before-creation) 13. [Disable or limit navigation](#13-disable-or-limit-navigation) 14. [Disable or limit creation of new windows](#14-disable-or-limit-creation-of-new-windows) -15. [Do not use `openExternal` with untrusted content](#15-do-not-use-openexternal-with-untrusted-content) +15. [Do not use `shell.openExternal` with untrusted content](#15-do-not-use-shellopenexternal-with-untrusted-content) 16. [Use a current version of Electron](#16-use-a-current-version-of-electron) To automate the detection of misconfigurations and insecure patterns, it is possible to use -[electronegativity](https://github.com/doyensec/electronegativity). For +[Electronegativity](https://github.com/doyensec/electronegativity). For additional details on potential weaknesses and implementation bugs when developing applications using Electron, please refer to this [guide for -developers and auditors](https://doyensec.com/resources/us-17-Carettoni-Electronegativity-A-Study-Of-Electron-Security-wp.pdf) +developers and auditors](https://doyensec.com/resources/us-17-Carettoni-Electronegativity-A-Study-Of-Electron-Security-wp.pdf). -## 1) Only Load Secure Content +### 1. Only load secure content Any resources not included with your application should be loaded using a secure protocol like `HTTPS`. In other words, do not use insecure protocols like `HTTP`. Similarly, we recommend the use of `WSS` over `WS`, `FTPS` over `FTP`, and so on. -### Why? +#### Why? `HTTPS` has three main benefits: -1) It authenticates the remote server, ensuring your app connects to the correct +1. It authenticates the remote server, ensuring your app connects to the correct host instead of an impersonator. -2) It ensures data integrity, asserting that the data was not modified while in +1. It ensures data integrity, asserting that the data was not modified while in transit between your application and the host. -3) It encrypts the traffic between your user and the destination host, making it +1. It encrypts the traffic between your user and the destination host, making it more difficult to eavesdrop on the information sent between your app and the host. -### How? +#### How? -```js +```js title='main.js (Main Process)' // Bad browserWindow.loadURL('http://example.com') @@ -138,7 +150,7 @@ browserWindow.loadURL('http://example.com') browserWindow.loadURL('https://example.com') ``` -```html +```html title='index.html (Renderer Process)' @@ -148,9 +160,11 @@ browserWindow.loadURL('https://example.com') ``` -## 2) Do not enable Node.js Integration for Remote Content +### 2. Do not enable Node.js integration for remote content -_This recommendation is the default behavior in Electron since 5.0.0._ +:::info +This recommendation is the default behavior in Electron since 5.0.0. +::: It is paramount that you do not enable Node.js integration in any renderer ([`BrowserWindow`][browser-window], [`BrowserView`][browser-view], or @@ -163,7 +177,7 @@ After this, you can grant additional permissions for specific hosts. For example if you are opening a BrowserWindow pointed at `https://example.com/`, you can give that website exactly the abilities it needs, but no more. -### Why? +#### Why? A cross-site-scripting (XSS) attack is more dangerous if an attacker can jump out of the renderer process and execute code on the user's computer. @@ -172,12 +186,13 @@ power is usually limited to messing with the website that they are executed on. Disabling Node.js integration helps prevent an XSS from being escalated into a so-called "Remote Code Execution" (RCE) attack. -### How? +#### How? -```js +```js title='main.js (Main Process)' // Bad const mainWindow = new BrowserWindow({ webPreferences: { + contextIsolation: false, nodeIntegration: true, nodeIntegrationInWorker: true } @@ -186,7 +201,7 @@ const mainWindow = new BrowserWindow({ mainWindow.loadURL('https://example.com') ``` -```js +```js title='main.js (Main Process)' // Good const mainWindow = new BrowserWindow({ webPreferences: { @@ -197,7 +212,7 @@ const mainWindow = new BrowserWindow({ mainWindow.loadURL('https://example.com') ``` -```html +```html title='index.html (Renderer Process)' @@ -208,21 +223,13 @@ mainWindow.loadURL('https://example.com') When disabling Node.js integration, you can still expose APIs to your website that do consume Node.js modules or features. Preload scripts continue to have access to `require` and other Node.js features, allowing developers to expose a custom -API to remotely loaded content. - -In the following example preload script, the later loaded website will have -access to a `window.readConfig()` method, but no Node.js features. +API to remotely loaded content via the [contextBridge API](../api/context-bridge.md). -```js -const { readFileSync } = require('fs') - -window.readConfig = () => { - const data = readFileSync('./config.json') - return data -} -``` +### 3. Enable Context Isolation for remote content -## 3) Enable Context Isolation for Remote Content +:::info +This recommendation is the default behavior in Electron since 12.0.0. +::: Context isolation is an Electron feature that allows developers to run code in preload scripts and in Electron APIs in a dedicated JavaScript context. In @@ -235,48 +242,42 @@ to enable this behavior. Even when `nodeIntegration: false` is used, to truly enforce strong isolation and prevent the use of Node primitives `contextIsolation` **must** also be used. -### Why & How? - +:::info For more information on what `contextIsolation` is and how to enable it please see our dedicated [Context Isolation](context-isolation.md) document. +:::info -## 4) Enable Sandboxing +### 4. Enable process sandboxing -[Sandboxing](sandbox.md) is a Chromium feature that uses the operating system to +[Sandboxing](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/design/sandbox.md) +is a Chromium feature that uses the operating system to significantly limit what renderer processes have access to. You should enable the sandbox in all renderers. Loading, reading or processing any untrusted content in an unsandboxed process, including the main process, is not advised. -### How? - -When creating a window, pass the `sandbox: true` option in `webPreferences`: - -```js -const win = new BrowserWindow({ - webPreferences: { - sandbox: true - } -}) -``` +:::info +For more information on what `contextIsolation` is and how to enable it please +see our dedicated [Process Sandboxing](sandbox.md) document. +:::info -## 5) Handle Session Permission Requests From Remote Content +### 5. Handle session permission requests from remote content -You may have seen permission requests while using Chrome: They pop up whenever +You may have seen permission requests while using Chrome: they pop up whenever the website attempts to use a feature that the user has to manually approve ( like notifications). The API is based on the [Chromium permissions API](https://developer.chrome.com/extensions/permissions) and implements the same types of permissions. -### Why? +#### Why? By default, Electron will automatically approve all permission requests unless the developer has manually configured a custom handler. While a solid default, security-conscious developers might want to assume the very opposite. -### How? +#### How? -```js +```js title='main.js (Main Process)' const { session } = require('electron') session @@ -297,9 +298,11 @@ session }) ``` -## 6) Do Not Disable WebSecurity +### 6. Do not disable `webSecurity` -_Recommendation is Electron's default_ +:::info +This recommendation is Electron's default. +::: You may have already guessed that disabling the `webSecurity` property on a renderer process ([`BrowserWindow`][browser-window], @@ -308,15 +311,15 @@ security features. Do not disable `webSecurity` in production applications. -### Why? +#### Why? Disabling `webSecurity` will disable the same-origin policy and set `allowRunningInsecureContent` property to `true`. In other words, it allows the execution of insecure code from different domains. -### How? +#### How? -```js +```js title='main.js (Main Process)' // Bad const mainWindow = new BrowserWindow({ webPreferences: { @@ -325,12 +328,12 @@ const mainWindow = new BrowserWindow({ }) ``` -```js +```js title='main.js (Main Process)' // Good const mainWindow = new BrowserWindow() ``` -```html +```html title='index.html (Renderer Process)' @@ -338,13 +341,13 @@ const mainWindow = new BrowserWindow() ``` -## 7) Define a Content Security Policy +### 7. Define a Content Security Policy A Content Security Policy (CSP) is an additional layer of protection against cross-site-scripting attacks and data injection attacks. We recommend that they be enabled by any website you load inside Electron. -### Why? +#### Why? CSP allows the server serving content to restrict and control the resources Electron can load for that given web page. `https://example.com` should @@ -352,6 +355,8 @@ be allowed to load scripts from the origins you defined while scripts from `https://evil.attacker.com` should not be allowed to run. Defining a CSP is an easy way to improve your application's security. +#### How? + The following CSP will allow Electron to execute scripts from the current website and from `apis.example.com`. @@ -363,14 +368,14 @@ Content-Security-Policy: '*' Content-Security-Policy: script-src 'self' https://apis.example.com ``` -### CSP HTTP Header +#### CSP HTTP headers Electron respects the [`Content-Security-Policy` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) which can be set using Electron's [`webRequest.onHeadersReceived`](../api/web-request.md#webrequestonheadersreceivedfilter-listener) handler: -```javascript +```javascript title='main.js (Main Process)' const { session } = require('electron') session.defaultSession.webRequest.onHeadersReceived((details, callback) => { @@ -383,20 +388,22 @@ session.defaultSession.webRequest.onHeadersReceived((details, callback) => { }) ``` -### CSP Meta Tag +#### CSP meta tag -CSP's preferred delivery mechanism is an HTTP header, however it is not possible +CSP's preferred delivery mechanism is an HTTP header. However, it is not possible to use this method when loading a resource using the `file://` protocol. It can -be useful in some cases, such as using the `file://` protocol, to set a policy -on a page directly in the markup using a `` tag: +be useful in some cases to set a policy on a page directly in the markup using a +`` tag: -```html +```html title='index.html (Renderer Process)' ``` -## 8) Do Not Set `allowRunningInsecureContent` to `true` +### 8. Do not enable `allowRunningInsecureContent` -_Recommendation is Electron's default_ +:::info +This recommendation is Electron's default. +::: By default, Electron will not allow websites loaded over `HTTPS` to load and execute scripts, CSS, or plugins from insecure sources (`HTTP`). Setting the @@ -405,15 +412,15 @@ property `allowRunningInsecureContent` to `true` disables that protection. Loading the initial HTML of a website over `HTTPS` and attempting to load subsequent resources via `HTTP` is also known as "mixed content". -### Why? +#### Why? Loading content over `HTTPS` assures the authenticity and integrity of the loaded resources while encrypting the traffic itself. See the section on [only displaying secure content](#1-only-load-secure-content) for more details. -### How? +#### How? -```js +```js title='main.js (Main Process)' // Bad const mainWindow = new BrowserWindow({ webPreferences: { @@ -422,19 +429,21 @@ const mainWindow = new BrowserWindow({ }) ``` -```js +```js title='main.js (Main Process)' // Good const mainWindow = new BrowserWindow({}) ``` -## 9) Do Not Enable Experimental Features +### 9. Do not enable experimental features -_Recommendation is Electron's default_ +:::info +This recommendation is Electron's default. +::: Advanced users of Electron can enable experimental Chromium features using the `experimentalFeatures` property. -### Why? +#### Why? Experimental features are, as the name suggests, experimental and have not been enabled for all Chromium users. Furthermore, their impact on Electron as a whole @@ -443,9 +452,9 @@ has likely not been tested. Legitimate use cases exist, but unless you know what you are doing, you should not enable this property. -### How? +#### How? -```js +```js title='main.js (Main Process)' // Bad const mainWindow = new BrowserWindow({ webPreferences: { @@ -454,20 +463,22 @@ const mainWindow = new BrowserWindow({ }) ``` -```js +```js title='main.js (Main Process)' // Good const mainWindow = new BrowserWindow({}) ``` -## 10) Do Not Use `enableBlinkFeatures` +### 10. Do not use `enableBlinkFeatures` -_Recommendation is Electron's default_ +:::info +This recommendation is Electron's default. +::: Blink is the name of the rendering engine behind Chromium. As with `experimentalFeatures`, the `enableBlinkFeatures` property allows developers to enable features that have been disabled by default. -### Why? +#### Why? Generally speaking, there are likely good reasons if a feature was not enabled by default. Legitimate use cases for enabling specific features exist. As a @@ -475,9 +486,9 @@ developer, you should know exactly why you need to enable a feature, what the ramifications are, and how it impacts the security of your application. Under no circumstances should you enable features speculatively. -### How? +#### How? -```js +```js title='main.js (Main Process)' // Bad const mainWindow = new BrowserWindow({ webPreferences: { @@ -486,14 +497,16 @@ const mainWindow = new BrowserWindow({ }) ``` -```js +```js title='main.js (Main Process)' // Good const mainWindow = new BrowserWindow() ``` -## 11) Do Not Use `allowpopups` +### 11. Do not use `allowpopups` for WebViews -_Recommendation is Electron's default_ +:::info +This recommendation is Electron's default. +::: If you are using [``][webview-tag], you might need the pages and scripts loaded in your `` tag to open new windows. The `allowpopups` attribute @@ -501,16 +514,16 @@ enables them to create new [`BrowserWindows`][browser-window] using the `window.open()` method. `` tags are otherwise not allowed to create new windows. -### Why? +#### Why? If you do not need popups, you are better off not allowing the creation of new [`BrowserWindows`][browser-window] by default. This follows the principle of minimally required access: Don't let a website create new popups unless you know it needs that feature. -### How? +#### How? -```html +```html title='index.html (Renderer Process)' @@ -518,7 +531,7 @@ you know it needs that feature. ``` -## 12) Verify WebView Options Before Creation +### 12. Verify WebView options before creation A WebView created in a renderer process that does not have Node.js integration enabled will not be able to enable integration itself. However, a WebView will @@ -528,7 +541,7 @@ It is a good idea to control the creation of new [``][webview-tag] tags from the main process and to verify that their webPreferences do not disable security features. -### Why? +#### Why? Since `` live in the DOM, they can be created by a script running on your website even if Node.js integration is otherwise disabled. @@ -538,13 +551,13 @@ a renderer process. In most cases, developers do not need to disable any of those features - and you should therefore not allow different configurations for newly created [``][webview-tag] tags. -### How? +#### How? Before a [``][webview-tag] tag is attached, Electron will fire the `will-attach-webview` event on the hosting `webContents`. Use the event to prevent the creation of `webViews` with possibly insecure options. -```js +```js title='main.js (Main Process)' app.on('web-contents-created', (event, contents) => { contents.on('will-attach-webview', (event, webPreferences, params) => { // Strip away preload scripts if unused or verify their location is legitimate @@ -562,16 +575,16 @@ app.on('web-contents-created', (event, contents) => { }) ``` -Again, this list merely minimizes the risk, it does not remove it. If your goal +Again, this list merely minimizes the risk, but does not remove it. If your goal is to display a website, a browser will be a more secure option. -## 13) Disable or limit navigation +### 13. Disable or limit navigation If your app has no need to navigate or only needs to navigate to known pages, it is a good idea to limit navigation outright to that known scope, disallowing any other kinds of navigation. -### Why? +#### Why? Navigation is a common attack vector. If an attacker can convince your app to navigate away from its current page, they can possibly force your app to open @@ -584,7 +597,7 @@ A common attack pattern is that the attacker convinces your app's users to interact with the app in such a way that it navigates to one of the attacker's pages. This is usually done via links, plugins, or other user-generated content. -### How? +#### How? If your app has no need for navigation, you can call `event.preventDefault()` in a [`will-navigate`][will-navigate] handler. If you know which pages your app @@ -595,7 +608,7 @@ We recommend that you use Node's parser for URLs. Simple string comparisons can sometimes be fooled - a `startsWith('https://example.com')` test would let `https://example.com.attacker.com` through. -```js +```js title='main.js (Main Process)' const URL = require('url').URL app.on('web-contents-created', (event, contents) => { @@ -609,12 +622,12 @@ app.on('web-contents-created', (event, contents) => { }) ``` -## 14) Disable or limit creation of new windows +### 14. Disable or limit creation of new windows If you have a known set of windows, it's a good idea to limit the creation of additional windows in your app. -### Why? +#### Why? Much like navigation, the creation of new `webContents` is a common attack vector. Attackers attempt to convince your app to create new windows, frames, @@ -627,7 +640,7 @@ security at no cost. This is commonly the case for apps that open one `BrowserWindow` and do not need to open an arbitrary number of additional windows at runtime. -### How? +#### How? [`webContents`][web-contents] will delegate to its [window open handler][window-open-handler] before creating new windows. The handler will @@ -635,7 +648,7 @@ receive, amongst other parameters, the `url` the window was requested to open and the options used to create it. We recommend that you register a handler to monitor the creation of windows, and deny any unexpected window creation. -```js +```js title='main.js (Main Process)' const { shell } = require('electron') app.on('web-contents-created', (event, contents) => { @@ -656,40 +669,40 @@ app.on('web-contents-created', (event, contents) => { }) ``` -## 15) Do not use `openExternal` with untrusted content +### 15. Do not use `shell.openExternal` with untrusted content -Shell's [`openExternal`][open-external] allows opening a given protocol URI with -the desktop's native utilities. On macOS, for instance, this function is similar -to the `open` terminal command utility and will open the specific application -based on the URI and filetype association. +The shell module's [`openExternal`][open-external] API allows opening a given +protocol URI with the desktop's native utilities. On macOS, for instance, this +function is similar to the `open` terminal command utility and will open the +specific application based on the URI and filetype association. -### Why? +#### Why? Improper use of [`openExternal`][open-external] can be leveraged to compromise the user's host. When openExternal is used with untrusted content, it can be leveraged to execute arbitrary commands. -### How? +#### How? -```js +```js title='main.js (Main Process)' // Bad const { shell } = require('electron') shell.openExternal(USER_CONTROLLED_DATA_HERE) ``` -```js +```js title='main.js (Main Process)' // Good const { shell } = require('electron') shell.openExternal('https://example.com/index.html') ``` -## 16) Use a current version of Electron +### 16. Use a current version of Electron You should strive for always using the latest available version of Electron. Whenever a new major version is released, you should attempt to update your app as quickly as possible. -### Why? +#### Why? An application built with an older version of Electron, Chromium, and Node.js is an easier target than an application that is using more recent versions of @@ -705,6 +718,13 @@ to fix issues before publishing them. Your application will be more secure if it is running a recent version of Electron (and thus, Chromium and Node.js) for which potential security issues are not as widely known. +#### How? + +Migrate your app one major version at a time, while referring to Electron's +[Breaking Changes][breaking-changes] document to see if any code needs to +be updated. + +[breaking-changes]: ../breaking-changes.md [browser-window]: ../api/browser-window.md [browser-view]: ../api/browser-view.md [webview-tag]: ../api/webview-tag.md @@ -712,5 +732,4 @@ which potential security issues are not as widely known. [window-open-handler]: ../api/web-contents.md#contentssetwindowopenhandlerhandler [will-navigate]: ../api/web-contents.md#event-will-navigate [open-external]: ../api/shell.md#shellopenexternalurl-options -[sandbox]: ../tutorial/sandbox.md [responsible-disclosure]: https://en.wikipedia.org/wiki/Responsible_disclosure From 57408e4c2a678dbcc093e6845b8ff34c75c4e7e4 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 16:37:23 +0900 Subject: [PATCH 188/268] Fix broken link to GNOME notifications spec (#33002) Co-authored-by: Kev --- docs/tutorial/notifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/notifications.md b/docs/tutorial/notifications.md index 86a9551618ee1..59b4a8499276b 100644 --- a/docs/tutorial/notifications.md +++ b/docs/tutorial/notifications.md @@ -146,7 +146,7 @@ desktop environment that follows [Desktop Notifications Specification][notification-spec], including Cinnamon, Enlightenment, Unity, GNOME, KDE. -[notification-spec]: https://developer.gnome.org/notification-spec/ +[notification-spec]: https://developer-old.gnome.org/notification-spec/ [app-user-model-id]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx [set-app-user-model-id]: ../api/app.md#appsetappusermodelidid-windows [squirrel-events]: https://github.com/electron/windows-installer/blob/master/README.md#handling-squirrel-events From c2195915d8e9f5f41660399bf5d377d893f3dea1 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 16:40:14 +0900 Subject: [PATCH 189/268] fix: failure to print on macOS (#32813) Co-authored-by: Shelley Vohr --- patches/chromium/.patches | 1 + ...ingcontext_calls_to_newpage_pagedone.patch | 511 ++++++++++++++++++ 2 files changed, 512 insertions(+) create mode 100644 patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index c2f0b55b8b8c2..68e2c048aa919 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -113,3 +113,4 @@ revert_stop_using_nsrunloop_in_renderer_process.patch fix_dont_delete_SerialPortManager_on_main_thread.patch feat_add_data_transfer_to_requestsingleinstancelock.patch fix_crash_when_saving_edited_pdf_files.patch +drop_extra_printingcontext_calls_to_newpage_pagedone.patch diff --git a/patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch b/patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch new file mode 100644 index 0000000000000..a27193a4aeb64 --- /dev/null +++ b/patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch @@ -0,0 +1,511 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Alan Screen +Date: Wed, 5 Jan 2022 23:15:29 +0000 +Subject: Drop extra PrintingContext calls to NewPage/PageDone + +When system calls were refactored out of PrintedDocument in +https://crrev.com/948253, there were extra calls to PrintingContext +NewPage() and PageDone() left in PrintedDocument::RenderPrintedDocument. +These had no effect on Windows or Linux, but caused an issue for macOS. + +This was undetected by tests which use TestPrintingContext, and would +only be detectable if a test was capable of using system drivers (which +generally does not occur on the bots). Adding a test to detect this is +difficult at this time, but should be easier to do once later portions +of the out-of-process print drivers commit chains fill in more testing +capabilities. At that point it should be easier to fire off a request +to have the macOS Preview be the output. https://crbug.com/1284745 +has been filed to capture this needed effort. + +Remove NewPage()/PageDone() as common methods to override from +PrintingContext and make these specific to macOS only. Update the +various implementations of PrintingContext::PrintDocument() to include +the aborted and in-print-job checks that were previously in all +NewPage() implementations. The same corresponding checks from +PageDone() can be handled by PrintedDocument::RenderPrintedDocument() +and PrintedDocumentWin::RenderPrintedPage(). There is no concern about +`in_print_job_` having changed during the lifetime of +RenderPrintedDocument()/RenderPrintedPage(), so just add extra checks +against printing having been asynchronouly aborted before allowing a +final successful return. + +Bug: 1283651 +Change-Id: I52992bc7550dd25d4ad9a1dc633c7d9452a27bb1 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3367333 +Reviewed-by: Lei Zhang +Commit-Queue: Alan Screen +Cr-Commit-Position: refs/heads/main@{#955936} + +diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc +index 4283a5743c695a7376722f80925722d9e7a6496e..992a59c32ea082e3593c0183819d1b174fc8db7a 100644 +--- a/chrome/browser/printing/print_job_worker.cc ++++ b/chrome/browser/printing/print_job_worker.cc +@@ -524,12 +524,6 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); + DCHECK_NE(page_number_, PageNumber::npos()); + +- // Preprocess. +- if (printing_context_->NewPage() != mojom::ResultCode::kSuccess) { +- OnFailure(); +- return; +- } +- + // Actual printing. + if (document_->RenderPrintedPage(*page, printing_context_.get()) != + mojom::ResultCode::kSuccess) { +@@ -537,12 +531,6 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) { + return; + } + +- // Postprocess. +- if (printing_context_->PageDone() != mojom::ResultCode::kSuccess) { +- OnFailure(); +- return; +- } +- + // Signal everyone that the page is printed. + DCHECK(print_job_); + print_job_->PostTask(FROM_HERE, +diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc +index e830a1017f2262d2d1c226aa16d41a6ffe53aadf..7daa9f9bedd664123d7590b9831169e99688b9c9 100644 +--- a/printing/emf_win_unittest.cc ++++ b/printing/emf_win_unittest.cc +@@ -115,7 +115,6 @@ TEST_F(EmfPrintingTest, Enumerate) { + // current directory. + // TODO(maruel): Clean the .PRN file generated in current directory. + context.NewDocument(u"EmfTest.Enumerate"); +- context.NewPage(); + // Process one at a time. + RECT page_bounds = emf.GetPageBounds(1).ToRECT(); + Emf::Enumerator emf_enum(emf, context.context(), &page_bounds); +@@ -129,7 +128,6 @@ TEST_F(EmfPrintingTest, Enumerate) { + EXPECT_TRUE(itr->SafePlayback(&emf_enum.context_)) + << " index: " << index << " type: " << itr->record()->iType; + } +- context.PageDone(); + context.DocumentDone(); + } + +diff --git a/printing/printed_document.cc b/printing/printed_document.cc +index 54dd798f4c76c34fd6414f68d3ad11a15c1673af..81ebe973fc6a99d66f5d8792aa19e01764f33d3f 100644 +--- a/printing/printed_document.cc ++++ b/printing/printed_document.cc +@@ -187,17 +187,18 @@ const MetafilePlayer* PrintedDocument::GetMetafile() { + + mojom::ResultCode PrintedDocument::RenderPrintedDocument( + PrintingContext* context) { +- mojom::ResultCode result = context->NewPage(); ++ base::AutoLock lock(lock_); ++ mojom::ResultCode result = context->PrintDocument( ++ *GetMetafile(), *immutable_.settings_, mutable_.expected_page_count_); + if (result != mojom::ResultCode::kSuccess) + return result; +- { +- base::AutoLock lock(lock_); +- result = context->PrintDocument(*GetMetafile(), *immutable_.settings_, +- mutable_.expected_page_count_); +- if (result != mojom::ResultCode::kSuccess) +- return result; +- } +- return context->PageDone(); ++ ++ // Beware of any asynchronous aborts of the print job that happened during ++ // printing. ++ if (context->PrintingAborted()) ++ return mojom::ResultCode::kCanceled; ++ ++ return mojom::ResultCode::kSuccess; + } + + bool PrintedDocument::IsComplete() const { +diff --git a/printing/printed_document_win.cc b/printing/printed_document_win.cc +index 4024150677fb64f8f8c9d53dfa73cf709c819a7c..8e34b288ec518c4e2d0c5d8113f38440ad2c648b 100644 +--- a/printing/printed_document_win.cc ++++ b/printing/printed_document_win.cc +@@ -24,8 +24,17 @@ mojom::ResultCode PrintedDocument::RenderPrintedPage( + #endif + + DCHECK(context); +- return context->RenderPage(page, +- immutable_.settings_->page_setup_device_units()); ++ mojom::ResultCode result = context->RenderPage( ++ page, immutable_.settings_->page_setup_device_units()); ++ if (result != mojom::ResultCode::kSuccess) ++ return result; ++ ++ // Beware of any asynchronous aborts of the print job that happened during ++ // printing. ++ if (context->PrintingAborted()) ++ return mojom::ResultCode::kCanceled; ++ ++ return mojom::ResultCode::kSuccess; + } + + } // namespace printing +diff --git a/printing/printing_context.h b/printing/printing_context.h +index e87170e6957733f06bcc296bcca3fc331557ed46..e196a7d448ca41ea02d523a4de410dedf4298b5e 100644 +--- a/printing/printing_context.h ++++ b/printing/printing_context.h +@@ -122,18 +122,12 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { + virtual mojom::ResultCode NewDocument( + const std::u16string& document_name) = 0; + +- // Starts a new page. +- virtual mojom::ResultCode NewPage() = 0; +- + #if defined(OS_WIN) + // Renders a page. + virtual mojom::ResultCode RenderPage(const PrintedPage& page, + const PageSetup& page_setup) = 0; + #endif + +- // Closes the printed page. +- virtual mojom::ResultCode PageDone() = 0; +- + // Prints the document contained in `metafile`. + virtual mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, + const PrintSettings& settings, +@@ -178,6 +172,8 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { + // Reinitializes the settings for object reuse. + void ResetSettings(); + ++ bool PrintingAborted() const { return abort_printing_; } ++ + int job_id() const { return job_id_; } + + protected: +diff --git a/printing/printing_context_android.cc b/printing/printing_context_android.cc +index c28a40eb0a9ce0058d9f85948eda5f83d0c64791..5b2f096cb2a705e7c4c7ebbeddbf93cac1b9eafb 100644 +--- a/printing/printing_context_android.cc ++++ b/printing/printing_context_android.cc +@@ -213,30 +213,13 @@ mojom::ResultCode PrintingContextAndroid::NewDocument( + return mojom::ResultCode::kSuccess; + } + +-mojom::ResultCode PrintingContextAndroid::NewPage() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(in_print_job_); +- +- // Intentional No-op. +- +- return mojom::ResultCode::kSuccess; +-} +- +-mojom::ResultCode PrintingContextAndroid::PageDone() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(in_print_job_); +- +- // Intentional No-op. +- +- return mojom::ResultCode::kSuccess; +-} +- + mojom::ResultCode PrintingContextAndroid::PrintDocument( + const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) { ++ if (abort_printing_) ++ return mojom::ResultCode::kCanceled; ++ DCHECK(in_print_job_); + DCHECK(is_file_descriptor_valid()); + + return metafile.SaveToFileDescriptor(fd_) ? mojom::ResultCode::kSuccess +diff --git a/printing/printing_context_android.h b/printing/printing_context_android.h +index 676d98949da675e3283969dd3c9c61028dc1c7b5..b4f2f25edec45f91f241b0b1a7bc73b3f51af252 100644 +--- a/printing/printing_context_android.h ++++ b/printing/printing_context_android.h +@@ -60,8 +60,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextAndroid + mojom::ResultCode UpdatePrinterSettings( + const PrinterSettings& printer_settings) override; + mojom::ResultCode NewDocument(const std::u16string& document_name) override; +- mojom::ResultCode NewPage() override; +- mojom::ResultCode PageDone() override; + mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) override; +diff --git a/printing/printing_context_chromeos.cc b/printing/printing_context_chromeos.cc +index d996c3e1f7b2d9f96f5c50aadff67f8273c7e760..670df66ae406fa883f801682de699aab16779591 100644 +--- a/printing/printing_context_chromeos.cc ++++ b/printing/printing_context_chromeos.cc +@@ -402,32 +402,14 @@ mojom::ResultCode PrintingContextChromeos::NewDocument( + return mojom::ResultCode::kSuccess; + } + +-mojom::ResultCode PrintingContextChromeos::NewPage() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- +- DCHECK(in_print_job_); +- +- // Intentional No-op. +- +- return mojom::ResultCode::kSuccess; +-} +- +-mojom::ResultCode PrintingContextChromeos::PageDone() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- +- DCHECK(in_print_job_); +- +- // Intentional No-op. +- +- return mojom::ResultCode::kSuccess; +-} +- + mojom::ResultCode PrintingContextChromeos::PrintDocument( + const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) { ++ if (abort_printing_) ++ return mojom::ResultCode::kCanceled; ++ DCHECK(in_print_job_); ++ + #if defined(USE_CUPS) + std::vector buffer; + if (!metafile.GetDataAsVector(&buffer)) +diff --git a/printing/printing_context_chromeos.h b/printing/printing_context_chromeos.h +index 77353372b2c6e003428d37ab634167e8dc824fa4..06cb16c8a569a4d90ccdccc5fefcaaf527e49f5f 100644 +--- a/printing/printing_context_chromeos.h ++++ b/printing/printing_context_chromeos.h +@@ -39,8 +39,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextChromeos + mojom::ResultCode UpdatePrinterSettings( + const PrinterSettings& printer_settings) override; + mojom::ResultCode NewDocument(const std::u16string& document_name) override; +- mojom::ResultCode NewPage() override; +- mojom::ResultCode PageDone() override; + mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) override; +diff --git a/printing/printing_context_linux.cc b/printing/printing_context_linux.cc +index c5adfa317747cda3d370a2ace52d843662f4ce91..204cec8311bec69674f1da2223e8d6c4b5a13ba3 100644 +--- a/printing/printing_context_linux.cc ++++ b/printing/printing_context_linux.cc +@@ -151,30 +151,13 @@ mojom::ResultCode PrintingContextLinux::NewDocument( + return mojom::ResultCode::kSuccess; + } + +-mojom::ResultCode PrintingContextLinux::NewPage() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(in_print_job_); +- +- // Intentional No-op. +- +- return mojom::ResultCode::kSuccess; +-} +- +-mojom::ResultCode PrintingContextLinux::PageDone() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(in_print_job_); +- +- // Intentional No-op. +- +- return mojom::ResultCode::kSuccess; +-} +- + mojom::ResultCode PrintingContextLinux::PrintDocument( + const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) { ++ if (abort_printing_) ++ return mojom::ResultCode::kCanceled; ++ DCHECK(in_print_job_); + DCHECK(print_dialog_); + // TODO(crbug.com/1252685) Plumb error code back from + // `PrintDialogGtkInterface`. +diff --git a/printing/printing_context_linux.h b/printing/printing_context_linux.h +index 17d768a24141954df80bed3c5dd6735c34115195..653170ba60e8341c972cb0126109d48394e0de7b 100644 +--- a/printing/printing_context_linux.h ++++ b/printing/printing_context_linux.h +@@ -45,8 +45,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextLinux : public PrintingContext { + mojom::ResultCode UpdatePrinterSettings( + const PrinterSettings& printer_settings) override; + mojom::ResultCode NewDocument(const std::u16string& document_name) override; +- mojom::ResultCode NewPage() override; +- mojom::ResultCode PageDone() override; + mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) override; +diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h +index 85363bd922bf0ab2630e3d5f350de0c58792963a..221019f5df71e1d66accbf2ea2d161bd1125666f 100644 +--- a/printing/printing_context_mac.h ++++ b/printing/printing_context_mac.h +@@ -35,8 +35,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { + mojom::ResultCode UpdatePrinterSettings( + const PrinterSettings& printer_settings) override; + mojom::ResultCode NewDocument(const std::u16string& document_name) override; +- mojom::ResultCode NewPage() override; +- mojom::ResultCode PageDone() override; + mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) override; +@@ -105,6 +103,12 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { + // Returns true is the pair is set. + bool SetKeyValue(base::StringPiece key, base::StringPiece value); + ++ // Starts a new page. ++ mojom::ResultCode NewPage(); ++ ++ // Closes the printed page. ++ mojom::ResultCode PageDone(); ++ + // The native print info object. + base::scoped_nsobject print_info_; + +diff --git a/printing/printing_context_no_system_dialog.cc b/printing/printing_context_no_system_dialog.cc +index c10123f35b11e1600c813080585a2282d775dba1..253507fcee5476f497421316bc42a0794f97b12b 100644 +--- a/printing/printing_context_no_system_dialog.cc ++++ b/printing/printing_context_no_system_dialog.cc +@@ -98,26 +98,6 @@ mojom::ResultCode PrintingContextNoSystemDialog::NewDocument( + return mojom::ResultCode::kSuccess; + } + +-mojom::ResultCode PrintingContextNoSystemDialog::NewPage() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(in_print_job_); +- +- // Intentional No-op. +- +- return mojom::ResultCode::kSuccess; +-} +- +-mojom::ResultCode PrintingContextNoSystemDialog::PageDone() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(in_print_job_); +- +- // Intentional No-op. +- +- return mojom::ResultCode::kSuccess; +-} +- + mojom::ResultCode PrintingContextNoSystemDialog::PrintDocument( + const MetafilePlayer& metafile, + const PrintSettings& settings, +diff --git a/printing/printing_context_no_system_dialog.h b/printing/printing_context_no_system_dialog.h +index 2753d7ba7a09e1c5e88c1eb21a9b146034ea53f5..cb0d0b8c12535c83dbfc07ecb2817f0504b4a8ba 100644 +--- a/printing/printing_context_no_system_dialog.h ++++ b/printing/printing_context_no_system_dialog.h +@@ -32,8 +32,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextNoSystemDialog + mojom::ResultCode UpdatePrinterSettings( + const PrinterSettings& printer_settings) override; + mojom::ResultCode NewDocument(const std::u16string& document_name) override; +- mojom::ResultCode NewPage() override; +- mojom::ResultCode PageDone() override; + mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) override; +diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc +index 0addb52cd2f65b6f05b7cfb7cf8602baaf592541..4f1fb12619fc9bee0cce104ba60621008284d675 100644 +--- a/printing/printing_context_win.cc ++++ b/printing/printing_context_win.cc +@@ -366,18 +366,6 @@ mojom::ResultCode PrintingContextWin::NewDocument( + return mojom::ResultCode::kSuccess; + } + +-mojom::ResultCode PrintingContextWin::NewPage() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(context_); +- DCHECK(in_print_job_); +- +- // Intentional No-op. MetafileSkia::SafePlayback takes care of calling +- // ::StartPage(). +- +- return mojom::ResultCode::kSuccess; +-} +- + mojom::ResultCode PrintingContextWin::RenderPage(const PrintedPage& page, + const PageSetup& page_setup) { + if (abort_printing_) +@@ -416,17 +404,6 @@ mojom::ResultCode PrintingContextWin::RenderPage(const PrintedPage& page, + return mojom::ResultCode::kSuccess; + } + +-mojom::ResultCode PrintingContextWin::PageDone() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(in_print_job_); +- +- // Intentional No-op. MetafileSkia::SafePlayback takes care of calling +- // ::EndPage(). +- +- return mojom::ResultCode::kSuccess; +-} +- + mojom::ResultCode PrintingContextWin::PrintDocument( + const MetafilePlayer& metafile, + const PrintSettings& settings, +diff --git a/printing/printing_context_win.h b/printing/printing_context_win.h +index 700bfe2c744cc18b1be25b9db02dd690b5e306f9..babd443a1586c92a70ff6362a824e29a6395fae2 100644 +--- a/printing/printing_context_win.h ++++ b/printing/printing_context_win.h +@@ -35,10 +35,8 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextWin : public PrintingContext { + mojom::ResultCode UpdatePrinterSettings( + const PrinterSettings& printer_settings) override; + mojom::ResultCode NewDocument(const std::u16string& document_name) override; +- mojom::ResultCode NewPage() override; + mojom::ResultCode RenderPage(const PrintedPage& page, + const PageSetup& page_setup) override; +- mojom::ResultCode PageDone() override; + mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) override; +diff --git a/printing/test_printing_context.cc b/printing/test_printing_context.cc +index 4f0bf0ae891164120d36c79a7df98845f38e55de..208e8a16b5648383ff26d8dec4a15f6485ef4454 100644 +--- a/printing/test_printing_context.cc ++++ b/printing/test_printing_context.cc +@@ -116,15 +116,6 @@ mojom::ResultCode TestPrintingContext::NewDocument( + return mojom::ResultCode::kSuccess; + } + +-mojom::ResultCode TestPrintingContext::NewPage() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(in_print_job_); +- +- // No-op. +- return mojom::ResultCode::kSuccess; +-} +- + #if defined(OS_WIN) + mojom::ResultCode TestPrintingContext::RenderPage(const PrintedPage& page, + const PageSetup& page_setup) { +@@ -138,15 +129,6 @@ mojom::ResultCode TestPrintingContext::RenderPage(const PrintedPage& page, + } + #endif // defined(OS_WIN) + +-mojom::ResultCode TestPrintingContext::PageDone() { +- if (abort_printing_) +- return mojom::ResultCode::kCanceled; +- DCHECK(in_print_job_); +- +- // No-op. +- return mojom::ResultCode::kSuccess; +-} +- + mojom::ResultCode TestPrintingContext::PrintDocument( + const MetafilePlayer& metafile, + const PrintSettings& settings, +diff --git a/printing/test_printing_context.h b/printing/test_printing_context.h +index e2a0f906216f5bae2d05dd6efd6246257a3deea4..579a9269459470e8eac6e506d87503d828bed4cb 100644 +--- a/printing/test_printing_context.h ++++ b/printing/test_printing_context.h +@@ -58,12 +58,10 @@ class TestPrintingContext : public PrintingContext { + mojom::ResultCode UpdatePrinterSettings( + const PrinterSettings& printer_settings) override; + mojom::ResultCode NewDocument(const std::u16string& document_name) override; +- mojom::ResultCode NewPage() override; + #if defined(OS_WIN) + mojom::ResultCode RenderPage(const PrintedPage& page, + const PageSetup& page_setup) override; + #endif +- mojom::ResultCode PageDone() override; + mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, + const PrintSettings& settings, + uint32_t num_pages) override; From d07fe4480f19890a05f4a05a510875e6fa71417d Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 10:25:02 +0100 Subject: [PATCH 190/268] fix: webContents.openDevTools({mode}) not working (#32946) Co-authored-by: Shelley Vohr --- patches/config.json | 2 + patches/devtools_frontend/.patches | 1 + ...bals_to_allow_patching_devtools_dock.patch | 48 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 patches/devtools_frontend/.patches create mode 100644 patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch diff --git a/patches/config.json b/patches/config.json index e9a2297ba10f2..1ba34fa0955cd 100644 --- a/patches/config.json +++ b/patches/config.json @@ -3,6 +3,8 @@ "src/electron/patches/boringssl": "src/third_party/boringssl/src", + "src/electron/patches/devtools_frontend": "src/third_party/devtools-frontend/src", + "src/electron/patches/webrtc": "src/third_party/webrtc", "src/electron/patches/v8": "src/v8", diff --git a/patches/devtools_frontend/.patches b/patches/devtools_frontend/.patches new file mode 100644 index 0000000000000..4e822e64fd5fa --- /dev/null +++ b/patches/devtools_frontend/.patches @@ -0,0 +1 @@ +fix_expose_globals_to_allow_patching_devtools_dock.patch diff --git a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch new file mode 100644 index 0000000000000..56bd33b8d6d47 --- /dev/null +++ b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch @@ -0,0 +1,48 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Wed, 9 Feb 2022 10:55:54 +0100 +Subject: fix: expose globals to allow patching Devtools dock + +Electron calls into UI.DockController.instance().setDockSide(side) in +order to allow users to set the devtools dock position via +webContents.openDevTools({ mode }). In https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3310870 +the globals which we used to enable this were removed, and so we need to +re-expose them to fix this broken functionality. We should look to +upstream a more durable approach to allowing us to do this, at which +point this patch can be removed. + +diff --git a/front_end/entrypoints/shell/BUILD.gn b/front_end/entrypoints/shell/BUILD.gn +index bf96adcaa42a2406cf1dd7cd2468802886aa4fd7..cd84442cab4a0da772dd37cd4e921041b3b6173a 100644 +--- a/front_end/entrypoints/shell/BUILD.gn ++++ b/front_end/entrypoints/shell/BUILD.gn +@@ -31,6 +31,7 @@ devtools_entrypoint("shell") { + "../../ui/legacy/components/perf_ui:meta", + "../../ui/legacy/components/quick_open:meta", + "../../ui/legacy/components/source_frame:meta", ++ "../../ui/legacy:legacy", + ] + + visibility = [ +diff --git a/front_end/entrypoints/shell/shell.ts b/front_end/entrypoints/shell/shell.ts +index 89255a0927a647ca32d1a9508853425a3207b441..f0e1e32f80d79e400ad139818edce60aff6aeb89 100644 +--- a/front_end/entrypoints/shell/shell.ts ++++ b/front_end/entrypoints/shell/shell.ts +@@ -20,6 +20,7 @@ import '../../models/logs/logs-meta.js'; + import '../main/main-meta.js'; + import '../../ui/legacy/components/perf_ui/perf_ui-meta.js'; + import '../../ui/legacy/components/quick_open/quick_open-meta.js'; ++import '../../ui/legacy/legacy-legacy.js'; + import '../../core/sdk/sdk-meta.js'; + import '../../ui/legacy/components/source_frame/source_frame-meta.js'; + import '../../panels/console_counters/console_counters-meta.js'; +diff --git a/front_end/ui/legacy/BUILD.gn b/front_end/ui/legacy/BUILD.gn +index fe7c150cf6ce24b10821fa5a91d55f82cf865222..7177d495ec9e2b31a641c7a531b63584c597cf97 100644 +--- a/front_end/ui/legacy/BUILD.gn ++++ b/front_end/ui/legacy/BUILD.gn +@@ -182,5 +182,6 @@ devtools_entrypoint("legacy") { + visibility = [ + "../..:legacy_entrypoints", + "../../legacy_test_runner/*", ++ "../../entrypoints/shell/*", + ] + } From ca06034fdd30769a9ece303a0d2698693e77cdc9 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 10:53:39 +0100 Subject: [PATCH 191/268] fix: stale renderer process on quit (#32971) Co-authored-by: Micha Hanselmann --- shell/browser/electron_browser_main_parts.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/browser/electron_browser_main_parts.cc b/shell/browser/electron_browser_main_parts.cc index 5cabbb3af45ef..9ecbfc3991c41 100644 --- a/shell/browser/electron_browser_main_parts.cc +++ b/shell/browser/electron_browser_main_parts.cc @@ -455,7 +455,8 @@ void ElectronBrowserMainParts::WillRunMainMessageLoop( std::unique_ptr& run_loop) { js_env_->OnMessageLoopCreated(); exit_code_ = content::RESULT_CODE_NORMAL_EXIT; - Browser::Get()->SetMainMessageLoopQuitClosure(run_loop->QuitClosure()); + Browser::Get()->SetMainMessageLoopQuitClosure( + run_loop->QuitWhenIdleClosure()); } void ElectronBrowserMainParts::PostCreateMainMessageLoop() { From 7ab85558f544a9e9feda708629364c8cd595458d Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Feb 2022 15:04:51 +0100 Subject: [PATCH 192/268] chore: add @electron/wg-security to patches/ CODEOWNERS (#33007) Co-authored-by: Jeremy Rose --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f65103393eb89..6bfa64f5a2483 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,7 +4,7 @@ # https://git-scm.com/docs/gitignore # Upgrades WG -/patches/ @electron/wg-upgrades +/patches/ @electron/wg-upgrades @electron/wg-security DEPS @electron/wg-upgrades # Releases WG From 7c9b609389aef540b2cb3158cfb9eae7fcdd5d5c Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 16:18:18 +0900 Subject: [PATCH 193/268] chore: backport EPROTOTYPE fixes from libuv (#32944) * chore: backport EPROTOTYPE fixes from libuv This commit backports three commits from libuv's 1.x branch to fix issues with CPU going to 100% on macOS when EPROTOTYPE is returned. See: https://github.com/libuv/libuv/commit/abb109f30f7c0b3615b75156376d2e886c365df8 See: https://github.com/libuv/libuv/commit/3a7b95593acaab9739404bd120baa62c2007a18a See: https://github.com/libuv/libuv/commit/de24da8c111687a2871d528052f5442e9b371ca1 * Update .patches Co-authored-by: Fedor Indutny Co-authored-by: Shelley Vohr --- patches/node/.patches | 3 + ...imum_supported_version_to_10_15_3406.patch | 25 +++++++ ...ove_eprototype_error_workaround_3405.patch | 65 +++++++++++++++++++ ...nslate_eprototype_to_econnreset_3413.patch | 44 +++++++++++++ 4 files changed, 137 insertions(+) create mode 100644 patches/node/darwin_bump_minimum_supported_version_to_10_15_3406.patch create mode 100644 patches/node/darwin_remove_eprototype_error_workaround_3405.patch create mode 100644 patches/node/darwin_translate_eprototype_to_econnreset_3413.patch diff --git a/patches/node/.patches b/patches/node/.patches index 1343e5cda9701..e58c33a4d4e15 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -27,3 +27,6 @@ test_add_fixture_trim_option.patch fix_crash_caused_by_gethostnamew_on_windows_7.patch fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch fix_don_t_create_console_window_when_creating_process.patch +darwin_remove_eprototype_error_workaround_3405.patch +darwin_translate_eprototype_to_econnreset_3413.patch +darwin_bump_minimum_supported_version_to_10_15_3406.patch diff --git a/patches/node/darwin_bump_minimum_supported_version_to_10_15_3406.patch b/patches/node/darwin_bump_minimum_supported_version_to_10_15_3406.patch new file mode 100644 index 0000000000000..43023e3d02254 --- /dev/null +++ b/patches/node/darwin_bump_minimum_supported_version_to_10_15_3406.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Tue, 8 Feb 2022 14:18:29 +0100 +Subject: darwin: bump minimum supported version to 10.15 (#3406) + +We can't realistically claim to support 10.7 or any version that Apple +no longer supports so let's bump the baseline to something more +realistic. + +Refs: https://github.com/libuv/libuv/pull/482 +Refs: https://github.com/libuv/libuv/pull/3405 + +diff --git a/deps/uv/SUPPORTED_PLATFORMS.md b/deps/uv/SUPPORTED_PLATFORMS.md +index 30e0ea617a6fcaa5b4b7c7c5b117652e61f367d3..dc57dfb12dc7ddf8d29308ac44f46084a933d5ca 100644 +--- a/deps/uv/SUPPORTED_PLATFORMS.md ++++ b/deps/uv/SUPPORTED_PLATFORMS.md +@@ -3,7 +3,7 @@ + | System | Support type | Supported versions | Notes | + |---|---|---|---| + | GNU/Linux | Tier 1 | Linux >= 2.6.32 with glibc >= 2.12 | | +-| macOS | Tier 1 | macOS >= 10.7 | | ++| macOS | Tier 1 | macOS >= 10.15 | Current and previous macOS release | + | Windows | Tier 1 | >= Windows 8 | VS 2015 and later are supported | + | FreeBSD | Tier 1 | >= 10 | | + | AIX | Tier 2 | >= 6 | Maintainers: @libuv/aix | diff --git a/patches/node/darwin_remove_eprototype_error_workaround_3405.patch b/patches/node/darwin_remove_eprototype_error_workaround_3405.patch new file mode 100644 index 0000000000000..60dc8b799e4b7 --- /dev/null +++ b/patches/node/darwin_remove_eprototype_error_workaround_3405.patch @@ -0,0 +1,65 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Sun, 9 Jan 2022 12:20:15 +0100 +Subject: darwin: remove EPROTOTYPE error workaround (#3405) + +It's been reported in the past that OS X 10.10, because of a race +condition in the XNU kernel, sometimes returns a transient EPROTOTYPE +error when trying to write to a socket. Libuv handles that by retrying +the operation until it succeeds or fails with a different error. + +Recently it's been reported that current versions of the operating +system formerly known as OS X fail permanently with EPROTOTYPE under +certain conditions, resulting in an infinite loop. + +Because Apple isn't exactly forthcoming with bug fixes or even details, +I'm opting to simply remove the workaround and have the error bubble up. + +Refs: https://github.com/libuv/libuv/pull/482 + +diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c +index bc64fe8f44b26d9f4c0d4d0d282b65cdf11a531b..1af448e7691392c3f7794eed1905d9132394e207 100644 +--- a/deps/uv/src/unix/stream.c ++++ b/deps/uv/src/unix/stream.c +@@ -58,20 +58,6 @@ struct uv__stream_select_s { + fd_set* swrite; + size_t swrite_sz; + }; +- +-/* Due to a possible kernel bug at least in OS X 10.10 "Yosemite", +- * EPROTOTYPE can be returned while trying to write to a socket that is +- * shutting down. If we retry the write, we should get the expected EPIPE +- * instead. +- */ +-# define RETRY_ON_WRITE_ERROR(errno) (errno == EINTR || errno == EPROTOTYPE) +-# define IS_TRANSIENT_WRITE_ERROR(errno, send_handle) \ +- (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS || \ +- (errno == EMSGSIZE && send_handle != NULL)) +-#else +-# define RETRY_ON_WRITE_ERROR(errno) (errno == EINTR) +-# define IS_TRANSIENT_WRITE_ERROR(errno, send_handle) \ +- (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS) + #endif /* defined(__APPLE__) */ + + static void uv__stream_connect(uv_stream_t*); +@@ -866,17 +852,17 @@ static int uv__try_write(uv_stream_t* stream, + + do + n = sendmsg(uv__stream_fd(stream), &msg, 0); +- while (n == -1 && RETRY_ON_WRITE_ERROR(errno)); ++ while (n == -1 && errno == EINTR); + } else { + do + n = uv__writev(uv__stream_fd(stream), iov, iovcnt); +- while (n == -1 && RETRY_ON_WRITE_ERROR(errno)); ++ while (n == -1 && errno == EINTR); + } + + if (n >= 0) + return n; + +- if (IS_TRANSIENT_WRITE_ERROR(errno, send_handle)) ++ if (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS) + return UV_EAGAIN; + + return UV__ERR(errno); diff --git a/patches/node/darwin_translate_eprototype_to_econnreset_3413.patch b/patches/node/darwin_translate_eprototype_to_econnreset_3413.patch new file mode 100644 index 0000000000000..903921bce934b --- /dev/null +++ b/patches/node/darwin_translate_eprototype_to_econnreset_3413.patch @@ -0,0 +1,44 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Wed, 12 Jan 2022 16:11:43 +0100 +Subject: darwin: translate EPROTOTYPE to ECONNRESET (#3413) + +macOS versions 10.10 and 10.15 - and presumbaly 10.11 to 10.14, too - +have a bug where a race condition causes the kernel to return EPROTOTYPE +because the socket isn't fully constructed. + +It's probably the result of the peer closing the connection and that is +why libuv translates it to ECONNRESET. + +Previously, libuv retried until the EPROTOTYPE error went away but some +VPN software causes the same behavior except the error is permanent, not +transient, turning the retry mechanism into an infinite loop. + +Refs: https://github.com/libuv/libuv/pull/482 +Refs: https://github.com/libuv/libuv/pull/3405 + +diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c +index 1af448e7691392c3f7794eed1905d9132394e207..9d22debf2bf5bd5912ade152e55a85ad652e3819 100644 +--- a/deps/uv/src/unix/stream.c ++++ b/deps/uv/src/unix/stream.c +@@ -865,6 +865,20 @@ static int uv__try_write(uv_stream_t* stream, + if (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS) + return UV_EAGAIN; + ++#ifdef __APPLE__ ++ /* macOS versions 10.10 and 10.15 - and presumbaly 10.11 to 10.14, too - ++ * have a bug where a race condition causes the kernel to return EPROTOTYPE ++ * because the socket isn't fully constructed. It's probably the result of ++ * the peer closing the connection and that is why libuv translates it to ++ * ECONNRESET. Previously, libuv retried until the EPROTOTYPE error went ++ * away but some VPN software causes the same behavior except the error is ++ * permanent, not transient, turning the retry mechanism into an infinite ++ * loop. See https://github.com/libuv/libuv/pull/482. ++ */ ++ if (errno == EPROTOTYPE) ++ return UV_ECONNRESET; ++#endif /* __APPLE__ */ ++ + return UV__ERR(errno); + } + From 8c066c2a351a2652b6250c7a7f9791c4920c5047 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 16:25:09 +0900 Subject: [PATCH 194/268] fix: don't restore maximized BrowserWindow when calling showInactive (#33022) Co-authored-by: David Sanders --- patches/chromium/.patches | 1 + ...ed_windows_when_calling_showinactive.patch | 42 +++++++++++++++++++ spec-main/api-browser-window-spec.ts | 16 +++++++ 3 files changed, 59 insertions(+) create mode 100644 patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 68e2c048aa919..328f5c6c59c36 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -114,3 +114,4 @@ fix_dont_delete_SerialPortManager_on_main_thread.patch feat_add_data_transfer_to_requestsingleinstancelock.patch fix_crash_when_saving_edited_pdf_files.patch drop_extra_printingcontext_calls_to_newpage_pagedone.patch +fix_don_t_restore_maximized_windows_when_calling_showinactive.patch diff --git a/patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch b/patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch new file mode 100644 index 0000000000000..17f355134d0f0 --- /dev/null +++ b/patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: David Sanders +Date: Fri, 11 Feb 2022 22:37:39 +0000 +Subject: fix: don't restore maximized windows when calling ShowInactive + +This is a backport from Chromium of +https://chromium-review.googlesource.com/c/chromium/src/+/3371573. + +diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc +index 067861bb743ee2f3c1916794d45efb7dd591b230..6507557bf5a47492343602607e0dbb7d8f88246d 100644 +--- a/ui/views/win/hwnd_message_handler.cc ++++ b/ui/views/win/hwnd_message_handler.cc +@@ -664,9 +664,16 @@ void HWNDMessageHandler::Show(ui::WindowShowState show_state, + SetWindowPlacement(hwnd(), &placement); + native_show_state = SW_SHOWMAXIMIZED; + } else { ++ const bool is_maximized = IsMaximized(); ++ ++ // Use SW_SHOW/SW_SHOWNA instead of SW_SHOWNORMAL/SW_SHOWNOACTIVATE so that ++ // the window is not restored to its original position if it is maximized. ++ // This could be used unconditionally for ui::SHOW_STATE_INACTIVE, but ++ // cross-platform behavior when showing a minimized window is inconsistent, ++ // some platforms restore the position, some do not. See crbug.com/1296710 + switch (show_state) { + case ui::SHOW_STATE_INACTIVE: +- native_show_state = SW_SHOWNOACTIVATE; ++ native_show_state = is_maximized ? SW_SHOWNA : SW_SHOWNOACTIVATE; + break; + case ui::SHOW_STATE_MAXIMIZED: + native_show_state = SW_SHOWMAXIMIZED; +@@ -677,9 +684,9 @@ void HWNDMessageHandler::Show(ui::WindowShowState show_state, + case ui::SHOW_STATE_NORMAL: + if ((GetWindowLong(hwnd(), GWL_EXSTYLE) & WS_EX_TRANSPARENT) || + (GetWindowLong(hwnd(), GWL_EXSTYLE) & WS_EX_NOACTIVATE)) { +- native_show_state = SW_SHOWNOACTIVATE; ++ native_show_state = is_maximized ? SW_SHOWNA : SW_SHOWNOACTIVATE; + } else { +- native_show_state = SW_SHOWNORMAL; ++ native_show_state = is_maximized ? SW_SHOW : SW_SHOWNORMAL; + } + break; + case ui::SHOW_STATE_FULLSCREEN: diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index c181cb4f29b44..d7585b3c07a54 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -735,6 +735,22 @@ describe('BrowserWindow module', () => { w.showInactive(); expect(w.isFocused()).to.equal(false); }); + + // TODO(dsanders11): Enable for Linux once CI plays nice with these kinds of tests + ifit(process.platform !== 'linux')('should not restore maximized windows', async () => { + const maximize = emittedOnce(w, 'maximize'); + const shown = emittedOnce(w, 'show'); + w.maximize(); + // TODO(dsanders11): The maximize event isn't firing on macOS for a window initially hidden + if (process.platform !== 'darwin') { + await maximize; + } else { + await delay(1000); + } + w.showInactive(); + await shown; + expect(w.isMaximized()).to.equal(true); + }); }); describe('BrowserWindow.focus()', () => { From 34c4889bbb1d7176920b30db1f11622af814274a Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 16:26:39 +0900 Subject: [PATCH 195/268] fix: command string for windows protocol handler (#33013) Co-authored-by: deepak1556 --- shell/browser/browser_win.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/browser_win.cc b/shell/browser/browser_win.cc index 6cfc75f4a44ba..56a62ac32548f 100644 --- a/shell/browser/browser_win.cc +++ b/shell/browser/browser_win.cc @@ -67,7 +67,7 @@ bool GetProtocolLaunchPath(gin::Arguments* args, std::wstring* exe) { std::vector launch_args; if (args->GetNext(&launch_args) && !launch_args.empty()) *exe = base::StringPrintf(L"\"%ls\" \"%ls\" \"%%1\"", exe->c_str(), - base::JoinString(launch_args, L" ").c_str()); + base::JoinString(launch_args, L"\" \"").c_str()); else *exe = base::StringPrintf(L"\"%ls\" \"%%1\"", exe->c_str()); return true; From 0a908224c27dbac296f2db2980e2b9ee1883fcf8 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 16:29:32 +0900 Subject: [PATCH 196/268] fix: savePage throw on relative paths (#33019) Co-authored-by: Shelley Vohr --- docs/api/web-contents.md | 2 +- shell/browser/api/electron_api_web_contents.cc | 5 +++++ spec-main/api-browser-window-spec.ts | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 6073f165e8f2f..d4a1233c5976a 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -1856,7 +1856,7 @@ the cursor when dragging. #### `contents.savePage(fullPath, saveType)` -* `fullPath` string - The full file path. +* `fullPath` string - The absolute file path. * `saveType` string - Specify the save type. * `HTMLOnly` - Save only the HTML of the page. * `HTMLComplete` - Save complete-html page. diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index dd53ce0dba80e..c3c0f8a9d47ed 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -2353,6 +2353,11 @@ v8::Local WebContents::SavePage( gin_helper::Promise promise(isolate); v8::Local handle = promise.GetHandle(); + if (!full_file_path.IsAbsolute()) { + promise.RejectWithErrorMessage("Path must be absolute"); + return handle; + } + auto* handler = new SavePageHandler(web_contents(), std::move(promise)); handler->Handle(full_file_path, save_type); diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index d7585b3c07a54..70d57977af6a0 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3447,6 +3447,23 @@ describe('BrowserWindow module', () => { } catch {} }); + it('should throw when passing relative paths', async () => { + const w = new BrowserWindow({ show: false }); + await w.loadFile(path.join(fixtures, 'pages', 'save_page', 'index.html')); + + await expect( + w.webContents.savePage('save_page.html', 'HTMLComplete') + ).to.eventually.be.rejectedWith('Path must be absolute'); + + await expect( + w.webContents.savePage('save_page.html', 'HTMLOnly') + ).to.eventually.be.rejectedWith('Path must be absolute'); + + await expect( + w.webContents.savePage('save_page.html', 'MHTML') + ).to.eventually.be.rejectedWith('Path must be absolute'); + }); + it('should save page to disk with HTMLOnly', async () => { const w = new BrowserWindow({ show: false }); await w.loadFile(path.join(fixtures, 'pages', 'save_page', 'index.html')); From c1f4b6a4cb3cbbe87e4ecbd82f9b5c57f57c5065 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 24 Feb 2022 12:09:46 +0100 Subject: [PATCH 197/268] fix: broken OSR transparent option (#33053) Co-authored-by: Shelley Vohr --- shell/browser/api/electron_api_web_contents.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index c3c0f8a9d47ed..deb136746e982 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -766,8 +766,12 @@ WebContents::WebContents(v8::Isolate* isolate, #if BUILDFLAG(ENABLE_OSR) } } else if (IsOffScreen()) { - bool transparent = false; - options.Get(options::kTransparent, &transparent); + // webPreferences does not have a transparent option, so if the window needs + // to be transparent, that will be set at electron_api_browser_window.cc#L57 + // and we then need to pull it back out and check it here. + std::string background_color; + options.GetHidden(options::kBackgroundColor, &background_color); + bool transparent = ParseHexColor(background_color) == SK_ColorTRANSPARENT; content::WebContents::CreateParams params(session->browser_context()); auto* view = new OffScreenWebContentsView( From 339ae4c0148db9a267e3a05ad40146ebc7b7d0cd Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 24 Feb 2022 05:31:27 -0800 Subject: [PATCH 198/268] Bump v18.0.0-alpha.4 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index ea5af15de95c4..7c3de9c690fbb 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-alpha.3 \ No newline at end of file +18.0.0-alpha.4 \ No newline at end of file diff --git a/package.json b/package.json index 47d00849fd1b3..66d95f293e338 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-alpha.3", + "version": "18.0.0-alpha.4", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index bcec1aa3ba1a1..51cc02fa79fd3 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,3 - PRODUCTVERSION 18,0,0,3 + FILEVERSION 18,0,0,4 + PRODUCTVERSION 18,0,0,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 4f27c367b194233edd9cad9900c7ee91bf6fce18 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Thu, 24 Feb 2022 11:03:56 -0800 Subject: [PATCH 199/268] build: debug getDraftRelease call (#33073) --- script/release/release.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/release/release.js b/script/release/release.js index e10311e4faa8d..31c4629620526 100755 --- a/script/release/release.js +++ b/script/release/release.js @@ -38,7 +38,10 @@ async function getDraftRelease (version, skipValidation) { const releaseInfo = await octokit.repos.listReleases({ owner: 'electron', repo: targetRepo + }).catch(err => { + console.error(`Failed to fetch releases: ${err}`); }); + console.log('releaseInfo: ', releaseInfo); const versionToCheck = version || pkgVersion; const drafts = releaseInfo.data.filter(release => { @@ -46,6 +49,7 @@ async function getDraftRelease (version, skipValidation) { }); const draft = drafts[0]; + console.log('drafts: ', drafts); if (!skipValidation) { failureCount = 0; check(drafts.length === 1, 'one draft exists', true); From 47bda9c0e56852f5ddeee3547761f2bc2ba2397e Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 24 Feb 2022 11:04:23 -0800 Subject: [PATCH 200/268] Revert "Bump v18.0.0-alpha.4" This reverts commit 339ae4c0148db9a267e3a05ad40146ebc7b7d0cd. --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 7c3de9c690fbb..ea5af15de95c4 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-alpha.4 \ No newline at end of file +18.0.0-alpha.3 \ No newline at end of file diff --git a/package.json b/package.json index 66d95f293e338..47d00849fd1b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-alpha.4", + "version": "18.0.0-alpha.3", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 51cc02fa79fd3..bcec1aa3ba1a1 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,4 - PRODUCTVERSION 18,0,0,4 + FILEVERSION 18,0,0,3 + PRODUCTVERSION 18,0,0,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 56ccfad7a55673604abec2f8ff464b1fedc7f59a Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 24 Feb 2022 11:06:40 -0800 Subject: [PATCH 201/268] Bump v18.0.0-alpha.4 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index ea5af15de95c4..7c3de9c690fbb 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-alpha.3 \ No newline at end of file +18.0.0-alpha.4 \ No newline at end of file diff --git a/package.json b/package.json index 47d00849fd1b3..66d95f293e338 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-alpha.3", + "version": "18.0.0-alpha.4", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index bcec1aa3ba1a1..51cc02fa79fd3 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,3 - PRODUCTVERSION 18,0,0,3 + FILEVERSION 18,0,0,4 + PRODUCTVERSION 18,0,0,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From cc9ba35c51a527ceba69b5e492182ed0c66dabc4 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 14:17:18 +0100 Subject: [PATCH 202/268] fix: tray garbage collection (#33074) Co-authored-by: Shelley Vohr --- shell/browser/api/electron_api_tray.cc | 7 +++++-- shell/browser/api/electron_api_tray.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/shell/browser/api/electron_api_tray.cc b/shell/browser/api/electron_api_tray.cc index 72cd816638bde..51ea4c67aa603 100644 --- a/shell/browser/api/electron_api_tray.cc +++ b/shell/browser/api/electron_api_tray.cc @@ -89,8 +89,10 @@ gin::Handle Tray::New(gin_helper::ErrorThrower thrower, } #endif - return gin::CreateHandle(thrower.isolate(), - new Tray(args->isolate(), image, guid)); + auto handle = gin::CreateHandle(args->isolate(), + new Tray(args->isolate(), image, guid)); + handle->Pin(args->isolate()); + return handle; } void Tray::OnClicked(const gfx::Rect& bounds, @@ -180,6 +182,7 @@ void Tray::OnDragEnded() { } void Tray::Destroy() { + Unpin(); menu_.Reset(); tray_icon_.reset(); } diff --git a/shell/browser/api/electron_api_tray.h b/shell/browser/api/electron_api_tray.h index 19a28eef23713..8c4870b11ad89 100644 --- a/shell/browser/api/electron_api_tray.h +++ b/shell/browser/api/electron_api_tray.h @@ -19,6 +19,7 @@ #include "shell/common/gin_helper/cleaned_up_at_exit.h" #include "shell/common/gin_helper/constructible.h" #include "shell/common/gin_helper/error_thrower.h" +#include "shell/common/gin_helper/pinnable.h" namespace gfx { class Image; @@ -38,6 +39,7 @@ class Tray : public gin::Wrappable, public gin_helper::EventEmitterMixin, public gin_helper::Constructible, public gin_helper::CleanedUpAtExit, + public gin_helper::Pinnable, public TrayIconObserver { public: // gin_helper::Constructible From fe8c831a0c9826cb2d5df85407195df0c842e4d4 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 05:30:50 -0800 Subject: [PATCH 203/268] Bump v18.0.0-alpha.5 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 7c3de9c690fbb..9a5b4bfd58a49 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-alpha.4 \ No newline at end of file +18.0.0-alpha.5 \ No newline at end of file diff --git a/package.json b/package.json index 66d95f293e338..77de8d76018e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-alpha.4", + "version": "18.0.0-alpha.5", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 51cc02fa79fd3..1d21adb7ed532 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,4 - PRODUCTVERSION 18,0,0,4 + FILEVERSION 18,0,0,5 + PRODUCTVERSION 18,0,0,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 68c541380ecf4a8e67d23fab9bb0fa66cf700289 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 28 Feb 2022 14:37:30 -0500 Subject: [PATCH 204/268] chore: bump chromium to 100.0.4894.0 (18-x-y) (#33093) * chore: bump chromium to 100.0.4857.0 (main) (#32419) * chore: bump chromium in DEPS to 99.0.4819.0 * chore: update patches * chore: bump chromium in DEPS to 99.0.4824.0 * chore: update patches * chore: bump chromium in DEPS to 99.0.4827.0 * chore: update patches * 3352511: PiP: Add inkdrop and pointer cursor to PiP window buttons https://chromium-review.googlesource.com/c/chromium/src/+/3352511 * 3309164: webhid: Show FIDO devices in the chooser if allowed https://chromium-review.googlesource.com/c/chromium/src/+/3309164 * 3297868: hid: Add experimental HIDDevice.forget() https://chromium-review.googlesource.com/c/chromium/src/+/3297868 * 3362491: [Extensions] Move i18n API to //extensions https://chromium-review.googlesource.com/c/chromium/src/+/3362491 * MCC Refactor step0: Allow embedders to register associated_interface binders with RenderFrameHostImpl::associated_registry_. https://chromium-review.googlesource.com/c/chromium/src/+/3281481 * 3352616: [Gtk] Remove libgtk from the link-line https://chromium-review.googlesource.com/c/chromium/src/+/3352616 * 3249211: Clear-Site-Data support for partitioned cookies https://chromium-review.googlesource.com/c/chromium/src/+/3249211 * [Extensions][COIL] Use [allow|block]list in //extensions/common https://chromium-review.googlesource.com/c/chromium/src/+/3372668 * Begin ScopedUserPrefUpdate migration to modern base::Value https://chromium-review.googlesource.com/c/chromium/src/+/3376154 * [Code Health] Refactor PrefService GetDict + GetList to use base::Value https://chromium-review.googlesource.com/c/chromium/src/+/3343526 * 3354997: [CodeHealth] Remove deprecated SetDictionary method https://chromium-review.googlesource.com/c/chromium/src/+/3354997 * 3287323: Add LacrosPrefStore for lacros settings https://chromium-review.googlesource.com/c/chromium/src/+/3287323 * 3365916: [PA] Clean up remaining lazy commit code https://chromium-review.googlesource.com/c/chromium/src/+/3365916 * [MPArch] Target the external protocol error at the responsible frame. https://chromium-review.googlesource.com/c/chromium/src/+/3011560 * Pass origin to RegisterNonNetworkSubresourceURLLoaderFactories https://chromium-review.googlesource.com/c/chromium/src/+/3350608 * Linux: Send OSCrypt raw encryption key to the Network Service https://chromium-review.googlesource.com/c/chromium/src/+/3320484 * [PlzServiceWorker] Remove remaining references to PlzServiceWorker. https://chromium-review.googlesource.com/c/chromium/src/+/3359441 * chore: fixup for lint * 3327621: Fix tablet mode detection for Win 11. https://chromium-review.googlesource.com/c/chromium/src/+/3327621 * 3342428: ax_mac: move AXTextMarker conversion utils under ui umbrella https://chromium-review.googlesource.com/c/chromium/src/+/3342428 * 3353974: Mac: Use base::Feature for overlay features https://chromium-review.googlesource.com/c/chromium/src/+/3353974 * chore: bump chromium in DEPS to 99.0.4828.0 * chore: update patches * chore: bump chromium in DEPS to 99.0.4837.0 * chore: update patches * chore: update patches * 3379142: Drop FALLTHROUGH macro Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3379142 * 3381749: C++17: Allow use of std::map::try_emplace and std::map::insert_or_assign Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3381749 * chore: bump chromium in DEPS to 99.0.4839.0 * chore: update patches * chore: bump chromium in DEPS to 99.0.4840.0 * chore: bump chromium in DEPS to 99.0.4844.0 * 3395881: [api] Deprecate Local v8::Object::CreationContext() Ref: https://chromium-review.googlesource.com/c/v8/v8/+/3395881 * chore: update patches * chore: bump chromium in DEPS to 100.0.4845.0 * chore: update patches * chore: bump chromium in DEPS to 100.0.4847.0 * chore: update patches * chore: bump chromium in DEPS to 100.0.4849.0 * chore: update patches * chore: bump chromium in DEPS to 100.0.4851.0 * chore: bump chromium in DEPS to 100.0.4853.0 * update patches * chore: update patches * update patches * 3383599: Fonts Access: Remove prototype that uses a font picker. https://chromium-review.googlesource.com/c/chromium/src/+/3383599 * 3404768: Remove ALLOW_UNUSED macros https://chromium-review.googlesource.com/c/chromium/src/+/3404768 * 3374762: Remove ignore_result.h https://chromium-review.googlesource.com/c/chromium/src/+/3374762 * 3399305: [unseasoned-pdf] Apply proper frame offsets for touch selections https://chromium-review.googlesource.com/c/chromium/src/+/3399305 * 3402210: [Extensions] Don't trigger unload event for already unloaded extension https://chromium-review.googlesource.com/c/chromium/src/+/3402210 * 3410912: Combine URLLoaderClient OnReceiveResponse and OnStartLoadingResponseBody. https://chromium-review.googlesource.com/c/chromium/src/+/3410912 * 3370428: Make the AuthSchemes policy support dynamic refresh https://chromium-review.googlesource.com/c/chromium/src/+/3370428 * 3407603: Finish ScopedUserPrefUpdate migration to modern base::Value https://chromium-review.googlesource.com/c/chromium/src/+/3407603 * 3378352: ozone/x11: move code from //ui/p/x11 to //ui/ozone/p/x11 https://chromium-review.googlesource.com/c/chromium/src/+/3378352 * 3370810: Delete chrome/service, AKA the Cloud Print service process. https://chromium-review.googlesource.com/c/chromium/src/+/3370810 * chore: bump chromium in DEPS to 100.0.4855.0 * chore: update patches * fixup! 3370810: Delete chrome/service, AKA the Cloud Print service process. * revert 3348007 to fix windows build * 3318572: [Code health] Fix gn check errors in //extensions/browser:* https://chromium-review.googlesource.com/c/chromium/src/+/3318572 * fix printing.patch * fix iwyu issue * 3408515: win: Make ShorcutOperation an enum class and modernize names https://chromium-review.googlesource.com/c/chromium/src/+/3408515 * 3388333: [UIA] Remove dead code accessibility_misc_utils.h/cc https://chromium-review.googlesource.com/c/chromium/src/+/3388333 * fix windows build? i hope * patch gn visibility of //ui/ozone/platform/x11 * missing include base/logging.h * use BUILDFLAG for USE_NSS_CERTS https://chromium-review.googlesource.com/c/chromium/src/+/3379123 * defined(OS_*) ==> BUILDFLAG(IS_*) https://bugs.chromium.org/p/chromium/issues/detail?id=1234043 * fixup! 3404768: Remove ALLOW_UNUSED macros * another attempt to fix windows build * temporarily disable the custom scheme service worker test https://github.com/electron/electron/issues/32664 * fix loading mv3 extensions not sure what cl broke this unfort. * fixup! 3404768: Remove ALLOW_UNUSED macros * patch nan https://chromium-review.googlesource.com/c/v8/v8/+/3395880 * fix node test * fix nullptr in FindPdfFrame * patch perfetto to fix build issue on win-ia32 https://source.chromium.org/chromium/_/android/platform/external/perfetto.git/+/bc44c3c7533c00e56f88c06c592d634aecc884be * fix build for linux-x64-testing-no-run-as-node * fix patch * skip .capturePage() test https://github.com/electron/electron/issues/32705 * test: fix failing tests of focus/blur events of WebContents (#32711) * inherit stdio from app module test child processes this prevents them from timing out due to full stdout buffers * test to see if we can get better logs on windows ci * try again for appveyor log things * skip contentTracing tests on ia32 * ci: disable gpu compositing * drop applied patch * fix merge fail * Revert "ci: disable gpu compositing" This reverts commit 0344129fcb19ea3e87e06c1110d751f22eba3fec. Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt Co-authored-by: VerteDinde Co-authored-by: VerteDinde Co-authored-by: Jeremy Rose Co-authored-by: Jeremy Rose Co-authored-by: Cheng Zhao Co-authored-by: deepak1556 (cherry picked from commit 28ada6ea8bd2abeca8812e6d284c1f5f3974286b) * chore: bump chromium to 100.0.4894.0 (main) (#32852) * chore: bump chromium in DEPS to 100.0.4880.0 * resolve conflicts * chore: update patches * fix patch * PIP20: add a new DocumentOverlayWindowViews subtype https://chromium-review.googlesource.com/c/chromium/src/+/3252789 * Clean up PictureInPictureWindowManager::EnterPictureInPicture() https://chromium-review.googlesource.com/c/chromium/src/+/3424145 * Remove StoragePartitionId. https://chromium-review.googlesource.com/c/chromium/src/+/2811120 * Remove FLoC code https://chromium-review.googlesource.com/c/chromium/src/+/3424359 * media: Make AddSupportedKeySystems() Async https://chromium-review.googlesource.com/c/chromium/src/+/3430502 * [Extensions] Move some l10n file util methods to //extensions/browser https://chromium-review.googlesource.com/c/chromium/src/+/3408192 * chore: IWYU * Reland "webhid: Grant permissions for policy-allowed devices" https://chromium-review.googlesource.com/c/chromium/src/+/3444147 * Migrate base::Value::GetList() to base::Value::GetListDeprecated(): 2/N. https://chromium-review.googlesource.com/c/chromium/src/+/3435727 https://chromium-review.googlesource.com/c/chromium/src/+/3440910 https://chromium-review.googlesource.com/c/chromium/src/+/3440088 * [text blink period] Cache blink period instead of fetching from defaults https://chromium-review.googlesource.com/c/chromium/src/+/3419059 * chore: update picture-in-picture.patch https://chromium-review.googlesource.com/c/chromium/src/+/3252789 * ci: update to Xcode 13.2.1 https://chromium-review.googlesource.com/c/chromium/src/+/3437552 * chore: bump chromium in DEPS to 100.0.4882.1 * chore: update patches * chore: bump chromium in DEPS to 100.0.4884.0 * chore: update patches * chore: bump chromium in DEPS to 100.0.4886.0 * chore: update patches * Refactor DownloadManager to use StoragePartitionConfig https://chromium-review.googlesource.com/c/chromium/src/+/3222011 * Remove ToWebInputElement() in favor of new WebNode::DynamicTo<> helpers. https://chromium-review.googlesource.com/c/chromium/src/+/3433852 * refactor: autofill to use the color pipeline https://bugs.chromium.org/p/chromium/issues/detail?id=1249558 https://bugs.chromium.org/p/chromium/issues/detail?id=1003612 * [ProcessSingleton] Add many more trace events to cover all scenarios https://chromium-review.googlesource.com/c/chromium/src/+/3429325 * fixup! PIP20: add a new DocumentOverlayWindowViews subtype * chore: bump chromium in DEPS to 100.0.4888.0 * chore: update patches * chore: update picture-in-picture.patch * fixup! refactor: autofill to use the color pipeline * ci: fixup fix sync (cherry picked from commit c1e3e395465739bce5ca8e1c5ec1f5bd72b99ebd) * chore: bump chromium in DEPS to 100.0.4889.0 * chore: update patches * chore: fix feat_add_data_transfer_to_requestsingleinstancelock.patch * fixup! PIP20: add a new DocumentOverlayWindowViews subtype * Remove remaining NativeTheme::GetSystemColor() machinery. https://chromium-review.googlesource.com/c/chromium/src/+/3421719 * ci: fetch proper esbuild for macos * ci: fixup fetch proper esbuild for macos * fix: failing Node.js test on outdated CurrentValueSerializerFormatVersion * chore: bump chromium in DEPS to 100.0.4892.0 * 3460365: Set V8 fatal error callbacks during Isolate initialization https://chromium-review.googlesource.com/c/chromium/src/+/3460365 * 3454343: PIP20: use permanent top controls https://chromium-review.googlesource.com/c/chromium/src/+/3454343 * 3465574: Move most of GTK color mixers to ui/color/. https://chromium-review.googlesource.com/c/chromium/src/+/3465574 * chore: fixup patch indices * 3445327: [locales] Remove locales reference https://chromium-review.googlesource.com/c/chromium/src/+/3445327 * 3456548: [DBB][#7] Blue border falls back to all tab if cropped-to zero pixels https://chromium-review.googlesource.com/c/chromium/src/+/3456548 * 3441196: Convert GuestView's remaining legacy IPC messages to Mojo https://chromium-review.googlesource.com/c/chromium/src/+/3441196 * 3455491: Don't include run_loop.h in thread_task_runner_handle.h https://chromium-review.googlesource.com/c/chromium/src/+/3455491 * fixup! 3454343: PIP20: use permanent top controls * 3442501: Add missing includes of //base/observer_list.h https://chromium-review.googlesource.com/c/chromium/src/+/3442501 * 3437552: mac: Deploy a new hermetic build of Xcode 13.2.1 13C100 https://chromium-review.googlesource.com/c/chromium/src/+/3437552 * chore: bump chromium in DEPS to 100.0.4894.0 * fixup! 3460365: Set V8 fatal error callbacks during Isolate initialization * chore: update patches * 3425231: Use DnsOverHttpsConfig where appropriate https://chromium-review.googlesource.com/c/chromium/src/+/3425231 * test: disable test-heapsnapshot-near-heap-limit-worker.js As a result of CLs linked in https://bugs.chromium.org/p/v8/issues/detail?id=12503, heap snapshotting near the heap limit DCHECKS in Node.js specs. This will likely require a larger refactor in Node.js so i've disabled the test for now and opened an upstream issue on node-v8 issue at https://github.com/nodejs/node-v8/issues/218. * Port all usage of NativeTheme color IDs to color pipeline https://bugs.chromium.org/p/chromium/issues/detail?id=1249558 * chore: update patches after rebase * ci: use gen2 machine for more disk space * ci: don't try to make root volume writeable * ci: use older xcode/macos for tests * fix: html fullscreen transitions stacking (cherry picked from commit 5e10965cdd7b2a024def5fc568912cefd0f05b44) * ci: speed up woa testing (cherry picked from commit 75c33c48b032137794f5734348a9ee3daa60d9de) (cherry picked from commit e81996234029669663bf0daaababd34684dcbb17) * ci: disable flaky tests on WOA * ci: run remote tests separately to isolate issue there * tests: disable node test parallel/test-worker-debug for now * revert: fix: html fullscreen transitions stacking * tests: disable flaky test on macOS arm64 * fixup circleci config so build tools can find xcode version * make sure the workspace is clean before job runs (cherry picked from commit 75f713c9748ac1a356846c39f268886130554fd6) * tests: disable flaky test on Linux * ci: debug why windows i32 is crashing * Revert "ci: debug why windows i32 is crashing" This reverts commit 4c4bba87ea76f16ef3b304dadff59ad4d366f60f. Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Jeremy Rose Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 Co-authored-by: John Kleinschmidt Co-authored-by: Shelley Vohr (cherry picked from commit 3da598015bccb8f9ab6833d1163c2fe2b0f2b058) Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> --- .circleci/build_config.yml | 121 +++-- BUILD.gn | 7 +- DEPS | 2 +- appveyor.yml | 8 +- azure-pipelines-woa.yml | 69 +-- chromium_src/BUILD.gn | 19 +- electron_paks.gni | 4 +- filenames.gni | 4 - patches/boringssl/expose_ripemd160.patch | 2 +- patches/chromium/.patches | 6 +- patches/chromium/accelerator.patch | 8 +- ...client_precreatemessageloop_callback.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 30 +- ...pedcliboardwriter_writeunsaferawdata.patch | 12 +- ..._scheduler_throttling_per_renderview.patch | 22 +- ..._windows_to_have_different_web_prefs.patch | 20 +- ...leges_in_unsandboxed_child_processes.patch | 2 +- patches/chromium/blink_file_path.patch | 4 +- patches/chromium/blink_local_frame.patch | 10 +- patches/chromium/boringssl_build_gn.patch | 4 +- ..._node_processes_as_browser_processes.patch | 4 +- .../build_add_electron_tracing_category.patch | 4 +- ..._depend_on_packed_resource_integrity.patch | 22 +- .../build_libc_as_static_library.patch | 6 +- patches/chromium/can_create_window.patch | 50 +- ..._v8_initialization_isolate_callbacks.patch | 4 +- ...screationoverridden_with_full_params.patch | 50 +- ...esources_not_chrome_for_spellchecker.patch | 14 +- patches/chromium/chrome_key_systems.patch | 4 +- patches/chromium/command-ismediakey.patch | 4 +- ...allow_disabling_compression_on_linux.patch | 8 +- .../crash_allow_setting_more_options.patch | 20 +- patches/chromium/dcheck.patch | 7 +- patches/chromium/desktop_media_list.patch | 14 +- patches/chromium/disable-redraw-lock.patch | 6 +- .../disable_color_correct_rendering.patch | 63 ++- .../disable_compositor_recycling.patch | 2 +- patches/chromium/disable_hidden.patch | 10 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 24 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- ...ingcontext_calls_to_newpage_pagedone.patch | 511 ------------------ patches/chromium/dump_syms.patch | 4 +- .../chromium/enable_reset_aspect_ratio.patch | 6 +- ...locator_for_usage_outside_of_the_gin.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 20 +- .../extend_apply_webpreferences.patch | 10 +- ...ransfer_to_requestsingleinstancelock.patch | 76 +-- ...dd_set_theme_source_to_allow_apps_to.patch | 21 +- ..._registry_to_multibuffer_data_source.patch | 4 +- ...g_the_base_spellchecker_download_url.patch | 4 +- ...to_add_observers_on_created_hunspell.patch | 8 +- ...screen_rendering_with_viz_compositor.patch | 56 +- ..._raw_response_headers_from_urlloader.patch | 48 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...x_crash_when_saving_edited_pdf_files.patch | 6 +- ...ed_windows_when_calling_showinactive.patch | 42 -- ...ete_SerialPortManager_on_main_thread.patch | 2 +- ...ntcapturercount_in_web_contents_impl.patch | 10 +- ...media_key_usage_with_globalshortcuts.patch | 4 +- ...rmissions_checks_in_exclusive_access.patch | 4 +- ...out_profile_refs_in_accessibility_ui.patch | 20 +- ..._properly_honor_printing_page_ranges.patch | 4 +- ...fix_use_electron_generated_resources.patch | 2 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 14 +- ...gpu_notify_when_dxdiag_request_fails.patch | 12 +- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 32 +- ...nse_interceptor_to_point_to_electron.patch | 4 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 6 +- patches/chromium/isolate_holder.patch | 32 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- ...reate_a_console_if_logging_to_stderr.patch | 6 +- ...clude_of_stack_trace_h_unconditional.patch | 24 - patches/chromium/mas-cfisobjc.patch | 8 +- .../mas-cgdisplayusesforcetogray.patch | 4 +- .../mas_disable_remote_accessibility.patch | 48 +- .../chromium/mas_disable_remote_layer.patch | 36 +- patches/chromium/mas_no_private_api.patch | 32 +- ...emote_certificate_verification_logic.patch | 26 +- .../chromium/notification_provenance.patch | 6 +- patches/chromium/pepper_plugin_support.patch | 28 +- patches/chromium/picture-in-picture.patch | 217 ++++++-- ...utofill_colors_to_the_color_pipeline.patch | 97 ++++ patches/chromium/printing.patch | 145 ++--- patches/chromium/process_singleton.patch | 74 +-- patches/chromium/proxy_config_monitor.patch | 2 +- ...put_back_deleted_colors_for_autofill.patch | 117 ---- ...r_changes_to_the_webcontentsobserver.patch | 16 +- ...store_base_adaptcallbackforrepeating.patch | 2 +- ...f_incognito_apis_in_the_spellchecker.patch | 4 +- .../render_widget_host_view_base.patch | 6 +- .../render_widget_host_view_mac.patch | 14 +- patches/chromium/resource_file_conflict.patch | 6 +- ..._using_nsrunloop_in_renderer_process.patch | 28 - patches/chromium/scroll_bounce_flag.patch | 4 +- .../chromium/skip_atk_toolchain_check.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 14 +- patches/chromium/ui_gtk_public_header.patch | 10 +- ...andboxed_ppapi_processes_skip_zygote.patch | 10 +- .../v8_context_snapshot_generator.patch | 4 +- patches/chromium/web_contents.patch | 12 +- patches/chromium/webview_cross_drag.patch | 4 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 16 +- ...feat_add_hook_to_notify_script_ready.patch | 22 +- patches/config.json | 4 + ...bals_to_allow_patching_devtools_dock.patch | 4 +- patches/nan/.patches | 1 + ...use_new_constructor_for_scriptorigin.patch | 42 ++ patches/node/.patches | 2 + ...fix_failing_node_js_test_on_outdated.patch | 35 ++ patches/node/fix_serdes_test.patch | 36 ++ patches/perfetto/.patches | 1 + ...size_t_to_be_intptr_t_to_match_libuv.patch | 26 + patches/v8/.patches | 2 +- patches/v8/build_gn.patch | 8 +- patches/v8/dcheck.patch | 8 +- ...export_private_v8_symbols_on_windows.patch | 4 +- ...ort_symbols_needed_for_windows_build.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- ...ed_attirbute_for_older_msvc_versions.patch | 2 +- ...dcheck_for_node_stream_array_buffers.patch | 4 +- ...in_v8_scriptormodule_legacy_lifetime.patch | 56 -- ...eleted_cstors_in_cppheapcreateparams.patch | 21 + ...workaround_an_undefined_symbol_error.patch | 8 +- script/node-disabled-tests.json | 2 + .../zip_manifests/dist_zip.mac.arm64.manifest | 4 +- .../zip_manifests/dist_zip.mac.x64.manifest | 4 +- .../dist_zip.mac_mas.arm64.manifest | 4 +- .../dist_zip.mac_mas.x64.manifest | 4 +- shell/app/electron_content_client.cc | 4 +- shell/app/electron_crash_reporter_client.cc | 18 +- shell/app/electron_crash_reporter_client.h | 10 +- shell/app/electron_library_main.h | 4 +- shell/app/electron_main_delegate.cc | 48 +- shell/app/electron_main_delegate.h | 4 +- shell/app/electron_main_linux.cc | 13 +- shell/app/electron_main_mac.cc | 2 +- shell/app/electron_main_win.cc | 2 +- shell/app/node_main.cc | 14 +- shell/app/uv_stdio_fix.cc | 12 +- shell/app/uv_task_runner.cc | 1 + shell/app/uv_task_runner.h | 3 +- shell/browser/api/electron_api_app.cc | 114 ++-- shell/browser/api/electron_api_app.h | 21 +- shell/browser/api/electron_api_base_window.cc | 24 +- shell/browser/api/electron_api_base_window.h | 8 +- .../api/electron_api_browser_window.cc | 24 +- .../browser/api/electron_api_browser_window.h | 2 +- .../api/electron_api_crash_reporter.cc | 18 +- .../browser/api/electron_api_crash_reporter.h | 2 +- .../api/electron_api_desktop_capturer.cc | 14 +- .../api/electron_api_desktop_capturer.h | 4 +- shell/browser/api/electron_api_dialog.cc | 2 +- .../api/electron_api_global_shortcut.cc | 8 +- .../api/electron_api_in_app_purchase.cc | 4 +- shell/browser/api/electron_api_menu.cc | 10 +- shell/browser/api/electron_api_menu.h | 4 +- .../browser/api/electron_api_native_theme.cc | 6 +- shell/browser/api/electron_api_native_theme.h | 2 +- shell/browser/api/electron_api_net.cc | 1 + .../browser/api/electron_api_power_monitor.cc | 8 +- .../browser/api/electron_api_power_monitor.h | 10 +- shell/browser/api/electron_api_screen.cc | 6 +- shell/browser/api/electron_api_session.cc | 8 +- .../api/electron_api_system_preferences.cc | 10 +- .../api/electron_api_system_preferences.h | 16 +- shell/browser/api/electron_api_tray.cc | 16 +- shell/browser/api/electron_api_url_loader.cc | 11 +- shell/browser/api/electron_api_url_loader.h | 10 +- .../browser/api/electron_api_web_contents.cc | 88 +-- shell/browser/api/electron_api_web_contents.h | 10 +- .../api/electron_api_web_contents_view.cc | 6 +- shell/browser/api/frame_subscriber.cc | 2 + shell/browser/api/frame_subscriber.h | 1 + shell/browser/api/gpu_info_enumerator.cc | 18 +- shell/browser/api/gpuinfo_manager.cc | 2 +- shell/browser/api/process_metric.cc | 14 +- shell/browser/api/process_metric.h | 12 +- shell/browser/auto_updater.cc | 2 +- shell/browser/browser.cc | 6 +- shell/browser/browser.h | 40 +- shell/browser/browser_linux.cc | 4 +- shell/browser/browser_observer.h | 2 +- shell/browser/browser_process_impl.cc | 11 +- shell/browser/browser_process_impl.h | 5 +- shell/browser/electron_browser_client.cc | 204 ++++--- shell/browser/electron_browser_client.h | 30 +- shell/browser/electron_browser_context.cc | 2 +- shell/browser/electron_browser_main_parts.cc | 79 ++- shell/browser/electron_browser_main_parts.h | 16 +- .../electron_download_manager_delegate.cc | 4 +- shell/browser/electron_gpu_client.cc | 4 +- ...electron_pdf_web_contents_helper_client.cc | 11 + .../electron_pdf_web_contents_helper_client.h | 2 + shell/browser/electron_permission_manager.cc | 8 +- shell/browser/extensions/api/BUILD.gn | 1 - .../cryptotoken_private_api.cc | 10 +- shell/browser/extensions/api/i18n/i18n_api.cc | 24 - shell/browser/extensions/api/i18n/i18n_api.h | 20 - .../electron_extension_host_delegate.cc | 4 +- .../electron_extension_host_delegate.h | 4 +- .../electron_extension_message_filter.cc | 8 +- .../extensions/electron_extension_system.cc | 3 +- .../extensions/electron_extension_system.h | 3 +- ...lectron_extensions_browser_api_provider.cc | 2 +- .../electron_extensions_browser_client.cc | 4 +- shell/browser/feature_list.cc | 8 +- shell/browser/file_select_helper.cc | 14 +- shell/browser/file_select_helper.h | 4 +- .../font/electron_font_access_delegate.cc | 42 -- .../font/electron_font_access_delegate.h | 31 -- shell/browser/font_defaults.cc | 8 +- shell/browser/hid/electron_hid_delegate.cc | 11 +- shell/browser/hid/electron_hid_delegate.h | 6 +- shell/browser/javascript_environment.cc | 10 +- shell/browser/native_window.cc | 20 +- shell/browser/native_window.h | 8 +- shell/browser/native_window_observer.h | 4 +- shell/browser/native_window_views.cc | 132 ++--- shell/browser/native_window_views.h | 18 +- shell/browser/native_window_views_win.cc | 4 +- shell/browser/net/asar/asar_url_loader.cc | 3 +- .../net/electron_url_loader_factory.cc | 8 +- shell/browser/net/network_context_service.cc | 5 +- shell/browser/net/node_stream_loader.cc | 3 +- .../net/proxying_url_loader_factory.cc | 7 +- .../browser/net/proxying_url_loader_factory.h | 4 +- .../net/system_network_context_manager.cc | 71 +-- shell/browser/net/url_pipe_loader.cc | 3 +- .../win/windows_toast_notification.cc | 1 + shell/browser/osr/osr_host_display_client.cc | 4 +- shell/browser/osr/osr_host_display_client.h | 4 +- .../osr/osr_render_widget_host_view.cc | 2 +- .../browser/osr/osr_render_widget_host_view.h | 10 +- shell/browser/osr/osr_video_consumer.cc | 2 + shell/browser/osr/osr_video_consumer.h | 1 + shell/browser/osr/osr_web_contents_view.cc | 10 +- shell/browser/osr/osr_web_contents_view.h | 8 +- shell/browser/pref_store_delegate.h | 1 + shell/browser/protocol_registry.cc | 4 +- shell/browser/relauncher.cc | 16 +- shell/browser/relauncher.h | 6 +- .../browser/serial/serial_chooser_context.cc | 24 +- shell/browser/serial/serial_chooser_context.h | 8 +- .../serial/serial_chooser_controller.cc | 4 +- shell/browser/ui/autofill_popup.cc | 9 +- shell/browser/ui/autofill_popup.h | 4 +- shell/browser/ui/electron_menu_model.cc | 4 +- shell/browser/ui/electron_menu_model.h | 8 +- shell/browser/ui/gtk/app_indicator_icon.cc | 1 + shell/browser/ui/inspectable_web_contents.cc | 10 +- .../ui/inspectable_web_contents_view.h | 2 +- .../inspectable_web_contents_view_delegate.h | 2 +- shell/browser/ui/tray_icon.h | 6 +- shell/browser/ui/views/autofill_popup_view.cc | 18 +- .../ui/views/electron_views_delegate.cc | 8 +- .../ui/views/electron_views_delegate.h | 6 +- .../inspectable_web_contents_view_views.cc | 2 +- shell/browser/ui/views/menu_bar.cc | 29 +- shell/browser/ui/views/menu_bar.h | 2 +- shell/browser/ui/views/root_view.cc | 2 +- shell/browser/ui/views/submenu_button.cc | 2 +- shell/browser/web_contents_preferences.cc | 8 +- shell/browser/web_contents_preferences.h | 2 +- shell/browser/web_contents_zoom_controller.h | 1 + shell/browser/window_list.cc | 2 +- shell/browser/zoom_level_delegate.cc | 43 +- shell/common/api/electron_api_clipboard.cc | 8 +- shell/common/api/electron_api_native_image.cc | 24 +- shell/common/api/electron_api_native_image.h | 10 +- shell/common/api/electron_api_shell.cc | 15 +- shell/common/api/electron_api_v8_util.cc | 1 + shell/common/api/electron_bindings.cc | 12 +- shell/common/application_info.h | 6 +- shell/common/asar/archive.cc | 20 +- shell/common/asar/asar_util.cc | 2 +- shell/common/asar/scoped_temporary_file.cc | 4 +- shell/common/crash_keys.cc | 12 +- shell/common/electron_command_line.cc | 4 +- shell/common/electron_command_line.h | 2 +- shell/common/electron_paths.h | 14 +- shell/common/extensions/api/BUILD.gn | 2 - .../extensions/electron_extensions_client.cc | 2 +- .../extensions/electron_extensions_client.h | 2 +- shell/common/gin_converters/base_converter.h | 2 +- shell/common/gin_converters/guid_converter.h | 8 +- shell/common/gin_converters/net_converter.cc | 2 +- shell/common/gin_converters/std_converter.h | 6 +- shell/common/gin_helper/callback.h | 6 +- shell/common/keyboard_util.cc | 44 +- shell/common/logging.cc | 11 +- shell/common/node_bindings.cc | 12 +- shell/common/node_bindings.h | 2 +- shell/common/platform_util.h | 6 +- shell/common/platform_util_linux.cc | 1 + shell/common/skia_util.cc | 4 +- shell/common/skia_util.h | 2 +- shell/common/v8_value_converter.cc | 10 +- .../api/electron_api_context_bridge.cc | 9 +- shell/renderer/electron_api_service_impl.cc | 3 +- shell/renderer/electron_autofill_agent.cc | 25 +- .../electron_sandboxed_renderer_client.cc | 4 +- shell/renderer/renderer_client_base.cc | 12 +- shell/renderer/renderer_client_base.h | 4 +- .../electron_content_utility_client.cc | 30 +- .../utility/electron_content_utility_client.h | 8 - spec-main/api-app-spec.ts | 4 +- spec-main/api-content-tracing-spec.ts | 4 +- spec-main/api-protocol-spec.ts | 5 +- spec-main/api-web-frame-main-spec.ts | 5 +- spec-main/chromium-spec.ts | 6 +- spec-main/extensions-spec.ts | 6 +- spec-main/webview-spec.ts | 3 +- spec/webview-spec.js | 5 +- 317 files changed, 2446 insertions(+), 2817 deletions(-) delete mode 100644 patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch delete mode 100644 patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch delete mode 100644 patches/chromium/make_include_of_stack_trace_h_unconditional.patch create mode 100644 patches/chromium/port_autofill_colors_to_the_color_pipeline.patch delete mode 100644 patches/chromium/put_back_deleted_colors_for_autofill.patch delete mode 100644 patches/chromium/revert_stop_using_nsrunloop_in_renderer_process.patch create mode 100644 patches/nan/.patches create mode 100644 patches/nan/use_new_constructor_for_scriptorigin.patch create mode 100644 patches/node/fix_failing_node_js_test_on_outdated.patch create mode 100644 patches/node/fix_serdes_test.patch create mode 100644 patches/perfetto/.patches create mode 100644 patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch delete mode 100644 patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch create mode 100644 patches/v8/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch delete mode 100644 shell/browser/extensions/api/i18n/i18n_api.cc delete mode 100644 shell/browser/extensions/api/i18n/i18n_api.h delete mode 100644 shell/browser/font/electron_font_access_delegate.cc delete mode 100644 shell/browser/font/electron_font_access_delegate.h diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index ff88d9a5188c6..92786e1398706 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -52,11 +52,17 @@ executors: parameters: size: description: "macOS executor size" - default: large + default: macos.x86.medium.gen2 type: enum - enum: ["medium", "large"] + enum: ["macos.x86.medium.gen2", "large"] + xcode: + description: "xcode version" + default: "12.4.0" + type: enum + enum: ["12.4.0", "13.2.1"] + macos: - xcode: "12.4.0" + xcode: << parameters.xcode >> resource_class: << parameters.size >> # Electron Runners @@ -349,10 +355,6 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac command: | if [ "`uname`" == "Darwin" ]; then sudo mkdir -p $TMPDIR/del-target - if [ "$TARGET_ARCH" == "arm64" ]; then - # Remount the root volume as writable, don't ask questions plz - sudo mount -uw / - fi tmpify() { if [ -d "$1" ]; then sudo mv "$1" $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1) @@ -394,33 +396,32 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac tmpify /usr/local/Homebrew sudo rm -rf $TMPDIR/del-target - if [ "$TARGET_ARCH" == "arm64" ]; then - sudo rm -rf "/System/Library/Desktop Pictures" - sudo rm -rf /System/Library/Templates/Data - sudo rm -rf /System/Library/Speech/Voices - sudo rm -rf "/System/Library/Screen Savers" - sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs - sudo rm -rf "/System/Volumes/Data/Library/Application Support/Apple/Photos/Print Products" - sudo rm -rf /System/Volumes/Data/Library/Java - sudo rm -rf /System/Volumes/Data/Library/Ruby - sudo rm -rf /System/Volumes/Data/Library/Printers - sudo rm -rf /System/iOSSupport - sudo rm -rf /System/Applications/*.app - sudo rm -rf /System/Applications/Utilities/*.app - sudo rm -rf /System/Library/LinguisticData - sudo rm -rf /System/Volumes/Data/private/var/db/dyld/* - # sudo rm -rf /System/Library/Fonts/* - # sudo rm -rf /System/Library/PreferencePanes - sudo rm -rf /System/Library/AssetsV2/* - sudo rm -rf /Applications/Safari.app - sudo rm -rf ~/project/src/build/linux - sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data - sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS - - # lipo off some huge binaries arm64 versions to save space - strip_arm_deep $(xcode-select -p)/../SharedFrameworks - strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr - fi + # sudo rm -rf "/System/Library/Desktop Pictures" + # sudo rm -rf /System/Library/Templates/Data + # sudo rm -rf /System/Library/Speech/Voices + # sudo rm -rf "/System/Library/Screen Savers" + # sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs + # sudo rm -rf "/System/Volumes/Data/Library/Application Support/Apple/Photos/Print Products" + # sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/ + # sudo rm -rf /System/Volumes/Data/Library/Java + # sudo rm -rf /System/Volumes/Data/Library/Ruby + # sudo rm -rf /System/Volumes/Data/Library/Printers + # sudo rm -rf /System/iOSSupport + # sudo rm -rf /System/Applications/*.app + # sudo rm -rf /System/Applications/Utilities/*.app + # sudo rm -rf /System/Library/LinguisticData + # sudo rm -rf /System/Volumes/Data/private/var/db/dyld/* + # sudo rm -rf /System/Library/Fonts/* + # sudo rm -rf /System/Library/PreferencePanes + # sudo rm -rf /System/Library/AssetsV2/* + sudo rm -rf /Applications/Safari.app + sudo rm -rf ~/project/src/build/linux + sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data + sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS + + # lipo off some huge binaries arm64 versions to save space + strip_arm_deep $(xcode-select -p)/../SharedFrameworks + # strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr fi background: true @@ -461,10 +462,18 @@ step-fix-sync: &step-fix-sync # Fix Clang Install (wrong binary) rm -rf src/third_party/llvm-build python3 src/tools/clang/scripts/update.py + + # Fix esbuild (wrong binary) + echo 'infra/3pp/tools/esbuild/${platform}' `gclient getdep --deps-file=src/third_party/devtools-frontend/src/DEPS -r 'third_party/esbuild:infra/3pp/tools/esbuild/${platform}'` > esbuild_ensure_file + cipd ensure --root src/third_party/devtools-frontend/src/third_party/esbuild -ensure-file esbuild_ensure_file fi cd src/third_party/angle + rm .git/objects/info/alternates git remote set-url origin https://chromium.googlesource.com/angle/angle.git + cp .git/config .git/config.backup + git remote remove origin + mv .git/config.backup .git/config git fetch step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac @@ -1893,7 +1902,9 @@ jobs: checkout: true osx-testing-x64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-testing-build @@ -1910,14 +1921,16 @@ jobs: osx-testing-x64-gn-check: executor: name: macos - size: medium + xcode: "13.2.1" environment: <<: *env-machine-mac <<: *env-testing-build <<: *steps-electron-gn-check osx-publish-x64-skip-checkout: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large-release <<: *env-release-build @@ -1936,7 +1949,9 @@ jobs: checkout: false osx-publish-arm64-skip-checkout: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large-release <<: *env-release-build @@ -1956,7 +1971,9 @@ jobs: checkout: false osx-testing-arm64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-testing-build @@ -1973,7 +1990,9 @@ jobs: attach: true mas-testing-x64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-mas @@ -1991,7 +2010,7 @@ jobs: mas-testing-x64-gn-check: executor: name: macos - size: medium + xcode: "13.2.1" environment: <<: *env-machine-mac <<: *env-mas @@ -1999,7 +2018,9 @@ jobs: <<: *steps-electron-gn-check mas-publish-x64-skip-checkout: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large-release <<: *env-mas @@ -2018,7 +2039,9 @@ jobs: checkout: false mas-publish-arm64-skip-checkout: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large-release <<: *env-mas-apple-silicon @@ -2038,7 +2061,9 @@ jobs: checkout: false mas-testing-arm64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-testing-build @@ -2225,9 +2250,7 @@ jobs: <<: *steps-tests osx-testing-x64-tests: - executor: - name: macos - size: medium + executor: macos environment: <<: *env-mac-large <<: *env-stack-dumping @@ -2243,9 +2266,7 @@ jobs: <<: *steps-tests mas-testing-x64-tests: - executor: - name: macos - size: medium + executor: macos environment: <<: *env-mac-large <<: *env-stack-dumping diff --git a/BUILD.gn b/BUILD.gn index a2d9691301c2e..1738d10b14053 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -361,6 +361,7 @@ source_set("electron_lib") { "//components/network_hints/common:mojo_bindings", "//components/network_hints/renderer", "//components/network_session_configurator/common", + "//components/omnibox/browser:buildflags", "//components/os_crypt", "//components/pref_registry", "//components/prefs", @@ -472,8 +473,8 @@ source_set("electron_lib") { if (is_linux) { deps += [ - "//build/config/linux/gtk:gtkprint", "//components/crash/content/browser", + "//ui/gtk:gtk_config", ] } @@ -549,7 +550,7 @@ source_set("electron_lib") { sources += filenames.lib_sources_linux_x11 public_deps += [ "//ui/base/x", - "//ui/platform_window/x11", + "//ui/ozone/platform/x11", ] } configs += [ ":gio_unix" ] @@ -1186,7 +1187,7 @@ if (is_mac) { if (enable_hidpi) { data += [ "$root_out_dir/chrome_200_percent.pak" ] } - foreach(locale, locales) { + foreach(locale, platform_pak_locales) { data += [ "$root_out_dir/locales/$locale.pak" ] } diff --git a/DEPS b/DEPS index 858f9f05f58f6..790da2014c4de 100644 --- a/DEPS +++ b/DEPS @@ -15,7 +15,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '99.0.4767.0', + '100.0.4894.0', 'node_version': 'v16.13.2', 'nan_version': diff --git a/appveyor.yml b/appveyor.yml index 64b906aa0c010..fab35e3bc66d2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,6 +34,7 @@ environment: GIT_CACHE_PATH: C:\Users\electron\libcc_cache ELECTRON_OUT_DIR: Default ELECTRON_ENABLE_STACK_DUMPING: 1 + ELECTRON_ALSO_LOG_TO_STDERR: 1 MOCHA_REPORTER: mocha-multi-reporters MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap GOMA_FALLBACK_ON_AUTH_FAILURE: true @@ -209,7 +210,9 @@ test_script: } - cd electron # CalculateNativeWinOcclusion is disabled due to https://bugs.chromium.org/p/chromium/issues/detail?id=1139022 - - if "%RUN_TESTS%"=="true" ( echo Running test suite & node script/yarn test -- --trace-uncaught --enable-logging --disable-features=CalculateNativeWinOcclusion ) + - if "%RUN_TESTS%"=="true" ( echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging=file --log-file=%cd%\electron.log --disable-features=CalculateNativeWinOcclusion ) + - if "%RUN_TESTS%"=="true" ( echo Running remote test suite & node script/yarn test -- --trace-uncaught --runners=remote --runTestFilesSeperately --enable-logging=file --log-file=%cd%\electron.log --disable-features=CalculateNativeWinOcclusion ) + - if "%RUN_TESTS%"=="true" ( echo Running native test suite & node script/yarn test -- --trace-uncaught --runners=native --enable-logging=file --log-file=%cd%\electron.log --disable-features=CalculateNativeWinOcclusion ) - cd .. - if "%RUN_TESTS%"=="true" ( echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg ) - echo "About to verify mksnapshot" @@ -217,6 +220,7 @@ test_script: - echo "Done verifying mksnapshot" - if "%RUN_TESTS%"=="true" ( echo Verifying chromedriver & python electron\script\verify-chromedriver.py --build-dir out\Default --source-root %cd% ) - echo "Done verifying chromedriver" + - if exist %cd%\electron.log ( appveyor-retry appveyor PushArtifact %cd%\electron.log ) deploy_script: - cd electron - ps: >- @@ -231,3 +235,5 @@ deploy_script: } elseif (Test-Path Env:\TEST_WOA) { node script/release/ci-release-build.js --job=electron-woa-testing --ci=VSTS --armTest --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH } +on_finish: + - if exist src\electron\electron.log ( appveyor-retry appveyor PushArtifact src\electron\electron.log ) diff --git a/azure-pipelines-woa.yml b/azure-pipelines-woa.yml index 62cf7232f8296..9942f97f79dc3 100644 --- a/azure-pipelines-woa.yml +++ b/azure-pipelines-woa.yml @@ -1,11 +1,11 @@ +workspace: + clean: all + steps: -- task: CopyFiles@2 - displayName: 'Copy Files to: src\electron' - inputs: - TargetFolder: src\electron +- checkout: self + path: src\electron - script: | - cd src\electron node script/yarn.js install --frozen-lockfile displayName: 'Yarn install' @@ -13,13 +13,13 @@ steps: $localArtifactPath = "$pwd\dist.zip" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/dist.zip" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } - & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\Default -y $localArtifactPath + & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -o$(Pipeline.Workspace)\src\out\Default -y $localArtifactPath displayName: 'Download and extract dist.zip for test' env: APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - powershell: | - $localArtifactPath = "$pwd\src\out\Default\shell_browser_ui_unittests.exe" + $localArtifactPath = "$(Pipeline.Workspace)\src\out\Default\shell_browser_ui_unittests.exe" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/shell_browser_ui_unittests.exe" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } displayName: 'Download and extract native test executables for test' @@ -30,56 +30,57 @@ steps: $localArtifactPath = "$pwd\ffmpeg.zip" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/ffmpeg.zip" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } - & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\ffmpeg $localArtifactPath + & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -o$(Pipeline.Workspace)\src\out\ffmpeg $localArtifactPath displayName: 'Download and extract ffmpeg.zip for test' env: APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - powershell: | - $localArtifactPath = "$pwd\src\node_headers.zip" + $localArtifactPath = "$(Pipeline.Workspace)\src\node_headers.zip" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/node_headers.zip" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } - cd src + cd $(Pipeline.Workspace)\src & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y node_headers.zip displayName: 'Download node headers for test' env: APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - powershell: | - $localArtifactPath = "$pwd\src\out\Default\electron.lib" + $localArtifactPath = "$(Pipeline.Workspace)\src\out\Default\electron.lib" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/electron.lib" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } displayName: 'Download electron.lib for test' env: APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) -- powershell: | - try { - $localArtifactPath = "$pwd\src\pdb.zip" - $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/pdb.zip" - Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } - cd src - & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y pdb.zip - } catch { - Write-Host "There was an exception encountered while downloading pdb files:" $_.Exception.Message - } finally { - $global:LASTEXITCODE = 0 - } - displayName: 'Download pdb files for detailed stacktraces' - env: - APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) +# Uncomment the following block if pdb files are needed to debug issues +# - powershell: | +# try { +# $localArtifactPath = "$(Pipeline.Workspace)\src\pdb.zip" +# $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/pdb.zip" +# Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } +# cd $(Pipeline.Workspace)\src +# & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y pdb.zip +# } catch { +# Write-Host "There was an exception encountered while downloading pdb files:" $_.Exception.Message +# } finally { +# $global:LASTEXITCODE = 0 +# } +# displayName: 'Download pdb files for detailed stacktraces' +# env: +# APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - powershell: | - New-Item src\out\Default\gen\node_headers\Release -Type directory - Copy-Item -path src\out\Default\electron.lib -destination src\out\Default\gen\node_headers\Release\node.lib + New-Item $(Pipeline.Workspace)\src\out\Default\gen\node_headers\Release -Type directory + Copy-Item -path $(Pipeline.Workspace)\src\out\Default\electron.lib -destination $(Pipeline.Workspace)\src\out\Default\gen\node_headers\Release\node.lib displayName: 'Setup node headers' - script: | - cd src + cd $(Pipeline.Workspace)\src set npm_config_nodedir=%cd%\out\Default\gen\node_headers set npm_config_arch=arm64 cd electron - node script/yarn test --runners=main --runTestFilesSeperately --enable-logging --disable-features=CalculateNativeWinOcclusion + node script/yarn test --runners=main --enable-logging --disable-features=CalculateNativeWinOcclusion displayName: 'Run Electron Main process tests' env: ELECTRON_ENABLE_STACK_DUMPING: true @@ -90,7 +91,7 @@ steps: MOCHA_REPORTER: mocha-multi-reporters - script: | - cd src + cd $(Pipeline.Workspace)\src set npm_config_nodedir=%cd%\out\Default\gen\node_headers set npm_config_arch=arm64 cd electron @@ -102,17 +103,17 @@ steps: ELECTRON_TEST_RESULTS_DIR: junit MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap' MOCHA_REPORTER: mocha-multi-reporters - condition: always() + condition: succeededOrFailed() - task: PublishTestResults@2 displayName: 'Publish Test Results' inputs: testResultsFiles: '*.xml' - searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/' + searchFolder: '$(Pipeline.Workspace)/src/junit/' condition: always() - script: | - cd src + cd $(Pipeline.Workspace)\src echo "Verifying non proprietary ffmpeg" python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg displayName: 'Verify ffmpeg' diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index c30edae4ac665..4c048a63aef2e 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -53,8 +53,8 @@ static_library("chrome") { "//chrome/browser/predictors/resolve_host_client_impl.cc", "//chrome/browser/predictors/resolve_host_client_impl.h", "//chrome/browser/process_singleton.h", - "//chrome/browser/ui/browser_dialogs.cc", - "//chrome/browser/ui/browser_dialogs.h", + "//chrome/browser/process_singleton_internal.cc", + "//chrome/browser/process_singleton_internal.h", "//chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.cc", "//chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h", "//chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc", @@ -140,10 +140,6 @@ static_library("chrome") { "//components/optimization_guide/proto:optimization_guide_proto", ] - if (enable_basic_printing && is_win) { - deps += [ "//chrome/common:cloud_print_utility_mojom" ] - } - if (is_linux) { sources += [ "//chrome/browser/icon_loader_auralinux.cc" ] if (use_ozone) { @@ -243,8 +239,6 @@ static_library("chrome") { sources += [ "//chrome/browser/printing/pdf_to_emf_converter.cc", "//chrome/browser/printing/pdf_to_emf_converter.h", - "//chrome/utility/printing_handler.cc", - "//chrome/utility/printing_handler.h", ] } } @@ -259,8 +253,12 @@ static_library("chrome") { "//chrome/browser/ui/views/overlay/close_image_button.cc", "//chrome/browser/ui/views/overlay/close_image_button.h", "//chrome/browser/ui/views/overlay/constants.h", + "//chrome/browser/ui/views/overlay/document_overlay_window_views.cc", + "//chrome/browser/ui/views/overlay/document_overlay_window_views.h", "//chrome/browser/ui/views/overlay/hang_up_button.cc", "//chrome/browser/ui/views/overlay/hang_up_button.h", + "//chrome/browser/ui/views/overlay/overlay_window_image_button.cc", + "//chrome/browser/ui/views/overlay/overlay_window_image_button.h", "//chrome/browser/ui/views/overlay/overlay_window_views.cc", "//chrome/browser/ui/views/overlay/overlay_window_views.h", "//chrome/browser/ui/views/overlay/playback_image_button.cc", @@ -275,11 +273,14 @@ static_library("chrome") { "//chrome/browser/ui/views/overlay/toggle_microphone_button.h", "//chrome/browser/ui/views/overlay/track_image_button.cc", "//chrome/browser/ui/views/overlay/track_image_button.h", + "//chrome/browser/ui/views/overlay/video_overlay_window_views.cc", + "//chrome/browser/ui/views/overlay/video_overlay_window_views.h", ] deps += [ "//chrome/app/vector_icons", "//components/vector_icons:vector_icons", + "//ui/views/controls/webview", ] } @@ -299,6 +300,8 @@ static_library("chrome") { sources += [ "//chrome/browser/pdf/pdf_extension_util.cc", "//chrome/browser/pdf/pdf_extension_util.h", + "//chrome/browser/pdf/pdf_frame_util.cc", + "//chrome/browser/pdf/pdf_frame_util.h", "//chrome/renderer/pepper/chrome_pdf_print_client.cc", "//chrome/renderer/pepper/chrome_pdf_print_client.h", ] diff --git a/electron_paks.gni b/electron_paks.gni index e85e26cf3077f..84cec359e201b 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -193,13 +193,13 @@ template("electron_paks") { "//ui/strings:ui_strings", ] - input_locales = locales + input_locales = platform_pak_locales output_dir = "${invoker.output_dir}/locales" if (is_mac) { output_locales = locales_as_mac_outputs } else { - output_locales = locales + output_locales = platform_pak_locales } } diff --git a/filenames.gni b/filenames.gni index eb30e8506ff0e..8e6da3eb657f4 100644 --- a/filenames.gni +++ b/filenames.gni @@ -386,8 +386,6 @@ filenames = { "shell/browser/file_select_helper.cc", "shell/browser/file_select_helper.h", "shell/browser/file_select_helper_mac.mm", - "shell/browser/font/electron_font_access_delegate.cc", - "shell/browser/font/electron_font_access_delegate.h", "shell/browser/font_defaults.cc", "shell/browser/font_defaults.h", "shell/browser/hid/electron_hid_delegate.cc", @@ -681,8 +679,6 @@ filenames = { ] lib_sources_extensions = [ - "shell/browser/extensions/api/i18n/i18n_api.cc", - "shell/browser/extensions/api/i18n/i18n_api.h", "shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc", "shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h", "shell/browser/extensions/api/management/electron_management_api_delegate.cc", diff --git a/patches/boringssl/expose_ripemd160.patch b/patches/boringssl/expose_ripemd160.patch index 8671efe04dca9..fede352bb528f 100644 --- a/patches/boringssl/expose_ripemd160.patch +++ b/patches/boringssl/expose_ripemd160.patch @@ -82,7 +82,7 @@ index a3fb077b9b9e66d1bc524fd7987622e73aa4776a..852b76bea69988e0b3ac76a17b603128 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 fa7616896b6cc7422dc0171db29316f20fb25de8..6c19a0f0d454bef1abf16ebfeef380a53fb21e5c 100644 +index 6e889993edc1caa7e10670529dd270c337b5ae4c..f61f7e5009a9b4f5630cda2c3a5a21b44e5b88d8 100644 --- a/include/openssl/digest.h +++ b/include/openssl/digest.h @@ -90,6 +90,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void); diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 328f5c6c59c36..174a219c8b744 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -48,7 +48,6 @@ worker_context_will_destroy.patch frame_host_manager.patch crashpad_pid_check.patch network_service_allow_remote_certificate_verification_logic.patch -put_back_deleted_colors_for_autofill.patch disable_color_correct_rendering.patch add_contentgpuclient_precreatemessageloop_callback.patch picture-in-picture.patch @@ -92,7 +91,6 @@ webview_fullscreen.patch disable_unload_metrics.patch fix_add_check_for_sandbox_then_result.patch extend_apply_webpreferences.patch -make_include_of_stack_trace_h_unconditional.patch build_libc_as_static_library.patch build_do_not_depend_on_packed_resource_integrity.patch refactor_restore_base_adaptcallbackforrepeating.patch @@ -109,9 +107,7 @@ mas_gate_private_enterprise_APIs.patch load_v8_snapshot_in_browser_process.patch fix_patch_out_permissions_checks_in_exclusive_access.patch fix_aspect_ratio_with_max_size.patch -revert_stop_using_nsrunloop_in_renderer_process.patch fix_dont_delete_SerialPortManager_on_main_thread.patch feat_add_data_transfer_to_requestsingleinstancelock.patch fix_crash_when_saving_edited_pdf_files.patch -drop_extra_printingcontext_calls_to_newpage_pagedone.patch -fix_don_t_restore_maximized_windows_when_calling_showinactive.patch +port_autofill_colors_to_the_color_pipeline.patch diff --git a/patches/chromium/accelerator.patch b/patches/chromium/accelerator.patch index 6ba88a66c47ee..04f4464c2dbbf 100644 --- a/patches/chromium/accelerator.patch +++ b/patches/chromium/accelerator.patch @@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc 3. Ctrl-Shift-= and Ctrl-Plus show up as such diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc -index be0df3662e3a1528fb88d5c723da49e5a29ac2b9..64a5eda05be16b3b6e1a0ceaa2b3a6884ca37268 100644 +index 2468b2c5881821d6f8e24a0e7c42243427b384ad..7e44c97edabf5ae012ff4f84d1404d8f223a13fe 100644 --- a/ui/base/accelerators/accelerator.cc +++ b/ui/base/accelerators/accelerator.cc @@ -11,6 +11,7 @@ @@ -30,7 +30,7 @@ index be0df3662e3a1528fb88d5c723da49e5a29ac2b9..64a5eda05be16b3b6e1a0ceaa2b3a688 + if (shifted_char) { + shortcut += *shifted_char; + } else { - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) // Our fallback is to try translate the key code to a regular character // unless it is one of digits (VK_0 to VK_9). Some keyboard @@ -261,6 +267,10 @@ std::u16string Accelerator::GetShortcutText() const { @@ -43,7 +43,7 @@ index be0df3662e3a1528fb88d5c723da49e5a29ac2b9..64a5eda05be16b3b6e1a0ceaa2b3a688 + base::StringPrintf("F%d", key_code_ - VKEY_F1 + 1)); } - #if defined(OS_MAC) + #if BUILDFLAG(IS_MAC) @@ -451,7 +461,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( const std::u16string& shortcut) const { std::u16string result = shortcut; @@ -63,7 +63,7 @@ index be0df3662e3a1528fb88d5c723da49e5a29ac2b9..64a5eda05be16b3b6e1a0ceaa2b3a688 if (IsCmdDown()) { diff --git a/ui/base/accelerators/accelerator.h b/ui/base/accelerators/accelerator.h -index 5cdb2f160beae4d7787eb84d5013280ee9464446..76bd4369faa5d43d8a99ea51ed012857d6bff293 100644 +index e0d9df439d120c0a47f55666b3818c7ba6796e70..283c6283f5aeaae1a5436e5fbb17ce2db4a9034e 100644 --- a/ui/base/accelerators/accelerator.h +++ b/ui/base/accelerators/accelerator.h @@ -16,6 +16,7 @@ diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 4f034602a39dd..14d1535fe63f8 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.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 cdd437ad553493535015fd93d19aa29843e10c38..99b285b46c2193d0526fac8b706073213fa0846e 100644 +index 9f840287967b50ec1db3a9d27973429ab231a486..731a279e395a8762a25a115665bff99be428de3d 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -237,6 +237,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -239,6 +239,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index cdd437ad553493535015fd93d19aa29843e10c38..99b285b46c2193d0526fac8b70607321 // 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 -@@ -343,7 +347,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -345,7 +349,6 @@ int GpuMain(MainFunctionParams parameters) { GpuProcess gpu_process(io_thread_priority); #endif diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 8f8194bfc1c3b..b76baf2e4e6ba 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the context, which can cause some preload scripts to trip. diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index f6d262f1bf7aa77c2a63f4a4c3351be0fe2ab3fd..52db2e1948fd7752b88d5a692748053491594c2d 100644 +index a92e09dc651a5f1a9bbae2572fad32233afcd46c..f99b652dda817b62615d2b3f00b4ae4b438ec44d 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -129,6 +129,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, @@ -23,10 +23,10 @@ index f6d262f1bf7aa77c2a63f4a4c3351be0fe2ab3fd..52db2e1948fd7752b88d5a6927480534 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 584ae29be139c9be347e4fa9f920a2cc84baf00a..c7a5f0916cf8ba6db6fa85537c140024a92ff24d 100644 +index 4473c5e812a4a598f3e2f2bb06f78def5791af24..44c0ec9815aafd61182fd18a9d125e185d7196bc 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4515,6 +4515,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4455,6 +4455,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index 584ae29be139c9be347e4fa9f920a2cc84baf00a..c7a5f0916cf8ba6db6fa85537c140024 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 1b582c1736db20dab712ee7875f37c2140bd7d45..efab4f51e56e6e179fb832b1cf47d7f4a348e6c7 100644 +index 21b90bbb8fe8ddc03eb20538be423a5396d18eb3..f9c735038f733d990783dd66ffe8c74f824c78f2 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -602,6 +602,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -597,6 +597,8 @@ class CONTENT_EXPORT RenderFrameImpl blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index 1b582c1736db20dab712ee7875f37c2140bd7d45..efab4f51e56e6e179fb832b1cf47d7f4 int world_id) override; void DidChangeScrollOffset() override; diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h -index 994841c02b0472e5239d9b73a07b2592a39df8be..ad19a3cddf200f6600a04c1136fd21218d496ba8 100644 +index 3d6e0c0395ff7c92d8908c5151b467beec3a7516..2fadd6d9b2e3747eacea08973d8d3c7aa9c15f26 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -596,6 +596,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -599,6 +599,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -67,10 +67,10 @@ index 994841c02b0472e5239d9b73a07b2592a39df8be..ad19a3cddf200f6600a04c1136fd2121 virtual void WillReleaseScriptContext(v8::Local, int32_t world_id) {} diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -index 29e255dc75a1d54211dc6059801d3c16b7cefdca..044195c7d77be5ff4abe9d2a71ddbbf2076b2efd 100644 +index aa4b510137d60e6fb924f4f1a6554fe06c19ad75..816b6260020a6cbb6880b0eed197743ccd9002f5 100644 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -@@ -214,6 +214,7 @@ void LocalWindowProxy::Initialize() { +@@ -205,6 +205,7 @@ void LocalWindowProxy::Initialize() { } InstallConditionalFeatures(); @@ -79,10 +79,10 @@ index 29e255dc75a1d54211dc6059801d3c16b7cefdca..044195c7d77be5ff4abe9d2a71ddbbf2 if (World().IsMainWorld()) { GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld(); diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index c28bc5f4d285ab2db1b0501ad8663c4f948f3ddc..327c04b40460fc033ca7f4e4f838608cfc6c0ba3 100644 +index 0dda1f7cd77c47f7e61ba48dd20429c13679b543..2f73aacda1bafe07775213e232eda56c4b33325b 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -311,6 +311,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -308,6 +308,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,7 +92,7 @@ index c28bc5f4d285ab2db1b0501ad8663c4f948f3ddc..327c04b40460fc033ca7f4e4f838608c int32_t world_id) = 0; virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index 0922aaf1a5f076ed4544b6870ac3674b023c428b..ff8ccf56eaafe36fe4de08a448789b13033e8604 100644 +index 5297ad63f1c76240d57a64cc5ea64cbf8c7e1b95..006da6072db12da1632f9d45ecb5710136573641 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc @@ -274,6 +274,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -110,7 +110,7 @@ index 0922aaf1a5f076ed4544b6870ac3674b023c428b..ff8ccf56eaafe36fe4de08a448789b13 v8::Local context, int32_t world_id) { diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -index 59dd5662dccea2e570b93e7bbdc59fded301979c..30d7bafbf5877d71868fbdec9abbcacacd4b72a8 100644 +index 708414fca139eb8328e425d909a48ca97038e442..48b2a0e129ec166ebd4c9bbd32330b0cc43dbeb2 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h @@ -78,6 +78,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index 59dd5662dccea2e570b93e7bbdc59fded301979c..30d7bafbf5877d71868fbdec9abbcaca int32_t world_id) override; diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index 42f30c871534bf7037c13d71802443baa20eb850..552909b44f47d64a260b9cd39ea42dac41e31603 100644 +index 4b639069d5d9173f0c35fe7656356031ba424a61..3da6699b40bf4f91e6d76a37e5fa8f680f7a7850 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -356,6 +356,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -357,6 +357,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch index 70d6a9524d22f..01c36b3c68ded 100644 --- a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch +++ b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch @@ -8,12 +8,12 @@ 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 153f169d2cdef6f8a726c188283a5bc1b7395fa3..3a5d9ab8dafacafb1025e1cb8c157e8a82078424 100644 +index 3009acd40eee36bc3d4dd8642f0ce5e6476da973..1d52ce84184a3ca94e4e0f04d331bf56d75e07d0 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/ui/base/clipboard/scoped_clipboard_writer.cc -@@ -212,6 +212,16 @@ void ScopedClipboardWriter::WriteData(const std::u16string& format, - } +@@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting( } + #endif // BUILDFLAG(IS_CHROMEOS_ASH) +void ScopedClipboardWriter::WriteUnsafeRawData(const std::u16string& format, + mojo_base::BigBuffer data) { @@ -29,10 +29,10 @@ index 153f169d2cdef6f8a726c188283a5bc1b7395fa3..3a5d9ab8dafacafb1025e1cb8c157e8a objects_.clear(); platform_representations_.clear(); diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h -index 879acd4f6f0101a6da3af58d78eeda877ea41a4a..4d4149b6aa34c7073804994cb1c03368830c736d 100644 +index c47909313da0d7cd8a2b3cd670327011af66e3fb..0d259c21507f38124dfa46aceeacfda76cfd4a38 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.h +++ b/ui/base/clipboard/scoped_clipboard_writer.h -@@ -80,6 +80,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter { +@@ -84,6 +84,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter { // This is only used to write custom format data. void WriteData(const std::u16string& format, mojo_base::BigBuffer data); @@ -42,4 +42,4 @@ index 879acd4f6f0101a6da3af58d78eeda877ea41a4a..4d4149b6aa34c7073804994cb1c03368 + void WriteImage(const SkBitmap& bitmap); - // Mark the data to be written as confidential. + #if BUILDFLAG(IS_CHROMEOS_LACROS) diff --git a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch index 6c0d43aab7bce..9a54c4fbe9988 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 2d918fcf473d6ce399dde0413da0b1d7444c32c0..29f53b668d6c8f50d901bf214d19ae08d765944d 100644 +index 56c08919ab626a8a7b3bcb892ee94cdee2a106fc..b85bdf4ed574a149a6502e8d21e54f2ee80777a5 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -633,6 +633,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -647,6 +647,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -22,10 +22,10 @@ index 2d918fcf473d6ce399dde0413da0b1d7444c32c0..29f53b668d6c8f50d901bf214d19ae08 return is_active(); } diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h -index c2d024d09dda8b221cc588e784cb2d31c273d0ff..c0fd9c5400acf32c89a477797c4d9c45662fb14c 100644 +index 9e32df9f5fd765895c8470c3922a62f754e7d409..9bac2321d65d9e54ce88fffafd72a74803ed2c87 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h -@@ -136,6 +136,7 @@ class CONTENT_EXPORT RenderViewHostImpl +@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl bool IsRenderViewLive() override; void WriteIntoTrace(perfetto::TracedValue context) override; @@ -48,7 +48,7 @@ index 787077d71c04d571aa825bec0a549c5fad2b8574..4b05b80802ba97a46eed60e509b503fc // This interface should only be implemented inside content. friend class RenderViewHostImpl; diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h -index 975757f5e878004180f155583712ad48de781ef6..3dad0b314f0d4e7f93e8b727f2ef875ce9d4762e 100644 +index 4e8d36420d6edc1725a840e1b9f123041d21abe4..dd198cb7bf02e509833c6b4c7d8e5d65d20d46dc 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -152,6 +152,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, @@ -61,7 +61,7 @@ index 975757f5e878004180f155583712ad48de781ef6..3dad0b314f0d4e7f93e8b727f2ef875c // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put // it in the same order in the .cc file as it was in the header. diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom -index b7c6ba65551acd31c96be06c3d7595f28b6855b0..21ce5fe263f8a47281b21c45c7bda9eff1cb17b5 100644 +index befd736a9cf362514b9a2ee475dc4a814c85a87b..24b2617f56673a3075697802cf5b574b0c766610 100644 --- a/third_party/blink/public/mojom/page/page.mojom +++ b/third_party/blink/public/mojom/page/page.mojom @@ -97,4 +97,7 @@ interface PageBroadcast { @@ -85,10 +85,10 @@ index 14d4a00293ab0b11e733676844ce483992d6cd8e..c6c2dbb9dddd1eaa21e8c7b276d871a3 // Visibility ----------------------------------------------------------- diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 6531f9b8d7720c8d3bb5f5df677cbac13a17454d..d4602eb32f1f14f639df26f866f5406ab36003d5 100644 +index 8cdffac8ecb9ed2c6892f1e975a953846e7e3a5c..7e7927c7258963bd95a2c064ef85e410f4d2571d 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3662,6 +3662,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3659,6 +3659,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 6531f9b8d7720c8d3bb5f5df677cbac13a17454d..d4602eb32f1f14f639df26f866f5406a void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3673,7 +3680,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3670,7 +3677,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,7 +113,7 @@ index 6531f9b8d7720c8d3bb5f5df677cbac13a17454d..d4602eb32f1f14f639df26f866f5406a mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() { diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index cce6788b0a529ffb4d6330237c50c8f9a1b2093a..83c95f9867cbf52646a9b093706b05d8d99ce3b6 100644 +index 5107ef421138e136b20b25b7bbcc1f0bb246bb66..043266205142e59f88c4c2f2ae6b58bb009f2d9c 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h @@ -420,6 +420,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -124,7 +124,7 @@ index cce6788b0a529ffb4d6330237c50c8f9a1b2093a..83c95f9867cbf52646a9b093706b05d8 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -856,6 +857,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -857,6 +858,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // If true, we send IPC messages when |preferred_size_| changes. bool send_preferred_size_changes_ = false; diff --git a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch index 3a9f7941b6f61..763b2ecf84401 100644 --- a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch +++ b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch @@ -8,10 +8,10 @@ WebPreferences of in-process child windows, rather than relying on process-level command line switches, as before. diff --git a/third_party/blink/common/web_preferences/web_preferences.cc b/third_party/blink/common/web_preferences/web_preferences.cc -index 6356025f24855b789b0fdb492ca61232bc6d8000..7eab027f4af2a10c77a8754f6faf06a67b2edce0 100644 +index 30e237f886b41bdf528b2a0e81054d15fb323f1f..43f7920cf6ff12d8a48ddef5440814a42266e8c5 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc -@@ -144,6 +144,20 @@ WebPreferences::WebPreferences() +@@ -145,6 +145,20 @@ WebPreferences::WebPreferences() fake_no_alloc_direct_call_for_testing_enabled(false), v8_cache_options(blink::mojom::V8CacheOptions::kDefault), record_whole_document(false), @@ -33,7 +33,7 @@ index 6356025f24855b789b0fdb492ca61232bc6d8000..7eab027f4af2a10c77a8754f6faf06a6 accelerated_video_decode_enabled(false), animation_policy( diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -index 98391c17bc6c3371919966e9caf09efbcc94cec6..c2d3457f17a076e238dc851b5c61a9ed0efb3a19 100644 +index d278453a261fe2dd3bacce433e35d50879b555a7..140f8d6273d944bfe36831d27aef757d89240b56 100644 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc @@ -22,6 +22,10 @@ bool StructTraitslazy_frame_loading_distance_thresholds_px) || !data.ReadLazyImageLoadingDistanceThresholdsPx( -@@ -156,6 +160,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); @@ -68,7 +68,7 @@ index 98391c17bc6c3371919966e9caf09efbcc94cec6..c2d3457f17a076e238dc851b5c61a9ed out->accelerated_video_decode_enabled = data.accelerated_video_decode_enabled(); diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h -index 9eefe05ffbd6f78a869e2a7449a8fa7c7d456dda..cc57fcbe8a1c51db906731c18a5ffe3bc711a755 100644 +index 8509f720c5afb816c6cbb2313dd566a24236a790..b9f0f79d96c58a7769939610bb72f8b2bcd3be94 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -10,6 +10,7 @@ @@ -79,7 +79,7 @@ index 9eefe05ffbd6f78a869e2a7449a8fa7c7d456dda..cc57fcbe8a1c51db906731c18a5ffe3b #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" #include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h" -@@ -161,6 +162,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -160,6 +161,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { blink::mojom::V8CacheOptions v8_cache_options; bool record_whole_document; @@ -103,7 +103,7 @@ index 9eefe05ffbd6f78a869e2a7449a8fa7c7d456dda..cc57fcbe8a1c51db906731c18a5ffe3b // only controls whether or not the "document.cookie" field is properly // connected to the backing store, for instance if you wanted to be able to diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -index 5124059d0df902d3879f2c96d001472a10c2ead1..9ab4f31275dfebc98ef94ed496a23e8c28168c3a 100644 +index a6291be3e953ceaee1d996e4b30a6ae78916bc7a..c3baf95c5d9b6a6ace56bcde9e1dc8179f18eaa0 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h @@ -6,6 +6,7 @@ @@ -114,7 +114,7 @@ index 5124059d0df902d3879f2c96d001472a10c2ead1..9ab4f31275dfebc98ef94ed496a23e8c #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -446,6 +447,60 @@ struct BLINK_COMMON_EXPORT StructTraitsDetach(FrameDetachType::kRemove); -@@ -152,6 +144,14 @@ bool Frame::Detach(FrameDetachType type) { +@@ -153,6 +145,14 @@ bool Frame::Detach(FrameDetachType type) { GetWindowProxyManager()->ClearForSwap(); } @@ -49,10 +49,10 @@ index 1b022bf6b37982e6321120951de5d8dcc10ecf6a..5cd7cf680244383e466106801103871b // 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 fc47c47cc197a674d97e77e35a904d3bfb481891..bc1444a76d72f1f40966ddac21e689a4a5995125 100644 +index db69148e0756ed36bcf3a04f1ace69cc166261a6..bcf072a6d8bc46e5c71d9ef3f248b6af69693ac9 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -533,10 +533,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -538,10 +538,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index fc47c47cc197a674d97e77e35a904d3bfb481891..bc1444a76d72f1f40966ddac21e689a4 if (!Client()) return false; -@@ -582,6 +578,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -587,6 +583,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/boringssl_build_gn.patch b/patches/chromium/boringssl_build_gn.patch index 309ff79d0a556..05fde5454844e 100644 --- a/patches/chromium/boringssl_build_gn.patch +++ b/patches/chromium/boringssl_build_gn.patch @@ -6,10 +6,10 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index 91ce539f2cdf3c17645126088ecb00e36befd1b8..8e1d78fdb56372836cea73e35cb4e03059cf5ec5 100644 +index f222ae94a5a10ced84e41ef84560af46a910577f..c18d26de9a63befca3c77fe5ecd93975a016797f 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn -@@ -47,6 +47,20 @@ config("no_asm_config") { +@@ -44,6 +44,20 @@ config("no_asm_config") { all_sources = crypto_sources + ssl_sources all_headers = crypto_headers + ssl_headers diff --git a/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch b/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch index d86fd3e45eca1..1222c47289414 100644 --- a/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch +++ b/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch @@ -10,7 +10,7 @@ breakpad independently, as a "browser" process. This patches crash annotation. diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index f55fd1c92770de6b8bce1fc46a047c79228d451e..5b308900ae8e9d49d711a1638e40c22d1d45af80 100644 +index 43f6d476f3ee2759cf41c492f932522994e7ddec..8df14f416ee321e1259433715a61fa6025207d80 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -718,8 +718,13 @@ bool CrashDone(const MinidumpDescriptor& minidump, @@ -29,7 +29,7 @@ index f55fd1c92770de6b8bce1fc46a047c79228d451e..5b308900ae8e9d49d711a1638e40c22d info.distro = base::g_linux_distro; info.distro_length = my_strlen(base::g_linux_distro); info.upload = upload; -@@ -2026,8 +2031,13 @@ void InitCrashReporter(const std::string& process_type) { +@@ -2025,8 +2030,13 @@ void InitCrashReporter(const std::string& process_type) { process_type == kWebViewSingleProcessType || process_type == kBrowserProcessType || #endif diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 96be2ad1e190d..22145207fe628 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,10 +8,10 @@ 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 f6f346bbc56d4a1f8693330b010fd4b3c2d28628..981eaef314d8ff0301e8d008927d02fc8a12ae54 100644 +index 107516329273ee4a6cc49433b69f307b1264362b..0c9555a04233d07a186e34ada8b7615095854950 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -77,6 +77,7 @@ +@@ -78,6 +78,7 @@ X("drmcursor") \ X("dwrite") \ X("DXVA_Decoding") \ diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index 176d5bc5a649f..c692f905ec181 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -11,15 +11,15 @@ 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 33e8d4f5b27532d015d8cd4dbe7d2550916eb436..76945ae5d23af853d920810cbcb248c0daf2f544 100644 +index 7caaf66cad9d5b9f787cea0d49c32c26801571c2..f45691888b74643189b956928fdc796bfc5bcee3 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -170,11 +170,16 @@ if (!is_android && !is_mac) { +@@ -171,11 +171,16 @@ if (!is_android && !is_mac) { "common/crash_keys.h", ] + if (!is_electron_build) { -+ deps += [ ++ deps = [ + ":packed_resources_integrity", + ] + } @@ -33,23 +33,23 @@ index 33e8d4f5b27532d015d8cd4dbe7d2550916eb436..76945ae5d23af853d920810cbcb248c0 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 8f418d78b7ac7a23d80f44e23d430febe641cf0a..dc378e799bad709709f339864fdf63e6d9a6cb69 100644 +index 6a40a73520a951d7c6fd06cbd07329a40ff41544..9ca837d995160d57c7efb51c54cf27283b11b20e 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4528,7 +4528,7 @@ static_library("browser") { +@@ -4502,7 +4502,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. - if (!is_win) { + if (!is_win && !is_electron_build) { deps += [ "//chrome:packed_resources_integrity" ] + sources += [ "certificate_viewer_stub.cc" ] } - diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 4d35024ba4a2f490f5749449c8772da60fb6eb46..de0d4c18362ba9c8e288e532b11f114f3b3f9532 100644 +index 7be0809cfd3a08a87b29256241bc11a33abd3d17..e3c85fd9f550da204e36091bad256b1c2400ade8 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5531,7 +5531,6 @@ test("unit_tests") { +@@ -5719,7 +5719,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 4d35024ba4a2f490f5749449c8772da60fb6eb46..de0d4c18362ba9c8e288e532b11f114f "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5554,6 +5553,10 @@ test("unit_tests") { +@@ -5742,6 +5741,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 4d35024ba4a2f490f5749449c8772da60fb6eb46..de0d4c18362ba9c8e288e532b11f114f ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6245,7 +6248,6 @@ test("unit_tests") { +@@ -6428,7 +6431,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index 4d35024ba4a2f490f5749449c8772da60fb6eb46..de0d4c18362ba9c8e288e532b11f114f "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6286,6 +6288,11 @@ test("unit_tests") { +@@ -6473,6 +6475,11 @@ test("unit_tests") { "//ui/native_theme:test_support", "//ui/webui/resources/js/browser_command:mojo_bindings", ] diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index 59b6758160174..e778543bd5674 100644 --- a/patches/chromium/build_libc_as_static_library.patch +++ b/patches/chromium/build_libc_as_static_library.patch @@ -7,10 +7,10 @@ Build libc++ as static library to compile and pass nan tests diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn -index 48f0bdb17e0a35f6e4d6fa236cd6077910ac76c6..5c95b14441c5604bc14418e4bbaf3df877652b2a 100644 +index 7915346430db72d18474d7a011b8dc7637c3f281..cd736d988f9c5e37dc24c724268fe115e00914d9 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn -@@ -41,7 +41,11 @@ config("winver") { +@@ -44,7 +44,11 @@ config("winver") { if (libcxx_is_shared) { _libcxx_target_type = "shared_library" } else { @@ -23,7 +23,7 @@ index 48f0bdb17e0a35f6e4d6fa236cd6077910ac76c6..5c95b14441c5604bc14418e4bbaf3df8 } target(_libcxx_target_type, "libc++") { # Most things that need to depend on libc++ should do so via the implicit -@@ -49,6 +53,7 @@ target(_libcxx_target_type, "libc++") { +@@ -52,6 +56,7 @@ target(_libcxx_target_type, "libc++") { # need to explicitly depend on libc++. visibility = [ "//build/config:common_deps", diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index e359d3ec35437..bb9b959820869 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -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 38b4d4da5ea013118d8464d82fd84a551a36a80f..165d6b8eb5cb0ce949c71c1707687960c49a4ebb 100644 +index eba372243a31d08c251ad3367d24999277a8289b..713e2883139bca4bb56dcc7e3efcf6d6dfc4a02b 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6602,6 +6602,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6703,6 +6703,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,10 +21,10 @@ index 38b4d4da5ea013118d8464d82fd84a551a36a80f..165d6b8eb5cb0ce949c71c1707687960 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index c4351bea185f1a7d392ef3c1b95d66d35347e87a..131e74e1789632f59086b2bfb390654207f6d18f 100644 +index 3fe9e1e4918ef65194621661c9c7c650089229fa..c8e49eeaca8b31479aa908be9c349ccd625e9e51 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3864,6 +3864,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3925,6 +3925,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -37,9 +37,9 @@ index c4351bea185f1a7d392ef3c1b95d66d35347e87a..131e74e1789632f59086b2bfb3906542 + } + new_contents_impl->GetController().SetSessionStorageNamespace( - partition_id, session_storage_namespace); + partition_config, session_storage_namespace); -@@ -3906,12 +3914,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3967,12 +3975,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,7 +53,7 @@ index c4351bea185f1a7d392ef3c1b95d66d35347e87a..131e74e1789632f59086b2bfb3906542 new_contents_impl, opener, params.target_url, params.referrer.To(), params.disposition, diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index afd57b6d28f8280d8b140370a36d9ca6ec17b774..da44b637ee5fdf371974f322aaf1a07ba8c018d7 100644 +index ace032dc2ffac27fbdddee5a4b13c3c3e36ba5ae..80f7dd56fdaa94a9880995b2b5393af0414eef29 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -550,6 +550,10 @@ struct CreateNewWindowParams { @@ -68,10 +68,10 @@ index afd57b6d28f8280d8b140370a36d9ca6ec17b774..da44b637ee5fdf371974f322aaf1a07b // 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 f26ff2199c9f72adfcea9df0db0dc9f0eb70a127..8bbca0ed64bdfc892b3f2e21f0f88fe14344459d 100644 +index 85ed8b5e84813c10f97c5785d906a87455f8f67e..a11d5ba888c1489870875c859ec9eb79c67f94b7 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -570,6 +570,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -571,6 +571,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index f26ff2199c9f72adfcea9df0db0dc9f0eb70a127..8bbca0ed64bdfc892b3f2e21f0f88fe1 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 d50c7e0c618b8292e38b8f8b307d019701f70e49..253c47f41294155bab9a3b0884e65a09fcacd0d0 100644 +index 47527cb2e434f771f5aeb5099432ae86a0ad06ea..2fe1462a2cd92a731a5816b5fc22b059bad92fe8 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -169,6 +169,7 @@ class NetworkService; +@@ -168,6 +168,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index d50c7e0c618b8292e38b8f8b307d019701f70e49..253c47f41294155bab9a3b0884e65a09 } // namespace network namespace sandbox { -@@ -940,6 +941,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -950,6 +951,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -102,10 +102,10 @@ index d50c7e0c618b8292e38b8f8b307d019701f70e49..253c47f41294155bab9a3b0884e65a09 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 2c87b891defb55771fd7686cb88971cd158c801f..a583c64b44b7add0b46ce25b4112563dd1b7e7b1 100644 +index f132199113778f6b50972419b61a187e6272300c..7bb1680553c405a9016cfd67eca5fa3c6439b692 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc -@@ -27,6 +27,17 @@ namespace content { +@@ -26,6 +26,17 @@ namespace content { WebContentsDelegate::WebContentsDelegate() = default; @@ -124,7 +124,7 @@ index 2c87b891defb55771fd7686cb88971cd158c801f..a583c64b44b7add0b46ce25b4112563d const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index f04506bf8b64fef533d6cd9d2b609e5779c4382f..b0f14ef097c9178aa25bf04d19fff362fabfcf11 100644 +index f889d0bf33cf218a68bf5a9422aecaed23fa260a..3330876f623e5b2cb600b1ce1fd10b3375568613 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -135,8 +135,8 @@ index f04506bf8b64fef533d6cd9d2b609e5779c4382f..b0f14ef097c9178aa25bf04d19fff362 #include "content/public/browser/eye_dropper.h" #include "content/public/browser/invalidate_type.h" #include "content/public/browser/media_stream_request.h" -@@ -344,6 +345,13 @@ class CONTENT_EXPORT WebContentsDelegate { - const StoragePartitionId& partition_id, +@@ -339,6 +340,13 @@ class CONTENT_EXPORT WebContentsDelegate { + const StoragePartitionConfig& partition_config, SessionStorageNamespace* session_storage_namespace); + virtual void WebContentsCreatedWithFullParams( @@ -150,10 +150,10 @@ index f04506bf8b64fef533d6cd9d2b609e5779c4382f..b0f14ef097c9178aa25bf04d19fff362 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 9eb0bc6d5460f640dc95cc170c9808b8e3f5fb16..190b517cea51bd3eae29695ba45efb22c4c82877 100644 +index 83517883144a77a0c775ce2d146b4e85ef79ea97..aa65517a568aa0b324b2c8cca8f60bb532ba085a 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #include "third_party/blink/public/platform/impression_conversions.h" #include "third_party/blink/public/platform/modules/video_capture/web_video_capture_impl_manager.h" #include "third_party/blink/public/platform/url_conversion.h" @@ -161,7 +161,7 @@ index 9eb0bc6d5460f640dc95cc170c9808b8e3f5fb16..190b517cea51bd3eae29695ba45efb22 #include "third_party/blink/public/web/modules/mediastream/web_media_stream_device_observer.h" #include "third_party/blink/public/web/web_frame_widget.h" #include "third_party/blink/public/web/web_local_frame.h" -@@ -290,6 +291,10 @@ WebView* RenderViewImpl::CreateView( +@@ -291,6 +292,10 @@ WebView* RenderViewImpl::CreateView( params->impression = blink::ConvertWebImpressionToImpression(*impression); } @@ -173,10 +173,10 @@ index 9eb0bc6d5460f640dc95cc170c9808b8e3f5fb16..190b517cea51bd3eae29695ba45efb22 /*is_opener_navigation=*/false, request.HasUserGesture(), // `openee_can_access_opener_origin` only matters for opener navigations, 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 99d4577526d64e4a73591be4b5bb4d67826abb1a..213db9dc65d10d70b6e02ee3b9b95d38bd951ba3 100644 +index 54b62065d148ab860a49dc03daaf7680ff00d778..3008d3efe89585a562ae55734938b10ef8b0074e 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc -@@ -439,6 +439,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( +@@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -186,7 +186,7 @@ index 99d4577526d64e4a73591be4b5bb4d67826abb1a..213db9dc65d10d70b6e02ee3b9b95d38 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 76254db8ed262aa105eb9782c533fe6b25324828..3e757eb86ab685901dedde45f21b818438ec4827 100644 +index d4eb4d482b2641585d501131c64b90cc9dbcfd18..132a5d86279b9a2cb4364b9c6d3e89e12d55052e 100644 --- a/content/web_test/browser/web_test_content_browser_client.h +++ b/content/web_test/browser/web_test_content_browser_client.h @@ -80,6 +80,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient { @@ -220,10 +220,10 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc } // 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 324322b9c1096cfd201ac33b279dcbd5a1d56e5d..e1ad20b728028c0ec9de4290afdef17e61df2c85 100644 +index 12658b5c9ca6bc10cffd2c9e8ddf45bac697e75c..284f3ed1513009092ecdf2be6ff87641cc404cd9 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2070,6 +2070,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2051,6 +2051,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, incumbent_window); diff --git a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch index aecb5a5114f97..a0affa82eec7a 100644 --- a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch +++ b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch @@ -9,10 +9,10 @@ we're running with contextIsolation enabled, we should be falling back to Blink's logic. This will be upstreamed in some form. 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 656c09327f0b88a6bdcd2753018fc12d5e931cb8..f787e4e35ea86c68dbf1423a376c75857d3b5b2a 100644 +index 10f34d87d74d81de91cbd006665465cee6c0d21e..93f09cd74b225a8b0c2d2f5280636513e852e8ff 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -457,8 +457,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, +@@ -446,8 +446,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, return {true, std::move(stringified_source)}; } diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index ae811011c4ef2..19409a0d9762f 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -108,10 +108,10 @@ index 6688ba8ba2fb7d930773144cdbc43f1f6fa2b685..22015c7b9b50e1264551ce226757f90e } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index da521ddb3d244d264f11f42a86dce97ba84fac55..8f12ce6257f72786c96428fbbd6040fdf0b87025 100644 +index 04e327d970b872f0a9c505a0b99c6273900930f9..5993b3cb0cbe76cd266dee074effd736efa8fc50 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1762,12 +1762,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1767,12 +1767,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,10 +127,10 @@ index da521ddb3d244d264f11f42a86dce97ba84fac55..8f12ce6257f72786c96428fbbd6040fd WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 10e4e2021cb39f2384f81d7ed8783e85286fa37b..4e98b6a5b51d41631b2f0a4601359b396e9c58b2 100644 +index a63ba24be314eb4372d7dda7206dee4b52730d1e..f9bcaa001bfed987edd0ebb001f5cda0e0aca4aa 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -810,8 +810,7 @@ class Browser : public TabStripModelObserver, +@@ -808,8 +808,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -169,7 +169,7 @@ index b6833e34c5840a4d3a545d1c4a44b2b08d7fc9ea..5ebc16a3545a73e58516cb0fbdddca43 // The profile used for the presentation. raw_ptr 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 2c560d379ee6c08465455ea1dc2c5a59ddb65487..4fd703722db5d679b08acdb8fc080b089dd8c433 100644 +index ed23267cd9f28f4e02d8374177f0bb697547cc2a..a979719f75ab4c9b49775ec3df5eff13f4429a49 100644 --- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc +++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc @@ -70,8 +70,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView { @@ -183,7 +183,7 @@ index 2c560d379ee6c08465455ea1dc2c5a59ddb65487..4fd703722db5d679b08acdb8fc080b08 } 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 1aec422b4c83b823c92d76847366fe0d4d04cd00..ea8354f49b14631cf8671decc1ee96beb18d9561 100644 +index 1911b0558fad1d5834befa98e57a978e6e0b72da..cb85515f79617a32e2809ad6eb7f55e4ecc36b3f 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc @@ -170,14 +170,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden( @@ -218,10 +218,10 @@ index 2930898b03d7b7ef86d13733cec3cbe84105c166..76625339f42a867c8b68840253e91648 void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; diff --git a/components/offline_pages/content/background_loader/background_loader_contents.cc b/components/offline_pages/content/background_loader/background_loader_contents.cc -index 53fad64f87a952fd0d7398958288ecde259b57bf..26f64dabcbee575034e97ada29c7de48b315080f 100644 +index 2834e3ee5778185741779a473cf5157788a76cc5..64fcddc952065e574a84edd99e5b1b80febd3d26 100644 --- a/components/offline_pages/content/background_loader/background_loader_contents.cc +++ b/components/offline_pages/content/background_loader/background_loader_contents.cc -@@ -80,8 +80,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden( +@@ -81,8 +81,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -232,7 +232,7 @@ index 53fad64f87a952fd0d7398958288ecde259b57bf..26f64dabcbee575034e97ada29c7de48 return true; } diff --git a/components/offline_pages/content/background_loader/background_loader_contents.h b/components/offline_pages/content/background_loader/background_loader_contents.h -index c1926fc79e9982739d17f4b971f5e7296afd0cf8..31f036c9d224f7e03d7fe38861db45b8d11a07b8 100644 +index c6bd5c19f8a7ceec17c9e32af5296a9617f3a619..02199b439fba7fdc617b7f7980d958b76d09c4e8 100644 --- a/components/offline_pages/content/background_loader/background_loader_contents.h +++ b/components/offline_pages/content/background_loader/background_loader_contents.h @@ -66,8 +66,7 @@ class BackgroundLoaderContents : public content::WebContentsDelegate { @@ -246,10 +246,10 @@ index c1926fc79e9982739d17f4b971f5e7296afd0cf8..31f036c9d224f7e03d7fe38861db45b8 void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 3bc6a0207a5273e7a7b64ab59d4e3499482e4bd8..676c77b2ac7be7445d92db3fcfc94b5ec4915696 100644 +index 5c63a024827359ccf697d0b7fc8fa2092eb107b7..3da88b5831717c979373c064b4c1520c28d4fd98 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3812,8 +3812,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3873,8 +3873,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -260,10 +260,10 @@ index 3bc6a0207a5273e7a7b64ab59d4e3499482e4bd8..676c77b2ac7be7445d92db3fcfc94b5e static_cast(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 a583c64b44b7add0b46ce25b4112563dd1b7e7b1..2af9f098d59e3b93949a33dae5a8e4b70f15937c 100644 +index 7bb1680553c405a9016cfd67eca5fa3c6439b692..3aa2cca04340098859e1072eaa80a46a8e0463b1 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc -@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( +@@ -134,8 +134,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -274,10 +274,10 @@ index a583c64b44b7add0b46ce25b4112563dd1b7e7b1..2af9f098d59e3b93949a33dae5a8e4b7 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index b0f14ef097c9178aa25bf04d19fff362fabfcf11..590d52000e30c00a06e192d9fd1faafd4173595f 100644 +index 3330876f623e5b2cb600b1ce1fd10b3375568613..a9f48c6577afef8876cd8304ff5a66405b7d8343 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h -@@ -323,8 +323,7 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -318,8 +318,7 @@ class CONTENT_EXPORT WebContentsDelegate { SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -288,7 +288,7 @@ index b0f14ef097c9178aa25bf04d19fff362fabfcf11..590d52000e30c00a06e192d9fd1faafd // Allow delegate to creates a custom WebContents when // WebContents::CreateNewWindow() is called. This function is only called 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 c5f63fc8512bfe0374121950804a4b815bcea44f..fac8e32dc27b248f9e06f3be151e73da51d04a63 100644 +index ce83daee0eb44d72caaf1e7e250ce0c3fadb827c..ed0b508a5d6cdd4433a8117ef2032ce8e1d99273 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc @@ -213,8 +213,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( @@ -302,7 +302,7 @@ index c5f63fc8512bfe0374121950804a4b815bcea44f..fac8e32dc27b248f9e06f3be151e73da // view is used for displaying embedded extension options, we want any // external links to be opened in a new tab, not in a new guest view so we 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 0d6ab312e2bdfac8f1d75ecb5df990d3d158b288..edcdae5183d5a2bcca31b440870f40ed12d7e02c 100644 +index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e1002cf38cc 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.h +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h @@ -58,8 +58,7 @@ class ExtensionOptionsGuest @@ -316,7 +316,7 @@ index 0d6ab312e2bdfac8f1d75ecb5df990d3d158b288..edcdae5183d5a2bcca31b440870f40ed 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 ded1894a7d1d7cc7929af3435978a0eb4a1ac781..3312dc397c96f9c5edc40feb8760ac08aac6dc45 100644 +index 0b01120f6a6053ab03355c93216d703d0958aeab..a1c6c5a4b507bbf50668d7ed2febe97aca942c1d 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 @@ -388,8 +388,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( @@ -330,7 +330,7 @@ index ded1894a7d1d7cc7929af3435978a0eb4a1ac781..3312dc397c96f9c5edc40feb8760ac08 } diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index 4c0820c60e7654657bdb46efbbf072d8bfe149d0..c1c0e744a81c0dee8a3fd3e12d56d7f1bd5e7f1c 100644 +index ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec4844497334 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h @@ -171,8 +171,7 @@ class MimeHandlerViewGuest @@ -344,10 +344,10 @@ index 4c0820c60e7654657bdb46efbbf072d8bfe149d0..c1c0e744a81c0dee8a3fd3e12d56d7f1 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc -index 7d9e445c8b2c727787854aa6e296f2e3784942fb..c82b0b86ab93aceb0d8c0bd5562e72d823166010 100644 +index 424c5f89440dccc29f3431e034d0a4fd4f647a00..8d40d0bd30fc28e841eedb3f34be3c033db62449 100644 --- a/fuchsia/engine/browser/frame_impl.cc +++ b/fuchsia/engine/browser/frame_impl.cc -@@ -401,8 +401,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -402,8 +402,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -358,10 +358,10 @@ index 7d9e445c8b2c727787854aa6e296f2e3784942fb..c82b0b86ab93aceb0d8c0bd5562e72d8 // can catch bad client behavior while not interfering with normal operation. constexpr size_t kMaxPendingWebContentsCount = 10; diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h -index 38b5f8871464fc59c26e619dc2cdcc00711e2ce5..1ba0ac9d291a06f8a23e814742c38fdf382a05ec 100644 +index f2054bca778784c223beb02de150cfeb31c52907..53bf6bc205e9c631597bfbda46f4a0b5b4bb72ed 100644 --- a/fuchsia/engine/browser/frame_impl.h +++ b/fuchsia/engine/browser/frame_impl.h -@@ -290,8 +290,7 @@ class FrameImpl : public fuchsia::web::Frame, +@@ -307,8 +307,7 @@ class FrameImpl : public fuchsia::web::Frame, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -372,10 +372,10 @@ index 38b5f8871464fc59c26e619dc2cdcc00711e2ce5..1ba0ac9d291a06f8a23e814742c38fdf 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 6fa4fa667839531f3ca6ca80f8bf17e135739688..bf56fbe1b7aee1a41a18d1cd98641034ba97a903 100644 +index 2214ba7726f105e62bdc92bd0e6142ea9fa6ed72..2b9b804106317bfc914efacc7adfd282563e4c8b 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc -@@ -177,8 +177,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { +@@ -176,8 +176,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch index c72ca8a8d03e9..262ac6344b129 100644 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch @@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from Electrons grit header instead of Chromes diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 3210670738694953fdd65b1d0c2ca30d7c29d8c9..8f418d78b7ac7a23d80f44e23d430febe641cf0a 100644 +index ec55c3f97988a7de06a738e61e389ba07712ad4e..6a40a73520a951d7c6fd06cbd07329a40ff41544 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -7016,6 +7016,7 @@ static_library("browser") { +@@ -7088,6 +7088,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", @@ -19,11 +19,11 @@ index 3210670738694953fdd65b1d0c2ca30d7c29d8c9..8f418d78b7ac7a23d80f44e23d430feb if (!is_android) { diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc -index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581ccb20bfc5a 100644 +index 7c3b6a69acb16186add5d467dbc22360d90d46d4..703e2ce60f4f35f9c71e8b503ffd62f9ea8f365a 100644 --- a/chrome/browser/spellchecker/spellcheck_factory.cc +++ b/chrome/browser/spellchecker/spellcheck_factory.cc -@@ -6,7 +6,7 @@ - +@@ -7,7 +7,7 @@ + #include "build/build_config.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/spellchecker/spellcheck_service.h" -#include "chrome/grit/locale_settings.h" @@ -32,7 +32,7 @@ index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581cc #include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_service.h" diff --git a/components/language/core/browser/BUILD.gn b/components/language/core/browser/BUILD.gn -index 777634b4f93467051ea9e9e9fe448204a9c28cf1..11454e9e7cd06717033631cc4627c3d061301863 100644 +index fdba4ca90882656d6ba369dae48d5dfc13991cb8..fb3b759362275aafd4ed01a7865a4dd0dfaad727 100644 --- a/components/language/core/browser/BUILD.gn +++ b/components/language/core/browser/BUILD.gn @@ -30,6 +30,7 @@ static_library("browser") { @@ -44,7 +44,7 @@ index 777634b4f93467051ea9e9e9fe448204a9c28cf1..11454e9e7cd06717033631cc4627c3d0 ] } diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc -index 0c34853eba1243519f10bfd5e4dfa5d479a97bcc..99632534a06c11b9e8cb000151fb28e64a5ca0c7 100644 +index 26f86d67c32b2a022698ae5ea5509912d2ccfacb..d48844d49308d67ee7bfa823335c7443173badbe 100644 --- a/components/language/core/browser/language_prefs.cc +++ b/components/language/core/browser/language_prefs.cc @@ -22,7 +22,7 @@ diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index d237b2206d49d..e1eba13e55ffa 100644 --- a/patches/chromium/chrome_key_systems.patch +++ b/patches/chromium/chrome_key_systems.patch @@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm, as its not supported in the current version of chrome. diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc -index 2bead927915b87261c7c4f953e73a887751ec81a..bff0fce048ea59696fec56eec40e8cd3682e821f 100644 +index 0cdaa37db5a4c992c8051a6e4370f61b3e4559a3..58108239e1b5aad967eff63d8eed10a560726c6e 100644 --- a/chrome/renderer/media/chrome_key_systems.cc +++ b/chrome/renderer/media/chrome_key_systems.cc @@ -17,7 +17,9 @@ @@ -20,7 +20,7 @@ index 2bead927915b87261c7c4f953e73a887751ec81a..bff0fce048ea59696fec56eec40e8cd3 #include "components/cdm/renderer/external_clear_key_key_system_properties.h" #include "components/cdm/renderer/widevine_key_system_properties.h" #include "content/public/renderer/render_thread.h" -@@ -200,12 +202,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { +@@ -230,12 +232,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { // Returns persistent-license session support. EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) { diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index 6006b5064d291..3a7e3c694cc04 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -87,10 +87,10 @@ index 0f344ee352a48497e77a72bb298146c61e7fcf2a..3bad4263ea552fc63445bf5613f8add7 // Create an observer that registers a hot key for |accelerator|. std::unique_ptr observer = diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc -index 4145418210c2b1033390ec8a2e657cb1fcd048f8..5938f75742b793868638e693a9a8c8dc686dfc46 100644 +index 4e9e4f4d21fbe650d8f32254a3b450074a038751..ac923f436cbdd6ded0629da4e4c659d94258e55b 100644 --- a/content/browser/media/media_keys_listener_manager_impl.cc +++ b/content/browser/media/media_keys_listener_manager_impl.cc -@@ -290,6 +290,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { +@@ -296,6 +296,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { case ui::VKEY_MEDIA_STOP: system_media_controls_->SetIsStopEnabled(should_enable); break; diff --git a/patches/chromium/crash_allow_disabling_compression_on_linux.patch b/patches/chromium/crash_allow_disabling_compression_on_linux.patch index 39cd097c8cafb..6f4a3b926bbc6 100644 --- a/patches/chromium/crash_allow_disabling_compression_on_linux.patch +++ b/patches/chromium/crash_allow_disabling_compression_on_linux.patch @@ -13,7 +13,7 @@ Ultimately we should remove the option to disable compression, and subsequently remove this patch. diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index 5b308900ae8e9d49d711a1638e40c22d1d45af80..87e222070ce5bbd2f9f5c8bac6db7367b6161931 100644 +index 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb880264464787eb32 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -110,6 +110,8 @@ void SetUploadURL(const std::string& url) { @@ -25,7 +25,7 @@ index 5b308900ae8e9d49d711a1638e40c22d1d45af80..87e222070ce5bbd2f9f5c8bac6db7367 #endif bool g_is_node = false; -@@ -1323,56 +1325,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, +@@ -1322,56 +1324,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, #else // BUILDFLAG(IS_CHROMEOS_ASH) @@ -127,7 +127,7 @@ index 5b308900ae8e9d49d711a1638e40c22d1d45af80..87e222070ce5bbd2f9f5c8bac6db7367 static const char header_msg[] = "--header=Content-Type: multipart/form-data; boundary="; const size_t header_content_type_size = -@@ -1399,7 +1405,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, +@@ -1398,7 +1404,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, static const char kWgetBinary[] = "/usr/bin/wget"; const char* args[] = { kWgetBinary, @@ -137,7 +137,7 @@ index 5b308900ae8e9d49d711a1638e40c22d1d45af80..87e222070ce5bbd2f9f5c8bac6db7367 header_content_type, post_file, g_upload_url, -@@ -2040,6 +2047,7 @@ void InitCrashReporter(const std::string& process_type) { +@@ -2039,6 +2046,7 @@ void InitCrashReporter(const std::string& process_type) { #if !BUILDFLAG(IS_CHROMEOS_ASH) SetUploadURL(GetCrashReporterClient()->GetUploadUrl()); diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index 3ddffd4177ab7..c16edea8ac147 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -9,7 +9,7 @@ rate-limiting, compression and global annotations. This should be upstreamed. diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index ec5b5b9b4da3b19e851c414695b2150b6588ecc7..f55fd1c92770de6b8bce1fc46a047c79228d451e 100644 +index 823e49a234e3dd31bf6527c2e4efa96f3d23f1f2..43f6d476f3ee2759cf41c492f932522994e7ddec 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -112,6 +112,7 @@ void SetUploadURL(const std::string& url) { @@ -21,10 +21,10 @@ index ec5b5b9b4da3b19e851c414695b2150b6588ecc7..f55fd1c92770de6b8bce1fc46a047c79 uint64_t g_process_start_time = 0; pid_t g_pid = 0; diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc -index 89b4bfccd5d3278231726184547378805fb30ed5..9f0cb9d52e2f7fc0c1808500b775bc28b4514d00 100644 +index 82b7f241e26184240260d0b6287ded159681e15b..abbb267f6a40de0cdf4d09700f9dd444a575fbdf 100644 --- a/components/crash/core/app/crash_reporter_client.cc +++ b/components/crash/core/app/crash_reporter_client.cc -@@ -139,6 +139,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) { +@@ -141,6 +141,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) { return false; } @@ -39,11 +39,11 @@ index 89b4bfccd5d3278231726184547378805fb30ed5..9f0cb9d52e2f7fc0c1808500b775bc28 +void CrashReporterClient::GetProcessSimpleAnnotations(std::map* annotations) { +} + - #if defined(OS_ANDROID) + #if BUILDFLAG(IS_ANDROID) unsigned int CrashReporterClient::GetCrashDumpPercentage() { return 100; diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h -index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c318334080b 100644 +index 24e53fa62c2c4a11494ad3d43f0c5a806930fcdd..9b691baa6cc90cc3f9ada307c43f44c4353e2487 100644 --- a/components/crash/core/app/crash_reporter_client.h +++ b/components/crash/core/app/crash_reporter_client.h @@ -5,6 +5,7 @@ @@ -54,7 +54,7 @@ index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c31 #include #include "build/build_config.h" -@@ -144,6 +145,19 @@ class CrashReporterClient { +@@ -146,6 +147,19 @@ class CrashReporterClient { // that case, |breakpad_enabled| is set to the value enforced by policies. virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled); @@ -71,14 +71,14 @@ index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c31 + virtual void GetProcessSimpleAnnotations( + std::map* annotations); + - #if defined(OS_ANDROID) + #if BUILDFLAG(IS_ANDROID) // Used by WebView to sample crashes without generating the unwanted dumps. If // the returned value is less than 100, crash dumping will be sampled to that diff --git a/components/crash/core/app/crashpad_linux.cc b/components/crash/core/app/crashpad_linux.cc -index 212bc8359f454132b3cab81449075c1f18d5bd5b..771197daea11b2b7a9f9e845d3fd886913f1539b 100644 +index dc2b18b322350121768571b7997d632a10220ac9..3e3ee0f721a2316d324fb31e17ba97ff24d9e6d7 100644 --- a/components/crash/core/app/crashpad_linux.cc +++ b/components/crash/core/app/crashpad_linux.cc -@@ -179,6 +179,7 @@ bool PlatformCrashpadInitialization( +@@ -180,6 +180,7 @@ bool PlatformCrashpadInitialization( // where crash_reporter provides it's own values for lsb-release. annotations["lsb-release"] = base::GetLinuxDistro(); #endif @@ -86,7 +86,7 @@ index 212bc8359f454132b3cab81449075c1f18d5bd5b..771197daea11b2b7a9f9e845d3fd8869 std::vector arguments; if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { -@@ -200,6 +201,13 @@ bool PlatformCrashpadInitialization( +@@ -201,6 +202,13 @@ bool PlatformCrashpadInitialization( } #endif diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 718ddfd6c8839..5374f0423050e 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,17 +17,18 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc -index cb6b39ee5cf75fec6cf015072eb1f5be08dcf7c4..269cde5100ff1380a9429e7aad1018b50cc01957 100644 +index 183503c7d9891b7e651f0cac4b2dc97157b61928..1630a0a49a4b88ceda0ee14980236dc614b42c67 100644 --- a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc +++ b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc -@@ -432,7 +432,7 @@ void MobileFriendlinessChecker::ComputeSmallTextRatio( +@@ -511,8 +511,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( ->GetPageScaleConstraintsSet() .FinalConstraints() .initial_scale; - DCHECK_GT(initial_scale, 0); +- + // DCHECK_GT(initial_scale, 0); double actual_font_size = - style.FontSize() * initial_scale / viewport_scalar_; + style.FontSize() * initial_scale / viewport_scalar; double area = text->PhysicalAreaSize(); diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc index fe8d191217e24b08d36339dbf047beaeb6bd6538..870db0552544e3e89d9498c22ec3db81b46df741 100644 diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 636f3f8bff8be..de4da5324bf23 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -82,10 +82,10 @@ index 1e4a652634fbde2ca9a256baca840bbc5a0e001f..546f5bc3a2f79035f0eec196d9e704b8 const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87acf0b622 100644 +index 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..2026b926eee56f6b235963b23ab86b2743eaed90 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc -@@ -17,7 +17,7 @@ +@@ -18,7 +18,7 @@ #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/browser/media/webrtc/desktop_media_list.h" @@ -94,10 +94,10 @@ index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87 #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/content_features.h" -@@ -95,8 +95,9 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr frame, - } +@@ -127,8 +127,9 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { + #endif // BUILDFLAG(IS_WIN) - #if defined(OS_MAC) + #if BUILDFLAG(IS_MAC) +// Refs https://github.com/electron/electron/pull/30507 const base::Feature kWindowCaptureMacV2{"WindowCaptureMacV2", - base::FEATURE_ENABLED_BY_DEFAULT}; @@ -105,7 +105,7 @@ index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87 #endif } // namespace -@@ -274,6 +275,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { +@@ -415,6 +416,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { FROM_HERE, base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished, media_list_)); @@ -115,7 +115,7 @@ index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87 } void NativeDesktopMediaList::Worker::OnCaptureResult( -@@ -435,6 +439,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( +@@ -628,6 +632,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails, base::Unretained(worker_.get()), std::move(native_ids), thumbnail_size_)); diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index cc5ba533a25f2..678825807237a 100644 --- a/patches/chromium/disable-redraw-lock.patch +++ b/patches/chromium/disable-redraw-lock.patch @@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue can be found at https://github.com/electron/electron/issues/1821 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 387b5a7fd9c1971686ee577c5ec8ef9abdb00f74..0b714bac63853fb67f1b5b953c71f7120a266ca9 100644 +index bf32a083d0f0873e112debe0e88ab1be8125a417..8ca72461bb7b42f1bc0da249a36f0fcf9ab6f13c 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -308,6 +308,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; @@ -37,7 +37,7 @@ index 387b5a7fd9c1971686ee577c5ec8ef9abdb00f74..0b714bac63853fb67f1b5b953c71f712 (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -978,6 +983,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -986,6 +991,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } @@ -49,7 +49,7 @@ index 387b5a7fd9c1971686ee577c5ec8ef9abdb00f74..0b714bac63853fb67f1b5b953c71f712 // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index 06b1e3552bb144dea11a100039e354c82657dc79..f6691252bd593e83fdda4fac73498df9d1cf3af6 100644 +index f4efdc7174b90e57fb332f031530545e493a2e0d..9d45f97b930831a703efab2bbdf10afb61140c7f 100644 --- a/ui/views/win/hwnd_message_handler.h +++ b/ui/views/win/hwnd_message_handler.h @@ -205,6 +205,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl, diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index e7c735f81408d..dac0d9fbd0df3 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,22 +20,21 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index c13c06406ec4abd012082c5bfef02f2692a9bba1..0e82b376f740fcd51a608e4f99fcd7a016eefe5f 100644 +index 61ab59e0d97a392ae18c1d7ad7dd606b5cd1c567..2a899818ebb67ba4fc06ccbcff3ee03f6b83c0e6 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1893,6 +1893,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( - - gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace( +@@ -1882,6 +1882,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( + TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { + TargetColorParams params; + if (!settings_.enable_color_correct_rendering) { -+ return {}; ++ return params; + } -+ - constexpr gfx::ColorSpace srgb = gfx::ColorSpace::CreateSRGB(); // If we are likely to software composite the resource, we use sRGB because + // software compositing is unable to perform color conversion. diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index 86180d4f001a7f849553a4bd5401d69fe4f1bec2..953b1f4f24e55e127af5fcb5fb3c4e1e3f23429d 100644 +index 64f1a3a3cb8d82235ff04f5c01a7cf571d8ba00c..ffa8d1a53870663647e423975f00e5650c6ab579 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -93,6 +93,8 @@ class CC_EXPORT LayerTreeSettings { @@ -48,7 +47,7 @@ index 86180d4f001a7f849553a4bd5401d69fe4f1bec2..953b1f4f24e55e127af5fcb5fb3c4e1e // Image Decode Service and raster tiles without images until the decode is // ready. diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h -index e58b4023652785fa8ea47236a5ad7237c7ea6ed2..4ec673ea93410ee00b1af4330fdc8b5267ed6dfa 100644 +index d8e2bd1e55a52e86dda5c1b69c425b49e16538bd..80e2c77066f24e99a1894faadbf1d030a188ffa9 100644 --- a/components/viz/common/display/renderer_settings.h +++ b/components/viz/common/display/renderer_settings.h @@ -24,6 +24,7 @@ class VIZ_COMMON_EXPORT RendererSettings { @@ -60,7 +59,7 @@ index e58b4023652785fa8ea47236a5ad7237c7ea6ed2..4ec673ea93410ee00b1af4330fdc8b52 bool force_antialiasing = false; bool force_blending_with_shaders = false; diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc -index d79f3beb58085672e0a67825a0b60de2a3aeb499..5f7ca2ea0d012be5518dd07ade8cf2820b4fd7a9 100644 +index 6a830ec9f29b9764cd425f0681dafbb18d90b457..a7a095ceb9e626c79db21e0d16c8ef47da860679 100644 --- a/components/viz/host/renderer_settings_creation.cc +++ b/components/viz/host/renderer_settings_creation.cc @@ -17,6 +17,7 @@ @@ -69,9 +68,9 @@ index d79f3beb58085672e0a67825a0b60de2a3aeb499..5f7ca2ea0d012be5518dd07ade8cf282 #include "ui/base/ui_base_switches.h" +#include "ui/gfx/switches.h" - #if defined(OS_APPLE) - #include "ui/base/cocoa/remote_layer_api.h" -@@ -53,6 +54,8 @@ bool GetSwitchValueAsInt(const base::CommandLine* command_line, + #if defined(USE_OZONE) + #include "ui/ozone/public/ozone_platform.h" +@@ -49,6 +50,8 @@ bool GetSwitchValueAsInt(const base::CommandLine* command_line, RendererSettings CreateRendererSettings() { RendererSettings renderer_settings; base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); @@ -81,7 +80,7 @@ index d79f3beb58085672e0a67825a0b60de2a3aeb499..5f7ca2ea0d012be5518dd07ade8cf282 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b30436703aab 100644 +index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b949187690aca71c 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -87,6 +87,9 @@ @@ -163,7 +162,7 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 + gfx::ColorSpace dst_color_space = + PATCH_CS(CurrentRenderPassColorSpace()); - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) // Force sRGB output on Windows for overlay candidate video quads to match @@ -2768,7 +2777,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, @@ -186,7 +185,7 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 /*adjust_src_white_level=*/draw_cache_.is_video_frame, locked_quad.hdr_metadata()); -@@ -3693,7 +3703,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, +@@ -3697,7 +3707,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, const gfx::ColorSpace& dst_color_space, bool adjust_src_white_level, absl::optional hdr_metadata) { @@ -197,7 +196,7 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 gfx::ColorSpace adjusted_src_color_space = src_color_space; if (adjust_src_white_level && src_color_space.IsHDR()) { // TODO(b/183236148): consider using the destination's HDR static metadata -@@ -4076,9 +4088,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( +@@ -4085,9 +4097,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple); } @@ -210,7 +209,7 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 *new_bounds = gfx::RectF(updated_dst_rect.origin(), gfx::SizeF((*overlay_texture)->texture.size())); -@@ -4298,8 +4310,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { +@@ -4307,8 +4319,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { PrepareGeometry(SHARED_BINDING); @@ -222,17 +221,17 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 gfx::Transform render_matrix; render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -4488,3 +4501,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default; - GLRenderer::OverlayTexture::~OverlayTexture() = default; +@@ -4514,3 +4527,5 @@ bool GLRenderer::ColorTransformKey::operator<( + } } // namespace viz + +#undef PATCH_CS diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index ec1ba57d8b0fc42c3c1dc85542f70c595e1eb464..c88cdac173ec22ea5df27a166f9e87ebe0100be4 100644 +index f5d73922086b5b27907fd393d4d4204a574c3b25..5b09f5ef5f04b519ed4148498c82d003c9fd6c91 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc -@@ -229,6 +229,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( +@@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( // Command-line switches to propagate to the GPU process. static const char* const kSwitchNames[] = { @@ -241,10 +240,10 @@ index ec1ba57d8b0fc42c3c1dc85542f70c595e1eb464..c88cdac173ec22ea5df27a166f9e87eb sandbox::policy::switches::kGpuSandboxAllowSysVShm, sandbox::policy::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index e044bc3739ad21c3d9704ddfa56116fae944e57a..8dfdd81a04c77e3c2ffc4317a859a689ca8ed66e 100644 +index ac9570fa3d9cb3b0026f70465e5b21ac7778c3df..acc0e121e7746da397cfab07b3707de7ae9a3143 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -192,6 +192,7 @@ +@@ -194,6 +194,7 @@ #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ui_base_switches.h" #include "ui/display/display_switches.h" @@ -252,7 +251,7 @@ index e044bc3739ad21c3d9704ddfa56116fae944e57a..8dfdd81a04c77e3c2ffc4317a859a689 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3288,6 +3289,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3283,6 +3284,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { @@ -261,7 +260,7 @@ index e044bc3739ad21c3d9704ddfa56116fae944e57a..8dfdd81a04c77e3c2ffc4317a859a689 sandbox::policy::switches::kDisableSeccompFilterSandbox, sandbox::policy::switches::kNoSandbox, diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc -index f4d66861abb000e98fa613ec0bdd7096f891b6da..972efa2b1462d91ec7f6f28da0296138ef2c9656 100644 +index 6260d73068636f4a8d4c73c161a4ffe165b267d0..2686ef0dfb7d8b667647d11fece5aa8e1be76fe5 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc @@ -4,6 +4,7 @@ @@ -280,7 +279,7 @@ index f4d66861abb000e98fa613ec0bdd7096f891b6da..972efa2b1462d91ec7f6f28da0296138 namespace blink { -@@ -129,6 +131,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const { +@@ -118,6 +120,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const { } gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const { @@ -293,7 +292,7 @@ index f4d66861abb000e98fa613ec0bdd7096f891b6da..972efa2b1462d91ec7f6f28da0296138 } diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc -index d8976665cc201e379b0a9ecd8d953eb63e10b74b..461e26d275886f3690255ab17f374aaeda7dd017 100644 +index 49ef0d352cfb6163499fa42416187595c7011a68..d5bc620847872fcba96f6941be529428755d83a2 100644 --- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc +++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc @@ -24,6 +24,7 @@ @@ -304,7 +303,7 @@ index d8976665cc201e379b0a9ecd8d953eb63e10b74b..461e26d275886f3690255ab17f374aae #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -177,6 +178,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -184,6 +185,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); @@ -315,7 +314,7 @@ index d8976665cc201e379b0a9ecd8d953eb63e10b74b..461e26d275886f3690255ab17f374aae // is what the renderer uses if its not threaded. settings.enable_checker_imaging = diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc -index 7f5b6cc73cde4312720f4a6f54cb54ceb8709e15..1b76e0388d972b40619082f57019478754060068 100644 +index 298321f1aabcf4328fd39b856694a8a6459bfa24..4be245d082cd9d833db72b29e3d652120ecb913e 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -21,6 +21,7 @@ @@ -358,7 +357,7 @@ index 7f5b6cc73cde4312720f4a6f54cb54ceb8709e15..1b76e0388d972b40619082f570194787 if (__builtin_available(macos 10.12, *)) { IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB); diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc -index bea10b469ead89de3a090bb6119c9a68e49db5d6..332f0f7b08605179d9359ef603e70d7fd8426303 100644 +index be932ac3094a441cd5d9afa2ffd2c6d4a64ce559..a6aa9b4c6ba958eb81276911368cd053b9fb59f8 100644 --- a/ui/gfx/switches.cc +++ b/ui/gfx/switches.cc @@ -11,6 +11,8 @@ namespace switches { @@ -371,7 +370,7 @@ index bea10b469ead89de3a090bb6119c9a68e49db5d6..332f0f7b08605179d9359ef603e70d7f // sharpness, kerning, hinting and layout. const char kDisableFontSubpixelPositioning[] = diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h -index 2b97abc9a0357972eff127761aa4a3cff5f34dbb..62be43283095895871221b4175ae26a5af73ec74 100644 +index 442809de1631081efbe062922539318f5172a5ae..b8e5c7e53d58a06175105c9396a7d976bda7a4bd 100644 --- a/ui/gfx/switches.h +++ b/ui/gfx/switches.h @@ -12,6 +12,7 @@ diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index d868e255965a8..23daa8d150e30 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -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 7bdca5042ada597afe4228bab16489665eb29e24..da7feca7a5efa8fa3c3b1af9d4487ae3127fefb6 100644 +index 58002d37ba340f84f47e2522c0d7bf7c1a64c5d2..bc0a73f08e77bf13eb1cafa55f955e6083071104 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -510,7 +510,11 @@ diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index b4409d34b75f2..755b0eb4b9951 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,7 +6,7 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 367c17952131a789a834eb62000c7ebcc2b3249c..b0820c4411952ee0adf3dd4cbc6abb26c0368373 100644 +index 03e318b14025f3c971d471351068986f8a1dd14d..59437e69e25fe85cffc9b558dec2284123ac48be 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -803,6 +803,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,10 +20,10 @@ index 367c17952131a789a834eb62000c7ebcc2b3249c..b0820c4411952ee0adf3dd4cbc6abb26 blink::mojom::PointerLockResult::kWrongDocument); diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h -index da4223e064f945fb7c19742ab01249c5a18238fc..4a88b0197b96c3b4fde090ae63dccb5831fbe10a 100644 +index 5cc97c9c8305bf23b7cdf39ea68c304fac20b479..a6a65a251711394a33fb02bd66c2eeb7b559f711 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -875,6 +875,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -877,6 +877,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl void OnLocalSurfaceIdChanged( const cc::RenderFrameMetadata& metadata) override; @@ -34,10 +34,10 @@ index da4223e064f945fb7c19742ab01249c5a18238fc..4a88b0197b96c3b4fde090ae63dccb58 // |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 d295a11bbb3436fdbbbd85eaeacba941da71be60..bcb84ec6d5cf755f9360ae8bf9fa60dd38790219 100644 +index a819dcf960a4c70c0c8cd57710971de2c41e13ca..bbc3671c3fa8e058b8f107d601233735c0822297 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -627,7 +627,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -619,7 +619,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 30a56ad131425..cc1a3911ab8ab 100644 --- a/patches/chromium/disable_unload_metrics.patch +++ b/patches/chromium/disable_unload_metrics.patch @@ -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 1462a2248b25aa5ba538e090dd52173ad0670c56..bbceb3be9442077c54cc8a3989e7c745ccfb3474 100644 +index a460f4643881a0bd70a863884aa50ae76e25c3b7..0635d66dad36e2d6042dd317962527793f5b96f7 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1158,6 +1158,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1159,6 +1159,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index 1462a2248b25aa5ba538e090dd52173ad0670c56..bbceb3be9442077c54cc8a3989e7c745 // 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 && -@@ -1204,6 +1205,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1205,6 +1206,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } diff --git a/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch b/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch index 2dc41907bd58b..6bd042bd527b8 100644 --- a/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch +++ b/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch @@ -6,10 +6,10 @@ Subject: Don't run PCScan functions if PCScan is disabled PCScan should not be invoked if PCScan is disabled. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/2916657. diff --git a/base/allocator/partition_allocator/memory_reclaimer.cc b/base/allocator/partition_allocator/memory_reclaimer.cc -index cc4c5bad93175e309c21bc39e95e7473a22d1a7f..446fca9ebdf6f87a697905d0114a88f5f7c5214a 100644 +index 63819bf2593894bd763547d58cfae31d821bd7eb..a4ee9520cfc11125837e42955f8f6f6c3f21bf9e 100644 --- a/base/allocator/partition_allocator/memory_reclaimer.cc +++ b/base/allocator/partition_allocator/memory_reclaimer.cc -@@ -94,7 +94,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) { +@@ -67,7 +67,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) { // // Lastly decommit empty slot spans and lastly try to discard unused pages at // the end of the remaining active slots. @@ -19,10 +19,10 @@ index cc4c5bad93175e309c21bc39e95e7473a22d1a7f..446fca9ebdf6f87a697905d0114a88f5 using PCScan = internal::PCScan; const auto invocation_mode = flags & PartitionPurgeAggressiveReclaim diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc -index dfdd94db5d929b89671b93c991037dac957690c5..02543e37003dd0524f5321d4aa75f9f2f6899f57 100644 +index 4bfe2501309e832dc9962d5f4642c6b7c782f83d..c45f1207be984fae9aee2cc5b9a7c405ed5ed96e 100644 --- a/base/threading/platform_thread_posix.cc +++ b/base/threading/platform_thread_posix.cc -@@ -42,6 +42,7 @@ +@@ -43,6 +43,7 @@ #endif #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) @@ -30,26 +30,26 @@ index dfdd94db5d929b89671b93c991037dac957690c5..02543e37003dd0524f5321d4aa75f9f2 #include "base/allocator/partition_allocator/starscan/pcscan.h" #include "base/allocator/partition_allocator/starscan/stack/stack.h" #endif -@@ -75,7 +76,7 @@ void* ThreadFunc(void* params) { +@@ -76,7 +77,7 @@ void* ThreadFunc(void* params) { base::DisallowSingleton(); - #if !defined(OS_NACL) + #if !BUILDFLAG(IS_NACL) -#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN) internal::PCScan::NotifyThreadCreated(internal::GetStackPointer()); #endif -@@ -101,7 +102,7 @@ void* ThreadFunc(void* params) { +@@ -102,7 +103,7 @@ void* ThreadFunc(void* params) { PlatformThread::CurrentHandle().platform_handle(), PlatformThread::CurrentId()); --#if !defined(OS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -+#if !defined(OS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN) +-#if !BUILDFLAG(IS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) ++#if !BUILDFLAG(IS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN) internal::PCScan::NotifyThreadDestroyed(); #endif diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc -index 047114ee7e2ad54cfd6240dda930ee6b5b067947..ba912d601ac12bc1a7c331d0bfc22acbecb86f3a 100644 +index c965c9764ad38a8b52b727ca98fe41f00ab6707d..7d44c4e63b2b4ccf595b5e2a0212fb6c4eb2b5bd 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc @@ -29,6 +29,7 @@ @@ -69,8 +69,8 @@ index 047114ee7e2ad54cfd6240dda930ee6b5b067947..ba912d601ac12bc1a7c331d0bfc22acb internal::PCScan::NotifyThreadCreated(internal::GetStackPointer()); #endif -@@ -127,7 +128,7 @@ DWORD __stdcall ThreadFunc(void* params) { - PlatformThread::CurrentId()); +@@ -125,7 +126,7 @@ DWORD __stdcall ThreadFunc(void* params) { + PlatformThread::CurrentId()); } -#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) diff --git a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch index 02a40a1560a1e..017e3d5431128 100644 --- a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch +++ b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch @@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572 Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index c7a5f0916cf8ba6db6fa85537c140024a92ff24d..54136bae9e3b8a1a36be132323ee86f28bdf0b98 100644 +index 44c0ec9815aafd61182fd18a9d125e185d7196bc..a77c39adfc687d43004341d4ca9e6fa676c814f5 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2404,7 +2404,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2394,7 +2394,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch b/patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch deleted file mode 100644 index a27193a4aeb64..0000000000000 --- a/patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch +++ /dev/null @@ -1,511 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alan Screen -Date: Wed, 5 Jan 2022 23:15:29 +0000 -Subject: Drop extra PrintingContext calls to NewPage/PageDone - -When system calls were refactored out of PrintedDocument in -https://crrev.com/948253, there were extra calls to PrintingContext -NewPage() and PageDone() left in PrintedDocument::RenderPrintedDocument. -These had no effect on Windows or Linux, but caused an issue for macOS. - -This was undetected by tests which use TestPrintingContext, and would -only be detectable if a test was capable of using system drivers (which -generally does not occur on the bots). Adding a test to detect this is -difficult at this time, but should be easier to do once later portions -of the out-of-process print drivers commit chains fill in more testing -capabilities. At that point it should be easier to fire off a request -to have the macOS Preview be the output. https://crbug.com/1284745 -has been filed to capture this needed effort. - -Remove NewPage()/PageDone() as common methods to override from -PrintingContext and make these specific to macOS only. Update the -various implementations of PrintingContext::PrintDocument() to include -the aborted and in-print-job checks that were previously in all -NewPage() implementations. The same corresponding checks from -PageDone() can be handled by PrintedDocument::RenderPrintedDocument() -and PrintedDocumentWin::RenderPrintedPage(). There is no concern about -`in_print_job_` having changed during the lifetime of -RenderPrintedDocument()/RenderPrintedPage(), so just add extra checks -against printing having been asynchronouly aborted before allowing a -final successful return. - -Bug: 1283651 -Change-Id: I52992bc7550dd25d4ad9a1dc633c7d9452a27bb1 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3367333 -Reviewed-by: Lei Zhang -Commit-Queue: Alan Screen -Cr-Commit-Position: refs/heads/main@{#955936} - -diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index 4283a5743c695a7376722f80925722d9e7a6496e..992a59c32ea082e3593c0183819d1b174fc8db7a 100644 ---- a/chrome/browser/printing/print_job_worker.cc -+++ b/chrome/browser/printing/print_job_worker.cc -@@ -524,12 +524,6 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) { - DCHECK(task_runner_->RunsTasksInCurrentSequence()); - DCHECK_NE(page_number_, PageNumber::npos()); - -- // Preprocess. -- if (printing_context_->NewPage() != mojom::ResultCode::kSuccess) { -- OnFailure(); -- return; -- } -- - // Actual printing. - if (document_->RenderPrintedPage(*page, printing_context_.get()) != - mojom::ResultCode::kSuccess) { -@@ -537,12 +531,6 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) { - return; - } - -- // Postprocess. -- if (printing_context_->PageDone() != mojom::ResultCode::kSuccess) { -- OnFailure(); -- return; -- } -- - // Signal everyone that the page is printed. - DCHECK(print_job_); - print_job_->PostTask(FROM_HERE, -diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc -index e830a1017f2262d2d1c226aa16d41a6ffe53aadf..7daa9f9bedd664123d7590b9831169e99688b9c9 100644 ---- a/printing/emf_win_unittest.cc -+++ b/printing/emf_win_unittest.cc -@@ -115,7 +115,6 @@ TEST_F(EmfPrintingTest, Enumerate) { - // current directory. - // TODO(maruel): Clean the .PRN file generated in current directory. - context.NewDocument(u"EmfTest.Enumerate"); -- context.NewPage(); - // Process one at a time. - RECT page_bounds = emf.GetPageBounds(1).ToRECT(); - Emf::Enumerator emf_enum(emf, context.context(), &page_bounds); -@@ -129,7 +128,6 @@ TEST_F(EmfPrintingTest, Enumerate) { - EXPECT_TRUE(itr->SafePlayback(&emf_enum.context_)) - << " index: " << index << " type: " << itr->record()->iType; - } -- context.PageDone(); - context.DocumentDone(); - } - -diff --git a/printing/printed_document.cc b/printing/printed_document.cc -index 54dd798f4c76c34fd6414f68d3ad11a15c1673af..81ebe973fc6a99d66f5d8792aa19e01764f33d3f 100644 ---- a/printing/printed_document.cc -+++ b/printing/printed_document.cc -@@ -187,17 +187,18 @@ const MetafilePlayer* PrintedDocument::GetMetafile() { - - mojom::ResultCode PrintedDocument::RenderPrintedDocument( - PrintingContext* context) { -- mojom::ResultCode result = context->NewPage(); -+ base::AutoLock lock(lock_); -+ mojom::ResultCode result = context->PrintDocument( -+ *GetMetafile(), *immutable_.settings_, mutable_.expected_page_count_); - if (result != mojom::ResultCode::kSuccess) - return result; -- { -- base::AutoLock lock(lock_); -- result = context->PrintDocument(*GetMetafile(), *immutable_.settings_, -- mutable_.expected_page_count_); -- if (result != mojom::ResultCode::kSuccess) -- return result; -- } -- return context->PageDone(); -+ -+ // Beware of any asynchronous aborts of the print job that happened during -+ // printing. -+ if (context->PrintingAborted()) -+ return mojom::ResultCode::kCanceled; -+ -+ return mojom::ResultCode::kSuccess; - } - - bool PrintedDocument::IsComplete() const { -diff --git a/printing/printed_document_win.cc b/printing/printed_document_win.cc -index 4024150677fb64f8f8c9d53dfa73cf709c819a7c..8e34b288ec518c4e2d0c5d8113f38440ad2c648b 100644 ---- a/printing/printed_document_win.cc -+++ b/printing/printed_document_win.cc -@@ -24,8 +24,17 @@ mojom::ResultCode PrintedDocument::RenderPrintedPage( - #endif - - DCHECK(context); -- return context->RenderPage(page, -- immutable_.settings_->page_setup_device_units()); -+ mojom::ResultCode result = context->RenderPage( -+ page, immutable_.settings_->page_setup_device_units()); -+ if (result != mojom::ResultCode::kSuccess) -+ return result; -+ -+ // Beware of any asynchronous aborts of the print job that happened during -+ // printing. -+ if (context->PrintingAborted()) -+ return mojom::ResultCode::kCanceled; -+ -+ return mojom::ResultCode::kSuccess; - } - - } // namespace printing -diff --git a/printing/printing_context.h b/printing/printing_context.h -index e87170e6957733f06bcc296bcca3fc331557ed46..e196a7d448ca41ea02d523a4de410dedf4298b5e 100644 ---- a/printing/printing_context.h -+++ b/printing/printing_context.h -@@ -122,18 +122,12 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { - virtual mojom::ResultCode NewDocument( - const std::u16string& document_name) = 0; - -- // Starts a new page. -- virtual mojom::ResultCode NewPage() = 0; -- - #if defined(OS_WIN) - // Renders a page. - virtual mojom::ResultCode RenderPage(const PrintedPage& page, - const PageSetup& page_setup) = 0; - #endif - -- // Closes the printed page. -- virtual mojom::ResultCode PageDone() = 0; -- - // Prints the document contained in `metafile`. - virtual mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, -@@ -178,6 +172,8 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { - // Reinitializes the settings for object reuse. - void ResetSettings(); - -+ bool PrintingAborted() const { return abort_printing_; } -+ - int job_id() const { return job_id_; } - - protected: -diff --git a/printing/printing_context_android.cc b/printing/printing_context_android.cc -index c28a40eb0a9ce0058d9f85948eda5f83d0c64791..5b2f096cb2a705e7c4c7ebbeddbf93cac1b9eafb 100644 ---- a/printing/printing_context_android.cc -+++ b/printing/printing_context_android.cc -@@ -213,30 +213,13 @@ mojom::ResultCode PrintingContextAndroid::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextAndroid::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- --mojom::ResultCode PrintingContextAndroid::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextAndroid::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) { -+ if (abort_printing_) -+ return mojom::ResultCode::kCanceled; -+ DCHECK(in_print_job_); - DCHECK(is_file_descriptor_valid()); - - return metafile.SaveToFileDescriptor(fd_) ? mojom::ResultCode::kSuccess -diff --git a/printing/printing_context_android.h b/printing/printing_context_android.h -index 676d98949da675e3283969dd3c9c61028dc1c7b5..b4f2f25edec45f91f241b0b1a7bc73b3f51af252 100644 ---- a/printing/printing_context_android.h -+++ b/printing/printing_context_android.h -@@ -60,8 +60,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextAndroid - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/printing_context_chromeos.cc b/printing/printing_context_chromeos.cc -index d996c3e1f7b2d9f96f5c50aadff67f8273c7e760..670df66ae406fa883f801682de699aab16779591 100644 ---- a/printing/printing_context_chromeos.cc -+++ b/printing/printing_context_chromeos.cc -@@ -402,32 +402,14 @@ mojom::ResultCode PrintingContextChromeos::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextChromeos::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- --mojom::ResultCode PrintingContextChromeos::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextChromeos::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) { -+ if (abort_printing_) -+ return mojom::ResultCode::kCanceled; -+ DCHECK(in_print_job_); -+ - #if defined(USE_CUPS) - std::vector buffer; - if (!metafile.GetDataAsVector(&buffer)) -diff --git a/printing/printing_context_chromeos.h b/printing/printing_context_chromeos.h -index 77353372b2c6e003428d37ab634167e8dc824fa4..06cb16c8a569a4d90ccdccc5fefcaaf527e49f5f 100644 ---- a/printing/printing_context_chromeos.h -+++ b/printing/printing_context_chromeos.h -@@ -39,8 +39,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextChromeos - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/printing_context_linux.cc b/printing/printing_context_linux.cc -index c5adfa317747cda3d370a2ace52d843662f4ce91..204cec8311bec69674f1da2223e8d6c4b5a13ba3 100644 ---- a/printing/printing_context_linux.cc -+++ b/printing/printing_context_linux.cc -@@ -151,30 +151,13 @@ mojom::ResultCode PrintingContextLinux::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextLinux::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- --mojom::ResultCode PrintingContextLinux::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextLinux::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) { -+ if (abort_printing_) -+ return mojom::ResultCode::kCanceled; -+ DCHECK(in_print_job_); - DCHECK(print_dialog_); - // TODO(crbug.com/1252685) Plumb error code back from - // `PrintDialogGtkInterface`. -diff --git a/printing/printing_context_linux.h b/printing/printing_context_linux.h -index 17d768a24141954df80bed3c5dd6735c34115195..653170ba60e8341c972cb0126109d48394e0de7b 100644 ---- a/printing/printing_context_linux.h -+++ b/printing/printing_context_linux.h -@@ -45,8 +45,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextLinux : public PrintingContext { - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h -index 85363bd922bf0ab2630e3d5f350de0c58792963a..221019f5df71e1d66accbf2ea2d161bd1125666f 100644 ---- a/printing/printing_context_mac.h -+++ b/printing/printing_context_mac.h -@@ -35,8 +35,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -@@ -105,6 +103,12 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { - // Returns true is the pair is set. - bool SetKeyValue(base::StringPiece key, base::StringPiece value); - -+ // Starts a new page. -+ mojom::ResultCode NewPage(); -+ -+ // Closes the printed page. -+ mojom::ResultCode PageDone(); -+ - // The native print info object. - base::scoped_nsobject print_info_; - -diff --git a/printing/printing_context_no_system_dialog.cc b/printing/printing_context_no_system_dialog.cc -index c10123f35b11e1600c813080585a2282d775dba1..253507fcee5476f497421316bc42a0794f97b12b 100644 ---- a/printing/printing_context_no_system_dialog.cc -+++ b/printing/printing_context_no_system_dialog.cc -@@ -98,26 +98,6 @@ mojom::ResultCode PrintingContextNoSystemDialog::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextNoSystemDialog::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- --mojom::ResultCode PrintingContextNoSystemDialog::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextNoSystemDialog::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, -diff --git a/printing/printing_context_no_system_dialog.h b/printing/printing_context_no_system_dialog.h -index 2753d7ba7a09e1c5e88c1eb21a9b146034ea53f5..cb0d0b8c12535c83dbfc07ecb2817f0504b4a8ba 100644 ---- a/printing/printing_context_no_system_dialog.h -+++ b/printing/printing_context_no_system_dialog.h -@@ -32,8 +32,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextNoSystemDialog - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc -index 0addb52cd2f65b6f05b7cfb7cf8602baaf592541..4f1fb12619fc9bee0cce104ba60621008284d675 100644 ---- a/printing/printing_context_win.cc -+++ b/printing/printing_context_win.cc -@@ -366,18 +366,6 @@ mojom::ResultCode PrintingContextWin::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextWin::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(context_); -- DCHECK(in_print_job_); -- -- // Intentional No-op. MetafileSkia::SafePlayback takes care of calling -- // ::StartPage(). -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextWin::RenderPage(const PrintedPage& page, - const PageSetup& page_setup) { - if (abort_printing_) -@@ -416,17 +404,6 @@ mojom::ResultCode PrintingContextWin::RenderPage(const PrintedPage& page, - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextWin::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. MetafileSkia::SafePlayback takes care of calling -- // ::EndPage(). -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextWin::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, -diff --git a/printing/printing_context_win.h b/printing/printing_context_win.h -index 700bfe2c744cc18b1be25b9db02dd690b5e306f9..babd443a1586c92a70ff6362a824e29a6395fae2 100644 ---- a/printing/printing_context_win.h -+++ b/printing/printing_context_win.h -@@ -35,10 +35,8 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextWin : public PrintingContext { - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; - mojom::ResultCode RenderPage(const PrintedPage& page, - const PageSetup& page_setup) override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/test_printing_context.cc b/printing/test_printing_context.cc -index 4f0bf0ae891164120d36c79a7df98845f38e55de..208e8a16b5648383ff26d8dec4a15f6485ef4454 100644 ---- a/printing/test_printing_context.cc -+++ b/printing/test_printing_context.cc -@@ -116,15 +116,6 @@ mojom::ResultCode TestPrintingContext::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode TestPrintingContext::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // No-op. -- return mojom::ResultCode::kSuccess; --} -- - #if defined(OS_WIN) - mojom::ResultCode TestPrintingContext::RenderPage(const PrintedPage& page, - const PageSetup& page_setup) { -@@ -138,15 +129,6 @@ mojom::ResultCode TestPrintingContext::RenderPage(const PrintedPage& page, - } - #endif // defined(OS_WIN) - --mojom::ResultCode TestPrintingContext::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // No-op. -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode TestPrintingContext::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, -diff --git a/printing/test_printing_context.h b/printing/test_printing_context.h -index e2a0f906216f5bae2d05dd6efd6246257a3deea4..579a9269459470e8eac6e506d87503d828bed4cb 100644 ---- a/printing/test_printing_context.h -+++ b/printing/test_printing_context.h -@@ -58,12 +58,10 @@ class TestPrintingContext : public PrintingContext { - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; - #if defined(OS_WIN) - mojom::ResultCode RenderPage(const PrintedPage& page, - const PageSetup& page_setup) override; - #endif -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; diff --git a/patches/chromium/dump_syms.patch b/patches/chromium/dump_syms.patch index ea1020c34ac9c..43e274d4c5e8b 100644 --- a/patches/chromium/dump_syms.patch +++ b/patches/chromium/dump_syms.patch @@ -8,10 +8,10 @@ this but it is not a blocker for releasing Electron. This patch removes tthe hard fail on dylib resolve failure from dump_syms diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py -index e68039d78f1de03f7ffc68017cbb9f948f67f440..b1811df7b5e6252bc71dd0f11ad6bf02858387f4 100755 +index 99395610be5e50a4c65890b9edaa48510043a8a8..dae758a19460bc22b1bcdc8c7e84dfb42f8f50eb 100755 --- a/components/crash/content/tools/generate_breakpad_symbols.py +++ b/components/crash/content/tools/generate_breakpad_symbols.py -@@ -206,7 +206,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path): +@@ -204,7 +204,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path): 'ERROR: failed to resolve %s, exe_path %s, loader_path %s, ' 'rpaths %s' % (m.group(1), exe_path, loader_path, ', '.join(rpaths))), file=sys.stderr) diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index f3b9883faf7ec..a124b5b3d2ae1 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0 Make SetAspectRatio accept 0 as valid input, which would reset to null. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index d44e1caec0a369902f84c8737e17fd88c87416b7..03ba3f90405efd73cbb9d2e606c1499b46f4ec31 100644 +index a1de50d6b0f699d0651c369cafafdd5bb542242d..65b9f5e5f81e8ef8b591ef2e027e095df11c0d7b 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -530,7 +530,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { @@ -19,10 +19,10 @@ index d44e1caec0a369902f84c8737e17fd88c87416b7..03ba3f90405efd73cbb9d2e606c1499b aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 0b714bac63853fb67f1b5b953c71f7120a266ca9..daa10f36722c6f6f0fbfbf5de3918b966323434a 100644 +index 8ca72461bb7b42f1bc0da249a36f0fcf9ab6f13c..9ca11a19e66e34585b4b11e89cc3b789a4389b5e 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -928,8 +928,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { +@@ -936,8 +936,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { } void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) { diff --git a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch index 98fedf7c940ee..c05e1e16aceef 100644 --- a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch +++ b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch @@ -21,7 +21,7 @@ index c9b535eb083c250f4f874d8e6bd0c29ea9f3a10f..f220b8669507a4aea616b0dfbabda509 v8::ZoneBackingAllocator* GetZoneBackingAllocator() override; #endif diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc -index 0ccafbde90f99bbafb180fffa1e94f9a35a16bd7..d28b2116930dc1ed9c0cc64c4b31612a68a3c5ba 100644 +index a7dad3d1053c3101183b9686adbccaa5cf3a87fc..24da1fde55c345cb58829539aec381af9af57bae 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc @@ -368,6 +368,10 @@ PageAllocator* V8Platform::GetPageAllocator() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index b0b3aebf0dbf4..429dd72387ef7 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 14c71cc69388da46f62d9835e2a06fef0870da02..9481ea08401ae29ae9c1d960491b05b3 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 13c730e6d8c977e014c28d7eeb2513d1f9b6e47e..8af6961ab0b5f2f26e375b8f9c7555874df06f89 100644 +index ca62a13420aa9c114c00054bbe1215f96285a4e9..01be46b1eaed2aadfd24eac9d102da99521b175c 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1325,6 +1325,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1331,6 +1331,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,22 +51,22 @@ index 13c730e6d8c977e014c28d7eeb2513d1f9b6e47e..8af6961ab0b5f2f26e375b8f9c755587 // 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 55cff37a1ad0ae89bde3ffda11c3d1e9d194e22d..fcda182b959a3600be62a2b61573ad795d4b0509 100644 +index e412608e7720004462c48698c8ec39602b2b900e..46c00e0da6beb0c2e689475fc4b9927085414e1a 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -278,6 +278,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -282,6 +282,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; + void SetUserAgent(const std::string& new_user_agent) override; void SetAcceptLanguage(const std::string& new_accept_language) override; void SetEnableReferrers(bool enable_referrers) override; - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 647b1e2fc81fb4ee177827d6909c816631009ec3..52ee1744567ee19f1bfa3730427d9a65b5a666f3 100644 +index fa56cfed3703664232843ad26028096d95dca253..9852498e93939796e7ba6f80efcc7b2d827187ac 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1044,6 +1044,9 @@ interface NetworkContext { +@@ -1067,6 +1067,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,14 +77,14 @@ index 647b1e2fc81fb4ee177827d6909c816631009ec3..52ee1744567ee19f1bfa3730427d9a65 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index b766ae3aa91ffd6ce5ab7ae3835ff7fa58d02a0e..5719eec40aff5cd079110fc52c46d2791577fee8 100644 +index d143a82b1fd021bb03b760b91e87c7714f5395b9..3c18369ff3ab80430e21caac03373605dad64a88 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -134,6 +134,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -136,6 +136,7 @@ class TestNetworkContext : public mojom::NetworkContext { void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override {} + void SetUserAgent(const std::string& new_user_agent) override {} void SetAcceptLanguage(const std::string& new_accept_language) override {} void SetEnableReferrers(bool enable_referrers) override {} - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 32d935113d968..b0c806866f56a 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,10 +12,10 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index d4602eb32f1f14f639df26f866f5406ab36003d5..afae7a75567c7219490f13afe010317c68552ea4 100644 +index 7e7927c7258963bd95a2c064ef85e410f4d2571d..05353bda1169df38499e6f789bb632307d7bcfde 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -159,6 +159,7 @@ +@@ -158,6 +158,7 @@ #include "third_party/blink/renderer/core/timing/dom_window_performance.h" #include "third_party/blink/renderer/core/timing/window_performance.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" @@ -23,11 +23,11 @@ index d4602eb32f1f14f639df26f866f5406ab36003d5..afae7a75567c7219490f13afe010317c #include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h" -@@ -1793,6 +1794,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, - #if defined(OS_MAC) +@@ -1776,6 +1777,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, + #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); + SetUseExternalPopupMenus(!prefs.offscreen); #endif - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch index 99d6a9e4cc006..fd11a39b225c8 100644 --- a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch +++ b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch @@ -19,7 +19,7 @@ instance, but also so the second instance can send back additional data to the first instance if needed. diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h -index 13b325ecad9ba48398173e89680287c63efd4fa6..e8188e4640b28d41559822e6c1bdd27dcccae93c 100644 +index 8f94cc300b58e8a94b6ca155aa3cf370bcb948d8..4340376f323d24e5e2c5897a81c6a9ebf13adab4 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -18,6 +18,7 @@ @@ -29,7 +29,7 @@ index 13b325ecad9ba48398173e89680287c63efd4fa6..e8188e4640b28d41559822e6c1bdd27d +#include "base/containers/span.h" #include "ui/gfx/native_widget_types.h" - #if defined(OS_POSIX) && !defined(OS_ANDROID) + #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) @@ -93,6 +94,9 @@ class ProcessSingleton { static constexpr int kNumNotifyResults = LAST_VALUE + 1; @@ -85,21 +85,21 @@ index 13b325ecad9ba48398173e89680287c63efd4fa6..e8188e4640b28d41559822e6c1bdd27d + // Custom data to pass to the other instance during notify. + base::span additional_data_; - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); @@ -190,6 +206,7 @@ class ProcessSingleton { HANDLE lock_file_; base::FilePath user_data_dir_; ShouldKillRemoteProcessCallback should_kill_remote_process_callback_; + HANDLE ack_pipe_; - #elif defined(OS_POSIX) && !defined(OS_ANDROID) + #elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) // Return true if the given pid is one of our child processes. // Assumes that the current pid is the root of all pids of the current diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce24a02cfa 100644 +index 47e60bfd8239d4a2e292b835c49132bdbb751555..9861a884a15e79b36833e6df58897141acdc6718 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -147,7 +147,7 @@ const char kACKToken[] = "ACK"; +@@ -148,7 +148,7 @@ const char kACKToken[] = "ACK"; const char kShutdownToken[] = "SHUTDOWN"; const char kTokenDelimiter = '\0'; const int kMaxMessageLength = 32 * 1024; @@ -108,7 +108,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce bool g_disable_prompt = false; bool g_skip_is_chrome_process_check = false; -@@ -627,6 +627,7 @@ class ProcessSingleton::LinuxWatcher +@@ -614,6 +614,7 @@ class ProcessSingleton::LinuxWatcher // |reader| is for sending back ACK message. void HandleMessage(const std::string& current_dir, const std::vector& argv, @@ -116,7 +116,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce SocketReader* reader); private: -@@ -651,6 +652,9 @@ class ProcessSingleton::LinuxWatcher +@@ -638,6 +639,9 @@ class ProcessSingleton::LinuxWatcher // The ProcessSingleton that owns us. ProcessSingleton* const parent_; @@ -126,7 +126,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce std::set, base::UniquePtrComparator> readers_; }; -@@ -681,16 +685,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { +@@ -668,16 +672,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { } void ProcessSingleton::LinuxWatcher::HandleMessage( @@ -154,7 +154,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce LOG(WARNING) << "Not handling interprocess notification as browser" " is shutting down"; // Send back "SHUTDOWN" message, so that the client process can start up -@@ -700,6 +709,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( +@@ -687,6 +696,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( } } @@ -177,7 +177,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce void ProcessSingleton::LinuxWatcher::RemoveSocketReader(SocketReader* reader) { DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(reader); -@@ -735,7 +760,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -722,7 +747,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: } } @@ -187,7 +187,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce const size_t kMinMessageLength = base::size(kStartToken) + 4; if (bytes_read_ < kMinMessageLength) { buf_[bytes_read_] = 0; -@@ -765,10 +791,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -752,10 +778,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: tokens.erase(tokens.begin()); tokens.erase(tokens.begin()); @@ -217,7 +217,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce fd_watch_controller_.reset(); // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader -@@ -797,8 +841,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( +@@ -784,8 +828,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( // ProcessSingleton::ProcessSingleton( const base::FilePath& user_data_dir, @@ -231,7 +231,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce current_pid_(base::GetCurrentProcId()), watcher_(new LinuxWatcher(this)) { socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); -@@ -915,7 +963,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -904,7 +952,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( sizeof(socket_timeout)); // Found another process, prepare our command line @@ -241,7 +241,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce std::string to_send(kStartToken); to_send.push_back(kTokenDelimiter); -@@ -925,11 +974,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -914,11 +963,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( to_send.append(current_dir.value()); const std::vector& argv = cmd_line.argv(); @@ -263,7 +263,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce // Send the message if (!WriteToSocket(socket.fd(), to_send.data(), to_send.length())) { // Try to kill the other process, because it might have been dead. -@@ -969,6 +1028,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -960,6 +1019,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( linux_ui->NotifyWindowManagerStartupComplete(); #endif @@ -282,18 +282,18 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce return PROCESS_NOTIFIED; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648c27a2a34 100644 +index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..268be8c0334a4bc051ff08792ea0dc3d0c912034 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -22,6 +22,7 @@ +@@ -21,6 +21,7 @@ + #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" - #include "base/trace_event/trace_event.h" +#include "base/timer/timer.h" + #include "base/trace_event/base_tracing.h" #include "base/win/registry.h" #include "base/win/scoped_handle.h" - #include "base/win/windows_version.h" -@@ -44,6 +45,14 @@ +@@ -45,6 +46,14 @@ namespace { const char kLockfile[] = "lockfile"; @@ -308,7 +308,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 // A helper class that acquires the given |mutex| while the AutoLockMutex is in // scope. -@@ -98,10 +107,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { +@@ -80,10 +89,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { bool ParseCommandLine(const COPYDATASTRUCT* cds, base::CommandLine* parsed_command_line, @@ -323,7 +323,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 static const int min_message_size = 7; if (cds->cbData < min_message_size * sizeof(wchar_t) || cds->cbData % sizeof(wchar_t) != 0) { -@@ -151,11 +162,82 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds, +@@ -133,11 +144,82 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds, const std::wstring cmd_line = msg.substr(second_null + 1, third_null - second_null); *parsed_command_line = base::CommandLine::FromString(cmd_line); @@ -406,7 +406,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 bool ProcessLaunchNotification( const ProcessSingleton::NotificationCallback& notification_callback, UINT message, -@@ -167,16 +249,23 @@ bool ProcessLaunchNotification( +@@ -151,16 +233,23 @@ bool ProcessLaunchNotification( // Handle the WM_COPYDATA message from another process. const COPYDATASTRUCT* cds = reinterpret_cast(lparam); @@ -434,7 +434,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 return true; } -@@ -273,9 +362,13 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -254,9 +343,13 @@ bool ProcessSingleton::EscapeVirtualization( ProcessSingleton::ProcessSingleton( const std::string& program_name, const base::FilePath& user_data_dir, @@ -449,7 +449,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 program_name_(program_name), is_app_sandboxed_(is_app_sandboxed), is_virtualized_(false), -@@ -290,6 +383,37 @@ ProcessSingleton::~ProcessSingleton() { +@@ -271,6 +364,37 @@ ProcessSingleton::~ProcessSingleton() { ::CloseHandle(lock_file_); } @@ -486,8 +486,8 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 + // Code roughly based on Mozilla. ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { - if (is_virtualized_) -@@ -300,8 +424,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { + TRACE_EVENT0("startup", "ProcessSingleton::NotifyOtherProcess"); +@@ -283,8 +407,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { return PROCESS_NONE; } @@ -498,7 +498,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 return PROCESS_NOTIFIED; case chrome::NOTIFY_FAILED: remote_window_ = NULL; -@@ -431,6 +556,18 @@ bool ProcessSingleton::Create() { +@@ -422,6 +547,18 @@ bool ProcessSingleton::Create() { << "Lock file can not be created! Error code: " << error; if (lock_file_ != INVALID_HANDLE_VALUE) { @@ -516,8 +516,8 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 + // Set the window's title to the path of our user data directory so // other Chrome instances can decide if they should forward to us. - bool result = -@@ -457,6 +594,7 @@ bool ProcessSingleton::Create() { + TRACE_EVENT0("startup", "ProcessSingleton::Create:CreateWindow"); +@@ -449,6 +586,7 @@ bool ProcessSingleton::Create() { } void ProcessSingleton::Cleanup() { @@ -526,10 +526,10 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 void ProcessSingleton::OverrideShouldKillRemoteProcessCallbackForTesting( diff --git a/chrome/browser/win/chrome_process_finder.cc b/chrome/browser/win/chrome_process_finder.cc -index b4fec8878c37b9d157ea768e3b6d99399a988c75..e1cb0f21f752aaeee2c360ce9c5fd08bfede26e3 100644 +index b64ed1d155a30582e48c9cdffcee9d0f25a53a6a..ce851d09d501ebcc6d6c4065e746e869d5275b2b 100644 --- a/chrome/browser/win/chrome_process_finder.cc +++ b/chrome/browser/win/chrome_process_finder.cc -@@ -34,7 +34,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) { +@@ -36,9 +36,10 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) { return base::win::MessageWindow::FindWindow(user_data_dir.value()); } @@ -537,11 +537,13 @@ index b4fec8878c37b9d157ea768e3b6d99399a988c75..e1cb0f21f752aaeee2c360ce9c5fd08b +NotifyChromeResult AttemptToNotifyRunningChrome( + HWND remote_window, + const base::span additional_data) { + TRACE_EVENT0("startup", "AttemptToNotifyRunningChrome"); +- DCHECK(remote_window); DWORD process_id = 0; DWORD thread_id = GetWindowThreadProcessId(remote_window, &process_id); -@@ -42,7 +44,8 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { - return NOTIFY_FAILED; +@@ -50,7 +51,8 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { + } // Send the command line to the remote chrome window. - // Format is "START\0<<>>\0<<>>". @@ -549,8 +551,8 @@ index b4fec8878c37b9d157ea768e3b6d99399a988c75..e1cb0f21f752aaeee2c360ce9c5fd08b + // "START\0\0\0\0". std::wstring to_send(L"START\0", 6); // want the NULL in the string. base::FilePath cur_dir; - if (!base::GetCurrentDirectory(&cur_dir)) -@@ -53,6 +56,22 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { + if (!base::GetCurrentDirectory(&cur_dir)) { +@@ -64,6 +66,22 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { base::CommandLine::ForCurrentProcess()->GetCommandLineString()); to_send.append(L"\0", 1); // Null separator. diff --git a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index 9edc86cecd94e..fbd9cec05e06c 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -13,11 +13,11 @@ 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 ca0630b07722cf3d8b4d31103db7c03bc702ee6b..5f7c5166f3541718f1135b2af8dc6ef3b7bb69ca 100644 +index 5376b01ad03c346ecc1c5d47ff125103dbc05eb8..a60ce1d4fe6b7132d7adac1a7687c7185d1abee3 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc -@@ -153,6 +153,8 @@ absl::optional NativeTheme::GetColorProviderColor( - } +@@ -114,6 +114,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors, + NativeTheme::~NativeTheme() = default; bool NativeTheme::ShouldUseDarkColors() const { + if (theme_source() == ThemeSource::kForcedLight) return false; @@ -26,13 +26,14 @@ index ca0630b07722cf3d8b4d31103db7c03bc702ee6b..5f7c5166f3541718f1135b2af8dc6ef3 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 061a8549af88e8b531070799c41e3166b69ecb47..b4094564254fd12f41e84350e5e8c9540c387a9d 100644 +index e46bc2cf64ca554c0e21a4e0851ad092f504e080..0ffe583d56ddc3abec8c848c1cd5dbc3623acb5b 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -404,6 +404,22 @@ class NATIVE_THEME_EXPORT NativeTheme { - SkColor GetUnprocessedSystemColor(ColorId color_id, - ColorScheme color_scheme) const; +@@ -389,6 +389,23 @@ class NATIVE_THEME_EXPORT NativeTheme { + scoped_refptr custom_theme) + const; ++ + enum ThemeSource { + kSystem, + kForcedDark, @@ -52,7 +53,7 @@ index 061a8549af88e8b531070799c41e3166b69ecb47..b4094564254fd12f41e84350e5e8c954 // 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 -@@ -589,6 +605,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -558,6 +575,7 @@ class NATIVE_THEME_EXPORT NativeTheme { bool forced_colors_ = false; PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; @@ -61,10 +62,10 @@ index 061a8549af88e8b531070799c41e3166b69ecb47..b4094564254fd12f41e84350e5e8c954 SEQUENCE_CHECKER(sequence_checker_); }; diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 07852493fd23b8c1f057dc7ad830b6884db50a88..fee85c5c95bf7908cbd460619f71977cc73f3e6a 100644 +index 6b9fb74004eba57fdff396124214356f4bcf0852..70807b315f805baab2574148520323ce78f624cb 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -677,6 +677,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { +@@ -618,6 +618,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { // ...unless --force-dark-mode was specified in which case caveat emptor. if (InForcedColorsMode() && !IsForcedDarkMode()) return false; diff --git a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch index 5855be1a4f264..8aec002466d42 100644 --- a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch +++ b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch @@ -13,10 +13,10 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass then refers to the list so that it can correctly determine the data source's settings. diff --git a/third_party/blink/public/platform/media/multi_buffer_data_source.h b/third_party/blink/public/platform/media/multi_buffer_data_source.h -index 3224b0cc8f4b5196d5e78f031f198cecd0fddf40..b797f446cb876315ff70645564658435445045cd 100644 +index fd2441add0c816c5031ed0e9321d2be7e0937161..c324d855b26f6dcb63d127d7ddafa509cb1074e4 100644 --- a/third_party/blink/public/platform/media/multi_buffer_data_source.h +++ b/third_party/blink/public/platform/media/multi_buffer_data_source.h -@@ -34,6 +34,8 @@ namespace blink { +@@ -33,6 +33,8 @@ namespace blink { class BufferedDataSourceHost; class MultiBufferReader; diff --git a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch index 254c8c2b8ea2e..9fc5bef9c5021 100644 --- a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch +++ b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch @@ -9,7 +9,7 @@ production use cases. This is unlikely to be upstreamed as the change is entirely in //chrome. diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -index 51c061d3bd117c926b74a10deab37d3a694e808b..1f0b787b13567be74553ced382d4b48a65bb2003 100644 +index 22fade6370fe654e48373f35bbac079131b873ff..57d694eab66c1431789405656f600390e023b533 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc @@ -51,6 +51,9 @@ namespace { @@ -44,7 +44,7 @@ index 51c061d3bd117c926b74a10deab37d3a694e808b..1f0b787b13567be74553ced382d4b48a "https://redirector.gvt1.com/edgedl/chrome/dict/"; diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h -index a8a1fb3c22b812cc3ff76a4c50853cb60c74c541..27c07b11ca2f56600fe8534170066bb77dd36037 100644 +index 4df6fc23f0e51e3279208a9331c9e55d7d4cb0ac..f4ddb557f6c04ede0caf5029b3dfb877a02ea721 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h @@ -93,6 +93,8 @@ class SpellcheckHunspellDictionary diff --git a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index 587986730db3e..d3448ffcc3b40 100644 --- a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch +++ b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch @@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell This patch is used by Electron to implement spellchecker events. diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index 7e6846c8bbb2d773c0b0ec97da928871d828bcbf..7a5f0d5034270dcfb287d9c46b2cd0431098d37e 100644 +index 80e5807fecbca3d3d3105522418c5f4b4d103f57..002204dbe0b9598b61141cab33b7befdfac077f8 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc -@@ -467,6 +467,9 @@ void SpellcheckService::LoadDictionaries() { +@@ -469,6 +469,9 @@ void SpellcheckService::LoadDictionaries() { std::make_unique( dictionary, platform_spellcheck_language, context_, this)); hunspell_dictionaries_.back()->AddObserver(this); @@ -20,7 +20,7 @@ index 7e6846c8bbb2d773c0b0ec97da928871d828bcbf..7a5f0d5034270dcfb287d9c46b2cd043 hunspell_dictionaries_.back()->Load(); } -@@ -519,6 +522,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { +@@ -521,6 +524,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { (!hunspell_dictionaries_.empty() || enable_if_uninitialized); } @@ -42,7 +42,7 @@ index 7e6846c8bbb2d773c0b0ec97da928871d828bcbf..7a5f0d5034270dcfb287d9c46b2cd043 const content::NotificationSource& source, const content::NotificationDetails& details) { diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h -index 67a7b52ea0e82c9ddc9e0fbdbe677855f60c536e..48bd507b2a23061ee20a02b00b79604077002aed 100644 +index c17c42fdfd943e7b77e0d7a8d333afd70e9c6abc..ab9ef6b1efdd63ea7cc47be2cf7de79eb9aa1b90 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h @@ -138,6 +138,8 @@ class SpellcheckService : public KeyedService, diff --git a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 9b87b52e3b9a2..d2675bfa80b29 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -8,21 +8,21 @@ rendering with the viz compositor by way of a custom HostDisplayClient and LayeredWindowUpdater. diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc -index 3b00759e513dc7e19fd68398e853c8ce6ac73905..47f4e7cc2e8b3141dcaf9e7a498fec32c9342f40 100644 +index d3970b4d86e1fadc5321e99be20813c0f811d6b3..66d3ae8ecc299456de8ff621b2957f9d18e984a1 100644 --- a/components/viz/host/host_display_client.cc +++ b/components/viz/host/host_display_client.cc -@@ -45,9 +45,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( +@@ -46,9 +46,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( } #endif --#if defined(OS_WIN) +-#if BUILDFLAG(IS_WIN) void HostDisplayClient::CreateLayeredWindowUpdater( mojo::PendingReceiver receiver) { -+#if defined(OS_WIN) ++#if BUILDFLAG(IS_WIN) if (!NeedsToUseLayerWindow(widget_)) { DLOG(ERROR) << "HWND shouldn't be using a layered window"; return; -@@ -55,8 +55,12 @@ void HostDisplayClient::CreateLayeredWindowUpdater( +@@ -56,8 +56,12 @@ void HostDisplayClient::CreateLayeredWindowUpdater( layered_window_updater_ = std::make_unique(widget_, std::move(receiver)); @@ -37,14 +37,14 @@ index 3b00759e513dc7e19fd68398e853c8ce6ac73905..47f4e7cc2e8b3141dcaf9e7a498fec32 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h -index b2ad84c881ac7190ee07e6db1f0eb2822066748d..b1527bd33ca9ba0f5345aa1fef08ee65f3ded91c 100644 +index 1c2885c42f4947bb22ce87c8b2d649689b278da1..e588d77072537b6b0760b278de72d69aa44f2b3f 100644 --- a/components/viz/host/host_display_client.h +++ b/components/viz/host/host_display_client.h @@ -41,10 +41,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient { const gfx::CALayerParams& ca_layer_params) override; #endif --#if defined(OS_WIN) +-#if BUILDFLAG(IS_WIN) + protected: void CreateLayeredWindowUpdater( mojo::PendingReceiver receiver) override; @@ -81,7 +81,7 @@ index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index fae4aae8ed31b10fba14c009bb6bf86128747b14..a672c74893f0c9a2774beec98734faf58a17cbf3 100644 +index eff91b68cf4b72de41b7b2ad09c029b8b5dcf3c6..c736f772e3714c6a80703c41c8a2f0dab36b166d 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -139,6 +139,8 @@ viz_component("service") { @@ -108,10 +108,10 @@ index 77d463e683d8b8d3a202681a6884eacaab79d70d..05d51cb2637d34c073cd0025e3658036 } // namespace viz 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 e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191d20945f2 100644 +index 8a277c6337d446890bb32814a68db2a9d3d3cd72..4c4e631d5a1476eaad6f54281e6d6899070d1a65 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc -@@ -25,6 +25,7 @@ +@@ -26,6 +26,7 @@ #include "components/viz/service/display_embedder/server_shared_bitmap_manager.h" #include "components/viz/service/display_embedder/skia_output_surface_dependency_impl.h" #include "components/viz/service/display_embedder/skia_output_surface_impl.h" @@ -119,7 +119,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 #include "components/viz/service/display_embedder/software_output_surface.h" #include "components/viz/service/display_embedder/viz_process_context_provider.h" #include "components/viz/service/gl/gpu_service_impl.h" -@@ -38,6 +39,7 @@ +@@ -39,6 +40,7 @@ #include "gpu/ipc/scheduler_sequence.h" #include "gpu/ipc/service/gpu_channel_manager_delegate.h" #include "gpu/ipc/service/image_transport_surface.h" @@ -127,7 +127,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_context.h" #include "ui/gl/init/gl_factory.h" -@@ -125,7 +127,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -126,7 +128,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -137,7 +137,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 #if BUILDFLAG(IS_CHROMEOS_ASH) if (surface_handle == gpu::kNullSurfaceHandle) return std::make_unique(); -@@ -137,7 +140,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -138,7 +141,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( if (!gpu_compositing) { output_surface = std::make_unique( @@ -146,7 +146,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 } else if (renderer_settings.use_skia_renderer) { DCHECK(gpu_dependency); { -@@ -242,10 +245,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -243,10 +246,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( std::unique_ptr OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( gpu::SurfaceHandle surface_handle, @@ -156,7 +156,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 if (headless_) return std::make_unique(); -+#if !defined(OS_MAC) ++#if !BUILDFLAG(IS_APPLE) + if (offscreen) { + DCHECK(display_client); + mojom::LayeredWindowUpdaterPtr layered_window_updater; @@ -167,11 +167,11 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 + } +#endif + - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_, display_client); 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 07f266d8a379c7047f43c824c9062cbb162112f0..c756e1c5b4bda1978d27fd55fba1e4531dbeed8a 100644 +index fa9bc45b5c12821789270907f73c7e6f3c0c1424..6d2ad1d88631db82f41de2852c3e9a6ad1431b2e 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.h +++ b/components/viz/service/display_embedder/output_surface_provider_impl.h @@ -66,12 +66,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl @@ -499,10 +499,10 @@ index 583e3e2525c753a0962d481fc67a3582df75d0e9..9416ec929bebcff7f07088e635376ef2 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 94a087b4beb3b683e90e89282c9fd6bb36825608..6efcb84af529a78e9ebc1234ef4d0c8834270c29 100644 +index 4b6712b2a4f3c56a6d243ff9d93539505a5c7b86..7f62362ab27abd3497d23e8db8c8bb5a2e3392f9 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 -@@ -49,7 +49,8 @@ RootCompositorFrameSinkImpl::Create( +@@ -84,7 +84,8 @@ RootCompositorFrameSinkImpl::Create( params->gpu_compositing, params->widget, params->renderer_settings); auto output_surface = output_surface_provider->CreateOutputSurface( params->widget, params->gpu_compositing, display_client.get(), @@ -513,10 +513,10 @@ index 94a087b4beb3b683e90e89282c9fd6bb36825608..6efcb84af529a78e9ebc1234ef4d0c88 // Creating output surface failed. The host can send a new request, possibly // with a different compositing mode. diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index ba0d6ca4e9004a0c8cfc2b99f3e3aaff4c8a756b..3f1c77e14ab6164ee9bb7d4cc3e454125e0d700e 100644 +index 0e3af0f9280abe8560393325b400ad2543ed0556..7fe490e55a4bb8a183d0d241188ea15a44347245 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc -@@ -383,8 +383,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -381,8 +381,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( compositor_data.display_private.reset(); root_params->display_private = compositor_data.display_private.BindNewEndpointAndPassReceiver(); @@ -534,10 +534,10 @@ index ba0d6ca4e9004a0c8cfc2b99f3e3aaff4c8a756b..3f1c77e14ab6164ee9bb7d4cc3e45412 compositor_data.display_client->GetBoundRemote(resize_task_runner_); diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom -index 9f7583e42405760bbe5994c87c4347a7d5a36fbe..c383f93ee22388cb4524119d0bead31973fdc705 100644 +index b2f873919d68633103d115d7d9550a098c1a254c..8e38831a6df15d37e5fb87d63613b7dbdcefacc4 100644 --- a/services/viz/privileged/mojom/compositing/display_private.mojom +++ b/services/viz/privileged/mojom/compositing/display_private.mojom -@@ -94,7 +94,6 @@ interface DisplayClient { +@@ -102,7 +102,6 @@ interface DisplayClient { // Creates a LayeredWindowUpdater implementation to draw into a layered // window. @@ -546,7 +546,7 @@ index 9f7583e42405760bbe5994c87c4347a7d5a36fbe..c383f93ee22388cb4524119d0bead319 // Notifies that a swap has occurred and provides information about the pixel diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom -index 83e7682b14367571a2d52bb3a6f2f63918d8efe9..3b6f2627196170e3a17992ad36534ac9bc178e4a 100644 +index a9a0e5a1167b2018e6dc206ecb7d37aad94042aa..3997ecb0228914144d6b04595c47376679fca3ef 100644 --- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom +++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom @@ -32,6 +32,7 @@ struct RootCompositorFrameSinkParams { @@ -569,7 +569,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 7e3a624f99fea87cd53ce6f399e5768058d3c305..384ec6d9b8a8c0e121fc2e875ce65ddb639c241b 100644 +index 8b74e1d2a463156f62e983f535ff68a53215f648..6ef04da46c8b097b01d5ee40dcadf222d7a7870c 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -81,6 +81,7 @@ class DisplayPrivate; @@ -607,7 +607,7 @@ index 7e3a624f99fea87cd53ce6f399e5768058d3c305..384ec6d9b8a8c0e121fc2e875ce65ddb // 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 -@@ -453,6 +467,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -467,6 +481,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr pending_begin_frame_args_; @@ -617,7 +617,7 @@ index 7e3a624f99fea87cd53ce6f399e5768058d3c305..384ec6d9b8a8c0e121fc2e875ce65ddb raw_ptr root_layer_ = nullptr; diff --git a/ui/gfx/ca_layer_params.h b/ui/gfx/ca_layer_params.h -index 232751b32f6d6dee6c913c7020b53ae4b604a552..ba5767a80d13e848b7281f55307f6569a1524ce3 100644 +index 12e115cd6a128d8d150abc786d4d38b1d5119d91..b6320de28750333bee7ee83393849f4eb0a956ac 100644 --- a/ui/gfx/ca_layer_params.h +++ b/ui/gfx/ca_layer_params.h @@ -6,6 +6,7 @@ @@ -649,7 +649,7 @@ index de00e766ba17532e10dcf5d0fd31fa344920a9f7..7aaedf83ad22dcc1d2dd39a31cf7e08b float scale_factor; }; diff --git a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc -index c1f21d7f4348df96f7be5c0adb1b9650304048e0..760c849aebba70e575e59883655d707f36c5424a 100644 +index c7035798bd867f51b39f36f1be79293bf2b5cc12..131446361de812f9b915483bca2b6d2165b65e3d 100644 --- a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc +++ b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc @@ -52,6 +52,9 @@ bool StructTraits::Read( diff --git a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch index 40abb608830cb..9dc1207d32dff 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -17,10 +17,10 @@ headers, moving forward we should find a way in upstream to provide access to these headers for loader clients created on the browser process. diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc -index f14c99863eb3f31ebc9ffd30a55f7536585fb561..d1f11d2d13445c9814d2e7227e5e02001377329b 100644 +index 87868727a78223baef9ffd2591f49fced240ef4e..f6a6ff28f33e2d1c065f2abeb96733b2d28a6ea1 100644 --- a/services/network/public/cpp/resource_request.cc +++ b/services/network/public/cpp/resource_request.cc -@@ -234,6 +234,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { +@@ -233,6 +233,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { do_not_prompt_for_login == request.do_not_prompt_for_login && is_main_frame == request.is_main_frame && transition_type == request.transition_type && @@ -29,10 +29,10 @@ index f14c99863eb3f31ebc9ffd30a55f7536585fb561..d1f11d2d13445c9814d2e7227e5e0200 upgrade_if_insecure == request.upgrade_if_insecure && is_revalidating == request.is_revalidating && diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h -index 7c835d244420afe1c9ab6eac267c8789fb2afb01..564caebc55e1338e7124731d639cd6f01aebf595 100644 +index 8b9a7b36f53a4cfcd159ac18c06d1724072013c8..ef0191bae8a07e531ae129cf32b22f4930c5e266 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -157,6 +157,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { +@@ -156,6 +156,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { bool do_not_prompt_for_login = false; bool is_main_frame = false; int transition_type = 0; @@ -41,10 +41,10 @@ index 7c835d244420afe1c9ab6eac267c8789fb2afb01..564caebc55e1338e7124731d639cd6f0 bool upgrade_if_insecure = false; bool is_revalidating = false; diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc -index 9fefb0ca05e8f461d22b7f9875cc722232ccaed4..9c020bd1272ad2894f0b5af4c504d551b9927af0 100644 +index 1fcf54cac11c38352e14774cd08bcaa162443e9c..5356da11391d52a8f9aaa57a27616cee6dc0f2b6 100644 --- a/services/network/public/cpp/url_request_mojom_traits.cc +++ b/services/network/public/cpp/url_request_mojom_traits.cc -@@ -210,6 +210,7 @@ bool StructTraits< +@@ -209,6 +209,7 @@ bool StructTraits< out->do_not_prompt_for_login = data.do_not_prompt_for_login(); out->is_main_frame = data.is_main_frame(); out->transition_type = data.transition_type(); @@ -53,10 +53,10 @@ index 9fefb0ca05e8f461d22b7f9875cc722232ccaed4..9c020bd1272ad2894f0b5af4c504d551 out->upgrade_if_insecure = data.upgrade_if_insecure(); out->is_revalidating = data.is_revalidating(); diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h -index 53b1cd261ec419dd68906186a3da651fe792ede0..5945e6d9749ad2a888edfa0c4b00377a7190881b 100644 +index 1b8dbc0538d0af843e40edc41505d08f9034f97b..270822eb756090f8a74f34823009942ed21e8616 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h -@@ -272,6 +272,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) +@@ -269,6 +269,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) static int32_t transition_type(const network::ResourceRequest& request) { return request.transition_type; } @@ -67,10 +67,10 @@ index 53b1cd261ec419dd68906186a3da651fe792ede0..5945e6d9749ad2a888edfa0c4b00377a return request.previews_state; } diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index 27477d595fd22dc49329631a0b52ebdaafe1edb1..a4fd22381738648040cd72dce747285f5fcb698a 100644 +index 79b5d03ded03ced9e6ff4d17d10935004bfb0062..923883fd010f9621c790dd5381a7e1f0cb36e740 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom -@@ -318,6 +318,9 @@ struct URLRequest { +@@ -312,6 +312,9 @@ struct URLRequest { // about this. int32 transition_type; @@ -81,18 +81,18 @@ index 27477d595fd22dc49329631a0b52ebdaafe1edb1..a4fd22381738648040cd72dce747285f // browser decide. // Note: this is an enum of type PreviewsState. diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom -index 4a26ea8928e333a9231dad10b03947b3febf9d47..97bc79ff624767c56f215d77a1bcabed378330aa 100644 +index 4c4cc16db82d7434573f7740855fbe72d68815e6..f71290800b6bb51a39b1f86be36f02d602ac3397 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom -@@ -7,6 +7,7 @@ module network.mojom; - import "mojo/public/mojom/base/time.mojom"; +@@ -8,6 +8,7 @@ import "mojo/public/mojom/base/time.mojom"; import "mojo/public/mojom/base/unguessable_token.mojom"; import "services/network/public/mojom/fetch_api.mojom"; + import "services/network/public/mojom/ip_address_space.mojom"; +import "services/network/public/mojom/http_raw_headers.mojom"; import "services/network/public/mojom/ip_endpoint.mojom"; import "services/network/public/mojom/load_timing_info.mojom"; import "services/network/public/mojom/network_param.mojom"; -@@ -28,6 +29,9 @@ struct URLResponseHead { +@@ -29,6 +30,9 @@ struct URLResponseHead { // The response headers or NULL if the URL type does not support headers. HttpResponseHeaders headers; @@ -103,18 +103,18 @@ index 4a26ea8928e333a9231dad10b03947b3febf9d47..97bc79ff624767c56f215d77a1bcabed string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index e53ff47c6f43d00fd89695c4ef08ef5f455df103..56dce34839df7569361bfe7076f6dd2f7ef307c7 100644 +index 5c5aeeda64b244ab1f58556f28d2ca3c133d03a8..2f9aa4d49693a22507f668b2738c54be59802b8f 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -532,6 +532,7 @@ URLLoader::URLLoader( - peer_closed_handle_watcher_(FROM_HERE, +@@ -469,6 +469,7 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), + per_factory_corb_state_(context.GetMutableCorbState()), + report_raw_headers_(request.report_raw_headers), devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -690,7 +691,7 @@ URLLoader::URLLoader( +@@ -636,7 +637,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,10 +123,10 @@ index e53ff47c6f43d00fd89695c4ef08ef5f455df103..56dce34839df7569361bfe7076f6dd2f url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1340,6 +1341,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { - response_ = network::mojom::URLResponseHead::New(); - PopulateResourceResponse(url_request_.get(), is_load_timing_enabled_, - options_, response_.get()); +@@ -1395,6 +1396,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { + } + + response_ = BuildResponseHead(); + if (raw_response_headers_ && report_raw_headers_) { + std::vector header_array; + size_t iterator = 0; @@ -144,10 +144,10 @@ index e53ff47c6f43d00fd89695c4ef08ef5f455df103..56dce34839df7569361bfe7076f6dd2f // 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 fcc47a2389c5172e3c674e413baa857183e0f2f8..af952b03ca87c4022400ba93d2e1fb8d3759960a 100644 +index 98fe2512671e43a4e0da6e9b9ff714d7204fc3a8..bf8751c1b37a678f73ec8e11c86e1eb1287443e4 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -503,6 +503,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -506,6 +506,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr resource_scheduler_request_handle_; diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 33e1bd005b790..195ea7ae74d67 100644 --- a/patches/chromium/fix_aspect_ratio_with_max_size.patch +++ b/patches/chromium/fix_aspect_ratio_with_max_size.patch @@ -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 daa10f36722c6f6f0fbfbf5de3918b966323434a..067861bb743ee2f3c1916794d45efb7dd591b230 100644 +index 9ca11a19e66e34585b4b11e89cc3b789a4389b5e..264a9109e42c23e9be6bf7269b3cfee2634b61e4 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3567,6 +3567,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3581,6 +3581,21 @@ 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); diff --git a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch index 409db5c2413c1..7db4c0911e37d 100644 --- a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch +++ b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch @@ -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.js b/chrome/browser/resources/pdf/pdf_viewer.js -index 42407ef7c214bed1eb44165a87c6d0dc44f0ad7f..64225caf3738549520b35259628559ec6c15d901 100644 +index f3d71309080248024983891acb17d4df69648056..3cd563ed13ab9bd8fa084f54eb8f112b66399eb9 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.js +++ b/chrome/browser/resources/pdf/pdf_viewer.js -@@ -967,25 +967,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -966,25 +966,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { dataArray = [result.dataToSave]; } @@ -47,7 +47,7 @@ index 42407ef7c214bed1eb44165a87c6d0dc44f0ad7f..64225caf3738549520b35259628559ec } /** -@@ -1112,30 +1099,13 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -1111,30 +1098,13 @@ export class PDFViewerElement extends PDFViewerBaseElement { if (!fileName.toLowerCase().endsWith('.pdf')) { fileName = fileName + '.pdf'; } diff --git a/patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch b/patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch deleted file mode 100644 index 17f355134d0f0..0000000000000 --- a/patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: David Sanders -Date: Fri, 11 Feb 2022 22:37:39 +0000 -Subject: fix: don't restore maximized windows when calling ShowInactive - -This is a backport from Chromium of -https://chromium-review.googlesource.com/c/chromium/src/+/3371573. - -diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 067861bb743ee2f3c1916794d45efb7dd591b230..6507557bf5a47492343602607e0dbb7d8f88246d 100644 ---- a/ui/views/win/hwnd_message_handler.cc -+++ b/ui/views/win/hwnd_message_handler.cc -@@ -664,9 +664,16 @@ void HWNDMessageHandler::Show(ui::WindowShowState show_state, - SetWindowPlacement(hwnd(), &placement); - native_show_state = SW_SHOWMAXIMIZED; - } else { -+ const bool is_maximized = IsMaximized(); -+ -+ // Use SW_SHOW/SW_SHOWNA instead of SW_SHOWNORMAL/SW_SHOWNOACTIVATE so that -+ // the window is not restored to its original position if it is maximized. -+ // This could be used unconditionally for ui::SHOW_STATE_INACTIVE, but -+ // cross-platform behavior when showing a minimized window is inconsistent, -+ // some platforms restore the position, some do not. See crbug.com/1296710 - switch (show_state) { - case ui::SHOW_STATE_INACTIVE: -- native_show_state = SW_SHOWNOACTIVATE; -+ native_show_state = is_maximized ? SW_SHOWNA : SW_SHOWNOACTIVATE; - break; - case ui::SHOW_STATE_MAXIMIZED: - native_show_state = SW_SHOWMAXIMIZED; -@@ -677,9 +684,9 @@ void HWNDMessageHandler::Show(ui::WindowShowState show_state, - case ui::SHOW_STATE_NORMAL: - if ((GetWindowLong(hwnd(), GWL_EXSTYLE) & WS_EX_TRANSPARENT) || - (GetWindowLong(hwnd(), GWL_EXSTYLE) & WS_EX_NOACTIVATE)) { -- native_show_state = SW_SHOWNOACTIVATE; -+ native_show_state = is_maximized ? SW_SHOWNA : SW_SHOWNOACTIVATE; - } else { -- native_show_state = SW_SHOWNORMAL; -+ native_show_state = is_maximized ? SW_SHOW : SW_SHOWNORMAL; - } - break; - case ui::SHOW_STATE_FULLSCREEN: diff --git a/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch b/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch index aaf3d8e889dd8..cf2398b0c00ef 100644 --- a/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch +++ b/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch @@ -50,7 +50,7 @@ upstream would also hit this DCHECK, so give it a try with content_shell or chrome and that would help reporting upstream crbug. diff --git a/services/device/device_service.cc b/services/device/device_service.cc -index 1081fb518f896b1ca862f900866e271bb4cc31ad..b68e5bbb276204a4db752f5646c8256497ead18d 100644 +index 11a7b2902490986ba2462f92c3b3e5ae1b1a127f..32d591621c7206affab50ef061aa565527d5952f 100644 --- a/services/device/device_service.cc +++ b/services/device/device_service.cc @@ -159,7 +159,7 @@ DeviceService::~DeviceService() { diff --git a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index 5df60153704b6..458f2e257efd7 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta to users. We should try to upstream this. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index b693a98ef9e4333b0d1825ee156860a5c2dafcf6..5ca08191deaf9e8af198e12e51b1d58bb5089ffb 100644 +index 7440f2025701ccde0ade36cda22467dd0614109b..3c6ee78454dc9154a37ec9046e382878ffda0c82 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1816,7 +1816,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1830,7 +1830,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, @@ -21,12 +21,12 @@ index b693a98ef9e4333b0d1825ee156860a5c2dafcf6..5ca08191deaf9e8af198e12e51b1d58b // Calculates the PageVisibilityState for |visibility|, taking the capturing // state into account. diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index d59f80df234872e0e7a89c9283e820a49c30b0e4..c3c97789daba03d288c442526015017adcaf1e88 100644 +index cd1b44d4ff5ce8924749ba9e41b3f599108bb8fd..72bc509b0506fafd026aa858864623886142b5f0 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -677,6 +677,10 @@ class WebContents : public PageNavigator, +@@ -673,6 +673,10 @@ class WebContents : public PageNavigator, bool stay_awake, - bool is_activity = true) WARN_UNUSED_RESULT = 0; + bool is_activity = true) = 0; + virtual void DecrementCapturerCount(bool stay_hidden, + bool stay_awake, diff --git a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch index 9ee02ccf3acd2..2986f58de269f 100644 --- a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch +++ b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch @@ -59,7 +59,7 @@ index ad366d0fd4c3a637d75a102ab56984f0d01bfc04..d63eb133fd4bab1ea309bb8c742acf88 // 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 5938f75742b793868638e693a9a8c8dc686dfc46..7f30f3fdd2c63612232e31c331b26b17ad729efb 100644 +index ac923f436cbdd6ded0629da4e4c659d94258e55b..7e603dd5bad2a60b1bd7d9df569a10e838d797bc 100644 --- a/content/browser/media/media_keys_listener_manager_impl.cc +++ b/content/browser/media/media_keys_listener_manager_impl.cc @@ -55,7 +55,12 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey( @@ -76,7 +76,7 @@ index 5938f75742b793868638e693a9a8c8dc686dfc46..7f30f3fdd2c63612232e31c331b26b17 !media_keys_listener_->StartWatchingMediaKey(key_code)) { return false; } -@@ -232,18 +237,18 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { +@@ -238,18 +243,18 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { #endif if (system_media_controls_) { diff --git a/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch b/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch index 302cb66261d11..f957509ddd87c 100644 --- a/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch +++ b/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch @@ -14,7 +14,7 @@ but it's not strictly necessary for this API to work to spec. Profile check has been upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3247196 diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index cf2a4efc6e99cd53bf0a3a7ae9222578627d3714..171ebbdc16d0fb47054ccc001cf144bb93355c28 100644 +index 9b2c91d39324b61afa49ccea6be2eda8308473ff..1652b52c5c752809348b3ab44d3703ac343c829d 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -382,13 +382,9 @@ void FullscreenController::EnterFullscreenModeInternal( @@ -41,7 +41,7 @@ index cf2a4efc6e99cd53bf0a3a7ae9222578627d3714..171ebbdc16d0fb47054ccc001cf144bb if (display_id != display::kInvalidDisplayId) { // Check, but do not prompt, for permission to request a specific screen. // Sites generally need permission to get the display id in the first place. -@@ -414,6 +411,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -413,6 +410,7 @@ void FullscreenController::EnterFullscreenModeInternal( display_id = display::kInvalidDisplayId; } } diff --git a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch index 719b838e366ab..0559a3d4c4528 100644 --- a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch +++ b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch @@ -7,7 +7,7 @@ This tweaks Chrome's Accessibility support at chrome://accessibility to make it usable from Electron by removing Profile references. diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc -index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba135a2d885 100644 +index 555dba06e99bd7294f88a21ddaf3b86a12fdd5ac..8064592eb285d1407ff8334149c27e3a65560d9e 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc @@ -20,7 +20,10 @@ @@ -24,7 +24,7 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 @@ -49,9 +52,11 @@ #include "ui/views/accessibility/view_accessibility.h" - #if !defined(OS_ANDROID) + #if !BUILDFLAG(IS_ANDROID) +#if 0 #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" @@ -37,7 +37,7 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 accessibility_mode); } --#if !defined(OS_ANDROID) +-#if !BUILDFLAG(IS_ANDROID) +#if 0 std::unique_ptr BuildTargetDescriptor(Browser* browser) { std::unique_ptr target_data( @@ -53,25 +53,25 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode(); bool is_native_enabled = content::BrowserAccessibilityState::GetInstance() @@ -236,7 +243,7 @@ void HandleAccessibilityRequestCallback( - data.SetBoolean(kViewsAccessibility, + data.SetBoolKey(kViewsAccessibility, features::IsAccessibilityTreeForViewsEnabled()); - bool show_internal = pref->GetBoolean(prefs::kShowInternalAccessibilityTree); + bool show_internal = true; - data.SetString(kInternal, show_internal ? kOn : kOff); + data.SetStringKey(kInternal, show_internal ? kOn : kOff); std::unique_ptr rvh_list(new base::ListValue()); @@ -271,11 +278,11 @@ void HandleAccessibilityRequestCallback( data.Set(kPagesField, std::move(rvh_list)); std::unique_ptr browser_list(new base::ListValue()); --#if !defined(OS_ANDROID) +-#if !BUILDFLAG(IS_ANDROID) +#if 0 for (Browser* browser : *BrowserList::GetInstance()) { browser_list->Append(BuildTargetDescriptor(browser)); } --#endif // !defined(OS_ANDROID) -+#endif // !defined(OS_ANDROID) +-#endif // !BUILDFLAG(IS_ANDROID) ++#endif // !BUILDFLAG(IS_ANDROID) data.Set(kBrowsersField, std::move(browser_list)); std::unique_ptr widgets_list(new base::ListValue()); @@ -97,7 +97,7 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 std::string accessibility_contents = - web_contents->DumpAccessibilityTree(internal, property_filters); + web_contents->DumpAccessibilityTree(true, property_filters); - result->SetString(kTreeField, accessibility_contents); + result->SetStringKey(kTreeField, accessibility_contents); FireWebUIListener(request_type, *(result.get())); } @@ -627,6 +638,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( @@ -113,7 +113,7 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 } } +#endif - #endif // !defined(OS_ANDROID) + #endif // !BUILDFLAG(IS_ANDROID) // No browser with the specified |session_id| was found. std::unique_ptr result(new base::DictionaryValue()); @@ -757,5 +770,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index e8e041d8c7179..7addac9d25797 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -10,10 +10,10 @@ them should they exist. This will be upstreamed. diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h -index 36f2e09d563a610128305cf4890e2af3bf6f4cdd..85363bd922bf0ab2630e3d5f350de0c58792963a 100644 +index 3725aa4cd902a9c84e22bbcbd702bd47e1901fe4..221019f5df71e1d66accbf2ea2d161bd1125666f 100644 --- a/printing/printing_context_mac.h +++ b/printing/printing_context_mac.h -@@ -85,6 +85,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { +@@ -83,6 +83,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { // Returns true if the orientation was set. bool SetOrientationIsLandscape(bool landscape); diff --git a/patches/chromium/fix_use_electron_generated_resources.patch b/patches/chromium/fix_use_electron_generated_resources.patch index 1d976575fa597..60b0f49524594 100644 --- a/patches/chromium/fix_use_electron_generated_resources.patch +++ b/patches/chromium/fix_use_electron_generated_resources.patch @@ -26,7 +26,7 @@ index f72431f5bc7ba82316cf318f7845e7523c366d92..5133f3cd28c0d630a039118eb91c6c37 #include "components/zoom/page_zoom_constants.h" #include "pdf/pdf_features.h" diff --git a/chrome/browser/printing/printing_service.cc b/chrome/browser/printing/printing_service.cc -index ec70ac13f96a0085747ecc3f275fb392d3dcca42..6b470dad30760ee709e702e94c19eaeb3099442a 100644 +index 6d18517898c11c6a628cec2eade57fe845827b3d..a21f52e8a3c6f80d69b27faae4b77700fdd09e35 100644 --- a/chrome/browser/printing/printing_service.cc +++ b/chrome/browser/printing/printing_service.cc @@ -5,7 +5,7 @@ diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 78b610c496281..481bd633fe47e 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch Allows embedder to intercept site instances created by chromium. diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index 4864b5301dec83150d3a48a9168e0d7ddef344ad..0e429686a325ef08ce617810c2c5ec4108bec973 100644 +index 1ca418461788e5b7d58c14b03c456d2c21f1305b..7a65b6713e3d0547f1990f8c59d0d11459532477 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3099,6 +3099,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3089,6 +3089,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index 4864b5301dec83150d3a48a9168e0d7ddef344ad..0e429686a325ef08ce617810c2c5ec41 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 253c47f41294155bab9a3b0884e65a09fcacd0d0..ccce9c5de27c863c181e5c54b3f8976106a77c08 100644 +index 2fe1462a2cd92a731a5816b5fc22b059bad92fe8..a4dfa54a7844983262cc0fa635433131382e4d14 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -274,6 +274,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -275,6 +275,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index a4fac7bbe5800..5043b8a49a854 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -7,10 +7,10 @@ We don't use gin to create the V8 platform, because we need to inject Node things. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index 6305d03e2315e8b9925071c018a81c102dda2a55..2bed8f7ce21ab052c0c319775875b9cf008b2636 100644 +index 00190da513499e6275d19bd99b6502db246cd33d..f273749bd026abb287ba33e03208a286e80a57a1 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -115,9 +115,10 @@ IsolateHolder::~IsolateHolder() { +@@ -121,9 +121,10 @@ IsolateHolder::~IsolateHolder() { void IsolateHolder::Initialize(ScriptMode mode, v8::ArrayBuffer::Allocator* allocator, const intptr_t* reference_table, @@ -24,10 +24,10 @@ index 6305d03e2315e8b9925071c018a81c102dda2a55..2bed8f7ce21ab052c0c319775875b9cf g_reference_table = reference_table; } diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index 78133f9b34327c311c69620af621eba3d7f2cbf9..a965545de342811e468594fab4d792fc5c4daf32 100644 +index 1e36669dfb275b8a7c4913c8465bd299c548ed3a..178023d52c9e8ef716ee215e7a243b1800357818 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -100,7 +100,8 @@ class GIN_EXPORT IsolateHolder { +@@ -102,7 +102,8 @@ class GIN_EXPORT IsolateHolder { static void Initialize(ScriptMode mode, v8::ArrayBuffer::Allocator* allocator, const intptr_t* reference_table = nullptr, @@ -38,10 +38,10 @@ index 78133f9b34327c311c69620af621eba3d7f2cbf9..a965545de342811e468594fab4d792fc // 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 f576fc909eed4168130571590e3a80d19ccc3dd8..ff91f59446275d027ac7100c1eb0dcd1051993da 100644 +index f411bbde031d18bd3e0322ce154ccfd8eace930d..5db96b7402de70d1b4eba8b12a51fbc89fcb7fb6 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -341,12 +341,14 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -342,12 +342,14 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, @@ -59,7 +59,7 @@ index f576fc909eed4168130571590e3a80d19ccc3dd8..ff91f59446275d027ac7100c1eb0dcd1 // Set this early on as some initialization steps, such as the initialization // of the virtual memory cage, already use V8's random number generator. diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h -index de650aa85dd083ec8c99d72b1f6cc447bb277f09..da97190ca86f5e04dd74dbff2282901fb4713f5b 100644 +index beeedc5737f6e60dde123200fbb6430a40366577..17ee4c894e89b7d2d12377475a5dd01910b61312 100644 --- a/gin/v8_initializer.h +++ b/gin/v8_initializer.h @@ -29,7 +29,8 @@ class GIN_EXPORT V8Initializer { diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 4a50d8a5e8825..385502d7e9df0 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -12,10 +12,10 @@ rendering and there is no signal from browser process on this event to identify it. diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc -index 7821945da13ece57529c1de14d1cbd7f645d19ab..9be940f4ee047279f5969a6c572d6acbd408ddc5 100644 +index b26a3c72aa63b81f8f4558b28b404faf138a897b..335dc385eb03bc9634387af44dfd1aa3bfa71cb6 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc -@@ -229,6 +229,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { +@@ -230,6 +230,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { base::AutoLock auto_lock(lock_); private_->TerminateInfoCollectionGpuProcess(); } @@ -28,7 +28,7 @@ index 7821945da13ece57529c1de14d1cbd7f645d19ab..9be940f4ee047279f5969a6c572d6acb void GpuDataManagerImpl::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index bb9a976842b869bf31c46c45686f6f5238841eb2..489619f6d3d4accadb811db287a9ff498f35d8bb 100644 +index 4364da656ac02f2f717e713f37d29ce44c14242b..ba044aee23db495e1da69c5bc0a807e96783faa9 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h @@ -124,6 +124,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, @@ -40,10 +40,10 @@ index bb9a976842b869bf31c46c45686f6f5238841eb2..489619f6d3d4accadb811db287a9ff49 void UpdateDawnInfo(const std::vector& dawn_info_list); diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index cddf8dfa73ba64b89e37b3ca375d5872d23b995f..06fbfe2b0a9a74a785ba54d495f7813286e81b6b 100644 +index 972bb4e8ba2d1470ed5f24c125551e3e627d79e4..d3b15d35eb458c00e470569904924c28c7a3957d 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1212,6 +1212,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1211,6 +1211,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } @@ -57,7 +57,7 @@ index cddf8dfa73ba64b89e37b3ca375d5872d23b995f..06fbfe2b0a9a74a785ba54d495f78132 void GpuDataManagerImplPrivate::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h -index 8ae871aaf3da7b08da79490a87104ce62ca30b4e..ca6405c728187c10b19e86e7848b6f5fe558e601 100644 +index 81f6abb91a3fdefc1b0128f3224c7b82bfcbd0d2..99980e3528f4660bf1205e44326645d97e762cb9 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h @@ -89,6 +89,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 55bed692b0c31..e595534ffa59e 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -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 f3a209264743ce4f38da3c51ad49a9a9308d39e0..57dbb19552cb8496a2c402cbf20ca7ce39c0dad2 100644 +index 77f77f2deb13fc1c02903fc436028cce2d051cf0..25223130a82b22ad46eddf7e133c6085c5c843d3 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -903,6 +903,11 @@ +@@ -952,6 +952,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index c2802a41c4839..52f3cc0d8a50e 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -6,25 +6,27 @@ Subject: gtk_visibility.patch Allow electron to depend on GTK in the GN build. diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn -index c7173176472e80d8de4888000e99d45843240785..c3076d8112ec8976a438d1351ad2e404ac64fce7 100644 +index 349043f8a3cfc9f91cbae951e74258799a4fd126..0f7e3e544f524a7ad6660b54912cb1190282b6fc 100644 --- a/build/config/linux/gtk/BUILD.gn +++ b/build/config/linux/gtk/BUILD.gn -@@ -33,6 +33,7 @@ pkg_config("gtk_internal_config") { +@@ -27,6 +27,7 @@ pkg_config("gtk_internal_config") { group("gtk") { visibility = [ + "//electron:*", - # This is the only target that can depend on GTK. Do not add more targets - # to this list. - "//ui/gtk:gtk_stubs", -@@ -64,6 +65,9 @@ pkg_config("gtkprint_internal_config") { - } + # These are allow-listed for WebRTC builds. Nothing in else should depend + # on GTK. + "//examples:peerconnection_client", +diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn +index dd65850ec1352b764a9661b37e7c7b5e7d256016..89094825f858dcd91298dbaf26b370ca57eb4836 100644 +--- a/ui/ozone/platform/x11/BUILD.gn ++++ b/ui/ozone/platform/x11/BUILD.gn +@@ -6,7 +6,7 @@ import("//build/config/chromeos/ui_mode.gni") + import("//gpu/vulkan/features.gni") + import("//ui/base/ui_features.gni") + +-visibility = [ "//ui/ozone/*" ] ++visibility = [ "//ui/ozone/*", "//electron:*" ] + + assert(is_linux || is_chromeos) - group("gtkprint") { -- visibility = [ "//ui/gtk:*" ] -+ visibility = [ -+ "//electron:*", -+ "//ui/gtk:*", -+ ] - public_configs = [ ":gtkprint_internal_config" ] - } diff --git a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch index 200d22d17c1b8..2b0621f918e82 100644 --- a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch +++ b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch @@ -8,13 +8,13 @@ require a largeish patch to get working, so just redirect it to our implementation instead. diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc -index ae5c53a945707ea269db0468f3e12a90d61cbafb..e74637fd3bb934b97f7c55cd8c57e86035a8d64e 100644 +index b5c0e1c131351a51e3c03918dfc10e92ca1bace1..c6fe2e473a9d8a5ed2854a69909eb360d052147a 100644 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc @@ -10,8 +10,8 @@ + #include "base/bind.h" #include "base/feature_list.h" #include "base/guid.h" - #include "base/ignore_result.h" -#include "chrome/browser/extensions/api/streams_private/streams_private_api.h" -#include "chrome/browser/plugins/plugin_utils.h" +#include "electron/shell/browser/extensions/api/streams_private/streams_private_api.h" diff --git a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch index dc5153dd6a2fd..6682f1b87ea4a 100644 --- a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch +++ b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch @@ -11,10 +11,10 @@ If removing this patch causes no sync failures, it's safe to delete :+1: Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index 13e126305548d8681754afdc5bca72e0df22f98c..63fd08c27d6f20295ce50be0685881ec0e645594 100755 +index ee41efe814da161cafb49229e1f02c8b82749e7c..494bbdeea2725e4b1218ba534fd126203012c100 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py -@@ -282,6 +282,8 @@ def main(): +@@ -298,6 +298,8 @@ def GetDefaultHostOs(): 'win32': 'win', } default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform) @@ -22,4 +22,4 @@ index 13e126305548d8681754afdc5bca72e0df22f98c..63fd08c27d6f20295ce50be0685881ec + default_host_os = 'mac' if default_host_os == 'mac' and platform.machine() == 'arm64': default_host_os = 'mac-arm64' - + return default_host_os diff --git a/patches/chromium/isolate_holder.patch b/patches/chromium/isolate_holder.patch index 71d3f81551c19..bcf1ff58add19 100644 --- a/patches/chromium/isolate_holder.patch +++ b/patches/chromium/isolate_holder.patch @@ -15,42 +15,38 @@ 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 2bed8f7ce21ab052c0c319775875b9cf008b2636..9aa4536d5c8fb38ac58e41c107b946cf9ba5d738 100644 +index f273749bd026abb287ba33e03208a286e80a57a1..0159cd61a8e95d6cca51cdc855f1dea3ec965d6b 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -57,7 +57,8 @@ IsolateHolder::IsolateHolder( - IsolateType isolate_type, - IsolateCreationMode isolate_creation_mode, +@@ -59,7 +59,8 @@ IsolateHolder::IsolateHolder( v8::CreateHistogramCallback create_histogram_callback, -- v8::AddHistogramSampleCallback add_histogram_sample_callback) -+ v8::AddHistogramSampleCallback add_histogram_sample_callback, + v8::AddHistogramSampleCallback add_histogram_sample_callback, + v8::FatalErrorCallback fatal_error_callback, +- v8::OOMErrorCallback oom_error_callback) ++ v8::OOMErrorCallback oom_error_callback, + v8::Isolate* isolate) : access_mode_(access_mode), isolate_type_(isolate_type) { CHECK(Initialized()) << "You need to invoke gin::IsolateHolder::Initialize first"; -@@ -68,7 +69,11 @@ IsolateHolder::IsolateHolder( +@@ -70,7 +71,7 @@ IsolateHolder::IsolateHolder( v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator; DCHECK(allocator); - isolate_ = v8::Isolate::Allocate(); -+ if (!isolate) { -+ isolate_ = v8::Isolate::Allocate(); -+ } else { -+ isolate_ = isolate; -+ } ++ isolate_ = isolate ? isolate : v8::Isolate::Allocate(); isolate_data_ = std::make_unique(isolate_, allocator, access_mode_, task_runner); if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) { diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index a965545de342811e468594fab4d792fc5c4daf32..94d1d45eb766ee1e2a2910124e46969edf264ae9 100644 +index 178023d52c9e8ef716ee215e7a243b1800357818..979fdc27efbe69c276894e0dc82e53ac2c4db7b4 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -82,7 +82,8 @@ class GIN_EXPORT IsolateHolder { - IsolateType isolate_type, - IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal, +@@ -84,7 +84,8 @@ class GIN_EXPORT IsolateHolder { v8::CreateHistogramCallback create_histogram_callback = nullptr, -- v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr); -+ v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr, + v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr, + v8::FatalErrorCallback fatal_error_callback = nullptr, +- v8::OOMErrorCallback oom_error_callback = nullptr); ++ v8::OOMErrorCallback oom_error_callback = nullptr, + v8::Isolate* isolate = nullptr); IsolateHolder(const IsolateHolder&) = delete; IsolateHolder& operator=(const IsolateHolder&) = delete; diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index 05624bfa5e7b0..b960942083b87 100644 --- a/patches/chromium/load_v8_snapshot_in_browser_process.patch +++ b/patches/chromium/load_v8_snapshot_in_browser_process.patch @@ -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 9b3e3ca0cf6c9052953e0ac82f1622113a8b2d0d..be8aaecf589bb5b8198d44acbf115e456ed76dc1 100644 +index 9d22238878e3204dd1d866d2bb085d5311dca36a..e3610815fd942e631a61089ca5eeba07edd7213c 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -254,11 +254,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -249,11 +249,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, const std::string& process_type) { diff --git a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch index 6ba0de2e1d1d7..6cf5df78a02c3 100644 --- a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch +++ b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch @@ -9,12 +9,12 @@ be created for each child process, despite logs being redirected to a file. diff --git a/content/app/content_main.cc b/content/app/content_main.cc -index 5ad6c026e9d05b3c016adeab1c5eea9883dcac6c..2c94c115514b644c897e9c3896fe2941d42cf132 100644 +index 332b7d026e0365a66d5f4f275a90b48d0f2db5aa..3813fe1a3b2e95af5e213201ab3ea08a656e01c3 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -378,8 +378,12 @@ RunContentProcess(ContentMainParams params, +@@ -381,8 +381,12 @@ RunContentProcess(ContentMainParams params, - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) // Route stdio to parent console (if any) or create one. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableLogging)) { diff --git a/patches/chromium/make_include_of_stack_trace_h_unconditional.patch b/patches/chromium/make_include_of_stack_trace_h_unconditional.patch deleted file mode 100644 index d91176c28591b..0000000000000 --- a/patches/chromium/make_include_of_stack_trace_h_unconditional.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Tue, 11 May 2021 20:41:00 -0700 -Subject: make include of stack_trace.h unconditional - -This conditional include throws goma for a loop for no real reason. -While we work on either upstreaming this or fixing the underlying goma -issue this makes our builds 33% faster during local testing (11m vs 18m). - -diff --git a/base/sequence_checker.h b/base/sequence_checker.h -index 50a548a759c2dc6d79978741a0c803500d53a9f8..cd5049e8bf59c51b890bcc332f9a1c5f0ec339c9 100644 ---- a/base/sequence_checker.h -+++ b/base/sequence_checker.h -@@ -10,9 +10,8 @@ - #include "base/strings/string_piece.h" - #include "build/build_config.h" - --#if DCHECK_IS_ON() - #include "base/debug/stack_trace.h" --#endif -+ - - // SequenceChecker is a helper class used to help verify that some methods of a - // class are called sequentially (for thread-safety). It supports thread safety diff --git a/patches/chromium/mas-cfisobjc.patch b/patches/chromium/mas-cfisobjc.patch index 6d09d342c4c50..88035201b5109 100644 --- a/patches/chromium/mas-cfisobjc.patch +++ b/patches/chromium/mas-cfisobjc.patch @@ -6,11 +6,11 @@ Subject: mas: avoid usage of _CFIsObjC Removes usage of the _CFIsObjC private API. diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm -index 6e5d76dc70e472f599385d967e8941200730fd9d..73d7f162a465d2e50d3ea3e6d14b6c0ed37775d1 100644 +index bd26c088c2340f0c88227837fc797b1ed8157768..6e133c11acb7ea2570e6295b0788edc1606afbc2 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm @@ -31,12 +31,6 @@ - #if !defined(OS_IOS) + #if !BUILDFLAG(IS_IOS) CFTypeID SecACLGetTypeID(); CFTypeID SecTrustedApplicationGetTypeID(); -// The NSFont/CTFont toll-free bridging is broken before 10.15. @@ -22,7 +22,7 @@ index 6e5d76dc70e472f599385d967e8941200730fd9d..73d7f162a465d2e50d3ea3e6d14b6c0e #endif } // extern "C" -@@ -329,8 +323,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { +@@ -317,8 +311,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { const_cast(reinterpret_cast(cf_val)); DCHECK(!cf_val || CTFontGetTypeID() == CFGetTypeID(cf_val) || @@ -32,7 +32,7 @@ index 6e5d76dc70e472f599385d967e8941200730fd9d..73d7f162a465d2e50d3ea3e6d14b6c0e return ns_val; } -@@ -401,9 +394,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { +@@ -389,9 +382,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { return (CTFontRef)(cf_val); } diff --git a/patches/chromium/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index 8fc488bd02ce0..c55b2981c5830 100644 --- a/patches/chromium/mas-cgdisplayusesforcetogray.patch +++ b/patches/chromium/mas-cgdisplayusesforcetogray.patch @@ -6,10 +6,10 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray Removes usage of the CGDisplayUsesForceToGray private API. diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm -index 7354a04f927af9a61eff83a8a5a9bc1054da80ec..f38ef7e9e1781f0c880ffcccabb984dcafdaada8 100644 +index 1fb42e658d219e46bbc157d929d3b2158c063204..cb6dec724dbe511cb0c66d507d0b68db7296b648 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm -@@ -149,7 +149,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { +@@ -155,7 +155,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { display.set_color_depth(Display::kDefaultBitsPerPixel); display.set_depth_per_component(Display::kDefaultBitsPerComponent); } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index afa9d5f4d5e02..21bddfec34c2b 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -11,10 +11,10 @@ needs to think it's coming from the PWA process). I think it can just be chopped out -- if there are any side-effects, we should be able to work around them. diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm -index c8ba6f3da89d7d370032dd964c64a327b2e2484e..f9dde6d0a369a2691bac1a1fe1e79c21632abba3 100644 +index 9734fb620a9a4010083af41a9e5cea038556eef5..05c95fb9b15f5ccbfecaee29d360dd27bf42f086 100644 --- a/components/remote_cocoa/app_shim/application_bridge.mm +++ b/components/remote_cocoa/app_shim/application_bridge.mm -@@ -50,6 +50,7 @@ +@@ -51,6 +51,7 @@ // NativeWidgetNSWindowHostHelper: id GetNativeViewAccessible() override { @@ -22,7 +22,7 @@ index c8ba6f3da89d7d370032dd964c64a327b2e2484e..f9dde6d0a369a2691bac1a1fe1e79c21 if (!remote_accessibility_element_) { int64_t browser_pid = 0; std::vector element_token; -@@ -60,6 +61,9 @@ id GetNativeViewAccessible() override { +@@ -61,6 +62,9 @@ id GetNativeViewAccessible() override { ui::RemoteAccessibility::GetRemoteElementFromToken(element_token); } return remote_accessibility_element_.get(); @@ -32,7 +32,7 @@ index c8ba6f3da89d7d370032dd964c64a327b2e2484e..f9dde6d0a369a2691bac1a1fe1e79c21 } void DispatchKeyEvent(ui::KeyEvent* event) override { bool event_handled = false; -@@ -98,8 +102,10 @@ void GetWordAt(const gfx::Point& location_in_content, +@@ -99,8 +103,10 @@ void GetWordAt(const gfx::Point& location_in_content, mojo::AssociatedRemote text_input_host_remote_; std::unique_ptr bridge_; @@ -44,10 +44,10 @@ index c8ba6f3da89d7d370032dd964c64a327b2e2484e..f9dde6d0a369a2691bac1a1fe1e79c21 } // namespace diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index 2cb46846d9c42f8e08c29c39ad8fdbde12bc2ed9..5eb8124be309ad2e55ca01ece23a942b5e1b0101 100644 +index fedefafc9837f681ad1c3fc48d06a333fea893e2..f07a090c24382c9330e8bd8baa3de47ec76da956 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 -@@ -557,10 +557,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -561,10 +561,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -61,10 +61,10 @@ index 2cb46846d9c42f8e08c29c39ad8fdbde12bc2ed9..5eb8124be309ad2e55ca01ece23a942b // Beware: This view was briefly removed (in favor of a bare CALayer) in // crrev/c/1236675. The ordering of unassociated layers relative to NSView diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -index bea5957a47ebc4d75eafa52051be669ac2af9ffd..1f37c096cc4fa40ed26050db1cbdd28aea5dd681 100644 +index 2cd40c288f42937688e4f846a002779158ada68f..f4c7bb0ab75835bfdbd100ce852646bf77817c9e 100644 --- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm +++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -@@ -75,8 +75,10 @@ id GetFocusedBrowserAccessibilityElement() override { +@@ -73,8 +73,10 @@ id GetFocusedBrowserAccessibilityElement() override { return nil; } void SetAccessibilityWindow(NSWindow* window) override { @@ -75,7 +75,7 @@ index bea5957a47ebc4d75eafa52051be669ac2af9ffd..1f37c096cc4fa40ed26050db1cbdd28a } void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, -@@ -138,8 +140,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { +@@ -136,8 +138,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { mojo::AssociatedRemote host_; std::unique_ptr bridge_; @@ -87,7 +87,7 @@ index bea5957a47ebc4d75eafa52051be669ac2af9ffd..1f37c096cc4fa40ed26050db1cbdd28a } 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 7d6b64bc764d16929ecad44dbf0187514a984b76..ed14f9459418e493a3baa6eb3a1265072a46ca76 100644 +index 80d639b4a9eb7fa9265da4977782d125b72db719..5f82a49f6336cf89c8d404f8aef7b103709c95e9 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -49,7 +49,9 @@ class ScopedPasswordInputEnabler; @@ -100,7 +100,7 @@ index 7d6b64bc764d16929ecad44dbf0187514a984b76..ed14f9459418e493a3baa6eb3a126507 @class RenderWidgetHostViewCocoa; namespace content { -@@ -667,10 +669,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -665,10 +667,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; @@ -114,7 +114,7 @@ index 7d6b64bc764d16929ecad44dbf0187514a984b76..ed14f9459418e493a3baa6eb3a126507 // 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 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab16489665eb29e24 100644 +index 09ada3b859e1862cbf365960422871a56af54983..58002d37ba340f84f47e2522c0d7bf7c1a64c5d2 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -253,8 +253,10 @@ @@ -128,7 +128,7 @@ index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab1648966 // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1484,8 +1486,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1498,8 +1500,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -139,7 +139,7 @@ index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab1648966 return [GetInProcessNSView() window]; } -@@ -1529,9 +1533,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1543,9 +1547,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -151,7 +151,7 @@ index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab1648966 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2030,12 +2036,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2038,12 +2044,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -167,10 +167,10 @@ index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab1648966 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 37151bca8d18a3decc418812b6a9ea76eb0c8f3a..3ac702aede00c3eba77751115d6663f561b43c05 100644 +index 37f37c3a8e8a00cf9d4b8959ac2d97fe31629ad8..fa06bafbbaa69a20ce5a3260ca92947cb2bb9228 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -318,6 +318,13 @@ component("base") { +@@ -317,6 +317,13 @@ component("base") { ] } @@ -205,10 +205,10 @@ index e7adfee3210ec723c687adfcc4bee8827ef643e7..25a924a47eeb30d783ef83dbb4896c4b + #endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_ diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h -index 0dfd2de62df57def834a3be4349685da3aab72fb..1881932c122daad0d62e3382bd0e221402b6d380 100644 +index 1964f624abc96c54645d1697b598799cfd9a2a00..30580103974b99dcaed2adb0b460b1af17658927 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h -@@ -29,7 +29,9 @@ +@@ -31,7 +31,9 @@ #include "ui/views/window/dialog_observer.h" @class NativeWidgetMacNSWindow; @@ -218,7 +218,7 @@ index 0dfd2de62df57def834a3be4349685da3aab72fb..1881932c122daad0d62e3382bd0e2214 @class NSView; namespace remote_cocoa { -@@ -429,11 +431,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -445,11 +447,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -233,10 +233,10 @@ index 0dfd2de62df57def834a3be4349685da3aab72fb..1881932c122daad0d62e3382bd0e2214 // Used to force the NSApplication's focused accessibility element to be the // views::Views accessibility tree when the NSView for this is focused. diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -index 48dd1adb4a74201a866b254cfaec85b996ee7517..5b2a46594a23968034a17fbfed173e1031867df9 100644 +index b77478d96caba7e94c198e9cc8cdd7a6b78e6b25..79af41886c66b51219b69282db17497c5af702d5 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -286,14 +286,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -294,14 +294,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const { if (in_process_ns_window_bridge_) return in_process_ns_window_bridge_->ns_view(); @@ -259,7 +259,7 @@ index 48dd1adb4a74201a866b254cfaec85b996ee7517..5b2a46594a23968034a17fbfed173e10 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1206,6 +1214,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1275,6 +1283,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -267,7 +267,7 @@ index 48dd1adb4a74201a866b254cfaec85b996ee7517..5b2a46594a23968034a17fbfed173e10 remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1213,14 +1222,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1282,14 +1291,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, [remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()]; [remote_view_accessible_ setTopLevelUIElement:remote_window_accessible_.get()]; diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index 20cabc776d492..541ac9b7e977d 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -16,10 +16,10 @@ cases where performance improves when disabling remote CoreAnimation (remote CoreAnimation is really only about battery usage). diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h -index c384f18ec959303bd3671c570af87b604d20cf23..f420bd94951f5a2b03d20e5892a4039271ed2078 100644 +index 1b84c9df5990d0905d068ca822d5173313a74edd..89a90a5c8e0c3ede1b0fe63d45c5768b42394474 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h -@@ -20,7 +20,9 @@ +@@ -21,7 +21,9 @@ #include "ui/gl/gl_surface_egl.h" #endif @@ -29,7 +29,7 @@ index c384f18ec959303bd3671c570af87b604d20cf23..f420bd94951f5a2b03d20e5892a40392 @class CALayer; namespace ui { -@@ -113,7 +115,9 @@ class ImageTransportSurfaceOverlayMacBase : public BaseClass, +@@ -116,7 +118,9 @@ class ImageTransportSurfaceOverlayMacBase : public BaseClass, base::WeakPtr delegate_; bool use_remote_layer_api_; @@ -40,10 +40,10 @@ index c384f18ec959303bd3671c570af87b604d20cf23..f420bd94951f5a2b03d20e5892a40392 gfx::Size pixel_size_; diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -index 79a357037df22c78d31ace77ee8cf6291818ecee..3c7d5add7e4f4372708a1b2f7bf31f7b0a4aa0af 100644 +index 224542e2a70e980684d5d882af7fe3988c5ee96b..7a726eea86f21fe31077aaa447cccc05007d5eaa 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -@@ -53,7 +53,7 @@ +@@ -59,7 +59,7 @@ ca_layer_tree_coordinator_ = std::make_unique( use_remote_layer_api_, allow_av_sample_buffer_display_layer); @@ -52,7 +52,7 @@ index 79a357037df22c78d31ace77ee8cf6291818ecee..3c7d5add7e4f4372708a1b2f7bf31f7b // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -62,6 +62,7 @@ +@@ -68,6 +68,7 @@ options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } @@ -60,7 +60,7 @@ index 79a357037df22c78d31ace77ee8cf6291818ecee..3c7d5add7e4f4372708a1b2f7bf31f7b } template -@@ -142,7 +143,9 @@ +@@ -148,7 +149,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { @@ -114,18 +114,28 @@ index d684614589c9e55965450d712ee6dc0deef6aade..e0446753a3d972215423c079160fe8bf // This function will check if all of the interfaces listed above are supported diff --git a/ui/base/cocoa/remote_layer_api.mm b/ui/base/cocoa/remote_layer_api.mm -index bbaf9f466f4999acb5bfccf3b9565fd8f556ca2f..8c846ce9523a4b2f6fbdbdbeae4f94b45ac3c115 100644 +index e6baf74c966791ed5326fea23e7d23259a781313..7fab070b8b06dfc5c9940c3b800735d187a72cf9 100644 --- a/ui/base/cocoa/remote_layer_api.mm +++ b/ui/base/cocoa/remote_layer_api.mm -@@ -12,6 +12,7 @@ +@@ -10,14 +10,17 @@ + namespace ui { ++#ifndef MAS_BUILD + namespace { + // Control use of cross-process CALayers to display content directly from the + // GPU process on Mac. + base::Feature kRemoteCoreAnimationAPI{"RemoteCoreAnimationAPI", + base::FEATURE_ENABLED_BY_DEFAULT}; + } // namespace ++#endif + bool RemoteLayerAPISupported() { +#ifndef MAS_BUILD - static bool disabled_at_command_line = - base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableRemoteCoreAnimation); -@@ -46,6 +47,9 @@ bool RemoteLayerAPISupported() { + if (!base::FeatureList::IsEnabled(kRemoteCoreAnimationAPI)) + return false; + +@@ -49,6 +52,9 @@ bool RemoteLayerAPISupported() { // If everything is there, we should be able to use the API. return true; diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 71b40012bb4e9..02127ca0ad5c1 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -139,10 +139,10 @@ index 3f7dce0281f7b5a540d7b9377ef14a8a6aa9a2fa..11d8419791f3e45d5242081422d452d4 void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 5e1b1f542e98f9257938f909a2d92e3117e298af..4b9825694c8b8d6bbe671ebeef8eb57baf8b05a1 100644 +index 6ffc09426b92b0623957f4a5f547865f49e29546..45cf4e11a77c175d61c2ffe69009802596c97e25 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -174,6 +174,12 @@ source_set("audio") { +@@ -175,6 +175,12 @@ source_set("audio") { "mac/scoped_audio_unit.cc", "mac/scoped_audio_unit.h", ] @@ -169,10 +169,10 @@ index ebdc6364312ee710d416318836c03aeec9bfb65c..aa9b50de7efaf0e1b64effea93204984 } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index 3a541ac224c53b2809e8634286dac91873d46b72..89c9b095a2a96b9cae5e8d4bba85847f9585f985 100644 +index e59fec60e9d593d311b21c12daf2d611a36a2d6e..b812dee59b55edee6efe73ce4b1da0a89b45240e 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc -@@ -140,8 +140,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { +@@ -129,8 +129,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { bool Watch() override { CheckOnCorrectSequence(); @@ -182,10 +182,10 @@ index 3a541ac224c53b2809e8634286dac91873d46b72..89c9b095a2a96b9cae5e8d4bba85847f if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged, base::Unretained(this)))) { LOG(ERROR) << "DNS config watch failed to start."; -@@ -158,6 +158,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { +@@ -147,6 +147,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { success = false; } - #endif // !defined(OS_IOS) + #endif // !BUILDFLAG(IS_IOS) +#endif return success; } @@ -285,3 +285,23 @@ index d59a16112d27e2696437163483c44eca414c225c..1ccd20fe7efa3cbae48f99d0660b0252 default: NOTREACHED(); return nullptr; +diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm +index 7cb34e119cd30353fe56e7c71ed5e1d417896888..dbb6cc8e37eff9b30269687f29808ec3ca46b243 100644 +--- a/ui/accessibility/platform/inspect/ax_transform_mac.mm ++++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm +@@ -86,6 +86,7 @@ + } + } + ++#ifndef MAS_BUILD + // AXTextMarker + if (IsAXTextMarker(value)) { + return AXTextMarkerToBaseValue(value, indexer); +@@ -94,6 +95,7 @@ + // AXTextMarkerRange + if (IsAXTextMarkerRange(value)) + return AXTextMarkerRangeToBaseValue(value, indexer); ++#endif + + // Accessible object + if (IsNSAccessibilityElement(value) || IsAXUIElement(value)) { diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index 55391abb060cd..d4aaf27702eea 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,12 +7,12 @@ 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 f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1f9b6e47e 100644 +index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..ca62a13420aa9c114c00054bbe1215f96285a4e9 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -119,6 +119,11 @@ - #include "services/network/web_transport.h" +@@ -126,6 +126,11 @@ #include "third_party/abseil-cpp/absl/types/optional.h" + #include "url/gurl.h" +// Electron +#include "net/cert/caching_cert_verifier.h" @@ -102,7 +102,7 @@ index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -659,6 +737,13 @@ void NetworkContext::SetClient( +@@ -671,6 +749,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -116,10 +116,10 @@ index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2135,6 +2220,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2226,6 +2311,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); - #endif // BUILDFLAG(IS_CHROMEOS_ASH) + #endif // BUILDFLAG(IS_CHROMEOS) + auto remote_cert_verifier = std::make_unique(std::move(cert_verifier)); + remote_cert_verifier_ = remote_cert_verifier.get(); + cert_verifier = std::make_unique(std::move(remote_cert_verifier)); @@ -127,10 +127,10 @@ index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 6784d76ced7754c44054b243a75a6265314b4d56..55cff37a1ad0ae89bde3ffda11c3d1e9d194e22d 100644 +index 6de81678e62d6921d0df5944ab01705402caa568..e412608e7720004462c48698c8ec39602b2b900e 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -103,6 +103,7 @@ class DomainReliabilityMonitor; +@@ -105,6 +105,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -138,7 +138,7 @@ index 6784d76ced7754c44054b243a75a6265314b4d56..55cff37a1ad0ae89bde3ffda11c3d1e9 class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -217,6 +218,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -220,6 +221,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -147,7 +147,7 @@ index 6784d76ced7754c44054b243a75a6265314b4d56..55cff37a1ad0ae89bde3ffda11c3d1e9 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -758,6 +761,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -793,6 +796,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; #endif @@ -157,10 +157,10 @@ index 6784d76ced7754c44054b243a75a6265314b4d56..55cff37a1ad0ae89bde3ffda11c3d1e9 // CertNetFetcher is not used by the current platform, or if the actual // net::CertVerifier is instantiated outside of the network service. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 8cdb76c6eac2bf3412b55ab1dd0fad0ccb1f954d..647b1e2fc81fb4ee177827d6909c816631009ec3 100644 +index 9cd06ee552f8e592dd9efd1e73b10e5998559c04..fa56cfed3703664232843ad26028096d95dca253 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -272,6 +272,17 @@ struct NetworkContextFilePaths { +@@ -277,6 +277,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -178,7 +178,7 @@ index 8cdb76c6eac2bf3412b55ab1dd0fad0ccb1f954d..647b1e2fc81fb4ee177827d6909c8166 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -787,6 +798,9 @@ interface NetworkContext { +@@ -807,6 +818,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 78dad69115f51..fbb057eaf0f80 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -7,7 +7,7 @@ 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 e2aec3c3faf1dc35788c577b10f2944097a3b020..0c2ce17a3ce7ff70f47485b85fa8c70e8a1230b2 100644 +index 06a1db7fd9324de7d1fcf49c5b8a40b922a945be..c63b92a5a100785bf00b5e6da4c7f71bb9e769b7 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc @@ -196,6 +196,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( @@ -131,10 +131,10 @@ index 951075749b24814606f494c5a89ee2adf527f512..7036323ff8ee38ae92790dfd2e216df6 const GURL& document_url, mojo::PendingReceiver receiver); diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index ac1cbdad1eaa7ce7359a611a349b318ea7617f6c..dde9fb6174be8a0da70cf29d5428ef31035a39f7 100644 +index a1a3683b8da459a5859a2953536f3400a7fda213..602525302cfdd89bf2ddc2924076e7349de7562a 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2130,7 +2130,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2125,7 +2125,7 @@ void RenderProcessHostImpl::CreateNotificationService( document_url = rfh->GetLastCommittedURL(); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/pepper_plugin_support.patch b/patches/chromium/pepper_plugin_support.patch index b6097fe2e8f84..b9d73ff072c6d 100644 --- a/patches/chromium/pepper_plugin_support.patch +++ b/patches/chromium/pepper_plugin_support.patch @@ -156,13 +156,13 @@ index 40fafdbed313800a3f420d9d5a3daf8bbbdb7d95..1367725e04455ba5f299b8341a28f222 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_ISOLATED_FILE_SYSTEM_MESSAGE_FILTER_H_ diff --git a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc -index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a611926acb2 100644 +index 4b84f4ef068a76fa2be244a7f7ca2c6a8734bd46..13ae0a57535dfb516eb70b272fdaa5a4720d0591 100644 --- a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc +++ b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc -@@ -7,8 +7,13 @@ +@@ -6,8 +6,13 @@ + #include "base/check_op.h" #include "chrome/renderer/pepper/pepper_flash_font_file_host.h" - #include "chrome/renderer/pepper/pepper_flash_fullscreen_host.h" +#if 0 #include "chrome/renderer/pepper/pepper_uma_host.h" +#endif @@ -173,23 +173,7 @@ index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a61 #include "content/public/renderer/renderer_ppapi_host.h" #include "pdf/buildflags.h" #include "ppapi/host/ppapi_host.h" -@@ -37,6 +42,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( - if (!host_->IsValidInstance(instance)) - return nullptr; - -+#if 0 - if (host_->GetPpapiHost()->permissions().HasPermission( - ppapi::PERMISSION_FLASH)) { - switch (message.type()) { -@@ -46,6 +52,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( - } - } - } -+#endif - - // TODO(raymes): PDF also needs access to the FlashFontFileHost currently. - // We should either rename PPB_FlashFont_File to PPB_FontFile_Private or get -@@ -68,7 +75,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( +@@ -55,7 +60,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( } } @@ -198,7 +182,7 @@ index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a61 if (host_->GetPpapiHost()->permissions().HasPermission( ppapi::PERMISSION_PDF)) { switch (message.type()) { -@@ -79,6 +86,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( +@@ -66,6 +71,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( } #endif @@ -206,7 +190,7 @@ index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a61 // Permissions for the following interfaces will be checked at the // time of the corresponding instance's method calls. Currently these // interfaces are available only for whitelisted apps which may not have -@@ -88,6 +96,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( +@@ -75,6 +81,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( return std::make_unique(host_, instance, resource); } } diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 20da4288aef00..22bc937a11a4c 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -9,7 +9,7 @@ don't get errors for Chrome's generated resources, which are non-existent because we don't generate them in our build. diff --git a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc -index 3afa0d34a6aff1d8882592fc4a3720698124a9c4..18de9f4e9c3c9599d1ab83a638bbd887b9f7cc59 100644 +index 063cbf00a7ae871d426cef5cec00aa379c3ace11..444d3cc2e1b00a62f382232d3d2eccdd481abf11 100644 --- a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc +++ b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc @@ -5,7 +5,7 @@ @@ -22,7 +22,7 @@ index 3afa0d34a6aff1d8882592fc4a3720698124a9c4..18de9f4e9c3c9599d1ab83a638bbd887 #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" diff --git a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc -index 701d21200fe38870d08c2da93a1b8d139af79b5b..c5fc046b16e927efb017e40d980d98fa830b5bd4 100644 +index 648e199cb015155ba84cf1c846cf6d2a16858007..294bfb625d1155e640eeeb37bea597dc2d980e58 100644 --- a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc +++ b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc @@ -5,7 +5,7 @@ @@ -32,10 +32,10 @@ index 701d21200fe38870d08c2da93a1b8d139af79b5b..c5fc046b16e927efb017e40d980d98fa -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "third_party/skia/include/core/SkColor.h" + #include "ui/base/cursor/cursor.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc -index b40d96b754118c1dd1f1fb62f441a5a870d16ed9..7e205e324f5a8604ae6624c42b5b216e3070c072 100644 +index 0c1fa8676d00240e60ddd037664a409d1c9619dd..64d21f1878c3433324fc61353a10ee21d59c0b47 100644 --- a/chrome/browser/ui/views/overlay/close_image_button.cc +++ b/chrome/browser/ui/views/overlay/close_image_button.cc @@ -6,7 +6,7 @@ @@ -47,8 +47,117 @@ index b40d96b754118c1dd1f1fb62f441a5a870d16ed9..7e205e324f5a8604ae6624c42b5b216e #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" +diff --git a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc +index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d42815d9f4 100644 +--- a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc ++++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc +@@ -20,6 +20,7 @@ + #include "base/timer/timer.h" + #include "build/build_config.h" + #include "chrome/app/vector_icons/vector_icons.h" ++#if 0 + #include "chrome/browser/command_updater_delegate.h" + #include "chrome/browser/command_updater_impl.h" + #include "chrome/browser/profiles/profile.h" +@@ -28,14 +29,15 @@ + #include "chrome/browser/ui/browser_finder.h" + #include "chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.h" + #include "chrome/browser/ui/views/location_bar/location_bar_view.h" ++#endif + #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" + #include "chrome/browser/ui/views/overlay/close_image_button.h" + #include "chrome/browser/ui/views/overlay/resize_handle_button.h" +-#include "chrome/grit/generated_resources.h" + #include "components/omnibox/browser/location_bar_model_impl.h" + #include "components/vector_icons/vector_icons.h" + #include "content/public/browser/document_picture_in_picture_window_controller.h" + #include "content/public/browser/web_contents.h" ++#include "electron/grit/electron_resources.h" + #include "content/public/common/content_constants.h" + #include "media/base/media_switches.h" + #include "media/base/video_util.h" +@@ -57,7 +59,7 @@ + #include "ui/aura/window.h" + #endif + +-#if BUILDFLAG(IS_WIN) ++#if 0 + #include "chrome/browser/shell_integration_win.h" + #include "ui/aura/window.h" + #include "ui/aura/window_tree_host.h" +@@ -91,7 +93,7 @@ T* AddChildView(std::vector>* views, + } // namespace + + OverlayLocationBarViewProxy::~OverlayLocationBarViewProxy() = default; +- ++#if 0 + class OverlayLocationBarViewImpl : public OverlayLocationBarViewProxy, + public ChromeLocationBarModelDelegate, + public LocationBarView::Delegate, +@@ -149,7 +151,7 @@ class OverlayLocationBarViewImpl : public OverlayLocationBarViewProxy, + const std::unique_ptr location_bar_model_; + CommandUpdaterImpl command_updater_; + }; +- ++#endif + // static + std::unique_ptr DocumentOverlayWindowViews::Create( + content::DocumentPictureInPictureWindowController* controller, +@@ -185,7 +187,7 @@ std::unique_ptr DocumentOverlayWindowViews::Create( + overlay_window->Init(std::move(params)); + overlay_window->OnRootViewReady(); + +-#if BUILDFLAG(IS_WIN) ++#if 0 + std::wstring app_user_model_id; + Browser* browser = + chrome::FindBrowserWithWebContents(controller->GetWebContents()); +@@ -260,12 +262,6 @@ views::View* DocumentOverlayWindowViews::GetControlsContainerView() const { + return controls_container_view_; + } + +-const ui::ThemeProvider* DocumentOverlayWindowViews::GetThemeProvider() const { +- // FIXME: is there a way to use a dark theme just for this window? +- DCHECK(profile_for_theme_); +- return &ThemeService::GetThemeProviderForProfile(profile_for_theme_); +-} +- + void DocumentOverlayWindowViews::SetUpViews() { + // The window content consists of the fixed-height controls_container_view at + // the top which is a box layout, and the remainder of the view is filled with +@@ -281,6 +277,7 @@ void DocumentOverlayWindowViews::SetUpViews() { + // +-------------------------------------+ + + content::WebContents* pip_contents = controller_->GetChildWebContents(); ++#if 0 + auto* profile = + Profile::FromBrowserContext(pip_contents->GetBrowserContext()); + profile_for_theme_ = profile; +@@ -291,8 +288,8 @@ void DocumentOverlayWindowViews::SetUpViews() { + location_bar_view_proxy_ = std::make_unique( + profile, controller_->GetWebContents()); + } +- +- auto web_view = std::make_unique(profile); ++#endif ++ auto web_view = std::make_unique(); + DVLOG(2) << __func__ << ": content WebView=" << web_view.get(); + web_view->SetWebContents(pip_contents); + +diff --git a/chrome/browser/ui/views/overlay/document_overlay_window_views.h b/chrome/browser/ui/views/overlay/document_overlay_window_views.h +index 86d385842501d28b5eb42f841822294eb597e6ed..43c19dfa6ec6b48f8694636cc184dd616e5d6aca 100644 +--- a/chrome/browser/ui/views/overlay/document_overlay_window_views.h ++++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.h +@@ -55,7 +55,6 @@ class DocumentOverlayWindowViews : public OverlayWindowViews, + bool IsVisible() const override; + void OnNativeWidgetMove() override; + void OnNativeWidgetDestroyed() override; +- const ui::ThemeProvider* GetThemeProvider() const override; + + // OverlayWindowViews + bool ControlsHitTestContainsPoint(const gfx::Point& point) override; diff --git a/chrome/browser/ui/views/overlay/hang_up_button.cc b/chrome/browser/ui/views/overlay/hang_up_button.cc -index 7b711bdbaf4afddd6ccf300af7bab26487942243..987a60b81554b676661d8f1a53facbc9dc08f5d5 100644 +index 8e54570ea4c83483eedee4c781f0498ba07bc3dd..b1eb0b2f1a3dfb71e1f5d3917c67e66ac2b27d22 100644 --- a/chrome/browser/ui/views/overlay/hang_up_button.cc +++ b/chrome/browser/ui/views/overlay/hang_up_button.cc @@ -4,7 +4,7 @@ @@ -59,53 +168,39 @@ index 7b711bdbaf4afddd6ccf300af7bab26487942243..987a60b81554b676661d8f1a53facbc9 +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/gfx/paint_vector_icon.h" + #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index d63256af63e93c7aab4ce348b9d27953d5346c6c..0f708806aa0e4555c288da38e0f9ecd4c89b1c3e 100644 +index d96a4937e6ff6bbf4311673b4c91e9f0e957832a..a06cae5f50eb671fc05bd3d41ae4d218a649e991 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc -@@ -16,9 +16,11 @@ +@@ -14,13 +14,15 @@ + #include "base/time/time.h" #include "base/timer/timer.h" #include "build/build_config.h" - #include "chrome/app/vector_icons/vector_icons.h" +#if 0 #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" -+#endif - #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" - #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" - #include "chrome/browser/ui/views/overlay/close_image_button.h" -@@ -29,7 +31,8 @@ - #include "chrome/browser/ui/views/overlay/toggle_camera_button.h" - #include "chrome/browser/ui/views/overlay/toggle_microphone_button.h" - #include "chrome/browser/ui/views/overlay/track_image_button.h" -#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" -+#include "components/url_formatter/url_formatter.h" ++#endif #include "components/vector_icons/vector_icons.h" #include "content/public/browser/picture_in_picture_window_controller.h" #include "content/public/browser/web_contents.h" -@@ -58,7 +61,7 @@ ++#include "electron/grit/electron_resources.h" + #include "ui/base/hit_test.h" + #include "ui/display/display.h" + #include "ui/display/screen.h" +@@ -36,7 +38,7 @@ #include "ui/aura/window.h" #endif --#if defined(OS_WIN) +-#if BUILDFLAG(IS_WIN) +#if 0 #include "chrome/browser/shell_integration_win.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" -@@ -251,7 +254,7 @@ std::unique_ptr OverlayWindowViews::Create( - overlay_window->Init(std::move(params)); - overlay_window->OnRootViewReady(); - --#if defined(OS_WIN) -+#if 0 - std::wstring app_user_model_id; - Browser* browser = - chrome::FindBrowserWithWebContents(controller->GetWebContents()); diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc -index ab1717bd630e8f143a2ba6dddfeb04bc95beb7fd..2cf5bcd690a9db84cb14c409f31a82da6a9c0348 100644 +index ad413df822af98f4f80a460c6e464cf5237d5ac4..821b75400a7a4921e59a414516739c6de5a66df7 100644 --- a/chrome/browser/ui/views/overlay/playback_image_button.cc +++ b/chrome/browser/ui/views/overlay/playback_image_button.cc @@ -6,7 +6,7 @@ @@ -118,7 +213,7 @@ index ab1717bd630e8f143a2ba6dddfeb04bc95beb7fd..2cf5bcd690a9db84cb14c409f31a82da #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/resize_handle_button.cc b/chrome/browser/ui/views/overlay/resize_handle_button.cc -index 375efc8f931b1bfd595265829e47c8187a8d8d39..080e652f2c3e88b9a082dbd8fef82c461311cd9c 100644 +index 90c9dbbfa741da8cf72594738c1686b14e277663..34063436a7e8e36f624c1b86765fe886434df54a 100644 --- a/chrome/browser/ui/views/overlay/resize_handle_button.cc +++ b/chrome/browser/ui/views/overlay/resize_handle_button.cc @@ -6,7 +6,7 @@ @@ -131,7 +226,7 @@ index 375efc8f931b1bfd595265829e47c8187a8d8d39..080e652f2c3e88b9a082dbd8fef82c46 #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc -index 8153a0b667383374d787ce105c177eda0cdf2171..e5f33a4c43f2571669dd2bef2260e548e20be9b4 100644 +index ae3b37b13498d63b0bc8d7d66e228f974e1c4b4a..9a4e7de29921209a5a7807efeecb02e05f38692d 100644 --- a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc +++ b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc @@ -5,7 +5,7 @@ @@ -144,7 +239,7 @@ index 8153a0b667383374d787ce105c177eda0cdf2171..e5f33a4c43f2571669dd2bef2260e548 #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" diff --git a/chrome/browser/ui/views/overlay/toggle_camera_button.cc b/chrome/browser/ui/views/overlay/toggle_camera_button.cc -index a3cff2dfa906aa469abd5f12f3f70f0acea0adfe..93ad732afe209a9f51756112a5aa4f7dcd6a8b2e 100644 +index c5254509559fd89a8831d69498e2f120416b08df..711490193ac7a9a122fe2b85661dd1a63d3a06ac 100644 --- a/chrome/browser/ui/views/overlay/toggle_camera_button.cc +++ b/chrome/browser/ui/views/overlay/toggle_camera_button.cc @@ -5,7 +5,7 @@ @@ -155,9 +250,9 @@ index a3cff2dfa906aa469abd5f12f3f70f0acea0adfe..93ad732afe209a9f51756112a5aa4f7d +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/gfx/paint_vector_icon.h" + #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc -index a681ba4ed2de3226b20c5e89361c4bec47dfb8ea..5cd85706018fe163d1e0a9e48e3b8a4be5dec7e9 100644 +index 98d653475bf2aaa57bd11961df3697882a9a40d7..3870cad08c531a2a8b3f6ba84088065a0d31f033 100644 --- a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc +++ b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc @@ -5,7 +5,7 @@ @@ -168,9 +263,9 @@ index a681ba4ed2de3226b20c5e89361c4bec47dfb8ea..5cd85706018fe163d1e0a9e48e3b8a4b +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/gfx/paint_vector_icon.h" + #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc -index 4fceb3f5d802e7f01df59d1b3e9c80cc48af714a..70075228f6104b5a16f551af56eafc6829124143 100644 +index d5690233eb85d9f2992ae90461c0d1fd83730d84..d32ee40d1dc7a0004d534540189179b240964888 100644 --- a/chrome/browser/ui/views/overlay/track_image_button.cc +++ b/chrome/browser/ui/views/overlay/track_image_button.cc @@ -6,7 +6,7 @@ @@ -182,3 +277,49 @@ index 4fceb3f5d802e7f01df59d1b3e9c80cc48af714a..70075228f6104b5a16f551af56eafc68 #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" +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 d25bffe434d866760d1efc4dd972b6ba4946acd0..2819bcefb83b6b4cb10114b7ad1df881ccade58d 100644 +--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc ++++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +@@ -15,9 +15,11 @@ + #include "base/timer/timer.h" + #include "build/build_config.h" + #include "chrome/app/vector_icons/vector_icons.h" ++#if 0 + #include "chrome/browser/profiles/profile.h" + #include "chrome/browser/ui/browser.h" + #include "chrome/browser/ui/browser_finder.h" ++#endif + #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" + #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" + #include "chrome/browser/ui/views/overlay/close_image_button.h" +@@ -28,10 +30,10 @@ + #include "chrome/browser/ui/views/overlay/toggle_camera_button.h" + #include "chrome/browser/ui/views/overlay/toggle_microphone_button.h" + #include "chrome/browser/ui/views/overlay/track_image_button.h" +-#include "chrome/grit/generated_resources.h" + #include "components/vector_icons/vector_icons.h" + #include "content/public/browser/video_picture_in_picture_window_controller.h" + #include "content/public/browser/web_contents.h" ++#include "electron/grit/electron_resources.h" + #include "media/base/media_switches.h" + #include "media/base/video_util.h" + #include "third_party/skia/include/core/SkColor.h" +@@ -53,7 +55,7 @@ + #include "ui/aura/window.h" + #endif + +-#if BUILDFLAG(IS_WIN) ++#if 0 + #include "chrome/browser/shell_integration_win.h" + #include "ui/aura/window.h" + #include "ui/aura/window_tree_host.h" +@@ -127,7 +129,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( + overlay_window->Init(std::move(params)); + overlay_window->OnRootViewReady(); + +-#if BUILDFLAG(IS_WIN) ++#if 0 + std::wstring app_user_model_id; + Browser* browser = + chrome::FindBrowserWithWebContents(controller->GetWebContents()); diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch new file mode 100644 index 0000000000000..686010806fc75 --- /dev/null +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -0,0 +1,97 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Mon, 14 Feb 2022 19:24:36 +0900 +Subject: Port autofill colors to the color pipeline. + +https://chromium-review.googlesource.com/c/chromium/src/+/1652925 removed colors as they are no longer +needed in chromium but our autofill implementation uses them. This patch can be removed if we refactor +our autofill implementation to work like Chromium's. + +diff --git a/ui/color/color_id.h b/ui/color/color_id.h +index 1b9518366ba6c44421a86565ea3eba80e14b6c43..203ac8902eda26262f4178985ee565874bf879b8 100644 +--- a/ui/color/color_id.h ++++ b/ui/color/color_id.h +@@ -121,6 +121,10 @@ + E_CPONLY(kColorPwaSecurityChipForegroundSecure) \ + E_CPONLY(kColorPwaToolbarBackground) \ + E_CPONLY(kColorPwaToolbarForeground) \ ++ E_CPONLY(kColorResultsTableNormalBackground) \ ++ E_CPONLY(kColorResultsTableHoveredBackground) \ ++ E_CPONLY(kColorResultsTableNormalText) \ ++ E_CPONLY(kColorResultsTableDimmedText) \ + E_CPONLY(kColorSeparator) \ + E_CPONLY(kColorShadowBase) \ + E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ +@@ -173,6 +177,7 @@ + E_CPONLY(kColorTreeNodeForeground) \ + E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ + E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ ++ E_CPONLY(kColorUnfocusedBorder) \ + E_CPONLY(kColorWindowBackground) + + #if BUILDFLAG(IS_CHROMEOS) +diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc +index 1d8415814c6245e3f2dfd01de7a2de11f09cdc7a..6db48efe454820e242b862edbfaf4d40cf16eb9d 100644 +--- a/ui/color/ui_color_mixer.cc ++++ b/ui/color/ui_color_mixer.cc +@@ -141,6 +141,17 @@ void AddUiColorMixer(ColorProvider* provider, + kColorPwaSecurityChipForeground}; + mixer[kColorPwaToolbarBackground] = {kColorEndpointBackground}; + mixer[kColorPwaToolbarForeground] = {kColorEndpointForeground}; ++ mixer[kColorResultsTableNormalBackground] = {SK_ColorWHITE}; ++ mixer[kColorResultsTableHoveredBackground] = ++ SetAlpha(kColorResultsTableNormalText, 0x0D); ++ mixer[kColorResultsTableNormalText] = {SK_ColorBLACK}; ++ mixer[kColorResultsTableDimmedText] = {SkColorSetRGB(0x64, 0x64, 0x64)}; ++ if (dark_mode) { ++ mixer[kColorResultsTableNormalBackground] = {SkColorSetRGB(0x28, 0x28, 0x28)}; ++ mixer[kColorResultsTableNormalText] = {SK_ColorWHITE}; ++ mixer[kColorResultsTableDimmedText] = ++ SetAlpha(kColorResultsTableNormalText, 0x80); ++ } + mixer[kColorSeparator] = {kColorMidground}; + mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; + mixer[kColorShadowValueAmbientShadowElevationThree] = +@@ -216,6 +227,7 @@ void AddUiColorMixer(ColorProvider* provider, + mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; + mixer[kColorTreeNodeForegroundSelectedUnfocused] = { + kColorTreeNodeForegroundSelectedFocused}; ++ mixer[kColorUnfocusedBorder] = {kColorMidground}; + mixer[kColorWindowBackground] = {kColorPrimaryBackground}; + } + +diff --git a/ui/color/win/native_color_mixers_win.cc b/ui/color/win/native_color_mixers_win.cc +index 5faab22f665829e04cc07125f2486b9cb35f1f56..9776dbcc576c62ee44cbdd0d59542856363fb8f4 100644 +--- a/ui/color/win/native_color_mixers_win.cc ++++ b/ui/color/win/native_color_mixers_win.cc +@@ -136,16 +136,22 @@ void AddNativeUiColorMixer(ColorProvider* provider, + SetAlpha(kColorNotificationInputForeground, gfx::kGoogleGreyAlpha700); + mixer[kColorSliderTrack] = AlphaBlend( + kColorNativeHighlight, kColorNativeWindow, gfx::kGoogleGreyAlpha400); ++ mixer[kColorResultsTableHoveredBackground] = AlphaBlend( ++ kColorNativeHighlight, kColorNativeWindow, gfx::kGoogleGreyAlpha400); ++ mixer[kColorResultsTableDimmedText] = AlphaBlend( ++ kColorNativeWindowText, kColorNativeWindow, gfx::kGoogleGreyAlpha600); + + // Window Background + mixer[kColorBubbleFooterBackground] = {kColorNativeWindow}; + mixer[kColorTooltipBackground] = {kColorNativeWindow}; + mixer[kColorButtonBackgroundProminentDisabled] = {kColorNativeWindow}; ++ mixer[kColorResultsTableNormalBackground] = {kColorNativeWindow}; + + // Window Text + mixer[kColorTableGroupingIndicator] = {kColorNativeWindowText}; + mixer[kColorThrobber] = {kColorNativeWindowText}; + mixer[kColorTooltipForeground] = {kColorNativeWindowText}; ++ mixer[kColorResultsTableNormalText] = {kColorNativeWindowText}; + + // Hyperlinks + mixer[kColorLinkForeground] = {kColorNativeHotlight}; +@@ -179,6 +185,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, + mixer[kColorTextfieldForeground] = {kColorNativeBtnText}; + mixer[kColorTextfieldForegroundPlaceholder] = {kColorNativeBtnText}; + mixer[kColorTextfieldForegroundDisabled] = {kColorNativeBtnText}; ++ mixer[kColorUnfocusedBorder] = {kColorNativeBtnText}; + + // Highlight/Selected Background + mixer[kColorButtonBorder] = {kColorNativeHighlight}; diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index cc7c628d48689..86e14be4b6659 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -11,10 +11,10 @@ majority of changes originally come from these PRs: This patch also fixes callback for manual user cancellation and success. diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc -index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7d1aae142 100644 +index 8d40bbf98d4d58704f118cb42039b0956a9f6639..06196c0fa02012a5faa82471bd39fac087918f54 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc -@@ -88,6 +88,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { +@@ -89,6 +89,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { return base::FeatureList::IsEnabled(features::kPrintWithReducedRasterization); } @@ -22,15 +22,15 @@ index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7 PrefService* GetPrefsForWebContents(content::WebContents* web_contents) { // TODO(thestig): Figure out why crbug.com/1083911 occurred, which is likely // because `web_contents` was null. As a result, this section has many more -@@ -96,6 +97,7 @@ PrefService* GetPrefsForWebContents(content::WebContents* web_contents) { +@@ -97,6 +98,7 @@ PrefService* GetPrefsForWebContents(content::WebContents* web_contents) { web_contents ? web_contents->GetBrowserContext() : nullptr; return context ? Profile::FromBrowserContext(context)->GetPrefs() : nullptr; } +#endif - #endif // defined(OS_WIN) + #endif // BUILDFLAG(IS_WIN) -@@ -355,8 +357,10 @@ void PrintJob::StartPdfToEmfConversion( +@@ -356,8 +358,10 @@ void PrintJob::StartPdfToEmfConversion( const PrintSettings& settings = document()->settings(); @@ -42,7 +42,7 @@ index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7 using RenderMode = PdfRenderSettings::Mode; RenderMode mode = print_with_reduced_rasterization -@@ -446,8 +450,10 @@ void PrintJob::StartPdfToPostScriptConversion( +@@ -447,8 +451,10 @@ void PrintJob::StartPdfToPostScriptConversion( if (ps_level2) { mode = PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2; } else { @@ -55,10 +55,10 @@ index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7 : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h -index e19f62354edb8acad722c6680296b7d2f55f51fe..51c41b4dbab81ffe5840d59ef45b661cf5c5534b 100644 +index 650c78f16c812170aeda99d75300ff88f47347a0..c33ce445a23f97a744db3a4ac30ef471c359553b 100644 --- a/chrome/browser/printing/print_job.h +++ b/chrome/browser/printing/print_job.h -@@ -257,6 +257,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { +@@ -261,6 +261,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { public: // Event type. enum Type { @@ -69,7 +69,7 @@ index e19f62354edb8acad722c6680296b7d2f55f51fe..51c41b4dbab81ffe5840d59ef45b661c NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..4283a5743c695a7376722f80925722d9e7a6496e 100644 +index 7dbb9aea759e4a80a4ef3133eeffcd952bbe6d50..62fbaa0e24dff2037f47ef4ccf09993aa79b3ef8 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,13 +20,13 @@ @@ -87,13 +87,13 @@ index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..4283a5743c695a7376722f80925722d9 #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -245,16 +245,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, - #endif // defined(OS_LINUX) && defined(USE_CUPS) +@@ -239,16 +239,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, + #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } - mojom::ResultCode result; { - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) // Blocking is needed here because Windows printer drivers are oftentimes // not thread-safe and have to be accessed on the UI thread. base::ScopedAllowBlocking allow_blocking; @@ -111,9 +111,22 @@ index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..4283a5743c695a7376722f80925722d9 - GetSettingsDone(std::move(callback), result); } - #if defined(OS_CHROMEOS) + #if BUILDFLAG(IS_CHROMEOS) +diff --git a/chrome/browser/printing/print_job_worker_oop.cc b/chrome/browser/printing/print_job_worker_oop.cc +index 457749cf31578666304c30a5df1b8428629caafe..21c4a76411ee06775fb5bbb2d5a2ac17911d1c2a 100644 +--- a/chrome/browser/printing/print_job_worker_oop.cc ++++ b/chrome/browser/printing/print_job_worker_oop.cc +@@ -225,7 +225,7 @@ void PrintJobWorkerOop::OnFailure() { + } + + void PrintJobWorkerOop::ShowErrorDialog() { +- ShowPrintErrorDialog(); ++ // [electron]: removed. + } + + void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e0478e3b15c 100644 +index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd0828b8a1 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -29,10 +29,10 @@ @@ -137,8 +150,8 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 #include "mojo/public/cpp/system/buffer.h" #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" -@@ -110,6 +111,8 @@ crosapi::mojom::PrintJobPtr PrintJobToMojom(int job_id, - #endif +@@ -81,6 +82,8 @@ using PrintSettingsCallback = + base::OnceCallback)>; void ShowWarningMessageBox(const std::u16string& message) { + LOG(ERROR) << "Invalid printer settings " << message; @@ -146,7 +159,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -118,6 +121,7 @@ void ShowWarningMessageBox(const std::u16string& message) { +@@ -89,6 +92,7 @@ void ShowWarningMessageBox(const std::u16string& message) { base::AutoReset auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); @@ -154,7 +167,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -217,7 +221,9 @@ void UpdatePrintSettingsReplyOnIO( +@@ -188,7 +192,9 @@ void UpdatePrintSettingsReplyOnIO( DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -165,7 +178,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -270,6 +276,7 @@ void ScriptedPrintReplyOnIO( +@@ -241,6 +247,7 @@ void ScriptedPrintReplyOnIO( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -173,7 +186,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -279,8 +286,9 @@ void ScriptedPrintReplyOnIO( +@@ -250,8 +257,9 @@ void ScriptedPrintReplyOnIO( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -184,7 +197,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -319,12 +327,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -290,12 +298,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -199,7 +212,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -332,7 +342,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -303,7 +313,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -208,10 +221,10 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 + bool silent, + base::Value settings, + CompletionCallback callback) { - auto weak_this = weak_ptr_factory_.GetWeakPtr(); - DisconnectFromCurrentPrintJob(); - if (!weak_this) -@@ -347,7 +360,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { + // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` + // is still valid after a possible inner message loop runs in + // `DisconnectFromCurrentPrintJob()`. +@@ -326,7 +339,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { // go in `ReleasePrintJob()`. SetPrintingRFH(rfh); @@ -222,7 +235,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); -@@ -491,7 +506,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -470,7 +485,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -232,7 +245,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (!content::RenderProcessHost::FromID(process_id)) { -@@ -499,16 +515,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -478,16 +494,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -256,7 +269,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 } void PrintViewManagerBase::NavigationStopped() { -@@ -622,12 +641,13 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -601,12 +620,13 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -271,7 +284,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame(); auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::GetDefaultPrintSettingsReply, -@@ -645,18 +665,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -624,18 +644,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -293,7 +306,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -666,6 +688,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -645,6 +667,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.SetIntKey(kSettingRasterizePdfDpi, value); } @@ -301,7 +314,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -691,7 +714,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -670,7 +693,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -310,7 +323,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 return; } int process_id = render_process_host->GetID(); -@@ -714,7 +737,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { +@@ -693,7 +716,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { PrintManager::PrintingFailed(cookie); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -318,7 +331,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 #endif ReleasePrinterQuery(); -@@ -729,6 +751,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -708,6 +730,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -330,7 +343,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -739,8 +766,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -718,8 +745,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -341,7 +354,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 } void PrintViewManagerBase::DidStartLoading() { -@@ -808,6 +837,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -779,6 +808,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -353,7 +366,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -869,7 +903,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -840,7 +874,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -365,7 +378,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (!weak_this) return false; -@@ -944,6 +981,13 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -915,6 +952,13 @@ void PrintViewManagerBase::ReleasePrintJob() { content::RenderFrameHost* rfh = printing_rfh_; printing_rfh_ = nullptr; @@ -379,7 +392,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (!print_job_) return; -@@ -989,7 +1033,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -964,7 +1008,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -389,7 +402,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (!cookie) { diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..fb3af5e3f57f868fd00716f76f70aa63c4cb99c9 100644 +index 2661776307f773ac8f2c62529ec86349b045ee8f..4fa8f358ee59baed32ef4fd0684d010256206a54 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -37,6 +37,8 @@ namespace printing { @@ -412,7 +425,7 @@ index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..fb3af5e3f57f868fd00716f76f70aa63 + CompletionCallback callback); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) - // Prints the document in |print_data| with settings specified in + // Prints the document in `print_data` with settings specified in @@ -106,6 +111,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { ScriptedPrintCallback callback) override; void ShowInvalidPrinterSettingsError() override; @@ -421,7 +434,7 @@ index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..fb3af5e3f57f868fd00716f76f70aa63 // Adds and removes observers for `PrintViewManagerBase` events. The order in // which notifications are sent to observers is undefined. Observers must be -@@ -197,7 +203,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -193,7 +199,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Runs `callback` with `params` to reply to ScriptedPrint(). void ScriptedPrintReply(ScriptedPrintCallback callback, int process_id, @@ -431,7 +444,7 @@ index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..fb3af5e3f57f868fd00716f76f70aa63 // Requests the RenderView to render all the missing pages for the print job. // No-op if no print job is pending. Returns true if at least one page has -@@ -252,9 +259,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -248,9 +255,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -470,10 +483,10 @@ index 51ebcb4ae399018d3fd8566656596a7ef1f148af..c0fbff95137e2e5bccb9702a8cc858df // Tells the browser that there are invalid printer settings. ShowInvalidPrinterSettingsError(); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19544cfe12 100644 +index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9c832bf5a 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -39,6 +39,7 @@ +@@ -40,6 +40,7 @@ #include "printing/metafile_skia.h" #include "printing/mojom/print.mojom.h" #include "printing/print_job_constants.h" @@ -481,7 +494,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 #include "printing/units.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" -@@ -1226,7 +1227,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1254,7 +1255,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -491,7 +504,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 if (!weak_this) return; -@@ -1257,7 +1259,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1285,7 +1287,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -500,7 +513,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1272,7 +1274,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1300,7 +1302,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -509,7 +522,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1303,7 +1305,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1331,7 +1333,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -519,7 +532,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1350,6 +1353,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1378,6 +1381,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -528,7 +541,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 print_preview_context_.OnPrintPreview(); if (print_preview_context_.IsForArc()) { -@@ -1886,7 +1891,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1915,7 +1920,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -538,7 +551,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 // Check if |this| is still valid. if (!weak_this) return; -@@ -1901,7 +1907,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1930,7 +1936,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -549,7 +562,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1909,7 +1917,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1938,7 +1946,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -558,7 +571,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1928,8 +1936,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1957,8 +1965,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -575,7 +588,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 // Check if |this| is still valid. if (!self) return; -@@ -2177,36 +2192,51 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2206,36 +2221,51 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -639,7 +652,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2350,7 +2380,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2380,7 +2410,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -648,7 +661,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 *output = std::move(input); std::move(quit_closure).Run(); }, -@@ -2579,18 +2609,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) { +@@ -2625,18 +2655,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, } bool PrintRenderFrameHelper::CheckForCancel() { @@ -669,10 +682,10 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 bool PrintRenderFrameHelper::PreviewPageRendered( diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519076e91b9 100644 +index 2b703118bf94a82262adc293368dcfcdb67807ff..a07f307ff48f3ce5409354a5ba8d54b43325da73 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h -@@ -256,7 +256,7 @@ class PrintRenderFrameHelper +@@ -254,7 +254,7 @@ class PrintRenderFrameHelper mojo::PendingAssociatedReceiver receiver); // printing::mojom::PrintRenderFrame: @@ -681,7 +694,7 @@ index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintForSystemDialog() override; void SetPrintPreviewUI( -@@ -323,7 +323,9 @@ class PrintRenderFrameHelper +@@ -321,7 +321,9 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -692,7 +705,7 @@ index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519 // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -332,12 +334,14 @@ class PrintRenderFrameHelper +@@ -330,12 +332,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. @@ -710,7 +723,7 @@ index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/printing/printing_context.cc b/printing/printing_context.cc -index f8f0f4bdfbb8db883f883f62f9d6e4b987d7b113..c2505f5e0049dc7ee8783056538ca4c2d0968744 100644 +index 3d8281c8af9a4339bdd492c67edafc4ec6efb09d..6f8b9d42e051579cf1d0774afa771a7e45d31ff2 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc @@ -120,7 +120,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() { @@ -722,12 +735,12 @@ index f8f0f4bdfbb8db883f883f62f9d6e4b987d7b113..c2505f5e0049dc7ee8783056538ca4c2 std::unique_ptr settings = PrintSettingsFromJobSettings(job_settings); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 7d937e7e3f19df351d410185fc4dc3b7c8937f2e..e87170e6957733f06bcc296bcca3fc331557ed46 100644 +index 3f36303105b7979a1a771bf26b42596abe5b3cce..52f740bb832db4a8d76431d9bc77cab10bb7e0c7 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h -@@ -175,6 +175,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -170,6 +170,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { - std::unique_ptr TakeAndResetSettings(); + bool PrintingAborted() const { return abort_printing_; } + // Reinitializes the settings for object reuse. + void ResetSettings(); @@ -735,7 +748,7 @@ index 7d937e7e3f19df351d410185fc4dc3b7c8937f2e..e87170e6957733f06bcc296bcca3fc33 int job_id() const { return job_id_; } protected: -@@ -185,9 +188,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -180,9 +183,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { static std::unique_ptr CreateImpl(Delegate* delegate, bool skip_system_calls); diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index f67f292c483f1..58d5bc201d4af 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -1,11 +1,10 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Raymond Zhao Date: Wed, 18 Aug 2021 08:24:10 -0700 -Subject: Convert Electron ProcessSingleton changes to patch +Subject: extend ProcessSingleton -This patch applies Electron ProcessSingleton changes -onto the Chromium files, so that Electron doesn't need to maintain -separate copies of those files. +This patch applies Electron ProcessSingleton changes onto the Chromium +files. This patch adds a few changes to the Chromium code: 1. It adds a parameter `program_name` to the Windows constructor, making @@ -25,7 +24,7 @@ This patch adds a few changes to the Chromium code: before the browser thread is ready. diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h -index fd88cc5122ad5e02a6694b2dec9fd0d16a300cc0..13b325ecad9ba48398173e89680287c63efd4fa6 100644 +index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..8f94cc300b58e8a94b6ca155aa3cf370bcb948d8 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -102,12 +102,19 @@ class ProcessSingleton { @@ -58,7 +57,7 @@ index fd88cc5122ad5e02a6694b2dec9fd0d16a300cc0..13b325ecad9ba48398173e89680287c6 // Sets ourself up as the singleton instance. Returns true on success. If // false is returned, we are not the singleton instance and the caller must @@ -173,6 +182,8 @@ class ProcessSingleton { - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); + std::string program_name_; // Used for mutexName. @@ -74,19 +73,19 @@ index fd88cc5122ad5e02a6694b2dec9fd0d16a300cc0..13b325ecad9ba48398173e89680287c6 + bool listen_on_ready_ = false; #endif - #if defined(OS_MAC) + #if BUILDFLAG(IS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5b87acdf2 100644 +index c9f26ea2d2ea16484d416fdce095ec1b8b885991..47e60bfd8239d4a2e292b835c49132bdbb751555 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -65,6 +65,7 @@ - #include "base/files/file_descriptor_watcher_posix.h" - #include "base/files/file_path.h" - #include "base/files/file_util.h" -+#include "base/ignore_result.h" - #include "base/location.h" - #include "base/logging.h" - #include "base/memory/ref_counted.h" +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + #include + + #include @@ -82,6 +83,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/task/sequenced_task_runner_helpers.h" @@ -95,19 +94,19 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 #include "base/threading/platform_thread.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" -@@ -97,9 +99,11 @@ +@@ -98,9 +100,11 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" +#if 0 - #if defined(OS_LINUX) || defined(OS_CHROMEOS) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #include "chrome/browser/ui/process_singleton_dialog_linux.h" #endif +#endif #if defined(TOOLKIT_VIEWS) && \ - (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -348,6 +352,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +@@ -349,6 +353,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { bool DisplayProfileInUseError(const base::FilePath& lock_path, const std::string& hostname, int pid) { @@ -117,7 +116,7 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 std::u16string error = l10n_util::GetStringFUTF16( IDS_PROFILE_IN_USE_POSIX, base::NumberToString16(pid), base::ASCIIToUTF16(hostname)); -@@ -367,6 +374,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, +@@ -368,6 +375,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, NOTREACHED(); return false; @@ -125,7 +124,7 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 } bool IsChromeProcess(pid_t pid) { -@@ -407,6 +415,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { +@@ -408,6 +416,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { return (cookie == ReadLink(path)); } @@ -147,18 +146,18 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 bool ConnectSocket(ScopedSocket* socket, const base::FilePath& socket_path, const base::FilePath& cookie_path) { -@@ -788,6 +811,10 @@ ProcessSingleton::ProcessSingleton( +@@ -775,6 +798,10 @@ ProcessSingleton::ProcessSingleton( ProcessSingleton::~ProcessSingleton() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // Manually free resources with IO explicitly allowed. + base::ThreadRestrictions::ScopedAllowIO allow_io; + watcher_ = nullptr; -+ ignore_result(socket_dir_.Delete()); ++ std::ignore = socket_dir_.Delete(); } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -956,6 +983,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -947,6 +974,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { base::Seconds(kTimeoutInSeconds)); } @@ -179,7 +178,7 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate( const base::CommandLine& command_line, -@@ -1055,14 +1096,32 @@ bool ProcessSingleton::Create() { +@@ -1046,14 +1087,32 @@ bool ProcessSingleton::Create() { #endif } @@ -217,7 +216,7 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 // Check that the directory was created with the correct permissions. int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && -@@ -1105,10 +1164,13 @@ bool ProcessSingleton::Create() { +@@ -1096,10 +1155,13 @@ bool ProcessSingleton::Create() { if (listen(sock, 5) < 0) NOTREACHED() << "listen failed: " << base::safe_strerror(errno); @@ -236,12 +235,12 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 return true; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f86c2fc0f 100644 +index 8eb7de0cd4007a5fd5431bcc7fb7be4962bd608e..0ea5eb3e3cf055d981ab73486115bac53287f2d7 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -27,7 +27,9 @@ - #include "base/win/windows_version.h" +@@ -28,7 +28,9 @@ #include "base/win/wmi.h" + #include "chrome/browser/process_singleton_internal.h" #include "chrome/browser/shell_integration.h" +#if 0 #include "chrome/browser/ui/simple_message_box.h" @@ -249,11 +248,12 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f #include "chrome/browser/win/chrome_process_finder.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" -@@ -179,10 +181,15 @@ bool ProcessLaunchNotification( +@@ -163,11 +165,16 @@ bool ProcessLaunchNotification( } bool DisplayShouldKillMessageBox() { +#if 0 + TRACE_EVENT0("startup", "ProcessSingleton:DisplayShouldKillMessageBox"); return chrome::ShowQuestionMessageBoxSync( NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), l10n_util::GetStringUTF16(IDS_BROWSER_HUNGBROWSER_MESSAGE)) != @@ -264,8 +264,8 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f + return false; } - void SendRemoteProcessInteractionResultHistogram( -@@ -264,9 +271,13 @@ bool ProcessSingleton::EscapeVirtualization( + // Function was copied from Process::Terminate. +@@ -245,9 +252,13 @@ bool ProcessSingleton::EscapeVirtualization( } ProcessSingleton::ProcessSingleton( @@ -279,7 +279,7 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f is_virtualized_(false), lock_file_(INVALID_HANDLE_VALUE), user_data_dir_(user_data_dir), -@@ -371,11 +382,14 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -361,13 +372,16 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { return PROFILE_IN_USE; } @@ -290,12 +290,14 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f // isn't one, create a message window with its title set to the profile // directory path. bool ProcessSingleton::Create() { + TRACE_EVENT0("startup", "ProcessSingleton::Create"); + - static const wchar_t kMutexName[] = L"Local\\ChromeProcessSingletonStartup!"; + std::wstring mutexName = base::UTF8ToWide("Local\\" + program_name_ + "ProcessSingletonStartup"); remote_window_ = chrome::FindRunningChromeWindow(user_data_dir_); if (!remote_window_ && !EscapeVirtualization(user_data_dir_)) { -@@ -384,7 +398,7 @@ bool ProcessSingleton::Create() { +@@ -376,7 +390,7 @@ bool ProcessSingleton::Create() { // access. As documented, it's clearer to NOT request ownership on creation // since it isn't guaranteed we will get it. It is better to create it // without ownership and explicitly get the ownership afterward. @@ -304,7 +306,7 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f if (!only_me.IsValid()) { DPLOG(FATAL) << "CreateMutex failed"; return false; -@@ -423,6 +437,17 @@ bool ProcessSingleton::Create() { +@@ -415,6 +429,17 @@ bool ProcessSingleton::Create() { window_.CreateNamed(base::BindRepeating(&ProcessLaunchNotification, notification_callback_), user_data_dir_.value()); diff --git a/patches/chromium/proxy_config_monitor.patch b/patches/chromium/proxy_config_monitor.patch index 7e21dff1be572..155415a59b428 100644 --- a/patches/chromium/proxy_config_monitor.patch +++ b/patches/chromium/proxy_config_monitor.patch @@ -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 583ae4a36a5dae700a8e11767839e4d9a5c6e9b4..2510362a4df21fd57c56ec1f336589ccde86694c 100644 +index 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a8bb9daae 100644 --- a/chrome/browser/net/proxy_config_monitor.cc +++ b/chrome/browser/net/proxy_config_monitor.cc @@ -11,7 +11,9 @@ diff --git a/patches/chromium/put_back_deleted_colors_for_autofill.patch b/patches/chromium/put_back_deleted_colors_for_autofill.patch deleted file mode 100644 index 6ce6432d17aba..0000000000000 --- a/patches/chromium/put_back_deleted_colors_for_autofill.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: John Kleinschmidt -Date: Thu, 20 Jun 2019 16:49:25 -0400 -Subject: put_back_deleted_colors_for_autofill.patch - -https://chromium-review.googlesource.com/c/chromium/src/+/1652925 removed colors as they are no longer -needed in chromium but our autofill implementation uses them. This patch can be removed if we refactor -our autofill implementation to work like Chromium's. - -diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc -index a8d95abb69da8d42aed26d3b215cc05d79ba676b..74fc4d9bb7f183765b05e94b7133599ccf714042 100644 ---- a/ui/native_theme/common_theme.cc -+++ b/ui/native_theme/common_theme.cc -@@ -32,6 +32,7 @@ absl::optional GetHighContrastColor( - NativeTheme::ColorScheme color_scheme) { - switch (color_id) { - case NativeTheme::kColorId_MenuSeparatorColor: -+ case NativeTheme::kColorId_UnfocusedBorderColor: - return color_scheme == NativeTheme::ColorScheme::kDark ? SK_ColorWHITE - : SK_ColorBLACK; - case NativeTheme::kColorId_FocusedBorderColor: -@@ -53,6 +54,15 @@ absl::optional GetDarkSchemeColor(NativeTheme::ColorId color_id, - return gfx::kGoogleBlue400; - case NativeTheme::kColorId_MenuSeparatorColor: - return gfx::kGoogleGrey800; -+ -+ // Results Tables -+ case NativeTheme::kColorId_ResultsTableNormalBackground: -+ return SkColorSetRGB(0x28, 0x28, 0x28); -+ case NativeTheme::kColorId_ResultsTableNormalText: -+ return SK_ColorWHITE; -+ case NativeTheme::kColorId_ResultsTableDimmedText: -+ return SkColorSetA(base_theme->GetSystemColor(NativeTheme::kColorId_ResultsTableNormalText), 0x80); -+ - case NativeTheme::kColorId_ProminentButtonColor: - return gfx::kGoogleBlue300; - case NativeTheme::kColorId_WindowBackground: -@@ -67,6 +77,8 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id, - NativeTheme::ColorScheme color_scheme) { - switch (color_id) { - // Border -+ case NativeTheme::kColorId_UnfocusedBorderColor: -+ return gfx::kGoogleGrey300; - case NativeTheme::kColorId_FocusedBorderColor: - return gfx::kGoogleBlue500; - -@@ -136,6 +148,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id, - case NativeTheme::kColorId_WindowBackground: - return SK_ColorWHITE; - -+ // Results Tables -+ case NativeTheme::kColorId_ResultsTableNormalBackground: -+ return SK_ColorWHITE; -+ case NativeTheme::kColorId_ResultsTableHoveredBackground: -+ return SkColorSetA(base_theme->GetSystemColor( -+ NativeTheme::kColorId_ResultsTableNormalText), -+ 0x0D); -+ case NativeTheme::kColorId_ResultsTableNormalText: -+ return SK_ColorBLACK; -+ case NativeTheme::kColorId_ResultsTableDimmedText: -+ return SkColorSetRGB(0x64, 0x64, 0x64); -+ - case NativeTheme::kColorId_NumColors: - // Keeping the kColorId_NumColors case instead of using the default case - // allows ColorId additions to trigger compile error for an incomplete -diff --git a/ui/native_theme/native_theme_color_id.h b/ui/native_theme/native_theme_color_id.h -index a1b39a03776c287bc2b1f9a0a6ce11d0d9efde79..9132ff83b672b51c5f2f7ed95da877be7114c691 100644 ---- a/ui/native_theme/native_theme_color_id.h -+++ b/ui/native_theme/native_theme_color_id.h -@@ -10,6 +10,7 @@ - #define NATIVE_THEME_CROSS_PLATFORM_COLOR_IDS \ - OP(kColorId_DefaultIconColor), \ - OP(kColorId_FocusedBorderColor), \ -+ OP(kColorId_UnfocusedBorderColor), \ - OP(kColorId_FocusedMenuItemBackgroundColor), \ - OP(kColorId_MenuBackgroundColor), \ - OP(kColorId_MenuIconColor), \ -@@ -20,6 +21,11 @@ - OP(kColorId_OverlayScrollbarThumbStroke), \ - OP(kColorId_ProminentButtonColor), \ - OP(kColorId_TextOnProminentButtonColor), \ -+ /* Results Tables, such as the omnibox */ \ -+ OP(kColorId_ResultsTableNormalBackground), \ -+ OP(kColorId_ResultsTableHoveredBackground), \ -+ OP(kColorId_ResultsTableNormalText), \ -+ OP(kColorId_ResultsTableDimmedText), \ - OP(kColorId_ThrobberSpinningColor), \ - OP(kColorId_ThrobberWaitingColor), \ - OP(kColorId_WindowBackground) -diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 99256ffaf918e9d12a7c21b89d66cd41a0d29ac2..07852493fd23b8c1f057dc7ad830b6884db50a88 100644 ---- a/ui/native_theme/native_theme_win.cc -+++ b/ui/native_theme/native_theme_win.cc -@@ -623,10 +623,23 @@ absl::optional NativeThemeWin::GetPlatformHighContrastColor( - case kColorId_ThrobberWaitingColor: - return system_colors_[SystemThemeColor::kGrayText]; - -+ // Results Tables -+ case kColorId_ResultsTableNormalBackground: -+ return system_colors_[SystemThemeColor::kWindow]; -+ case kColorId_ResultsTableHoveredBackground: -+ return color_utils::AlphaBlend(system_colors_[SystemThemeColor::kWindowText], -+ system_colors_[SystemThemeColor::kWindow], 0.25f); -+ case kColorId_ResultsTableNormalText: -+ return system_colors_[SystemThemeColor::kWindowText]; -+ case kColorId_ResultsTableDimmedText: -+ return color_utils::AlphaBlend(system_colors_[SystemThemeColor::kWindowText], -+ system_colors_[SystemThemeColor::kWindow], 0.5f); -+ - case kColorId_MenuBackgroundColor: - return system_colors_[SystemThemeColor::kButtonFace]; - - case kColorId_MenuSeparatorColor: -+ case kColorId_UnfocusedBorderColor: - case kColorId_FocusedBorderColor: - return system_colors_[SystemThemeColor::kButtonText]; - diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index 9555776dafd78..ec5cabb02673a 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -30,10 +30,10 @@ index 059ff2b47e7aa8b9707e71ae9a1793bfdd86d319..529637f8b6af6b8b45f9de61d27b5e9c // 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 b0820c4411952ee0adf3dd4cbc6abb26c0368373..cd2770dee3fac7f6b09c3fafbf87a5537de716fe 100644 +index 59437e69e25fe85cffc9b558dec2284123ac48be..d3af2aed32f6047cbb86bd2b4ce1df9fee80437c 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2075,6 +2075,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -2082,6 +2082,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) view_->UpdateCursor(WebCursor(cursor)); @@ -43,10 +43,10 @@ index b0820c4411952ee0adf3dd4cbc6abb26c0368373..cd2770dee3fac7f6b09c3fafbf87a553 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 131e74e1789632f59086b2bfb390654207f6d18f..3bc6a0207a5273e7a7b64ab59d4e3499482e4bd8 100644 +index c8e49eeaca8b31479aa908be9c349ccd625e9e51..5c63a024827359ccf697d0b7fc8fa2092eb107b7 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4415,6 +4415,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4486,6 +4486,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,10 +59,10 @@ index 131e74e1789632f59086b2bfb390654207f6d18f..3bc6a0207a5273e7a7b64ab59d4e3499 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 1c40c728a99fbcadedab1a8cc67efde90c7b164c..b693a98ef9e4333b0d1825ee156860a5c2dafcf6 100644 +index 85b426a7552cf925157a76fcd1ed7de47cd27a54..7440f2025701ccde0ade36cda22467dd0614109b 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -963,6 +963,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -965,6 +965,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, blink::mojom::FrameVisibility visibility) override; void SendScreenRects() override; TextInputManager* GetTextInputManager() override; @@ -71,7 +71,7 @@ index 1c40c728a99fbcadedab1a8cc67efde90c7b164c..b693a98ef9e4333b0d1825ee156860a5 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 5df646636e3d78f66a2f5a76fb53bf57a7be8535..5e7b3055b34cfa252f6236b84cb183f9d0f6471d 100644 +index b68d706fe204c3e8d65b2bf523950840c0398db2..8852a8da29bc9b7f9b832ad392741751f46e3fd7 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -13,6 +13,7 @@ @@ -82,7 +82,7 @@ index 5df646636e3d78f66a2f5a76fb53bf57a7be8535..5e7b3055b34cfa252f6236b84cb183f9 #include "content/public/browser/allow_service_worker_result.h" #include "content/public/browser/reload_type.h" #include "content/public/browser/render_frame_host.h" -@@ -511,6 +512,9 @@ class CONTENT_EXPORT WebContentsObserver { +@@ -527,6 +528,9 @@ class CONTENT_EXPORT WebContentsObserver { // Invoked when the primary main frame changes size. virtual void PrimaryMainFrameWasResized(bool width_changed) {} diff --git a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch index 3ed2afc5fd742..ddd75f00d4f9a 100644 --- a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch +++ b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch @@ -12,7 +12,7 @@ should be removed as soon as those have been updated. Patching because every instance is a FTBFS that prevents testing any one instance's fix. diff --git a/base/callback_helpers.h b/base/callback_helpers.h -index da876907836f0dbbd02a90ad7e0556304a9532cf..c3401f4cdd276e0f1b094b29753f37b10e72222d 100644 +index 046130ff8cbc4945e94a4ee71ac6320b4f7c5369..c71c3e1720b3f4c7b7362d99957cd2479bf88a37 100644 --- a/base/callback_helpers.h +++ b/base/callback_helpers.h @@ -94,6 +94,22 @@ class OnceCallbackHolder final { diff --git a/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch b/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch index 74f18d7d81dfb..4bcaed9c6c175 100644 --- a/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch +++ b/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch @@ -9,10 +9,10 @@ change to move more of //chrome spellchecker logic into //components so that we can further separate our dependency from //chrome. diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc -index 1d426c35c539064e899b848d0ccc19306f1c4db8..2b7aa1add57dccbcbf8202cead5b7d2d5a174270 100644 +index 9d238b5de516a672d5b99f2f66316a205fc705a7..7c3b6a69acb16186add5d467dbc22360d90d46d4 100644 --- a/chrome/browser/spellchecker/spellcheck_factory.cc +++ b/chrome/browser/spellchecker/spellcheck_factory.cc -@@ -71,7 +71,10 @@ void SpellcheckServiceFactory::RegisterProfilePrefs( +@@ -72,7 +72,10 @@ void SpellcheckServiceFactory::RegisterProfilePrefs( content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse( content::BrowserContext* context) const { diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index bf2178a3183de..24054daa57a97 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch ... something to do with OSR? and maybe 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 0399fd10fffc282a3e2752ddc33d53823dd7b3f4..c04b5e11bc5e0c7746372dadfa49e34232f82507 100644 +index 5fd8cb63f589dd204c2477f2375ec1d3716b55f0..85e52f7a99fe350da05270cf6fde0fe82a1bec40 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -649,6 +649,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -660,6 +660,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 0399fd10fffc282a3e2752ddc33d53823dd7b3f4..c04b5e11bc5e0c7746372dadfa49e342 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 e15b08a576e27687801e4ef547bbd299ae60444e..f35cbc8be8a9496eaafbf693680746fc96a13144 100644 +index abdd3cf7d93ab9a1f80351d38ddcee52664414da..98da92a6d31103dfa0a48e278c3a15ee0533791e 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -26,8 +26,10 @@ diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index bb15a437035e9..9500c595ccfb4 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`. Additionally, disables usage of some private APIs in MAS builds. diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a45cca2132 100644 +index 57b797c2e730a76d4910f8bcd5b35cc515a61012..61575390665f00b96d593a2e1066be3b28d8de6f 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 -@@ -153,6 +153,15 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -154,6 +154,15 @@ void ExtractUnderlines(NSAttributedString* string, } // namespace @@ -29,7 +29,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 // These are not documented, so use only after checking -respondsToSelector:. @interface NSApplication (UndocumentedSpeechMethods) - (void)speakString:(NSString*)string; -@@ -609,6 +618,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { +@@ -610,6 +619,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -39,7 +39,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 return [self acceptsMouseEventsWhenInactive]; } -@@ -685,6 +697,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { +@@ -686,6 +698,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -50,7 +50,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -1005,6 +1021,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -1006,6 +1022,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSKeyDown && !(modifierFlags & NSCommandKeyMask); @@ -61,7 +61,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 // We only handle key down events and just simply forward other events. if (eventType != NSKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1749,9 +1769,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1752,9 +1772,11 @@ - (NSAccessibilityRole)accessibilityRole { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -73,7 +73,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1760,7 +1782,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1763,7 +1785,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 2ba001509c8a3..6ed6e2f5790a2 100644 --- a/patches/chromium/resource_file_conflict.patch +++ b/patches/chromium/resource_file_conflict.patch @@ -52,10 +52,10 @@ Some alternatives to this patch: None of these options seems like a substantial maintainability win over this patch to me (@nornagon). diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 4b2632d89f3f2961975f1437fe9f533a4799894b..33e8d4f5b27532d015d8cd4dbe7d2550916eb436 100644 +index 04546cad2b3e6355d667fe725b85836f128f0df7..7caaf66cad9d5b9f787cea0d49c32c26801571c2 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1543,7 +1543,7 @@ if (is_chrome_branded && !is_android) { +@@ -1591,7 +1591,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 4b2632d89f3f2961975f1437fe9f533a4799894b..33e8d4f5b27532d015d8cd4dbe7d2550 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1571,6 +1571,12 @@ if (!is_android) { +@@ -1619,6 +1619,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_stop_using_nsrunloop_in_renderer_process.patch b/patches/chromium/revert_stop_using_nsrunloop_in_renderer_process.patch deleted file mode 100644 index 5007b7204d4f9..0000000000000 --- a/patches/chromium/revert_stop_using_nsrunloop_in_renderer_process.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Tue, 4 Jan 2022 11:10:27 +0100 -Subject: revert: stop using NSRunLoop in renderer process - -https://chromium-review.googlesource.com/c/chromium/src/+/3344749 - -This can be removed once we update to a DEPS has which -includes 4787f034924d0b05a2e4815a197a8ecf4a9c623c. - -diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc -index 261e6de9ad03cb017fd2c71e30aef14f51312b60..625c984fc5255fe7ab01f5e38767ada73c21ffec 100644 ---- a/content/renderer/renderer_main.cc -+++ b/content/renderer/renderer_main.cc -@@ -91,7 +91,12 @@ void HandleRendererErrorTestParameters(const base::CommandLine& command_line) { - } - - std::unique_ptr CreateMainThreadMessagePump() { --#if defined(OS_FUCHSIA) -+#if defined(OS_MAC) -+ // As long as scrollbars on Mac are painted with Cocoa, the message pump -+ // needs to be backed by a Foundation-level loop to process NSTimers. See -+ // http://crbug.com/306348#c24 for details. -+ return base::MessagePump::Create(base::MessagePumpType::NS_RUNLOOP); -+#elif defined(OS_FUCHSIA) - // Allow FIDL APIs on renderer main thread. - return base::MessagePump::Create(base::MessagePumpType::IO); - #else diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 7523a9870acbc..0a1e41b6d04e2 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -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 e59425121af678283a2866ff954d1ea6b389404a..4b118deb8f6ce2233bb43e00755cbc7465646d29 100644 +index 0b42cba8667225c25df2405d99efe119a26c3585..ee8b42500499dc6a1700bc38e5b75976bb408490 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1303,7 +1303,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1344,7 +1344,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/skip_atk_toolchain_check.patch b/patches/chromium/skip_atk_toolchain_check.patch index 7fd7a7315bad1..51d38cce62e36 100644 --- a/patches/chromium/skip_atk_toolchain_check.patch +++ b/patches/chromium/skip_atk_toolchain_check.patch @@ -21,7 +21,7 @@ See //ui/accessibility/BUILD.gn:297:20: which caused the file to be included. which we don't build diff --git a/build/config/linux/atk/BUILD.gn b/build/config/linux/atk/BUILD.gn -index 92baff2a9b6eea1bcfaa53a9e70b4857b68cea77..8fd6031dda6afa42e9ed0742ccc4e71a93df7583 100644 +index 647bef697ec8f6bf02d60e3984ae3ad01f480552..be79a50aad1213a299c606f2a00f6b5bbf8eab2a 100644 --- a/build/config/linux/atk/BUILD.gn +++ b/build/config/linux/atk/BUILD.gn @@ -11,7 +11,7 @@ import("//build/config/ui.gni") @@ -34,7 +34,7 @@ index 92baff2a9b6eea1bcfaa53a9e70b4857b68cea77..8fd6031dda6afa42e9ed0742ccc4e71a if (use_atk) { assert(use_glib, "use_atk=true requires that use_glib=true") diff --git a/build/config/linux/atspi2/BUILD.gn b/build/config/linux/atspi2/BUILD.gn -index 988a9956813617456ee1945de8e857d43543e411..e6e17e9e8f5ff99404b52c0a42d508f97c61e7fc 100644 +index d103d09a39a519e65daab6db40ef7896de49b0ee..bfdef652886382eb87d5a19d2f9ed90dc91c14d2 100644 --- a/build/config/linux/atspi2/BUILD.gn +++ b/build/config/linux/atspi2/BUILD.gn @@ -6,7 +6,6 @@ import("//build/config/linux/pkg_config.gni") diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 965db355cfc84..dd479d4ad0215 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -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 dde9fb6174be8a0da70cf29d5428ef31035a39f7..e044bc3739ad21c3d9704ddfa56116fae944e57a 100644 +index 602525302cfdd89bf2ddc2924076e7349de7562a..ac9570fa3d9cb3b0026f70465e5b21ac7778c3df 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1835,9 +1835,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1836,9 +1836,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); @@ -39,10 +39,10 @@ index dde9fb6174be8a0da70cf29d5428ef31035a39f7..e044bc3739ad21c3d9704ddfa56116fa std::make_unique(); +#endif #endif - auto snapshot_files = GetV8SnapshotFilesToPreload(*cmd_line); // Spawn the child process asynchronously to avoid blocking the UI thread. + // As long as there's no renderer prefix, we can use the zygote process diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc -index 9c0e928067d86121ee3732440c80e84dcbbe0dd9..b5c84dc74cf71bc226787c9609dd2c99915710fb 100644 +index e8d6ef94664bb37996871c0cc0db7c815783b786..0d56fa0aebee80883019a100900119972bf02edd 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc @@ -25,6 +25,9 @@ namespace content { @@ -66,7 +66,7 @@ index 9c0e928067d86121ee3732440c80e84dcbbe0dd9..b5c84dc74cf71bc226787c9609dd2c99 dynamic_code_can_be_disabled_ = true; return; diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h -index 29d99ad59af67a9ac1206c059c8236da93c582a1..b4d09173d836bc9f666d7e3733e8b515cef8eb87 100644 +index 463df70c55df932427c761a67dbc89d7657f9703..d6d8094e31129eb7ca1f0bf36523d48204281795 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h @@ -18,6 +18,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate @@ -82,7 +82,7 @@ index 29d99ad59af67a9ac1206c059c8236da93c582a1..b4d09173d836bc9f666d7e3733e8b515 #if BUILDFLAG(USE_ZYGOTE_HANDLE) @@ -29,6 +34,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate - #endif // defined(OS_MAC) + #endif // BUILDFLAG(IS_MAC) sandbox::mojom::Sandbox GetSandboxType() override; + @@ -92,4 +92,4 @@ index 29d99ad59af67a9ac1206c059c8236da93c582a1..b4d09173d836bc9f666d7e3733e8b515 +#endif }; - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) diff --git a/patches/chromium/ui_gtk_public_header.patch b/patches/chromium/ui_gtk_public_header.patch index 62922abc391ad..f54224072007c 100644 --- a/patches/chromium/ui_gtk_public_header.patch +++ b/patches/chromium/ui_gtk_public_header.patch @@ -6,10 +6,10 @@ Subject: ui_gtk_public_header.patch Allow electron to depend on //ui/gtk/gtk_util.h diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn -index db29cdca6f02fb8ca9dd0f25e13ed902589adc25..6fa1496b4d529ccf7e4e543579462f990aae5ede 100644 +index 4093df78da0bbb1d8df743942f364cf728ad3414..2f31d99b207ffc3531b5334b5a01239cc1fefb35 100644 --- a/ui/gtk/BUILD.gn +++ b/ui/gtk/BUILD.gn -@@ -39,7 +39,7 @@ generate_stubs("gtk_stubs") { +@@ -69,7 +69,7 @@ generate_stubs("gtk_stubs") { } component("gtk") { @@ -18,9 +18,9 @@ index db29cdca6f02fb8ca9dd0f25e13ed902589adc25..6fa1496b4d529ccf7e4e543579462f99 sources = [ "gtk_color_mixers.cc", -@@ -53,7 +53,6 @@ component("gtk") { - "gtk_ui_factory.cc", - "gtk_ui_platform.h", +@@ -85,7 +85,6 @@ component("gtk") { + "gtk_ui_platform_stub.cc", + "gtk_ui_platform_stub.h", "gtk_util.cc", - "gtk_util.h", "input_method_context_impl_gtk.cc", diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index 99dfa2d8a8c8a..b3d8608dc3a5c 100644 --- a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch +++ b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch @@ -6,18 +6,18 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch Unsandboxed ppapi processes should skip zygote. diff --git a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc -index 833c20796bd9404e4f5d7ca738fce97143d33fac..f4bc4f94e7eb5014f7c2844d6486fbc1bc88892f 100644 +index a0d6f0353bb387e6eca9f2b13ab1d40996234110..8548abdfae14d630794abc1033f9b9eda59f771b 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc -@@ -6,6 +6,7 @@ - +@@ -7,6 +7,7 @@ + #include "build/build_config.h" #include "content/public/common/content_switches.h" #include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) #include "base/win/windows_version.h" -@@ -62,6 +63,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( +@@ -63,6 +64,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( ZygoteHandle PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() { const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); diff --git a/patches/chromium/v8_context_snapshot_generator.patch b/patches/chromium/v8_context_snapshot_generator.patch index e878445e6d584..6e7f5ad9c9de6 100644 --- a/patches/chromium/v8_context_snapshot_generator.patch +++ b/patches/chromium/v8_context_snapshot_generator.patch @@ -7,10 +7,10 @@ v8_context_snapshot_generator is a build time executable. The patch adds the config. diff --git a/tools/v8_context_snapshot/BUILD.gn b/tools/v8_context_snapshot/BUILD.gn -index d868696dbf28bfcb2a1dceda20057c5043819b91..985943ba31b31b3604072493a666979e111a3213 100644 +index a06eae4ab3217210f997126f7dcc318785cdb759..9484ccd615817459f17daf76ff9f82e88cfacbdd 100644 --- a/tools/v8_context_snapshot/BUILD.gn +++ b/tools/v8_context_snapshot/BUILD.gn -@@ -120,6 +120,7 @@ if (use_v8_context_snapshot) { +@@ -114,6 +114,7 @@ if (use_v8_context_snapshot) { configs += [ "//v8:external_startup_data", ":disable_icf", diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 6a8ee000ba377..849e94be20ccd 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -9,12 +9,12 @@ 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 676c77b2ac7be7445d92db3fcfc94b5ec4915696..303a0e00f8c797be63c92c6ae122d3b06d561f34 100644 +index 3da88b5831717c979373c064b4c1520c28d4fd98..cf3ea07bb7d708f9078c46af2c4583215f9cd189 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2971,6 +2971,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { - params.renderer_initiated_creation, - params.main_frame_name, GetOriginalOpener()); +@@ -3040,6 +3040,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, + site_instance.get(), params.renderer_initiated_creation, + params.main_frame_name, GetOriginalOpener(), primary_main_frame_policy); + if (params.view && params.delegate_view) { + view_.reset(params.view); @@ -26,7 +26,7 @@ index 676c77b2ac7be7445d92db3fcfc94b5ec4915696..303a0e00f8c797be63c92c6ae122d3b0 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2981,6 +2988,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -3050,6 +3057,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -35,7 +35,7 @@ index 676c77b2ac7be7445d92db3fcfc94b5ec4915696..303a0e00f8c797be63c92c6ae122d3b0 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index ccbad7b5ea7c26e58d9a8d2208f534ae686364ec..d59f80df234872e0e7a89c9283e820a49c30b0e4 100644 +index ad5c13965f1ccc078de5f25b08d51ed43e37f259..cd1b44d4ff5ce8924749ba9e41b3f599108bb8fd 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -93,10 +93,13 @@ class BrowserContext; diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 770598601bbce..67d32c0a23bbd 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,10 +8,10 @@ This allows dragging and dropping between s. Originally landed in https://github.com/electron/libchromiumcontent/pull/267 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc -index e8a5b04582da86f6ec0004c32f3b622c7599510e..1f9cd4e4c1d7be6d51b490c4b909e86b0bd2c057 100644 +index eff6616ef019ea8b661b878cc5fccd1e4b9217aa..9aff1848395dc41311df575dd7cbf0771271ed03 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -880,10 +880,7 @@ bool WebContentsViewAura::IsValidDragTarget( +@@ -890,10 +890,7 @@ bool WebContentsViewAura::IsValidDragTarget( // TODO(https://crbug.com/1266953): There are some known gaps caused by // comparing `RenderViewHost` IDs, as `RenderViewHost` ID is not really a // strong signal for page identity. diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 0a2b571d8fa2e..af32042b3d84e 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -14,10 +14,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 165d6b8eb5cb0ce949c71c1707687960c49a4ebb..35a40c4b493ec4e57bff4d4701c18e55afc5841c 100644 +index 713e2883139bca4bb56dcc7e3efcf6d6dfc4a02b..be2721cc6dc0582a05c74ac3d50c123666d7d5a3 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6004,6 +6004,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6102,6 +6102,15 @@ void RenderFrameHostImpl::EnterFullscreen( notified_instances.insert(parent_site_instance); } diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 57bafdd8b09ee..099e2f15e3205 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected: https://chromium-review.googlesource.com/c/chromium/src/+/1954347 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 4352aada84d7fe5abbc2f3320a3a643e838774dc..b6d5fe0a21e9343d82323a9f7c06f9b5891316cc 100644 +index 63ead7f8ab838693bade7163ddebd1787cc82344..8512a66eda07202b6c6faea049736fd8f16c93db 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -356,6 +356,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -361,6 +361,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index 4352aada84d7fe5abbc2f3320a3a643e838774dc..b6d5fe0a21e9343d82323a9f7c06f9b5 // 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 df9f357a597c7d5990058e7c3ab26b32cc4e7252..f72f927bfcd9fe42e49682b12b361ae8a877ace8 100644 +index a64d78c9d8112610af6a17c8f8b8b9124b9d40a3..0bd64497495cfd8eee5e7cae3eca69937f2e79e0 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -925,6 +925,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -932,6 +932,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index df9f357a597c7d5990058e7c3ab26b32cc4e7252..f72f927bfcd9fe42e49682b12b361ae8 const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index cba574c571ded199c70374ffe01bad5f88b5902f..7801b60329802c92e6b6103ccc74d6871584c9b2 100644 +index 10c96d3915e64ebebd283c70292b33e22612b8eb..9fa6853a2945e2a34ed319f874f356a4afd72dd3 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -207,6 +207,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -208,6 +208,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -55,10 +55,10 @@ index cba574c571ded199c70374ffe01bad5f88b5902f..7801b60329802c92e6b6103ccc74d687 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 f545c18c2e142a46481b1669bb726b60d9815600..14bd8c3436602689e44e3c718388406a7de6b211 100644 +index d188491afffbd259d4287b0668a9d1cec291934a..2fe5234832f8a3510326171e1ccf5dbfeca49fc9 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -713,6 +713,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -720,6 +720,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index aa34b13457d37..8c14560076af0 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop initialized. diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index b6d5fe0a21e9343d82323a9f7c06f9b5891316cc..f141ba30ac0cfd1c35fb89dc513b92c5f41f6d74 100644 +index 8512a66eda07202b6c6faea049736fd8f16c93db..afe767350c8878da38ab2b566fa89bcb831f8716 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -356,6 +356,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -361,6 +361,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index b6d5fe0a21e9343d82323a9f7c06f9b5891316cc..f141ba30ac0cfd1c35fb89dc513b92c5 // 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 f72f927bfcd9fe42e49682b12b361ae8a877ace8..73e4853cb335722b2aaf7d98a8ed4b2ff4ece0ab 100644 +index 0bd64497495cfd8eee5e7cae3eca69937f2e79e0..9ab68aabff203127dba5a0ccdf16fa62f3ef4c40 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -937,6 +937,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -944,6 +944,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index f72f927bfcd9fe42e49682b12b361ae8a877ace8..73e4853cb335722b2aaf7d98a8ed4b2f 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 7801b60329802c92e6b6103ccc74d6871584c9b2..df5c449ac011104cbce52b737729c4f9af2b2f9e 100644 +index 9fa6853a2945e2a34ed319f874f356a4afd72dd3..87f9190d227e501a648dbbaa350bbb105601fbfb 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -207,6 +207,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -208,6 +208,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -65,10 +65,10 @@ index 7801b60329802c92e6b6103ccc74d6871584c9b2..df5c449ac011104cbce52b737729c4f9 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 14bd8c3436602689e44e3c718388406a7de6b211..46551fcbb671ae7f6f5528afa7ea62bb199a3dbf 100644 +index 2fe5234832f8a3510326171e1ccf5dbfeca49fc9..b36a118861b2efae6ae28ef0e7f14db5d284b929 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -713,6 +713,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -720,6 +720,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -78,13 +78,13 @@ index 14bd8c3436602689e44e3c718388406a7de6b211..46551fcbb671ae7f6f5528afa7ea62bb virtual bool AllowScriptExtensionForServiceWorker( const WebSecurityOrigin& script_origin) { diff --git a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc -index 1efbaf0adb1fd6c0ef332f015d8b09d130e4bd3f..033438ccc8db0ef396922ac23b7f3bd80fcc5cde 100644 +index 03288c7b1897ee2c18b80677ee5837246d36568a..fc10bbf3d92c7f88c734d8ecfb20dbc4b72ae200 100644 --- a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc +++ b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc @@ -257,6 +257,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { V8PerContextData* per_context_data = script_state_->PerContextData(); - ignore_result(per_context_data->ConstructorForType( - global_scope_->GetWrapperTypeInfo())); + std::ignore = + per_context_data->ConstructorForType(global_scope_->GetWrapperTypeInfo()); + Platform::Current()->WorkerScriptReadyForEvaluation(script_state_->GetContext()); // Inform V8 that origin trial information is now connected with the context, // and V8 can extend the context with origin trial features. diff --git a/patches/config.json b/patches/config.json index 1ba34fa0955cd..1f10e013b33b3 100644 --- a/patches/config.json +++ b/patches/config.json @@ -11,6 +11,10 @@ "src/electron/patches/node": "src/third_party/electron_node", + "src/electron/patches/nan": "src/third_party/nan", + + "src/electron/patches/perfetto": "src/third_party/perfetto", + "src/electron/patches/squirrel.mac": "src/third_party/squirrel.mac", "src/electron/patches/Mantle": "src/third_party/squirrel.mac/vendor/Mantle", diff --git a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch index 56bd33b8d6d47..98510d24c4e2c 100644 --- a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch +++ b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch @@ -36,10 +36,10 @@ index 89255a0927a647ca32d1a9508853425a3207b441..f0e1e32f80d79e400ad139818edce60a import '../../ui/legacy/components/source_frame/source_frame-meta.js'; import '../../panels/console_counters/console_counters-meta.js'; diff --git a/front_end/ui/legacy/BUILD.gn b/front_end/ui/legacy/BUILD.gn -index fe7c150cf6ce24b10821fa5a91d55f82cf865222..7177d495ec9e2b31a641c7a531b63584c597cf97 100644 +index 8cefe7e1b0cd298ce52ea06186b43f3412115a4f..c03f52d42aef6e094a922d342276439f8628ff42 100644 --- a/front_end/ui/legacy/BUILD.gn +++ b/front_end/ui/legacy/BUILD.gn -@@ -182,5 +182,6 @@ devtools_entrypoint("legacy") { +@@ -181,5 +181,6 @@ devtools_entrypoint("legacy") { visibility = [ "../..:legacy_entrypoints", "../../legacy_test_runner/*", diff --git a/patches/nan/.patches b/patches/nan/.patches new file mode 100644 index 0000000000000..5a0539df8d7b2 --- /dev/null +++ b/patches/nan/.patches @@ -0,0 +1 @@ +use_new_constructor_for_scriptorigin.patch diff --git a/patches/nan/use_new_constructor_for_scriptorigin.patch b/patches/nan/use_new_constructor_for_scriptorigin.patch new file mode 100644 index 0000000000000..dfa36b750afc2 --- /dev/null +++ b/patches/nan/use_new_constructor_for_scriptorigin.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Fri, 28 Jan 2022 13:46:07 -0800 +Subject: use new constructor for ScriptOrigin + +https://chromium-review.googlesource.com/c/v8/v8/+/3395880 + +diff --git a/test/cpp/nannew.cpp b/test/cpp/nannew.cpp +index 64c857996c4626f3a447bdb796d4d581a37d9299..95a12f9521b8c9bed0e5eed85b6e56917069ea09 100644 +--- a/test/cpp/nannew.cpp ++++ b/test/cpp/nannew.cpp +@@ -248,7 +248,7 @@ NAN_METHOD(testScript) { + + #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 8 || \ + (V8_MAJOR_VERSION == 8 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 9)) +- ScriptOrigin origin(New("foo").ToLocalChecked(), 5); ++ ScriptOrigin origin(v8::Isolate::GetCurrent(), New("foo").ToLocalChecked(), 5); + #else + ScriptOrigin origin(New("foo").ToLocalChecked(), New(5)); + #endif +diff --git a/test/cpp/news.cpp b/test/cpp/news.cpp +index 5b54c0cedaaa824be71b8c6fee948139a34d3310..f0aa65cc80741d57ba6675f7d5d5908b24f601c5 100644 +--- a/test/cpp/news.cpp ++++ b/test/cpp/news.cpp +@@ -114,7 +114,7 @@ NAN_METHOD(NewScript) { + } + + NAN_METHOD(NewScript2) { +- v8::ScriptOrigin origin(New("x").ToLocalChecked()); ++ v8::ScriptOrigin origin(v8::Isolate::GetCurrent(), New("x").ToLocalChecked()); + v8::Local script = + New( + New("2+4").ToLocalChecked() +@@ -131,7 +131,7 @@ NAN_METHOD(CompileScript) { + } + + NAN_METHOD(CompileScript2) { +- v8::ScriptOrigin origin(New("x").ToLocalChecked()); ++ v8::ScriptOrigin origin(v8::Isolate::GetCurrent(), New("x").ToLocalChecked()); + v8::Local script = + CompileScript(New("2+4").ToLocalChecked(), origin).ToLocalChecked(); + info.GetReturnValue().Set( diff --git a/patches/node/.patches b/patches/node/.patches index e58c33a4d4e15..3dd50b85a8588 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -30,3 +30,5 @@ fix_don_t_create_console_window_when_creating_process.patch darwin_remove_eprototype_error_workaround_3405.patch darwin_translate_eprototype_to_econnreset_3413.patch darwin_bump_minimum_supported_version_to_10_15_3406.patch +fix_serdes_test.patch +fix_failing_node_js_test_on_outdated.patch diff --git a/patches/node/fix_failing_node_js_test_on_outdated.patch b/patches/node/fix_failing_node_js_test_on_outdated.patch new file mode 100644 index 0000000000000..d1018e0b112a6 --- /dev/null +++ b/patches/node/fix_failing_node_js_test_on_outdated.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Wed, 16 Feb 2022 13:33:41 +0100 +Subject: fix: failing Node.js test on outdated + CurrentValueSerializerFormatVersion + +Corrects for a test that started failing as of https://chromium-review.googlesource.com/c/v8/v8/+/3417189 +becuase V8 updated the return value of CurrentValueSerializerFormatVersion() +from 14 to 15, and Node.js still expected 14 (0x0e). + +This patch can be removed as soon as Node.js updates to a version of V8 +containing the above CL. + +diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js +index 586698129680cef29595c39e77c7d1c186f3d60a..43a3d9dd5907af6aa11b902b01f6ef7539768fbb 100644 +--- a/test/parallel/test-v8-serdes.js ++++ b/test/parallel/test-v8-serdes.js +@@ -155,7 +155,7 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); + } + + { +- const buf = Buffer.from('ff0e6f2203666f6f5e007b01', 'hex'); ++ const buf = Buffer.from('ff0f6f2203666f6f5e007b01', 'hex'); + + const des = new v8.DefaultDeserializer(buf); + des.readHeader(); +@@ -166,7 +166,7 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); + ser.writeValue(des.readValue()); + + assert.deepStrictEqual(buf, ser.releaseBuffer()); +- assert.strictEqual(des.getWireFormatVersion(), 0x0e); ++ assert.strictEqual(des.getWireFormatVersion(), 0x0f); + } + + { diff --git a/patches/node/fix_serdes_test.patch b/patches/node/fix_serdes_test.patch new file mode 100644 index 0000000000000..ec2452c0ae5ee --- /dev/null +++ b/patches/node/fix_serdes_test.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Fri, 28 Jan 2022 13:50:21 -0800 +Subject: fix serdes test + +The V8 wire format version changed. + +diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js +index 4dffedd3c32b4b1b6eb75e46f8bfb447260046bb..586698129680cef29595c39e77c7d1c186f3d60a 100644 +--- a/test/parallel/test-v8-serdes.js ++++ b/test/parallel/test-v8-serdes.js +@@ -155,7 +155,7 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); + } + + { +- const buf = Buffer.from('ff0d6f2203666f6f5e007b01', 'hex'); ++ const buf = Buffer.from('ff0e6f2203666f6f5e007b01', 'hex'); + + const des = new v8.DefaultDeserializer(buf); + des.readHeader(); +@@ -166,13 +166,13 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); + ser.writeValue(des.readValue()); + + assert.deepStrictEqual(buf, ser.releaseBuffer()); +- assert.strictEqual(des.getWireFormatVersion(), 0x0d); ++ assert.strictEqual(des.getWireFormatVersion(), 0x0e); + } + + { + // Unaligned Uint16Array read, with padding in the underlying array buffer. + let buf = Buffer.alloc(32 + 9); +- buf.write('ff0d5c0404addeefbe', 32, 'hex'); ++ buf.write('ff0e5c0404addeefbe', 32, 'hex'); + buf = buf.slice(32); + + const expectedResult = os.endianness() === 'LE' ? diff --git a/patches/perfetto/.patches b/patches/perfetto/.patches new file mode 100644 index 0000000000000..f96cd9f9d7559 --- /dev/null +++ b/patches/perfetto/.patches @@ -0,0 +1 @@ +define_ssize_t_to_be_intptr_t_to_match_libuv.patch diff --git a/patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch b/patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch new file mode 100644 index 0000000000000..b48b0e2e37343 --- /dev/null +++ b/patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Fri, 28 Jan 2022 15:07:54 -0800 +Subject: define ssize_t to be intptr_t to match libuv + +This definition conflicts with libuv's: https://github.com/libuv/libuv/blob/bb0b4bb783da45ca995d8fb3d5dec0ed84133446/include/uv/win.h#L26-L31 + +Breaks the build on 32-bit windows. + +diff --git a/include/perfetto/ext/base/sys_types.h b/include/perfetto/ext/base/sys_types.h +index 999a1522f4397def080ad0056ff3f626e2f0cdbe..a3e24ae047a2185b66136184e95427e6e849194f 100644 +--- a/include/perfetto/ext/base/sys_types.h ++++ b/include/perfetto/ext/base/sys_types.h +@@ -32,11 +32,7 @@ using uid_t = unsigned int; + using pid_t = int; + #endif // !GCC + +-#if defined(_WIN64) +-using ssize_t = int64_t; +-#else +-using ssize_t = long; +-#endif // _WIN64 ++using ssize_t = intptr_t; + + #endif // OS_WIN + diff --git a/patches/v8/.patches b/patches/v8/.patches index 5d74c796bcf93..1e5615f3ce254 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -6,4 +6,4 @@ workaround_an_undefined_symbol_error.patch do_not_export_private_v8_symbols_on_windows.patch fix_build_deprecated_attirbute_for_older_msvc_versions.patch fix_disable_implies_dcheck_for_node_stream_array_buffers.patch -fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch +revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index b006ad66ddbb8..13649f1c4acc8 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,10 +9,10 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 5fef5805939ced748e03b34c1e365a00d6a5834d..623b4d792c04c5d7978fe7c16c92e21499294a5f 100644 +index fb68d0ec4d121aaac31fd6e4c317a59976ef034c..dbbe9ae10bebdd71f441fda00c7dbfa187603a84 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -575,7 +575,7 @@ config("internal_config") { +@@ -598,7 +598,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index 5fef5805939ced748e03b34c1e365a00d6a5834d..623b4d792c04c5d7978fe7c16c92e214 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5660,7 +5660,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5733,7 +5733,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 5fef5805939ced748e03b34c1e365a00d6a5834d..623b4d792c04c5d7978fe7c16c92e214 deps = [ ":v8_libbase", -@@ -5698,6 +5698,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5771,6 +5771,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index a708140339fbe..b4231609ce27d 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,10 +6,10 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index 880e198be36cdfefb1acc37612c65022551c5d4c..f7e18fabb020827c5c194609db68555c10ac1cc8 100644 +index e6797c92a52ab7805261ace2156a39fe368bd747..1aed7cad8b7dfff9fc7b1f93040c3eda33693af3 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9141,7 +9141,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9097,7 +9097,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index 880e198be36cdfefb1acc37612c65022551c5d4c..f7e18fabb020827c5c194609db68555c isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index cf3f1dce5571353cb90bb5997c489b0f202951f9..f54f60489385a25c5bce4e3d38da19ee9df6ada4 100644 +index 8e4ad43c1957f4ed555327588c41d049824c1dc5..54cf3b263ac5654b370897b951aa0be8f8d566e5 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6132,9 +6132,9 @@ void Heap::TearDown() { +@@ -6235,9 +6235,9 @@ void Heap::TearDown() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); diff --git a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch index 1ef0f366c945e..59cf1289c5fab 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index 46cff2d17ff0e189b84a180805c008818a20fd3a..de269d03d3376f1fe31809d9c2079860724b731a 100644 +index c784f859ba874b9a79be3dd9c69d306b8a590660..93158da71e2e7dd1aecc421664d4d21687cb38a6 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -575,6 +575,10 @@ config("internal_config") { +@@ -598,6 +598,10 @@ config("internal_config") { ":cppgc_header_features", ] diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index c26ad60031d16..4068e9b55533e 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -6,7 +6,7 @@ Subject: Export symbols needed for Windows build These symbols are required to build v8 with BUILD_V8_SHARED on Windows. diff --git a/src/objects/objects.h b/src/objects/objects.h -index 2baa10a2b35cd247cec53ee63feb5280bc05db6f..803789169eb3305b0827b221acfb7f425c120fa8 100644 +index 48f595a24ec7ead3076e1d44afb4f18b7bb810c3..df7cb44387a42fa173ce68ee8464d6abc050986f 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h @@ -886,7 +886,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; @@ -19,7 +19,7 @@ index 2baa10a2b35cd247cec53ee63feb5280bc05db6f..803789169eb3305b0827b221acfb7f42 explicit inline Relocatable(Isolate* isolate); inline virtual ~Relocatable(); diff --git a/src/objects/ordered-hash-table.h b/src/objects/ordered-hash-table.h -index 45682e45e906fe9556bef578d5386cdf4e73d71a..569c632f6933ca7aec3ac239258207dede3e2d5e 100644 +index ec304170542f8a6053c60cbebb22c536cb56ac6c..be8f33d5e8bc2ff388f199dacebd408ccd32dda5 100644 --- a/src/objects/ordered-hash-table.h +++ b/src/objects/ordered-hash-table.h @@ -64,7 +64,7 @@ namespace internal { diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 04d14f07aefcc..ae318986f9b8a 100644 --- a/patches/v8/expose_mksnapshot.patch +++ b/patches/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index 623b4d792c04c5d7978fe7c16c92e21499294a5f..46cff2d17ff0e189b84a180805c008818a20fd3a 100644 +index dbbe9ae10bebdd71f441fda00c7dbfa187603a84..c784f859ba874b9a79be3dd9c69d306b8a590660 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5672,7 +5672,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5745,7 +5745,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch index f33bcb58dccc2..ad3c1b6198b4c 100644 --- a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch @@ -9,7 +9,7 @@ higher versions, but native module compiling with this version will have an issue. diff --git a/include/v8config.h b/include/v8config.h -index 1242d4289ceb937e2679408ca7ee734c0c342bf0..50f59293e3fc617ac7b6f964ae091e92391c8a38 100644 +index b16ab3ff88d1054d12af4de3ad0018c97c0b7fcc..c9963b43c121964c0c37c858adb228cd090d5c2a 100644 --- a/include/v8config.h +++ b/include/v8config.h @@ -452,10 +452,13 @@ path. Add it with -I to the command line diff --git a/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch b/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch index 781e0ed36f7ce..ce960703ace71 100644 --- a/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch +++ b/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch @@ -18,7 +18,7 @@ This patch can be removed when streams support rab/gsab, or when support is synchronized across both v8 and node. diff --git a/src/objects/js-array-buffer.cc b/src/objects/js-array-buffer.cc -index 57d8773b7be9a04ab0b27ddac9aac1da2254c550..cf3c4ee7422728822e62f25d0092f3c0da07914b 100644 +index cd760b9e67820c6ab69164992bccf19411cf1db6..f28258bf1b797c2a2d904e25802a17b14ad0c19a 100644 --- a/src/objects/js-array-buffer.cc +++ b/src/objects/js-array-buffer.cc @@ -72,9 +72,9 @@ void JSArrayBuffer::Attach(std::shared_ptr backing_store) { @@ -32,5 +32,5 @@ index 57d8773b7be9a04ab0b27ddac9aac1da2254c550..cf3c4ee7422728822e62f25d0092f3c0 + // !backing_store->is_wasm_memory() && !backing_store->is_resizable(), + // backing_store->byte_length() == backing_store->max_byte_length()); DCHECK(!was_detached()); - DCHECK(IsValidBackingStorePointer(backing_store->buffer_start())); Isolate* isolate = GetIsolate(); + diff --git a/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch b/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch deleted file mode 100644 index 8f8790ddeec93..0000000000000 --- a/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: VerteDinde -Date: Tue, 4 Jan 2022 14:55:00 -0800 -Subject: fix: use allocationtype kold in v8 scriptormodule legacy lifetime - -Changed in this CL: https://chromium-review.googlesource.com/c/v8/v8/+/3211575 -Upstream proposed fix: https://chromium-review.googlesource.com/c/v8/v8/+/3354087 - -Enabling V8_SCRIPTORMODULE_LEGACY_LIFETIME is necessary to fix ESM in -Node.js, but Blink expects old allocations so we change this in the -interim while Node.js works to remove their usage of WeakRefs to -ScriptOrModule. - -This patch can be removed when the upsteam fix is merged, or -when support is added in Node.js - -diff --git a/src/heap/factory-base.cc b/src/heap/factory-base.cc -index ff1056ee57d1fade0e851c08010a81cde64d48b3..1fbf8ecbec0458106afea1b5ba4273ccfb5d80f4 100644 ---- a/src/heap/factory-base.cc -+++ b/src/heap/factory-base.cc -@@ -250,7 +250,7 @@ Handle + + diff --git a/spec-main/fixtures/crash-cases/fs-promises-renderer-crash/index.js b/spec-main/fixtures/crash-cases/fs-promises-renderer-crash/index.js new file mode 100644 index 0000000000000..4c74ba39f74d6 --- /dev/null +++ b/spec-main/fixtures/crash-cases/fs-promises-renderer-crash/index.js @@ -0,0 +1,28 @@ +const { app, BrowserWindow, ipcMain } = require('electron'); +const path = require('path'); + +app.whenReady().then(() => { + let reloadCount = 0; + const win = new BrowserWindow({ + show: false, + webPreferences: { + nodeIntegration: true, + contextIsolation: false + } + }); + + win.loadFile('index.html'); + + win.webContents.on('render-process-gone', () => { + process.exit(1); + }); + + win.webContents.on('did-finish-load', () => { + if (reloadCount > 2) { + setImmediate(() => app.quit()); + } else { + reloadCount += 1; + win.webContents.send('reload', path.join(__dirname, '..', '..', 'cat.pdf')); + } + }); +}); From 0370583c735ad31314979c9091c1f566100c6ebb Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Sun, 20 Mar 2022 11:12:17 -0700 Subject: [PATCH 236/268] fix: intialize FPS file in network service (#33345) Co-authored-by: Keeley Hammond --- shell/browser/net/system_network_context_manager.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index d1f474d59ead7..de3989ad88678 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -288,6 +288,10 @@ void SystemNetworkContextManager::OnNetworkServiceCreated( base::FeatureList::IsEnabled(features::kAsyncDns), default_secure_dns_mode, doh_config, additional_dns_query_types_enabled); + // Initializes first party sets component + // CL: https://chromium-review.googlesource.com/c/chromium/src/+/3449280 + content::GetNetworkService()->SetFirstPartySets(base::File()); + std::string app_name = electron::Browser::Get()->GetName(); #if BUILDFLAG(IS_MAC) KeychainPassword::GetServiceName() = app_name + " Safe Storage"; From d305082ab787c8d1b32df49ed8adc1143a030f8f Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 10:19:45 +0900 Subject: [PATCH 237/268] build: drop pywin32 usage (#33298) * build: drop pywin32 usage * chore: ignore extra output on AppVeyor Co-authored-by: David Sanders --- build/profile_toolchain.py | 87 ++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 32 deletions(-) diff --git a/build/profile_toolchain.py b/build/profile_toolchain.py index d8874dded572b..4251315e0a16a 100755 --- a/build/profile_toolchain.py +++ b/build/profile_toolchain.py @@ -1,9 +1,12 @@ -from __future__ import with_statement +from __future__ import unicode_literals + import contextlib import sys import os import optparse import json +import re +import subprocess sys.path.append("%s/../../build" % os.path.dirname(os.path.realpath(__file__))) @@ -33,36 +36,56 @@ def calculate_hash(root): return CalculateHash('.', None) def windows_installed_software(): - import win32com.client - strComputer = "." - objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator") - objSWbemServices = objWMIService.ConnectServer(strComputer, "root\cimv2") - colItems = objSWbemServices.ExecQuery("Select * from Win32_Product") - items = [] - - for objItem in colItems: - item = {} - if objItem.Caption: - item['caption'] = objItem.Caption - if objItem.Caption: - item['description'] = objItem.Description - if objItem.InstallDate: - item['install_date'] = objItem.InstallDate - if objItem.InstallDate2: - item['install_date_2'] = objItem.InstallDate2 - if objItem.InstallLocation: - item['install_location'] = objItem.InstallLocation - if objItem.Name: - item['name'] = objItem.Name - if objItem.SKUNumber: - item['sku_number'] = objItem.SKUNumber - if objItem.Vendor: - item['vendor'] = objItem.Vendor - if objItem.Version: - item['version'] = objItem.Version - items.append(item) - - return items + powershell_command = [ + "Get-CimInstance", + "-Namespace", + "root\cimv2", + "-Class", + "Win32_product", + "|", + "Select", + "vendor,", + "description,", + "@{l='install_location';e='InstallLocation'},", + "@{l='install_date';e='InstallDate'},", + "@{l='install_date_2';e='InstallDate2'},", + "caption,", + "version,", + "name,", + "@{l='sku_number';e='SKUNumber'}", + "|", + "ConvertTo-Json", + ] + + proc = subprocess.Popen( + ["powershell.exe", "-Command", "-"], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + ) + + stdout, _ = proc.communicate(" ".join(powershell_command).encode("utf-8")) + + if proc.returncode != 0: + raise RuntimeError("Failed to get list of installed software") + + # On AppVeyor there's other output related to PSReadline, + # so grab only the JSON output and ignore everything else + json_match = re.match( + r".*(\[.*{.*}.*\]).*", stdout.decode("utf-8"), re.DOTALL + ) + + if not json_match: + raise RuntimeError( + "Couldn't find JSON output for list of installed software" + ) + + # Filter out missing keys + return list( + map( + lambda info: {k: info[k] for k in info if info[k]}, + json.loads(json_match.group(1)), + ) + ) def windows_profile(): @@ -89,7 +112,7 @@ def windows_profile(): def main(options): if sys.platform == 'win32': - with open(options.output_json, 'wb') as f: + with open(options.output_json, 'w') as f: json.dump(windows_profile(), f) else: raise OSError("Unsupported OS") From 46d74390fc3811eca4fa6d0fe3c433e39be23bec Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 10:22:33 +0900 Subject: [PATCH 238/268] feat: allow setting code cache directory (#33286) * feat: allow setting code cache directory * chore: address review feedback * chore: update docs Co-authored-by: Charles Kerr * chore: rewrite with base::Contains Co-authored-by: Charles Kerr Co-authored-by: Milan Burda Co-authored-by: deepak1556 Co-authored-by: Charles Kerr --- docs/api/session.md | 14 ++++++++ shell/browser/api/electron_api_session.cc | 42 +++++++++++++++++++++++ shell/browser/api/electron_api_session.h | 2 ++ spec-main/api-session-spec.ts | 14 ++++++++ 4 files changed, 72 insertions(+) diff --git a/docs/api/session.md b/docs/api/session.md index 2517fd178d2e0..8bb1ad5ab3c5c 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -868,6 +868,20 @@ this session just before normal `preload` scripts run. Returns `string[]` an array of paths to preload scripts that have been registered. +#### `ses.setCodeCachePath(path)` + +* `path` String - Absolute path to store the v8 generated JS code cache from the renderer. + +Sets the directory to store the generated JS [code cache](https://v8.dev/blog/code-caching-for-devs) for this session. The directory is not required to be created by the user before this call, the runtime will create if it does not exist otherwise will use the existing directory. If directory cannot be created, then code cache will not be used and all operations related to code cache will fail silently inside the runtime. By default, the directory will be `Code Cache` under the +respective user data folder. + +#### `ses.clearCodeCaches(options)` + +* `options` Object + * `urls` String[] (optional) - An array of url corresponding to the resource whose generated code cache needs to be removed. If the list is empty then all entries in the cache directory will be removed. + +Returns `Promise` - resolves when the code cache clear operation is complete. + #### `ses.setSpellCheckerEnabled(enable)` * `enable` boolean diff --git a/shell/browser/api/electron_api_session.cc b/shell/browser/api/electron_api_session.cc index d0a0d4c408e92..ac6b38cdb58f4 100644 --- a/shell/browser/api/electron_api_session.cc +++ b/shell/browser/api/electron_api_session.cc @@ -28,6 +28,7 @@ #include "components/proxy_config/proxy_config_dictionary.h" #include "components/proxy_config/proxy_config_pref_names.h" #include "components/proxy_config/proxy_prefs.h" +#include "content/browser/code_cache/generated_code_cache_context.h" // nogncheck #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/download_item_utils.h" @@ -976,6 +977,45 @@ v8::Local Session::GetPath(v8::Isolate* isolate) { return gin::ConvertToV8(isolate, browser_context_->GetPath()); } +void Session::SetCodeCachePath(gin::Arguments* args) { + base::FilePath code_cache_path; + auto* storage_partition = browser_context_->GetDefaultStoragePartition(); + auto* code_cache_context = storage_partition->GetGeneratedCodeCacheContext(); + if (code_cache_context) { + if (!args->GetNext(&code_cache_path) || !code_cache_path.IsAbsolute()) { + args->ThrowTypeError( + "Absolute path must be provided to store code cache."); + return; + } + code_cache_context->Initialize( + code_cache_path, 0 /* allows disk_cache to choose the size */); + } +} + +v8::Local Session::ClearCodeCaches( + const gin_helper::Dictionary& options) { + auto* isolate = JavascriptEnvironment::GetIsolate(); + gin_helper::Promise promise(isolate); + v8::Local handle = promise.GetHandle(); + + std::set url_list; + base::RepeatingCallback url_matcher = base::NullCallback(); + if (options.Get("urls", &url_list) && !url_list.empty()) { + url_matcher = base::BindRepeating( + [](const std::set& url_list, const GURL& url) { + return base::Contains(url_list, url); + }, + url_list); + } + + browser_context_->GetDefaultStoragePartition()->ClearCodeCaches( + base::Time(), base::Time::Max(), url_matcher, + base::BindOnce(gin_helper::Promise::ResolvePromise, + std::move(promise))); + + return handle; +} + #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) base::Value Session::GetSpellCheckerLanguages() { return browser_context_->prefs() @@ -1203,6 +1243,8 @@ gin::ObjectTemplateBuilder Session::GetObjectTemplateBuilder( .SetMethod("preconnect", &Session::Preconnect) .SetMethod("closeAllConnections", &Session::CloseAllConnections) .SetMethod("getStoragePath", &Session::GetPath) + .SetMethod("setCodeCachePath", &Session::SetCodeCachePath) + .SetMethod("clearCodeCaches", &Session::ClearCodeCaches) .SetProperty("cookies", &Session::Cookies) .SetProperty("netLog", &Session::NetLog) .SetProperty("protocol", &Session::Protocol) diff --git a/shell/browser/api/electron_api_session.h b/shell/browser/api/electron_api_session.h index aedf234d38a58..e9b69380dfaf9 100644 --- a/shell/browser/api/electron_api_session.h +++ b/shell/browser/api/electron_api_session.h @@ -127,6 +127,8 @@ class Session : public gin::Wrappable, void Preconnect(const gin_helper::Dictionary& options, gin::Arguments* args); v8::Local CloseAllConnections(); v8::Local GetPath(v8::Isolate* isolate); + void SetCodeCachePath(gin::Arguments* args); + v8::Local ClearCodeCaches(const gin_helper::Dictionary& options); #if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER) base::Value GetSpellCheckerLanguages(); void SetSpellCheckerLanguages(gin_helper::ErrorThrower thrower, diff --git a/spec-main/api-session-spec.ts b/spec-main/api-session-spec.ts index 223d826d7eb84..f504d0db6d464 100644 --- a/spec-main/api-session-spec.ts +++ b/spec-main/api-session-spec.ts @@ -1121,6 +1121,20 @@ describe('session module', () => { }); }); + describe('session.setCodeCachePath()', () => { + it('throws when relative or empty path is provided', () => { + expect(() => { + session.defaultSession.setCodeCachePath('../fixtures'); + }).to.throw('Absolute path must be provided to store code cache.'); + expect(() => { + session.defaultSession.setCodeCachePath(''); + }).to.throw('Absolute path must be provided to store code cache.'); + expect(() => { + session.defaultSession.setCodeCachePath(path.join(app.getPath('userData'), 'test-code-cache')); + }).to.not.throw(); + }); + }); + describe('ses.setSSLConfig()', () => { it('can disable cipher suites', async () => { const ses = session.fromPartition('' + Math.random()); From 388acd7e2a9de0852a5c7d0d131eaeb8ed81ddd7 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 10:26:49 +0900 Subject: [PATCH 239/268] fix: race condition where webContents can be nullptr during re-focus and a multi-window close sequence (#33284) * fix: race condition where webContents can be nullptr during re-focus and a multi-window close sequence * chore: update electron_inspectable_web_contents_view.mm Co-authored-by: Samuel Attard --- .../browser/ui/cocoa/electron_inspectable_web_contents_view.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm b/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm index e4b797a001a1e..3f86dca5158e5 100644 --- a/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm +++ b/shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm @@ -266,6 +266,8 @@ - (void)viewDidBecomeFirstResponder:(NSNotification*)notification { inspectableWebContentsView_->inspectable_web_contents(); DCHECK(inspectable_web_contents); auto* webContents = inspectable_web_contents->GetWebContents(); + if (!webContents) + return; auto* webContentsView = webContents->GetNativeView().GetNativeNSView(); NSView* view = [notification object]; From ef5424cee0a4d33b18206b6d444fcd817bbacafb Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 06:30:49 -0700 Subject: [PATCH 240/268] Bump v18.0.0-beta.5 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 0942899e9de3f..7bb8e587ea71c 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-beta.4 \ No newline at end of file +18.0.0-beta.5 \ No newline at end of file diff --git a/package.json b/package.json index bcb072b4b6bd8..e88e38bd1994d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-beta.4", + "version": "18.0.0-beta.5", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 51cc02fa79fd3..1d21adb7ed532 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,4 - PRODUCTVERSION 18,0,0,4 + FILEVERSION 18,0,0,5 + PRODUCTVERSION 18,0,0,5 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a327684118c0bf5bafbb4058126abe4d69c77aa0 Mon Sep 17 00:00:00 2001 From: Robo Date: Tue, 22 Mar 2022 01:21:59 +0900 Subject: [PATCH 241/268] fix: iocp integration when process is reused (#33207) (#33361) --- shell/common/node_bindings.cc | 14 ++----------- shell/common/node_bindings.h | 10 +++++----- shell/common/node_bindings_linux.cc | 18 +++++++++++++++++ shell/common/node_bindings_linux.h | 4 ++++ shell/common/node_bindings_mac.cc | 18 +++++++++++++++++ shell/common/node_bindings_mac.h | 4 ++++ shell/common/node_bindings_win.cc | 23 ++++++++++++++++++++++ shell/common/node_bindings_win.h | 6 ++++++ shell/renderer/electron_renderer_client.cc | 4 +++- 9 files changed, 83 insertions(+), 18 deletions(-) diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index b29e4bcccd19f..b0e628093d48b 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -462,8 +462,8 @@ node::Environment* NodeBindings::CreateEnvironment( args.insert(args.begin() + 1, init_script); - isolate_data_ = - node::CreateIsolateData(context->GetIsolate(), uv_loop_, platform); + if (!isolate_data_) + isolate_data_ = node::CreateIsolateData(isolate, uv_loop_, platform); node::Environment* env; uint64_t flags = node::EnvironmentFlags::kDefaultFlags | @@ -574,16 +574,6 @@ void NodeBindings::LoadEnvironment(node::Environment* env) { } void NodeBindings::PrepareMessageLoop() { -#if !BUILDFLAG(IS_WIN) - int handle = uv_backend_fd(uv_loop_); - - // If the backend fd hasn't changed, don't proceed. - if (handle == handle_) - return; - - handle_ = handle; -#endif - // Add dummy handle for libuv, otherwise libuv would quit when there is // nothing to do. uv_async_init(uv_loop_, dummy_uv_handle_.get(), nullptr); diff --git a/shell/common/node_bindings.h b/shell/common/node_bindings.h index 64519d340b5a1..204cf12d5cc6c 100644 --- a/shell/common/node_bindings.h +++ b/shell/common/node_bindings.h @@ -93,11 +93,15 @@ class NodeBindings { void LoadEnvironment(node::Environment* env); // Prepare for message loop integration. - void PrepareMessageLoop(); + virtual void PrepareMessageLoop(); // Do message loop integration. virtual void RunMessageLoop(); + // Gets/sets the per isolate data. + void set_isolate_data(node::IsolateData* isolate_data) { + isolate_data_ = isolate_data; + } node::IsolateData* isolate_data() const { return isolate_data_; } // Gets/sets the environment to wrap uv loop. @@ -161,10 +165,6 @@ class NodeBindings { // Isolate data used in creating the environment node::IsolateData* isolate_data_ = nullptr; -#if !BUILDFLAG(IS_WIN) - int handle_ = -1; -#endif - base::WeakPtrFactory weak_factory_{this}; }; diff --git a/shell/common/node_bindings_linux.cc b/shell/common/node_bindings_linux.cc index 3a69fea9aafc1..d361daec953e0 100644 --- a/shell/common/node_bindings_linux.cc +++ b/shell/common/node_bindings_linux.cc @@ -19,7 +19,25 @@ NodeBindingsLinux::NodeBindingsLinux(BrowserEnvironment browser_env) NodeBindingsLinux::~NodeBindingsLinux() = default; +void NodeBindingsLinux::PrepareMessageLoop() { + int handle = uv_backend_fd(uv_loop_); + + // If the backend fd hasn't changed, don't proceed. + if (handle == handle_) + return; + + NodeBindings::PrepareMessageLoop(); +} + void NodeBindingsLinux::RunMessageLoop() { + int handle = uv_backend_fd(uv_loop_); + + // If the backend fd hasn't changed, don't proceed. + if (handle == handle_) + return; + + handle_ = handle; + // Get notified when libuv's watcher queue changes. uv_loop_->data = this; uv_loop_->on_watcher_queue_updated = OnWatcherQueueChanged; diff --git a/shell/common/node_bindings_linux.h b/shell/common/node_bindings_linux.h index aca06dd0f5952..934ed68c597b8 100644 --- a/shell/common/node_bindings_linux.h +++ b/shell/common/node_bindings_linux.h @@ -15,6 +15,7 @@ class NodeBindingsLinux : public NodeBindings { explicit NodeBindingsLinux(BrowserEnvironment browser_env); ~NodeBindingsLinux() override; + void PrepareMessageLoop() override; void RunMessageLoop() override; private: @@ -25,6 +26,9 @@ class NodeBindingsLinux : public NodeBindings { // Epoll to poll for uv's backend fd. int epoll_; + + // uv's backend fd. + int handle_ = -1; }; } // namespace electron diff --git a/shell/common/node_bindings_mac.cc b/shell/common/node_bindings_mac.cc index e5163f700615b..7107d20c11b93 100644 --- a/shell/common/node_bindings_mac.cc +++ b/shell/common/node_bindings_mac.cc @@ -19,7 +19,25 @@ NodeBindingsMac::NodeBindingsMac(BrowserEnvironment browser_env) NodeBindingsMac::~NodeBindingsMac() = default; +void NodeBindingsMac::PrepareMessageLoop() { + int handle = uv_backend_fd(uv_loop_); + + // If the backend fd hasn't changed, don't proceed. + if (handle == handle_) + return; + + NodeBindings::PrepareMessageLoop(); +} + void NodeBindingsMac::RunMessageLoop() { + int handle = uv_backend_fd(uv_loop_); + + // If the backend fd hasn't changed, don't proceed. + if (handle == handle_) + return; + + handle_ = handle; + // Get notified when libuv's watcher queue changes. uv_loop_->data = this; uv_loop_->on_watcher_queue_updated = OnWatcherQueueChanged; diff --git a/shell/common/node_bindings_mac.h b/shell/common/node_bindings_mac.h index 2e54f2fc9a214..7687f85a7b8d3 100644 --- a/shell/common/node_bindings_mac.h +++ b/shell/common/node_bindings_mac.h @@ -15,6 +15,7 @@ class NodeBindingsMac : public NodeBindings { explicit NodeBindingsMac(BrowserEnvironment browser_env); ~NodeBindingsMac() override; + void PrepareMessageLoop() override; void RunMessageLoop() override; private: @@ -22,6 +23,9 @@ class NodeBindingsMac : public NodeBindings { static void OnWatcherQueueChanged(uv_loop_t* loop); void PollEvents() override; + + // uv's backend fd. + int handle_ = -1; }; } // namespace electron diff --git a/shell/common/node_bindings_win.cc b/shell/common/node_bindings_win.cc index 2356c523e3612..1410925f195c5 100644 --- a/shell/common/node_bindings_win.cc +++ b/shell/common/node_bindings_win.cc @@ -29,6 +29,29 @@ NodeBindingsWin::NodeBindingsWin(BrowserEnvironment browser_env) NodeBindingsWin::~NodeBindingsWin() = default; +void NodeBindingsWin::PrepareMessageLoop() { + // IOCP does not change for the process until the loop is recreated, + // we ensure that there is only a single polling thread satisfying + // the concurrency limit set from CreateIoCompletionPort call by + // uv_loop_init for the lifetime of this process. + if (initialized_) + return; + + NodeBindings::PrepareMessageLoop(); +} + +void NodeBindingsWin::RunMessageLoop() { + // Avoid calling UvRunOnce if the loop is already active, + // otherwise it can lead to situations were the number of active + // threads processing on IOCP is greater than the concurrency limit. + if (initialized_) + return; + + initialized_ = true; + + NodeBindings::RunMessageLoop(); +} + void NodeBindingsWin::PollEvents() { // If there are other kinds of events pending, uv_backend_timeout will // instruct us not to wait. diff --git a/shell/common/node_bindings_win.h b/shell/common/node_bindings_win.h index 0a5eed2237ed2..59d7469b0ff75 100644 --- a/shell/common/node_bindings_win.h +++ b/shell/common/node_bindings_win.h @@ -15,8 +15,14 @@ class NodeBindingsWin : public NodeBindings { explicit NodeBindingsWin(BrowserEnvironment browser_env); ~NodeBindingsWin() override; + void PrepareMessageLoop() override; + void RunMessageLoop() override; + private: void PollEvents() override; + + // Indicates whether polling thread has been created. + bool initialized_ = false; }; } // namespace electron diff --git a/shell/renderer/electron_renderer_client.cc b/shell/renderer/electron_renderer_client.cc index c0e928b837239..263cd39410083 100644 --- a/shell/renderer/electron_renderer_client.cc +++ b/shell/renderer/electron_renderer_client.cc @@ -162,8 +162,10 @@ void ElectronRendererClient::WillReleaseScriptContext( isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kExplicit); node::FreeEnvironment(env); - if (env == node_bindings_->uv_env()) + if (node_bindings_->uv_env() == nullptr) { node::FreeIsolateData(node_bindings_->isolate_data()); + node_bindings_->set_isolate_data(nullptr); + } isolate->SetMicrotasksPolicy(old_policy); From e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 13:41:15 -0700 Subject: [PATCH 242/268] fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame Co-authored-by: Samuel Attard Co-authored-by: Samuel Attard --- filenames.gni | 6 +- .../browser/api/electron_api_web_contents.cc | 13 +- shell/browser/api/electron_api_web_contents.h | 16 +- shell/browser/api/event.h | 2 +- .../browser/electron_api_ipc_handler_impl.cc | 108 ++++++++++++++ ...impl.h => electron_api_ipc_handler_impl.h} | 37 ++--- shell/browser/electron_browser_client.cc | 30 +++- .../browser/electron_browser_handler_impl.cc | 141 ------------------ ...ctron_web_contents_utility_handler_impl.cc | 83 +++++++++++ ...ectron_web_contents_utility_handler_impl.h | 71 +++++++++ shell/browser/web_contents_preferences.h | 3 + shell/common/api/api.mojom | 28 ++-- shell/common/gin_helper/event_emitter.cc | 2 +- shell/common/gin_helper/event_emitter.h | 2 +- .../renderer/api/electron_api_ipc_renderer.cc | 39 +++-- shell/renderer/api/electron_api_web_frame.cc | 14 +- .../electron_render_frame_observer.cc | 15 +- 17 files changed, 381 insertions(+), 229 deletions(-) create mode 100644 shell/browser/electron_api_ipc_handler_impl.cc rename shell/browser/{electron_browser_handler_impl.h => electron_api_ipc_handler_impl.h} (58%) delete mode 100644 shell/browser/electron_browser_handler_impl.cc create mode 100644 shell/browser/electron_web_contents_utility_handler_impl.cc create mode 100644 shell/browser/electron_web_contents_utility_handler_impl.h diff --git a/filenames.gni b/filenames.gni index 8e6da3eb657f4..eae36f790483d 100644 --- a/filenames.gni +++ b/filenames.gni @@ -350,6 +350,8 @@ filenames = { "shell/browser/child_web_contents_tracker.h", "shell/browser/cookie_change_notifier.cc", "shell/browser/cookie_change_notifier.h", + "shell/browser/electron_api_ipc_handler_impl.cc", + "shell/browser/electron_api_ipc_handler_impl.h", "shell/browser/electron_autofill_driver.cc", "shell/browser/electron_autofill_driver.h", "shell/browser/electron_autofill_driver_factory.cc", @@ -358,8 +360,6 @@ filenames = { "shell/browser/electron_browser_client.h", "shell/browser/electron_browser_context.cc", "shell/browser/electron_browser_context.h", - "shell/browser/electron_browser_handler_impl.cc", - "shell/browser/electron_browser_handler_impl.h", "shell/browser/electron_browser_main_parts.cc", "shell/browser/electron_browser_main_parts.h", "shell/browser/electron_download_manager_delegate.cc", @@ -376,6 +376,8 @@ filenames = { "shell/browser/electron_quota_permission_context.h", "shell/browser/electron_speech_recognition_manager_delegate.cc", "shell/browser/electron_speech_recognition_manager_delegate.h", + "shell/browser/electron_web_contents_utility_handler_impl.cc", + "shell/browser/electron_web_contents_utility_handler_impl.h", "shell/browser/electron_web_ui_controller_factory.cc", "shell/browser/electron_web_ui_controller_factory.h", "shell/browser/event_emitter_mixin.cc", diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 8cf745e18e027..5c7fd4d7cdd18 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -1727,7 +1727,7 @@ void WebContents::Message(bool internal, // webContents.emit('-ipc-message', new Event(), internal, channel, // arguments); EmitWithSender("-ipc-message", render_frame_host, - electron::mojom::ElectronBrowser::InvokeCallback(), internal, + electron::mojom::ElectronApiIPC::InvokeCallback(), internal, channel, std::move(arguments)); } @@ -1735,7 +1735,7 @@ void WebContents::Invoke( bool internal, const std::string& channel, blink::CloneableMessage arguments, - electron::mojom::ElectronBrowser::InvokeCallback callback, + electron::mojom::ElectronApiIPC::InvokeCallback callback, content::RenderFrameHost* render_frame_host) { TRACE_EVENT1("electron", "WebContents::Invoke", "channel", channel); // webContents.emit('-ipc-invoke', new Event(), internal, channel, arguments); @@ -1761,7 +1761,7 @@ void WebContents::ReceivePostMessage( v8::Local message_value = electron::DeserializeV8Value(isolate, message); EmitWithSender("-ipc-ports", render_frame_host, - electron::mojom::ElectronBrowser::InvokeCallback(), false, + electron::mojom::ElectronApiIPC::InvokeCallback(), false, channel, message_value, std::move(wrapped_ports)); } @@ -1769,7 +1769,7 @@ void WebContents::MessageSync( bool internal, const std::string& channel, blink::CloneableMessage arguments, - electron::mojom::ElectronBrowser::MessageSyncCallback callback, + electron::mojom::ElectronApiIPC::MessageSyncCallback callback, content::RenderFrameHost* render_frame_host) { TRACE_EVENT1("electron", "WebContents::MessageSync", "channel", channel); // webContents.emit('-ipc-message-sync', new Event(sender, message), internal, @@ -1807,7 +1807,7 @@ void WebContents::MessageHost(const std::string& channel, TRACE_EVENT1("electron", "WebContents::MessageHost", "channel", channel); // webContents.emit('ipc-message-host', new Event(), channel, args); EmitWithSender("ipc-message-host", render_frame_host, - electron::mojom::ElectronBrowser::InvokeCallback(), channel, + electron::mojom::ElectronApiIPC::InvokeCallback(), channel, std::move(arguments)); } @@ -3246,7 +3246,8 @@ void WebContents::SetTemporaryZoomLevel(double level) { } void WebContents::DoGetZoomLevel( - electron::mojom::ElectronBrowser::DoGetZoomLevelCallback callback) { + electron::mojom::ElectronWebContentsUtility::DoGetZoomLevelCallback + callback) { std::move(callback).Run(GetZoomLevel()); } diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 49bd3d213e77b..5bd418b79401c 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -355,7 +355,7 @@ class WebContents : public ExclusiveAccessContext, template bool EmitWithSender(base::StringPiece name, content::RenderFrameHost* sender, - electron::mojom::ElectronBrowser::InvokeCallback callback, + electron::mojom::ElectronApiIPC::InvokeCallback callback, Args&&... args) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); @@ -399,7 +399,7 @@ class WebContents : public ExclusiveAccessContext, fullscreen_frame_ = rfh; } - // mojom::ElectronBrowser + // mojom::ElectronApiIPC void Message(bool internal, const std::string& channel, blink::CloneableMessage arguments, @@ -407,9 +407,8 @@ class WebContents : public ExclusiveAccessContext, void Invoke(bool internal, const std::string& channel, blink::CloneableMessage arguments, - electron::mojom::ElectronBrowser::InvokeCallback callback, + electron::mojom::ElectronApiIPC::InvokeCallback callback, content::RenderFrameHost* render_frame_host); - void OnFirstNonEmptyLayout(content::RenderFrameHost* render_frame_host); void ReceivePostMessage(const std::string& channel, blink::TransferableMessage message, content::RenderFrameHost* render_frame_host); @@ -417,7 +416,7 @@ class WebContents : public ExclusiveAccessContext, bool internal, const std::string& channel, blink::CloneableMessage arguments, - electron::mojom::ElectronBrowser::MessageSyncCallback callback, + electron::mojom::ElectronApiIPC::MessageSyncCallback callback, content::RenderFrameHost* render_frame_host); void MessageTo(int32_t web_contents_id, const std::string& channel, @@ -425,10 +424,15 @@ class WebContents : public ExclusiveAccessContext, void MessageHost(const std::string& channel, blink::CloneableMessage arguments, content::RenderFrameHost* render_frame_host); + + // mojom::ElectronWebContentsUtility + void OnFirstNonEmptyLayout(content::RenderFrameHost* render_frame_host); void UpdateDraggableRegions(std::vector regions); void SetTemporaryZoomLevel(double level); void DoGetZoomLevel( - electron::mojom::ElectronBrowser::DoGetZoomLevelCallback callback); + electron::mojom::ElectronWebContentsUtility::DoGetZoomLevelCallback + callback); + void SetImageAnimationPolicy(const std::string& new_policy); // Grants |origin| access to |device|. diff --git a/shell/browser/api/event.h b/shell/browser/api/event.h index 4a09575896e11..a9e4dec39e9d8 100644 --- a/shell/browser/api/event.h +++ b/shell/browser/api/event.h @@ -13,7 +13,7 @@ namespace gin_helper { class Event : public gin::Wrappable { public: - using InvokeCallback = electron::mojom::ElectronBrowser::InvokeCallback; + using InvokeCallback = electron::mojom::ElectronApiIPC::InvokeCallback; static gin::WrapperInfo kWrapperInfo; diff --git a/shell/browser/electron_api_ipc_handler_impl.cc b/shell/browser/electron_api_ipc_handler_impl.cc new file mode 100644 index 0000000000000..5a13fda3629e9 --- /dev/null +++ b/shell/browser/electron_api_ipc_handler_impl.cc @@ -0,0 +1,108 @@ +// Copyright (c) 2022 Slack Technologies, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "shell/browser/electron_api_ipc_handler_impl.h" + +#include + +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/render_process_host.h" +#include "mojo/public/cpp/bindings/self_owned_receiver.h" + +namespace electron { +ElectronApiIPCHandlerImpl::ElectronApiIPCHandlerImpl( + content::RenderFrameHost* frame_host, + mojo::PendingAssociatedReceiver receiver) + : render_process_id_(frame_host->GetProcess()->GetID()), + render_frame_id_(frame_host->GetRoutingID()) { + content::WebContents* web_contents = + content::WebContents::FromRenderFrameHost(frame_host); + DCHECK(web_contents); + content::WebContentsObserver::Observe(web_contents); + + receiver_.Bind(std::move(receiver)); + receiver_.set_disconnect_handler(base::BindOnce( + &ElectronApiIPCHandlerImpl::OnConnectionError, GetWeakPtr())); +} + +ElectronApiIPCHandlerImpl::~ElectronApiIPCHandlerImpl() = default; + +void ElectronApiIPCHandlerImpl::WebContentsDestroyed() { + delete this; +} + +void ElectronApiIPCHandlerImpl::OnConnectionError() { + delete this; +} + +void ElectronApiIPCHandlerImpl::Message(bool internal, + const std::string& channel, + blink::CloneableMessage arguments) { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->Message(internal, channel, std::move(arguments), + GetRenderFrameHost()); + } +} +void ElectronApiIPCHandlerImpl::Invoke(bool internal, + const std::string& channel, + blink::CloneableMessage arguments, + InvokeCallback callback) { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->Invoke(internal, channel, std::move(arguments), + std::move(callback), GetRenderFrameHost()); + } +} + +void ElectronApiIPCHandlerImpl::ReceivePostMessage( + const std::string& channel, + blink::TransferableMessage message) { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->ReceivePostMessage(channel, std::move(message), + GetRenderFrameHost()); + } +} + +void ElectronApiIPCHandlerImpl::MessageSync(bool internal, + const std::string& channel, + blink::CloneableMessage arguments, + MessageSyncCallback callback) { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->MessageSync(internal, channel, std::move(arguments), + std::move(callback), GetRenderFrameHost()); + } +} + +void ElectronApiIPCHandlerImpl::MessageTo(int32_t web_contents_id, + const std::string& channel, + blink::CloneableMessage arguments) { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->MessageTo(web_contents_id, channel, std::move(arguments)); + } +} + +void ElectronApiIPCHandlerImpl::MessageHost(const std::string& channel, + blink::CloneableMessage arguments) { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->MessageHost(channel, std::move(arguments), + GetRenderFrameHost()); + } +} + +content::RenderFrameHost* ElectronApiIPCHandlerImpl::GetRenderFrameHost() { + return content::RenderFrameHost::FromID(render_process_id_, render_frame_id_); +} + +// static +void ElectronApiIPCHandlerImpl::Create( + content::RenderFrameHost* frame_host, + mojo::PendingAssociatedReceiver receiver) { + new ElectronApiIPCHandlerImpl(frame_host, std::move(receiver)); +} +} // namespace electron diff --git a/shell/browser/electron_browser_handler_impl.h b/shell/browser/electron_api_ipc_handler_impl.h similarity index 58% rename from shell/browser/electron_browser_handler_impl.h rename to shell/browser/electron_api_ipc_handler_impl.h index fea3f11907d1d..7cddf88bedc4a 100644 --- a/shell/browser/electron_browser_handler_impl.h +++ b/shell/browser/electron_api_ipc_handler_impl.h @@ -1,9 +1,9 @@ -// Copyright (c) 2019 Slack Technologies, Inc. +// Copyright (c) 2022 Slack Technologies, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_ -#define ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_ +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_API_IPC_HANDLER_IMPL_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_API_IPC_HANDLER_IMPL_H_ #include #include @@ -18,23 +18,23 @@ class RenderFrameHost; } namespace electron { -class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser, - public content::WebContentsObserver { +class ElectronApiIPCHandlerImpl : public mojom::ElectronApiIPC, + public content::WebContentsObserver { public: - explicit ElectronBrowserHandlerImpl( + explicit ElectronApiIPCHandlerImpl( content::RenderFrameHost* render_frame_host, - mojo::PendingAssociatedReceiver receiver); + mojo::PendingAssociatedReceiver receiver); static void Create( content::RenderFrameHost* frame_host, - mojo::PendingAssociatedReceiver receiver); + mojo::PendingAssociatedReceiver receiver); // disable copy - ElectronBrowserHandlerImpl(const ElectronBrowserHandlerImpl&) = delete; - ElectronBrowserHandlerImpl& operator=(const ElectronBrowserHandlerImpl&) = + ElectronApiIPCHandlerImpl(const ElectronApiIPCHandlerImpl&) = delete; + ElectronApiIPCHandlerImpl& operator=(const ElectronApiIPCHandlerImpl&) = delete; - // mojom::ElectronBrowser: + // mojom::ElectronApiIPC: void Message(bool internal, const std::string& channel, blink::CloneableMessage arguments) override; @@ -42,7 +42,6 @@ class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser, const std::string& channel, blink::CloneableMessage arguments, InvokeCallback callback) override; - void OnFirstNonEmptyLayout() override; void ReceivePostMessage(const std::string& channel, blink::TransferableMessage message) override; void MessageSync(bool internal, @@ -54,17 +53,13 @@ class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser, blink::CloneableMessage arguments) override; void MessageHost(const std::string& channel, blink::CloneableMessage arguments) override; - void UpdateDraggableRegions( - std::vector regions) override; - void SetTemporaryZoomLevel(double level) override; - void DoGetZoomLevel(DoGetZoomLevelCallback callback) override; - base::WeakPtr GetWeakPtr() { + base::WeakPtr GetWeakPtr() { return weak_factory_.GetWeakPtr(); } private: - ~ElectronBrowserHandlerImpl() override; + ~ElectronApiIPCHandlerImpl() override; // content::WebContentsObserver: void WebContentsDestroyed() override; @@ -76,9 +71,9 @@ class ElectronBrowserHandlerImpl : public mojom::ElectronBrowser, const int render_process_id_; const int render_frame_id_; - mojo::AssociatedReceiver receiver_{this}; + mojo::AssociatedReceiver receiver_{this}; - base::WeakPtrFactory weak_factory_{this}; + base::WeakPtrFactory weak_factory_{this}; }; } // namespace electron -#endif // ELECTRON_SHELL_BROWSER_ELECTRON_BROWSER_HANDLER_IMPL_H_ +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_API_IPC_HANDLER_IMPL_H_ diff --git a/shell/browser/electron_browser_client.cc b/shell/browser/electron_browser_client.cc index 096dcabb56c4f..5c051c5ded390 100644 --- a/shell/browser/electron_browser_client.cc +++ b/shell/browser/electron_browser_client.cc @@ -74,13 +74,14 @@ #include "shell/browser/api/electron_api_web_request.h" #include "shell/browser/badging/badge_manager.h" #include "shell/browser/child_web_contents_tracker.h" +#include "shell/browser/electron_api_ipc_handler_impl.h" #include "shell/browser/electron_autofill_driver_factory.h" #include "shell/browser/electron_browser_context.h" -#include "shell/browser/electron_browser_handler_impl.h" #include "shell/browser/electron_browser_main_parts.h" #include "shell/browser/electron_navigation_throttle.h" #include "shell/browser/electron_quota_permission_context.h" #include "shell/browser/electron_speech_recognition_manager_delegate.h" +#include "shell/browser/electron_web_contents_utility_handler_impl.h" #include "shell/browser/font_defaults.h" #include "shell/browser/javascript_environment.h" #include "shell/browser/media/media_capture_devices_dispatcher.h" @@ -1493,14 +1494,33 @@ void ElectronBrowserClient:: render_frame_host, // NOLINT(runtime/references) blink::AssociatedInterfaceRegistry& associated_registry) { // NOLINT(runtime/references) + auto* contents = + content::WebContents::FromRenderFrameHost(&render_frame_host); + if (contents) { + auto* prefs = WebContentsPreferences::From(contents); + if (render_frame_host.GetFrameTreeNodeId() == + contents->GetMainFrame()->GetFrameTreeNodeId() || + (prefs && prefs->AllowsNodeIntegrationInSubFrames())) { + associated_registry.AddInterface(base::BindRepeating( + [](content::RenderFrameHost* render_frame_host, + mojo::PendingAssociatedReceiver + receiver) { + ElectronApiIPCHandlerImpl::Create(render_frame_host, + std::move(receiver)); + }, + &render_frame_host)); + } + } + associated_registry.AddInterface(base::BindRepeating( [](content::RenderFrameHost* render_frame_host, - mojo::PendingAssociatedReceiver - receiver) { - ElectronBrowserHandlerImpl::Create(render_frame_host, - std::move(receiver)); + mojo::PendingAssociatedReceiver< + electron::mojom::ElectronWebContentsUtility> receiver) { + ElectronWebContentsUtilityHandlerImpl::Create(render_frame_host, + std::move(receiver)); }, &render_frame_host)); + associated_registry.AddInterface(base::BindRepeating( [](content::RenderFrameHost* render_frame_host, mojo::PendingAssociatedReceiver diff --git a/shell/browser/electron_browser_handler_impl.cc b/shell/browser/electron_browser_handler_impl.cc deleted file mode 100644 index e66968b0cb132..0000000000000 --- a/shell/browser/electron_browser_handler_impl.cc +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) 2019 Slack Technologies, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#include "shell/browser/electron_browser_handler_impl.h" - -#include - -#include "content/public/browser/browser_context.h" -#include "content/public/browser/browser_thread.h" -#include "content/public/browser/render_frame_host.h" -#include "content/public/browser/render_process_host.h" -#include "mojo/public/cpp/bindings/self_owned_receiver.h" - -namespace electron { -ElectronBrowserHandlerImpl::ElectronBrowserHandlerImpl( - content::RenderFrameHost* frame_host, - mojo::PendingAssociatedReceiver receiver) - : render_process_id_(frame_host->GetProcess()->GetID()), - render_frame_id_(frame_host->GetRoutingID()) { - content::WebContents* web_contents = - content::WebContents::FromRenderFrameHost(frame_host); - DCHECK(web_contents); - content::WebContentsObserver::Observe(web_contents); - - receiver_.Bind(std::move(receiver)); - receiver_.set_disconnect_handler(base::BindOnce( - &ElectronBrowserHandlerImpl::OnConnectionError, GetWeakPtr())); -} - -ElectronBrowserHandlerImpl::~ElectronBrowserHandlerImpl() = default; - -void ElectronBrowserHandlerImpl::WebContentsDestroyed() { - delete this; -} - -void ElectronBrowserHandlerImpl::OnConnectionError() { - delete this; -} - -void ElectronBrowserHandlerImpl::Message(bool internal, - const std::string& channel, - blink::CloneableMessage arguments) { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->Message(internal, channel, std::move(arguments), - GetRenderFrameHost()); - } -} -void ElectronBrowserHandlerImpl::Invoke(bool internal, - const std::string& channel, - blink::CloneableMessage arguments, - InvokeCallback callback) { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->Invoke(internal, channel, std::move(arguments), - std::move(callback), GetRenderFrameHost()); - } -} - -void ElectronBrowserHandlerImpl::OnFirstNonEmptyLayout() { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->OnFirstNonEmptyLayout(GetRenderFrameHost()); - } -} - -void ElectronBrowserHandlerImpl::ReceivePostMessage( - const std::string& channel, - blink::TransferableMessage message) { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->ReceivePostMessage(channel, std::move(message), - GetRenderFrameHost()); - } -} - -void ElectronBrowserHandlerImpl::MessageSync(bool internal, - const std::string& channel, - blink::CloneableMessage arguments, - MessageSyncCallback callback) { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->MessageSync(internal, channel, std::move(arguments), - std::move(callback), GetRenderFrameHost()); - } -} - -void ElectronBrowserHandlerImpl::MessageTo(int32_t web_contents_id, - const std::string& channel, - blink::CloneableMessage arguments) { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->MessageTo(web_contents_id, channel, std::move(arguments)); - } -} - -void ElectronBrowserHandlerImpl::MessageHost( - const std::string& channel, - blink::CloneableMessage arguments) { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->MessageHost(channel, std::move(arguments), - GetRenderFrameHost()); - } -} - -void ElectronBrowserHandlerImpl::UpdateDraggableRegions( - std::vector regions) { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->UpdateDraggableRegions(std::move(regions)); - } -} - -void ElectronBrowserHandlerImpl::SetTemporaryZoomLevel(double level) { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->SetTemporaryZoomLevel(level); - } -} - -void ElectronBrowserHandlerImpl::DoGetZoomLevel( - DoGetZoomLevelCallback callback) { - api::WebContents* api_web_contents = api::WebContents::From(web_contents()); - if (api_web_contents) { - api_web_contents->DoGetZoomLevel(std::move(callback)); - } -} - -content::RenderFrameHost* ElectronBrowserHandlerImpl::GetRenderFrameHost() { - return content::RenderFrameHost::FromID(render_process_id_, render_frame_id_); -} - -// static -void ElectronBrowserHandlerImpl::Create( - content::RenderFrameHost* frame_host, - mojo::PendingAssociatedReceiver receiver) { - new ElectronBrowserHandlerImpl(frame_host, std::move(receiver)); -} -} // namespace electron diff --git a/shell/browser/electron_web_contents_utility_handler_impl.cc b/shell/browser/electron_web_contents_utility_handler_impl.cc new file mode 100644 index 0000000000000..807dcdbdf9cc1 --- /dev/null +++ b/shell/browser/electron_web_contents_utility_handler_impl.cc @@ -0,0 +1,83 @@ +// Copyright (c) 2022 Slack Technologies, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "shell/browser/electron_web_contents_utility_handler_impl.h" + +#include + +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/render_process_host.h" +#include "mojo/public/cpp/bindings/self_owned_receiver.h" + +namespace electron { +ElectronWebContentsUtilityHandlerImpl::ElectronWebContentsUtilityHandlerImpl( + content::RenderFrameHost* frame_host, + mojo::PendingAssociatedReceiver receiver) + : render_process_id_(frame_host->GetProcess()->GetID()), + render_frame_id_(frame_host->GetRoutingID()) { + content::WebContents* web_contents = + content::WebContents::FromRenderFrameHost(frame_host); + DCHECK(web_contents); + content::WebContentsObserver::Observe(web_contents); + + receiver_.Bind(std::move(receiver)); + receiver_.set_disconnect_handler(base::BindOnce( + &ElectronWebContentsUtilityHandlerImpl::OnConnectionError, GetWeakPtr())); +} + +ElectronWebContentsUtilityHandlerImpl:: + ~ElectronWebContentsUtilityHandlerImpl() = default; + +void ElectronWebContentsUtilityHandlerImpl::WebContentsDestroyed() { + delete this; +} + +void ElectronWebContentsUtilityHandlerImpl::OnConnectionError() { + delete this; +} + +void ElectronWebContentsUtilityHandlerImpl::OnFirstNonEmptyLayout() { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->OnFirstNonEmptyLayout(GetRenderFrameHost()); + } +} + +void ElectronWebContentsUtilityHandlerImpl::UpdateDraggableRegions( + std::vector regions) { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->UpdateDraggableRegions(std::move(regions)); + } +} + +void ElectronWebContentsUtilityHandlerImpl::SetTemporaryZoomLevel( + double level) { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->SetTemporaryZoomLevel(level); + } +} + +void ElectronWebContentsUtilityHandlerImpl::DoGetZoomLevel( + DoGetZoomLevelCallback callback) { + api::WebContents* api_web_contents = api::WebContents::From(web_contents()); + if (api_web_contents) { + api_web_contents->DoGetZoomLevel(std::move(callback)); + } +} + +content::RenderFrameHost* +ElectronWebContentsUtilityHandlerImpl::GetRenderFrameHost() { + return content::RenderFrameHost::FromID(render_process_id_, render_frame_id_); +} + +// static +void ElectronWebContentsUtilityHandlerImpl::Create( + content::RenderFrameHost* frame_host, + mojo::PendingAssociatedReceiver + receiver) { + new ElectronWebContentsUtilityHandlerImpl(frame_host, std::move(receiver)); +} +} // namespace electron diff --git a/shell/browser/electron_web_contents_utility_handler_impl.h b/shell/browser/electron_web_contents_utility_handler_impl.h new file mode 100644 index 0000000000000..30a9baa40f835 --- /dev/null +++ b/shell/browser/electron_web_contents_utility_handler_impl.h @@ -0,0 +1,71 @@ +// Copyright (c) 2022 Slack Technologies, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_WEB_CONTENTS_UTILITY_HANDLER_IMPL_H_ +#define ELECTRON_SHELL_BROWSER_ELECTRON_WEB_CONTENTS_UTILITY_HANDLER_IMPL_H_ + +#include +#include + +#include "base/memory/weak_ptr.h" +#include "content/public/browser/web_contents_observer.h" +#include "electron/shell/common/api/api.mojom.h" +#include "shell/browser/api/electron_api_web_contents.h" + +namespace content { +class RenderFrameHost; +} + +namespace electron { +class ElectronWebContentsUtilityHandlerImpl + : public mojom::ElectronWebContentsUtility, + public content::WebContentsObserver { + public: + explicit ElectronWebContentsUtilityHandlerImpl( + content::RenderFrameHost* render_frame_host, + mojo::PendingAssociatedReceiver + receiver); + + static void Create( + content::RenderFrameHost* frame_host, + mojo::PendingAssociatedReceiver + receiver); + + // disable copy + ElectronWebContentsUtilityHandlerImpl( + const ElectronWebContentsUtilityHandlerImpl&) = delete; + ElectronWebContentsUtilityHandlerImpl& operator=( + const ElectronWebContentsUtilityHandlerImpl&) = delete; + + // mojom::ElectronWebContentsUtility: + void OnFirstNonEmptyLayout() override; + void UpdateDraggableRegions( + std::vector regions) override; + void SetTemporaryZoomLevel(double level) override; + void DoGetZoomLevel(DoGetZoomLevelCallback callback) override; + + base::WeakPtr GetWeakPtr() { + return weak_factory_.GetWeakPtr(); + } + + private: + ~ElectronWebContentsUtilityHandlerImpl() override; + + // content::WebContentsObserver: + void WebContentsDestroyed() override; + + void OnConnectionError(); + + content::RenderFrameHost* GetRenderFrameHost(); + + const int render_process_id_; + const int render_frame_id_; + + mojo::AssociatedReceiver receiver_{this}; + + base::WeakPtrFactory weak_factory_{ + this}; +}; +} // namespace electron +#endif // ELECTRON_SHELL_BROWSER_ELECTRON_WEB_CONTENTS_UTILITY_HANDLER_IMPL_H_ diff --git a/shell/browser/web_contents_preferences.h b/shell/browser/web_contents_preferences.h index 912540ac0aad0..544bc54a80e46 100644 --- a/shell/browser/web_contents_preferences.h +++ b/shell/browser/web_contents_preferences.h @@ -71,6 +71,9 @@ class WebContentsPreferences bool ShouldDisableHtmlFullscreenWindowResize() const { return disable_html_fullscreen_window_resize_; } + bool AllowsNodeIntegrationInSubFrames() const { + return node_integration_in_sub_frames_; + } bool ShouldDisableDialogs() const { return disable_dialogs_; } bool ShouldUseSafeDialogs() const { return safe_dialogs_; } bool GetSafeDialogsMessage(std::string* message) const; diff --git a/shell/common/api/api.mojom b/shell/common/api/api.mojom index 1206b5858a183..4515b82ac48d0 100644 --- a/shell/common/api/api.mojom +++ b/shell/common/api/api.mojom @@ -31,7 +31,21 @@ struct DraggableRegion { gfx.mojom.Rect bounds; }; -interface ElectronBrowser { +interface ElectronWebContentsUtility { + // Informs underlying WebContents that first non-empty layout was performed + // by compositor. + OnFirstNonEmptyLayout(); + + UpdateDraggableRegions( + array regions); + + SetTemporaryZoomLevel(double zoom_level); + + [Sync] + DoGetZoomLevel() => (double result); +}; + +interface ElectronApiIPC { // Emits an event on |channel| from the ipcMain JavaScript object in the main // process. Message( @@ -46,10 +60,6 @@ interface ElectronBrowser { string channel, blink.mojom.CloneableMessage arguments) => (blink.mojom.CloneableMessage result); - // Informs underlying WebContents that first non-empty layout was performed - // by compositor. - OnFirstNonEmptyLayout(); - ReceivePostMessage(string channel, blink.mojom.TransferableMessage message); // Emits an event on |channel| from the ipcMain JavaScript object in the main @@ -70,12 +80,4 @@ interface ElectronBrowser { MessageHost( string channel, blink.mojom.CloneableMessage arguments); - - UpdateDraggableRegions( - array regions); - - SetTemporaryZoomLevel(double zoom_level); - - [Sync] - DoGetZoomLevel() => (double result); }; diff --git a/shell/common/gin_helper/event_emitter.cc b/shell/common/gin_helper/event_emitter.cc index 8779c05507ba1..32a3e4b1b8183 100644 --- a/shell/common/gin_helper/event_emitter.cc +++ b/shell/common/gin_helper/event_emitter.cc @@ -54,7 +54,7 @@ v8::Local CreateNativeEvent( v8::Isolate* isolate, v8::Local sender, content::RenderFrameHost* frame, - electron::mojom::ElectronBrowser::MessageSyncCallback callback) { + electron::mojom::ElectronApiIPC::MessageSyncCallback callback) { v8::Local event; if (frame && callback) { gin::Handle native_event = Event::Create(isolate); diff --git a/shell/common/gin_helper/event_emitter.h b/shell/common/gin_helper/event_emitter.h index a69b595551ffb..90af3f7478df4 100644 --- a/shell/common/gin_helper/event_emitter.h +++ b/shell/common/gin_helper/event_emitter.h @@ -29,7 +29,7 @@ v8::Local CreateNativeEvent( v8::Isolate* isolate, v8::Local sender, content::RenderFrameHost* frame, - electron::mojom::ElectronBrowser::MessageSyncCallback callback); + electron::mojom::ElectronApiIPC::MessageSyncCallback callback); } // namespace internal diff --git a/shell/renderer/api/electron_api_ipc_renderer.cc b/shell/renderer/api/electron_api_ipc_renderer.cc index 6b4f2698a968a..6f24ed17c4a3d 100644 --- a/shell/renderer/api/electron_api_ipc_renderer.cc +++ b/shell/renderer/api/electron_api_ipc_renderer.cc @@ -60,16 +60,16 @@ class IPCRenderer : public gin::Wrappable, weak_context_.SetWeak(); render_frame->GetRemoteAssociatedInterfaces()->GetInterface( - &electron_browser_remote_); + &electron_ipc_remote_); } - void OnDestruct() override { electron_browser_remote_.reset(); } + void OnDestruct() override { electron_ipc_remote_.reset(); } void WillReleaseScriptContext(v8::Local context, int32_t world_id) override { if (weak_context_.IsEmpty() || weak_context_.Get(context->GetIsolate()) == context) - electron_browser_remote_.reset(); + electron_ipc_remote_.reset(); } // gin::Wrappable: @@ -92,7 +92,7 @@ class IPCRenderer : public gin::Wrappable, bool internal, const std::string& channel, v8::Local arguments) { - if (!electron_browser_remote_) { + if (!electron_ipc_remote_) { thrower.ThrowError(kIPCMethodCalledAfterContextReleasedError); return; } @@ -100,7 +100,7 @@ class IPCRenderer : public gin::Wrappable, if (!electron::SerializeV8Value(isolate, arguments, &message)) { return; } - electron_browser_remote_->Message(internal, channel, std::move(message)); + electron_ipc_remote_->Message(internal, channel, std::move(message)); } v8::Local Invoke(v8::Isolate* isolate, @@ -108,7 +108,7 @@ class IPCRenderer : public gin::Wrappable, bool internal, const std::string& channel, v8::Local arguments) { - if (!electron_browser_remote_) { + if (!electron_ipc_remote_) { thrower.ThrowError(kIPCMethodCalledAfterContextReleasedError); return v8::Local(); } @@ -119,7 +119,7 @@ class IPCRenderer : public gin::Wrappable, gin_helper::Promise p(isolate); auto handle = p.GetHandle(); - electron_browser_remote_->Invoke( + electron_ipc_remote_->Invoke( internal, channel, std::move(message), base::BindOnce( [](gin_helper::Promise p, @@ -134,7 +134,7 @@ class IPCRenderer : public gin::Wrappable, const std::string& channel, v8::Local message_value, absl::optional> transfer) { - if (!electron_browser_remote_) { + if (!electron_ipc_remote_) { thrower.ThrowError(kIPCMethodCalledAfterContextReleasedError); return; } @@ -166,8 +166,8 @@ class IPCRenderer : public gin::Wrappable, } transferable_message.ports = std::move(ports); - electron_browser_remote_->ReceivePostMessage( - channel, std::move(transferable_message)); + electron_ipc_remote_->ReceivePostMessage(channel, + std::move(transferable_message)); } void SendTo(v8::Isolate* isolate, @@ -175,7 +175,7 @@ class IPCRenderer : public gin::Wrappable, int32_t web_contents_id, const std::string& channel, v8::Local arguments) { - if (!electron_browser_remote_) { + if (!electron_ipc_remote_) { thrower.ThrowError(kIPCMethodCalledAfterContextReleasedError); return; } @@ -183,15 +183,15 @@ class IPCRenderer : public gin::Wrappable, if (!electron::SerializeV8Value(isolate, arguments, &message)) { return; } - electron_browser_remote_->MessageTo(web_contents_id, channel, - std::move(message)); + electron_ipc_remote_->MessageTo(web_contents_id, channel, + std::move(message)); } void SendToHost(v8::Isolate* isolate, gin_helper::ErrorThrower thrower, const std::string& channel, v8::Local arguments) { - if (!electron_browser_remote_) { + if (!electron_ipc_remote_) { thrower.ThrowError(kIPCMethodCalledAfterContextReleasedError); return; } @@ -199,7 +199,7 @@ class IPCRenderer : public gin::Wrappable, if (!electron::SerializeV8Value(isolate, arguments, &message)) { return; } - electron_browser_remote_->MessageHost(channel, std::move(message)); + electron_ipc_remote_->MessageHost(channel, std::move(message)); } v8::Local SendSync(v8::Isolate* isolate, @@ -207,7 +207,7 @@ class IPCRenderer : public gin::Wrappable, bool internal, const std::string& channel, v8::Local arguments) { - if (!electron_browser_remote_) { + if (!electron_ipc_remote_) { thrower.ThrowError(kIPCMethodCalledAfterContextReleasedError); return v8::Local(); } @@ -217,14 +217,13 @@ class IPCRenderer : public gin::Wrappable, } blink::CloneableMessage result; - electron_browser_remote_->MessageSync(internal, channel, std::move(message), - &result); + electron_ipc_remote_->MessageSync(internal, channel, std::move(message), + &result); return electron::DeserializeV8Value(isolate, result); } v8::Global weak_context_; - mojo::AssociatedRemote - electron_browser_remote_; + mojo::AssociatedRemote electron_ipc_remote_; }; gin::WrapperInfo IPCRenderer::kWrapperInfo = {gin::kEmbedderNativeGin}; diff --git a/shell/renderer/api/electron_api_web_frame.cc b/shell/renderer/api/electron_api_web_frame.cc index 25d2b5433b680..6ec08e583da96 100644 --- a/shell/renderer/api/electron_api_web_frame.cc +++ b/shell/renderer/api/electron_api_web_frame.cc @@ -453,10 +453,11 @@ class WebFrameRenderer : public gin::Wrappable, if (!MaybeGetRenderFrame(isolate, "setZoomLevel", &render_frame)) return; - mojo::AssociatedRemote browser_remote; + mojo::AssociatedRemote + web_contents_utility_remote; render_frame->GetRemoteAssociatedInterfaces()->GetInterface( - &browser_remote); - browser_remote->SetTemporaryZoomLevel(level); + &web_contents_utility_remote); + web_contents_utility_remote->SetTemporaryZoomLevel(level); } double GetZoomLevel(v8::Isolate* isolate) { @@ -465,10 +466,11 @@ class WebFrameRenderer : public gin::Wrappable, if (!MaybeGetRenderFrame(isolate, "getZoomLevel", &render_frame)) return result; - mojo::AssociatedRemote browser_remote; + mojo::AssociatedRemote + web_contents_utility_remote; render_frame->GetRemoteAssociatedInterfaces()->GetInterface( - &browser_remote); - browser_remote->DoGetZoomLevel(&result); + &web_contents_utility_remote); + web_contents_utility_remote->DoGetZoomLevel(&result); return result; } diff --git a/shell/renderer/electron_render_frame_observer.cc b/shell/renderer/electron_render_frame_observer.cc index ba1a122868c64..cb27b1f5eb65f 100644 --- a/shell/renderer/electron_render_frame_observer.cc +++ b/shell/renderer/electron_render_frame_observer.cc @@ -149,9 +149,11 @@ void ElectronRenderFrameObserver::DraggableRegionsChanged() { regions.push_back(std::move(region)); } - mojo::AssociatedRemote browser_remote; - render_frame_->GetRemoteAssociatedInterfaces()->GetInterface(&browser_remote); - browser_remote->UpdateDraggableRegions(std::move(regions)); + mojo::AssociatedRemote + web_contents_utility_remote; + render_frame_->GetRemoteAssociatedInterfaces()->GetInterface( + &web_contents_utility_remote); + web_contents_utility_remote->UpdateDraggableRegions(std::move(regions)); } void ElectronRenderFrameObserver::WillReleaseScriptContext( @@ -168,10 +170,11 @@ void ElectronRenderFrameObserver::OnDestruct() { void ElectronRenderFrameObserver::DidMeaningfulLayout( blink::WebMeaningfulLayout layout_type) { if (layout_type == blink::WebMeaningfulLayout::kVisuallyNonEmpty) { - mojo::AssociatedRemote browser_remote; + mojo::AssociatedRemote + web_contents_utility_remote; render_frame_->GetRemoteAssociatedInterfaces()->GetInterface( - &browser_remote); - browser_remote->OnFirstNonEmptyLayout(); + &web_contents_utility_remote); + web_contents_utility_remote->OnFirstNonEmptyLayout(); } } From cee4e3707f5624818a320f16c0d6d3efdb3ff6dc Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 20:06:03 -0400 Subject: [PATCH 243/268] feat: support more color formats for `backgroundColor` (#33364) * feat: support more color formats for backgroundColor * feat: support more formats in getBackgroundColor * chore: remove redundant includes * refactor: differentiate rgb/rgba/hsl/hsla + docs * chore: address review cleanup comments * refactor: simple getBackgroundColor * chore: fix iwyu * fix: typescript arg * Update docs/api/browser-view.md Co-authored-by: Jeremy Rose * chore: address comments Co-authored-by: Shelley Vohr Co-authored-by: Jeremy Rose --- docs/api/browser-view.md | 30 ++++++++- docs/api/browser-window.md | 56 ++++++++++++---- shell/browser/api/electron_api_base_window.cc | 4 +- shell/browser/api/electron_api_base_window.h | 2 +- .../browser/api/electron_api_browser_view.cc | 4 +- .../api/electron_api_browser_window.cc | 4 +- .../browser/api/electron_api_web_contents.cc | 2 +- shell/browser/native_window.cc | 2 +- shell/browser/ui/cocoa/electron_touch_bar.mm | 2 +- shell/browser/web_contents_preferences.cc | 2 +- shell/common/color_util.cc | 64 +++++++++++-------- shell/common/color_util.h | 8 ++- spec-main/api-browser-window-spec.ts | 19 ++++++ 13 files changed, 144 insertions(+), 55 deletions(-) diff --git a/docs/api/browser-view.md b/docs/api/browser-view.md index 783a54855c869..ed63f4a4881db 100644 --- a/docs/api/browser-view.md +++ b/docs/api/browser-view.md @@ -70,5 +70,31 @@ The `bounds` of this BrowserView instance as `Object`. #### `view.setBackgroundColor(color)` _Experimental_ -* `color` string - Color in `#aarrggbb` or `#argb` form. The alpha channel is - optional. +* `color` string - Color in Hex, RGB, ARGB, HSL, HSLA or named CSS color format. The alpha channel is + optional for the hex type. + +Examples of valid `color` values: + +* Hex + * #fff (RGB) + * #ffff (ARGB) + * #ffffff (RRGGBB) + * #ffffffff (AARRGGBB) +* RGB + * rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\) + * e.g. rgb(255, 255, 255) +* RGBA + * rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\) + * e.g. rgba(255, 255, 255, 1.0) +* HSL + * hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\) + * e.g. hsl(200, 20%, 50%) +* HSLA + * hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\) + * e.g. hsla(200, 20%, 50%, 0.5) +* Color name + * Options are listed in [SkParseColor.cpp](https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/utils/SkParseColor.cpp;l=11-152;drc=eea4bf52cb0d55e2a39c828b017c80a5ee054148) + * Similar to CSS Color Module Level 3 keywords, but case-sensitive. + * e.g. `blueviolet` or `red` + +**Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBA` or `RGA`. diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 140eaaa2284a0..1897bbc2754d3 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -66,6 +66,18 @@ win.loadURL('https://github.com') Note that even for apps that use `ready-to-show` event, it is still recommended to set `backgroundColor` to make app feel more native. +Some examples of valid `backgroundColor` values include: + +```js +const win = new BrowserWindow() +win.setBackgroundColor('hsl(230, 100%, 50%)') +win.setBackgroundColor('rgb(255, 145, 145)') +win.setBackgroundColor('#ff00a3') +win.setBackgroundColor('blueviolet') +``` + +For more information about these color types see valid options in [win.setBackgroundColor](browser-window.md#winsetbackgroundcolorbackgroundcolor). + ## Parent and child windows By using `parent` option, you can create child windows: @@ -199,9 +211,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. * `enableLargerThanScreen` boolean (optional) - Enable the window to be resized larger than screen. Only relevant for macOS, as other OSes allow larger-than-screen windows by default. Default is `false`. - * `backgroundColor` string (optional) - Window's background color as a hexadecimal value, - like `#66CD00` or `#FFF` or `#80FFFFFF` (alpha in #AARRGGBB format is supported if - `transparent` is set to `true`). Default is `#FFF` (white). + * `backgroundColor` string (optional) - The window's background color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. Alpha in #AARRGGBB format is supported if `transparent` is set to `true`. Default is `#FFF` (white). See [win.setBackgroundColor](browser-window.md#winsetbackgroundcolorbackgroundcolor) for more information. * `hasShadow` boolean (optional) - Whether window should have a shadow. Default is `true`. * `opacity` number (optional) - Set the initial opacity of the window, between 0.0 (fully transparent) and 1.0 (fully opaque). This is only implemented on Windows and macOS. @@ -992,12 +1002,33 @@ APIs like `win.setSize`. #### `win.setBackgroundColor(backgroundColor)` -* `backgroundColor` string - Window's background color as a hexadecimal value, - like `#66CD00` or `#FFF` or `#80FFFFFF` (alpha is supported if `transparent` - is `true`). Default is `#FFF` (white). - -Sets the background color of the window. See [Setting -`backgroundColor`](#setting-the-backgroundcolor-property). +* `backgroundColor` string - Color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. The alpha channel is optional for the hex type. + +Examples of valid `backgroundColor` values: + +* Hex + * #fff (shorthand RGB) + * #ffff (shorthand ARGB) + * #ffffff (RGB) + * #ffffffff (ARGB) +* RGB + * rgb\(([\d]+),\s*([\d]+),\s*([\d]+)\) + * e.g. rgb(255, 255, 255) +* RGBA + * rgba\(([\d]+),\s*([\d]+),\s*([\d]+),\s*([\d.]+)\) + * e.g. rgba(255, 255, 255, 1.0) +* HSL + * hsl\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%\) + * e.g. hsl(200, 20%, 50%) +* HSLA + * hsla\((-?[\d.]+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\) + * e.g. hsla(200, 20%, 50%, 0.5) +* Color name + * Options are listed in [SkParseColor.cpp](https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/src/utils/SkParseColor.cpp;l=11-152;drc=eea4bf52cb0d55e2a39c828b017c80a5ee054148) + * Similar to CSS Color Module Level 3 keywords, but case-sensitive. + * e.g. `blueviolet` or `red` + +Sets the background color of the window. See [Setting `backgroundColor`](#setting-the-backgroundcolor-property). #### `win.previewFile(path[, displayName])` _macOS_ @@ -1041,8 +1072,11 @@ Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as ` #### `win.getBackgroundColor()` -Returns `string` - Gets the background color of the window. See [Setting -`backgroundColor`](#setting-the-backgroundcolor-property). +Returns `string` - Gets the background color of the window in Hex (`#RRGGBB`) format. + +See [Setting `backgroundColor`](#setting-the-backgroundcolor-property). + +**Note:** The alpha value is _not_ returned alongside the red, green, and blue values. #### `win.setContentBounds(bounds[, animate])` diff --git a/shell/browser/api/electron_api_base_window.cc b/shell/browser/api/electron_api_base_window.cc index 704fceeae40c3..3024eba2098ec 100644 --- a/shell/browser/api/electron_api_base_window.cc +++ b/shell/browser/api/electron_api_base_window.cc @@ -643,11 +643,11 @@ bool BaseWindow::IsTabletMode() const { } void BaseWindow::SetBackgroundColor(const std::string& color_name) { - SkColor color = ParseHexColor(color_name); + SkColor color = ParseCSSColor(color_name); window_->SetBackgroundColor(color); } -std::string BaseWindow::GetBackgroundColor() { +std::string BaseWindow::GetBackgroundColor(gin_helper::Arguments* args) { return ToRGBHex(window_->GetBackgroundColor()); } diff --git a/shell/browser/api/electron_api_base_window.h b/shell/browser/api/electron_api_base_window.h index e70202e0e7c61..7651ddd0e653c 100644 --- a/shell/browser/api/electron_api_base_window.h +++ b/shell/browser/api/electron_api_base_window.h @@ -159,7 +159,7 @@ class BaseWindow : public gin_helper::TrackableObject, bool IsKiosk(); bool IsTabletMode() const; virtual void SetBackgroundColor(const std::string& color_name); - std::string GetBackgroundColor(); + std::string GetBackgroundColor(gin_helper::Arguments* args); void SetHasShadow(bool has_shadow); bool HasShadow(); void SetOpacity(const double opacity); diff --git a/shell/browser/api/electron_api_browser_view.cc b/shell/browser/api/electron_api_browser_view.cc index 6feadb81074a3..1a9735cef11e3 100644 --- a/shell/browser/api/electron_api_browser_view.cc +++ b/shell/browser/api/electron_api_browser_view.cc @@ -154,11 +154,11 @@ gfx::Rect BrowserView::GetBounds() { } void BrowserView::SetBackgroundColor(const std::string& color_name) { - view_->SetBackgroundColor(ParseHexColor(color_name)); + view_->SetBackgroundColor(ParseCSSColor(color_name)); if (web_contents()) { auto* wc = web_contents()->web_contents(); - wc->SetPageBaseBackgroundColor(ParseHexColor(color_name)); + wc->SetPageBaseBackgroundColor(ParseCSSColor(color_name)); } } diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index 5df4b474b244a..b0629e27c74d7 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/shell/browser/api/electron_api_browser_window.cc @@ -370,7 +370,7 @@ void BrowserWindow::Blur() { void BrowserWindow::SetBackgroundColor(const std::string& color_name) { BaseWindow::SetBackgroundColor(color_name); - SkColor color = ParseHexColor(color_name); + SkColor color = ParseCSSColor(color_name); web_contents()->SetPageBaseBackgroundColor(color); auto* rwhv = web_contents()->GetRenderWidgetHostView(); if (rwhv) { @@ -384,7 +384,7 @@ void BrowserWindow::SetBackgroundColor(const std::string& color_name) { auto* web_preferences = WebContentsPreferences::From(api_web_contents_->web_contents()); if (web_preferences) { - web_preferences->SetBackgroundColor(ParseHexColor(color_name)); + web_preferences->SetBackgroundColor(ParseCSSColor(color_name)); } } } diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 5c7fd4d7cdd18..2c24f7ecf99e0 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -773,7 +773,7 @@ WebContents::WebContents(v8::Isolate* isolate, // and we then need to pull it back out and check it here. std::string background_color; options.GetHidden(options::kBackgroundColor, &background_color); - bool transparent = ParseHexColor(background_color) == SK_ColorTRANSPARENT; + bool transparent = ParseCSSColor(background_color) == SK_ColorTRANSPARENT; content::WebContents::CreateParams params(session->browser_context()); auto* view = new OffScreenWebContentsView( diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 6e42c30304943..b62ce2f617055 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -241,7 +241,7 @@ void NativeWindow::InitFromOptions(const gin_helper::Dictionary& options) { #endif std::string color; if (options.Get(options::kBackgroundColor, &color)) { - SetBackgroundColor(ParseHexColor(color)); + SetBackgroundColor(ParseCSSColor(color)); } else if (!transparent()) { // For normal window, use white as default background. SetBackgroundColor(SK_ColorWHITE); diff --git a/shell/browser/ui/cocoa/electron_touch_bar.mm b/shell/browser/ui/cocoa/electron_touch_bar.mm index 6b3a1383dd0ed..af690bd79d851 100644 --- a/shell/browser/ui/cocoa/electron_touch_bar.mm +++ b/shell/browser/ui/cocoa/electron_touch_bar.mm @@ -339,7 +339,7 @@ - (bool)hasItemWithID:(const std::string&)item_id { } - (NSColor*)colorFromHexColorString:(const std::string&)colorString { - SkColor color = electron::ParseHexColor(colorString); + SkColor color = electron::ParseCSSColor(colorString); return skia::SkColorToDeviceNSColor(color); } diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index e54772a0bfce2..642b83675170a 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -235,7 +235,7 @@ void WebContentsPreferences::Merge( } std::string background_color; if (web_preferences.GetHidden(options::kBackgroundColor, &background_color)) - background_color_ = ParseHexColor(background_color); + background_color_ = ParseCSSColor(background_color); std::string safe_dialogs_message; if (web_preferences.Get("safeDialogsMessage", &safe_dialogs_message)) safe_dialogs_message_ = safe_dialogs_message; diff --git a/shell/common/color_util.cc b/shell/common/color_util.cc index 9e15bc618f394..afa4c7f7a40bc 100644 --- a/shell/common/color_util.cc +++ b/shell/common/color_util.cc @@ -4,46 +4,54 @@ #include "shell/common/color_util.h" +#include +#include #include -#include "base/strings/string_number_conversions.h" +#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" +#include "content/public/common/color_parser.h" +#include "ui/gfx/color_utils.h" -namespace electron { +namespace { + +bool IsHexFormat(const std::string& str) { + // Must be either #ARGB or #AARRGGBB. + bool is_hex_length = str.length() == 5 || str.length() == 9; + if (str[0] != '#' || !is_hex_length) + return false; + + if (!std::all_of(str.begin() + 1, str.end(), ::isxdigit)) + return false; -SkColor ParseHexColor(const std::string& color_string) { - // Check the string for incorrect formatting. - if (color_string.empty() || color_string[0] != '#') - return SK_ColorWHITE; + return true; +} + +} // namespace - // Prepend FF if alpha channel is not specified. - std::string source = color_string.substr(1); - if (source.size() == 3) - source.insert(0, "F"); - else if (source.size() == 6) - source.insert(0, "FF"); +namespace electron { - // Convert the string from #FFF format to #FFFFFF format. - std::string formatted_color; - if (source.size() == 4) { - for (size_t i = 0; i < 4; ++i) { - formatted_color += source[i]; - formatted_color += source[i]; +SkColor ParseCSSColor(const std::string& color_string) { + // ParseCssColorString expects RGBA and we historically use ARGB + // so we need to convert before passing to ParseCssColorString. + std::string color_str = color_string; + if (IsHexFormat(color_str)) { + if (color_str.length() == 5) { + // #ARGB => #RGBA + std::swap(color_str[1], color_str[4]); + } else { + // #AARRGGBB => #RRGGBBAA + std::swap(color_str[1], color_str[7]); + std::swap(color_str[2], color_str[8]); } - } else if (source.size() == 8) { - formatted_color = source; - } else { - return SK_ColorWHITE; } - // Convert the string to an integer and make sure it is in the correct value - // range. - std::vector bytes; - if (!base::HexStringToBytes(formatted_color, &bytes)) - return SK_ColorWHITE; + SkColor color; + if (!content::ParseCssColorString(color_str, &color)) + color = SK_ColorWHITE; - return SkColorSetARGB(bytes[0], bytes[1], bytes[2], bytes[3]); + return color; } std::string ToRGBHex(SkColor color) { diff --git a/shell/common/color_util.h b/shell/common/color_util.h index 88b68cc398f9f..9bcceef2fbd3a 100644 --- a/shell/common/color_util.h +++ b/shell/common/color_util.h @@ -11,12 +11,14 @@ namespace electron { -// Parse hex color like "#FFF" or "#EFEFEF" -SkColor ParseHexColor(const std::string& color_string); +// Parses a CSS-style color string from hex, rgb(), rgba(), +// hsl(), hsla(), or color name formats. +SkColor ParseCSSColor(const std::string& color_string); -// Convert color to RGB hex value like "#ABCDEF" +// Convert color to RGB hex value like "#RRGGBB". std::string ToRGBHex(SkColor color); +// Convert color to RGBA hex value like "#RRGGBBAA". std::string ToRGBAHex(SkColor color, bool include_hash = true); } // namespace electron diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 89ca787c0c392..93ed8527f49a1 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1075,6 +1075,25 @@ describe('BrowserWindow module', () => { w.setBackgroundColor(backgroundColor); expect(w.getBackgroundColor()).to.equal(backgroundColor); }); + it('returns correct color with multiple passed formats', () => { + w.destroy(); + w = new BrowserWindow({}); + + w.setBackgroundColor('#AABBFF'); + expect(w.getBackgroundColor()).to.equal('#AABBFF'); + + w.setBackgroundColor('blueviolet'); + expect(w.getBackgroundColor()).to.equal('#8A2BE2'); + + w.setBackgroundColor('rgb(255, 0, 185)'); + expect(w.getBackgroundColor()).to.equal('#FF00B9'); + + w.setBackgroundColor('rgba(245, 40, 145, 0.8)'); + expect(w.getBackgroundColor()).to.equal('#F52891'); + + w.setBackgroundColor('hsl(155, 100%, 50%)'); + expect(w.getBackgroundColor()).to.equal('#00FF95'); + }); }); describe('BrowserWindow.getNormalBounds()', () => { From dcf825bed692bfbc8b3248ef10ee8959db8cf4c8 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 20:33:20 -0400 Subject: [PATCH 244/268] fix: fire show event when BrowserWindow shown via maximize() (#33214) Co-authored-by: David Sanders --- shell/browser/native_window_views.cc | 6 ++++-- shell/browser/native_window_views_win.cc | 7 ++++--- spec-main/api-browser-window-spec.ts | 23 +++++++++++++++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 2d3d866fa71dc..a5c58964016c3 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -580,11 +580,13 @@ void NativeWindowViews::SetEnabledInternal(bool enable) { #if BUILDFLAG(IS_LINUX) void NativeWindowViews::Maximize() { - if (IsVisible()) + if (IsVisible()) { widget()->Maximize(); - else + } else { widget()->native_widget_private()->Show(ui::SHOW_STATE_MAXIMIZED, gfx::Rect()); + NotifyWindowShow(); + } } #endif diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 0b4706f1cc198..747d7d064db61 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -178,12 +178,13 @@ HHOOK NativeWindowViews::mouse_hook_ = NULL; void NativeWindowViews::Maximize() { // Only use Maximize() when window is NOT transparent style if (!transparent()) { - if (IsVisible()) + if (IsVisible()) { widget()->Maximize(); - else + } else { widget()->native_widget_private()->Show(ui::SHOW_STATE_MAXIMIZED, gfx::Rect()); - return; + NotifyWindowShow(); + } } else { restore_bounds_ = GetBounds(); auto display = display::Screen::GetScreen()->GetDisplayNearestWindow( diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 93ed8527f49a1..1f830d630c14d 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -3556,6 +3556,29 @@ describe('BrowserWindow module', () => { }); }); + // TODO(dsanders11): Enable once maximize event works on Linux again on CI + ifdescribe(process.platform !== 'linux')('BrowserWindow.maximize()', () => { + afterEach(closeAllWindows); + // TODO(dsanders11): Disabled on macOS, see https://github.com/electron/electron/issues/32947 + ifit(process.platform !== 'darwin')('should show the window if it is not currently shown', async () => { + const w = new BrowserWindow({ show: false }); + const hidden = emittedOnce(w, 'hide'); + const shown = emittedOnce(w, 'show'); + const maximize = emittedOnce(w, 'maximize'); + expect(w.isVisible()).to.be.false('visible'); + w.maximize(); + await maximize; + expect(w.isVisible()).to.be.true('visible'); + // Even if the window is already maximized + w.hide(); + await hidden; + expect(w.isVisible()).to.be.false('visible'); + w.maximize(); + await shown; // Ensure a 'show' event happens when it becomes visible + expect(w.isVisible()).to.be.true('visible'); + }); + }); + describe('BrowserWindow.unmaximize()', () => { afterEach(closeAllWindows); it('should restore the previous window position', () => { From f893707c5d769978a465c13d14b8f75cc05bd599 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 22 Mar 2022 08:57:18 +0100 Subject: [PATCH 245/268] fix: pend bounds change when moving BrowserWindows (#33375) * fix: ensure bounds changes apply when moving windows * chore: remove unused queue include Co-authored-by: Shelley Vohr --- shell/browser/native_window_views.cc | 7 +++++++ shell/browser/native_window_views.h | 2 ++ shell/browser/native_window_views_win.cc | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index a5c58964016c3..4258bce662937 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -699,6 +699,13 @@ bool NativeWindowViews::IsFullscreen() const { } void NativeWindowViews::SetBounds(const gfx::Rect& bounds, bool animate) { +#if BUILDFLAG(IS_WIN) + if (is_moving_ || is_resizing_) { + pending_bounds_change_ = bounds; + return; + } +#endif + #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) // On Linux and Windows the minimum and maximum size should be updated with // window size when window is not resizable. diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index db178209ad6a5..0d08ebf6dbd8d 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -303,6 +303,8 @@ class NativeWindowViews : public NativeWindow, // Whether the window is currently being moved. bool is_moving_ = false; + absl::optional pending_bounds_change_; + // The color to use as the theme and symbol colors respectively for Window // Controls Overlay if enabled on Windows. SkColor overlay_button_color_; diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 747d7d064db61..77988743a9297 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -314,6 +314,15 @@ bool NativeWindowViews::PreHandleMSG(UINT message, NotifyWindowMoved(); is_moving_ = false; } + + // If the user dragged or moved the window during one or more + // calls to window.setBounds(), we want to apply the most recent + // one once they are done with the move or resize operation. + if (pending_bounds_change_.has_value()) { + SetBounds(pending_bounds_change_.value(), false /* animate */); + pending_bounds_change_.reset(); + } + return false; } case WM_MOVING: { From 700887d623162b9f9b094dc8d88b9349958aa3b1 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 22 Mar 2022 11:25:27 -0400 Subject: [PATCH 246/268] fix: IncrementCapturerCount doesn't increase the capturer count (#33371) This regression was introduced by commit 22a70eb8. Co-authored-by: Zeeker <13848632+zeeker999@users.noreply.github.com> --- .../browser/api/electron_api_web_contents.cc | 5 +- spec-main/api-browser-view-spec.ts | 62 +++++++++++++++++++ spec-main/api-browser-window-spec.ts | 19 ++++++ 3 files changed, 84 insertions(+), 2 deletions(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 2c24f7ecf99e0..7d1458484f993 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -3103,8 +3103,9 @@ void WebContents::IncrementCapturerCount(gin::Arguments* args) { // get stayAwake arguments if they exist args->GetNext(&stay_awake); - std::ignore = - web_contents()->IncrementCapturerCount(size, stay_hidden, stay_awake); + std::ignore = web_contents() + ->IncrementCapturerCount(size, stay_hidden, stay_awake) + .Release(); } void WebContents::DecrementCapturerCount(gin::Arguments* args) { diff --git a/spec-main/api-browser-view-spec.ts b/spec-main/api-browser-view-spec.ts index ac6a036db06b9..8d54b9efe1cae 100644 --- a/spec-main/api-browser-view-spec.ts +++ b/spec-main/api-browser-view-spec.ts @@ -302,4 +302,66 @@ describe('BrowserView module', () => { view.webContents.loadFile(path.join(fixtures, 'pages', 'window-open.html')); }); }); + + describe('BrowserView.capturePage(rect)', () => { + it('returns a Promise with a Buffer', async () => { + view = new BrowserView({ + webPreferences: { + backgroundThrottling: false + } + }); + w.addBrowserView(view); + view.setBounds({ + ...w.getBounds(), + x: 0, + y: 0 + }); + const image = await view.webContents.capturePage({ + x: 0, + y: 0, + width: 100, + height: 100 + }); + + expect(image.isEmpty()).to.equal(true); + }); + + xit('resolves after the window is hidden and capturer count is non-zero', async () => { + view = new BrowserView({ + webPreferences: { + backgroundThrottling: false + } + }); + w.setBrowserView(view); + view.setBounds({ + ...w.getBounds(), + x: 0, + y: 0 + }); + await view.webContents.loadFile(path.join(fixtures, 'pages', 'a.html')); + + view.webContents.incrementCapturerCount(); + const image = await view.webContents.capturePage(); + expect(image.isEmpty()).to.equal(false); + }); + + it('should increase the capturer count', () => { + view = new BrowserView({ + webPreferences: { + backgroundThrottling: false + } + }); + w.setBrowserView(view); + view.setBounds({ + ...w.getBounds(), + x: 0, + y: 0 + }); + + view.webContents.incrementCapturerCount(); + expect(view.webContents.isBeingCaptured()).to.be.true(); + view.webContents.decrementCapturerCount(); + expect(view.webContents.isBeingCaptured()).to.be.false(); + }); + }); }); diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 1f830d630c14d..67ec78ab5dd4d 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -1452,6 +1452,17 @@ describe('BrowserWindow module', () => { expect(hiddenImage.isEmpty()).to.equal(isEmpty); }); + it('resolves after the window is hidden and capturer count is non-zero', async () => { + const w = new BrowserWindow({ show: false }); + w.webContents.setBackgroundThrottling(false); + w.loadFile(path.join(fixtures, 'pages', 'a.html')); + await emittedOnce(w, 'ready-to-show'); + + w.webContents.incrementCapturerCount(); + const image = await w.capturePage(); + expect(image.isEmpty()).to.equal(false); + }); + it('preserves transparency', async () => { const w = new BrowserWindow({ show: false, transparent: true }); w.loadFile(path.join(fixtures, 'pages', 'theme-color.html')); @@ -1465,6 +1476,14 @@ describe('BrowserWindow module', () => { // Values can be 0,2,3,4, or 6. We want 6, which is RGB + Alpha expect(imgBuffer[25]).to.equal(6); }); + + it('should increase the capturer count', () => { + const w = new BrowserWindow({ show: false }); + w.webContents.incrementCapturerCount(); + expect(w.webContents.isBeingCaptured()).to.be.true(); + w.webContents.decrementCapturerCount(); + expect(w.webContents.isBeingCaptured()).to.be.false(); + }); }); describe('BrowserWindow.setProgressBar(progress)', () => { From 1763f4cfc888b6c869840ee845851693ee0a652c Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 22 Mar 2022 14:19:43 -0700 Subject: [PATCH 247/268] fix: use stricter options in SecStaticCodeCheckValidity (#33378) * fix: use stricter options in SecStaticCodeCheckValidity * Update patches/squirrel.mac/fix_use_kseccschecknestedcode_kseccsstrictvalidate_in_the_sec.patch Co-authored-by: John Kleinschmidt Co-authored-by: Samuel Attard Co-authored-by: Samuel Attard Co-authored-by: John Kleinschmidt --- patches/squirrel.mac/.patches | 1 + ...code_kseccsstrictvalidate_in_the_sec.patch | 21 +++ spec-main/api-autoupdater-darwin-spec.ts | 137 +++++++++++++++++- 3 files changed, 153 insertions(+), 6 deletions(-) create mode 100644 patches/squirrel.mac/fix_use_kseccschecknestedcode_kseccsstrictvalidate_in_the_sec.patch diff --git a/patches/squirrel.mac/.patches b/patches/squirrel.mac/.patches index f9ad92a0b41ad..0950bcb5a678d 100644 --- a/patches/squirrel.mac/.patches +++ b/patches/squirrel.mac/.patches @@ -1,2 +1,3 @@ build_add_gn_config.patch fix_ensure_that_self_is_retained_until_the_racsignal_is_complete.patch +fix_use_kseccschecknestedcode_kseccsstrictvalidate_in_the_sec.patch diff --git a/patches/squirrel.mac/fix_use_kseccschecknestedcode_kseccsstrictvalidate_in_the_sec.patch b/patches/squirrel.mac/fix_use_kseccschecknestedcode_kseccsstrictvalidate_in_the_sec.patch new file mode 100644 index 0000000000000..cf9af4dd40fa7 --- /dev/null +++ b/patches/squirrel.mac/fix_use_kseccschecknestedcode_kseccsstrictvalidate_in_the_sec.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Attard +Date: Mon, 21 Mar 2022 15:14:19 -0700 +Subject: fix: use kSecCSCheckNestedCode | kSecCSStrictValidate in the Sec + validate call + +This ensures that Squirrel.Mac validates the nested bundles (nested Frameworks) including the incoming Squirrel.Mac framework. + +diff --git a/Squirrel/SQRLCodeSignature.m b/Squirrel/SQRLCodeSignature.m +index f8754dbd6a1490d2b50f1014e2daa5c1f71b2103..2f5e27c1ae5c5bd514abe33d4cd42c4724656c07 100644 +--- a/Squirrel/SQRLCodeSignature.m ++++ b/Squirrel/SQRLCodeSignature.m +@@ -124,7 +124,7 @@ - (RACSignal *)verifyBundleAtURL:(NSURL *)bundleURL { + } + + CFErrorRef validityError = NULL; +- result = SecStaticCodeCheckValidityWithErrors(staticCode, kSecCSCheckAllArchitectures, (__bridge SecRequirementRef)self.requirement, &validityError); ++ result = SecStaticCodeCheckValidityWithErrors(staticCode, kSecCSCheckNestedCode | kSecCSStrictValidate | kSecCSCheckAllArchitectures, (__bridge SecRequirementRef)self.requirement, &validityError); + @onExit { + if (validityError != NULL) CFRelease(validityError); + }; diff --git a/spec-main/api-autoupdater-darwin-spec.ts b/spec-main/api-autoupdater-darwin-spec.ts index 226a196c4ab5a..c4535337f9015 100644 --- a/spec-main/api-autoupdater-darwin-spec.ts +++ b/spec-main/api-autoupdater-darwin-spec.ts @@ -6,14 +6,14 @@ import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; import { AddressInfo } from 'net'; -import { ifdescribe } from './spec-helpers'; +import { ifdescribe, ifit } from './spec-helpers'; const features = process._linkedBinding('electron_common_features'); const fixturesPath = path.resolve(__dirname, 'fixtures'); // We can only test the auto updater on darwin non-component builds -ifdescribe(process.platform === 'darwin' && process.arch !== 'arm64' && !process.mas && !features.isComponentBuild())('autoUpdater behavior', function () { +ifdescribe(process.platform === 'darwin' && !(process.env.CI && process.arch === 'arm64') && !process.mas && !features.isComponentBuild())('autoUpdater behavior', function () { this.timeout(120000); let identity = ''; @@ -115,8 +115,11 @@ ifdescribe(process.platform === 'darwin' && process.arch !== 'arm64' && !process const cachedZips: Record = {}; - const getOrCreateUpdateZipPath = async (version: string, fixture: string) => { - const key = `${version}-${fixture}`; + const getOrCreateUpdateZipPath = async (version: string, fixture: string, mutateAppPostSign?: { + mutate: (appPath: string) => Promise, + mutationKey: string, + }) => { + const key = `${version}-${fixture}-${mutateAppPostSign?.mutationKey || 'no-mutation'}`; if (!cachedZips[key]) { let updateZipPath: string; await withTempDirectory(async (dir) => { @@ -127,6 +130,7 @@ ifdescribe(process.platform === 'darwin' && process.arch !== 'arm64' && !process (await fs.readFile(appPJPath, 'utf8')).replace('1.0.0', version) ); await signApp(secondAppPath); + await mutateAppPostSign?.mutate(secondAppPath); updateZipPath = path.resolve(dir, 'update.zip'); await spawn('zip', ['-r', '--symlinks', updateZipPath, './'], { cwd: dir @@ -143,10 +147,12 @@ ifdescribe(process.platform === 'darwin' && process.arch !== 'arm64' && !process } }); - it('should fail to set the feed URL when the app is not signed', async () => { + // On arm64 builds the built app is self-signed by default so the setFeedURL call always works + ifit(process.arch !== 'arm64')('should fail to set the feed URL when the app is not signed', async () => { await withTempDirectory(async (dir) => { const appPath = await copyApp(dir); const launchResult = await launchApp(appPath, ['http://myupdate']); + console.log(launchResult); expect(launchResult.code).to.equal(1); expect(launchResult.out).to.include('Could not get code signature for running application'); }); @@ -259,12 +265,16 @@ ifdescribe(process.platform === 'darwin' && process.arch !== 'arm64' && !process nextVersion: string; startFixture: string; endFixture: string; + mutateAppPostSign?: { + mutate: (appPath: string) => Promise, + mutationKey: string, + } }, fn: (appPath: string, zipPath: string) => Promise) => { await withTempDirectory(async (dir) => { const appPath = await copyApp(dir, opts.startFixture); await signApp(appPath); - const updateZipPath = await getOrCreateUpdateZipPath(opts.nextVersion, opts.endFixture); + const updateZipPath = await getOrCreateUpdateZipPath(opts.nextVersion, opts.endFixture, opts.mutateAppPostSign); await fn(appPath, updateZipPath); }); @@ -311,6 +321,121 @@ ifdescribe(process.platform === 'darwin' && process.arch !== 'arm64' && !process }); }); + it('should hit the download endpoint when an update is available and fail when the zip signature is invalid', async () => { + await withUpdatableApp({ + nextVersion: '2.0.0', + startFixture: 'update', + endFixture: 'update', + mutateAppPostSign: { + mutationKey: 'add-resource', + mutate: async (appPath) => { + const resourcesPath = path.resolve(appPath, 'Contents', 'Resources', 'app', 'injected.txt'); + await fs.writeFile(resourcesPath, 'demo'); + } + } + }, async (appPath, updateZipPath) => { + server.get('/update-file', (req, res) => { + res.download(updateZipPath); + }); + server.get('/update-check', (req, res) => { + res.json({ + url: `http://localhost:${port}/update-file`, + name: 'My Release Name', + notes: 'Theses are some release notes innit', + pub_date: (new Date()).toString() + }); + }); + const launchResult = await launchApp(appPath, [`http://localhost:${port}/update-check`]); + logOnError(launchResult, () => { + expect(launchResult).to.have.property('code', 1); + expect(launchResult.out).to.include('Code signature at URL'); + expect(launchResult.out).to.include('a sealed resource is missing or invalid'); + expect(requests).to.have.lengthOf(2); + expect(requests[0]).to.have.property('url', '/update-check'); + expect(requests[1]).to.have.property('url', '/update-file'); + expect(requests[0].header('user-agent')).to.include('Electron/'); + expect(requests[1].header('user-agent')).to.include('Electron/'); + }); + }); + }); + + it('should hit the download endpoint when an update is available and fail when the ShipIt binary is a symlink', async () => { + await withUpdatableApp({ + nextVersion: '2.0.0', + startFixture: 'update', + endFixture: 'update', + mutateAppPostSign: { + mutationKey: 'modify-shipit', + mutate: async (appPath) => { + const shipItPath = path.resolve(appPath, 'Contents', 'Frameworks', 'Squirrel.framework', 'Resources', 'ShipIt'); + await fs.remove(shipItPath); + await fs.symlink('/tmp/ShipIt', shipItPath, 'file'); + } + } + }, async (appPath, updateZipPath) => { + server.get('/update-file', (req, res) => { + res.download(updateZipPath); + }); + server.get('/update-check', (req, res) => { + res.json({ + url: `http://localhost:${port}/update-file`, + name: 'My Release Name', + notes: 'Theses are some release notes innit', + pub_date: (new Date()).toString() + }); + }); + const launchResult = await launchApp(appPath, [`http://localhost:${port}/update-check`]); + logOnError(launchResult, () => { + expect(launchResult).to.have.property('code', 1); + expect(launchResult.out).to.include('Code signature at URL'); + expect(launchResult.out).to.include('a sealed resource is missing or invalid'); + expect(requests).to.have.lengthOf(2); + expect(requests[0]).to.have.property('url', '/update-check'); + expect(requests[1]).to.have.property('url', '/update-file'); + expect(requests[0].header('user-agent')).to.include('Electron/'); + expect(requests[1].header('user-agent')).to.include('Electron/'); + }); + }); + }); + + it('should hit the download endpoint when an update is available and fail when the Electron Framework is modified', async () => { + await withUpdatableApp({ + nextVersion: '2.0.0', + startFixture: 'update', + endFixture: 'update', + mutateAppPostSign: { + mutationKey: 'modify-eframework', + mutate: async (appPath) => { + const shipItPath = path.resolve(appPath, 'Contents', 'Frameworks', 'Electron Framework.framework', 'Electron Framework'); + await fs.appendFile(shipItPath, Buffer.from('123')); + } + } + }, async (appPath, updateZipPath) => { + server.get('/update-file', (req, res) => { + res.download(updateZipPath); + }); + server.get('/update-check', (req, res) => { + res.json({ + url: `http://localhost:${port}/update-file`, + name: 'My Release Name', + notes: 'Theses are some release notes innit', + pub_date: (new Date()).toString() + }); + }); + const launchResult = await launchApp(appPath, [`http://localhost:${port}/update-check`]); + logOnError(launchResult, () => { + expect(launchResult).to.have.property('code', 1); + expect(launchResult.out).to.include('Code signature at URL'); + expect(launchResult.out).to.include(' main executable failed strict validation'); + expect(requests).to.have.lengthOf(2); + expect(requests[0]).to.have.property('url', '/update-check'); + expect(requests[1]).to.have.property('url', '/update-file'); + expect(requests[0].header('user-agent')).to.include('Electron/'); + expect(requests[1].header('user-agent')).to.include('Electron/'); + }); + }); + }); + it('should hit the download endpoint when an update is available and update successfully when the zip is provided with JSON update mode', async () => { await withUpdatableApp({ nextVersion: '2.0.0', From e5c56c08a4c9d0d7c8735d82256d4592de50970a Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Tue, 22 Mar 2022 20:11:43 -0400 Subject: [PATCH 248/268] ci: enable thin LTO on Mac (#33194) (#33387) * build: remove thin lto mac patch * build: remove step-get-more-space-on-mac * build: remove USE_PREBUILT_V8_CONTEXT_SNAPSHOT * ci: re-add mksnapshot logic * ci: re-add USE_PREBUILT_V8_CONTEXT_SNAPSHOT * ci: re-add get-more-space, delete thin LTO cache & .dSYM * ci: don't delete v8_snapshot_generator.dSYM * ci: add timeout to mksnapshot Co-authored-by: Keeley Hammond --- .circleci/build_config.yml | 2 ++ patches/chromium/.patches | 1 - .../build_disable_thin_lto_on_mac.patch | 22 ------------------- 3 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 patches/chromium/build_disable_thin_lto_on_mac.patch diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 92786e1398706..927d0a4cc5d7f 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -543,6 +543,7 @@ step-electron-build: &step-electron-build (cd out/Default; zip mksnapshot.zip mksnapshot_args clang_x64_v8_arm64/gen/v8/embedded.S) rm -rf out/Default/clang_x64_v8_arm64/gen rm -rf out/Default/clang_x64_v8_arm64/obj + rm -rf out/Default/clang_x64_v8_arm64/thinlto-cache rm -rf out/Default/clang_x64/obj # Regenerate because we just deleted some ninja files @@ -779,6 +780,7 @@ step-show-goma-stats: &step-show-goma-stats step-mksnapshot-build: &step-mksnapshot-build run: name: mksnapshot build + no_output_timeout: 30m command: | cd src if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" != "1" ]; then diff --git a/patches/chromium/.patches b/patches/chromium/.patches index c470189487c06..7dcf136c34928 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -112,6 +112,5 @@ feat_add_data_transfer_to_requestsingleinstancelock.patch fix_crash_when_saving_edited_pdf_files.patch port_autofill_colors_to_the_color_pipeline.patch build_disable_partition_alloc_on_mac.patch -build_disable_thin_lto_on_mac.patch fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch remove_incorrect_width_height_adjustments.patch diff --git a/patches/chromium/build_disable_thin_lto_on_mac.patch b/patches/chromium/build_disable_thin_lto_on_mac.patch deleted file mode 100644 index f5ffa86766c1a..0000000000000 --- a/patches/chromium/build_disable_thin_lto_on_mac.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: VerteDinde -Date: Tue, 1 Mar 2022 11:31:59 -0800 -Subject: build: disable thin lto on mac - -Ths build disables thin lto for mac, in order to preserve -disk space on mac without breaking win-ia32. -The patch can be removed when we have more disk space on CircleCI - -diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni -index 9d25c10587c7ab4e2053f8f69aef3f135ef8e9f9..8d8b8d13c62da1fdd051019c8b726de7d1783113 100644 ---- a/build/config/compiler/compiler.gni -+++ b/build/config/compiler/compiler.gni -@@ -74,7 +74,7 @@ declare_args() { - use_thin_lto = - is_cfi || - (is_clang && is_official_build && chrome_pgo_phase != 1 && -- (is_linux || is_win || is_mac || -+ (is_linux || is_win || - (is_android && target_os != "chromeos") || - ((is_chromeos_ash || is_chromeos_lacros) && is_chromeos_device))) - From d36dc1c7dee8f1bb12310987425b3a5c9386da57 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 10:10:12 +0100 Subject: [PATCH 249/268] fix: persist BrowserView content bounds when calculating layout (#33399) Reverting change introduced in PR: https://github.com/electron/electron/pull/30510 Co-authored-by: Andreas Johansson --- shell/browser/ui/views/inspectable_web_contents_view_views.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/ui/views/inspectable_web_contents_view_views.cc b/shell/browser/ui/views/inspectable_web_contents_view_views.cc index 35a32fd505158..7ab8ac51a2116 100644 --- a/shell/browser/ui/views/inspectable_web_contents_view_views.cc +++ b/shell/browser/ui/views/inspectable_web_contents_view_views.cc @@ -214,7 +214,7 @@ void InspectableWebContentsViewViews::SetTitle(const std::u16string& title) { void InspectableWebContentsViewViews::Layout() { if (!devtools_web_view_->GetVisible()) { - contents_web_view_->SetBoundsRect(GetVisibleBounds()); + contents_web_view_->SetBoundsRect(GetContentsBounds()); return; } From 8b996a478a693c36edb871035fae682a35f29c71 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 19:03:25 -0400 Subject: [PATCH 250/268] fix: libuv patches to address child_process.spawn slowness (#33407) * fix: libuv patches to address child_process.spawn slowness * chore: backport additional patches * Update .patches Co-authored-by: Jeremy Rose Co-authored-by: deepak1556 --- patches/node/.patches | 11 + ..._don_t_use_thread-unsafe_strtok_3524.patch | 54 ++ ...handle_kevent_note_exit_failure_3451.patch | 70 ++ ...rocess_fix_hang_after_note_exit_3521.patch | 158 ++++ ...or_for_exit_with_kqueue_on_bsds_3441.patch | 170 ++++ ..._dupfd_cloexec_if_it_is_defined_3512.patch | 54 ++ ...e_signal_mask_if_the_fork_fails_3537.patch | 36 + ...ess_simplify_uv_write_int_calls_3519.patch | 63 ++ ...use_posix_spawn_instead_of_fork_3257.patch | 889 ++++++++++++++++++ ...rotect_fork_in_uv_spawn_from_signals.patch | 173 ++++ .../unix_remove_uv_cloexec_ioctl_3515.patch | 91 ++ .../unix_simplify_uv_cloexec_fcntl_3492.patch | 36 + 12 files changed, 1805 insertions(+) create mode 100644 patches/node/macos_don_t_use_thread-unsafe_strtok_3524.patch create mode 100644 patches/node/process_bsd_handle_kevent_note_exit_failure_3451.patch create mode 100644 patches/node/process_fix_hang_after_note_exit_3521.patch create mode 100644 patches/node/process_monitor_for_exit_with_kqueue_on_bsds_3441.patch create mode 100644 patches/node/process_only_use_f_dupfd_cloexec_if_it_is_defined_3512.patch create mode 100644 patches/node/process_reset_the_signal_mask_if_the_fork_fails_3537.patch create mode 100644 patches/node/process_simplify_uv_write_int_calls_3519.patch create mode 100644 patches/node/reland_macos_use_posix_spawn_instead_of_fork_3257.patch create mode 100644 patches/node/unix_protect_fork_in_uv_spawn_from_signals.patch create mode 100644 patches/node/unix_remove_uv_cloexec_ioctl_3515.patch create mode 100644 patches/node/unix_simplify_uv_cloexec_fcntl_3492.patch diff --git a/patches/node/.patches b/patches/node/.patches index c73c85f1b3fd9..10a05075e46b9 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -33,3 +33,14 @@ darwin_bump_minimum_supported_version_to_10_15_3406.patch fix_serdes_test.patch fix_failing_node_js_test_on_outdated.patch be_compatible_with_cppgc.patch +process_monitor_for_exit_with_kqueue_on_bsds_3441.patch +unix_protect_fork_in_uv_spawn_from_signals.patch +process_bsd_handle_kevent_note_exit_failure_3451.patch +reland_macos_use_posix_spawn_instead_of_fork_3257.patch +process_reset_the_signal_mask_if_the_fork_fails_3537.patch +process_only_use_f_dupfd_cloexec_if_it_is_defined_3512.patch +unix_simplify_uv_cloexec_fcntl_3492.patch +unix_remove_uv_cloexec_ioctl_3515.patch +process_simplify_uv_write_int_calls_3519.patch +macos_don_t_use_thread-unsafe_strtok_3524.patch +process_fix_hang_after_note_exit_3521.patch diff --git a/patches/node/macos_don_t_use_thread-unsafe_strtok_3524.patch b/patches/node/macos_don_t_use_thread-unsafe_strtok_3524.patch new file mode 100644 index 0000000000000..69e57568216d0 --- /dev/null +++ b/patches/node/macos_don_t_use_thread-unsafe_strtok_3524.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Wed, 9 Mar 2022 11:06:39 +0100 +Subject: macos: don't use thread-unsafe strtok() (#3524) + +Refs https://github.com/libuv/libuv/pull/3524 + +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index 8cde389b826b6b167437845eccd5fed440dcadc4..147164e7ea25abbf655452930d78ee0a714cce36 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -387,30 +387,22 @@ static void uv__spawn_init_posix_spawn_fncs(void) { + + + static void uv__spawn_init_can_use_setsid(void) { +- static const int MACOS_CATALINA_VERSION_MAJOR = 19; +- char version_str[256]; +- char* version_major_str; +- size_t version_str_size = 256; +- int r; +- int version_major; +- +- /* Get a version string */ +- r = sysctlbyname("kern.osrelease", version_str, &version_str_size, NULL, 0); +- if (r != 0) ++ int which[] = {CTL_KERN, KERN_OSRELEASE}; ++ unsigned major; ++ unsigned minor; ++ unsigned patch; ++ char buf[256]; ++ size_t len; ++ ++ len = sizeof(buf); ++ if (sysctl(which, ARRAY_SIZE(which), buf, &len, NULL, 0)) + return; + +- /* Try to get the major version number. If not found +- * fall back to the fork/exec flow */ +- version_major_str = strtok(version_str, "."); +- if (version_major_str == NULL) ++ /* NULL specifies to use LC_C_LOCALE */ ++ if (3 != sscanf_l(buf, NULL, "%u.%u.%u", &major, &minor, &patch)) + return; + +- /* Parse the version major as a number. If it is greater than +- * the major version for macOS Catalina (aka macOS 10.15), then +- * the POSIX_SPAWN_SETSID flag is available */ +- version_major = atoi_l(version_major_str, NULL); /* Use LC_C_LOCALE */ +- if (version_major >= MACOS_CATALINA_VERSION_MAJOR) +- posix_spawn_can_use_setsid = 1; ++ posix_spawn_can_use_setsid = (major >= 19); /* macOS Catalina */ + } + + diff --git a/patches/node/process_bsd_handle_kevent_note_exit_failure_3451.patch b/patches/node/process_bsd_handle_kevent_note_exit_failure_3451.patch new file mode 100644 index 0000000000000..c0ab59bbeab92 --- /dev/null +++ b/patches/node/process_bsd_handle_kevent_note_exit_failure_3451.patch @@ -0,0 +1,70 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jameson Nash +Date: Tue, 1 Feb 2022 15:27:12 -0500 +Subject: process,bsd: handle kevent NOTE_EXIT failure (#3451) + +The kernel may return ESRCH if the child has already exited here. +This is rather annoying, and means we must indirectly handle +notification to our event loop of the process exit. + +Refs: https://github.com/libuv/libuv/pull/3441 +Refs: https://github.com/libuv/libuv/pull/3257 + +diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h +index 16be13b99f5db77741aa276e90a437ef4eb5ba32..2dcc8b32f5165dd75061a1b55cc1abd2ab93ccc9 100644 +--- a/deps/uv/src/unix/internal.h ++++ b/deps/uv/src/unix/internal.h +@@ -145,7 +145,8 @@ typedef struct uv__stream_queued_fds_s uv__stream_queued_fds_t; + + /* loop flags */ + enum { +- UV_LOOP_BLOCK_SIGPROF = 1 ++ UV_LOOP_BLOCK_SIGPROF = 0x1, ++ UV_LOOP_REAP_CHILDREN = 0x2 + }; + + /* flags of excluding ifaddr */ +diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c +index 35200f17495d80ed2d19ef9f6f76bbc92ee042f6..071fe0ce0938657d0fb840af62a432352e938a8a 100644 +--- a/deps/uv/src/unix/kqueue.c ++++ b/deps/uv/src/unix/kqueue.c +@@ -285,7 +285,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { + for (i = 0; i < nfds; i++) { + ev = events + i; + if (ev->filter == EVFILT_PROC) { +- uv__wait_children(loop); ++ loop->flags |= UV_LOOP_REAP_CHILDREN; + nevents++; + continue; + } +@@ -383,6 +383,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { + nevents++; + } + ++ if (loop->flags & UV_LOOP_REAP_CHILDREN) { ++ loop->flags &= ~UV_LOOP_REAP_CHILDREN; ++ uv__wait_children(loop); ++ } ++ + if (reset_timeout != 0) { + timeout = user_timeout; + reset_timeout = 0; +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index c1f6bd4b0076f0835caf83c45a6a896e7ae5def9..2920b942962357827bae9bcad23af8333e8b007f 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -507,8 +507,12 @@ int uv_spawn(uv_loop_t* loop, + #if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + struct kevent event; + EV_SET(&event, pid, EVFILT_PROC, EV_ADD | EV_ONESHOT, NOTE_EXIT, 0, 0); +- if (kevent(loop->backend_fd, &event, 1, NULL, 0, NULL)) +- abort(); ++ if (kevent(loop->backend_fd, &event, 1, NULL, 0, NULL)) { ++ if (errno != ESRCH) ++ abort(); ++ /* Process already exited. Call waitpid on the next loop iteration. */ ++ loop->flags |= UV_LOOP_REAP_CHILDREN; ++ } + #endif + + QUEUE_INSERT_TAIL(&loop->process_handles, &process->queue); diff --git a/patches/node/process_fix_hang_after_note_exit_3521.patch b/patches/node/process_fix_hang_after_note_exit_3521.patch new file mode 100644 index 0000000000000..68702cf332b81 --- /dev/null +++ b/patches/node/process_fix_hang_after_note_exit_3521.patch @@ -0,0 +1,158 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jameson Nash +Date: Wed, 23 Mar 2022 15:39:38 +0900 +Subject: process: fix hang after NOTE_EXIT (#3521) + +Bug #3504 seems to affect more platforms than just OpenBSD. As this +seems to be a race condition in these kernels, we do not want to fail +because of it. Instead, we remove the WNOHANG flag from waitpid, and +track exactly which processes have exited. Should also be a slight speed +improvement for excessively large numbers of live children. + +diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c +index 071fe0ce0938657d0fb840af62a432352e938a8a..4c4d990ff5fa6c8ab937be2e4f79ccdaf90670c2 100644 +--- a/deps/uv/src/unix/kqueue.c ++++ b/deps/uv/src/unix/kqueue.c +@@ -117,6 +117,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { + unsigned int revents; + QUEUE* q; + uv__io_t* w; ++ uv_process_t* process; + sigset_t* pset; + sigset_t set; + uint64_t base; +@@ -284,12 +285,22 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { + loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; + for (i = 0; i < nfds; i++) { + ev = events + i; ++ fd = ev->ident; ++ ++ /* Handle kevent NOTE_EXIT results */ + if (ev->filter == EVFILT_PROC) { +- loop->flags |= UV_LOOP_REAP_CHILDREN; ++ QUEUE_FOREACH(q, &loop->process_handles) { ++ process = QUEUE_DATA(q, uv_process_t, queue); ++ if (process->pid == fd) { ++ process->flags |= UV_HANDLE_REAP; ++ loop->flags |= UV_LOOP_REAP_CHILDREN; ++ break; ++ } ++ } + nevents++; + continue; + } +- fd = ev->ident; ++ + /* Skip invalidated events, see uv__platform_invalidate_fd */ + if (fd == -1) + continue; +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index 147164e7ea25abbf655452930d78ee0a714cce36..c8816b85b7e531648064e739fb89257565ad64bb 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -63,12 +63,18 @@ extern char **environ; + # include "zos-base.h" + #endif + +-#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#if defined(__APPLE__) || \ ++ defined(__DragonFly__) || \ ++ defined(__FreeBSD__) || \ ++ defined(__NetBSD__) || \ ++ defined(__OpenBSD__) + #include ++#else ++#define UV_USE_SIGCHLD + #endif + + +-#if !(defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) ++#ifdef UV_USE_SIGCHLD + static void uv__chld(uv_signal_t* handle, int signum) { + assert(signum == SIGCHLD); + uv__wait_children(handle->loop); +@@ -80,6 +86,7 @@ void uv__wait_children(uv_loop_t* loop) { + int exit_status; + int term_signal; + int status; ++ int options; + pid_t pid; + QUEUE pending; + QUEUE* q; +@@ -93,19 +100,33 @@ void uv__wait_children(uv_loop_t* loop) { + process = QUEUE_DATA(q, uv_process_t, queue); + q = QUEUE_NEXT(q); + ++#ifndef UV_USE_SIGCHLD ++ if ((process->flags & UV_HANDLE_REAP) == 0) ++ continue; ++ options = 0; ++ process->flags &= ~UV_HANDLE_REAP; ++#else ++ options = WNOHANG; ++#endif ++ + do +- pid = waitpid(process->pid, &status, WNOHANG); ++ pid = waitpid(process->pid, &status, options); + while (pid == -1 && errno == EINTR); + +- if (pid == 0) ++#ifdef UV_USE_SIGCHLD ++ if (pid == 0) /* Not yet exited */ + continue; ++#endif + + if (pid == -1) { + if (errno != ECHILD) + abort(); ++ /* The child died, and we missed it. This probably means someone else ++ * stole the waitpid from us. Handle this by not handling it at all. */ + continue; + } + ++ assert(pid == process->pid); + process->status = status; + QUEUE_REMOVE(&process->queue); + QUEUE_INSERT_TAIL(&pending, &process->queue); +@@ -964,7 +985,7 @@ int uv_spawn(uv_loop_t* loop, + goto error; + } + +-#if !(defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) ++#ifdef UV_USE_SIGCHLD + uv_signal_start(&loop->child_watcher, uv__chld, SIGCHLD); + #endif + +@@ -983,13 +1004,14 @@ int uv_spawn(uv_loop_t* loop, + * fail to open a stdio handle. This ensures we can eventually reap the child + * with waitpid. */ + if (exec_errorno == 0) { +-#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#ifndef UV_USE_SIGCHLD + struct kevent event; + EV_SET(&event, pid, EVFILT_PROC, EV_ADD | EV_ONESHOT, NOTE_EXIT, 0, 0); + if (kevent(loop->backend_fd, &event, 1, NULL, 0, NULL)) { + if (errno != ESRCH) + abort(); + /* Process already exited. Call waitpid on the next loop iteration. */ ++ process->flags |= UV_HANDLE_REAP; + loop->flags |= UV_LOOP_REAP_CHILDREN; + } + #endif +diff --git a/deps/uv/src/uv-common.h b/deps/uv/src/uv-common.h +index 8a190bf8fa8c5a282feaf251aec2a30c95776888..6001b0cf68d0b0268b578218b664a737f43c9521 100644 +--- a/deps/uv/src/uv-common.h ++++ b/deps/uv/src/uv-common.h +@@ -130,7 +130,10 @@ enum { + UV_SIGNAL_ONE_SHOT = 0x02000000, + + /* Only used by uv_poll_t handles. */ +- UV_HANDLE_POLL_SLOW = 0x01000000 ++ UV_HANDLE_POLL_SLOW = 0x01000000, ++ ++ /* Only used by uv_process_t handles. */ ++ UV_HANDLE_REAP = 0x10000000 + }; + + int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap); diff --git a/patches/node/process_monitor_for_exit_with_kqueue_on_bsds_3441.patch b/patches/node/process_monitor_for_exit_with_kqueue_on_bsds_3441.patch new file mode 100644 index 0000000000000..917b589dbd37b --- /dev/null +++ b/patches/node/process_monitor_for_exit_with_kqueue_on_bsds_3441.patch @@ -0,0 +1,170 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Mon, 31 Jan 2022 11:49:22 -0800 +Subject: process: monitor for exit with kqueue on BSDs (#3441) + +This adds a workaround for an xnu kernel bug that sometimes results in +SIGCHLD not being delivered. The workaround is to use kevent to listen +for EVFILT_PROC/NOTE_EXIT events instead of relying on SIGCHLD on *BSD. + +Apple rdar: FB9529664 +Refs: https://github.com/libuv/libuv/pull/3257 + +diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h +index 12d4da93686e993830a7d09e74d08191fc808f4f..16be13b99f5db77741aa276e90a437ef4eb5ba32 100644 +--- a/deps/uv/src/unix/internal.h ++++ b/deps/uv/src/unix/internal.h +@@ -282,6 +282,7 @@ uv_handle_type uv__handle_type(int fd); + FILE* uv__open_file(const char* path); + int uv__getpwuid_r(uv_passwd_t* pwd); + int uv__search_path(const char* prog, char* buf, size_t* buflen); ++void uv__wait_children(uv_loop_t* loop); + + /* random */ + int uv__random_devurandom(void* buf, size_t buflen); +diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c +index bf183d5fdc0ba89913469a294322eef84bc4cee8..35200f17495d80ed2d19ef9f6f76bbc92ee042f6 100644 +--- a/deps/uv/src/unix/kqueue.c ++++ b/deps/uv/src/unix/kqueue.c +@@ -284,6 +284,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { + loop->watchers[loop->nwatchers + 1] = (void*) (uintptr_t) nfds; + for (i = 0; i < nfds; i++) { + ev = events + i; ++ if (ev->filter == EVFILT_PROC) { ++ uv__wait_children(loop); ++ nevents++; ++ continue; ++ } + fd = ev->ident; + /* Skip invalidated events, see uv__platform_invalidate_fd */ + if (fd == -1) +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index f4aebb0490e198cd9adcadfeb6b006de479cc993..cfcba341e0e380ecd595e4b59e39c08a7b374a48 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -48,10 +48,20 @@ extern char **environ; + # include "zos-base.h" + #endif + ++#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#include ++#endif ++ + ++#if !(defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) + static void uv__chld(uv_signal_t* handle, int signum) { ++ assert(signum == SIGCHLD); ++ uv__wait_children(handle->loop); ++} ++#endif ++ ++void uv__wait_children(uv_loop_t* loop) { + uv_process_t* process; +- uv_loop_t* loop; + int exit_status; + int term_signal; + int status; +@@ -60,10 +70,7 @@ static void uv__chld(uv_signal_t* handle, int signum) { + QUEUE* q; + QUEUE* h; + +- assert(signum == SIGCHLD); +- + QUEUE_INIT(&pending); +- loop = handle->loop; + + h = &loop->process_handles; + q = QUEUE_HEAD(h); +@@ -419,7 +426,9 @@ int uv_spawn(uv_loop_t* loop, + if (err) + goto error; + ++#if !(defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) + uv_signal_start(&loop->child_watcher, uv__chld, SIGCHLD); ++#endif + + /* Acquire write lock to prevent opening new fds in worker threads */ + uv_rwlock_wrlock(&loop->cloexec_lock); +@@ -478,6 +487,13 @@ int uv_spawn(uv_loop_t* loop, + + /* Only activate this handle if exec() happened successfully */ + if (exec_errorno == 0) { ++#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++ struct kevent event; ++ EV_SET(&event, pid, EVFILT_PROC, EV_ADD | EV_ONESHOT, NOTE_EXIT, 0, 0); ++ if (kevent(loop->backend_fd, &event, 1, NULL, 0, NULL)) ++ abort(); ++#endif ++ + QUEUE_INSERT_TAIL(&loop->process_handles, &process->queue); + uv__handle_start(process); + } +diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h +index 59b95da9ebe3464bd1f9ce1c534122b1f9e06636..58489c4be7b3a7b36d5b01a1f07d411ef3d99ae3 100644 +--- a/deps/uv/test/test-list.h ++++ b/deps/uv/test/test-list.h +@@ -318,6 +318,7 @@ TEST_DECLARE (spawn_reads_child_path) + TEST_DECLARE (spawn_inherit_streams) + TEST_DECLARE (spawn_quoted_path) + TEST_DECLARE (spawn_tcp_server) ++TEST_DECLARE (spawn_exercise_sigchld_issue) + TEST_DECLARE (fs_poll) + TEST_DECLARE (fs_poll_getpath) + TEST_DECLARE (fs_poll_close_request) +@@ -944,6 +945,7 @@ TASK_LIST_START + TEST_ENTRY (spawn_inherit_streams) + TEST_ENTRY (spawn_quoted_path) + TEST_ENTRY (spawn_tcp_server) ++ TEST_ENTRY (spawn_exercise_sigchld_issue) + TEST_ENTRY (fs_poll) + TEST_ENTRY (fs_poll_getpath) + TEST_ENTRY (fs_poll_close_request) +diff --git a/deps/uv/test/test-spawn.c b/deps/uv/test/test-spawn.c +index 9f2eb24b2d6daf339bec12027134409cfc3b4a82..dfd5458ef37c664af9a55a8383bdb3121885db3b 100644 +--- a/deps/uv/test/test-spawn.c ++++ b/deps/uv/test/test-spawn.c +@@ -1891,6 +1891,44 @@ TEST_IMPL(spawn_quoted_path) { + #endif + } + ++TEST_IMPL(spawn_exercise_sigchld_issue) { ++ int r; ++ int i; ++ uv_process_options_t dummy_options = {0}; ++ uv_process_t dummy_processes[100]; ++ char* args[2]; ++ ++ init_process_options("spawn_helper1", exit_cb); ++ ++ r = uv_spawn(uv_default_loop(), &process, &options); ++ ASSERT_EQ(r, 0); ++ ++ // This test exercises a bug in the darwin kernel that causes SIGCHLD not to ++ // be delivered sometimes. Calling posix_spawn many times increases the ++ // likelihood of encountering this issue, so spin a few times to make this ++ // test more reliable. ++ dummy_options.file = args[0] = "program-that-had-better-not-exist"; ++ args[1] = NULL; ++ dummy_options.args = args; ++ dummy_options.exit_cb = fail_cb; ++ dummy_options.flags = 0; ++ for (i = 0; i < 100; i++) { ++ r = uv_spawn(uv_default_loop(), &dummy_processes[i], &dummy_options); ++ if (r != UV_ENOENT) ++ ASSERT_EQ(r, UV_EACCES); ++ uv_close((uv_handle_t*) &dummy_processes[i], close_cb); ++ } ++ ++ r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); ++ ASSERT_EQ(r, 0); ++ ++ ASSERT_EQ(exit_cb_called, 1); ++ ASSERT_EQ(close_cb_called, 101); ++ ++ MAKE_VALGRIND_HAPPY(); ++ return 0; ++} ++ + /* Helper for child process of spawn_inherit_streams */ + #ifndef _WIN32 + void spawn_stdin_stdout(void) { diff --git a/patches/node/process_only_use_f_dupfd_cloexec_if_it_is_defined_3512.patch b/patches/node/process_only_use_f_dupfd_cloexec_if_it_is_defined_3512.patch new file mode 100644 index 0000000000000..5b525fb18a5f0 --- /dev/null +++ b/patches/node/process_only_use_f_dupfd_cloexec_if_it_is_defined_3512.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jameson Nash +Date: Sat, 5 Mar 2022 12:52:04 -0500 +Subject: process: only use F_DUPFD_CLOEXEC if it is defined (#3512) + +We can save a syscall on most modern systems (required by POSIX 2008), +but not on all systems. + +Also handle errors from CLOEXEC. Even though fcntl does not really +define there to be any, it could theoretically be EBADF if the user +happened to pass a bad file descriptor to the same number fd (such that +no other code happened to already fail on that). + +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index d208f99be40df9f36447552daf2772c1cab1ce79..7705068730cb0536998bad7d304cb87df99b72e8 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -275,9 +275,20 @@ static void uv__process_child_init(const uv_process_options_t* options, + use_fd = pipes[fd][1]; + if (use_fd < 0 || use_fd >= fd) + continue; ++#ifdef F_DUPFD_CLOEXEC /* POSIX 2008 */ + pipes[fd][1] = fcntl(use_fd, F_DUPFD_CLOEXEC, stdio_count); ++#else ++ pipes[fd][1] = fcntl(use_fd, F_DUPFD, stdio_count); ++#endif + if (pipes[fd][1] == -1) + uv__write_errno(error_fd); ++#ifndef F_DUPFD_CLOEXEC /* POSIX 2008 */ ++ n = uv__cloexec_fcntl(pipes[fd][1], 1); ++ if (n) { ++ uv__write_int(error_fd, n); ++ _exit(127); ++ } ++#endif + } + + for (fd = 0; fd < stdio_count; fd++) { +@@ -300,8 +311,13 @@ static void uv__process_child_init(const uv_process_options_t* options, + } + + if (fd == use_fd) { +- if (close_fd == -1) +- uv__cloexec_fcntl(use_fd, 0); ++ if (close_fd == -1) { ++ n = uv__cloexec_fcntl(use_fd, 0); ++ if (n) { ++ uv__write_int(error_fd, n); ++ _exit(127); ++ } ++ } + } + else { + fd = dup2(use_fd, fd); diff --git a/patches/node/process_reset_the_signal_mask_if_the_fork_fails_3537.patch b/patches/node/process_reset_the_signal_mask_if_the_fork_fails_3537.patch new file mode 100644 index 0000000000000..e0cd88c292b7e --- /dev/null +++ b/patches/node/process_reset_the_signal_mask_if_the_fork_fails_3537.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jameson Nash +Date: Fri, 11 Mar 2022 12:05:24 -0500 +Subject: process: reset the signal mask if the fork fails (#3537) + +Fix a regression that sneaked into posix spawn changes. + +Refs: https://github.com/libuv/libuv/pull/3257 + +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index b85aa3b94edd040952e0d350a47a38d9ba8a67d3..d208f99be40df9f36447552daf2772c1cab1ce79 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -790,11 +790,6 @@ static int uv__spawn_and_init_child_fork(const uv_process_options_t* options, + + *pid = fork(); + +- if (*pid == -1) { +- /* Failed to fork */ +- return UV__ERR(errno); +- } +- + if (*pid == 0) { + /* Fork succeeded, in the child process */ + uv__process_child_init(options, stdio_count, pipes, error_fd); +@@ -804,6 +799,10 @@ static int uv__spawn_and_init_child_fork(const uv_process_options_t* options, + if (pthread_sigmask(SIG_SETMASK, &sigoldset, NULL) != 0) + abort(); + ++ if (*pid == -1) ++ /* Failed to fork */ ++ return UV__ERR(errno); ++ + /* Fork succeeded, in the parent process */ + return 0; + } diff --git a/patches/node/process_simplify_uv_write_int_calls_3519.patch b/patches/node/process_simplify_uv_write_int_calls_3519.patch new file mode 100644 index 0000000000000..201c9c949d49a --- /dev/null +++ b/patches/node/process_simplify_uv_write_int_calls_3519.patch @@ -0,0 +1,63 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jameson Nash +Date: Mon, 7 Mar 2022 17:07:49 -0500 +Subject: process: simplify uv__write_int calls (#3519) + +Refs https://github.com/libuv/libuv/pull/3519 + +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index b6f9756c6a6710f5f10762b9299cc35047b98097..8cde389b826b6b167437845eccd5fed440dcadc4 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -216,16 +216,14 @@ static void uv__write_int(int fd, int val) { + n = write(fd, &val, sizeof(val)); + while (n == -1 && errno == EINTR); + +- if (n == -1 && errno == EPIPE) +- return; /* parent process has quit */ +- +- assert(n == sizeof(val)); ++ /* The write might have failed (e.g. if the parent process has died), ++ * but we have nothing left but to _exit ourself now too. */ ++ _exit(127); + } + + + static void uv__write_errno(int error_fd) { + uv__write_int(error_fd, UV__ERR(errno)); +- _exit(127); + } + + +@@ -284,10 +282,8 @@ static void uv__process_child_init(const uv_process_options_t* options, + uv__write_errno(error_fd); + #ifndef F_DUPFD_CLOEXEC /* POSIX 2008 */ + n = uv__cloexec(pipes[fd][1], 1); +- if (n) { ++ if (n) + uv__write_int(error_fd, n); +- _exit(127); +- } + #endif + } + +@@ -313,10 +309,8 @@ static void uv__process_child_init(const uv_process_options_t* options, + if (fd == use_fd) { + if (close_fd == -1) { + n = uv__cloexec(use_fd, 0); +- if (n) { ++ if (n) + uv__write_int(error_fd, n); +- _exit(127); +- } + } + } + else { +@@ -368,7 +362,6 @@ static void uv__process_child_init(const uv_process_options_t* options, + #endif + + uv__write_errno(error_fd); +- abort(); + } + #endif + diff --git a/patches/node/reland_macos_use_posix_spawn_instead_of_fork_3257.patch b/patches/node/reland_macos_use_posix_spawn_instead_of_fork_3257.patch new file mode 100644 index 0000000000000..cccbbf11736e0 --- /dev/null +++ b/patches/node/reland_macos_use_posix_spawn_instead_of_fork_3257.patch @@ -0,0 +1,889 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jameson Nash +Date: Wed, 2 Mar 2022 15:15:39 -0500 +Subject: Reland "macos: use posix_spawn instead of fork" (#3257) + +Fixes: https://github.com/libuv/libuv/issues/3050 +Refs: https://github.com/libuv/libuv/issues/3086 +Refs: https://github.com/libuv/libuv/pull/3064 +Refs: https://github.com/libuv/libuv/pull/3107 +Refs: https://github.com/libuv/libuv/pull/3064 + +This reverts commit 217fdf4265589889d00c7c0622fde2710971a020, then fixes +several issues with it: + +* remove error fast-cleanup code that triggers a nodejs bug + +Refs: https://github.com/libuv/libuv/pull/3107#issuecomment-782482608 + +* protect posix_spawn from EINTR + +This is not a documented valid error, but seems to have been observed. + +* ignore setuid/setgid syscall + +This kernel function is not permitted unless the process is setuid root, +so disable this syscall. Falling back to fork/exec should be okay for +the rare cases that the user decides they need to do setuid(getuid()) or +setuid(geteuid()) for the child. + +Refs: https://github.com/libuv/libuv/pull/3107#issuecomment-782482608 + +* improve posix_spawn path search + +Ports the improvements in musl back to this function + +* fix some additional problems and formatting issues + +We previously might fail to start a watcher, in rare failure cases, +resulting in a zombie that we would fail to kill. Also avoid creating +the signal-pipe unless required (addresses a review comment from Apple) + +* fix fd->fd mapping reuse + +There was a chance that when duplicating the fd's into stdio_count+fd we +might be closing a currently opened fd with that value. + +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index 2920b942962357827bae9bcad23af8333e8b007f..b85aa3b94edd040952e0d350a47a38d9ba8a67d3 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -35,8 +36,21 @@ + #include + + #if defined(__APPLE__) && !TARGET_OS_IPHONE ++# include ++# include ++# include ++# include ++# include ++# include + # include ++# include + # define environ (*_NSGetEnviron()) ++ ++/* macOS 10.14 back does not define this constant */ ++# ifndef POSIX_SPAWN_SETSID ++# define POSIX_SPAWN_SETSID 1024 ++# endif ++ + #else + extern char **environ; + #endif +@@ -261,22 +275,22 @@ static void uv__process_child_init(const uv_process_options_t* options, + use_fd = pipes[fd][1]; + if (use_fd < 0 || use_fd >= fd) + continue; +- pipes[fd][1] = fcntl(use_fd, F_DUPFD, stdio_count); ++ pipes[fd][1] = fcntl(use_fd, F_DUPFD_CLOEXEC, stdio_count); + if (pipes[fd][1] == -1) + uv__write_errno(error_fd); + } + + for (fd = 0; fd < stdio_count; fd++) { +- close_fd = pipes[fd][0]; ++ close_fd = -1; + use_fd = pipes[fd][1]; + + if (use_fd < 0) { + if (fd >= 3) + continue; + else { +- /* redirect stdin, stdout and stderr to /dev/null even if UV_IGNORE is +- * set +- */ ++ /* Redirect stdin, stdout and stderr to /dev/null even if UV_IGNORE is ++ * set. */ ++ uv__close_nocheckstdio(fd); /* Free up fd, if it happens to be open. */ + use_fd = open("/dev/null", fd == 0 ? O_RDONLY : O_RDWR); + close_fd = use_fd; + +@@ -285,28 +299,24 @@ static void uv__process_child_init(const uv_process_options_t* options, + } + } + +- if (fd == use_fd) +- uv__cloexec_fcntl(use_fd, 0); +- else ++ if (fd == use_fd) { ++ if (close_fd == -1) ++ uv__cloexec_fcntl(use_fd, 0); ++ } ++ else { + fd = dup2(use_fd, fd); ++ } + + if (fd == -1) + uv__write_errno(error_fd); + +- if (fd <= 2) ++ if (fd <= 2 && close_fd == -1) + uv__nonblock_fcntl(fd, 0); + + if (close_fd >= stdio_count) + uv__close(close_fd); + } + +- for (fd = 0; fd < stdio_count; fd++) { +- use_fd = pipes[fd][1]; +- +- if (use_fd >= stdio_count) +- uv__close(use_fd); +- } +- + if (options->cwd != NULL && chdir(options->cwd)) + uv__write_errno(error_fd); + +@@ -327,9 +337,8 @@ static void uv__process_child_init(const uv_process_options_t* options, + if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid)) + uv__write_errno(error_fd); + +- if (options->env != NULL) { ++ if (options->env != NULL) + environ = options->env; +- } + + /* Reset signal mask just before exec. */ + sigemptyset(&signewset); +@@ -348,6 +357,562 @@ static void uv__process_child_init(const uv_process_options_t* options, + #endif + + ++#if defined(__APPLE__) ++typedef struct uv__posix_spawn_fncs_tag { ++ struct { ++ int (*addchdir_np)(const posix_spawn_file_actions_t *, const char *); ++ } file_actions; ++} uv__posix_spawn_fncs_t; ++ ++ ++static uv_once_t posix_spawn_init_once = UV_ONCE_INIT; ++static uv__posix_spawn_fncs_t posix_spawn_fncs; ++static int posix_spawn_can_use_setsid; ++ ++ ++static void uv__spawn_init_posix_spawn_fncs(void) { ++ /* Try to locate all non-portable functions at runtime */ ++ posix_spawn_fncs.file_actions.addchdir_np = ++ dlsym(RTLD_DEFAULT, "posix_spawn_file_actions_addchdir_np"); ++} ++ ++ ++static void uv__spawn_init_can_use_setsid(void) { ++ static const int MACOS_CATALINA_VERSION_MAJOR = 19; ++ char version_str[256]; ++ char* version_major_str; ++ size_t version_str_size = 256; ++ int r; ++ int version_major; ++ ++ /* Get a version string */ ++ r = sysctlbyname("kern.osrelease", version_str, &version_str_size, NULL, 0); ++ if (r != 0) ++ return; ++ ++ /* Try to get the major version number. If not found ++ * fall back to the fork/exec flow */ ++ version_major_str = strtok(version_str, "."); ++ if (version_major_str == NULL) ++ return; ++ ++ /* Parse the version major as a number. If it is greater than ++ * the major version for macOS Catalina (aka macOS 10.15), then ++ * the POSIX_SPAWN_SETSID flag is available */ ++ version_major = atoi_l(version_major_str, NULL); /* Use LC_C_LOCALE */ ++ if (version_major >= MACOS_CATALINA_VERSION_MAJOR) ++ posix_spawn_can_use_setsid = 1; ++} ++ ++ ++static void uv__spawn_init_posix_spawn(void) { ++ /* Init handles to all potentially non-defined functions */ ++ uv__spawn_init_posix_spawn_fncs(); ++ ++ /* Init feature detection for POSIX_SPAWN_SETSID flag */ ++ uv__spawn_init_can_use_setsid(); ++} ++ ++ ++static int uv__spawn_set_posix_spawn_attrs( ++ posix_spawnattr_t* attrs, ++ const uv__posix_spawn_fncs_t* posix_spawn_fncs, ++ const uv_process_options_t* options) { ++ int err; ++ unsigned int flags; ++ sigset_t signal_set; ++ ++ err = posix_spawnattr_init(attrs); ++ if (err != 0) { ++ /* If initialization fails, no need to de-init, just return */ ++ return err; ++ } ++ ++ if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) { ++ /* kauth_cred_issuser currently requires exactly uid == 0 for these ++ * posixspawn_attrs (set_groups_np, setuid_np, setgid_np), which deviates ++ * from the normal specification of setuid (which also uses euid), and they ++ * are also undocumented syscalls, so we do not use them. */ ++ err = ENOSYS; ++ goto error; ++ } ++ ++ /* Set flags for spawn behavior ++ * 1) POSIX_SPAWN_CLOEXEC_DEFAULT: (Apple Extension) All descriptors in the ++ * parent will be treated as if they had been created with O_CLOEXEC. The ++ * only fds that will be passed on to the child are those manipulated by ++ * the file actions ++ * 2) POSIX_SPAWN_SETSIGDEF: Signals mentioned in spawn-sigdefault in the ++ * spawn attributes will be reset to behave as their default ++ * 3) POSIX_SPAWN_SETSIGMASK: Signal mask will be set to the value of ++ * spawn-sigmask in attributes ++ * 4) POSIX_SPAWN_SETSID: Make the process a new session leader if a detached ++ * session was requested. */ ++ flags = POSIX_SPAWN_CLOEXEC_DEFAULT | ++ POSIX_SPAWN_SETSIGDEF | ++ POSIX_SPAWN_SETSIGMASK; ++ if (options->flags & UV_PROCESS_DETACHED) { ++ /* If running on a version of macOS where this flag is not supported, ++ * revert back to the fork/exec flow. Otherwise posix_spawn will ++ * silently ignore the flag. */ ++ if (!posix_spawn_can_use_setsid) { ++ err = ENOSYS; ++ goto error; ++ } ++ ++ flags |= POSIX_SPAWN_SETSID; ++ } ++ err = posix_spawnattr_setflags(attrs, flags); ++ if (err != 0) ++ goto error; ++ ++ /* Reset all signal the child to their default behavior */ ++ sigfillset(&signal_set); ++ err = posix_spawnattr_setsigdefault(attrs, &signal_set); ++ if (err != 0) ++ goto error; ++ ++ /* Reset the signal mask for all signals */ ++ sigemptyset(&signal_set); ++ err = posix_spawnattr_setsigmask(attrs, &signal_set); ++ if (err != 0) ++ goto error; ++ ++ return err; ++ ++error: ++ (void) posix_spawnattr_destroy(attrs); ++ return err; ++} ++ ++ ++static int uv__spawn_set_posix_spawn_file_actions( ++ posix_spawn_file_actions_t* actions, ++ const uv__posix_spawn_fncs_t* posix_spawn_fncs, ++ const uv_process_options_t* options, ++ int stdio_count, ++ int (*pipes)[2]) { ++ int fd; ++ int fd2; ++ int use_fd; ++ int err; ++ ++ err = posix_spawn_file_actions_init(actions); ++ if (err != 0) { ++ /* If initialization fails, no need to de-init, just return */ ++ return err; ++ } ++ ++ /* Set the current working directory if requested */ ++ if (options->cwd != NULL) { ++ if (posix_spawn_fncs->file_actions.addchdir_np == NULL) { ++ err = ENOSYS; ++ goto error; ++ } ++ ++ err = posix_spawn_fncs->file_actions.addchdir_np(actions, options->cwd); ++ if (err != 0) ++ goto error; ++ } ++ ++ /* Do not return ENOSYS after this point, as we may mutate pipes. */ ++ ++ /* First duplicate low numbered fds, since it's not safe to duplicate them, ++ * they could get replaced. Example: swapping stdout and stderr; without ++ * this fd 2 (stderr) would be duplicated into fd 1, thus making both ++ * stdout and stderr go to the same fd, which was not the intention. */ ++ for (fd = 0; fd < stdio_count; fd++) { ++ use_fd = pipes[fd][1]; ++ if (use_fd < 0 || use_fd >= fd) ++ continue; ++ use_fd = stdio_count; ++ for (fd2 = 0; fd2 < stdio_count; fd2++) { ++ /* If we were not setting POSIX_SPAWN_CLOEXEC_DEFAULT, we would need to ++ * also consider whether fcntl(fd, F_GETFD) returned without the ++ * FD_CLOEXEC flag set. */ ++ if (pipes[fd2][1] == use_fd) { ++ use_fd++; ++ fd2 = 0; ++ } ++ } ++ err = posix_spawn_file_actions_adddup2( ++ actions, ++ pipes[fd][1], ++ use_fd); ++ assert(err != ENOSYS); ++ if (err != 0) ++ goto error; ++ pipes[fd][1] = use_fd; ++ } ++ ++ /* Second, move the descriptors into their respective places */ ++ for (fd = 0; fd < stdio_count; fd++) { ++ use_fd = pipes[fd][1]; ++ if (use_fd < 0) { ++ if (fd >= 3) ++ continue; ++ else { ++ /* If ignored, redirect to (or from) /dev/null, */ ++ err = posix_spawn_file_actions_addopen( ++ actions, ++ fd, ++ "/dev/null", ++ fd == 0 ? O_RDONLY : O_RDWR, ++ 0); ++ assert(err != ENOSYS); ++ if (err != 0) ++ goto error; ++ continue; ++ } ++ } ++ ++ if (fd == use_fd) ++ err = posix_spawn_file_actions_addinherit_np(actions, fd); ++ else ++ err = posix_spawn_file_actions_adddup2(actions, use_fd, fd); ++ assert(err != ENOSYS); ++ if (err != 0) ++ goto error; ++ ++ /* Make sure the fd is marked as non-blocking (state shared between child ++ * and parent). */ ++ uv__nonblock_fcntl(use_fd, 0); ++ } ++ ++ /* Finally, close all the superfluous descriptors */ ++ for (fd = 0; fd < stdio_count; fd++) { ++ use_fd = pipes[fd][1]; ++ if (use_fd < stdio_count) ++ continue; ++ ++ /* Check if we already closed this. */ ++ for (fd2 = 0; fd2 < fd; fd2++) { ++ if (pipes[fd2][1] == use_fd) ++ break; ++ } ++ if (fd2 < fd) ++ continue; ++ ++ err = posix_spawn_file_actions_addclose(actions, use_fd); ++ assert(err != ENOSYS); ++ if (err != 0) ++ goto error; ++ } ++ ++ return 0; ++ ++error: ++ (void) posix_spawn_file_actions_destroy(actions); ++ return err; ++} ++ ++char* uv__spawn_find_path_in_env(char** env) { ++ char** env_iterator; ++ const char path_var[] = "PATH="; ++ ++ /* Look for an environment variable called PATH in the ++ * provided env array, and return its value if found */ ++ for (env_iterator = env; *env_iterator != NULL; env_iterator++) { ++ if (strncmp(*env_iterator, path_var, sizeof(path_var) - 1) == 0) { ++ /* Found "PATH=" at the beginning of the string */ ++ return *env_iterator + sizeof(path_var) - 1; ++ } ++ } ++ ++ return NULL; ++} ++ ++ ++static int uv__spawn_resolve_and_spawn(const uv_process_options_t* options, ++ posix_spawnattr_t* attrs, ++ posix_spawn_file_actions_t* actions, ++ pid_t* pid) { ++ const char *p; ++ const char *z; ++ const char *path; ++ size_t l; ++ size_t k; ++ int err; ++ int seen_eacces; ++ ++ path = NULL; ++ err = -1; ++ seen_eacces = 0; ++ ++ /* Short circuit for erroneous case */ ++ if (options->file == NULL) ++ return ENOENT; ++ ++ /* The environment for the child process is that of the parent unless overriden ++ * by options->env */ ++ char** env = environ; ++ if (options->env != NULL) ++ env = options->env; ++ ++ /* If options->file contains a slash, posix_spawn/posix_spawnp behave ++ * the same, and don't involve PATH resolution at all. Otherwise, if ++ * options->file does not include a slash, but no custom environment is ++ * to be used, the environment used for path resolution as well for the ++ * child process is that of the parent process, so posix_spawnp is the ++ * way to go. */ ++ if (strchr(options->file, '/') != NULL || options->env == NULL) { ++ do ++ err = posix_spawnp(pid, options->file, actions, attrs, options->args, env); ++ while (err == EINTR); ++ return err; ++ } ++ ++ /* Look for the definition of PATH in the provided env */ ++ path = uv__spawn_find_path_in_env(options->env); ++ ++ /* The following resolution logic (execvpe emulation) is copied from ++ * https://git.musl-libc.org/cgit/musl/tree/src/process/execvp.c ++ * and adapted to work for our specific usage */ ++ ++ /* If no path was provided in options->env, use the default value ++ * to look for the executable */ ++ if (path == NULL) ++ path = _PATH_DEFPATH; ++ ++ k = strnlen(options->file, NAME_MAX + 1); ++ if (k > NAME_MAX) ++ return ENAMETOOLONG; ++ ++ l = strnlen(path, PATH_MAX - 1) + 1; ++ ++ for (p = path;; p = z) { ++ /* Compose the new process file from the entry in the PATH ++ * environment variable and the actual file name */ ++ char b[PATH_MAX + NAME_MAX]; ++ z = strchr(p, ':'); ++ if (!z) ++ z = p + strlen(p); ++ if ((size_t)(z - p) >= l) { ++ if (!*z++) ++ break; ++ ++ continue; ++ } ++ memcpy(b, p, z - p); ++ b[z - p] = '/'; ++ memcpy(b + (z - p) + (z > p), options->file, k + 1); ++ ++ /* Try to spawn the new process file. If it fails with ENOENT, the ++ * new process file is not in this PATH entry, continue with the next ++ * PATH entry. */ ++ do ++ err = posix_spawn(pid, b, actions, attrs, options->args, env); ++ while (err == EINTR); ++ ++ switch (err) { ++ case EACCES: ++ seen_eacces = 1; ++ break; /* continue search */ ++ case ENOENT: ++ case ENOTDIR: ++ break; /* continue search */ ++ default: ++ return err; ++ } ++ ++ if (!*z++) ++ break; ++ } ++ ++ if (seen_eacces) ++ return EACCES; ++ return err; ++} ++ ++ ++static int uv__spawn_and_init_child_posix_spawn( ++ const uv_process_options_t* options, ++ int stdio_count, ++ int (*pipes)[2], ++ pid_t* pid, ++ const uv__posix_spawn_fncs_t* posix_spawn_fncs) { ++ int err; ++ posix_spawnattr_t attrs; ++ posix_spawn_file_actions_t actions; ++ ++ err = uv__spawn_set_posix_spawn_attrs(&attrs, posix_spawn_fncs, options); ++ if (err != 0) ++ goto error; ++ ++ /* This may mutate pipes. */ ++ err = uv__spawn_set_posix_spawn_file_actions(&actions, ++ posix_spawn_fncs, ++ options, ++ stdio_count, ++ pipes); ++ if (err != 0) { ++ (void) posix_spawnattr_destroy(&attrs); ++ goto error; ++ } ++ ++ /* Try to spawn options->file resolving in the provided environment ++ * if any */ ++ err = uv__spawn_resolve_and_spawn(options, &attrs, &actions, pid); ++ assert(err != ENOSYS); ++ ++ /* Destroy the actions/attributes */ ++ (void) posix_spawn_file_actions_destroy(&actions); ++ (void) posix_spawnattr_destroy(&attrs); ++ ++error: ++ /* In an error situation, the attributes and file actions are ++ * already destroyed, only the happy path requires cleanup */ ++ return UV__ERR(err); ++} ++#endif ++ ++static int uv__spawn_and_init_child_fork(const uv_process_options_t* options, ++ int stdio_count, ++ int (*pipes)[2], ++ int error_fd, ++ pid_t* pid) { ++ sigset_t signewset; ++ sigset_t sigoldset; ++ ++ /* Start the child with most signals blocked, to avoid any issues before we ++ * can reset them, but allow program failures to exit (and not hang). */ ++ sigfillset(&signewset); ++ sigdelset(&signewset, SIGKILL); ++ sigdelset(&signewset, SIGSTOP); ++ sigdelset(&signewset, SIGTRAP); ++ sigdelset(&signewset, SIGSEGV); ++ sigdelset(&signewset, SIGBUS); ++ sigdelset(&signewset, SIGILL); ++ sigdelset(&signewset, SIGSYS); ++ sigdelset(&signewset, SIGABRT); ++ if (pthread_sigmask(SIG_BLOCK, &signewset, &sigoldset) != 0) ++ abort(); ++ ++ *pid = fork(); ++ ++ if (*pid == -1) { ++ /* Failed to fork */ ++ return UV__ERR(errno); ++ } ++ ++ if (*pid == 0) { ++ /* Fork succeeded, in the child process */ ++ uv__process_child_init(options, stdio_count, pipes, error_fd); ++ abort(); ++ } ++ ++ if (pthread_sigmask(SIG_SETMASK, &sigoldset, NULL) != 0) ++ abort(); ++ ++ /* Fork succeeded, in the parent process */ ++ return 0; ++} ++ ++static int uv__spawn_and_init_child( ++ uv_loop_t* loop, ++ const uv_process_options_t* options, ++ int stdio_count, ++ int (*pipes)[2], ++ pid_t* pid) { ++ int signal_pipe[2] = { -1, -1 }; ++ int status; ++ int err; ++ int exec_errorno; ++ ssize_t r; ++ ++#if defined(__APPLE__) ++ uv_once(&posix_spawn_init_once, uv__spawn_init_posix_spawn); ++ ++ /* Special child process spawn case for macOS Big Sur (11.0) onwards ++ * ++ * Big Sur introduced a significant performance degradation on a call to ++ * fork/exec when the process has many pages mmaped in with MAP_JIT, like, say ++ * a javascript interpreter. Electron-based applications, for example, ++ * are impacted; though the magnitude of the impact depends on how much the ++ * app relies on subprocesses. ++ * ++ * On macOS, though, posix_spawn is implemented in a way that does not ++ * exhibit the problem. This block implements the forking and preparation ++ * logic with posix_spawn and its related primitives. It also takes advantage of ++ * the macOS extension POSIX_SPAWN_CLOEXEC_DEFAULT that makes impossible to ++ * leak descriptors to the child process. */ ++ err = uv__spawn_and_init_child_posix_spawn(options, ++ stdio_count, ++ pipes, ++ pid, ++ &posix_spawn_fncs); ++ ++ /* The posix_spawn flow will return UV_ENOSYS if any of the posix_spawn_x_np ++ * non-standard functions is both _needed_ and _undefined_. In those cases, ++ * default back to the fork/execve strategy. For all other errors, just fail. */ ++ if (err != UV_ENOSYS) ++ return err; ++ ++#endif ++ ++ /* This pipe is used by the parent to wait until ++ * the child has called `execve()`. We need this ++ * to avoid the following race condition: ++ * ++ * if ((pid = fork()) > 0) { ++ * kill(pid, SIGTERM); ++ * } ++ * else if (pid == 0) { ++ * execve("/bin/cat", argp, envp); ++ * } ++ * ++ * The parent sends a signal immediately after forking. ++ * Since the child may not have called `execve()` yet, ++ * there is no telling what process receives the signal, ++ * our fork or /bin/cat. ++ * ++ * To avoid ambiguity, we create a pipe with both ends ++ * marked close-on-exec. Then, after the call to `fork()`, ++ * the parent polls the read end until it EOFs or errors with EPIPE. ++ */ ++ err = uv__make_pipe(signal_pipe, 0); ++ if (err) ++ return err; ++ ++ /* Acquire write lock to prevent opening new fds in worker threads */ ++ uv_rwlock_wrlock(&loop->cloexec_lock); ++ ++ err = uv__spawn_and_init_child_fork(options, stdio_count, pipes, signal_pipe[1], pid); ++ ++ /* Release lock in parent process */ ++ uv_rwlock_wrunlock(&loop->cloexec_lock); ++ ++ uv__close(signal_pipe[1]); ++ ++ if (err == 0) { ++ do ++ r = read(signal_pipe[0], &exec_errorno, sizeof(exec_errorno)); ++ while (r == -1 && errno == EINTR); ++ ++ if (r == 0) ++ ; /* okay, EOF */ ++ else if (r == sizeof(exec_errorno)) { ++ do ++ err = waitpid(*pid, &status, 0); /* okay, read errorno */ ++ while (err == -1 && errno == EINTR); ++ assert(err == *pid); ++ err = exec_errorno; ++ } else if (r == -1 && errno == EPIPE) { ++ /* Something unknown happened to our child before spawn */ ++ do ++ err = waitpid(*pid, &status, 0); /* okay, got EPIPE */ ++ while (err == -1 && errno == EINTR); ++ assert(err == *pid); ++ err = UV_EPIPE; ++ } else ++ abort(); ++ } ++ ++ uv__close_nocheckstdio(signal_pipe[0]); ++ ++ return err; ++} ++ + int uv_spawn(uv_loop_t* loop, + uv_process_t* process, + const uv_process_options_t* options) { +@@ -355,18 +920,13 @@ int uv_spawn(uv_loop_t* loop, + /* fork is marked __WATCHOS_PROHIBITED __TVOS_PROHIBITED. */ + return UV_ENOSYS; + #else +- sigset_t signewset; +- sigset_t sigoldset; +- int signal_pipe[2] = { -1, -1 }; + int pipes_storage[8][2]; + int (*pipes)[2]; + int stdio_count; +- ssize_t r; + pid_t pid; + int err; + int exec_errorno; + int i; +- int status; + + assert(options->file != NULL); + assert(!(options->flags & ~(UV_PROCESS_DETACHED | +@@ -379,6 +939,7 @@ int uv_spawn(uv_loop_t* loop, + + uv__handle_init(loop, (uv_handle_t*)process, UV_PROCESS); + QUEUE_INIT(&process->queue); ++ process->status = 0; + + stdio_count = options->stdio_count; + if (stdio_count < 3) +@@ -403,106 +964,24 @@ int uv_spawn(uv_loop_t* loop, + goto error; + } + +- /* This pipe is used by the parent to wait until +- * the child has called `execve()`. We need this +- * to avoid the following race condition: +- * +- * if ((pid = fork()) > 0) { +- * kill(pid, SIGTERM); +- * } +- * else if (pid == 0) { +- * execve("/bin/cat", argp, envp); +- * } +- * +- * The parent sends a signal immediately after forking. +- * Since the child may not have called `execve()` yet, +- * there is no telling what process receives the signal, +- * our fork or /bin/cat. +- * +- * To avoid ambiguity, we create a pipe with both ends +- * marked close-on-exec. Then, after the call to `fork()`, +- * the parent polls the read end until it EOFs or errors with EPIPE. +- */ +- err = uv__make_pipe(signal_pipe, 0); +- if (err) +- goto error; +- + #if !(defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) + uv_signal_start(&loop->child_watcher, uv__chld, SIGCHLD); + #endif + +- /* Acquire write lock to prevent opening new fds in worker threads */ +- uv_rwlock_wrlock(&loop->cloexec_lock); +- +- /* Start the child with most signals blocked, to avoid any issues before we +- * can reset them, but allow program failures to exit (and not hang). */ +- sigfillset(&signewset); +- sigdelset(&signewset, SIGKILL); +- sigdelset(&signewset, SIGSTOP); +- sigdelset(&signewset, SIGTRAP); +- sigdelset(&signewset, SIGSEGV); +- sigdelset(&signewset, SIGBUS); +- sigdelset(&signewset, SIGILL); +- sigdelset(&signewset, SIGSYS); +- sigdelset(&signewset, SIGABRT); +- if (pthread_sigmask(SIG_BLOCK, &signewset, &sigoldset) != 0) +- abort(); +- +- pid = fork(); +- if (pid == -1) +- err = UV__ERR(errno); +- +- if (pid == 0) +- uv__process_child_init(options, stdio_count, pipes, signal_pipe[1]); ++ /* Spawn the child */ ++ exec_errorno = uv__spawn_and_init_child(loop, options, stdio_count, pipes, &pid); + +- if (pthread_sigmask(SIG_SETMASK, &sigoldset, NULL) != 0) +- abort(); +- +- /* Release lock in parent process */ +- uv_rwlock_wrunlock(&loop->cloexec_lock); +- +- uv__close(signal_pipe[1]); +- +- if (pid == -1) { +- uv__close(signal_pipe[0]); +- goto error; +- } +- +- process->status = 0; +- exec_errorno = 0; +- do +- r = read(signal_pipe[0], &exec_errorno, sizeof(exec_errorno)); +- while (r == -1 && errno == EINTR); +- +- if (r == 0) +- ; /* okay, EOF */ +- else if (r == sizeof(exec_errorno)) { +- do +- err = waitpid(pid, &status, 0); /* okay, read errorno */ +- while (err == -1 && errno == EINTR); +- assert(err == pid); +- } else if (r == -1 && errno == EPIPE) { +- do +- err = waitpid(pid, &status, 0); /* okay, got EPIPE */ +- while (err == -1 && errno == EINTR); +- assert(err == pid); +- } else +- abort(); +- +- uv__close_nocheckstdio(signal_pipe[0]); +- +- for (i = 0; i < options->stdio_count; i++) { +- err = uv__process_open_stream(options->stdio + i, pipes[i]); +- if (err == 0) +- continue; +- +- while (i--) +- uv__process_close_stream(options->stdio + i); +- +- goto error; +- } ++#if 0 ++ /* This runs into a nodejs issue (it expects initialized streams, even if the ++ * exec failed). ++ * See https://github.com/libuv/libuv/pull/3107#issuecomment-782482608 */ ++ if (exec_errorno != 0) ++ goto error; ++#endif + +- /* Only activate this handle if exec() happened successfully */ ++ /* Activate this handle if exec() happened successfully, even if we later ++ * fail to open a stdio handle. This ensures we can eventually reap the child ++ * with waitpid. */ + if (exec_errorno == 0) { + #if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + struct kevent event; +@@ -515,12 +994,22 @@ int uv_spawn(uv_loop_t* loop, + } + #endif + ++ process->pid = pid; ++ process->exit_cb = options->exit_cb; + QUEUE_INSERT_TAIL(&loop->process_handles, &process->queue); + uv__handle_start(process); + } + +- process->pid = pid; +- process->exit_cb = options->exit_cb; ++ for (i = 0; i < options->stdio_count; i++) { ++ err = uv__process_open_stream(options->stdio + i, pipes[i]); ++ if (err == 0) ++ continue; ++ ++ while (i--) ++ uv__process_close_stream(options->stdio + i); ++ ++ goto error; ++ } + + if (pipes != pipes_storage) + uv__free(pipes); diff --git a/patches/node/unix_protect_fork_in_uv_spawn_from_signals.patch b/patches/node/unix_protect_fork_in_uv_spawn_from_signals.patch new file mode 100644 index 0000000000000..e8f06d17973e6 --- /dev/null +++ b/patches/node/unix_protect_fork_in_uv_spawn_from_signals.patch @@ -0,0 +1,173 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jameson Nash +Date: Thu, 29 Jul 2021 12:09:51 -0400 +Subject: unix: protect fork in uv_spawn from signals + +Years ago, we found that various kernels (linux, macOS) were known to +fail if they try to deliver a signal during this syscall, so we prevent +that from happening. They may have fixed those issues, but it is +generally just a bad time for signals to arrive (glibc blocks them here, +for example, including some more internal ones that it won't let us +touch here). + +We try to be a bit conservative, and leave many signals unblocked which +could happen during normal execution and should terminate the process if +they do. There is a small race window after the child starts before we +clear the old handlers, if the user was to send an fake signal from +elsewhere, but that should be quite unlikely. + +PR-URL: https://github.com/libuv/libuv/pull/3251 +Reviewed-By: Ben Noordhuis + +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index cfcba341e0e380ecd595e4b59e39c08a7b374a48..c1f6bd4b0076f0835caf83c45a6a896e7ae5def9 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -223,13 +224,32 @@ static void uv__process_child_init(const uv_process_options_t* options, + int stdio_count, + int (*pipes)[2], + int error_fd) { +- sigset_t set; ++ sigset_t signewset; + int close_fd; + int use_fd; +- int err; + int fd; + int n; + ++ /* Reset signal disposition first. Use a hard-coded limit because NSIG is not ++ * fixed on Linux: it's either 32, 34 or 64, depending on whether RT signals ++ * are enabled. We are not allowed to touch RT signal handlers, glibc uses ++ * them internally. ++ */ ++ for (n = 1; n < 32; n += 1) { ++ if (n == SIGKILL || n == SIGSTOP) ++ continue; /* Can't be changed. */ ++ ++#if defined(__HAIKU__) ++ if (n == SIGKILLTHR) ++ continue; /* Can't be changed. */ ++#endif ++ ++ if (SIG_ERR != signal(n, SIG_DFL)) ++ continue; ++ ++ uv__write_errno(error_fd); ++ } ++ + if (options->flags & UV_PROCESS_DETACHED) + setsid(); + +@@ -311,32 +331,10 @@ static void uv__process_child_init(const uv_process_options_t* options, + environ = options->env; + } + +- /* Reset signal disposition. Use a hard-coded limit because NSIG +- * is not fixed on Linux: it's either 32, 34 or 64, depending on +- * whether RT signals are enabled. We are not allowed to touch +- * RT signal handlers, glibc uses them internally. +- */ +- for (n = 1; n < 32; n += 1) { +- if (n == SIGKILL || n == SIGSTOP) +- continue; /* Can't be changed. */ +- +-#if defined(__HAIKU__) +- if (n == SIGKILLTHR) +- continue; /* Can't be changed. */ +-#endif +- +- if (SIG_ERR != signal(n, SIG_DFL)) +- continue; +- +- uv__write_errno(error_fd); +- } +- +- /* Reset signal mask. */ +- sigemptyset(&set); +- err = pthread_sigmask(SIG_SETMASK, &set, NULL); +- +- if (err != 0) +- uv__write_errno(error_fd); ++ /* Reset signal mask just before exec. */ ++ sigemptyset(&signewset); ++ if (sigprocmask(SIG_SETMASK, &signewset, NULL) != 0) ++ abort(); + + #ifdef __MVS__ + execvpe(options->file, options->args, environ); +@@ -345,6 +343,7 @@ static void uv__process_child_init(const uv_process_options_t* options, + #endif + + uv__write_errno(error_fd); ++ abort(); + } + #endif + +@@ -356,6 +355,8 @@ int uv_spawn(uv_loop_t* loop, + /* fork is marked __WATCHOS_PROHIBITED __TVOS_PROHIBITED. */ + return UV_ENOSYS; + #else ++ sigset_t signewset; ++ sigset_t sigoldset; + int signal_pipe[2] = { -1, -1 }; + int pipes_storage[8][2]; + int (*pipes)[2]; +@@ -432,25 +433,41 @@ int uv_spawn(uv_loop_t* loop, + + /* Acquire write lock to prevent opening new fds in worker threads */ + uv_rwlock_wrlock(&loop->cloexec_lock); +- pid = fork(); + +- if (pid == -1) { ++ /* Start the child with most signals blocked, to avoid any issues before we ++ * can reset them, but allow program failures to exit (and not hang). */ ++ sigfillset(&signewset); ++ sigdelset(&signewset, SIGKILL); ++ sigdelset(&signewset, SIGSTOP); ++ sigdelset(&signewset, SIGTRAP); ++ sigdelset(&signewset, SIGSEGV); ++ sigdelset(&signewset, SIGBUS); ++ sigdelset(&signewset, SIGILL); ++ sigdelset(&signewset, SIGSYS); ++ sigdelset(&signewset, SIGABRT); ++ if (pthread_sigmask(SIG_BLOCK, &signewset, &sigoldset) != 0) ++ abort(); ++ ++ pid = fork(); ++ if (pid == -1) + err = UV__ERR(errno); +- uv_rwlock_wrunlock(&loop->cloexec_lock); +- uv__close(signal_pipe[0]); +- uv__close(signal_pipe[1]); +- goto error; +- } + +- if (pid == 0) { ++ if (pid == 0) + uv__process_child_init(options, stdio_count, pipes, signal_pipe[1]); ++ ++ if (pthread_sigmask(SIG_SETMASK, &sigoldset, NULL) != 0) + abort(); +- } + + /* Release lock in parent process */ + uv_rwlock_wrunlock(&loop->cloexec_lock); ++ + uv__close(signal_pipe[1]); + ++ if (pid == -1) { ++ uv__close(signal_pipe[0]); ++ goto error; ++ } ++ + process->status = 0; + exec_errorno = 0; + do diff --git a/patches/node/unix_remove_uv_cloexec_ioctl_3515.patch b/patches/node/unix_remove_uv_cloexec_ioctl_3515.patch new file mode 100644 index 0000000000000..f49d25998bba2 --- /dev/null +++ b/patches/node/unix_remove_uv_cloexec_ioctl_3515.patch @@ -0,0 +1,91 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jameson Nash +Date: Sun, 6 Mar 2022 15:01:33 -0500 +Subject: unix: remove uv__cloexec_ioctl() (#3515) + +Now that uv__cloexec_fcntl() is simplified +(https://github.com/libuv/libuv/pull/3492), there is no benefit to +maintaining duplicate code paths for the same thing. + +diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c +index 6cd519ad5b3e7af8f5c71b18a59b88458a233f15..8c30802ad15316a8ec20ecedfb5123174d74276b 100644 +--- a/deps/uv/src/unix/core.c ++++ b/deps/uv/src/unix/core.c +@@ -597,20 +597,6 @@ int uv__nonblock_ioctl(int fd, int set) { + + return 0; + } +- +- +-int uv__cloexec_ioctl(int fd, int set) { +- int r; +- +- do +- r = ioctl(fd, set ? FIOCLEX : FIONCLEX); +- while (r == -1 && errno == EINTR); +- +- if (r) +- return UV__ERR(errno); +- +- return 0; +-} + #endif + + +@@ -645,7 +631,7 @@ int uv__nonblock_fcntl(int fd, int set) { + } + + +-int uv__cloexec_fcntl(int fd, int set) { ++int uv__cloexec(int fd, int set) { + int flags; + int r; + +diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h +index 2dcc8b32f5165dd75061a1b55cc1abd2ab93ccc9..543993989b8765247e140e9d950a25192e5e1ca5 100644 +--- a/deps/uv/src/unix/internal.h ++++ b/deps/uv/src/unix/internal.h +@@ -175,11 +175,9 @@ struct uv__stream_queued_fds_s { + defined(__linux__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) +-#define uv__cloexec uv__cloexec_ioctl + #define uv__nonblock uv__nonblock_ioctl + #define UV__NONBLOCK_IS_IOCTL 1 + #else +-#define uv__cloexec uv__cloexec_fcntl + #define uv__nonblock uv__nonblock_fcntl + #define UV__NONBLOCK_IS_IOCTL 0 + #endif +@@ -197,8 +195,7 @@ struct uv__stream_queued_fds_s { + #endif + + /* core */ +-int uv__cloexec_ioctl(int fd, int set); +-int uv__cloexec_fcntl(int fd, int set); ++int uv__cloexec(int fd, int set); + int uv__nonblock_ioctl(int fd, int set); + int uv__nonblock_fcntl(int fd, int set); + int uv__close(int fd); /* preserves errno */ +diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c +index 7705068730cb0536998bad7d304cb87df99b72e8..b6f9756c6a6710f5f10762b9299cc35047b98097 100644 +--- a/deps/uv/src/unix/process.c ++++ b/deps/uv/src/unix/process.c +@@ -283,7 +283,7 @@ static void uv__process_child_init(const uv_process_options_t* options, + if (pipes[fd][1] == -1) + uv__write_errno(error_fd); + #ifndef F_DUPFD_CLOEXEC /* POSIX 2008 */ +- n = uv__cloexec_fcntl(pipes[fd][1], 1); ++ n = uv__cloexec(pipes[fd][1], 1); + if (n) { + uv__write_int(error_fd, n); + _exit(127); +@@ -312,7 +312,7 @@ static void uv__process_child_init(const uv_process_options_t* options, + + if (fd == use_fd) { + if (close_fd == -1) { +- n = uv__cloexec_fcntl(use_fd, 0); ++ n = uv__cloexec(use_fd, 0); + if (n) { + uv__write_int(error_fd, n); + _exit(127); diff --git a/patches/node/unix_simplify_uv_cloexec_fcntl_3492.patch b/patches/node/unix_simplify_uv_cloexec_fcntl_3492.patch new file mode 100644 index 0000000000000..219ae54daa15b --- /dev/null +++ b/patches/node/unix_simplify_uv_cloexec_fcntl_3492.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Sat, 5 Mar 2022 18:55:49 +0100 +Subject: unix: simplify uv__cloexec_fcntl() (#3492) + +FD_CLOEXEC is the only defined flag for fcntl(F_SETFD) so don't bother +getting the status of that flag first with fcntl(F_GETFD), just set it. + +diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c +index a6425294086ff2f1435fdd6866380d3aaaf68200..6cd519ad5b3e7af8f5c71b18a59b88458a233f15 100644 +--- a/deps/uv/src/unix/core.c ++++ b/deps/uv/src/unix/core.c +@@ -649,21 +649,9 @@ int uv__cloexec_fcntl(int fd, int set) { + int flags; + int r; + +- do +- r = fcntl(fd, F_GETFD); +- while (r == -1 && errno == EINTR); +- +- if (r == -1) +- return UV__ERR(errno); +- +- /* Bail out now if already set/clear. */ +- if (!!(r & FD_CLOEXEC) == !!set) +- return 0; +- ++ flags = 0; + if (set) +- flags = r | FD_CLOEXEC; +- else +- flags = r & ~FD_CLOEXEC; ++ flags = FD_CLOEXEC; + + do + r = fcntl(fd, F_SETFD, flags); From 4abb7e9709a3cabdbc7851073004aa7097c53bc1 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 16:54:11 -0700 Subject: [PATCH 251/268] feat: add nativeTheme.inForcedColorsMode (#33357) Co-authored-by: Milan Burda --- docs/api/native-theme.md | 5 +++++ shell/browser/api/electron_api_native_theme.cc | 7 ++++++- shell/browser/api/electron_api_native_theme.h | 1 + spec-main/api-native-theme-spec.ts | 6 ++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/api/native-theme.md b/docs/api/native-theme.md index 8baa75e8d01fb..3235eba9a78da 100644 --- a/docs/api/native-theme.md +++ b/docs/api/native-theme.md @@ -67,3 +67,8 @@ or is being instructed to show a high-contrast UI. A `boolean` for if the OS / Chromium currently has an inverted color scheme or is being instructed to use an inverted color scheme. + +### `nativeTheme.inForcedColorsMode` _Windows_ _Readonly_ + +A `boolean` indicating whether Chromium is in forced colors mode, controlled by system accessibility settings. +Currently, Windows high contrast is the only system setting that triggers forced colors mode. diff --git a/shell/browser/api/electron_api_native_theme.cc b/shell/browser/api/electron_api_native_theme.cc index 3eedde9666e91..7c511685d1afa 100644 --- a/shell/browser/api/electron_api_native_theme.cc +++ b/shell/browser/api/electron_api_native_theme.cc @@ -67,6 +67,10 @@ bool NativeTheme::ShouldUseHighContrastColors() { return ui_theme_->UserHasContrastPreference(); } +bool NativeTheme::InForcedColorsMode() { + return ui_theme_->InForcedColorsMode(); +} + #if BUILDFLAG(IS_MAC) const CFStringRef WhiteOnBlack = CFSTR("whiteOnBlack"); const CFStringRef UniversalAccessDomain = CFSTR("com.apple.universalaccess"); @@ -106,7 +110,8 @@ gin::ObjectTemplateBuilder NativeTheme::GetObjectTemplateBuilder( .SetProperty("shouldUseHighContrastColors", &NativeTheme::ShouldUseHighContrastColors) .SetProperty("shouldUseInvertedColorScheme", - &NativeTheme::ShouldUseInvertedColorScheme); + &NativeTheme::ShouldUseInvertedColorScheme) + .SetProperty("inForcedColorsMode", &NativeTheme::InForcedColorsMode); } const char* NativeTheme::GetTypeName() { diff --git a/shell/browser/api/electron_api_native_theme.h b/shell/browser/api/electron_api_native_theme.h index cf092e0460961..5f26ab74d6ba9 100644 --- a/shell/browser/api/electron_api_native_theme.h +++ b/shell/browser/api/electron_api_native_theme.h @@ -46,6 +46,7 @@ class NativeTheme : public gin::Wrappable, bool ShouldUseDarkColors(); bool ShouldUseHighContrastColors(); bool ShouldUseInvertedColorScheme(); + bool InForcedColorsMode(); // ui::NativeThemeObserver: void OnNativeThemeUpdated(ui::NativeTheme* theme) override; diff --git a/spec-main/api-native-theme-spec.ts b/spec-main/api-native-theme-spec.ts index 3a03eb1ef81a2..12b9951ad5f03 100644 --- a/spec-main/api-native-theme-spec.ts +++ b/spec-main/api-native-theme-spec.ts @@ -109,4 +109,10 @@ describe('nativeTheme module', () => { expect(nativeTheme.shouldUseHighContrastColors).to.be.a('boolean'); }); }); + + describe('nativeTheme.inForcedColorsMode', () => { + it('returns a boolean', () => { + expect(nativeTheme.inForcedColorsMode).to.be.a('boolean'); + }); + }); }); From 743e4427968839bfaf483fa476b779a901a46c41 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 21:17:13 -0400 Subject: [PATCH 252/268] ci: abort CI if goma authentication is invalid (#33420) Co-authored-by: John Kleinschmidt --- .circleci/build_config.yml | 4 ++++ appveyor.yml | 40 ++++++++++++++++++++++++-------------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 927d0a4cc5d7f..40b010750a22b 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -328,6 +328,10 @@ step-setup-goma-for-build: &step-setup-goma-for-build node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })" export GOMA_FALLBACK_ON_AUTH_FAILURE=true third_party/goma/goma_ctl.py ensure_start + if [ ! -z "$RAW_GOMA_AUTH" ] && [ "`third_party/goma/goma_auth.py info`" != "Login as Fermi Planck" ]; then + echo "WARNING!!!!!! Goma authentication is incorrect; please update Goma auth token." + exit 1 + fi echo 'export GN_GOMA_FILE='`node -e "console.log(require('./src/utils/goma.js').gnFilePath)"` >> $BASH_ENV echo 'export LOCAL_GOMA_DIR='`node -e "console.log(require('./src/utils/goma.js').dir)"` >> $BASH_ENV echo 'export GOMA_FALLBACK_ON_AUTH_FAILURE=true' >> $BASH_ENV diff --git a/appveyor.yml b/appveyor.yml index fab35e3bc66d2..7b413faee5c78 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -67,6 +67,31 @@ build_script: - mkdir src - update_depot_tools.bat - ps: Move-Item $env:APPVEYOR_BUILD_FOLDER -Destination src\electron + - ps: >- + if (Test-Path 'env:RAW_GOMA_AUTH') { + $env:GOMA_OAUTH2_CONFIG_FILE = "$pwd\.goma_oauth2_config" + $env:RAW_GOMA_AUTH | Set-Content $env:GOMA_OAUTH2_CONFIG_FILE + } + - git clone https://github.com/electron/build-tools.git + - cd build-tools + - npm install + - mkdir third_party + - ps: >- + node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })" + - ps: $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)" + - ps: $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)" + - cd .. + - ps: .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR + - ps: >- + if (Test-Path 'env:RAW_GOMA_AUTH') { + $goma_login = python $env:LOCAL_GOMA_DIR\goma_auth.py info + if ($goma_login -eq 'Login as Fermi Planck') { + Write-warning "Goma authentication is correct"; + } else { + Write-warning "WARNING!!!!!! Goma authentication is incorrect; please update Goma auth token."; + $host.SetShouldExit(1) + } + } - ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools" - ps: >- if ($env:GN_CONFIG -ne 'release') { @@ -130,21 +155,6 @@ build_script: Write-warning "Failed to add third_party\angle\.git; continuing anyway" } } - - ps: >- - if (Test-Path 'env:RAW_GOMA_AUTH') { - $env:GOMA_OAUTH2_CONFIG_FILE = "$pwd\.goma_oauth2_config" - $env:RAW_GOMA_AUTH | Set-Content $env:GOMA_OAUTH2_CONFIG_FILE - } - - git clone https://github.com/electron/build-tools.git - - cd build-tools - - npm install - - mkdir third_party - - ps: >- - node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })" - - ps: $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)" - - ps: $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)" - - cd .. - - ps: .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR - cd src - set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn - gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% " From bb6a07238045bd2959ac9edc5a3379e0fcecb11f Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 16:24:34 +0900 Subject: [PATCH 253/268] fix: initialize asar support in worker threads (#33396) * fix: initialize asar support in worker threads (#33216) * fix: initialize asar support in worker threads Use `ObjectWrap` instead of gin's Wrap in `electron_api_asar.cc` because gin isn't fully initialized (and apparently not possible to initialize without ruining the isolate configuration and array buffer allocator) in worker threads. In the worker thread call `setupAsarSupport` just as we do for the main process. * Update lib/asar/fs-wrapper.ts Co-authored-by: Darshan Sen * Update patches/node/worker_thread_add_asar_support.patch Co-authored-by: Darshan Sen * Add a test Co-authored-by: Darshan Sen Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Co-authored-by: John Kleinschmidt * chore: update .patches after merge Co-authored-by: Fedor Indutny Co-authored-by: Darshan Sen Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Co-authored-by: John Kleinschmidt --- lib/asar/fs-wrapper.ts | 12 +- patches/node/.patches | 1 + .../node/worker_thread_add_asar_support.patch | 41 ++++ shell/common/api/electron_api_asar.cc | 208 ++++++++++++------ shell/common/node_includes.h | 1 + spec-main/asar-spec.ts | 16 ++ spec/fixtures/test.asar/worker_threads.asar | Bin 0 -> 672 bytes typings/internal-ambient.d.ts | 2 +- 8 files changed, 210 insertions(+), 71 deletions(-) create mode 100644 patches/node/worker_thread_add_asar_support.patch create mode 100644 spec/fixtures/test.asar/worker_threads.asar diff --git a/lib/asar/fs-wrapper.ts b/lib/asar/fs-wrapper.ts index 87e03b73664f6..1feabb16fc901 100644 --- a/lib/asar/fs-wrapper.ts +++ b/lib/asar/fs-wrapper.ts @@ -30,11 +30,13 @@ const getOrCreateArchive = (archivePath: string) => { return cachedArchives.get(archivePath); } - const newArchive = asar.createArchive(archivePath); - if (!newArchive) return null; - - cachedArchives.set(archivePath, newArchive); - return newArchive; + try { + const newArchive = new asar.Archive(archivePath); + cachedArchives.set(archivePath, newArchive); + return newArchive; + } catch { + return null; + } }; const asarRe = /\.asar/i; diff --git a/patches/node/.patches b/patches/node/.patches index 10a05075e46b9..797e5dc6f9fbd 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -44,3 +44,4 @@ unix_remove_uv_cloexec_ioctl_3515.patch process_simplify_uv_write_int_calls_3519.patch macos_don_t_use_thread-unsafe_strtok_3524.patch process_fix_hang_after_note_exit_3521.patch +worker_thread_add_asar_support.patch diff --git a/patches/node/worker_thread_add_asar_support.patch b/patches/node/worker_thread_add_asar_support.patch new file mode 100644 index 0000000000000..7300f87fd4fc3 --- /dev/null +++ b/patches/node/worker_thread_add_asar_support.patch @@ -0,0 +1,41 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Fedor Indutny +Date: Wed, 9 Mar 2022 17:52:32 -0800 +Subject: worker_thread: add asar support + +This patch initializes asar support in workers threads in +Node.js. + +diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js +index 419ffd9d5deb84eb94381259d3084411f6c3341b..17a1860d158976f11035553601560d171c7fc25a 100644 +--- a/lib/internal/bootstrap/pre_execution.js ++++ b/lib/internal/bootstrap/pre_execution.js +@@ -505,6 +505,7 @@ module.exports = { + loadPreloadModules, + setupTraceCategoryState, + setupInspectorHooks, ++ setupAsarSupport, + initializeReport, + initializeCJSLoader, + initializeWASI +diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js +index e3ce67987ee3185a93750ebad72beab304c71e3a..ef5082d73b6153b49875c61d9b365b873b16145d 100644 +--- a/lib/internal/main/worker_thread.js ++++ b/lib/internal/main/worker_thread.js +@@ -27,6 +27,7 @@ const { + initializeReport, + initializeSourceMapsHandlers, + loadPreloadModules, ++ setupAsarSupport, + setupTraceCategoryState + } = require('internal/bootstrap/pre_execution'); + +@@ -154,6 +155,8 @@ port.on('message', (message) => { + }; + workerIo.sharedCwdCounter = cwdCounter; + ++ setupAsarSupport(); ++ + const CJSLoader = require('internal/modules/cjs/loader'); + assert(!CJSLoader.hasLoadedAnyUserCJSModule); + loadPreloadModules(); diff --git a/shell/common/api/electron_api_asar.cc b/shell/common/api/electron_api_asar.cc index 7ded3c169c576..0b2397ff2c331 100644 --- a/shell/common/api/electron_api_asar.cc +++ b/shell/common/api/electron_api_asar.cc @@ -5,11 +5,8 @@ #include #include "gin/handle.h" -#include "gin/object_template_builder.h" -#include "gin/wrappable.h" #include "shell/common/asar/archive.h" #include "shell/common/asar/asar_util.h" -#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/file_path_converter.h" #include "shell/common/gin_helper/dictionary.h" #include "shell/common/node_includes.h" @@ -17,45 +14,73 @@ namespace { -class Archive : public gin::Wrappable { +class Archive : public node::ObjectWrap { public: - static gin::Handle Create(v8::Isolate* isolate, - const base::FilePath& path) { - auto archive = std::make_unique(path); - if (!archive->Init()) - return gin::Handle(); - return gin::CreateHandle(isolate, new Archive(isolate, std::move(archive))); - } - - // gin::Wrappable - static gin::WrapperInfo kWrapperInfo; - gin::ObjectTemplateBuilder GetObjectTemplateBuilder( - v8::Isolate* isolate) override { - return gin::ObjectTemplateBuilder(isolate) - .SetMethod("getFileInfo", &Archive::GetFileInfo) - .SetMethod("stat", &Archive::Stat) - .SetMethod("readdir", &Archive::Readdir) - .SetMethod("realpath", &Archive::Realpath) - .SetMethod("copyFileOut", &Archive::CopyFileOut) - .SetMethod("getFdAndValidateIntegrityLater", &Archive::GetFD); + static v8::Local CreateFunctionTemplate( + v8::Isolate* isolate) { + auto tpl = v8::FunctionTemplate::New(isolate, Archive::New); + tpl->SetClassName( + v8::String::NewFromUtf8(isolate, "Archive").ToLocalChecked()); + tpl->InstanceTemplate()->SetInternalFieldCount(1); + + NODE_SET_PROTOTYPE_METHOD(tpl, "getFileInfo", &Archive::GetFileInfo); + NODE_SET_PROTOTYPE_METHOD(tpl, "stat", &Archive::Stat); + NODE_SET_PROTOTYPE_METHOD(tpl, "readdir", &Archive::Readdir); + NODE_SET_PROTOTYPE_METHOD(tpl, "realpath", &Archive::Realpath); + NODE_SET_PROTOTYPE_METHOD(tpl, "copyFileOut", &Archive::CopyFileOut); + NODE_SET_PROTOTYPE_METHOD(tpl, "getFdAndValidateIntegrityLater", + &Archive::GetFD); + + return tpl; } - const char* GetTypeName() override { return "Archive"; } - // disable copy Archive(const Archive&) = delete; Archive& operator=(const Archive&) = delete; protected: - Archive(v8::Isolate* isolate, std::unique_ptr archive) + explicit Archive(std::unique_ptr archive) : archive_(std::move(archive)) {} + static void New(const v8::FunctionCallbackInfo& args) { + auto* isolate = args.GetIsolate(); + + base::FilePath path; + if (!gin::ConvertFromV8(isolate, args[0], &path)) { + isolate->ThrowException(v8::Exception::Error(node::FIXED_ONE_BYTE_STRING( + isolate, "failed to convert path to V8"))); + return; + } + + auto archive = std::make_unique(path); + if (!archive->Init()) { + isolate->ThrowException(v8::Exception::Error(node::FIXED_ONE_BYTE_STRING( + isolate, "failed to initialize archive"))); + return; + } + + auto* archive_wrap = new Archive(std::move(archive)); + archive_wrap->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } + // Reads the offset and size of file. - v8::Local GetFileInfo(v8::Isolate* isolate, - const base::FilePath& path) { + static void GetFileInfo(const v8::FunctionCallbackInfo& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap(args.Holder()); + + base::FilePath path; + if (!gin::ConvertFromV8(isolate, args[0], &path)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + asar::Archive::FileInfo info; - if (!archive_ || !archive_->GetFileInfo(path, &info)) - return v8::False(isolate); + if (!wrap->archive_ || !wrap->archive_->GetFileInfo(path, &info)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + gin_helper::Dictionary dict(isolate, v8::Object::New(isolate)); dict.Set("size", info.size); dict.Set("unpacked", info.unpacked); @@ -74,65 +99,104 @@ class Archive : public gin::Wrappable { integrity.Set("hash", info.integrity.value().hash); dict.Set("integrity", integrity); } - return dict.GetHandle(); + args.GetReturnValue().Set(dict.GetHandle()); } // Returns a fake result of fs.stat(path). - v8::Local Stat(v8::Isolate* isolate, const base::FilePath& path) { + static void Stat(const v8::FunctionCallbackInfo& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap(args.Holder()); + base::FilePath path; + if (!gin::ConvertFromV8(isolate, args[0], &path)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + asar::Archive::Stats stats; - if (!archive_ || !archive_->Stat(path, &stats)) - return v8::False(isolate); + if (!wrap->archive_ || !wrap->archive_->Stat(path, &stats)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + gin_helper::Dictionary dict(isolate, v8::Object::New(isolate)); dict.Set("size", stats.size); dict.Set("offset", stats.offset); dict.Set("isFile", stats.is_file); dict.Set("isDirectory", stats.is_directory); dict.Set("isLink", stats.is_link); - return dict.GetHandle(); + args.GetReturnValue().Set(dict.GetHandle()); } // Returns all files under a directory. - v8::Local Readdir(v8::Isolate* isolate, - const base::FilePath& path) { + static void Readdir(const v8::FunctionCallbackInfo& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap(args.Holder()); + base::FilePath path; + if (!gin::ConvertFromV8(isolate, args[0], &path)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + std::vector files; - if (!archive_ || !archive_->Readdir(path, &files)) - return v8::False(isolate); - return gin::ConvertToV8(isolate, files); + if (!wrap->archive_ || !wrap->archive_->Readdir(path, &files)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + args.GetReturnValue().Set(gin::ConvertToV8(isolate, files)); } // Returns the path of file with symbol link resolved. - v8::Local Realpath(v8::Isolate* isolate, - const base::FilePath& path) { + static void Realpath(const v8::FunctionCallbackInfo& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap(args.Holder()); + base::FilePath path; + if (!gin::ConvertFromV8(isolate, args[0], &path)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + base::FilePath realpath; - if (!archive_ || !archive_->Realpath(path, &realpath)) - return v8::False(isolate); - return gin::ConvertToV8(isolate, realpath); + if (!wrap->archive_ || !wrap->archive_->Realpath(path, &realpath)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + args.GetReturnValue().Set(gin::ConvertToV8(isolate, realpath)); } // Copy the file out into a temporary file and returns the new path. - v8::Local CopyFileOut(v8::Isolate* isolate, - const base::FilePath& path) { + static void CopyFileOut(const v8::FunctionCallbackInfo& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap(args.Holder()); + base::FilePath path; + if (!gin::ConvertFromV8(isolate, args[0], &path)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + base::FilePath new_path; - if (!archive_ || !archive_->CopyFileOut(path, &new_path)) - return v8::False(isolate); - return gin::ConvertToV8(isolate, new_path); + if (!wrap->archive_ || !wrap->archive_->CopyFileOut(path, &new_path)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + args.GetReturnValue().Set(gin::ConvertToV8(isolate, new_path)); } // Return the file descriptor. - int GetFD() const { - if (!archive_) - return -1; - return archive_->GetUnsafeFD(); + static void GetFD(const v8::FunctionCallbackInfo& args) { + auto* isolate = args.GetIsolate(); + auto* wrap = node::ObjectWrap::Unwrap(args.Holder()); + + args.GetReturnValue().Set(gin::ConvertToV8( + isolate, wrap->archive_ ? wrap->archive_->GetUnsafeFD() : -1)); } - private: std::unique_ptr archive_; }; -// static -gin::WrapperInfo Archive::kWrapperInfo = {gin::kEmbedderNativeGin}; +static void InitAsarSupport(const v8::FunctionCallbackInfo& args) { + auto* isolate = args.GetIsolate(); + auto require = args[0]; -void InitAsarSupport(v8::Isolate* isolate, v8::Local require) { // Evaluate asar_bundle.js. std::vector> asar_bundle_params = { node::FIXED_ONE_BYTE_STRING(isolate, "require")}; @@ -142,8 +206,15 @@ void InitAsarSupport(v8::Isolate* isolate, v8::Local require) { &asar_bundle_params, &asar_bundle_args, nullptr); } -v8::Local SplitPath(v8::Isolate* isolate, - const base::FilePath& path) { +static void SplitPath(const v8::FunctionCallbackInfo& args) { + auto* isolate = args.GetIsolate(); + + base::FilePath path; + if (!gin::ConvertFromV8(isolate, args[0], &path)) { + args.GetReturnValue().Set(v8::False(isolate)); + return; + } + gin_helper::Dictionary dict = gin::Dictionary::CreateEmpty(isolate); base::FilePath asar_path, file_path; if (asar::GetAsarArchivePath(path, &asar_path, &file_path, true)) { @@ -153,17 +224,24 @@ v8::Local SplitPath(v8::Isolate* isolate, } else { dict.Set("isAsar", false); } - return dict.GetHandle(); + args.GetReturnValue().Set(dict.GetHandle()); } void Initialize(v8::Local exports, v8::Local unused, v8::Local context, void* priv) { - gin_helper::Dictionary dict(context->GetIsolate(), exports); - dict.SetMethod("createArchive", &Archive::Create); - dict.SetMethod("splitPath", &SplitPath); - dict.SetMethod("initAsarSupport", &InitAsarSupport); + auto* isolate = exports->GetIsolate(); + + auto cons = Archive::CreateFunctionTemplate(isolate) + ->GetFunction(context) + .ToLocalChecked(); + cons->SetName(node::FIXED_ONE_BYTE_STRING(isolate, "Archive")); + + exports->Set(context, node::FIXED_ONE_BYTE_STRING(isolate, "Archive"), cons) + .Check(); + NODE_SET_METHOD(exports, "splitPath", &SplitPath); + NODE_SET_METHOD(exports, "initAsarSupport", &InitAsarSupport); } } // namespace diff --git a/shell/common/node_includes.h b/shell/common/node_includes.h index f4f026df663de..c678769324349 100644 --- a/shell/common/node_includes.h +++ b/shell/common/node_includes.h @@ -23,6 +23,7 @@ #include "node_errors.h" #include "node_internals.h" #include "node_native_module_env.h" +#include "node_object_wrap.h" #include "node_options-inl.h" #include "node_options.h" #include "node_platform.h" diff --git a/spec-main/asar-spec.ts b/spec-main/asar-spec.ts index 865a022a9a38a..babfcdb8c1a21 100644 --- a/spec-main/asar-spec.ts +++ b/spec-main/asar-spec.ts @@ -1,6 +1,7 @@ import { expect } from 'chai'; import * as path from 'path'; import * as url from 'url'; +import { Worker } from 'worker_threads'; import { BrowserWindow, ipcMain } from 'electron/main'; import { closeAllWindows } from './window-helpers'; import { emittedOnce } from './events-helpers'; @@ -108,4 +109,19 @@ describe('asar package', () => { expect(result).to.equal('success'); }); }); + + describe('worker threads', function () { + it('should start worker thread from asar file', function (callback) { + const p = path.join(asarDir, 'worker_threads.asar', 'worker.js'); + const w = new Worker(p); + + w.on('error', (err) => callback(err)); + w.on('message', (message) => { + expect(message).to.equal('ping'); + w.terminate(); + + callback(null); + }); + }); + }); }); diff --git a/spec/fixtures/test.asar/worker_threads.asar b/spec/fixtures/test.asar/worker_threads.asar new file mode 100644 index 0000000000000000000000000000000000000000..5c7db2852589586997cc68ce8713640754a0f22a GIT binary patch literal 672 zcmbtSO-sZu5Ut>;zoO*gE-bZ8(>C2@1#eyiVUHq`q?5L8ZEKUokEQ?Gg9i^zSCQS5 z$P$K3k~iBRFFl4?Z8(Y=>!!9+|8<2SzhBMM?ZNQQ_3CN68 zjfJAG?CXdZbXOC@B1&OOJS(0_kebF!1R_poz;Ve)s6^x}WvSqj=b20r znsO>N&^QInHDgq#LhB5fWZkOuYS#!0GZqEx=MFo(Jzn5$7-rwXPm%) zT!WUB0tE@UMM_E?WlTmY=1c(>Qfrx~XeJAJ2&sxG6_7+qXDZ2}NTh$dK3V`>4})qO zW4*1{i5?nz)ArUIyrtK})28ZSa`ruydt3G(a&tCaxGubO2s3_HH3dQ^Q*U|UZC!7V k!|z&SufZ5mAjb$CD~E;qD>v322>IvZpW6wH_zB{_05^ZisQ>@~ literal 0 HcmV?d00001 diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index 92d707c8edacc..17fd807026b0f 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -83,7 +83,7 @@ declare namespace NodeJS { } interface AsarBinding { - createArchive(path: string): AsarArchive; + Archive: { new(path: string): AsarArchive }; splitPath(path: string): { isAsar: false; } | { From fa6dde3e1cbd9bd8906eb43741ad2bf4ee3f2eb0 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 06:30:31 -0700 Subject: [PATCH 254/268] Bump v18.0.0-beta.6 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 7bb8e587ea71c..c018cf78c496a 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-beta.5 \ No newline at end of file +18.0.0-beta.6 \ No newline at end of file diff --git a/package.json b/package.json index e88e38bd1994d..b98dc46ceca92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-beta.5", + "version": "18.0.0-beta.6", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 1d21adb7ed532..e9bf32f0d41be 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,5 - PRODUCTVERSION 18,0,0,5 + FILEVERSION 18,0,0,6 + PRODUCTVERSION 18,0,0,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From c80f70108589eb5b526a317d868f03dc8dd0526e Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Fri, 25 Mar 2022 00:51:25 -0700 Subject: [PATCH 255/268] fix: gn check when //printing component is disabled (#33442) Co-authored-by: deepak1556 --- shell/browser/api/electron_api_web_contents.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 7d1458484f993..43ef330cc74ad 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -167,7 +167,7 @@ #if BUILDFLAG(ENABLE_PRINTING) #include "components/printing/browser/print_manager_utils.h" #include "printing/backend/print_backend.h" // nogncheck -#include "printing/mojom/print.mojom.h" +#include "printing/mojom/print.mojom.h" // nogncheck #include "shell/browser/printing/print_preview_message_handler.h" #include "shell/browser/printing/print_view_manager_electron.h" From f1b30c26f9578261f87154548a07c9d10ee0a1fd Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 16:34:25 +0900 Subject: [PATCH 256/268] fix: non-client windows messages on legacy widget host (again) (#33446) Co-authored-by: clavin --- ...cking_and_message_bubbling_on_windows.patch | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch index 86a3c0fbc97be..5b43683bfa253 100644 --- a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch +++ b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch @@ -13,7 +13,7 @@ messages in the legacy window handle layer. These conditions are regularly hit with WCO-enabled windows on Windows. diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc -index 4a894ef70eeb1d8489049aef552c9bae4f24ae62..f5049d730a850f2947023f976b25fb772e42107a 100644 +index 4a894ef70eeb1d8489049aef552c9bae4f24ae62..df101c53861a83f107d459270c37b3b497a00cb0 100644 --- a/content/browser/renderer_host/legacy_render_widget_host_win.cc +++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc @@ -288,12 +288,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, @@ -31,19 +31,15 @@ index 4a894ef70eeb1d8489049aef552c9bae4f24ae62..f5049d730a850f2947023f976b25fb77 tme.hwndTrack = hwnd(); tme.dwHoverTime = 0; TrackMouseEvent(&tme); -@@ -319,12 +319,11 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, - message, w_param, l_param, &msg_handled); - handled = msg_handled; - // If the parent did not handle non client mouse messages, we call -- // DefWindowProc on the message with the parent window handle. This -- // ensures that WM_SYSCOMMAND is generated for the parent and we are -- // out of the picture. -+ // DefWindowProc on the message. This ensures that WM_SYSCOMMAND is -+ // generated. +@@ -324,7 +324,10 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, + // out of the picture. if (!handled && (message >= WM_NCMOUSEMOVE && message <= WM_NCXBUTTONDBLCLK)) { - ret = ::DefWindowProc(GetParent(), message, w_param, l_param); -+ ret = ::DefWindowProc(hwnd(), message, w_param, l_param); ++ // Send WM_NCMOUSEMOVE messages using the LegacyRenderWidgetHostHWND's ++ // handle so mouse tracking on non-client areas doesn't break. ++ HWND target = message == WM_NCMOUSEMOVE ? hwnd() : GetParent(); ++ ret = ::DefWindowProc(target, message, w_param, l_param); handled = TRUE; } } From d8f43ed7bd68bbe0cce36c5720d030e3b9d8330b Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 06:30:58 -0700 Subject: [PATCH 257/268] Bump v18.0.0-beta.7 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index c018cf78c496a..83b71797ba47e 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-beta.6 \ No newline at end of file +18.0.0-beta.7 \ No newline at end of file diff --git a/package.json b/package.json index b98dc46ceca92..58e1740a6f69a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-beta.6", + "version": "18.0.0-beta.7", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index e9bf32f0d41be..9b3dc4acbdccb 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,6 - PRODUCTVERSION 18,0,0,6 + FILEVERSION 18,0,0,7 + PRODUCTVERSION 18,0,0,7 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From a5d2a56105f54ea5fc474ac0613557653e58d692 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 09:28:37 -0700 Subject: [PATCH 258/268] Revert "Bump v18.0.0-beta.7" This reverts commit d8f43ed7bd68bbe0cce36c5720d030e3b9d8330b. --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 83b71797ba47e..c018cf78c496a 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-beta.7 \ No newline at end of file +18.0.0-beta.6 \ No newline at end of file diff --git a/package.json b/package.json index 58e1740a6f69a..b98dc46ceca92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-beta.7", + "version": "18.0.0-beta.6", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 9b3dc4acbdccb..e9bf32f0d41be 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,7 - PRODUCTVERSION 18,0,0,7 + FILEVERSION 18,0,0,6 + PRODUCTVERSION 18,0,0,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 765e1025f4657c824baa3e61aa03bd1c4fc6e8b5 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 12:51:50 -0500 Subject: [PATCH 259/268] feat: add WCO title bar style setters (#33440) * feat: add wco title bar style setters * return after throwing Co-authored-by: clavin --- docs/api/browser-window.md | 10 +++ .../api/electron_api_browser_window.cc | 71 +++++++++++++++++++ .../browser/api/electron_api_browser_window.h | 4 ++ shell/browser/native_window.h | 4 ++ shell/browser/native_window_views.h | 6 ++ shell/browser/ui/views/win_caption_button.cc | 2 + shell/browser/ui/views/win_frame_view.cc | 8 +++ shell/browser/ui/views/win_frame_view.h | 3 + 8 files changed, 108 insertions(+) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 1897bbc2754d3..7b594545de5d1 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -1842,6 +1842,16 @@ with `addBrowserView` or `setBrowserView`. **Note:** The BrowserView API is currently experimental and may change or be removed in future Electron releases. +#### `win.setTitleBarOverlay(options)` _Windows_ + +* `options` Object + * `color` String (optional) _Windows_ - The CSS color of the Window Controls Overlay when enabled. + * `symbolColor` String (optional) _Windows_ - The CSS color of the symbols on the Window Controls Overlay when enabled. + * `height` Integer (optional) _Windows_ - The height of the title bar and Window Controls Overlay in pixels. + +On a Window with Window Controls Overlay already enabled, this method updates +the style of the title bar overlay. + [runtime-enabled-features]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/runtime_enabled_features.json5?l=70 [page-visibility-api]: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API [quick-look]: https://en.wikipedia.org/wiki/Quick_Look diff --git a/shell/browser/api/electron_api_browser_window.cc b/shell/browser/api/electron_api_browser_window.cc index b0629e27c74d7..e71b15fc0d575 100644 --- a/shell/browser/api/electron_api_browser_window.cc +++ b/shell/browser/api/electron_api_browser_window.cc @@ -10,6 +10,7 @@ #include "content/browser/web_contents/web_contents_impl.h" // nogncheck #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" +#include "content/public/common/color_parser.h" #include "shell/browser/api/electron_api_web_contents_view.h" #include "shell/browser/browser.h" #include "shell/browser/native_browser_view.h" @@ -24,6 +25,14 @@ #include "shell/common/options_switches.h" #include "ui/gl/gpu_switching_manager.h" +#if defined(TOOLKIT_VIEWS) +#include "shell/browser/native_window_views.h" +#endif + +#if BUILDFLAG(IS_WIN) +#include "shell/browser/ui/views/win_frame_view.h" +#endif + namespace electron { namespace api { @@ -466,6 +475,65 @@ v8::Local BrowserWindow::GetWebContents(v8::Isolate* isolate) { return v8::Local::New(isolate, web_contents_); } +#if BUILDFLAG(IS_WIN) +void BrowserWindow::SetTitleBarOverlay(const gin_helper::Dictionary& options, + gin_helper::Arguments* args) { + // Ensure WCO is already enabled on this window + if (!window_->titlebar_overlay_enabled()) { + args->ThrowError("Titlebar overlay is not enabled"); + return; + } + + auto* window = static_cast(window_.get()); + bool updated = false; + + // Check and update the button color + std::string btn_color; + if (options.Get(options::kOverlayButtonColor, &btn_color)) { + // Parse the string as a CSS color + SkColor color; + if (!content::ParseCssColorString(btn_color, &color)) { + args->ThrowError("Could not parse color as CSS color"); + return; + } + + // Update the view + window->set_overlay_button_color(color); + updated = true; + } + + // Check and update the symbol color + std::string symbol_color; + if (options.Get(options::kOverlaySymbolColor, &symbol_color)) { + // Parse the string as a CSS color + SkColor color; + if (!content::ParseCssColorString(symbol_color, &color)) { + args->ThrowError("Could not parse symbol color as CSS color"); + return; + } + + // Update the view + window->set_overlay_symbol_color(color); + updated = true; + } + + // Check and update the height + int height = 0; + if (options.Get(options::kOverlayHeight, &height)) { + window->set_titlebar_overlay_height(height); + updated = true; + } + + // If anything was updated, invalidate the layout and schedule a paint of the + // window's frame view + if (updated) { + auto* frame_view = static_cast( + window->widget()->non_client_view()->frame_view()); + frame_view->InvalidateCaptionButtons(); + } +} +#endif + void BrowserWindow::ScheduleUnresponsiveEvent(int ms) { if (!window_unresponsive_closure_.IsCancelled()) return; @@ -524,6 +592,9 @@ void BrowserWindow::BuildPrototype(v8::Isolate* isolate, .SetMethod("focusOnWebView", &BrowserWindow::FocusOnWebView) .SetMethod("blurWebView", &BrowserWindow::BlurWebView) .SetMethod("isWebViewFocused", &BrowserWindow::IsWebViewFocused) +#if BUILDFLAG(IS_WIN) + .SetMethod("setTitleBarOverlay", &BrowserWindow::SetTitleBarOverlay) +#endif .SetProperty("webContents", &BrowserWindow::GetWebContents); } diff --git a/shell/browser/api/electron_api_browser_window.h b/shell/browser/api/electron_api_browser_window.h index d1793fd3edde1..00bdf694e8ff3 100644 --- a/shell/browser/api/electron_api_browser_window.h +++ b/shell/browser/api/electron_api_browser_window.h @@ -99,6 +99,10 @@ class BrowserWindow : public BaseWindow, void BlurWebView(); bool IsWebViewFocused(); v8::Local GetWebContents(v8::Isolate* isolate); +#if BUILDFLAG(IS_WIN) + void SetTitleBarOverlay(const gin_helper::Dictionary& options, + gin_helper::Arguments* args); +#endif private: #if BUILDFLAG(IS_MAC) diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index e7a4d193375cb..762552656a5df 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -328,6 +328,10 @@ class NativeWindow : public base::SupportsUserData, }; TitleBarStyle title_bar_style() const { return title_bar_style_; } int titlebar_overlay_height() const { return titlebar_overlay_height_; } + void set_titlebar_overlay_height(int height) { + titlebar_overlay_height_ = height; + } + bool titlebar_overlay_enabled() const { return titlebar_overlay_; } bool has_frame() const { return has_frame_; } void set_has_frame(bool has_frame) { has_frame_ = has_frame; } diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index 0d08ebf6dbd8d..56823eb4b6297 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -181,7 +181,13 @@ class NativeWindowViews : public NativeWindow, titlebar_overlay_; } SkColor overlay_button_color() const { return overlay_button_color_; } + void set_overlay_button_color(SkColor color) { + overlay_button_color_ = color; + } SkColor overlay_symbol_color() const { return overlay_symbol_color_; } + void set_overlay_symbol_color(SkColor color) { + overlay_symbol_color_ = color; + } #endif private: diff --git a/shell/browser/ui/views/win_caption_button.cc b/shell/browser/ui/views/win_caption_button.cc index d12f761f9deb4..a3a52244ff206 100644 --- a/shell/browser/ui/views/win_caption_button.cc +++ b/shell/browser/ui/views/win_caption_button.cc @@ -100,6 +100,8 @@ void WinCaptionButton::SetSize(gfx::Size size) { base_width_ = width; if (height > 0) height_ = height; + + InvalidateLayout(); } int WinCaptionButton::GetBetweenButtonSpacing() const { diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index 9ddea873c704c..fb58308f556b8 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -54,6 +54,14 @@ SkColor WinFrameView::GetReadableFeatureColor(SkColor background_color) { : SK_ColorBLACK; } +void WinFrameView::InvalidateCaptionButtons() { + // Ensure that the caption buttons container exists + DCHECK(caption_button_container_); + + caption_button_container_->InvalidateLayout(); + caption_button_container_->SchedulePaint(); +} + gfx::Rect WinFrameView::GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const { return views::GetWindowBoundsForClientBounds( diff --git a/shell/browser/ui/views/win_frame_view.h b/shell/browser/ui/views/win_frame_view.h index c3f3a0f27914d..76b8e64bd184e 100644 --- a/shell/browser/ui/views/win_frame_view.h +++ b/shell/browser/ui/views/win_frame_view.h @@ -30,6 +30,9 @@ class WinFrameView : public FramelessView { SkColor GetReadableFeatureColor(SkColor background_color); + // Tells the NonClientView to invalidate the WinFrameView's caption buttons. + void InvalidateCaptionButtons(); + // views::NonClientFrameView: gfx::Rect GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const override; From 9b1e7a8963ac37aa6390ad22a14ba047e42d867d Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 28 Mar 2022 16:49:30 -0500 Subject: [PATCH 260/268] docs: simplify skipTaskbar breaking changes text (#33479) (#33482) --- docs/breaking-changes.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index 6d561f87bd75e..c448a5303836e 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -27,6 +27,13 @@ preload scripts _do_ depend on Node, either refactor them to remove Node usage from the renderer, or explicitly specify `sandbox: false` for the relevant renderers. +### Removed: `skipTaskbar` on Linux + +On X11, `skipTaskbar` sends a `_NET_WM_STATE_SKIP_TASKBAR` message to the X11 +window manager. There is not a direct equivalent for Wayland, and the known +workarounds have unacceptable tradeoffs (e.g. Window.is_skip_taskbar in GNOME +requires unsafe mode), so Electron is unable to support this feature on Linux. + ## Planned Breaking API Changes (19.0) *None (yet)* From f8c7408279c6fc694e00b633a1672f534271302e Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 17:09:35 -0500 Subject: [PATCH 261/268] chore: bump chromium to 100.0.4896.56 (18-x-y) (#33475) * chore: bump chromium in DEPS to 100.0.4896.56 * chore: update patches Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt --- DEPS | 2 +- ..._scheduler_throttling_per_renderview.patch | 6 ++--- patches/chromium/blink_local_frame.patch | 2 +- ...build_disable_partition_alloc_on_mac.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 16 ++++++------ .../build_libc_as_static_library.patch | 2 +- patches/chromium/can_create_window.patch | 16 ++++++------ ...screationoverridden_with_full_params.patch | 2 +- ...esources_not_chrome_for_spellchecker.patch | 2 +- .../disable_color_correct_rendering.patch | 10 +++---- patches/chromium/disable_hidden.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 8 +++--- .../extend_apply_webpreferences.patch | 2 +- ...screen_rendering_with_viz_compositor.patch | 8 +++--- ..._raw_response_headers_from_urlloader.patch | 8 +++--- ...ntcapturercount_in_web_contents_impl.patch | 4 +-- patches/chromium/frame_host_manager.patch | 6 ++--- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- .../mas_disable_remote_accessibility.patch | 4 +-- ...emote_certificate_verification_logic.patch | 12 ++++----- .../chromium/notification_provenance.patch | 4 +-- ...utofill_colors_to_the_color_pipeline.patch | 10 ++++--- patches/chromium/printing.patch | 26 +++++++++---------- ...r_changes_to_the_webcontentsobserver.patch | 8 +++--- .../render_widget_host_view_base.patch | 4 +-- patches/chromium/resource_file_conflict.patch | 6 ++--- patches/chromium/scroll_bounce_flag.patch | 2 +- .../support_mixed_sandbox_with_zygote.patch | 4 +-- patches/chromium/web_contents.patch | 2 +- patches/chromium/webview_fullscreen.patch | 4 +-- .../worker_context_will_destroy.patch | 8 +++--- ...feat_add_hook_to_notify_script_ready.patch | 8 +++--- 32 files changed, 102 insertions(+), 100 deletions(-) diff --git a/DEPS b/DEPS index 790da2014c4de..cea76e87bfbcc 100644 --- a/DEPS +++ b/DEPS @@ -15,7 +15,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '100.0.4894.0', + '100.0.4896.56', 'node_version': 'v16.13.2', 'nan_version': diff --git a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch index 9a54c4fbe9988..d27950925164f 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -85,10 +85,10 @@ index 14d4a00293ab0b11e733676844ce483992d6cd8e..c6c2dbb9dddd1eaa21e8c7b276d871a3 // Visibility ----------------------------------------------------------- diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 8cdffac8ecb9ed2c6892f1e975a953846e7e3a5c..7e7927c7258963bd95a2c064ef85e410f4d2571d 100644 +index b9d5a13bcdf981064f9970fdb8017fed5f93b35e..182f70b2b3bd9cbc6548d4c17caad797e5dad0ce 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3659,6 +3659,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3668,6 +3668,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 8cdffac8ecb9ed2c6892f1e975a953846e7e3a5c..7e7927c7258963bd95a2c064ef85e410 void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3670,7 +3677,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3679,7 +3686,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index 1ad52265500fd..e7484d16d1661 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -15,7 +15,7 @@ Refs changes in: This patch reverts the changes to fix associated crashes in Electron. diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc -index 2b0c8720866b45c2a83d639533cb4c3e5dbb70e0..97c251cdc310eb22859efb1ba3ca6312a3236fa5 100644 +index 09e6436422169ac05d5f0561f12984c86dc7af5e..7b2263f4c7fa2dffbaf5b630f4d5a83d9b68f9a5 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc @@ -122,14 +122,6 @@ bool Frame::Detach(FrameDetachType type) { diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch index 944a1f80f3927..51dd41b47fc8b 100644 --- a/patches/chromium/build_disable_partition_alloc_on_mac.patch +++ b/patches/chromium/build_disable_partition_alloc_on_mac.patch @@ -9,7 +9,7 @@ and can be removed when the crash in fork is resolved. Related issue: https://github.com/electron/electron/issues/32718 diff --git a/base/allocator/allocator.gni b/base/allocator/allocator.gni -index 56acfed89ec4ad4ee568a1b517923efa4b4e9c1f..a1da35a84f896d158ac88368ff6d95025a23ff95 100644 +index e0540a65e5fa3d46b3a260fbddb4689f2c929bd4..11ac00ac5b6eddbe41fd9e003818e98ae62a3df1 100644 --- a/base/allocator/allocator.gni +++ b/base/allocator/allocator.gni @@ -20,7 +20,7 @@ _disable_partition_alloc = is_component_build || (is_win && is_debug) diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index c692f905ec181..ed08eacb4e92d 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -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 7caaf66cad9d5b9f787cea0d49c32c26801571c2..f45691888b74643189b956928fdc796bfc5bcee3 100644 +index 0cf38ad237727254c77472f73d82d6f65fe14bde..83d9746bd6f5b4b9a87d2e9ee185e0e8a8300490 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -171,11 +171,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 7caaf66cad9d5b9f787cea0d49c32c26801571c2..f45691888b74643189b956928fdc796b "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 6a40a73520a951d7c6fd06cbd07329a40ff41544..9ca837d995160d57c7efb51c54cf27283b11b20e 100644 +index 492cd8e11e28e0b427aca227665295a3052af765..760d2171c5083820fbbf66ce5d7d3c80930b9e88 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4502,7 +4502,7 @@ static_library("browser") { +@@ -4501,7 +4501,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. @@ -46,10 +46,10 @@ index 6a40a73520a951d7c6fd06cbd07329a40ff41544..9ca837d995160d57c7efb51c54cf2728 sources += [ "certificate_viewer_stub.cc" ] } diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 7be0809cfd3a08a87b29256241bc11a33abd3d17..e3c85fd9f550da204e36091bad256b1c2400ade8 100644 +index 768da31eb760ed382465f65bf34589f7e8dd794d..be82ce60faebd0846d65334110e7a92fe239b6d6 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5719,7 +5719,6 @@ test("unit_tests") { +@@ -5721,7 +5721,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 7be0809cfd3a08a87b29256241bc11a33abd3d17..e3c85fd9f550da204e36091bad256b1c "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5742,6 +5741,10 @@ test("unit_tests") { +@@ -5744,6 +5743,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 7be0809cfd3a08a87b29256241bc11a33abd3d17..e3c85fd9f550da204e36091bad256b1c ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6428,7 +6431,6 @@ test("unit_tests") { +@@ -6437,7 +6440,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index 7be0809cfd3a08a87b29256241bc11a33abd3d17..e3c85fd9f550da204e36091bad256b1c "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6473,6 +6475,11 @@ test("unit_tests") { +@@ -6482,6 +6484,11 @@ test("unit_tests") { "//ui/native_theme:test_support", "//ui/webui/resources/js/browser_command:mojo_bindings", ] diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index e778543bd5674..6466ffaee38c7 100644 --- a/patches/chromium/build_libc_as_static_library.patch +++ b/patches/chromium/build_libc_as_static_library.patch @@ -32,7 +32,7 @@ index 7915346430db72d18474d7a011b8dc7637c3f281..cd736d988f9c5e37dc24c724268fe115 ] if (is_linux && !is_chromeos) { diff --git a/buildtools/third_party/libc++abi/BUILD.gn b/buildtools/third_party/libc++abi/BUILD.gn -index 1b0bea340d6e8aec153add6f184e382172916f8b..f5a8193e6b72f4cc039b95783be7d254b93911d8 100644 +index 40f1285f14c0843405e0ee51879b8742285a006d..5be895d3e36df53a5960006a1513f1322400fd23 100644 --- a/buildtools/third_party/libc++abi/BUILD.gn +++ b/buildtools/third_party/libc++abi/BUILD.gn @@ -4,7 +4,7 @@ diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index bb9b959820869..7dbf4dbfec2a5 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -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 eba372243a31d08c251ad3367d24999277a8289b..713e2883139bca4bb56dcc7e3efcf6d6dfc4a02b 100644 +index 36a8fa8d3e981707e6688379813560ba94209ab3..e36a19c847912b007a94464321bb83b15bdcdafd 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6703,6 +6703,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6706,6 +6706,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,7 +21,7 @@ index eba372243a31d08c251ad3367d24999277a8289b..713e2883139bca4bb56dcc7e3efcf6d6 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 3fe9e1e4918ef65194621661c9c7c650089229fa..c8e49eeaca8b31479aa908be9c349ccd625e9e51 100644 +index f28855f738e3b98196813a6d306ba30f7f294cb2..5afb01c9de253053243a1add87269a9d848b5297 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3925,6 +3925,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -68,10 +68,10 @@ index ace032dc2ffac27fbdddee5a4b13c3c3e36ba5ae..80f7dd56fdaa94a9880995b2b5393af0 // 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 85ed8b5e84813c10f97c5785d906a87455f8f67e..a11d5ba888c1489870875c859ec9eb79c67f94b7 100644 +index a0a9f51b7e62b13f62467f14e3e9245cb6fc8d84..329cbc6f8c822c6f6deac4f341baec41228dca7b 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -571,6 +571,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -577,6 +577,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index 85ed8b5e84813c10f97c5785d906a87455f8f67e..a11d5ba888c1489870875c859ec9eb79 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 47527cb2e434f771f5aeb5099432ae86a0ad06ea..2fe1462a2cd92a731a5816b5fc22b059bad92fe8 100644 +index 3bbb6a39eeb719b94d0e212ea8da5051ff55d441..ceb2bb900e122840505aa8d3911923cffc9a907e 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -168,6 +168,7 @@ class NetworkService; +@@ -169,6 +169,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index 47527cb2e434f771f5aeb5099432ae86a0ad06ea..2fe1462a2cd92a731a5816b5fc22b059 } // namespace network namespace sandbox { -@@ -950,6 +951,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -960,6 +961,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 19409a0d9762f..f9c57ed263f14 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -246,7 +246,7 @@ index c6bd5c19f8a7ceec17c9e32af5296a9617f3a619..02199b439fba7fdc617b7f7980d958b7 void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 5c63a024827359ccf697d0b7fc8fa2092eb107b7..3da88b5831717c979373c064b4c1520c28d4fd98 100644 +index 1734f93f7d06faf2c28d65d23bbc6c17f72e0b59..b19517ceafabde2ad88e83af97b9768b8a03fb60 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3873,8 +3873,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( diff --git a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch index 262ac6344b129..edcaa6164cf93 100644 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch @@ -7,7 +7,7 @@ spellchecker uses a few IDS_ resources. We need to load these from Electrons grit header instead of Chromes diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index ec55c3f97988a7de06a738e61e389ba07712ad4e..6a40a73520a951d7c6fd06cbd07329a40ff41544 100644 +index 9917fcf771ecbfceaba4c02164de620d2aaf0775..492cd8e11e28e0b427aca227665295a3052af765 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn @@ -7088,6 +7088,7 @@ static_library("browser") { diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index dac0d9fbd0df3..81c325867337b 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index 61ab59e0d97a392ae18c1d7ad7dd606b5cd1c567..2a899818ebb67ba4fc06ccbcff3ee03f6b83c0e6 100644 +index 3824e500fd88105e9c6d459f23097b2b4f0686ed..927ede7608a5c6992e9f9fb05e4b8e43b7e10cf8 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1882,6 +1882,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1889,6 +1889,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { TargetColorParams params; @@ -240,10 +240,10 @@ index f5d73922086b5b27907fd393d4d4204a574c3b25..5b09f5ef5f04b519ed4148498c82d003 sandbox::policy::switches::kGpuSandboxAllowSysVShm, sandbox::policy::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index ac9570fa3d9cb3b0026f70465e5b21ac7778c3df..acc0e121e7746da397cfab07b3707de7ae9a3143 100644 +index 5f2451eefad211c85460eb457ad3d6e184540d59..d9d8352c6b1b8db8d86ad1ed1d4a3d300a999fa6 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -194,6 +194,7 @@ +@@ -196,6 +196,7 @@ #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ui_base_switches.h" #include "ui/display/display_switches.h" @@ -251,7 +251,7 @@ index ac9570fa3d9cb3b0026f70465e5b21ac7778c3df..acc0e121e7746da397cfab07b3707de7 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3283,6 +3284,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3293,6 +3294,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 755b0eb4b9951..85883eba90ea9 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,7 +6,7 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 03e318b14025f3c971d471351068986f8a1dd14d..59437e69e25fe85cffc9b558dec2284123ac48be 100644 +index f127b930806bc8e7b6fe8efb89eab6c43466326f..59dda38e5781132472991979d90317dfaa96028f 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -803,6 +803,9 @@ void RenderWidgetHostImpl::WasHidden() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index b30988fba7e9c..ac077f2964070 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,7 +33,7 @@ index 14c71cc69388da46f62d9835e2a06fef0870da02..9481ea08401ae29ae9c1d960491b05b3 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 20373c0e86852446569c401c4a993512cb388fc7..9b6dbdad1a17148303ddecaada17a57d4ea22bb2 100644 +index a4cd97599e2f131fe0d97ee49a44ed5b748739b7..074ce8a372ad4d54661071cfa37632b5d1bbf067 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -1343,6 +1343,13 @@ void NetworkContext::SetNetworkConditions( @@ -51,7 +51,7 @@ index 20373c0e86852446569c401c4a993512cb388fc7..9b6dbdad1a17148303ddecaada17a57d // 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 e412608e7720004462c48698c8ec39602b2b900e..46c00e0da6beb0c2e689475fc4b9927085414e1a 100644 +index 06a36a156501b252e91037ebac45c29c2995f624..cb5435028a537baa5e1dbbab9137e6547b9ed712 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -282,6 +282,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext @@ -63,10 +63,10 @@ index e412608e7720004462c48698c8ec39602b2b900e..46c00e0da6beb0c2e689475fc4b99270 void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CHROMEOS) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index fa56cfed3703664232843ad26028096d95dca253..9852498e93939796e7ba6f80efcc7b2d827187ac 100644 +index ae0a20a7a33e5a313f5545985a34e9cb93220996..aeb0ac8731689e5495ab039d30ac3e88acab9293 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1067,6 +1067,9 @@ interface NetworkContext { +@@ -1081,6 +1081,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index b0c806866f56a..c09e711620b05 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 7e7927c7258963bd95a2c064ef85e410f4d2571d..05353bda1169df38499e6f789bb632307d7bcfde 100644 +index 182f70b2b3bd9cbc6548d4c17caad797e5dad0ce..f78d5246a9e5f17089d47f95da22e922b6699057 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc @@ -158,6 +158,7 @@ diff --git a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 231ad6fe4f48e..54fb0814ebddd 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -81,7 +81,7 @@ index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index eff91b68cf4b72de41b7b2ad09c029b8b5dcf3c6..c736f772e3714c6a80703c41c8a2f0dab36b166d 100644 +index 03a9986ff94bc57e82a95e7a2a3fcc1415f28da0..79283e753512855360127471d40e145c325649ca 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -139,6 +139,8 @@ viz_component("service") { @@ -501,7 +501,7 @@ index 583e3e2525c753a0962d481fc67a3582df75d0e9..9416ec929bebcff7f07088e635376ef2 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 4b6712b2a4f3c56a6d243ff9d93539505a5c7b86..7f62362ab27abd3497d23e8db8c8bb5a2e3392f9 100644 +index 7607a49cdc1a6028e272ce76b78806ec13415f42..e2f4350edeae766916716345327d0bbefb561e4c 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 @@ -84,7 +84,8 @@ RootCompositorFrameSinkImpl::Create( @@ -619,7 +619,7 @@ index 8b74e1d2a463156f62e983f535ff68a53215f648..6ef04da46c8b097b01d5ee40dcadf222 raw_ptr root_layer_ = nullptr; diff --git a/ui/gfx/ca_layer_params.h b/ui/gfx/ca_layer_params.h -index 12e115cd6a128d8d150abc786d4d38b1d5119d91..b6320de28750333bee7ee83393849f4eb0a956ac 100644 +index c5fb29b30b9c5b7483998c567ed9a479d8743939..dc10d78315f76a3914ccd6e2e99af97fa909918b 100644 --- a/ui/gfx/ca_layer_params.h +++ b/ui/gfx/ca_layer_params.h @@ -6,6 +6,7 @@ @@ -630,7 +630,7 @@ index 12e115cd6a128d8d150abc786d4d38b1d5119d91..b6320de28750333bee7ee83393849f4e #include "ui/gfx/geometry/size.h" #include "ui/gfx/gfx_export.h" -@@ -51,6 +52,8 @@ struct GFX_EXPORT CALayerParams { +@@ -41,6 +42,8 @@ struct GFX_EXPORT CALayerParams { gfx::ScopedRefCountedIOSurfaceMachPort io_surface_mach_port; #endif diff --git a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch index 9dc1207d32dff..df31e9a3f8f82 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -103,10 +103,10 @@ index 4c4cc16db82d7434573f7740855fbe72d68815e6..f71290800b6bb51a39b1f86be36f02d6 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 5c5aeeda64b244ab1f58556f28d2ca3c133d03a8..2f9aa4d49693a22507f668b2738c54be59802b8f 100644 +index 73b90e9b575b94f009ae3b87bd0ad76d69803bc3..e08bb784a11209f1531e8d981bd238d67db31e22 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -469,6 +469,7 @@ URLLoader::URLLoader( +@@ -462,6 +462,7 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), per_factory_corb_state_(context.GetMutableCorbState()), @@ -114,7 +114,7 @@ index 5c5aeeda64b244ab1f58556f28d2ca3c133d03a8..2f9aa4d49693a22507f668b2738c54be devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -636,7 +637,7 @@ URLLoader::URLLoader( +@@ -629,7 +630,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,7 +123,7 @@ index 5c5aeeda64b244ab1f58556f28d2ca3c133d03a8..2f9aa4d49693a22507f668b2738c54be url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1395,6 +1396,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1388,6 +1389,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); diff --git a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index 458f2e257efd7..e02059c0f4cde 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta to users. We should try to upstream this. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 7440f2025701ccde0ade36cda22467dd0614109b..3c6ee78454dc9154a37ec9046e382878ffda0c82 100644 +index e1ac23f3adf38591ae220ea84c5c0717a28e64bb..fad1663512cf30b270289ecfa9c336b08fe67836 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1830,7 +1830,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1831,7 +1831,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 481bd633fe47e..69ce8ecb1ad81 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -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 1ca418461788e5b7d58c14b03c456d2c21f1305b..7a65b6713e3d0547f1990f8c59d0d11459532477 100644 +index 988290f88894157458641d2d201a060820813358..e19b30fc7a88c981d0dad3ed739f3219980b5aeb 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc @@ -3089,6 +3089,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( @@ -20,10 +20,10 @@ index 1ca418461788e5b7d58c14b03c456d2c21f1305b..7a65b6713e3d0547f1990f8c59d0d114 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 2fe1462a2cd92a731a5816b5fc22b059bad92fe8..a4dfa54a7844983262cc0fa635433131382e4d14 100644 +index ceb2bb900e122840505aa8d3911923cffc9a907e..c135db6a148e1d1b4af8d5a1d6a80e11ad99d9fe 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -275,6 +275,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -276,6 +276,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch index 6682f1b87ea4a..b3fda53f56fc1 100644 --- a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch +++ b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch @@ -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 ee41efe814da161cafb49229e1f02c8b82749e7c..494bbdeea2725e4b1218ba534fd126203012c100 100755 +index 0fb53bbaf4174594b46ecba6d4d28f7436ef9a72..9951fc52f06be5199b93d29d18a1b5582299f334 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -298,6 +298,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 21bddfec34c2b..5b8f416677503 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -44,7 +44,7 @@ index 9734fb620a9a4010083af41a9e5cea038556eef5..05c95fb9b15f5ccbfecaee29d360dd27 } // namespace diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index fedefafc9837f681ad1c3fc48d06a333fea893e2..f07a090c24382c9330e8bd8baa3de47ec76da956 100644 +index cb82b91eb2e62453bcf2e3dd47f1b44d927e37d9..a35a14928d63a25284768de2ef67f2de2bedd133 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 @@ -561,10 +561,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { @@ -167,7 +167,7 @@ index 09ada3b859e1862cbf365960422871a56af54983..58002d37ba340f84f47e2522c0d7bf7c /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 37f37c3a8e8a00cf9d4b8959ac2d97fe31629ad8..fa06bafbbaa69a20ce5a3260ca92947cb2bb9228 100644 +index 0d7d47d1260d47959b0fa9f116a039c8b8307c96..15cc28a9bbc7b33a727e7c172207262902835ccc 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -317,6 +317,13 @@ component("base") { diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index d524259dd9428..117a515b17993 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,7 +7,7 @@ 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 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..20373c0e86852446569c401c4a993512cb388fc7 100644 +index 2ee1a3da9ca1543d032c2e05c9b340a231f0f495..a4cd97599e2f131fe0d97ee49a44ed5b748739b7 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -126,6 +126,11 @@ @@ -128,7 +128,7 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..20373c0e86852446569c401c4a993512 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2226,6 +2323,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2235,6 +2332,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS) @@ -139,7 +139,7 @@ index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..20373c0e86852446569c401c4a993512 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 6de81678e62d6921d0df5944ab01705402caa568..e412608e7720004462c48698c8ec39602b2b900e 100644 +index 01befea8b354ed1dd143aa895d0d9efb0d26fd35..06a36a156501b252e91037ebac45c29c2995f624 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h @@ -105,6 +105,7 @@ class URLMatcher; @@ -159,7 +159,7 @@ index 6de81678e62d6921d0df5944ab01705402caa568..e412608e7720004462c48698c8ec3960 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -793,6 +796,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -795,6 +798,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; #endif @@ -169,7 +169,7 @@ index 6de81678e62d6921d0df5944ab01705402caa568..e412608e7720004462c48698c8ec3960 // CertNetFetcher is not used by the current platform, or if the actual // net::CertVerifier is instantiated outside of the network service. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 9cd06ee552f8e592dd9efd1e73b10e5998559c04..fa56cfed3703664232843ad26028096d95dca253 100644 +index 0b1afd416381c28e5bc96fa44562c061f44a7121..ae0a20a7a33e5a313f5545985a34e9cb93220996 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom @@ -277,6 +277,17 @@ struct NetworkContextFilePaths { @@ -190,7 +190,7 @@ index 9cd06ee552f8e592dd9efd1e73b10e5998559c04..fa56cfed3703664232843ad26028096d // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -807,6 +818,9 @@ interface NetworkContext { +@@ -821,6 +832,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index fbb057eaf0f80..5d535e2d459c5 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -131,10 +131,10 @@ index 951075749b24814606f494c5a89ee2adf527f512..7036323ff8ee38ae92790dfd2e216df6 const GURL& document_url, mojo::PendingReceiver receiver); diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index a1a3683b8da459a5859a2953536f3400a7fda213..602525302cfdd89bf2ddc2924076e7349de7562a 100644 +index a002e3972f1ed8ea8ff2a7febe1c6b7a8ffbe657..eebe90092c65dd9160a394b9b6eb2273b03de503 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2125,7 +2125,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2135,7 +2135,7 @@ void RenderProcessHostImpl::CreateNotificationService( document_url = rfh->GetLastCommittedURL(); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch index 686010806fc75..a94e20661ddce 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -61,10 +61,10 @@ index 1d8415814c6245e3f2dfd01de7a2de11f09cdc7a..6db48efe454820e242b862edbfaf4d40 } diff --git a/ui/color/win/native_color_mixers_win.cc b/ui/color/win/native_color_mixers_win.cc -index 5faab22f665829e04cc07125f2486b9cb35f1f56..9776dbcc576c62ee44cbdd0d59542856363fb8f4 100644 +index 0620a389750649218865de06ed5d66f9ffe71871..575dcd925807263a9a5657d5156a3772421a0ed5 100644 --- a/ui/color/win/native_color_mixers_win.cc +++ b/ui/color/win/native_color_mixers_win.cc -@@ -136,16 +136,22 @@ void AddNativeUiColorMixer(ColorProvider* provider, +@@ -136,6 +136,10 @@ void AddNativeUiColorMixer(ColorProvider* provider, SetAlpha(kColorNotificationInputForeground, gfx::kGoogleGreyAlpha700); mixer[kColorSliderTrack] = AlphaBlend( kColorNativeHighlight, kColorNativeWindow, gfx::kGoogleGreyAlpha400); @@ -75,8 +75,10 @@ index 5faab22f665829e04cc07125f2486b9cb35f1f56..9776dbcc576c62ee44cbdd0d59542856 // Window Background mixer[kColorBubbleFooterBackground] = {kColorNativeWindow}; +@@ -143,11 +147,13 @@ void AddNativeUiColorMixer(ColorProvider* provider, + mixer[kColorFrameActive] = {ui::kColorNativeWindow}; + mixer[kColorFrameInactive] = {ui::kColorNativeWindow}; mixer[kColorTooltipBackground] = {kColorNativeWindow}; - mixer[kColorButtonBackgroundProminentDisabled] = {kColorNativeWindow}; + mixer[kColorResultsTableNormalBackground] = {kColorNativeWindow}; // Window Text @@ -87,7 +89,7 @@ index 5faab22f665829e04cc07125f2486b9cb35f1f56..9776dbcc576c62ee44cbdd0d59542856 // Hyperlinks mixer[kColorLinkForeground] = {kColorNativeHotlight}; -@@ -179,6 +185,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, +@@ -181,6 +187,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, mixer[kColorTextfieldForeground] = {kColorNativeBtnText}; mixer[kColorTextfieldForegroundPlaceholder] = {kColorNativeBtnText}; mixer[kColorTextfieldForegroundDisabled] = {kColorNativeBtnText}; diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 86e14be4b6659..6593266db987f 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -483,7 +483,7 @@ index 51ebcb4ae399018d3fd8566656596a7ef1f148af..c0fbff95137e2e5bccb9702a8cc858df // Tells the browser that there are invalid printer settings. ShowInvalidPrinterSettingsError(); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9c832bf5a 100644 +index 0d5c467e59c85589872a41b3783110b9d84ffbdb..75a0c6c1ee04cb655261d9d385e486cbd1345f33 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -40,6 +40,7 @@ @@ -494,7 +494,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 #include "printing/units.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" -@@ -1254,7 +1255,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1259,7 +1260,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -504,7 +504,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 if (!weak_this) return; -@@ -1285,7 +1287,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1290,7 +1292,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -513,7 +513,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1300,7 +1302,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1305,7 +1307,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -522,7 +522,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1331,7 +1333,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1336,7 +1338,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -532,7 +532,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1378,6 +1381,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1383,6 +1386,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -541,7 +541,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 print_preview_context_.OnPrintPreview(); if (print_preview_context_.IsForArc()) { -@@ -1915,7 +1920,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1920,7 +1925,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -551,7 +551,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 // Check if |this| is still valid. if (!weak_this) return; -@@ -1930,7 +1936,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1935,7 +1941,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -562,7 +562,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1938,7 +1946,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1943,7 +1951,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -571,7 +571,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1957,8 +1965,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1962,8 +1970,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -588,7 +588,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 // Check if |this| is still valid. if (!self) return; -@@ -2206,36 +2221,51 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2211,36 +2226,51 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -652,7 +652,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2380,7 +2410,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2385,7 +2415,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -661,7 +661,7 @@ index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9 *output = std::move(input); std::move(quit_closure).Run(); }, -@@ -2625,18 +2655,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, +@@ -2630,18 +2660,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, } bool PrintRenderFrameHelper::CheckForCancel() { diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index ec5cabb02673a..3b5caea926f8b 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -30,7 +30,7 @@ index 059ff2b47e7aa8b9707e71ae9a1793bfdd86d319..529637f8b6af6b8b45f9de61d27b5e9c // 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 59437e69e25fe85cffc9b558dec2284123ac48be..d3af2aed32f6047cbb86bd2b4ce1df9fee80437c 100644 +index 59dda38e5781132472991979d90317dfaa96028f..7d51b1d678b9b11c0dfc48a0a890a43d21830530 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -2082,6 +2082,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { @@ -43,7 +43,7 @@ index 59437e69e25fe85cffc9b558dec2284123ac48be..d3af2aed32f6047cbb86bd2b4ce1df9f void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index c8e49eeaca8b31479aa908be9c349ccd625e9e51..5c63a024827359ccf697d0b7fc8fa2092eb107b7 100644 +index 5afb01c9de253053243a1add87269a9d848b5297..1734f93f7d06faf2c28d65d23bbc6c17f72e0b59 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -4486,6 +4486,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { @@ -59,10 +59,10 @@ index c8e49eeaca8b31479aa908be9c349ccd625e9e51..5c63a024827359ccf697d0b7fc8fa209 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 85b426a7552cf925157a76fcd1ed7de47cd27a54..7440f2025701ccde0ade36cda22467dd0614109b 100644 +index 5020c6674ba692c15d75d5eec981ac7b60f61bbe..e1ac23f3adf38591ae220ea84c5c0717a28e64bb 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -965,6 +965,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -966,6 +966,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, blink::mojom::FrameVisibility visibility) override; void SendScreenRects() override; TextInputManager* GetTextInputManager() override; diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 24054daa57a97..6a2fb792cfb5c 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch ... something to do with OSR? and maybe 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 5fd8cb63f589dd204c2477f2375ec1d3716b55f0..85e52f7a99fe350da05270cf6fde0fe82a1bec40 100644 +index 14b5b4552f8077236486c6c182a1e231b8aa8408..a6c20b9803eb9a259460ec09826cc1cb037e5e3f 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -660,6 +660,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -661,6 +661,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 6ed6e2f5790a2..d66aeb1222b9f 100644 --- a/patches/chromium/resource_file_conflict.patch +++ b/patches/chromium/resource_file_conflict.patch @@ -52,10 +52,10 @@ Some alternatives to this patch: None of these options seems like a substantial maintainability win over this patch to me (@nornagon). diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 04546cad2b3e6355d667fe725b85836f128f0df7..7caaf66cad9d5b9f787cea0d49c32c26801571c2 100644 +index 0cfd59aa05b0d8e837c8057f00c593b4878539b2..0cf38ad237727254c77472f73d82d6f65fe14bde 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1591,7 +1591,7 @@ if (is_chrome_branded && !is_android) { +@@ -1593,7 +1593,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 04546cad2b3e6355d667fe725b85836f128f0df7..7caaf66cad9d5b9f787cea0d49c32c26 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1619,6 +1619,12 @@ if (!is_android) { +@@ -1621,6 +1621,12 @@ if (!is_android) { } } diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 0a1e41b6d04e2..d88d68edf85bd 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -6,7 +6,7 @@ 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 0b42cba8667225c25df2405d99efe119a26c3585..ee8b42500499dc6a1700bc38e5b75976bb408490 100644 +index 03b92fd7a6218d3469648b96f273377d84c2f13f..d7ca333c81fd5765da047acf54aaeb5e07ab4c26 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -1344,7 +1344,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index dd479d4ad0215..e33766bf410c0 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -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 602525302cfdd89bf2ddc2924076e7349de7562a..ac9570fa3d9cb3b0026f70465e5b21ac7778c3df 100644 +index eebe90092c65dd9160a394b9b6eb2273b03de503..5f2451eefad211c85460eb457ad3d6e184540d59 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1836,9 +1836,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1838,9 +1838,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 849e94be20ccd..f9d20ffdd014d 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -9,7 +9,7 @@ is needed for OSR. Originally landed in https://github.com/electron/libchromiumcontent/pull/226. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 3da88b5831717c979373c064b4c1520c28d4fd98..cf3ea07bb7d708f9078c46af2c4583215f9cd189 100644 +index b19517ceafabde2ad88e83af97b9768b8a03fb60..4a553eee8f5d06cb645f2b52fe3baee347b1fa94 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3040,6 +3040,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index af32042b3d84e..727671ac417c4 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -14,10 +14,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 713e2883139bca4bb56dcc7e3efcf6d6dfc4a02b..be2721cc6dc0582a05c74ac3d50c123666d7d5a3 100644 +index e36a19c847912b007a94464321bb83b15bdcdafd..afd175d35096b0a50ccee3f2b14c632adbfec58a 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6102,6 +6102,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6105,6 +6105,15 @@ void RenderFrameHostImpl::EnterFullscreen( notified_instances.insert(parent_site_instance); } diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 099e2f15e3205..fb1f1fb62a707 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index 63ead7f8ab838693bade7163ddebd1787cc82344..8512a66eda07202b6c6faea049736fd8 // 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 a64d78c9d8112610af6a17c8f8b8b9124b9d40a3..0bd64497495cfd8eee5e7cae3eca69937f2e79e0 100644 +index bd420d1cf8b5c1de687be10979921381cb770de9..0ea0012253d8348f1ba204f3b1fca7c5e2d306ce 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -932,6 +932,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -954,6 +954,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index a64d78c9d8112610af6a17c8f8b8b9124b9d40a3..0bd64497495cfd8eee5e7cae3eca6993 const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 10c96d3915e64ebebd283c70292b33e22612b8eb..9fa6853a2945e2a34ed319f874f356a4afd72dd3 100644 +index 7255ac218c8fd061c2125e33054d9a87c13d1eb4..ab771fe015c195f53ce8bb1411050635f02c69f3 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -208,6 +208,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -209,6 +209,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index 8c14560076af0..78c40be5909da 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -35,10 +35,10 @@ index 8512a66eda07202b6c6faea049736fd8f16c93db..afe767350c8878da38ab2b566fa89bcb // 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 0bd64497495cfd8eee5e7cae3eca69937f2e79e0..9ab68aabff203127dba5a0ccdf16fa62f3ef4c40 100644 +index 0ea0012253d8348f1ba204f3b1fca7c5e2d306ce..8851d8bd283e1d44a921034e969f160ff494d6f9 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -944,6 +944,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -966,6 +966,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index 0bd64497495cfd8eee5e7cae3eca69937f2e79e0..9ab68aabff203127dba5a0ccdf16fa62 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 9fa6853a2945e2a34ed319f874f356a4afd72dd3..87f9190d227e501a648dbbaa350bbb105601fbfb 100644 +index ab771fe015c195f53ce8bb1411050635f02c69f3..a78d38985b3761a63cc4efbd354820c6fd258d9c 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -208,6 +208,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -209,6 +209,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; From 35bf159cd33819cdc2679c7c97b828deed575351 Mon Sep 17 00:00:00 2001 From: Calvin Date: Mon, 28 Mar 2022 17:07:29 -0600 Subject: [PATCH 262/268] chore: update node types version (#33477) * chore: update node types version * update another types package to fix incompatible global declarations * remove incompatible type magicks * update our ambient types to match the node types * fix test type --- lib/common/webpack-provider.ts | 2 +- npm/package.json | 2 +- package.json | 8 ++--- spec-main/api-web-request-spec.ts | 6 ++-- typings/internal-ambient.d.ts | 2 +- yarn.lock | 51 +++++++++++++++++-------------- 6 files changed, 38 insertions(+), 33 deletions(-) diff --git a/lib/common/webpack-provider.ts b/lib/common/webpack-provider.ts index a54551d321843..4d2a8c9ed3ce6 100644 --- a/lib/common/webpack-provider.ts +++ b/lib/common/webpack-provider.ts @@ -7,7 +7,7 @@ // Rip global off of window (which is also global) so that webpack doesn't // auto replace it with a looped reference to this file -const _global = typeof globalThis !== 'undefined' ? globalThis.global : (self as any || window as any).global as NodeJS.Global; +const _global = typeof globalThis !== 'undefined' ? globalThis.global : (self || window).global; const process = _global.process; const Buffer = _global.Buffer; diff --git a/npm/package.json b/npm/package.json index 753f3af8b1fd3..d97e6704cf4e3 100644 --- a/npm/package.json +++ b/npm/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@electron/get": "^1.13.0", - "@types/node": "^14.6.2", + "@types/node": "^16.11.26", "extract-zip": "^1.0.3" }, "engines": { diff --git a/package.json b/package.json index b98dc46ceca92..add068bd84e87 100644 --- a/package.json +++ b/package.json @@ -14,12 +14,12 @@ "@types/chai": "^4.2.12", "@types/chai-as-promised": "^7.1.3", "@types/dirty-chai": "^2.0.2", - "@types/express": "^4.17.7", + "@types/express": "^4.17.13", "@types/fs-extra": "^9.0.1", "@types/klaw": "^3.0.1", "@types/minimist": "^1.2.0", "@types/mocha": "^7.0.2", - "@types/node": "^14.6.2", + "@types/node": "^16.11.26", "@types/semver": "^7.3.3", "@types/send": "^0.14.5", "@types/split": "^1.0.0", @@ -27,7 +27,7 @@ "@types/temp": "^0.8.34", "@types/uuid": "^3.4.6", "@types/webpack": "^4.41.21", - "@types/webpack-env": "^1.15.2", + "@types/webpack-env": "^1.16.3", "@typescript-eslint/eslint-plugin": "^4.4.1", "@typescript-eslint/parser": "^4.4.1", "asar": "^3.1.0", @@ -141,4 +141,4 @@ "node script/gen-hunspell-filenames.js" ] } -} \ No newline at end of file +} diff --git a/spec-main/api-web-request-spec.ts b/spec-main/api-web-request-spec.ts index f939f4af5a668..22e58e5fe8be8 100644 --- a/spec-main/api-web-request-spec.ts +++ b/spec-main/api-web-request-spec.ts @@ -5,7 +5,7 @@ import * as path from 'path'; import * as url from 'url'; import * as WebSocket from 'ws'; import { ipcMain, protocol, session, WebContents, webContents } from 'electron/main'; -import { AddressInfo } from 'net'; +import { AddressInfo, Socket } from 'net'; import { emittedOnce } from './events-helpers'; const fixturesPath = path.resolve(__dirname, 'fixtures'); @@ -481,8 +481,8 @@ describe('webRequest module', () => { server.on('upgrade', function upgrade (request, socket, head) { const pathname = require('url').parse(request.url).pathname; if (pathname === '/websocket') { - reqHeaders[request.url] = request.headers; - wss.handleUpgrade(request, socket, head, function done (ws) { + reqHeaders[request.url!] = request.headers; + wss.handleUpgrade(request, socket as Socket, head, function done (ws) { wss.emit('connection', ws, request); }); } diff --git a/typings/internal-ambient.d.ts b/typings/internal-ambient.d.ts index 17fd807026b0f..77a53136ff732 100644 --- a/typings/internal-ambient.d.ts +++ b/typings/internal-ambient.d.ts @@ -253,7 +253,7 @@ declare namespace NodeJS { _firstFileName?: string; helperExecPath: string; - mainModule: NodeJS.Module; + mainModule?: NodeJS.Module | undefined; } } diff --git a/yarn.lock b/yarn.lock index 5059edbeab68e..44fdcf45f190d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -290,22 +290,22 @@ resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== -"@types/express-serve-static-core@*": - version "4.17.8" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.8.tgz#b8f7b714138536742da222839892e203df569d1c" - integrity sha512-1SJZ+R3Q/7mLkOD9ewCBDYD2k0WyZQtWYqF/2VvoNN2/uhI49J9CDN4OAm+wGMA0DbArA4ef27xl4+JwMtGggw== +"@types/express-serve-static-core@^4.17.18": + version "4.17.28" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" + integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== dependencies: "@types/node" "*" "@types/qs" "*" "@types/range-parser" "*" -"@types/express@^4.17.7": - version "4.17.7" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.7.tgz#42045be6475636d9801369cd4418ef65cdb0dd59" - integrity sha512-dCOT5lcmV/uC2J9k0rPafATeeyz+99xTt54ReX11/LObZgfzJqZNcW27zGhYyX+9iSEGXGt5qLPwRSvBZcLvtQ== +"@types/express@^4.17.13": + version "4.17.13" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.13.tgz#a76e2995728999bab51a33fabce1d705a3709034" + integrity sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA== dependencies: "@types/body-parser" "*" - "@types/express-serve-static-core" "*" + "@types/express-serve-static-core" "^4.17.18" "@types/qs" "*" "@types/serve-static" "*" @@ -406,6 +406,11 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.1.tgz#dc488842312a7f075149312905b5e3c0b054c79d" integrity sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw== +"@types/mime@^1": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" + integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== + "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" @@ -441,16 +446,16 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-11.13.22.tgz#91ee88ebfa25072433497f6f3150f84fa8c3a91b" integrity sha512-rOsaPRUGTOXbRBOKToy4cgZXY4Y+QSVhxcLwdEveozbk7yuudhWMpxxcaXqYizLMP3VY7OcWCFtx9lGFh5j5kg== -"@types/node@^14.6.2": - version "14.6.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.3.tgz#cc4f979548ca4d8e7b90bc0180052ab99ee64224" - integrity sha512-pC/hkcREG6YfDfui1FBmj8e20jFU5Exjw4NYDm8kEdrW+mOh0T1Zve8DWKnS7ZIZvgncrctcNCXF4Q2I+loyww== - "@types/node@^16.0.0": version "16.4.13" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.13.tgz#7dfd9c14661edc65cccd43a29eb454174642370d" integrity sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg== +"@types/node@^16.11.26": + version "16.11.26" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.26.tgz#63d204d136c9916fb4dcd1b50f9740fe86884e47" + integrity sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ== + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -485,12 +490,12 @@ "@types/node" "*" "@types/serve-static@*": - version "1.13.4" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.4.tgz#6662a93583e5a6cabca1b23592eb91e12fa80e7c" - integrity sha512-jTDt0o/YbpNwZbQmE/+2e+lfjJEJJR0I3OFaKQKPWkASkCoW3i6fsUnqudSMcNAfbtmADGu8f4MV4q+GqULmug== + version "1.13.10" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.10.tgz#f5e0ce8797d2d7cc5ebeda48a52c96c4fa47a8d9" + integrity sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ== dependencies: - "@types/express-serve-static-core" "*" - "@types/mime" "*" + "@types/mime" "^1" + "@types/node" "*" "@types/source-list-map@*": version "0.1.2" @@ -573,10 +578,10 @@ dependencies: "@types/node" "*" -"@types/webpack-env@^1.15.2": - version "1.15.2" - resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.2.tgz#927997342bb9f4a5185a86e6579a0a18afc33b0a" - integrity sha512-67ZgZpAlhIICIdfQrB5fnDvaKFcDxpKibxznfYRVAT4mQE41Dido/3Ty+E3xGBmTogc5+0Qb8tWhna+5B8z1iQ== +"@types/webpack-env@^1.16.3": + version "1.16.3" + resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.16.3.tgz#b776327a73e561b71e7881d0cd6d34a1424db86a" + integrity sha512-9gtOPPkfyNoEqCQgx4qJKkuNm/x0R2hKR7fdl7zvTJyHnIisuE/LfvXOsYWL0o3qq6uiBnKZNNNzi3l0y/X+xw== "@types/webpack-sources@*": version "0.1.6" From 8680415128bf37e195e3efa7547c26fe911233ac Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 17:11:02 -0700 Subject: [PATCH 263/268] Bump v18.0.0 --- ELECTRON_VERSION | 2 +- package.json | 4 ++-- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index c018cf78c496a..03191c968cd17 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-beta.6 \ No newline at end of file +18.0.0 \ No newline at end of file diff --git a/package.json b/package.json index add068bd84e87..3ac318efe0331 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-beta.6", + "version": "18.0.0", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -141,4 +141,4 @@ "node script/gen-hunspell-filenames.js" ] } -} +} \ No newline at end of file diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index e9bf32f0d41be..1d64d2d88b8a8 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,6 - PRODUCTVERSION 18,0,0,6 + FILEVERSION 18,0,0,0 + PRODUCTVERSION 18,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From 06b3615e30e5423e5e3e6c5a6443dcdfb9ef1aaa Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 21:17:13 -0700 Subject: [PATCH 264/268] ci: fixup esbuild on macos (#33492) * ci: fixup esbuild on macos * ci: call update_depot_tools right after clone * when all else fails, use sed * chore: empty commit to trigger ci Co-authored-by: John Kleinschmidt Co-authored-by: VerteDinde --- .circleci/build_config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index 40b010750a22b..9299ccc631347 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -469,6 +469,8 @@ step-fix-sync: &step-fix-sync # Fix esbuild (wrong binary) echo 'infra/3pp/tools/esbuild/${platform}' `gclient getdep --deps-file=src/third_party/devtools-frontend/src/DEPS -r 'third_party/esbuild:infra/3pp/tools/esbuild/${platform}'` > esbuild_ensure_file + # Remove extra output from calling gclient getdep which always calls update_depot_tools + sed -i '' "s/Updating depot_tools... //g" esbuild_ensure_file cipd ensure --root src/third_party/devtools-frontend/src/third_party/esbuild -ensure-file esbuild_ensure_file fi From 50d9fd215e190b4f4029a4b28d90ffeca8f208c0 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 21:18:45 -0700 Subject: [PATCH 265/268] Bump v18.0.1 --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 03191c968cd17..1bb332bc466a0 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0 \ No newline at end of file +18.0.1 \ No newline at end of file diff --git a/package.json b/package.json index 3ac318efe0331..0f33d6e99a913 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0", + "version": "18.0.1", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 1d64d2d88b8a8..f80a1409fa9b2 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,0 - PRODUCTVERSION 18,0,0,0 + FILEVERSION 18,0,1,0 + PRODUCTVERSION 18,0,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "18.0.0" + VALUE "FileVersion", "18.0.1" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "18.0.0" + VALUE "ProductVersion", "18.0.1" VALUE "SquirrelAwareVersion", "1" END END From 86294aa1d0631783a440e4bcf3dbb3062abad829 Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 21:20:30 -0700 Subject: [PATCH 266/268] Revert "Bump v18.0.1" This reverts commit 50d9fd215e190b4f4029a4b28d90ffeca8f208c0. --- ELECTRON_VERSION | 2 +- package.json | 2 +- shell/browser/resources/win/electron.rc | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 1bb332bc466a0..03191c968cd17 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.1 \ No newline at end of file +18.0.0 \ No newline at end of file diff --git a/package.json b/package.json index 0f33d6e99a913..3ac318efe0331 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.1", + "version": "18.0.0", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index f80a1409fa9b2..1d64d2d88b8a8 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,1,0 - PRODUCTVERSION 18,0,1,0 + FILEVERSION 18,0,0,0 + PRODUCTVERSION 18,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -68,12 +68,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "18.0.1" + VALUE "FileVersion", "18.0.0" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "18.0.1" + VALUE "ProductVersion", "18.0.0" VALUE "SquirrelAwareVersion", "1" END END From 4cfa648a2e7ca945b4816b84a49f95bb32518f33 Mon Sep 17 00:00:00 2001 From: Keeley Hammond Date: Mon, 28 Mar 2022 21:34:36 -0700 Subject: [PATCH 267/268] Revert "Bump v18.0.0" (#33493) This reverts commit 8680415128bf37e195e3efa7547c26fe911233ac. --- ELECTRON_VERSION | 2 +- package.json | 4 ++-- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index 03191c968cd17..c018cf78c496a 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0 \ No newline at end of file +18.0.0-beta.6 \ No newline at end of file diff --git a/package.json b/package.json index 3ac318efe0331..add068bd84e87 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0", + "version": "18.0.0-beta.6", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -141,4 +141,4 @@ "node script/gen-hunspell-filenames.js" ] } -} \ No newline at end of file +} diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index 1d64d2d88b8a8..e9bf32f0d41be 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,0 - PRODUCTVERSION 18,0,0,0 + FILEVERSION 18,0,0,6 + PRODUCTVERSION 18,0,0,6 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L From da6996dc63ce9a7a22790991a10486331b8dc3ff Mon Sep 17 00:00:00 2001 From: Sudowoodo Release Bot <88427002+sudowoodo-release-bot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 21:35:58 -0700 Subject: [PATCH 268/268] Bump v18.0.0 --- ELECTRON_VERSION | 2 +- package.json | 4 ++-- shell/browser/resources/win/electron.rc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ELECTRON_VERSION b/ELECTRON_VERSION index c018cf78c496a..03191c968cd17 100644 --- a/ELECTRON_VERSION +++ b/ELECTRON_VERSION @@ -1 +1 @@ -18.0.0-beta.6 \ No newline at end of file +18.0.0 \ No newline at end of file diff --git a/package.json b/package.json index add068bd84e87..3ac318efe0331 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "18.0.0-beta.6", + "version": "18.0.0", "repository": "https://github.com/electron/electron", "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS", "devDependencies": { @@ -141,4 +141,4 @@ "node script/gen-hunspell-filenames.js" ] } -} +} \ No newline at end of file diff --git a/shell/browser/resources/win/electron.rc b/shell/browser/resources/win/electron.rc index e9bf32f0d41be..1d64d2d88b8a8 100644 --- a/shell/browser/resources/win/electron.rc +++ b/shell/browser/resources/win/electron.rc @@ -50,8 +50,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 18,0,0,6 - PRODUCTVERSION 18,0,0,6 + FILEVERSION 18,0,0,0 + PRODUCTVERSION 18,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L